Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netkey do not #ifdef KEY_DEBUG in header. sync with kame
details: https://anonhg.NetBSD.org/src/rev/1997bc3f47da
branches: trunk
changeset: 513267:1997bc3f47da
user: itojun <itojun%NetBSD.org@localhost>
date: Fri Jul 27 04:48:13 2001 +0000
description:
do not #ifdef KEY_DEBUG in header. sync with kame
diffstat:
sys/netkey/key.c | 38 ++++++++++++++++++++++++++++++--------
sys/netkey/key_var.h | 16 +---------------
2 files changed, 31 insertions(+), 23 deletions(-)
diffs (96 lines):
diff -r ec5a4fb733ec -r 1997bc3f47da sys/netkey/key.c
--- a/sys/netkey/key.c Fri Jul 27 04:22:09 2001 +0000
+++ b/sys/netkey/key.c Fri Jul 27 04:48:13 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: key.c,v 1.44 2001/06/04 21:38:28 mrg Exp $ */
+/* $NetBSD: key.c,v 1.45 2001/07/27 04:48:13 itojun Exp $ */
/* $KAME: key.c,v 1.182 2001/02/16 23:43:01 thorpej Exp $ */
/*
@@ -7365,8 +7365,6 @@
#include <uvm/uvm_extern.h>
#include <sys/sysctl.h>
-static int *key_sysvars[] = KEYCTL_VARS;
-
int
key_sysctl(name, namelen, oldp, oldlenp, newp, newlen)
int *name;
@@ -7378,11 +7376,35 @@
{
if (name[0] >= KEYCTL_MAXID)
return EOPNOTSUPP;
- if (!key_sysvars[name[0]])
- return EOPNOTSUPP;
switch (name[0]) {
+#ifdef KEY_DEBUG
+ case KEYCTL_DEBUG_LEVEL:
+ return sysctl_int(oldp, oldlenp, newp, newlen,
+ &key_debug_level);
+#endif
+ case KEYCTL_SPI_TRY:
+ return sysctl_int(oldp, oldlenp, newp, newlen,
+ &key_spi_trycnt);
+ case KEYCTL_SPI_MIN_VALUE:
+ return sysctl_int(oldp, oldlenp, newp, newlen,
+ &key_spi_minval);
+ case KEYCTL_SPI_MAX_VALUE:
+ return sysctl_int(oldp, oldlenp, newp, newlen,
+ &key_spi_maxval);
+ case KEYCTL_RANDOM_INT:
+ return sysctl_int(oldp, oldlenp, newp, newlen,
+ &key_int_random);
+ case KEYCTL_LARVAL_LIFETIME:
+ return sysctl_int(oldp, oldlenp, newp, newlen,
+ &key_larval_lifetime);
+ case KEYCTL_BLOCKACQ_COUNT:
+ return sysctl_int(oldp, oldlenp, newp, newlen,
+ &key_blockacq_count);
+ case KEYCTL_BLOCKACQ_LIFETIME:
+ return sysctl_int(oldp, oldlenp, newp, newlen,
+ &key_blockacq_lifetime);
default:
- return sysctl_int(oldp, oldlenp, newp, newlen,
- key_sysvars[name[0]]);
- }
+ return EOPNOTSUPP;
+ }
+ /* NOTREACHED */
}
diff -r ec5a4fb733ec -r 1997bc3f47da sys/netkey/key_var.h
--- a/sys/netkey/key_var.h Fri Jul 27 04:22:09 2001 +0000
+++ b/sys/netkey/key_var.h Fri Jul 27 04:48:13 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: key_var.h,v 1.9 2001/05/30 11:42:14 mrg Exp $ */
+/* $NetBSD: key_var.h,v 1.10 2001/07/27 04:48:14 itojun Exp $ */
/* $KAME: key_var.h,v 1.8 2000/05/24 17:28:23 itojun Exp $ */
/*
@@ -62,19 +62,6 @@
{ "blockacq_lifetime", CTLTYPE_INT }, \
}
-#ifdef IPSEC_DEBUG
-#define KEYCTL_VARS { \
- 0, \
- &key_debug_level, \
- &key_spi_trycnt, \
- &key_spi_minval, \
- &key_spi_maxval, \
- &key_int_random, \
- &key_larval_lifetime, \
- &key_blockacq_count, \
- &key_blockacq_lifetime, \
-}
-#else
#define KEYCTL_VARS { \
0, \
0, \
@@ -86,7 +73,6 @@
&key_blockacq_count, \
&key_blockacq_lifetime, \
}
-#endif
#ifdef _KERNEL
#define _ARRAYLEN(p) (sizeof(p)/sizeof(p[0]))
Home |
Main Index |
Thread Index |
Old Index