FreeBSD/sys/netgraph/atm/ng_atm.c
/*
 * Shutdown the node. This is called from the shutdown message processing.
 */
Shutdown the node. This is called from the shutdown message processing.
Shutdown the node . This is called from the shutdown message processing .
static int
ng_atm_shutdown(node_p node)
{
	struct priv *priv = NG_NODE_PRIVATE(node);
	if (node->nd_flags & NGF_REALLY_DIE) {
		NG_NODE_SET_PRIVATE(node, NULL);
		free(priv, M_NETGRAPH);
		NG_NODE_UNREF(node);
		return (0);
	}
#ifdef NGATM_DEBUG
	if (!allow_shutdown)
		NG_NODE_REVIVE(node);		
	else {
		IFP2NG_SET(priv->ifp, NULL);
		NG_NODE_SET_PRIVATE(node, NULL);
		free(priv, M_NETGRAPH);
		NG_NODE_UNREF(node);
	}
#else
	NG_NODE_REVIVE(node);
#endif
	return (0);
}
static int ng_atm_shutdown ( node_p node ) { struct priv * priv = NG_NODE_PRIVATE ( node ) ; if ( node -> nd_flags & NGF_REALLY_DIE ) { NG_NODE_SET_PRIVATE ( node , NULL ) ; free ( priv , M_NETGRAPH ) ; NG_NODE_UNREF ( node ) ; return ( 0 ) ; } #ifdef NGATM_DEBUG if ( ! allow_shutdown ) NG_NODE_REVIVE ( node ) ; else { IFP2NG_SET ( priv -> ifp , NULL ) ; NG_NODE_SET_PRIVATE ( node , NULL ) ; free ( priv , M_NETGRAPH ) ; NG_NODE_UNREF ( node ) ; } #else NG_NODE_REVIVE ( node ) ; #endif return ( 0 ) ; }
Shutdown the node.
Shutdown the node .
/*
		 * We are called from unloading the ATM driver. Really,
		 * really need to shutdown this node. The ifp was
		 * already handled in the detach routine.
		 */ /* we persist */ /*
	 * We are persistent - reinitialize.
	 */