From d545b3a7d5fefb158feeeb3d27fb4159ae91b4f4 Mon Sep 17 00:00:00 2001 From: claudio Date: Fri, 23 Oct 2015 15:10:52 +0000 Subject: [PATCH] Allocate a new major for tap(4) also note that pseudo-device tun is for tap as well. OK dlg@ mpi@ --- sys/arch/alpha/alpha/conf.c | 3 ++- sys/arch/amd64/amd64/conf.c | 3 ++- sys/arch/arm/arm/conf.c | 3 ++- sys/arch/aviion/aviion/conf.c | 3 ++- sys/arch/hppa/hppa/conf.c | 3 ++- sys/arch/hppa64/hppa64/conf.c | 3 ++- sys/arch/i386/i386/conf.c | 3 ++- sys/arch/landisk/landisk/conf.c | 3 ++- sys/arch/loongson/loongson/conf.c | 3 ++- sys/arch/luna88k/luna88k/conf.c | 3 ++- sys/arch/macppc/macppc/conf.c | 4 ++-- sys/arch/octeon/octeon/conf.c | 4 +++- sys/arch/sgi/sgi/conf.c | 3 ++- sys/arch/socppc/socppc/conf.c | 3 ++- sys/arch/sparc/sparc/conf.c | 3 ++- sys/arch/sparc64/sparc64/conf.c | 3 ++- sys/arch/vax/vax/conf.c | 3 ++- sys/conf/GENERIC | 4 ++-- sys/sys/conf.h | 3 ++- 19 files changed, 39 insertions(+), 21 deletions(-) diff --git a/sys/arch/alpha/alpha/conf.c b/sys/arch/alpha/alpha/conf.c index a700c5e1f9c..9c96d30ab1c 100644 --- a/sys/arch/alpha/alpha/conf.c +++ b/sys/arch/alpha/alpha/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.78 2014/12/11 19:44:16 tedu Exp $ */ +/* $OpenBSD: conf.c,v 1.79 2015/10/23 15:10:52 claudio Exp $ */ /* $NetBSD: conf.c,v 1.16 1996/10/18 21:26:57 cgd Exp $ */ /*- @@ -200,6 +200,7 @@ struct cdevsw cdevsw[] = cdev_notdef(), /* 65: was urio */ cdev_notdef(), /* 66: was USB scanners */ cdev_fuse_init(NFUSE,fuse), /* 67: fuse */ + cdev_tun_init(NTUN,tap), /* 68: Ethernet network tunnel */ }; int nchrdev = nitems(cdevsw); diff --git a/sys/arch/amd64/amd64/conf.c b/sys/arch/amd64/amd64/conf.c index c9e87777437..0bf95c223e4 100644 --- a/sys/arch/amd64/amd64/conf.c +++ b/sys/arch/amd64/amd64/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.50 2015/03/14 03:38:46 jsg Exp $ */ +/* $OpenBSD: conf.c,v 1.51 2015/10/23 15:10:52 claudio Exp $ */ /* * Copyright (c) 1994, 1995 Charles M. Hannum. All rights reserved. @@ -279,6 +279,7 @@ struct cdevsw cdevsw[] = cdev_disk_init(1,diskmap), /* 90: disk mapper */ cdev_pppx_init(NPPPX,pppx), /* 91: pppx */ cdev_fuse_init(NFUSE,fuse), /* 92: fuse */ + cdev_tun_init(NTUN,tap), /* 93: Ethernet network tunnel */ }; int nchrdev = nitems(cdevsw); diff --git a/sys/arch/arm/arm/conf.c b/sys/arch/arm/arm/conf.c index a6917e5d2f8..2f0acf08480 100644 --- a/sys/arch/arm/arm/conf.c +++ b/sys/arch/arm/arm/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.41 2014/12/11 19:44:17 tedu Exp $ */ +/* $OpenBSD: conf.c,v 1.42 2015/10/23 15:10:52 claudio Exp $ */ /* $NetBSD: conf.c,v 1.10 2002/04/19 01:04:38 wiz Exp $ */ /* @@ -381,6 +381,7 @@ struct cdevsw cdevsw[] = { cdev_notdef(), cdev_disk_init(1,diskmap), /* 102: disk mapper */ cdev_pppx_init(NPPPX,pppx), /* 103: pppx */ + cdev_tun_init(NTUN,tap), /* 104: Ethernet tap */ }; int nblkdev = nitems(bdevsw); diff --git a/sys/arch/aviion/aviion/conf.c b/sys/arch/aviion/aviion/conf.c index afc1a04e3d7..40c19546e3a 100644 --- a/sys/arch/aviion/aviion/conf.c +++ b/sys/arch/aviion/aviion/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.19 2014/10/09 04:10:03 tedu Exp $ */ +/* $OpenBSD: conf.c,v 1.20 2015/10/23 15:10:52 claudio Exp $ */ /*- * Copyright (c) 1991 The Regents of the University of California. @@ -143,6 +143,7 @@ struct cdevsw cdevsw[] = cdev_vscsi_init(NVSCSI,vscsi), /* 53: vscsi */ cdev_disk_init(1,diskmap), /* 54: disk mapper */ cdev_pppx_init(NPPPX,pppx), /* 55: pppx */ + cdev_tun_init(NTUN,tap), /* 56: Ethernet network tunnel */ }; int nchrdev = nitems(cdevsw); diff --git a/sys/arch/hppa/hppa/conf.c b/sys/arch/hppa/hppa/conf.c index 1d4b748fb20..e51e89c6b35 100644 --- a/sys/arch/hppa/hppa/conf.c +++ b/sys/arch/hppa/hppa/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.62 2014/12/11 19:44:17 tedu Exp $ */ +/* $OpenBSD: conf.c,v 1.63 2015/10/23 15:10:52 claudio Exp $ */ /*- * Copyright (c) 1991 The Regents of the University of California. @@ -184,6 +184,7 @@ struct cdevsw cdevsw[] = cdev_disk_init(1,diskmap), /* 56: disk mapper */ cdev_pppx_init(NPPPX,pppx), /* 57: pppx */ cdev_fuse_init(NFUSE,fuse), /* 58: fuse */ + cdev_tun_init(NTUN,tap), /* 59: Ethernet network tunnel */ }; int nchrdev = nitems(cdevsw); diff --git a/sys/arch/hppa64/hppa64/conf.c b/sys/arch/hppa64/hppa64/conf.c index d2fca333230..174420bce6b 100644 --- a/sys/arch/hppa64/hppa64/conf.c +++ b/sys/arch/hppa64/hppa64/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.29 2014/12/11 19:44:17 tedu Exp $ */ +/* $OpenBSD: conf.c,v 1.30 2015/10/23 15:10:52 claudio Exp $ */ /*- * Copyright (c) 1991 The Regents of the University of California. @@ -184,6 +184,7 @@ struct cdevsw cdevsw[] = cdev_disk_init(1,diskmap), /* 56: disk mapper */ cdev_pppx_init(NPPPX,pppx), /* 57: pppx */ cdev_fuse_init(NFUSE,fuse), /* 58: fuse */ + cdev_tun_init(NTUN,tap), /* 59: Ethernet network tunnel */ }; int nchrdev = nitems(cdevsw); diff --git a/sys/arch/i386/i386/conf.c b/sys/arch/i386/i386/conf.c index 92531250c75..ebd2cbb48fe 100644 --- a/sys/arch/i386/i386/conf.c +++ b/sys/arch/i386/i386/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.150 2014/12/11 19:44:17 tedu Exp $ */ +/* $OpenBSD: conf.c,v 1.151 2015/10/23 15:10:52 claudio Exp $ */ /* $NetBSD: conf.c,v 1.75 1996/05/03 19:40:20 christos Exp $ */ /* @@ -285,6 +285,7 @@ struct cdevsw cdevsw[] = cdev_disk_init(1,diskmap), /* 91: disk mapper */ cdev_pppx_init(NPPPX,pppx), /* 92: pppx */ cdev_fuse_init(NFUSE,fuse), /* 93: fuse */ + cdev_tun_init(NTUN,tap), /* 94: Ethernet network tunnel */ }; int nchrdev = nitems(cdevsw); diff --git a/sys/arch/landisk/landisk/conf.c b/sys/arch/landisk/landisk/conf.c index b00493e23eb..07b2074f3cc 100644 --- a/sys/arch/landisk/landisk/conf.c +++ b/sys/arch/landisk/landisk/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.31 2014/12/11 19:44:17 tedu Exp $ */ +/* $OpenBSD: conf.c,v 1.32 2015/10/23 15:10:52 claudio Exp $ */ /* * Copyright (c) 1994-1998 Mark Brinicombe. @@ -357,6 +357,7 @@ struct cdevsw cdevsw[] = { cdev_disk_init(1,diskmap), /* 101: disk mapper */ cdev_pppx_init(NPPPX,pppx), /* 102: pppx */ cdev_fuse_init(NFUSE,fuse), /* 103: fuse */ + cdev_tun_init(NTUN,tap), /* 104: Ethernet network tap */ }; int nblkdev = nitems(bdevsw); diff --git a/sys/arch/loongson/loongson/conf.c b/sys/arch/loongson/loongson/conf.c index 2a6188425c5..b81460ec77e 100644 --- a/sys/arch/loongson/loongson/conf.c +++ b/sys/arch/loongson/loongson/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.19 2014/12/11 19:44:17 tedu Exp $ */ +/* $OpenBSD: conf.c,v 1.20 2015/10/23 15:10:52 claudio Exp $ */ /* * Copyright (c) 1992, 1993 @@ -207,6 +207,7 @@ struct cdevsw cdevsw[] = cdev_pppx_init(NPPPX,pppx), /* 71: pppx */ cdev_notdef(), /* 72: was USB scanners */ cdev_fuse_init(NFUSE,fuse), /* 73: fuse */ + cdev_tun_init(NTUN,tap), /* 74: Ethernet network tunnel */ }; int nchrdev = nitems(cdevsw); diff --git a/sys/arch/luna88k/luna88k/conf.c b/sys/arch/luna88k/luna88k/conf.c index c6d045d4636..7b35998f008 100644 --- a/sys/arch/luna88k/luna88k/conf.c +++ b/sys/arch/luna88k/luna88k/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.26 2015/03/03 23:50:37 aoyama Exp $ */ +/* $OpenBSD: conf.c,v 1.27 2015/10/23 15:10:52 claudio Exp $ */ /*- * Copyright (c) 1991 The Regents of the University of California. @@ -156,6 +156,7 @@ struct cdevsw cdevsw[] = cdev_vscsi_init(NVSCSI,vscsi), /* 53: vscsi */ cdev_disk_init(1,diskmap), /* 54: disk mapper */ cdev_pppx_init(NPPPX,pppx), /* 55: pppx */ + cdev_tun_init(NTUN,tap), /* 56: Ethernet network tunnel */ }; int nchrdev = nitems(cdevsw); diff --git a/sys/arch/macppc/macppc/conf.c b/sys/arch/macppc/macppc/conf.c index c64e43c98d0..6f794f37243 100644 --- a/sys/arch/macppc/macppc/conf.c +++ b/sys/arch/macppc/macppc/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.62 2014/12/11 19:44:17 tedu Exp $ */ +/* $OpenBSD: conf.c,v 1.63 2015/10/23 15:10:52 claudio Exp $ */ /* * Copyright (c) 1997 Per Fogelstrom @@ -223,7 +223,7 @@ struct cdevsw cdevsw[] = { cdev_vscsi_init(NVSCSI,vscsi), /* 83: vscsi */ cdev_disk_init(1,diskmap), /* 84: disk mapper */ cdev_pppx_init(NPPPX,pppx), /* 85: pppx */ - cdev_notdef(), /* 86 */ + cdev_tun_init(NTUN,tap), /* 86: Ethernet network tunnel */ cdev_drm_init(NDRM,drm), /* 87: drm */ cdev_fuse_init(NFUSE,fuse), /* 88: fuse */ }; diff --git a/sys/arch/octeon/octeon/conf.c b/sys/arch/octeon/octeon/conf.c index f83ff715fb2..c1fbe887ed9 100644 --- a/sys/arch/octeon/octeon/conf.c +++ b/sys/arch/octeon/octeon/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.15 2015/07/20 19:44:32 pirofti Exp $ */ +/* $OpenBSD: conf.c,v 1.16 2015/10/23 15:10:52 claudio Exp $ */ /* * Copyright (c) 1992, 1993 @@ -225,6 +225,8 @@ struct cdevsw cdevsw[] = cdev_disk_init(1,diskmap), /* 70: disk mapper */ cdev_pppx_init(NPPPX,pppx), /* 71: pppx */ cdev_notdef(), /* 72: was USB scanners */ + cdev_notdef(), /* 73: fuse on other mips64 */ + cdev_tun_init(NTUN,tap), /* 74: Ethernet network tunnel */ }; int nchrdev = nitems(cdevsw); diff --git a/sys/arch/sgi/sgi/conf.c b/sys/arch/sgi/sgi/conf.c index d18accf77e4..9271185680f 100644 --- a/sys/arch/sgi/sgi/conf.c +++ b/sys/arch/sgi/sgi/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.35 2014/12/11 19:44:17 tedu Exp $ */ +/* $OpenBSD: conf.c,v 1.36 2015/10/23 15:10:52 claudio Exp $ */ /* * Copyright (c) 1992, 1993 @@ -208,6 +208,7 @@ struct cdevsw cdevsw[] = cdev_notdef(), /* 71: */ cdev_notdef(), /* 72: was USB scanners */ cdev_fuse_init(NFUSE,fuse), /* 73: fuse */ + cdev_tun_init(NTUN,tap), /* 74: Ethernet network tunnel */ }; int nchrdev = nitems(cdevsw); diff --git a/sys/arch/socppc/socppc/conf.c b/sys/arch/socppc/socppc/conf.c index dcff37a9c2a..950bb6d6edd 100644 --- a/sys/arch/socppc/socppc/conf.c +++ b/sys/arch/socppc/socppc/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.23 2014/12/11 19:44:17 tedu Exp $ */ +/* $OpenBSD: conf.c,v 1.24 2015/10/23 15:10:52 claudio Exp $ */ /* * Copyright (c) 1997 Per Fogelstrom @@ -203,6 +203,7 @@ struct cdevsw cdevsw[] = { cdev_pppx_init(NPPPX,pppx), /* 83: pppx */ cdev_hotplug_init(NHOTPLUG,hotplug), /* 84: devices hot plugging */ cdev_fuse_init(NFUSE,fuse), /* 85: fuse */ + cdev_tun_init(NTUN,tap), /* 86: Ethernet network tunnel */ }; int nchrdev = nitems(cdevsw); diff --git a/sys/arch/sparc/sparc/conf.c b/sys/arch/sparc/sparc/conf.c index 8ef73eca9f7..6c267a94364 100644 --- a/sys/arch/sparc/sparc/conf.c +++ b/sys/arch/sparc/sparc/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.64 2014/10/09 04:10:03 tedu Exp $ */ +/* $OpenBSD: conf.c,v 1.65 2015/10/23 15:10:53 claudio Exp $ */ /* $NetBSD: conf.c,v 1.40 1996/04/11 19:20:03 thorpej Exp $ */ /* @@ -265,6 +265,7 @@ struct cdevsw cdevsw[] = cdev_disk_init(1,diskmap), /* 129: disk mapper */ cdev_pppx_init(NPPPX,pppx), /* 130: pppx */ cdev_hotplug_init(NHOTPLUG,hotplug), /* 131: devices hot plugging */ + cdev_tun_init(NTUN,tap), /* 132: Ethernet network tunnel */ }; int nchrdev = nitems(cdevsw); diff --git a/sys/arch/sparc64/sparc64/conf.c b/sys/arch/sparc64/sparc64/conf.c index 9143dd55601..e2d6fdce1f6 100644 --- a/sys/arch/sparc64/sparc64/conf.c +++ b/sys/arch/sparc64/sparc64/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.74 2014/12/11 19:44:17 tedu Exp $ */ +/* $OpenBSD: conf.c,v 1.75 2015/10/23 15:10:53 claudio Exp $ */ /* $NetBSD: conf.c,v 1.17 2001/03/26 12:33:26 lukem Exp $ */ /* @@ -290,6 +290,7 @@ struct cdevsw cdevsw[] = cdev_gen_init(NVLDCP,vldcp), /* 132: vldcp */ cdev_vdsp_init(NVDSP,vdsp), /* 133: vdsp */ cdev_fuse_init(NFUSE,fuse), /* 134: fuse */ + cdev_tun_init(NTUN,tap), /* 135: Ethernet network tunnel */ }; int nchrdev = nitems(cdevsw); diff --git a/sys/arch/vax/vax/conf.c b/sys/arch/vax/vax/conf.c index 5c83363bec3..2c63e6247de 100644 --- a/sys/arch/vax/vax/conf.c +++ b/sys/arch/vax/vax/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.70 2014/10/09 03:59:59 tedu Exp $ */ +/* $OpenBSD: conf.c,v 1.71 2015/10/23 15:10:53 claudio Exp $ */ /* $NetBSD: conf.c,v 1.44 1999/10/27 16:38:54 ragge Exp $ */ /*- @@ -262,6 +262,7 @@ struct cdevsw cdevsw[] = cdev_pppx_init(NPPPX,pppx), /* 80: pppx */ cdev_audio_init(NAUDIO,audio), /* 81: /dev/audio */ cdev_fuse_init(NFUSE,fuse), /* 82: fuse */ + cdev_tun_init(NTUN,tap), /* 83: Ethernet network tunnel */ }; int nchrdev = nitems(cdevsw); diff --git a/sys/conf/GENERIC b/sys/conf/GENERIC index 4aefba11062..a174d9e9122 100644 --- a/sys/conf/GENERIC +++ b/sys/conf/GENERIC @@ -1,4 +1,4 @@ -# $OpenBSD: GENERIC,v 1.220 2015/08/10 20:35:36 sthen Exp $ +# $OpenBSD: GENERIC,v 1.221 2015/10/23 15:10:53 claudio Exp $ # # Machine-independent option; used by all architectures for their # GENERIC kernel @@ -101,7 +101,7 @@ pseudo-device pppoe # PPP over Ethernet (RFC 2516) pseudo-device pppx # PPP multiplexer pseudo-device sppp 1 # Sync PPP/HDLC pseudo-device trunk # Trunking support -pseudo-device tun # network tunneling over tty +pseudo-device tun # network tunneling over tty (tun & tap) pseudo-device vether # Virtual ethernet pseudo-device vxlan # Virtual extensible LAN pseudo-device vlan # IEEE 802.1Q VLAN diff --git a/sys/sys/conf.h b/sys/sys/conf.h index 9c0907b7232..a44b3c2eee9 100644 --- a/sys/sys/conf.h +++ b/sys/sys/conf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.h,v 1.134 2015/09/10 18:14:52 mpi Exp $ */ +/* $OpenBSD: conf.h,v 1.135 2015/10/23 15:10:52 claudio Exp $ */ /* $NetBSD: conf.h,v 1.33 1996/05/03 20:03:32 christos Exp $ */ /*- @@ -565,6 +565,7 @@ cdev_decl(bpf); cdev_decl(pf); cdev_decl(tun); +cdev_decl(tap); cdev_decl(pppx); cdev_decl(random); -- 2.20.1