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

Function ng_iface_start

freebsd/netgraph/ng_iface.c:396–412  ·  view source on GitHub ↗

* Start method is used only when ALTQ is enabled. */

Source from the content-addressed store, hash-verified

394 * Start method is used only when ALTQ is enabled.
395 */
396static void
397ng_iface_start(struct ifnet *ifp)
398{
399 struct mbuf *m;
400 sa_family_t sa;
401
402 KASSERT(ALTQ_IS_ENABLED(&ifp->if_snd), ("%s without ALTQ", __func__));
403
404 for(;;) {
405 IFQ_DRV_DEQUEUE(&ifp->if_snd, m);
406 if (m == NULL)
407 break;
408 sa = *mtod(m, sa_family_t *);
409 m_adj(m, sizeof(sa_family_t));
410 ng_iface_send(ifp, m, sa);
411 }
412}
413
414/*
415 * Flash a packet by the BPF (requires prepending 4 byte AF header)

Callers

nothing calls this directly

Calls 2

m_adjFunction · 0.85
ng_iface_sendFunction · 0.85

Tested by

no test coverage detected