Lines Matching defs:lld

69 static mblk_t *llc1_form_udata(llc1_t *lld, llc_mac_info_t *macinfo,
72 static mblk_t *llc1_xid_ind_con(llc1_t *lld, llc_mac_info_t *macinfo,
75 static mblk_t *llc1_test_ind_con(llc1_t *lld, llc_mac_info_t *macinfo,
111 static int llc1_snap_match(llc1_t *lld, struct snaphdr *snap);
720 llc1_t *lld = (llc1_t *)q->q_ptr;
738 lld->llc_stats->llcs_nobuffer++;
762 mutex_enter(&lld->llc_lock);
763 putnext(lld->llc_mac_info->llcp_queue, mp);
764 mutex_exit(&lld->llc_lock);
787 llc1_multicast(struct ether_addr *addr, llc1_t *lld)
791 if (lld->llc_mcast)
792 for (i = 0; i < lld->llc_multicnt; i++)
793 if (lld->llc_mcast[i] &&
794 lld->llc_mcast[i]->llcm_refcnt &&
795 bcmp(lld->llc_mcast[i]->llcm_addr,
813 llc1_t *lld;
823 lld = (llc1_t *)q->q_ptr;
896 lld->llc_mac_info = NULL;
947 lld = (llc1_t *)q->q_ptr;
948 if (llc1_getppa(lld->llc_mac_info,
1114 llc1_t *lld = (llc1_t *)q->q_ptr;
1116 ASSERT(lld);
1131 if (lld->llc_mac_info == NULL)
1134 if (lld->llc_qptr && lld->llc_state != DL_UNBOUND) {
1138 lld->llc_state);
1157 lld->llc_state = DL_BIND_PENDING;
1161 if (lld->llc_mac_info->llcp_type == DL_CSMACD)
1166 lld->llc_sap = sap;
1171 lld->llc_snap[3] = ((uchar_t *)&snapsap)[0];
1172 lld->llc_snap[4] = ((uchar_t *)&snapsap)[1];
1174 lld->llc_flags |= LLC_SNAP;
1175 lld->llc_sap = LLC_SNAP_SAP;
1180 printf("llc1_bind: ok - type = %d\n", lld->llc_type);
1184 lld->llc_flags |= LLC1_AUTO_XID;
1186 lld->llc_flags |= LLC1_AUTO_TEST;
1190 dlbindack(q, mp, sap, lld->llc_mac_info->llcp_macaddr, 6, 0, 0);
1192 lld->llc_state = DL_IDLE; /* bound and ready */
1204 llc1_t *lld;
1210 lld = (llc1_t *)q->q_ptr;
1212 if (lld->llc_mac_info == NULL)
1215 if (lld->llc_state != DL_IDLE) {
1219 lld->llc_state);
1223 lld->llc_state = DL_UNBIND_PENDING;
1224 lld->llc_flags &= ~(LLC_SNAP|LLC_SNAP_OID); /* just in case */
1226 lld->llc_state = DL_UNBOUND;
1236 llc1_t *lld;
1245 lld = (llc1_t *)q->q_ptr;
1246 ASSERT(lld);
1247 if (lld->llc_mac_info == NULL)
1251 2 * lld->llc_mac_info->llcp_addrlen + 2;
1260 if (lld->llc_mac_info)
1261 dlp->dl_max_sdu = lld->llc_mac_info->llcp_maxpkt;
1263 dlp->dl_mac_type = lld->llc_type;
1265 dlp->dl_current_state = lld->llc_state;
1267 (lld->llc_style == 0) ? lld->llc_style : DL_STYLE2;
1270 if (lld->llc_mac_info) {
1271 dlp->dl_addr_length = lld->llc_mac_info->llcp_addrlen;
1274 bcopy(lld->llc_mac_info->llcp_macaddr,
1276 lld->llc_mac_info->llcp_addrlen);
1277 if (lld->llc_state == DL_IDLE) {
1280 dlp->dl_addr_length) = lld->llc_sap;
1285 lld->llc_mac_info->llcp_addrlen;
1289 bcopy(lld->llc_mac_info->llcp_broadcast,
1291 lld->llc_mac_info->llcp_addrlen);
1316 llc1_t *lld = (llc1_t *)q->q_ptr;
1331 if ((macinfo = lld->llc_mac_info) == NULL)
1334 if (lld->llc_state != DL_IDLE) {
1338 lld->llc_state);
1357 switch (lld->llc_type) {
1368 if (lld->llc_sap != LLC_NOVELL_SAP) {
1375 llchdr->llc_ssap = lld->llc_sap;
1385 if (lld->llc_flags & LLC_SNAP) {
1386 bcopy(lld->llc_snap, nmp->b_wptr, 5);
1423 llchdr->llc_ssap = lld->llc_sap;
1429 if (lld->llc_flags & LLC_SNAP) {
1430 bcopy(lld->llc_snap, nmp->b_wptr, 5);
1445 lld->llc_stats->llcs_bytexmt += msgdsize(mp);
1446 lld->llc_stats->llcs_pktxmt++;
1459 lld->llc_stats->llcs_nobuffer++;
1476 llc1_t *lld;
1548 for (lld = llc1_device_list.llc1_str_next;
1549 lld != (llc1_t *)&llc1_device_list.llc1_str_next;
1550 lld = lld->llc_next) {
1556 if (lld->llc_qptr == NULL ||
1557 lld->llc_state != DL_IDLE ||
1558 lld->llc_mac_info != macinfo) {
1565 lld->llc_type, lld->llc_sap,
1569 lld->llc_multicnt > 0 &&
1570 llc1_multicast(addr, lld)) {
1572 } else if (lld->llc_flags & LLC_PROM)
1576 if ((lld->llc_flags & LLC_PROM) ||
1579 (lld->llc_sap == msgsap ||
1583 (lld->llc_flags & (LLC_SNAP|LLC_PROM)) ==
1585 if (!llc1_snap_match(lld,
1589 if (!canputnext(RD(lld->llc_qptr))) {
1595 lld->llc_stats->llcs_blocked++;
1600 lld->llc_sap == LLC_NOVELL_SAP &&
1604 nmp = llc1_form_udata(lld, macinfo, mp);
1614 nmp = llc1_form_udata(lld, macinfo, mp);
1628 if (lld->llc_flags & LLC1_AUTO_XID) {
1630 mp, lld->llc_sap);
1641 nmp = llc1_xid_ind_con(lld,
1659 if (lld->llc_flags & LLC1_AUTO_TEST) {
1661 mp, lld->llc_sap);
1674 nmp = llc1_test_ind_con(lld,
2141 * llc1_form_udata(lld, macinfo, mp) format a DL_UNITDATA_IND message to be
2145 llc1_form_udata(llc1_t *lld, llc_mac_info_t *macinfo, mblk_t *mp)
2169 if (lld->llc_sap != LLC_NOVELL_SAP)
2175 if (lld->llc_flags & LLC_SNAP) {
2190 if (lld->llc_flags & LLC_SNAP) {
2205 if (lld->llc_flags & LLC_SNAP) {
2240 if (lld->llc_sap != LLC_NOVELL_SAP)
2255 lld->llc_qptr, lld->llc_minor);
2258 putnext(RD(lld->llc_qptr), udmp);
2356 * llc1_xid_ind_con(lld, macinfo, mp) form a DL_XID_IND or DL_XID_CON message
2361 llc1_xid_ind_con(llc1_t *lld, llc_mac_info_t *macinfo, mblk_t *mp)
2446 putnext(RD(lld->llc_qptr), nmp);
2606 * llc1_test_ind_con(lld, macinfo, mp) form a DL_TEST_IND or DL_TEST_CON
2611 llc1_test_ind_con(llc1_t *lld, llc_mac_info_t *macinfo, mblk_t *mp)
2695 putnext(RD(lld->llc_qptr), nmp);
2953 llc1_t *lld = (llc1_t *)q->q_ptr;
2966 if (lld == NULL || lld->llc_state != DL_IDLE) {
2968 } else if (lld->llc_sap != LLC_SNAP_SAP ||
2974 lld->llc_state = DL_SUBS_BIND_PND;
2981 if (lld->llc_flags & LLC_SNAP) {
2988 lld->llc_snap[3] = ((uchar_t *)&subssap)[0];
2989 lld->llc_snap[4] = ((uchar_t *)&subssap)[1];
2990 lld->llc_flags |= LLC_SNAP;
2994 if ((lld->llc_flags & (LLC_SNAP|LLC_SNAP_OID)) ==
2999 bcopy(sapstr, lld->llc_snap, 3);
3000 lld->llc_flags |= LLC_SNAP_OID;
3004 if (lld->llc_flags & (LLC_SNAP|LLC_SNAP_OID)) {
3008 bcopy(sapstr, lld->llc_snap, 5);
3009 lld->llc_flags |= LLC_SNAP|LLC_SNAP_OID;
3029 bcopy(lld->llc_snap,
3036 lld->llc_state = DL_IDLE;
3065 llc1_snap_match(llc1_t *lld, struct snaphdr *snap)
3067 return (bcmp(snap->snap_oid, lld->llc_snap, 5) == 0);