Lines Matching refs:mb_copy
1488 struct mbuf *mb_copy;
1496 mb_copy = m_copy(m, 0, M_COPYALL);
1497 if (mb_copy && (M_HASCL(mb_copy) || mb_copy->m_len < hlen))
1498 mb_copy = m_pullup(mb_copy, hlen);
1499 if (mb_copy == NULL)
1503 tbf_send_packet(vifp, mb_copy);
1505 tbf_control(vifp, mb_copy, mtod(mb_copy, struct ip *), ip->ip_len);
1511 struct mbuf *mb_copy;
1520 MGETHDR(mb_copy, M_DONTWAIT, MT_HEADER);
1521 if (mb_copy == NULL)
1524 mac_mbuf_label_associate_multicast_encap(m, vifp->v_ifp, mb_copy);
1526 mb_copy->m_data += max_linkhdr;
1527 mb_copy->m_len = sizeof(multicast_encap_iphdr);
1529 if ((mb_copy->m_next = m_copy(m, 0, M_COPYALL)) == NULL) {
1530 m_freem(mb_copy);
1533 i = MHLEN - M_LEADINGSPACE(mb_copy);
1536 mb_copy = m_pullup(mb_copy, i);
1537 if (mb_copy == NULL)
1539 mb_copy->m_pkthdr.len = len + sizeof(multicast_encap_iphdr);
1544 ip_copy = mtod(mb_copy, struct ip *);
1563 mb_copy->m_data += sizeof(multicast_encap_iphdr);
1564 ip->ip_sum = in_cksum(mb_copy, ip->ip_hl << 2);
1565 mb_copy->m_data -= sizeof(multicast_encap_iphdr);
1568 tbf_send_packet(vifp, mb_copy);
1570 tbf_control(vifp, mb_copy, ip, ip_copy->ip_len);