Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src l2tp(4) support rump.



details:   https://anonhg.NetBSD.org/src/rev/ff22a9e56394
branches:  trunk
changeset: 821750:ff22a9e56394
user:      knakahara <knakahara%NetBSD.org@localhost>
date:      Thu Feb 16 08:39:10 2017 +0000

description:
l2tp(4) support rump.

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 +-
 distrib/sets/lists/debug/shl.mi           |   3 +-
 sys/rump/include/opt/l2tp.h               |   3 ++
 sys/rump/net/Makefile.rumpnetcomp         |   4 +-
 sys/rump/net/lib/libl2tp/L2TP.ioconf      |   7 +++++
 sys/rump/net/lib/libl2tp/Makefile         |  16 +++++++++++
 sys/rump/net/lib/libl2tp/l2tp_component.c |  42 +++++++++++++++++++++++++++++++
 sys/rump/net/lib/libnet/net_component.c   |   5 ++-
 11 files changed, 86 insertions(+), 9 deletions(-)

diffs (214 lines):

diff -r eefb209fb8e6 -r ff22a9e56394 distrib/sets/lists/base/shl.mi
--- a/distrib/sets/lists/base/shl.mi    Thu Feb 16 08:32:21 2017 +0000
+++ b/distrib/sets/lists/base/shl.mi    Thu Feb 16 08:39:10 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.802 2017/02/10 18:11:56 christos Exp $
+# $NetBSD: shl.mi,v 1.803 2017/02/16 08:39:10 knakahara Exp $
 #
 # Note:        Don't delete entries from here - mark them as "obsolete" instead,
 #      unless otherwise stated below.
@@ -700,6 +700,9 @@
 ./usr/lib/librumpnet_gif.so                    base-rump-shlib         rump
 ./usr/lib/librumpnet_gif.so.0                  base-rump-shlib         rump
 ./usr/lib/librumpnet_gif.so.0.0                        base-rump-shlib         rump
+./usr/lib/librumpnet_l2tp.so                   base-rump-shlib         rump
+./usr/lib/librumpnet_l2tp.so.0                 base-rump-shlib         rump
+./usr/lib/librumpnet_l2tp.so.0.0               base-rump-shlib         rump
 ./usr/lib/librumpnet_local.so                  base-rump-shlib         rump
 ./usr/lib/librumpnet_local.so.0                        base-rump-shlib         rump
 ./usr/lib/librumpnet_local.so.0.0              base-rump-shlib         rump
diff -r eefb209fb8e6 -r ff22a9e56394 distrib/sets/lists/comp/mi
--- a/distrib/sets/lists/comp/mi        Thu Feb 16 08:32:21 2017 +0000
+++ b/distrib/sets/lists/comp/mi        Thu Feb 16 08:39:10 2017 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: mi,v 1.2109 2017/02/16 08:12:43 knakahara Exp $
+#      $NetBSD: mi,v 1.2110 2017/02/16 08:39:10 knakahara Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 ./etc/mtree/set.comp                           comp-sys-root
@@ -3552,6 +3552,8 @@
 ./usr/lib/librumpnet_bridge_p.a                        comp-c-proflib          rump,profile
 ./usr/lib/librumpnet_gif.a                     comp-c-lib              rump
 ./usr/lib/librumpnet_gif_p.a                   comp-c-proflib          rump,profile
+./usr/lib/librumpnet_l2tp.a                    comp-c-lib              rump
+./usr/lib/librumpnet_l2tp_p.a                  comp-c-proflib          rump,profile
 ./usr/lib/librumpnet_local.a                   comp-c-lib              rump
 ./usr/lib/librumpnet_local_p.a                 comp-c-proflib          rump,profile
 ./usr/lib/librumpnet_net.a                     comp-c-lib              rump
diff -r eefb209fb8e6 -r ff22a9e56394 distrib/sets/lists/comp/shl.mi
--- a/distrib/sets/lists/comp/shl.mi    Thu Feb 16 08:32:21 2017 +0000
+++ b/distrib/sets/lists/comp/shl.mi    Thu Feb 16 08:39:10 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.300 2017/02/08 03:44:40 kamil Exp $
+# $NetBSD: shl.mi,v 1.301 2017/02/16 08:39:10 knakahara Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -218,6 +218,7 @@
 ./usr/lib/librumpnet_bpfjit_pic.a              comp-c-piclib           picinstall,rump,sljit
 ./usr/lib/librumpnet_bridge_pic.a              comp-c-piclib           picinstall,rump
 ./usr/lib/librumpnet_gif_pic.a                 comp-c-piclib           picinstall,rump
