diff options
author | rwatson <rwatson@FreeBSD.org> | 2009-07-16 21:13:04 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2009-07-16 21:13:04 +0000 |
commit | 88f8de4d4001c74946458579ca0710df70161c90 (patch) | |
tree | 55b9efd9d8e3a027a51c2539777939228ae3532b /sys/netipsec | |
parent | bfbc302bca72638c26907b5b0ee204eab992fdde (diff) | |
download | FreeBSD-src-88f8de4d4001c74946458579ca0710df70161c90.zip FreeBSD-src-88f8de4d4001c74946458579ca0710df70161c90.tar.gz |
Remove unused VNET_SET() and related macros; only VNET_GET() is
ever actually used. Rename VNET_GET() to VNET() to shorten
variable references.
Discussed with: bz, julian
Reviewed by: bz
Approved by: re (kensmith, kib)
Diffstat (limited to 'sys/netipsec')
-rw-r--r-- | sys/netipsec/ah_var.h | 6 | ||||
-rw-r--r-- | sys/netipsec/esp_var.h | 4 | ||||
-rw-r--r-- | sys/netipsec/ipcomp_var.h | 4 | ||||
-rw-r--r-- | sys/netipsec/ipip_var.h | 4 | ||||
-rw-r--r-- | sys/netipsec/ipsec.h | 28 | ||||
-rw-r--r-- | sys/netipsec/ipsec6.h | 12 | ||||
-rw-r--r-- | sys/netipsec/key.c | 36 | ||||
-rw-r--r-- | sys/netipsec/key_debug.h | 2 | ||||
-rw-r--r-- | sys/netipsec/keysock.c | 2 | ||||
-rw-r--r-- | sys/netipsec/keysock.h | 2 | ||||
-rw-r--r-- | sys/netipsec/xform_esp.c | 2 |
11 files changed, 51 insertions, 51 deletions
diff --git a/sys/netipsec/ah_var.h b/sys/netipsec/ah_var.h index 974cc6c..b031a98 100644 --- a/sys/netipsec/ah_var.h +++ b/sys/netipsec/ah_var.h @@ -72,10 +72,10 @@ struct ahstat { #ifdef _KERNEL VNET_DECLARE(int, ah_enable); -#define V_ah_enable VNET_GET(ah_enable) +#define V_ah_enable VNET(ah_enable) VNET_DECLARE(int, ah_cleartos); -#define V_ah_cleartos VNET_GET(ah_cleartos) +#define V_ah_cleartos VNET(ah_cleartos) VNET_DECLARE(struct ahstat, ahstat); -#define V_ahstat VNET_GET(ahstat) +#define V_ahstat VNET(ahstat) #endif /* _KERNEL */ #endif /*_NETIPSEC_AH_VAR_H_*/ diff --git a/sys/netipsec/esp_var.h b/sys/netipsec/esp_var.h index 66fcd39..dc1aad4 100644 --- a/sys/netipsec/esp_var.h +++ b/sys/netipsec/esp_var.h @@ -73,8 +73,8 @@ struct espstat { #ifdef _KERNEL VNET_DECLARE(int, esp_enable); -#define V_esp_enable VNET_GET(esp_enable) +#define V_esp_enable VNET(esp_enable) VNET_DECLARE(struct espstat, espstat); -#define V_espstat VNET_GET(espstat) +#define V_espstat VNET(espstat) #endif /* _KERNEL */ #endif /*_NETIPSEC_ESP_VAR_H_*/ diff --git a/sys/netipsec/ipcomp_var.h b/sys/netipsec/ipcomp_var.h index d70c6a2..a9dbe86 100644 --- a/sys/netipsec/ipcomp_var.h +++ b/sys/netipsec/ipcomp_var.h @@ -62,8 +62,8 @@ struct ipcompstat { #ifdef _KERNEL VNET_DECLARE(int, ipcomp_enable); -#define V_ipcomp_enable VNET_GET(ipcomp_enable) +#define V_ipcomp_enable VNET(ipcomp_enable) VNET_DECLARE(struct ipcompstat, ipcompstat); -#define V_ipcompstat VNET_GET(ipcompstat) +#define V_ipcompstat VNET(ipcompstat) #endif /* _KERNEL */ #endif /*_NETIPSEC_IPCOMP_VAR_H_*/ diff --git a/sys/netipsec/ipip_var.h b/sys/netipsec/ipip_var.h index a620b72..a6e33e8 100644 --- a/sys/netipsec/ipip_var.h +++ b/sys/netipsec/ipip_var.h @@ -60,8 +60,8 @@ struct ipipstat #ifdef _KERNEL VNET_DECLARE(int, ipip_allow); -#define V_ipip_allow VNET_GET(ipip_allow) +#define V_ipip_allow VNET(ipip_allow) VNET_DECLARE(struct ipipstat, ipipstat); -#define V_ipipstat VNET_GET(ipipstat) +#define V_ipipstat VNET(ipipstat) #endif /* _KERNEL */ #endif /* _NETINET_IPIP_H_ */ diff --git a/sys/netipsec/ipsec.h b/sys/netipsec/ipsec.h index 03df7bc..97756e5 100644 --- a/sys/netipsec/ipsec.h +++ b/sys/netipsec/ipsec.h @@ -333,38 +333,38 @@ struct ipsec_history { }; VNET_DECLARE(int, ipsec_debug); -#define V_ipsec_debug VNET_GET(ipsec_debug) +#define V_ipsec_debug VNET(ipsec_debug) VNET_DECLARE(struct ipsecstat, ipsec4stat); -#define V_ipsec4stat VNET_GET(ipsec4stat) +#define V_ipsec4stat VNET(ipsec4stat) VNET_DECLARE(int, ip4_ah_offsetmask); -#define V_ip4_ah_offsetmask VNET_GET(ip4_ah_offsetmask) +#define V_ip4_ah_offsetmask VNET(ip4_ah_offsetmask) VNET_DECLARE(int, ip4_ipsec_dfbit); -#define V_ip4_ipsec_dfbit VNET_GET(ip4_ipsec_dfbit) +#define V_ip4_ipsec_dfbit VNET(ip4_ipsec_dfbit) VNET_DECLARE(int, ip4_esp_trans_deflev); -#define V_ip4_esp_trans_deflev VNET_GET(ip4_esp_trans_deflev) +#define V_ip4_esp_trans_deflev VNET(ip4_esp_trans_deflev) VNET_DECLARE(int, ip4_esp_net_deflev); -#define V_ip4_esp_net_deflev VNET_GET(ip4_esp_net_deflev) +#define V_ip4_esp_net_deflev VNET(ip4_esp_net_deflev) VNET_DECLARE(int, ip4_ah_trans_deflev); -#define V_ip4_ah_trans_deflev VNET_GET(ip4_ah_trans_deflev) +#define V_ip4_ah_trans_deflev VNET(ip4_ah_trans_deflev) VNET_DECLARE(int, ip4_ah_net_deflev); -#define V_ip4_ah_net_deflev VNET_GET(ip4_ah_net_deflev) +#define V_ip4_ah_net_deflev VNET(ip4_ah_net_deflev) VNET_DECLARE(struct secpolicy, ip4_def_policy); -#define V_ip4_def_policy VNET_GET(ip4_def_policy) +#define V_ip4_def_policy VNET(ip4_def_policy) VNET_DECLARE(int, ip4_ipsec_ecn); -#define V_ip4_ipsec_ecn VNET_GET(ip4_ipsec_ecn) +#define V_ip4_ipsec_ecn VNET(ip4_ipsec_ecn) VNET_DECLARE(int, ip4_esp_randpad); -#define V_ip4_esp_randpad VNET_GET(ip4_esp_randpad) +#define V_ip4_esp_randpad VNET(ip4_esp_randpad) VNET_DECLARE(int, crypto_support); -#define V_crypto_support VNET_GET(crypto_support) +#define V_crypto_support VNET(crypto_support) extern int ip4_ah_cleartos; #ifdef REGRESSION VNET_DECLARE(int, ipsec_replay); -#define V_ipsec_replay VNET_GET(ipsec_replay) +#define V_ipsec_replay VNET(ipsec_replay) VNET_DECLARE(int, ipsec_integrity); -#define V_ipsec_integrity VNET_GET(ipsec_integrity) +#define V_ipsec_integrity VNET(ipsec_integrity) #endif #define ipseclog(x) do { if (V_ipsec_debug) log x; } while (0) diff --git a/sys/netipsec/ipsec6.h b/sys/netipsec/ipsec6.h index a04cbec..030113f 100644 --- a/sys/netipsec/ipsec6.h +++ b/sys/netipsec/ipsec6.h @@ -42,17 +42,17 @@ #ifdef _KERNEL VNET_DECLARE(struct ipsecstat, ipsec6stat); -#define V_ipsec6stat VNET_GET(ipsec6stat) +#define V_ipsec6stat VNET(ipsec6stat) VNET_DECLARE(int, ip6_esp_trans_deflev); -#define V_ip6_esp_trans_deflev VNET_GET(ip6_esp_trans_deflev) +#define V_ip6_esp_trans_deflev VNET(ip6_esp_trans_deflev) VNET_DECLARE(int, ip6_esp_net_deflev); -#define V_ip6_esp_net_deflev VNET_GET(ip6_esp_net_deflev) +#define V_ip6_esp_net_deflev VNET(ip6_esp_net_deflev) VNET_DECLARE(int, ip6_ah_trans_deflev); -#define V_ip6_ah_trans_deflev VNET_GET(ip6_ah_trans_deflev) +#define V_ip6_ah_trans_deflev VNET(ip6_ah_trans_deflev) VNET_DECLARE(int, ip6_ah_net_deflev); -#define V_ip6_ah_net_deflev VNET_GET(ip6_ah_net_deflev) +#define V_ip6_ah_net_deflev VNET(ip6_ah_net_deflev) VNET_DECLARE(int, ip6_ipsec_ecn); -#define V_ip6_ipsec_ecn VNET_GET(ip6_ipsec_ecn) +#define V_ip6_ipsec_ecn VNET(ip6_ipsec_ecn) struct inpcb; diff --git a/sys/netipsec/key.c b/sys/netipsec/key.c index 07a5945..4f2d27e 100644 --- a/sys/netipsec/key.c +++ b/sys/netipsec/key.c @@ -115,35 +115,35 @@ VNET_DEFINE(u_int32_t, key_debug_level) = 0; static VNET_DEFINE(u_int, key_spi_trycnt) = 1000; -#define V_key_spi_trycnt VNET_GET(key_spi_trycnt) +#define V_key_spi_trycnt VNET(key_spi_trycnt) static VNET_DEFINE(u_int32_t, key_spi_minval) = 0x100; -#define V_key_spi_minval VNET_GET(key_spi_minval) +#define V_key_spi_minval VNET(key_spi_minval) static VNET_DEFINE(u_int32_t, key_spi_maxval) = 0x0fffffff; /* XXX */ -#define V_key_spi_maxval VNET_GET(key_spi_maxval) +#define V_key_spi_maxval VNET(key_spi_maxval) static VNET_DEFINE(u_int32_t, policy_id) = 0; -#define V_policy_id VNET_GET(policy_id) +#define V_policy_id VNET(policy_id) /*interval to initialize randseed,1(m)*/ static VNET_DEFINE(u_int, key_int_random) = 60; -#define V_key_int_random VNET_GET(key_int_random) +#define V_key_int_random VNET(key_int_random) /* interval to expire acquiring, 30(s)*/ static VNET_DEFINE(u_int, key_larval_lifetime) = 30; -#define V_key_larval_lifetime VNET_GET(key_larval_lifetime) +#define V_key_larval_lifetime VNET(key_larval_lifetime) /* counter for blocking SADB_ACQUIRE.*/ static VNET_DEFINE(int, key_blockacq_count) = 10; -#define V_key_blockacq_count VNET_GET(key_blockacq_count) +#define V_key_blockacq_count VNET(key_blockacq_count) /* lifetime for blocking SADB_ACQUIRE.*/ static VNET_DEFINE(int, key_blockacq_lifetime) = 20; -#define V_key_blockacq_lifetime VNET_GET(key_blockacq_lifetime) +#define V_key_blockacq_lifetime VNET(key_blockacq_lifetime) /* preferred old sa rather than new sa.*/ static VNET_DEFINE(int, key_preferred_oldsa) = 1; -#define V_key_preferred_oldsa VNET_GET(key_preferred_oldsa) +#define V_key_preferred_oldsa VNET(key_preferred_oldsa) static VNET_DEFINE(u_int32_t, acq_seq) = 0; -#define V_acq_seq VNET_GET(acq_seq) +#define V_acq_seq VNET(acq_seq) /* SPD */ static VNET_DEFINE(LIST_HEAD(_sptree, secpolicy), sptree[IPSEC_DIR_MAX]); -#define V_sptree VNET_GET(sptree) +#define V_sptree VNET(sptree) static struct mtx sptree_lock; #define SPTREE_LOCK_INIT() \ mtx_init(&sptree_lock, "sptree", \ @@ -154,7 +154,7 @@ static struct mtx sptree_lock; #define SPTREE_LOCK_ASSERT() mtx_assert(&sptree_lock, MA_OWNED) static VNET_DEFINE(LIST_HEAD(_sahtree, secashead), sahtree); /* SAD */ -#define V_sahtree VNET_GET(sahtree) +#define V_sahtree VNET(sahtree) static struct mtx sahtree_lock; #define SAHTREE_LOCK_INIT() \ mtx_init(&sahtree_lock, "sahtree", \ @@ -166,7 +166,7 @@ static struct mtx sahtree_lock; /* registed list */ static VNET_DEFINE(LIST_HEAD(_regtree, secreg), regtree[SADB_SATYPE_MAX + 1]); -#define V_regtree VNET_GET(regtree) +#define V_regtree VNET(regtree) static struct mtx regtree_lock; #define REGTREE_LOCK_INIT() \ mtx_init(®tree_lock, "regtree", "fast ipsec regtree", MTX_DEF) @@ -176,7 +176,7 @@ static struct mtx regtree_lock; #define REGTREE_LOCK_ASSERT() mtx_assert(®tree_lock, MA_OWNED) static VNET_DEFINE(LIST_HEAD(_acqtree, secacq), acqtree); /* acquiring list */ -#define V_acqtree VNET_GET(acqtree) +#define V_acqtree VNET(acqtree) static struct mtx acq_lock; #define ACQ_LOCK_INIT() \ mtx_init(&acq_lock, "acqtree", "fast ipsec acquire list", MTX_DEF) @@ -187,7 +187,7 @@ static struct mtx acq_lock; /* SP acquiring list */ static VNET_DEFINE(LIST_HEAD(_spacqtree, secspacq), spacqtree); -#define V_spacqtree VNET_GET(spacqtree) +#define V_spacqtree VNET(spacqtree) static struct mtx spacq_lock; #define SPACQ_LOCK_INIT() \ mtx_init(&spacq_lock, "spacqtree", \ @@ -271,11 +271,11 @@ static const int maxsize[] = { }; static VNET_DEFINE(int, ipsec_esp_keymin) = 256; -#define V_ipsec_esp_keymin VNET_GET(ipsec_esp_keymin) +#define V_ipsec_esp_keymin VNET(ipsec_esp_keymin) static VNET_DEFINE(int, ipsec_esp_auth) = 0; -#define V_ipsec_esp_auth VNET_GET(ipsec_esp_auth) +#define V_ipsec_esp_auth VNET(ipsec_esp_auth) static VNET_DEFINE(int, ipsec_ah_keymin) = 128; -#define V_ipsec_ah_keymin VNET_GET(ipsec_ah_keymin) +#define V_ipsec_ah_keymin VNET(ipsec_ah_keymin) #ifdef SYSCTL_DECL SYSCTL_DECL(_net_key); diff --git a/sys/netipsec/key_debug.h b/sys/netipsec/key_debug.h index 3082cc3..1a3782b 100644 --- a/sys/netipsec/key_debug.h +++ b/sys/netipsec/key_debug.h @@ -57,7 +57,7 @@ do { if ((V_key_debug_level & (lev)) == (lev)) { arg; } } while (0) VNET_DECLARE(u_int32_t, key_debug_level); -#define V_key_debug_level VNET_GET(key_debug_level) +#define V_key_debug_level VNET(key_debug_level) #endif /*_KERNEL*/ struct sadb_msg; diff --git a/sys/netipsec/keysock.c b/sys/netipsec/keysock.c index 1c79421..c35a3bd 100644 --- a/sys/netipsec/keysock.c +++ b/sys/netipsec/keysock.c @@ -72,7 +72,7 @@ struct key_cb { int any_count; }; static VNET_DEFINE(struct key_cb, key_cb); -#define V_key_cb VNET_GET(key_cb) +#define V_key_cb VNET(key_cb) static struct sockaddr key_src = { 2, PF_KEY, }; diff --git a/sys/netipsec/keysock.h b/sys/netipsec/keysock.h index bcc274b..3c0cc8b 100644 --- a/sys/netipsec/keysock.h +++ b/sys/netipsec/keysock.h @@ -70,7 +70,7 @@ struct keycb { }; VNET_DECLARE(struct pfkeystat, pfkeystat); -#define V_pfkeystat VNET_GET(pfkeystat) +#define V_pfkeystat VNET(pfkeystat) extern int key_output(struct mbuf *m, struct socket *so); extern int key_usrreq __P((struct socket *, diff --git a/sys/netipsec/xform_esp.c b/sys/netipsec/xform_esp.c index afb9d2d..e45a037 100644 --- a/sys/netipsec/xform_esp.c +++ b/sys/netipsec/xform_esp.c @@ -88,7 +88,7 @@ SYSCTL_VNET_STRUCT(_net_inet_esp, IPSECCTL_STATS, /* max iv length over all algorithms */ static VNET_DEFINE(int, esp_max_ivlen) = 0; -#define V_esp_max_ivlen VNET_GET(esp_max_ivlen) +#define V_esp_max_ivlen VNET(esp_max_ivlen) static int esp_input_cb(struct cryptop *op); static int esp_output_cb(struct cryptop *crp); |