|
|
| version 1.6, 2004/05/13 23:49:14 | version 1.7, 2004/05/19 22:52:39 |
|---|---|
| Line 24 | Line 24 |
| * SUCH DAMAGE. | * SUCH DAMAGE. |
| * | * |
| * $FreeBSD: src/sys/contrib/ipfilter/netinet/mlfk_ipl.c,v 1.9.2.2 2002/04/27 17:37:12 darrenr Exp $ | * $FreeBSD: src/sys/contrib/ipfilter/netinet/mlfk_ipl.c,v 1.9.2.2 2002/04/27 17:37:12 darrenr Exp $ |
| * $DragonFly: src/sys/contrib/ipfilter/netinet/mlfk_ipl.c,v 1.5 2004/02/12 22:35:47 joerg Exp $ | * $DragonFly: src/sys/contrib/ipfilter/netinet/mlfk_ipl.c,v 1.6 2004/05/13 23:49:14 dillon Exp $ |
| */ | */ |
| Line 56 | Line 56 |
| #include "ip_frag.h" | #include "ip_frag.h" |
| #include "ip_proxy.h" | #include "ip_proxy.h" |
| static dev_t ipf_devs[IPL_LOGMAX + 1]; | |
| SYSCTL_DECL(_net_inet); | SYSCTL_DECL(_net_inet); |
| SYSCTL_NODE(_net_inet, OID_AUTO, ipf, CTLFLAG_RW, 0, "IPF"); | SYSCTL_NODE(_net_inet, OID_AUTO, ipf, CTLFLAG_RW, 0, "IPF"); |
| SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_flags, CTLFLAG_RW, &fr_flags, 0, ""); | SYSCTL_INT(_net_inet_ipf, OID_AUTO, fr_flags, CTLFLAG_RW, &fr_flags, 0, ""); |
| Line 136 ipfilter_modevent(module_t mod, int type | Line 134 ipfilter_modevent(module_t mod, int type |
| error = iplattach(); | error = iplattach(); |
| if (error) | if (error) |
| break; | break; |
| cdevsw_add(&ipl_cdevsw, 0, 0); | |
| c = NULL; | c = NULL; |
| for(i=strlen(IPL_NAME); i>0; i--) | for(i=strlen(IPL_NAME); i>0; i--) |
| Line 145 ipfilter_modevent(module_t mod, int type | Line 144 ipfilter_modevent(module_t mod, int type |
| } | } |
| if (!c) | if (!c) |
| c = IPL_NAME; | c = IPL_NAME; |
| ipf_devs[IPL_LOGIPF] = | make_dev(&ipl_cdevsw, IPL_LOGIPF, 0, 0, 0600, c); |
| make_dev(&ipl_cdevsw, IPL_LOGIPF, 0, 0, 0600, c); | |
| c = NULL; | c = NULL; |
| for(i=strlen(IPL_NAT); i>0; i--) | for(i=strlen(IPL_NAT); i>0; i--) |
| Line 156 ipfilter_modevent(module_t mod, int type | Line 154 ipfilter_modevent(module_t mod, int type |
| } | } |
| if (!c) | if (!c) |
| c = IPL_NAT; | c = IPL_NAT; |
| ipf_devs[IPL_LOGNAT] = | make_dev(&ipl_cdevsw, IPL_LOGNAT, 0, 0, 0600, c); |
| make_dev(&ipl_cdevsw, IPL_LOGNAT, 0, 0, 0600, c); | |
| c = NULL; | c = NULL; |
| for(i=strlen(IPL_STATE); i>0; i--) | for(i=strlen(IPL_STATE); i>0; i--) |
| Line 167 ipfilter_modevent(module_t mod, int type | Line 164 ipfilter_modevent(module_t mod, int type |
| } | } |
| if (!c) | if (!c) |
| c = IPL_STATE; | c = IPL_STATE; |
| ipf_devs[IPL_LOGSTATE] = | make_dev(&ipl_cdevsw, IPL_LOGSTATE, 0, 0, 0600, c); |
| make_dev(&ipl_cdevsw, IPL_LOGSTATE, 0, 0, 0600, c); | |
| c = NULL; | c = NULL; |
| for(i=strlen(IPL_AUTH); i>0; i--) | for(i=strlen(IPL_AUTH); i>0; i--) |
| Line 178 ipfilter_modevent(module_t mod, int type | Line 174 ipfilter_modevent(module_t mod, int type |
| } | } |
| if (!c) | if (!c) |
| c = IPL_AUTH; | c = IPL_AUTH; |
| ipf_devs[IPL_LOGAUTH] = | make_dev(&ipl_cdevsw, IPL_LOGAUTH, 0, 0, 0600, c); |
| make_dev(&ipl_cdevsw, IPL_LOGAUTH, 0, 0, 0600, c); | |
| break; | break; |
| case MOD_UNLOAD : | case MOD_UNLOAD : |
| destroy_dev(ipf_devs[IPL_LOGIPF]); | cdevsw_remove(&ipl_cdevsw, 0, 0); |
| destroy_dev(ipf_devs[IPL_LOGNAT]); | |
| destroy_dev(ipf_devs[IPL_LOGSTATE]); | |
| destroy_dev(ipf_devs[IPL_LOGAUTH]); | |
| error = ipldetach(); | error = ipldetach(); |
| break; | break; |
| default: | default: |