+./usr/lib/librumpnet_l2tp_pic.a                        comp-c-piclib           picinstall,rump
 ./usr/lib/librumpnet_local_pic.a               comp-c-piclib           picinstall,rump
 ./usr/lib/librumpnet_net80211_pic.a            comp-c-piclib           picinstall,rump
 ./usr/lib/librumpnet_net_pic.a                 comp-c-piclib           picinstall,rump
diff -r eefb209fb8e6 -r ff22a9e56394 distrib/sets/lists/debug/mi
--- a/distrib/sets/lists/debug/mi       Thu Feb 16 08:32:21 2017 +0000
+++ b/distrib/sets/lists/debug/mi       Thu Feb 16 08:39:10 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.199 2017/02/09 03:29:55 christos Exp $
+# $NetBSD: mi,v 1.200 2017/02/16 08:39:10 knakahara 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
@@ -210,6 +210,7 @@
 ./usr/lib/librumpnet_bridge_g.a                        comp-c-debuglib         debuglib,rump
 ./usr/lib/librumpnet_g.a                       comp-c-debuglib         debuglib,compatfile,rump
 ./usr/lib/librumpnet_gif_g.a                   comp-c-debuglib         debuglib,rump
+./usr/lib/librumpnet_l2tp_g.a                  comp-c-debuglib         debuglib,rump
 ./usr/lib/librumpnet_local_g.a                 comp-c-debuglib         debuglib,rump
 ./usr/lib/librumpnet_net80211_g.a              comp-c-debuglib         debuglib,rump
 ./usr/lib/librumpnet_net_g.a                   comp-c-debuglib         debuglib,rump
diff -r eefb209fb8e6 -r ff22a9e56394 distrib/sets/lists/debug/shl.mi
--- a/distrib/sets/lists/debug/shl.mi   Thu Feb 16 08:32:21 2017 +0000
+++ b/distrib/sets/lists/debug/shl.mi   Thu Feb 16 08:39:10 2017 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: shl.mi,v 1.162 2017/02/10 18:11:56 christos Exp $
+# $NetBSD: shl.mi,v 1.163 2017/02/16 08:39:10 knakahara Exp $
 ./usr/lib/libbfd_g.a                                           comp-c-debuglib debuglib,compatfile,binutils
 ./usr/libdata/debug/lib                                                base-sys-usr    debug,dynamicroot,compatdir
 ./usr/libdata/debug/lib/libblacklist.so.0.0.debug              comp-sys-debug  debug,dynamicroot
@@ -240,6 +240,7 @@
 ./usr/libdata/debug/usr/lib/librumpnet_bpfjit.so.0.0.debug     comp-rump-debug debug,rump,sljit
 ./usr/libdata/debug/usr/lib/librumpnet_bridge.so.0.0.debug     comp-rump-debug debug,rump
 ./usr/libdata/debug/usr/lib/librumpnet_gif.so.0.0.debug                comp-rump-debug debug,rump
+./usr/libdata/debug/usr/lib/librumpnet_l2tp.so.0.0.debug       comp-rump-debug debug,rump
 ./usr/libdata/debug/usr/lib/librumpnet_local.so.0.0.debug      comp-rump-debug debug,rump
 ./usr/libdata/debug/usr/lib/librumpnet_net.so.0.0.debug                comp-rump-debug debug,rump
 ./usr/libdata/debug/usr/lib/librumpnet_net80211.so.0.0.debug   comp-rump-debug debug,rump
