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

Function ng_eiface_start

freebsd/netgraph/ng_eiface.c:289–302  ·  view source on GitHub ↗

* This routine is called to deliver a packet out the interface. * We simply queue the netgraph version to be called when netgraph locking * allows it to happen. * Until we know what the rest of the networking code is doing for * locking, we don't know how we will interact with it. * Take comfort from the fact that the ifnet struct is part of our * private info and can't go away while we are

Source from the content-addressed store, hash-verified

287 * somehow, but we can't and if we did would we solve anything?
288 */
289static void
290ng_eiface_start(struct ifnet *ifp)
291{
292 const priv_p priv = (priv_p)ifp->if_softc;
293
294 /* Don't do anything if output is active */
295 if (ifp->if_drv_flags & IFF_DRV_OACTIVE)
296 return;
297
298 ifp->if_drv_flags |= IFF_DRV_OACTIVE;
299
300 if (ng_send_fn(priv->node, NULL, &ng_eiface_start2, ifp, 0) != 0)
301 ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
302}
303
304#ifdef DEBUG
305/*

Callers

nothing calls this directly

Calls 1

ng_send_fnFunction · 0.70

Tested by

no test coverage detected