/* $NetBSD: mlfk_rule.c,v 1.1.1.1 2004/03/28 08:55:47 martti Exp $ */ /* * Copyright (C) 2000 by Darren Reed. * * See the IPFILTER.LICENCE file for details on licencing. * * Id: mlfk_rule.c,v 2.4 2001/06/09 17:09:22 darrenr Exp */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "ip_rules.h" static int ipfrule_modevent(module_t mod, int type, void *unused) { int error = 0; switch (type) { case MOD_LOAD : error = ipfrule_add(); if (!error) fr_refcnt++; break; case MOD_UNLOAD : error = ipfrule_remove(); if (!error) fr_refcnt--; break; default: error = EINVAL; break; } return error; } static moduledata_t ipfrulemod = { IPL_VERSION, ipfrule_modevent, 0 }; DECLARE_MODULE(ipfrule, ipfrulemod, SI_SUB_PROTO_DOMAIN, SI_ORDER_ANY);