Lines Matching refs:nmp

341 	mblk_t *nmp;
381 nmp = mp->b_cont; /* where the packet payload M_DATA is */
382 if (DB_REF(nmp) == 1 && MBLKHEAD(nmp) >= hdrlen) {
387 nmp = mp;
388 DB_TYPE(nmp) = M_DATA;
389 nmp->b_rptr = nmp->b_wptr = DB_LIM(nmp);
392 if ((nmp = allocb(hdrlen, BPRI_MED)) == NULL)
394 nmp->b_rptr = nmp->b_wptr = DB_LIM(nmp);
395 linkb(nmp, mp->b_cont);
401 nmp->b_rptr -= sizeof (typelen);
402 SET_NET_USHORT(*(uint16_t *)nmp->b_rptr, typelen);
404 nmp->b_rptr -= sizeof (uint16_t);
405 SET_NET_USHORT(*(uint16_t *)nmp->b_rptr, vptag);
407 nmp->b_rptr -= sizeof (uint16_t);
408 SET_NET_USHORT(*(uint16_t *)nmp->b_rptr, vptag);
410 nmp->b_rptr -= (ETHERADDRL * 2);
411 mh = (struct ether_header *)nmp->b_rptr;
421 return (nmp);
433 mblk_t *nmp;
440 nmp = mp;
441 ovbcopy(nmp->b_rptr, nmp->b_rptr - VTAG_SIZE, 2 * ETHERADDRL);
442 nmp->b_rptr -= VTAG_SIZE;
443 evhp = (struct ether_vlan_header *)nmp->b_rptr;
446 if ((nmp = allocb(sizeof (struct ether_vlan_header),
450 nmp->b_wptr += sizeof (struct ether_vlan_header);
453 evhp = (struct ether_vlan_header *)nmp->b_rptr;
462 nmp->b_cont = mp->b_cont;
465 nmp->b_cont = mp;
472 return (nmp);
482 mblk_t *nmp;
521 if ((nmp = allocb(hdrlen, BPRI_MED)) == NULL)
524 nmp->b_rptr = nmp->b_wptr = DB_LIM(nmp);
528 nmp->b_rptr -= sizeof (typelen);
529 SET_NET_USHORT(*(uint16_t *)nmp->b_rptr, typelen);
536 nmp->b_rptr -= sizeof (uint16_t);
537 SET_NET_USHORT(*(uint16_t *)nmp->b_rptr, vptag);
539 nmp->b_rptr -= sizeof (uint16_t);
540 SET_NET_USHORT(*(uint16_t *)nmp->b_rptr, vptag);
542 nmp->b_rptr -= (ETHERADDRL * 2);
543 mh = (struct ether_header *)nmp->b_rptr;
551 return (nmp);
893 mblk_t *nmp;
911 nmp = mp->b_cont; /* where the packet payload M_DATA is */
912 if (DB_REF(nmp) == 1 && MBLKHEAD(nmp) >= hdrlen) {
917 nmp = mp;
918 DB_TYPE(nmp) = M_DATA;
919 nmp->b_rptr = nmp->b_wptr = DB_LIM(nmp);
922 if ((nmp = allocb(hdrlen, BPRI_MED)) == NULL)
924 nmp->b_rptr = nmp->b_wptr = DB_LIM(nmp);
925 linkb(nmp, mp->b_cont);
931 nmp->b_rptr -= sizeof (ipoib_ptxhdr_t);
932 gldp = (ipoib_ptxhdr_t *)nmp->b_rptr;
937 return (nmp);
947 mblk_t *nmp;
962 if ((nmp = allocb(hdrlen, BPRI_MED)) == NULL)
965 nmp->b_rptr = nmp->b_wptr = DB_LIM(nmp);
969 nmp->b_rptr -= sizeof (ipoib_ptxhdr_t);
970 tgldp = (ipoib_ptxhdr_t *)nmp->b_rptr;
975 return (nmp);
1146 mblk_t *nmp;
1173 nmp = mp->b_cont; /* where the packet payload M_DATA is */
1174 if (DB_REF(nmp) == 1 && MBLKHEAD(nmp) >= hdrlen) {
1179 nmp = mp;
1180 DB_TYPE(nmp) = M_DATA;
1181 nmp->b_rptr = nmp->b_wptr = DB_LIM(nmp);
1184 if ((nmp = allocb(hdrlen, BPRI_MED)) == NULL)
1186 nmp->b_rptr = nmp->b_wptr = DB_LIM(nmp);
1187 linkb(nmp, mp->b_cont);
1196 nmp->b_rptr -= sizeof (struct llc_snap_hdr);
1197 snap = (struct llc_snap_hdr *)(nmp->b_rptr);
1202 nmp->b_rptr -= sizeof (struct fddi_mac_frm);
1204 mh = (struct fddi_mac_frm *)nmp->b_rptr;
1215 return (nmp);
1225 mblk_t *nmp;
1247 if ((nmp = allocb(hdrlen, BPRI_MED)) == NULL)
1250 nmp->b_rptr = nmp->b_wptr = DB_LIM(nmp);
1257 nmp->b_rptr -= sizeof (struct llc_snap_hdr);
1258 snap = (struct llc_snap_hdr *)(nmp->b_rptr);
1263 nmp->b_rptr -= sizeof (struct fddi_mac_frm);
1265 mh = (struct fddi_mac_frm *)nmp->b_rptr;
1275 return (nmp);
1552 mblk_t *nmp, *llcmp, *pmp = NULL;
1580 llcmp = nmp = mp->b_cont; /* where the packet payload M_DATA is */
1588 ASSERT(nmp != NULL); /* gld_unitdata guarantees msgdsize > 0 */
1591 llcmp = pmp = msgpullup(nmp, LLC_HDR1_LEN);
1604 if (DB_REF(nmp) == 1 && MBLKHEAD(nmp) >= hdrlen) {
1609 nmp = mp;
1610 DB_TYPE(nmp) = M_DATA;
1611 nmp->b_rptr = nmp->b_wptr = DB_LIM(nmp);
1614 if ((nmp = allocb(hdrlen, BPRI_MED)) == NULL) {
1619 nmp->b_rptr = nmp->b_wptr = DB_LIM(nmp);
1620 linkb(nmp, mp->b_cont);
1628 llcmp = nmp; /* LLC header is going to be in this mblk */
1629 nmp->b_rptr -= sizeof (struct llc_snap_hdr);
1630 snap = (struct llc_snap_hdr *)(nmp->b_rptr);
1643 nmp->b_rptr -= rh->len;
1644 bcopy((caddr_t)rh, (caddr_t)nmp->b_rptr, rh->len);
1656 nmp->b_rptr -= sizeof (struct tr_mac_frm_nori);
1657 mh = (struct tr_mac_frm_nori *)nmp->b_rptr;
1674 return (nmp);
1692 mblk_t *nmp;
1724 if ((nmp = allocb(hdrlen, BPRI_MED)) == NULL)
1727 nmp->b_rptr = nmp->b_wptr = DB_LIM(nmp);
1734 nmp->b_rptr -= sizeof (struct llc_snap_hdr);
1735 snap = (struct llc_snap_hdr *)(nmp->b_rptr);
1742 nmp->b_rptr -= ri_ste_def.len;
1743 bcopy((caddr_t)&ri_ste_def, (caddr_t)nmp->b_rptr,
1750 nmp->b_rptr -= sizeof (struct tr_mac_frm_nori);
1751 mh = (struct tr_mac_frm_nori *)nmp->b_rptr;
1766 return (nmp);
1901 mblk_t *nmp;
1917 if ((nmp = allocb(nlen, BPRI_MED)) == NULL)
1920 nmp->b_rptr = nmp->b_wptr = DB_LIM(nmp);
1922 nmp->b_rptr -= sizeof (struct rde_pdu);
1923 npdu = (struct rde_pdu *)(nmp->b_rptr);
1930 nmp->b_rptr -= LLC_HDR1_LEN;
1931 nsnaphdr = (struct llc_snap_hdr *)(nmp->b_rptr);
1938 nmp->b_rptr -= 2;
1939 nrh = (struct gld_ri *)(nmp->b_rptr);
1951 nmp->b_rptr -= rh->len;
1952 nrh = (struct gld_ri *)(nmp->b_rptr);
1958 nmp->b_rptr -= sizeof (struct tr_mac_frm_nori);
1959 nmh = (struct tr_mac_frm_nori *)(nmp->b_rptr);
1981 freeb(nmp);
1994 (void) putbq(WR(q), nmp);
2069 mblk_t *nmp;
2084 if ((nmp = allocb(nlen, BPRI_MED)) == NULL)
2087 nmp->b_rptr = nmp->b_wptr = DB_LIM(nmp);
2089 nmp->b_rptr -= sizeof (struct rde_pdu);
2090 npdu = (struct rde_pdu *)(nmp->b_rptr);
2104 nmp->b_rptr -= LLC_HDR1_LEN;
2105 nsnaphdr = (struct llc_snap_hdr *)(nmp->b_rptr);
2113 nmp->b_rptr -= rh->len;
2114 nrh = (struct gld_ri *)(nmp->b_rptr);
2124 nmp->b_rptr -= 2;
2125 nrh = (struct gld_ri *)(nmp->b_rptr);
2134 nmp->b_rptr -= sizeof (struct tr_mac_frm_nori);
2135 nmh = (struct tr_mac_frm_nori *)(nmp->b_rptr);
2164 (void) putbq(WR(q), nmp);