diff options
author | dm <dm@cvs.openbsd.org> | 1996-01-07 07:41:30 +0000 |
---|---|---|
committer | dm <dm@cvs.openbsd.org> | 1996-01-07 07:41:30 +0000 |
commit | 4e3a942ae0d30612f7b4cc1e7ba1cb6eabcf02f1 (patch) | |
tree | 2e302d9141ec95e4911969a64a5426e87f0b92fc /sys | |
parent | fc0ed9c5a8064743686bd8b50c6a34ef4837f150 (diff) |
created devices for the IP filter log on all architectures
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/amiga/amiga/conf.c | 14 | ||||
-rw-r--r-- | sys/arch/atari/atari/conf.c | 14 | ||||
-rw-r--r-- | sys/arch/hp300/hp300/conf.c | 14 | ||||
-rw-r--r-- | sys/arch/mac68k/mac68k/conf.c | 14 | ||||
-rw-r--r-- | sys/arch/mvme68k/mvme68k/conf.c | 16 | ||||
-rw-r--r-- | sys/arch/pc532/pc532/conf.c | 14 | ||||
-rw-r--r-- | sys/arch/pica/pica/conf.c | 17 | ||||
-rw-r--r-- | sys/arch/pmax/pmax/conf.c | 14 | ||||
-rw-r--r-- | sys/arch/sparc/sparc/conf.c | 15 | ||||
-rw-r--r-- | sys/arch/sun3/sun3/conf.c | 14 | ||||
-rw-r--r-- | sys/arch/vax/vax/conf.c | 15 |
11 files changed, 156 insertions, 5 deletions
diff --git a/sys/arch/amiga/amiga/conf.c b/sys/arch/amiga/amiga/conf.c index a23e9a2b581..c123bd6e176 100644 --- a/sys/arch/amiga/amiga/conf.c +++ b/sys/arch/amiga/amiga/conf.c @@ -166,6 +166,19 @@ cdev_decl(tun); #endif cdev_decl(lkm); +/* 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 */ @@ -202,6 +215,7 @@ struct cdevsw cdevsw[] = cdev_lkm_dummy(), /* 29 */ cdev_lkm_dummy(), /* 30 */ cdev_tty_init(NMSC,msc), /* 31: A2232 MSC Multiport serial */ + cdev_gen_ipf(NIPF,ipl), /* 32: IP filter log */ }; int nchrdev = sizeof(cdevsw) / sizeof(cdevsw[0]); diff --git a/sys/arch/atari/atari/conf.c b/sys/arch/atari/atari/conf.c index 6147c2b0798..aec8d98976f 100644 --- a/sys/arch/atari/atari/conf.c +++ b/sys/arch/atari/atari/conf.c @@ -159,6 +159,19 @@ cdev_decl(tun); #endif cdev_decl(lkm); +/* 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 */ @@ -192,6 +205,7 @@ struct cdevsw cdevsw[] = cdev_lkm_dummy(), /* 26 */ cdev_disk_init(NCCD,ccd), /* 27: concatenated disk driver */ cdev_bpftun_init(NTUN,tun), /* 28: network tunnel */ + cdev_gen_ipf(NIPF,ipl), /* 29: IP filter log */ }; int nchrdev = sizeof(cdevsw) / sizeof(cdevsw[0]); diff --git a/sys/arch/hp300/hp300/conf.c b/sys/arch/hp300/hp300/conf.c index f4077d59ccd..8f169836ab1 100644 --- a/sys/arch/hp300/hp300/conf.c +++ b/sys/arch/hp300/hp300/conf.c @@ -151,6 +151,19 @@ cdev_decl(tun); #endif cdev_decl(lkm); +/* 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 */ @@ -184,6 +197,7 @@ struct cdevsw cdevsw[] = cdev_lkm_dummy(), /* 28 */ cdev_lkm_dummy(), /* 29 */ cdev_lkm_dummy(), /* 30 */ + cdev_gen_ipf(NIPF,ipl), /* 31: IP filter log */ }; int nchrdev = sizeof(cdevsw) / sizeof(cdevsw[0]); diff --git a/sys/arch/mac68k/mac68k/conf.c b/sys/arch/mac68k/mac68k/conf.c index 84ac08fa8b8..7b355e7a46f 100644 --- a/sys/arch/mac68k/mac68k/conf.c +++ b/sys/arch/mac68k/mac68k/conf.c @@ -178,6 +178,19 @@ cdev_decl(tun); cdev_decl(lkm); +/* 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 */ @@ -213,6 +226,7 @@ struct cdevsw cdevsw[] = cdev_lkm_dummy(), /* 29 */ cdev_lkm_dummy(), /* 30 */ cdev_lkm_dummy(), /* 31 */ + cdev_gen_ipf(NIPF,ipl), /* 32: IP filter log */ }; int nchrdev = sizeof(cdevsw) / sizeof(cdevsw[0]); diff --git a/sys/arch/mvme68k/mvme68k/conf.c b/sys/arch/mvme68k/mvme68k/conf.c index d29add6b706..f13dcbfd465 100644 --- a/sys/arch/mvme68k/mvme68k/conf.c +++ b/sys/arch/mvme68k/mvme68k/conf.c @@ -1,4 +1,4 @@ -/* $Id: conf.c,v 1.2 1995/11/07 08:50:16 deraadt Exp $ */ +/* $Id: conf.c,v 1.3 1996/01/07 07:41:05 dm Exp $ */ /*- * Copyright (c) 1995 Theo de Raadt @@ -195,6 +195,19 @@ cdev_decl(tun); cdev_decl(lkm); +/* 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 */ @@ -236,6 +249,7 @@ struct cdevsw cdevsw[] = cdev_lkm_dummy(), /* 36 */ cdev_lkm_dummy(), /* 37 */ cdev_lkm_dummy(), /* 38 */ + cdev_gen_ipf(NIPF,ipl), /* 39: IP filter */ }; int nchrdev = sizeof(cdevsw) / sizeof(cdevsw[0]); diff --git a/sys/arch/pc532/pc532/conf.c b/sys/arch/pc532/pc532/conf.c index 6898e20f64b..92e8396a845 100644 --- a/sys/arch/pc532/pc532/conf.c +++ b/sys/arch/pc532/pc532/conf.c @@ -108,6 +108,19 @@ cdev_decl(tun); #include "lpt.h" cdev_decl(lpt); +/* 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 */ @@ -129,6 +142,7 @@ struct cdevsw cdevsw[] = cdev_notdef(), /* 16 */ cdev_lpt_init(NLPT, lpt), /* 17: Centronics */ cdev_disk_init(NCCD,ccd), /* 18: concatenated disk driver */ + cdev_gen_ipf(NIPF,ipl), /* 19: IP filter log */ }; int nchrdev = sizeof(cdevsw) / sizeof(cdevsw[0]); diff --git a/sys/arch/pica/pica/conf.c b/sys/arch/pica/pica/conf.c index 572b9e19465..34231534836 100644 --- a/sys/arch/pica/pica/conf.c +++ b/sys/arch/pica/pica/conf.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * from: @(#)conf.c 8.2 (Berkeley) 11/14/93 - * $Id: conf.c,v 1.1 1995/10/18 10:39:17 deraadt Exp $ + * $Id: conf.c,v 1.2 1996/01/07 07:41:08 dm Exp $ */ #include <sys/param.h> @@ -142,6 +142,19 @@ cdev_decl(sd); cdev_decl(pc); cdev_decl(pms); +/* 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 */ @@ -177,7 +190,7 @@ struct cdevsw cdevsw[] = cdev_notdef(), /* 28: */ cdev_notdef(), /* 29: */ cdev_notdef(), /* 30: */ - cdev_notdef(), /* 31: */ + cdev_gen_ipf(NIPF,ipl), /* 31: IP filter log */ }; int nchrdev = sizeof (cdevsw) / sizeof (cdevsw[0]); diff --git a/sys/arch/pmax/pmax/conf.c b/sys/arch/pmax/pmax/conf.c index d163fb29002..09dee286401 100644 --- a/sys/arch/pmax/pmax/conf.c +++ b/sys/arch/pmax/pmax/conf.c @@ -157,6 +157,19 @@ cdev_decl(mfb); dev_init(c,n,mmap) } +/* 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 */ @@ -249,6 +262,7 @@ struct cdevsw cdevsw[] = cdev_tty_init(NRASTERCONSOLE,rcons), /* 85: rcons pseudo-dev */ cdev_fbm_init(NFB,fb), /* 86: frame buffer pseudo-device */ cdev_disk_init(NCCD,ccd), /* 87: concatenated disk driver */ + cdev_gen_ipf(NIPF,ipl), /* 88: IP filter log */ }; int nchrdev = sizeof(cdevsw) / sizeof(cdevsw[0]); diff --git a/sys/arch/sparc/sparc/conf.c b/sys/arch/sparc/sparc/conf.c index c7e950e0fcf..5d3b081152a 100644 --- a/sys/arch/sparc/sparc/conf.c +++ b/sys/arch/sparc/sparc/conf.c @@ -182,6 +182,19 @@ cdev_decl(svr4_net); #endif cdev_decl(lkm); +/* 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 */ @@ -249,7 +262,7 @@ struct cdevsw cdevsw[] = cdev_notdef(), /* 56 */ cdev_notdef(), /* 57 */ cdev_disk_init(NCD,cd), /* 58 SCSI CD-ROM */ - cdev_notdef(), /* 59 */ + cdev_gen_ipf(NIPF,ipl), /* 59 */ cdev_notdef(), /* 60 */ cdev_notdef(), /* 61 */ cdev_notdef(), /* 62 */ diff --git a/sys/arch/sun3/sun3/conf.c b/sys/arch/sun3/sun3/conf.c index aa6142019f5..2a1c1d87444 100644 --- a/sys/arch/sun3/sun3/conf.c +++ b/sys/arch/sun3/sun3/conf.c @@ -165,6 +165,19 @@ cdev_decl(bpf); cdev_decl(tun); +/* 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 */ @@ -239,6 +252,7 @@ struct cdevsw cdevsw[] = cdev_notdef(), /* 69: /dev/audio */ cdev_notdef(), /* 70: open prom */ cdev_notdef(), /* 71: (sg?) */ + cdev_gen_ipf(NIPF,ipl), /* 72: IP filter log */ }; int nchrdev = sizeof(cdevsw) / sizeof(cdevsw[0]); diff --git a/sys/arch/vax/vax/conf.c b/sys/arch/vax/vax/conf.c index 483a5848457..2dbf9e5a0d3 100644 --- a/sys/arch/vax/vax/conf.c +++ b/sys/arch/vax/vax/conf.c @@ -308,6 +308,19 @@ cdev_decl(qd); #endif cdev_decl(ii); +/* 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 */ @@ -360,7 +373,7 @@ struct cdevsw cdevsw[] = cdev_notdef(), /* 47 */ cdev_notdef(), /* 48 */ cdev_notdef(), /* 49 */ - cdev_notdef(), /* 50 */ + cdev_gen_ipf(NIPF,ipl), /* 50: IP filter log */ cdev_cnstore_init(NCRX,crx), /* 51: Console RX50 at 8200 */ cdev_disk_init(NKDB,kdb), /* 52: KDB50/RA?? */ cdev_fd_init(1,fd), /* 53: file descriptor pseudo-device */ |