Lines Matching refs:mb_copy
1483 struct mbuf *mb_copy;
1491 mb_copy = m_copy(m, 0, M_COPYALL);
1492 if (mb_copy && (M_HASCL(mb_copy) || mb_copy->m_len < hlen))
1493 mb_copy = m_pullup(mb_copy, hlen);
1494 if (mb_copy == NULL)
1498 tbf_send_packet(vifp, mb_copy);
1500 tbf_control(vifp, mb_copy, mtod(mb_copy, struct ip *), ip->ip_len);
1506 struct mbuf *mb_copy;
1515 MGETHDR(mb_copy, M_DONTWAIT, MT_HEADER);
1516 if (mb_copy == NULL)
1519 mac_mbuf_label_associate_multicast_encap(m, vifp->v_ifp, mb_copy);
1521 mb_copy->m_data += max_linkhdr;
1522 mb_copy->m_len = sizeof(multicast_encap_iphdr);
1524 if ((mb_copy->m_next = m_copy(m, 0, M_COPYALL)) == NULL) {
1525 m_freem(mb_copy);
1528 i = MHLEN - M_LEADINGSPACE(mb_copy);
1531 mb_copy = m_pullup(mb_copy, i);
1532 if (mb_copy == NULL)
1534 mb_copy->m_pkthdr.len = len + sizeof(multicast_encap_iphdr);
1539 ip_copy = mtod(mb_copy, struct ip *);
1562 mb_copy->m_data += sizeof(multicast_encap_iphdr);
1563 ip->ip_sum = in_cksum(mb_copy, ip->ip_hl << 2);
1564 mb_copy->m_data -= sizeof(multicast_encap_iphdr);
1567 tbf_send_packet(vifp, mb_copy);
1569 tbf_control(vifp, mb_copy, ip, ip_copy->ip_len);