MCPcopy Create free account
hub / github.com/F-Stack/f-stack / phyint_send

Function phyint_send

freebsd/netinet/ip_mroute.c:1654–1674  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1652}
1653
1654static void
1655phyint_send(struct ip *ip, struct vif *vifp, struct mbuf *m)
1656{
1657 struct mbuf *mb_copy;
1658 int hlen = ip->ip_hl << 2;
1659
1660 VIF_LOCK_ASSERT();
1661
1662 /*
1663 * Make a new reference to the packet; make sure that
1664 * the IP header is actually copied, not just referenced,
1665 * so that ip_output() only scribbles on the copy.
1666 */
1667 mb_copy = m_copypacket(m, M_NOWAIT);
1668 if (mb_copy && (!M_WRITABLE(mb_copy) || mb_copy->m_len < hlen))
1669 mb_copy = m_pullup(mb_copy, hlen);
1670 if (mb_copy == NULL)
1671 return;
1672
1673 send_packet(vifp, mb_copy);
1674}
1675
1676static void
1677send_packet(struct vif *vifp, struct mbuf *m)

Callers 1

ip_mdqFunction · 0.70

Calls 3

m_copypacketFunction · 0.85
m_pullupFunction · 0.85
send_packetFunction · 0.85

Tested by

no test coverage detected