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

Function bridge_dummynet

freebsd/net/if_bridge.c:2006–2035  ·  view source on GitHub ↗

* bridge_dummynet: * * Receive a queued packet from dummynet and pass it on to the output * interface. * * The mbuf has the Ethernet header already attached. */

Source from the content-addressed store, hash-verified

2004 * The mbuf has the Ethernet header already attached.
2005 */
2006static void
2007bridge_dummynet(struct mbuf *m, struct ifnet *ifp)
2008{
2009 struct bridge_softc *sc;
2010
2011 sc = ifp->if_bridge;
2012
2013 /*
2014 * The packet didnt originate from a member interface. This should only
2015 * ever happen if a member interface is removed while packets are
2016 * queued for it.
2017 */
2018 if (sc == NULL) {
2019 m_freem(m);
2020 return;
2021 }
2022
2023 if (PFIL_HOOKED_OUT(V_inet_pfil_head)
2024#ifdef INET6
2025 || PFIL_HOOKED_OUT(V_inet6_pfil_head)
2026#endif
2027 ) {
2028 if (bridge_pfil(&m, sc->sc_ifp, ifp, PFIL_OUT) != 0)
2029 return;
2030 if (m == NULL)
2031 return;
2032 }
2033
2034 bridge_enqueue(sc, ifp, m);
2035}
2036
2037/*
2038 * bridge_output:

Callers

nothing calls this directly

Calls 3

bridge_pfilFunction · 0.85
bridge_enqueueFunction · 0.85
m_freemFunction · 0.50

Tested by

no test coverage detected