diff -r eefb209fb8e6 -r ff22a9e56394 sys/rump/include/opt/l2tp.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/rump/include/opt/l2tp.h       Thu Feb 16 08:39:10 2017 +0000
@@ -0,0 +1,3 @@
+/*     $NetBSD: l2tp.h,v 1.1 2017/02/16 08:39:10 knakahara Exp $       */
+
+/* dummy */
diff -r eefb209fb8e6 -r ff22a9e56394 sys/rump/net/Makefile.rumpnetcomp
--- a/sys/rump/net/Makefile.rumpnetcomp Thu Feb 16 08:32:21 2017 +0000
+++ b/sys/rump/net/Makefile.rumpnetcomp Thu Feb 16 08:39:10 2017 +0000
@@ -1,10 +1,10 @@
-#      $NetBSD: Makefile.rumpnetcomp,v 1.16 2016/11/26 03:17:58 ozaki-r Exp $
+#      $NetBSD: Makefile.rumpnetcomp,v 1.17 2017/02/16 08:39:10 knakahara Exp $
 #
 
 .include <bsd.own.mk>
 
 RUMPNETCOMP=   agr bridge net net80211 netbt netinet netinet6
-RUMPNETCOMP+=  gif netmpls npf local pppoe shmif tap tun vlan
+RUMPNETCOMP+=  gif netmpls npf l2tp local pppoe shmif tap tun vlan
 
 .if ${MKSLJIT} != "no" || make(rumpdescribe)
 RUMPNETCOMP+=  bpfjit
diff -r eefb209fb8e6 -r ff22a9e56394 sys/rump/net/lib/libl2tp/L2TP.ioconf
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/rump/net/lib/libl2tp/L2TP.ioconf      Thu Feb 16 08:39:10 2017 +0000
@@ -0,0 +1,7 @@
+#      $NetBSD: L2TP.ioconf,v 1.1 2017/02/16 08:39:10 knakahara Exp $
+
+ioconf         l2tp
+
+include                "conf/files"
+
+pseudo-device   l2tp
diff -r eefb209fb8e6 -r ff22a9e56394 sys/rump/net/lib/libl2tp/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/rump/net/lib/libl2tp/Makefile Thu Feb 16 08:39:10 2017 +0000
@@ -0,0 +1,16 @@
+#      $NetBSD: Makefile,v 1.1 2017/02/16 08:39:10 knakahara Exp $
+#
+
+.PATH: ${.CURDIR}/../../../../net ${.CURDIR}/../../../../netinet       \
+       ${.CURDIR}/../../../../netinet6
+
+LIB=   rumpnet_l2tp
+COMMENT= L2TPv3 interface
+
+IOCONF=        L2TP.ioconf
+SRCS=  if_l2tp.c in_l2tp.c in6_l2tp.c
+
+SRCS+= l2tp_component.c
+
+.include <bsd.lib.mk>
+.include <bsd.klinks.mk>
diff -r eefb209fb8e6 -r ff22a9e56394 sys/rump/net/lib/libl2tp/l2tp_component.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/rump/net/lib/libl2tp/l2tp_component.c Thu Feb 16 08:39:10 2017 +0000
@@ -0,0 +1,42 @@
+/*     $NetBSD: l2tp_component.c,v 1.1 2017/02/16 08:39:10 knakahara Exp $     */
+
+/*
+ * Copyright (c) 2017 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: l2tp_component.c,v 1.1 2017/02/16 08:39:10 knakahara Exp $");
+
+#include <sys/param.h>
+
+#include <rump-sys/kern.h>
+
+int l2tpattach(int);
+
+RUMP_COMPONENT(RUMP_COMPONENT_NET_IF)
+{
+
+       l2tpattach(0);
+}
diff -r eefb209fb8e6 -r ff22a9e56394 sys/rump/net/lib/libnet/net_component.c
--- a/sys/rump/net/lib/libnet/net_component.c   Thu Feb 16 08:32:21 2017 +0000
+++ b/sys/rump/net/lib/libnet/net_component.c   Thu Feb 16 08:39:10 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: net_component.c,v 1.8 2017/01/17 02:02:27 christos Exp $       */
+/*     $NetBSD: net_component.c,v 1.9 2017/02/16 08:39:10 knakahara Exp $      */
 
 /*
  * Copyright (c) 2009 Antti Kantee.  All Rights Reserved.
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: net_component.c,v 1.8 2017/01/17 02:02:27 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: net_component.c,v 1.9 2017/02/16 08:39:10 knakahara Exp $");
 
 #include <sys/param.h>
 #include <sys/domain.h>
@@ -36,6 +36,7 @@
 
 #include <net/if.h>
 #include <net/if_llatbl.h>
+#include <net/if_l2tp.h>
 #include <net/route.h>
 
 #include <rump-sys/kern.h>



Home | Main Index | Thread Index | Old Index