Source-Changes-HG archive

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

[src/bouyer-socketcan]: src/sys/rump/net/lib/libnetipsec 795880



details:   https://anonhg.NetBSD.org/src/rev/a00c687fd9a7
branches:  bouyer-socketcan
changeset: 820866:a00c687fd9a7
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Fri Apr 14 02:43:29 2017 +0000

description:
795880

diffstat:

 sys/rump/net/lib/libnetipsec/Makefile             |  11 ++++
 sys/rump/net/lib/libnetipsec/Makefile.inc         |  17 +++++++
 sys/rump/net/lib/libnetipsec/netipsec_component.c |  51 +++++++++++++++++++++++
 3 files changed, 79 insertions(+), 0 deletions(-)

diffs (91 lines):

diff -r c551f23f7ad3 -r a00c687fd9a7 sys/rump/net/lib/libnetipsec/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/rump/net/lib/libnetipsec/Makefile     Fri Apr 14 02:43:29 2017 +0000
@@ -0,0 +1,11 @@
+#      $NetBSD: Makefile,v 1.1.2.2 2017/04/14 02:43:29 ozaki-r Exp $
+#
+
+LIB=   rumpnet_netipsec
+
+SRCS=  netipsec_component.c
+
+.include "Makefile.inc"
+
+.include <bsd.lib.mk>
+.include <bsd.klinks.mk>
diff -r c551f23f7ad3 -r a00c687fd9a7 sys/rump/net/lib/libnetipsec/Makefile.inc
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/rump/net/lib/libnetipsec/Makefile.inc Fri Apr 14 02:43:29 2017 +0000
@@ -0,0 +1,17 @@
+#      $NetBSD: Makefile.inc,v 1.1.2.2 2017/04/14 02:43:29 ozaki-r Exp $
+#
+
+.PATH: ${.CURDIR}/../../../../netipsec
+
+CPPFLAGS+=     -DIPSEC -DINET -DINET6
+
+SRCS+=         ipsec.c ipsec_netbsd.c key_debug.c xform_esp.c \
+               ipsec_input.c ipsec_output.c keysock.c xform_ipcomp.c \
+               ipsec_mbuf.c key.c xform_ah.c xform_ipip.c
+# Add it once TCP_SIGNATURE is enabled
+#SRCS+=                xform_tcp.c
+
+# IPsec debugging
+.ifdef RUMP_DEBUG
+CPPFLAGS+=     -DIPSEC_DEBUG
+.endif
diff -r c551f23f7ad3 -r a00c687fd9a7 sys/rump/net/lib/libnetipsec/netipsec_component.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/rump/net/lib/libnetipsec/netipsec_component.c Fri Apr 14 02:43:29 2017 +0000
@@ -0,0 +1,51 @@
+/*     $NetBSD: netipsec_component.c,v 1.1.2.2 2017/04/14 02:43:29 ozaki-r 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: netipsec_component.c,v 1.1.2.2 2017/04/14 02:43:29 ozaki-r Exp $");
+
+#include <sys/domain.h>
+#include <sys/protosw.h>
+#include <sys/sysctl.h>
+
+#include <netipsec/ipsec.h>
+
+#include <rump-sys/kern.h>
+#include <rump-sys/net.h>
+
+RUMP_COMPONENT(RUMP_COMPONENT_NET)
+{
+       extern struct domain keydomain;
+
+       ipsec_attach();
+       domain_attach(&keydomain);
+       ipsec_enabled = 1;
+#ifdef IPSEC_DEBUG
+       ipsec_debug = 1;
+#endif
+}



Home | Main Index | Thread Index | Old Index