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

Function send_packet

freebsd/netinet/ip_mroute.c:1676–1699  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1674}
1675
1676static void
1677send_packet(struct vif *vifp, struct mbuf *m)
1678{
1679 struct ip_moptions imo;
1680 int error __unused;
1681
1682 VIF_LOCK_ASSERT();
1683
1684 imo.imo_multicast_ifp = vifp->v_ifp;
1685 imo.imo_multicast_ttl = mtod(m, struct ip *)->ip_ttl - 1;
1686 imo.imo_multicast_loop = 1;
1687 imo.imo_multicast_vif = -1;
1688 STAILQ_INIT(&imo.imo_head);
1689
1690 /*
1691 * Re-entrancy should not be a problem here, because
1692 * the packets that we send out and are looped back at us
1693 * should get rejected because they appear to come from
1694 * the loopback interface, thus preventing looping.
1695 */
1696 error = ip_output(m, NULL, NULL, IP_FORWARDING, &imo, NULL);
1697 CTR3(KTR_IPMF, "%s: vif %td err %d", __func__,
1698 (ptrdiff_t)(vifp - V_viftable), error);
1699}
1700
1701/*
1702 * Stubs for old RSVP socket shim implementation.

Callers 2

phyint_sendFunction · 0.85
pim_register_send_rpFunction · 0.85

Calls 1

ip_outputFunction · 0.85

Tested by

no test coverage detected