Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Rumpify vlan(4)
details: https://anonhg.NetBSD.org/src/rev/5c8b2996b539
branches: trunk
changeset: 349162:5c8b2996b539
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Sat Nov 26 03:17:58 2016 +0000
description:
Rumpify vlan(4)
diffstat:
distrib/sets/lists/base/shl.mi | 5 ++-
distrib/sets/lists/comp/mi | 4 ++-
distrib/sets/lists/comp/shl.mi | 3 +-
distrib/sets/lists/debug/mi | 3 +-
sys/rump/include/opt/vlan.h | 4 +-
sys/rump/librump/rumpnet/net_stub.c | 8 ++++-
sys/rump/net/Makefile.rumpnetcomp | 4 +-
sys/rump/net/lib/libvlan/Makefile | 15 ++++++++++
sys/rump/net/lib/libvlan/VLAN.ioconf | 7 +++++
sys/rump/net/lib/libvlan/vlan_component.c | 43 +++++++++++++++++++++++++++++++
10 files changed, 86 insertions(+), 10 deletions(-)
diffs (202 lines):
diff -r 736d4fd50f42 -r 5c8b2996b539 distrib/sets/lists/base/shl.mi
--- a/distrib/sets/lists/base/shl.mi Sat Nov 26 02:34:49 2016 +0000
+++ b/distrib/sets/lists/base/shl.mi Sat Nov 26 03:17:58 2016 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.790 2016/11/01 14:04:48 christos Exp $
+# $NetBSD: shl.mi,v 1.791 2016/11/26 03:17:58 ozaki-r Exp $
#
# Note: Don't delete entries from here - mark them as "obsolete" instead,
# unless otherwise stated below.
@@ -742,6 +742,9 @@
./usr/lib/librumpnet_virtif.so base-rump-shlib rump
./usr/lib/librumpnet_virtif.so.0 base-rump-shlib rump
./usr/lib/librumpnet_virtif.so.0.0 base-rump-shlib rump
+./usr/lib/librumpnet_vlan.so base-rump-shlib rump
+./usr/lib/librumpnet_vlan.so.0 base-rump-shlib rump
+./usr/lib/librumpnet_vlan.so.0.0 base-rump-shlib rump
./usr/lib/librumpuser.so base-rump-shlib compatfile,rump
./usr/lib/librumpuser.so.0 base-rump-shlib compatfile,rump
./usr/lib/librumpuser.so.0.1 base-rump-shlib compatfile,rump
diff -r 736d4fd50f42 -r 5c8b2996b539 distrib/sets/lists/comp/mi
--- a/distrib/sets/lists/comp/mi Sat Nov 26 02:34:49 2016 +0000
+++ b/distrib/sets/lists/comp/mi Sat Nov 26 03:17:58 2016 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.2074 2016/11/22 03:52:01 kamil Exp $
+# $NetBSD: mi,v 1.2075 2016/11/26 03:17:58 ozaki-r Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
./etc/mtree/set.comp comp-sys-root
@@ -3571,6 +3571,8 @@
./usr/lib/librumpnet_tun_p.a comp-c-proflib rump,profile
./usr/lib/librumpnet_virtif.a comp-c-lib rump
./usr/lib/librumpnet_virtif_p.a comp-c-proflib rump,profile
+./usr/lib/librumpnet_vlan.a comp-c-lib rump
+./usr/lib/librumpnet_vlan_p.a comp-c-proflib rump,profile
./usr/lib/librumpuser.a comp-c-lib compatfile,rump
./usr/lib/librumpuser_p.a comp-c-proflib compatfile,rump,profile
./usr/lib/librumpvfs.a comp-c-lib compatfile,rump
diff -r 736d4fd50f42 -r 5c8b2996b539 distrib/sets/lists/comp/shl.mi
--- a/distrib/sets/lists/comp/shl.mi Sat Nov 26 02:34:49 2016 +0000
+++ b/distrib/sets/lists/comp/shl.mi Sat Nov 26 03:17:58 2016 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.297 2016/11/01 14:04:48 christos Exp $
+# $NetBSD: shl.mi,v 1.298 2016/11/26 03:17:58 ozaki-r Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
#
@@ -233,6 +233,7 @@
./usr/lib/librumpnet_tap_pic.a comp-c-piclib picinstall,rump
./usr/lib/librumpnet_tun_pic.a comp-c-piclib picinstall,rump
./usr/lib/librumpnet_virtif_pic.a comp-c-piclib picinstall,rump
+./usr/lib/librumpnet_vlan_pic.a comp-c-piclib picinstall,rump
./usr/lib/librumpuser_pic.a comp-c-piclib compatfile,picinstall,rump
./usr/lib/librumpvfs_aio_pic.a comp-c-piclib picinstall,rump
./usr/lib/librumpvfs_fifofs_pic.a comp-c-piclib picinstall,rump
diff -r 736d4fd50f42 -r 5c8b2996b539 distrib/sets/lists/debug/mi
--- a/distrib/sets/lists/debug/mi Sat Nov 26 02:34:49 2016 +0000
+++ b/distrib/sets/lists/debug/mi Sat Nov 26 03:17:58 2016 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.179 2016/11/18 22:50:19 kamil Exp $
+# $NetBSD: mi,v 1.180 2016/11/26 03:17:58 ozaki-r Exp $
./etc/mtree/set.debug comp-sys-root
./usr/lib comp-sys-usr compatdir
./usr/lib/i18n/libBIG5_g.a comp-c-debuglib debuglib,compatfile
@@ -225,6 +225,7 @@
./usr/lib/librumpnet_tap_g.a comp-c-debuglib debuglib,rump
./usr/lib/librumpnet_tun_g.a comp-c-debuglib debuglib,rump
./usr/lib/librumpnet_virtif_g.a comp-c-debuglib debuglib,rump
+./usr/lib/librumpnet_vlan_g.a comp-c-debuglib debuglib,rump
./usr/lib/librumpuser_g.a comp-c-debuglib debuglib,compatfile,rump
./usr/lib/librumpvfs_aio_g.a comp-c-debuglib debuglib,rump
./usr/lib/librumpvfs_fifofs_g.a comp-c-debuglib debuglib,rump
diff -r 736d4fd50f42 -r 5c8b2996b539 sys/rump/include/opt/vlan.h
--- a/sys/rump/include/opt/vlan.h Sat Nov 26 02:34:49 2016 +0000
+++ b/sys/rump/include/opt/vlan.h Sat Nov 26 03:17:58 2016 +0000
@@ -1,3 +1,3 @@
-/* $NetBSD: vlan.h,v 1.1 2015/08/24 23:04:42 pooka Exp $ */
+/* $NetBSD: vlan.h,v 1.2 2016/11/26 03:17:58 ozaki-r Exp $ */
-/* dummy */
+#define NVLAN 1
diff -r 736d4fd50f42 -r 5c8b2996b539 sys/rump/librump/rumpnet/net_stub.c
--- a/sys/rump/librump/rumpnet/net_stub.c Sat Nov 26 02:34:49 2016 +0000
+++ b/sys/rump/librump/rumpnet/net_stub.c Sat Nov 26 03:17:58 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: net_stub.c,v 1.23 2016/05/12 02:24:17 ozaki-r Exp $ */
+/* $NetBSD: net_stub.c,v 1.24 2016/11/26 03:17:58 ozaki-r Exp $ */
/*
* Copyright (c) 2008 Antti Kantee. All Rights Reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: net_stub.c,v 1.23 2016/05/12 02:24:17 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: net_stub.c,v 1.24 2016/11/26 03:17:58 ozaki-r Exp $");
#include <sys/mutex.h>
#include <sys/param.h>
@@ -67,6 +67,10 @@
__weak_alias(pppoe_input,rumpnet_stub);
__weak_alias(pppoedisc_input,rumpnet_stub);
+/* vlan */
+__weak_alias(vlan_input,rumpnet_stub);
+__weak_alias(vlan_ifdetach,rumpnet_stub);
+
struct ifnet_head ifnet_list;
struct pslist_head ifnet_pslist;
struct psref_class *ifnet_psref_class;
diff -r 736d4fd50f42 -r 5c8b2996b539 sys/rump/net/Makefile.rumpnetcomp
--- a/sys/rump/net/Makefile.rumpnetcomp Sat Nov 26 02:34:49 2016 +0000
+++ b/sys/rump/net/Makefile.rumpnetcomp Sat Nov 26 03:17:58 2016 +0000
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile.rumpnetcomp,v 1.15 2016/09/05 02:25:38 ozaki-r Exp $
+# $NetBSD: Makefile.rumpnetcomp,v 1.16 2016/11/26 03:17:58 ozaki-r Exp $
#
.include <bsd.own.mk>
RUMPNETCOMP= agr bridge net net80211 netbt netinet netinet6
-RUMPNETCOMP+= gif netmpls npf local pppoe shmif tap tun
+RUMPNETCOMP+= gif netmpls npf local pppoe shmif tap tun vlan
.if ${MKSLJIT} != "no" || make(rumpdescribe)
RUMPNETCOMP+= bpfjit
diff -r 736d4fd50f42 -r 5c8b2996b539 sys/rump/net/lib/libvlan/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/rump/net/lib/libvlan/Makefile Sat Nov 26 03:17:58 2016 +0000
@@ -0,0 +1,15 @@
+# $NetBSD $
+#
+
+.PATH: ${.CURDIR}/../../../../net
+
+LIB= rumpnet_vlan
+COMMENT=IEEE 802.1q encapsulation
+
+IOCONF= VLAN.ioconf
+SRCS= if_vlan.c
+
+SRCS+= vlan_component.c
+
+.include <bsd.lib.mk>
+.include <bsd.klinks.mk>
diff -r 736d4fd50f42 -r 5c8b2996b539 sys/rump/net/lib/libvlan/VLAN.ioconf
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/rump/net/lib/libvlan/VLAN.ioconf Sat Nov 26 03:17:58 2016 +0000
@@ -0,0 +1,7 @@
+# $NetBSD $
+
+ioconf vlan
+
+include "conf/files"
+
+pseudo-device vlan
diff -r 736d4fd50f42 -r 5c8b2996b539 sys/rump/net/lib/libvlan/vlan_component.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/rump/net/lib/libvlan/vlan_component.c Sat Nov 26 03:17:58 2016 +0000
@@ -0,0 +1,43 @@
+/* $NetBSD: vlan_component.c,v 1.1 2016/11/26 03:17:58 ozaki-r Exp $ */
+
+/*
+ * Copyright (c) 2009 Antti Kantee. All Rights Reserved.
+ * Copyright (c) 2016 Internet Initiative Japan Inc.
+ * All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
+ * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include <sys/cdefs.h>
+__KERNEL_RCSID(0, "$NetBSD: vlan_component.c,v 1.1 2016/11/26 03:17:58 ozaki-r Exp $");
+
+#include <sys/param.h>
+
+#include <rump-sys/kern.h>
+
+int vlanattach(int);
+
+RUMP_COMPONENT(RUMP_COMPONENT_NET_IF)
+{
+
+ vlanattach(0);
+}
Home |
Main Index |
Thread Index |
Old Index