diff options
author | dm <dm@cvs.openbsd.org> | 1996-01-07 02:34:41 +0000 |
---|---|---|
committer | dm <dm@cvs.openbsd.org> | 1996-01-07 02:34:41 +0000 |
commit | 01b9b71d86a5edcc543a88b2d407927fa52c042d (patch) | |
tree | 878168b4effcec4e50c243cfd1095656af14f4db /sys/arch/i386 | |
parent | 2defc765aa92d65e239f5b4d36582850fd58b7da (diff) |
from beurton@fnet.fr: Darren Reed's IP filter
Diffstat (limited to 'sys/arch/i386')
-rw-r--r-- | sys/arch/i386/i386/conf.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sys/arch/i386/i386/conf.c b/sys/arch/i386/i386/conf.c index 1f97e5960b6..15aa1270a25 100644 --- a/sys/arch/i386/i386/conf.c +++ b/sys/arch/i386/i386/conf.c @@ -171,6 +171,19 @@ cdev_decl(audio); cdev_decl(svr4_net); cdev_decl(ccd); +/* open, close, read, ioctl */ +cdev_decl(ipl); +#define cdev_gen_ipf(c,n) { \ + dev_init(c,n,open), dev_init(c,n,close), dev_init(c,n,read), \ + (dev_type_write((*))) enodev, dev_init(c,n,ioctl), \ + (dev_type_stop((*))) nullop, 0, (dev_type_select((*))) enodev, \ + (dev_type_mmap((*))) enodev, 0 } +#ifdef IPFILTER +#define NIPF 1 +#else +#define NIPF 0 +#endif + struct cdevsw cdevsw[] = { cdev_cn_init(1,cn), /* 0: virtual console */ @@ -223,6 +236,7 @@ struct cdevsw cdevsw[] = #else cdev_notdef(), /* 43 */ #endif + cdev_gen_ipf(NIPF,ipl), /* 44 */ }; int nchrdev = sizeof(cdevsw) / sizeof(cdevsw[0]); |