From 01b9b71d86a5edcc543a88b2d407927fa52c042d Mon Sep 17 00:00:00 2001 From: dm Date: Sun, 7 Jan 1996 02:34:41 +0000 Subject: from beurton@fnet.fr: Darren Reed's IP filter --- sys/arch/i386/i386/conf.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'sys/arch/i386') 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]); -- cgit v1.2.3