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

Function ng_iface_disconnect

freebsd/netgraph/ng_iface.c:769–781  ·  view source on GitHub ↗

* Hook disconnection. Note that we do *not* shutdown when all * hooks have been disconnected. */

Source from the content-addressed store, hash-verified

767 * hooks have been disconnected.
768 */
769static int
770ng_iface_disconnect(hook_p hook)
771{
772 const priv_p priv = NG_NODE_PRIVATE(NG_HOOK_NODE(hook));
773 const iffam_p iffam = get_iffam_from_hook(priv, hook);
774
775 if (iffam == NULL)
776 panic("%s", __func__);
777 PRIV_WLOCK(priv);
778 *get_hook_from_iffam(priv, iffam) = NULL;
779 PRIV_WUNLOCK(priv);
780 return (0);
781}
782
783/*
784 * Handle loading and unloading for this node type.

Callers

nothing calls this directly

Calls 3

get_iffam_from_hookFunction · 0.70
get_hook_from_iffamFunction · 0.70
panicFunction · 0.50

Tested by

no test coverage detected