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

Function ng_ppp_shutdown

freebsd/netgraph/ng_ppp.c:734–751  ·  view source on GitHub ↗

* Destroy node */

Source from the content-addressed store, hash-verified

732 * Destroy node
733 */
734static int
735ng_ppp_shutdown(node_p node)
736{
737 const priv_p priv = NG_NODE_PRIVATE(node);
738
739 /* Stop fragment queue timer */
740 ng_ppp_stop_frag_timer(node);
741
742 /* Take down netgraph node */
743 ng_ppp_frag_reset(node);
744 mtx_destroy(&priv->rmtx);
745 mtx_destroy(&priv->xmtx);
746 bzero(priv, sizeof(*priv));
747 free(priv, M_NETGRAPH_PPP);
748 NG_NODE_SET_PRIVATE(node, NULL);
749 NG_NODE_UNREF(node); /* let the node escape */
750 return (0);
751}
752
753/*
754 * Hook disconnection

Callers

nothing calls this directly

Calls 4

ng_ppp_stop_frag_timerFunction · 0.85
ng_ppp_frag_resetFunction · 0.85
bzeroFunction · 0.85
freeFunction · 0.50

Tested by

no test coverage detected