Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys add sysctl to select software/hardware encryption driver...
details: https://anonhg.NetBSD.org/src/rev/6927e9521567
branches: trunk
changeset: 351930:6927e9521567
user: knakahara <knakahara%NetBSD.org@localhost>
date: Mon Mar 06 09:59:05 2017 +0000
description:
add sysctl to select software/hardware encryption driver. can enable CRYPTO_DEBUG.
diffstat:
sys/netipsec/ipsec_netbsd.c | 10 ++++++++--
sys/opencrypto/cryptodev.h | 14 ++++++--------
2 files changed, 14 insertions(+), 10 deletions(-)
diffs (71 lines):
diff -r 04e59e3b78c8 -r 6927e9521567 sys/netipsec/ipsec_netbsd.c
--- a/sys/netipsec/ipsec_netbsd.c Mon Mar 06 09:24:09 2017 +0000
+++ b/sys/netipsec/ipsec_netbsd.c Mon Mar 06 09:59:05 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ipsec_netbsd.c,v 1.38 2016/07/07 06:55:43 msaitoh Exp $ */
+/* $NetBSD: ipsec_netbsd.c,v 1.39 2017/03/06 09:59:05 knakahara Exp $ */
/* $KAME: esp_input.c,v 1.60 2001/09/04 08:43:19 itojun Exp $ */
/* $KAME: ah_input.c,v 1.64 2001/09/04 08:43:19 itojun Exp $ */
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ipsec_netbsd.c,v 1.38 2016/07/07 06:55:43 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipsec_netbsd.c,v 1.39 2017/03/06 09:59:05 knakahara Exp $");
#include "opt_inet.h"
#include "opt_ipsec.h"
@@ -702,6 +702,12 @@
NULL, 0, &ipsec_used, 0,
CTL_NET, PF_INET, ipproto_ipsec,
CTL_CREATE, CTL_EOL);
+ sysctl_createv(clog, 0, NULL, NULL,
+ CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
+ CTLTYPE_INT, "crypto_support", NULL,
+ NULL, 0, &crypto_support, 0,
+ CTL_NET, PF_INET, ipproto_ipsec,
+ CTL_CREATE, CTL_EOL);
#ifdef IPSEC_DEBUG
sysctl_createv(clog, 0, NULL, NULL,
CTLFLAG_PERMANENT|CTLFLAG_READWRITE,
diff -r 04e59e3b78c8 -r 6927e9521567 sys/opencrypto/cryptodev.h
--- a/sys/opencrypto/cryptodev.h Mon Mar 06 09:24:09 2017 +0000
+++ b/sys/opencrypto/cryptodev.h Mon Mar 06 09:59:05 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cryptodev.h,v 1.28 2016/07/07 06:55:43 msaitoh Exp $ */
+/* $NetBSD: cryptodev.h,v 1.29 2017/03/06 09:59:05 knakahara Exp $ */
/* $FreeBSD: src/sys/opencrypto/cryptodev.h,v 1.2.2.6 2003/07/02 17:04:50 sam Exp $ */
/* $OpenBSD: cryptodev.h,v 1.33 2002/07/17 23:52:39 art Exp $ */
@@ -89,6 +89,10 @@
#include <sys/condvar.h>
#include <sys/time.h>
+#if defined(_KERNEL_OPT)
+#include "opt_ocf.h"
+#endif
+
/* Some initial values */
#define CRYPTO_DRIVERS_INITIAL 4
#define CRYPTO_SW_SESSIONS 32
@@ -641,18 +645,12 @@
#ifdef CRYPTO_DEBUG /* yuck, netipsec defines these differently */
#ifndef DPRINTF
-#define DPRINTF(a) uprintf a
-#endif
-#ifndef DCPRINTF
-#define DCPRINTF(a) printf a
+#define DPRINTF(a) printf a
#endif
#else
#ifndef DPRINTF
#define DPRINTF(a)
#endif
-#ifndef DCPRINTF
-#define DCPRINTF(a)
-#endif
#endif
#endif /* _KERNEL */
Home |
Main Index |
Thread Index |
Old Index