sys/netpfil/ipfw/ip_fw2.c
/*
 * Module event handler.
 * In general we have the choice of handling most of these events by the
 * event handler or by the (VNET_)SYS(UN)INIT handlers. I have chosen to
 * use the SYSINIT handlers as they are more capable of expressing the
 * flow of control during module and vnet operations, so this is just
 * a skeleton. Note there is no SYSINIT equivalent of the module
 * SHUTDOWN handler, but we don't have anything to do in that case anyhow.
 */
Module event handler.
In general we have the choice of handling most of these events by the
event handler or by the (VNET_)SYS(UN)INIT handlers. I have chosen to
use the SYSINIT handlers as they are more capable of expressing the
flow of control during module and vnet operations, so this is just
a skeleton. Note there is no SYSINIT equivalent of the module
SHUTDOWN handler, but we don't have anything to do in that case anyhow.
Module event handler . In general we have the choice of handling most of these events by the event handler or by the ( VNET_ ) SYS ( UN ) INIT handlers . I have chosen to use the SYSINIT handlers as they are more capable of expressing the flow of control during module and vnet operations so this is just a skeleton . Note there is no SYSINIT equivalent of the module SHUTDOWN handler but we don ' t have anything to do in that case anyhow .
static int
ipfw_modevent(module_t mod, int type, void *unused)
{
	int err = 0;
	switch (type) {
	case MOD_LOAD:
		break;
	case MOD_QUIESCE:
		break;
	case MOD_UNLOAD:
		break;
	case MOD_SHUTDOWN:
		break;
	default:
		err = EOPNOTSUPP;
		break;
	}
	return err;
}
static int ipfw_modevent ( module_t mod , int type , void * unused ) { int err = 0 ; switch ( type ) { case MOD_LOAD : break ; case MOD_QUIESCE : break ; case MOD_UNLOAD : break ; case MOD_SHUTDOWN : break ; default : err = EOPNOTSUPP ; break ; } return err ; }
Module event handler.
Module event handler .
/* Called once at module load or
	 	 * system boot if compiled in. */ /* Called before unload. May veto unloading. */ /* Called during unload. */ /* Called during system shutdown. */