diff options
73 files changed, 378 insertions, 383 deletions
diff --git a/sys/net/flowtable.c b/sys/net/flowtable.c index dd1b040..c7c1b72 100644 --- a/sys/net/flowtable.c +++ b/sys/net/flowtable.c @@ -168,10 +168,10 @@ static VNET_DEFINE(uint32_t, flow_hashjitter); static VNET_DEFINE(uma_zone_t, flow_ipv4_zone); static VNET_DEFINE(uma_zone_t, flow_ipv6_zone); -#define V_flow_list_head VNET_GET(flow_list_head) -#define V_flow_hashjitter VNET_GET(flow_hashjitter) -#define V_flow_ipv4_zone VNET_GET(flow_ipv4_zone) -#define V_flow_ipv6_zone VNET_GET(flow_ipv6_zone) +#define V_flow_list_head VNET(flow_list_head) +#define V_flow_hashjitter VNET(flow_hashjitter) +#define V_flow_ipv4_zone VNET(flow_ipv4_zone) +#define V_flow_ipv6_zone VNET(flow_ipv6_zone) static int flowtable_iattach(const void *); #ifdef VIMAGE @@ -217,19 +217,19 @@ static VNET_DEFINE(int, flowtable_fin_wait_expire) = FIN_WAIT_IDLE; static VNET_DEFINE(int, flowtable_tcp_expire) = TCP_IDLE; static VNET_DEFINE(int, flowtable_nmbflows) = 4096; -#define V_flowtable_enable VNET_GET(flowtable_enable) -#define V_flowtable_hits VNET_GET(flowtable_hits) -#define V_flowtable_lookups VNET_GET(flowtable_lookups) -#define V_flowtable_misses VNET_GET(flowtable_misses) -#define V_flowtable_frees VNET_GET(flowtable_frees) -#define V_flowtable_free_checks VNET_GET(flowtable_free_checks) -#define V_flowtable_max_depth VNET_GET(flowtable_max_depth) -#define V_flowtable_collisions VNET_GET(flowtable_collisions) -#define V_flowtable_syn_expire VNET_GET(flowtable_syn_expire) -#define V_flowtable_udp_expire VNET_GET(flowtable_udp_expire) -#define V_flowtable_fin_wait_expire VNET_GET(flowtable_fin_wait_expire) -#define V_flowtable_tcp_expire VNET_GET(flowtable_tcp_expire) -#define V_flowtable_nmbflows VNET_GET(flowtable_nmbflows) +#define V_flowtable_enable VNET(flowtable_enable) +#define V_flowtable_hits VNET(flowtable_hits) +#define V_flowtable_lookups VNET(flowtable_lookups) +#define V_flowtable_misses VNET(flowtable_misses) +#define V_flowtable_frees VNET(flowtable_frees) +#define V_flowtable_free_checks VNET(flowtable_free_checks) +#define V_flowtable_max_depth VNET(flowtable_max_depth) +#define V_flowtable_collisions VNET(flowtable_collisions) +#define V_flowtable_syn_expire VNET(flowtable_syn_expire) +#define V_flowtable_udp_expire VNET(flowtable_udp_expire) +#define V_flowtable_fin_wait_expire VNET(flowtable_fin_wait_expire) +#define V_flowtable_tcp_expire VNET(flowtable_tcp_expire) +#define V_flowtable_nmbflows VNET(flowtable_nmbflows) SYSCTL_NODE(_net_inet, OID_AUTO, flowtable, CTLFLAG_RD, NULL, "flowtable"); SYSCTL_VNET_INT(_net_inet_flowtable, OID_AUTO, enable, CTLFLAG_RW, diff --git a/sys/net/flowtable.h b/sys/net/flowtable.h index 13fdfdb..6334d8b 100644 --- a/sys/net/flowtable.h +++ b/sys/net/flowtable.h @@ -39,7 +39,7 @@ $FreeBSD$ struct flowtable; VNET_DECLARE(struct flowtable *, ip_ft); -#define V_ip_ft VNET_GET(ip_ft) +#define V_ip_ft VNET(ip_ft) struct flowtable *flowtable_alloc(int nentry, int flags); diff --git a/sys/net/if.c b/sys/net/if.c index daab1ac..f8d2fb1 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -163,8 +163,8 @@ static VNET_DEFINE(int, if_indexlim) = 8; /* Table of ifnet by index. Locked with ifnet_lock. */ static VNET_DEFINE(struct ifindex_entry *, ifindex_table); -#define V_if_indexlim VNET_GET(if_indexlim) -#define V_ifindex_table VNET_GET(ifindex_table) +#define V_if_indexlim VNET(if_indexlim) +#define V_ifindex_table VNET(ifindex_table) int ifqmaxlen = IFQ_MAXLEN; struct rwlock ifnet_lock; diff --git a/sys/net/if_clone.c b/sys/net/if_clone.c index 9347d2c..4e3f787 100644 --- a/sys/net/if_clone.c +++ b/sys/net/if_clone.c @@ -61,8 +61,8 @@ static struct mtx if_cloners_mtx; static VNET_DEFINE(int, if_cloners_count); VNET_DEFINE(LIST_HEAD(, if_clone), if_cloners); -#define V_if_cloners_count VNET_GET(if_cloners_count) -#define V_if_cloners VNET_GET(if_cloners) +#define V_if_cloners_count VNET(if_cloners_count) +#define V_if_cloners VNET(if_cloners) #define IF_CLONERS_LOCK_INIT() \ mtx_init(&if_cloners_mtx, "if_cloners lock", NULL, MTX_DEF) diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index f7c9042..6278db4 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -149,7 +149,7 @@ MALLOC_DEFINE(M_ARPCOM, "arpcom", "802.* interface internals"); int ether_ipfw_chk(struct mbuf **m0, struct ifnet *dst, int shared); static VNET_DEFINE(int, ether_ipfw); -#define V_ether_ipfw VNET_GET(ether_ipfw) +#define V_ether_ipfw VNET(ether_ipfw) #endif diff --git a/sys/net/if_gif.c b/sys/net/if_gif.c index e96cb41..f663283 100644 --- a/sys/net/if_gif.c +++ b/sys/net/if_gif.c @@ -99,17 +99,17 @@ static VNET_DEFINE(LIST_HEAD(, gif_softc), gif_softc_list); static VNET_DEFINE(int, max_gif_nesting); static VNET_DEFINE(int, parallel_tunnels); -#define V_gif_softc_list VNET_GET(gif_softc_list) -#define V_max_gif_nesting VNET_GET(max_gif_nesting) -#define V_parallel_tunnels VNET_GET(parallel_tunnels) +#define V_gif_softc_list VNET(gif_softc_list) +#define V_max_gif_nesting VNET(max_gif_nesting) +#define V_parallel_tunnels VNET(parallel_tunnels) #ifdef INET VNET_DEFINE(int, ip_gif_ttl); -#define V_ip_gif_ttl VNET_GET(ip_gif_ttl) +#define V_ip_gif_ttl VNET(ip_gif_ttl) #endif #ifdef INET6 VNET_DEFINE(int, ip6_gif_hlim); -#define V_ip6_gif_hlim VNET_GET(ip6_gif_hlim) +#define V_ip6_gif_hlim VNET(ip6_gif_hlim) #endif void (*ng_gif_input_p)(struct ifnet *ifp, struct mbuf **mp, int af); diff --git a/sys/net/if_gif.h b/sys/net/if_gif.h index 5257837..18b7831 100644 --- a/sys/net/if_gif.h +++ b/sys/net/if_gif.h @@ -120,7 +120,7 @@ void gif_delete_tunnel(struct ifnet *); int gif_encapcheck(const struct mbuf *, int, int, void *); VNET_DECLARE(int, ip_gif_ttl); -#define V_ip_gif_ttl VNET_GET(ip_gif_ttl) +#define V_ip_gif_ttl VNET(ip_gif_ttl) #endif /* _KERNEL */ diff --git a/sys/net/if_loop.c b/sys/net/if_loop.c index c2acacd..7889570 100644 --- a/sys/net/if_loop.c +++ b/sys/net/if_loop.c @@ -113,8 +113,8 @@ VNET_DEFINE(struct ifnet *, loif); /* Used externally */ #ifdef VIMAGE static VNET_DEFINE(struct ifc_simple_data *, lo_cloner_data); static VNET_DEFINE(struct if_clone *, lo_cloner); -#define V_lo_cloner_data VNET_GET(lo_cloner_data) -#define V_lo_cloner VNET_GET(lo_cloner) +#define V_lo_cloner_data VNET(lo_cloner_data) +#define V_lo_cloner VNET(lo_cloner) MALLOC_DEFINE(M_LO_CLONER, "lo_cloner", "lo_cloner"); #endif diff --git a/sys/net/if_var.h b/sys/net/if_var.h index 07914f5..33349fc 100644 --- a/sys/net/if_var.h +++ b/sys/net/if_var.h @@ -785,10 +785,10 @@ VNET_DECLARE(struct ifgrouphead, ifg_head); VNET_DECLARE(int, if_index); VNET_DECLARE(struct ifnet *, loif); /* first loopback interface */ -#define V_ifnet VNET_GET(ifnet) -#define V_ifg_head VNET_GET(ifg_head) -#define V_if_index VNET_GET(if_index) -#define V_loif VNET_GET(loif) +#define V_ifnet VNET(ifnet) +#define V_ifg_head VNET(ifg_head) +#define V_if_index VNET(if_index) +#define V_loif VNET(loif) extern int ifqmaxlen; diff --git a/sys/net/raw_cb.h b/sys/net/raw_cb.h index aa84a05..35b546c 100644 --- a/sys/net/raw_cb.h +++ b/sys/net/raw_cb.h @@ -56,7 +56,7 @@ struct rawcb { #ifdef _KERNEL VNET_DECLARE(LIST_HEAD(rawcb_list_head, rawcb), rawcb_list); -#define V_rawcb_list VNET_GET(rawcb_list) +#define V_rawcb_list VNET(rawcb_list) extern struct mtx rawcb_mtx; diff --git a/sys/net/route.c b/sys/net/route.c index 59a5912..de677bc 100644 --- a/sys/net/route.c +++ b/sys/net/route.c @@ -92,10 +92,10 @@ static VNET_DEFINE(uma_zone_t, rtzone); /* Routing table UMA zone. */ VNET_DEFINE(int, rttrash); /* routes not in table but not freed */ VNET_DEFINE(struct rtstat, rtstat); -#define V_rt_tables VNET_GET(rt_tables) -#define V_rtzone VNET_GET(rtzone) -#define V_rttrash VNET_GET(rttrash) -#define V_rtstat VNET_GET(rtstat) +#define V_rt_tables VNET(rt_tables) +#define V_rtzone VNET(rtzone) +#define V_rttrash VNET(rttrash) +#define V_rtstat VNET(rtstat) static void rt_maskedcopy(struct sockaddr *, struct sockaddr *, struct sockaddr *); diff --git a/sys/net/vnet.h b/sys/net/vnet.h index 0f77143..e44d422 100644 --- a/sys/net/vnet.h +++ b/sys/net/vnet.h @@ -53,19 +53,16 @@ __asm__(".previous"); #define _VNET_PTR(b, n) (__typeof(VNET_NAME(n))*) \ ((b) + (uintptr_t)&VNET_NAME(n)) -#define _VNET_GET(b, n) (*_VNET_PTR(b, n)) -#define _VNET_SET(b, n, v) (*_VNET_PTR(b, n) = v) +#define _VNET(b, n) (*_VNET_PTR(b, n)) /* * Virtualized global variable accessor macros. */ #define VNET_VNET_PTR(vnet, n) _VNET_PTR((vnet)->vnet_data_base, n) -#define VNET_VNET_GET(vnet, n) (*VNET_VNET_PTR((vnet), n)) -#define VNET_VNET_SET(vnet, n, v) ((*VNET_VNET_PTR((vnet), n)) = v) +#define VNET_VNET(vnet, n) (*VNET_VNET_PTR((vnet), n)) #define VNET_PTR(n) VNET_VNET_PTR(curvnet, n) -#define VNET_GET(n) VNET_VNET_GET(curvnet, n) -#define VNET_SET(n, v) VNET_VNET_SET(curvnet, n, v) +#define VNET(n) VNET_VNET(curvnet, n) /* * Sysctl variants for vnet-virtualized global variables. Include @@ -143,12 +140,10 @@ void vnet_data_destroy(struct vnet *vnet); * Virtualized global variable accessor macros. */ #define VNET_VNET_PTR(vnet, n) (&(n)) -#define VNET_VNET_GET(vnet, n) (n) -#define VNET_VNET_SET(vnet, n, v) ((n) = (v)) +#define VNET_VNET(vnet, n) (n) #define VNET_PTR(n) (&(n)) -#define VNET_GET(n) (n) -#define VNET_SET(n, v) ((n) = (v)) +#define VNET(n) (n) #endif /* VIMAGE */ diff --git a/sys/netgraph/ng_base.c b/sys/netgraph/ng_base.c index 9eb99d5..084c676 100644 --- a/sys/netgraph/ng_base.c +++ b/sys/netgraph/ng_base.c @@ -177,7 +177,7 @@ static struct mtx ng_typelist_mtx; /* Hash related definitions */ /* XXX Don't need to initialise them because it's a LIST */ static VNET_DEFINE(LIST_HEAD(, ng_node), ng_ID_hash[NG_ID_HASH_SIZE]); -#define V_ng_ID_hash VNET_GET(ng_ID_hash) +#define V_ng_ID_hash VNET(ng_ID_hash) static struct mtx ng_idhash_mtx; /* Method to find a node.. used twice so do it here */ @@ -195,7 +195,7 @@ static struct mtx ng_idhash_mtx; } while (0) static VNET_DEFINE(LIST_HEAD(, ng_node), ng_name_hash[NG_NAME_HASH_SIZE]); -#define V_ng_name_hash VNET_GET(ng_name_hash) +#define V_ng_name_hash VNET(ng_name_hash) static struct mtx ng_namehash_mtx; #define NG_NAMEHASH(NAME, HASH) \ @@ -365,7 +365,7 @@ ng_alloc_node(void) #endif static VNET_DEFINE(ng_ID_t, nextID) = 1; -#define V_nextID VNET_GET(nextID) +#define V_nextID VNET(nextID) #ifdef INVARIANTS #define CHECK_DATA_MBUF(m) do { \ diff --git a/sys/netgraph/ng_eiface.c b/sys/netgraph/ng_eiface.c index 9969924..fb43eef 100644 --- a/sys/netgraph/ng_eiface.c +++ b/sys/netgraph/ng_eiface.c @@ -117,7 +117,7 @@ static vnet_attach_fn ng_eiface_iattach; static vnet_detach_fn ng_eiface_idetach; static VNET_DEFINE(struct unrhdr *, ng_eiface_unit); -#define V_ng_eiface_unit VNET_GET(ng_eiface_unit) +#define V_ng_eiface_unit VNET(ng_eiface_unit) #ifdef VIMAGE static vnet_modinfo_t vnet_ng_eiface_modinfo = { diff --git a/sys/netgraph/ng_iface.c b/sys/netgraph/ng_iface.c index 7743b2b..6ed1daf6 100644 --- a/sys/netgraph/ng_iface.c +++ b/sys/netgraph/ng_iface.c @@ -213,7 +213,7 @@ static vnet_attach_fn ng_iface_iattach; static vnet_detach_fn ng_iface_idetach; static VNET_DEFINE(struct unrhdr *, ng_iface_unit); -#define V_ng_iface_unit VNET_GET(ng_iface_unit) +#define V_ng_iface_unit VNET(ng_iface_unit) #ifdef VIMAGE static vnet_modinfo_t vnet_ng_iface_modinfo = { diff --git a/sys/netinet/icmp6.h b/sys/netinet/icmp6.h index 32e3e9f..7dc22e5 100644 --- a/sys/netinet/icmp6.h +++ b/sys/netinet/icmp6.h @@ -719,8 +719,8 @@ do { \ VNET_DECLARE(int, icmp6_rediraccept); /* accept/process redirects */ VNET_DECLARE(int, icmp6_redirtimeout); /* cache time for redirect routes */ -#define V_icmp6_rediraccept VNET_GET(icmp6_rediraccept) -#define V_icmp6_redirtimeout VNET_GET(icmp6_redirtimeout) +#define V_icmp6_rediraccept VNET(icmp6_rediraccept) +#define V_icmp6_redirtimeout VNET(icmp6_redirtimeout) #define ICMP6_NODEINFO_FQDNOK 0x1 #define ICMP6_NODEINFO_NODEADDROK 0x2 diff --git a/sys/netinet/icmp_var.h b/sys/netinet/icmp_var.h index 8be07b8..4d70ada 100644 --- a/sys/netinet/icmp_var.h +++ b/sys/netinet/icmp_var.h @@ -81,7 +81,7 @@ struct icmpstat { SYSCTL_DECL(_net_inet_icmp); VNET_DECLARE(struct icmpstat, icmpstat); /* icmp statistics. */ -#define V_icmpstat VNET_GET(icmpstat) +#define V_icmpstat VNET(icmpstat) extern int badport_bandlim(int); #define BANDLIM_UNLIMITED -1 diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c index bf5f124..6b6b5e6 100644 --- a/sys/netinet/if_ether.c +++ b/sys/netinet/if_ether.c @@ -89,10 +89,10 @@ static VNET_DEFINE(int, useloopback) = 1; /* use loopback interface for * local traffic */ static VNET_DEFINE(int, arp_proxyall); -#define V_arpt_keep VNET_GET(arpt_keep) -#define V_arp_maxtries VNET_GET(arp_maxtries) -#define V_useloopback VNET_GET(useloopback) -#define V_arp_proxyall VNET_GET(arp_proxyall) +#define V_arpt_keep VNET(arpt_keep) +#define V_arp_maxtries VNET(arp_maxtries) +#define V_useloopback VNET(useloopback) +#define V_arp_proxyall VNET(arp_proxyall) SYSCTL_VNET_INT(_net_link_ether_inet, OID_AUTO, max_age, CTLFLAG_RW, &VNET_NAME(arpt_keep), 0, diff --git a/sys/netinet/igmp.c b/sys/netinet/igmp.c index c8bd09a..37cc1b3 100644 --- a/sys/netinet/igmp.c +++ b/sys/netinet/igmp.c @@ -219,17 +219,17 @@ static VNET_DEFINE(int, current_state_timers_running); /* IGMPv1/v2 host * report; IGMPv3 g/sg * query response */ -#define V_interface_timers_running VNET_GET(interface_timers_running) -#define V_state_change_timers_running VNET_GET(state_change_timers_running) -#define V_current_state_timers_running VNET_GET(current_state_timers_running) +#define V_interface_timers_running VNET(interface_timers_running) +#define V_state_change_timers_running VNET(state_change_timers_running) +#define V_current_state_timers_running VNET(current_state_timers_running) static VNET_DEFINE(LIST_HEAD(, igmp_ifinfo), igi_head); static VNET_DEFINE(struct igmpstat, igmpstat); static VNET_DEFINE(struct timeval, igmp_gsrdelay) = {10, 0}; -#define V_igi_head VNET_GET(igi_head) -#define V_igmpstat VNET_GET(igmpstat) -#define V_igmp_gsrdelay VNET_GET(igmp_gsrdelay) +#define V_igi_head VNET(igi_head) +#define V_igmpstat VNET(igmpstat) +#define V_igmp_gsrdelay VNET(igmp_gsrdelay) static VNET_DEFINE(int, igmp_recvifkludge) = 1; static VNET_DEFINE(int, igmp_sendra) = 1; @@ -239,13 +239,13 @@ static VNET_DEFINE(int, igmp_v2enable) = 1; static VNET_DEFINE(int, igmp_legacysupp); static VNET_DEFINE(int, igmp_default_version) = IGMP_VERSION_3; -#define V_igmp_recvifkludge VNET_GET(igmp_recvifkludge) -#define V_igmp_sendra VNET_GET(igmp_sendra) -#define V_igmp_sendlocal VNET_GET(igmp_sendlocal) -#define V_igmp_v1enable VNET_GET(igmp_v1enable) -#define V_igmp_v2enable VNET_GET(igmp_v2enable) -#define V_igmp_legacysupp VNET_GET(igmp_legacysupp) -#define V_igmp_default_version VNET_GET(igmp_default_version) +#define V_igmp_recvifkludge VNET(igmp_recvifkludge) +#define V_igmp_sendra VNET(igmp_sendra) +#define V_igmp_sendlocal VNET(igmp_sendlocal) +#define V_igmp_v1enable VNET(igmp_v1enable) +#define V_igmp_v2enable VNET(igmp_v2enable) +#define V_igmp_legacysupp VNET(igmp_legacysupp) +#define V_igmp_default_version VNET(igmp_default_version) /* * Virtualized sysctls. diff --git a/sys/netinet/in.c b/sys/netinet/in.c index 8b7eab6..a606562 100644 --- a/sys/netinet/in.c +++ b/sys/netinet/in.c @@ -79,9 +79,9 @@ static VNET_DEFINE(int, subnetsarelocal); static VNET_DEFINE(int, sameprefixcarponly); VNET_DECLARE(struct inpcbinfo, ripcbinfo); -#define V_subnetsarelocal VNET_GET(subnetsarelocal) -#define V_sameprefixcarponly VNET_GET(sameprefixcarponly) -#define V_ripcbinfo VNET_GET(ripcbinfo) +#define V_subnetsarelocal VNET(subnetsarelocal) +#define V_sameprefixcarponly VNET(sameprefixcarponly) +#define V_ripcbinfo VNET(ripcbinfo) SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, subnets_are_local, CTLFLAG_RW, &VNET_NAME(subnetsarelocal), 0, diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index 58bf77a..94906ad 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -110,7 +110,7 @@ VNET_DEFINE(int, ipport_stoprandom); /* toggled by ipport_tick */ VNET_DEFINE(int, ipport_tcpallocs); static VNET_DEFINE(int, ipport_tcplastcount); -#define V_ipport_tcplastcount VNET_GET(ipport_tcplastcount) +#define V_ipport_tcplastcount VNET(ipport_tcplastcount) #define RANGECHK(var, min, max) \ if ((var) < (min)) { (var) = (min); } \ diff --git a/sys/netinet/in_pcb.h b/sys/netinet/in_pcb.h index d8ac3bf..9d5bbe7 100644 --- a/sys/netinet/in_pcb.h +++ b/sys/netinet/in_pcb.h @@ -465,19 +465,19 @@ VNET_DECLARE(int, ipport_randomtime); VNET_DECLARE(int, ipport_stoprandom); VNET_DECLARE(int, ipport_tcpallocs); -#define V_ipport_reservedhigh VNET_GET(ipport_reservedhigh) -#define V_ipport_reservedlow VNET_GET(ipport_reservedlow) -#define V_ipport_lowfirstauto VNET_GET(ipport_lowfirstauto) -#define V_ipport_lowlastauto VNET_GET(ipport_lowlastauto) -#define V_ipport_firstauto VNET_GET(ipport_firstauto) -#define V_ipport_lastauto VNET_GET(ipport_lastauto) -#define V_ipport_hifirstauto VNET_GET(ipport_hifirstauto) -#define V_ipport_hilastauto VNET_GET(ipport_hilastauto) -#define V_ipport_randomized VNET_GET(ipport_randomized) -#define V_ipport_randomcps VNET_GET(ipport_randomcps) -#define V_ipport_randomtime VNET_GET(ipport_randomtime) -#define V_ipport_stoprandom VNET_GET(ipport_stoprandom) -#define V_ipport_tcpallocs VNET_GET(ipport_tcpallocs) +#define V_ipport_reservedhigh VNET(ipport_reservedhigh) +#define V_ipport_reservedlow VNET(ipport_reservedlow) +#define V_ipport_lowfirstauto VNET(ipport_lowfirstauto) +#define V_ipport_lowlastauto VNET(ipport_lowlastauto) +#define V_ipport_firstauto VNET(ipport_firstauto) +#define V_ipport_lastauto VNET(ipport_lastauto) +#define V_ipport_hifirstauto VNET(ipport_hifirstauto) +#define V_ipport_hilastauto VNET(ipport_hilastauto) +#define V_ipport_randomized VNET(ipport_randomized) +#define V_ipport_randomcps VNET(ipport_randomcps) +#define V_ipport_randomtime VNET(ipport_randomtime) +#define V_ipport_stoprandom VNET(ipport_stoprandom) +#define V_ipport_tcpallocs VNET(ipport_tcpallocs) extern struct callout ipport_tick_callout; diff --git a/sys/netinet/in_rmx.c b/sys/netinet/in_rmx.c index d391871..2ef4ed6 100644 --- a/sys/netinet/in_rmx.c +++ b/sys/netinet/in_rmx.c @@ -135,9 +135,9 @@ static VNET_DEFINE(int, rtq_reallyold); static VNET_DEFINE(int, rtq_minreallyold); static VNET_DEFINE(int, rtq_toomany); -#define V_rtq_reallyold VNET_GET(rtq_reallyold) -#define V_rtq_minreallyold VNET_GET(rtq_minreallyold) -#define V_rtq_toomany VNET_GET(rtq_toomany) +#define V_rtq_reallyold VNET(rtq_reallyold) +#define V_rtq_minreallyold VNET(rtq_minreallyold) +#define V_rtq_toomany VNET(rtq_toomany) SYSCTL_VNET_INT(_net_inet_ip, IPCTL_RTEXPIRE, rtexpire, CTLFLAG_RW, &VNET_NAME(rtq_reallyold), 0, @@ -242,8 +242,8 @@ in_rtqkill(struct radix_node *rn, void *rock) static VNET_DEFINE(int, rtq_timeout); static VNET_DEFINE(struct callout, rtq_timer); -#define V_rtq_timeout VNET_GET(rtq_timeout) -#define V_rtq_timer VNET_GET(rtq_timer) +#define V_rtq_timeout VNET(rtq_timeout) +#define V_rtq_timer VNET(rtq_timer) static void in_rtqtimo_one(void *rock); diff --git a/sys/netinet/in_var.h b/sys/netinet/in_var.h index 9a7cfb5..cd1d904 100644 --- a/sys/netinet/in_var.h +++ b/sys/netinet/in_var.h @@ -107,9 +107,9 @@ VNET_DECLARE(struct in_ifaddrhashhead *, in_ifaddrhashtbl); VNET_DECLARE(struct in_ifaddrhead, in_ifaddrhead); VNET_DECLARE(u_long, in_ifaddrhmask); /* mask for hash table */ -#define V_in_ifaddrhashtbl VNET_GET(in_ifaddrhashtbl) -#define V_in_ifaddrhead VNET_GET(in_ifaddrhead) -#define V_in_ifaddrhmask VNET_GET(in_ifaddrhmask) +#define V_in_ifaddrhashtbl VNET(in_ifaddrhashtbl) +#define V_in_ifaddrhead VNET(in_ifaddrhead) +#define V_in_ifaddrhmask VNET(in_ifaddrhmask) #define INADDR_NHASH_LOG2 9 #define INADDR_NHASH (1 << INADDR_NHASH_LOG2) diff --git a/sys/netinet/ip_divert.c b/sys/netinet/ip_divert.c index 86ec9fc..6abf76f 100644 --- a/sys/netinet/ip_divert.c +++ b/sys/netinet/ip_divert.c @@ -119,8 +119,8 @@ __FBSDID("$FreeBSD$"); static VNET_DEFINE(struct inpcbhead, divcb); static VNET_DEFINE(struct inpcbinfo, divcbinfo); -#define V_divcb VNET_GET(divcb) -#define V_divcbinfo VNET_GET(divcbinfo) +#define V_divcb VNET(divcb) +#define V_divcbinfo VNET(divcbinfo) static u_long div_sendspace = DIVSNDQ; /* XXX sysctl ? */ static u_long div_recvspace = DIVRCVQ; /* XXX sysctl ? */ diff --git a/sys/netinet/ip_fastfwd.c b/sys/netinet/ip_fastfwd.c index 2207cc4..1c83706 100644 --- a/sys/netinet/ip_fastfwd.c +++ b/sys/netinet/ip_fastfwd.c @@ -107,7 +107,7 @@ __FBSDID("$FreeBSD$"); #include <machine/in_cksum.h> static VNET_DEFINE(int, ipfastforward_active); -#define V_ipfastforward_active VNET_GET(ipfastforward_active) +#define V_ipfastforward_active VNET(ipfastforward_active) SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, fastforwarding, CTLFLAG_RW, &VNET_NAME(ipfastforward_active), 0, "Enable fast IP forwarding"); diff --git a/sys/netinet/ip_fw.h b/sys/netinet/ip_fw.h index 609ac4c..18920a0 100644 --- a/sys/netinet/ip_fw.h +++ b/sys/netinet/ip_fw.h @@ -653,12 +653,12 @@ void ipfw_nat_destroy(void); VNET_DECLARE(int, fw_one_pass); VNET_DECLARE(int, fw_enable); -#define V_fw_one_pass VNET_GET(fw_one_pass) -#define V_fw_enable VNET_GET(fw_enable) +#define V_fw_one_pass VNET(fw_one_pass) +#define V_fw_enable VNET(fw_enable) #ifdef INET6 VNET_DECLARE(int, fw6_enable); -#define V_fw6_enable VNET_GET(fw6_enable) +#define V_fw6_enable VNET(fw6_enable) #endif struct ip_fw_chain { @@ -695,7 +695,7 @@ typedef int ipfw_nat_cfg_t(struct sockopt *); #endif VNET_DECLARE(struct ip_fw_chain, layer3_chain); -#define V_layer3_chain VNET_GET(layer3_chain) +#define V_layer3_chain VNET(layer3_chain) #endif /* _KERNEL */ #endif /* _IPFW2_H */ diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c index 475f297..57a1292 100644 --- a/sys/netinet/ip_icmp.c +++ b/sys/netinet/ip_icmp.c @@ -89,16 +89,16 @@ static VNET_DEFINE(int, icmp_rfi); static VNET_DEFINE(int, icmp_quotelen); static VNET_DEFINE(int, icmpbmcastecho); -#define V_icmpmaskrepl VNET_GET(icmpmaskrepl) -#define V_icmpmaskfake VNET_GET(icmpmaskfake) -#define V_drop_redirect VNET_GET(drop_redirect) -#define V_log_redirect VNET_GET(log_redirect) -#define V_icmplim VNET_GET(icmplim) -#define V_icmplim_output VNET_GET(icmplim_output) -#define V_reply_src VNET_GET(reply_src) -#define V_icmp_rfi VNET_GET(icmp_rfi) -#define V_icmp_quotelen VNET_GET(icmp_quotelen) -#define V_icmpbmcastecho VNET_GET(icmpbmcastecho) +#define V_icmpmaskrepl VNET(icmpmaskrepl) +#define V_icmpmaskfake VNET(icmpmaskfake) +#define V_drop_redirect VNET(drop_redirect) +#define V_log_redirect VNET(log_redirect) +#define V_icmplim VNET(icmplim) +#define V_icmplim_output VNET(icmplim_output) +#define V_reply_src VNET(reply_src) +#define V_icmp_rfi VNET(icmp_rfi) +#define V_icmp_quotelen VNET(icmp_quotelen) +#define V_icmpbmcastecho VNET(icmpbmcastecho) SYSCTL_VNET_STRUCT(_net_inet_icmp, ICMPCTL_STATS, stats, CTLFLAG_RW, &VNET_NAME(icmpstat), icmpstat, ""); diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index 11ab3c7..8e84707 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -95,10 +95,10 @@ static VNET_DEFINE(int, ip_checkinterface); static VNET_DEFINE(int, ip_keepfaith); static VNET_DEFINE(int, ip_sendsourcequench); -#define V_ipsendredirects VNET_GET(ipsendredirects) -#define V_ip_checkinterface VNET_GET(ip_checkinterface) -#define V_ip_keepfaith VNET_GET(ip_keepfaith) -#define V_ip_sendsourcequench VNET_GET(ip_sendsourcequench) +#define V_ipsendredirects VNET(ipsendredirects) +#define V_ip_checkinterface VNET(ip_checkinterface) +#define V_ip_keepfaith VNET(ip_keepfaith) +#define V_ip_sendsourcequench VNET(ip_sendsourcequench) VNET_DEFINE(int, ip_defttl) = IPDEFTTL; VNET_DEFINE(int, ip_do_randomid); @@ -113,17 +113,17 @@ static VNET_DEFINE(int, ip_rsvp_on); VNET_DEFINE(struct socket *, ip_rsvpd); VNET_DEFINE(int, rsvp_on); -#define V_ip_rsvp_on VNET_GET(ip_rsvp_on) +#define V_ip_rsvp_on VNET(ip_rsvp_on) static VNET_DEFINE(TAILQ_HEAD(ipqhead, ipq), ipq[IPREASS_NHASH]); static VNET_DEFINE(int, maxnipq); /* Administrative limit on # reass queues. */ static VNET_DEFINE(int, maxfragsperpacket); static VNET_DEFINE(int, nipq); /* Total # of reass queues */ -#define V_ipq VNET_GET(ipq) -#define V_maxnipq VNET_GET(maxnipq) -#define V_maxfragsperpacket VNET_GET(maxfragsperpacket) -#define V_nipq VNET_GET(nipq) +#define V_ipq VNET(ipq) +#define V_maxnipq VNET(maxnipq) +#define V_maxfragsperpacket VNET(maxfragsperpacket) +#define V_nipq VNET(nipq) VNET_DEFINE(int, ipstealth); @@ -189,7 +189,7 @@ SYSCTL_VNET_STRUCT(_net_inet_ip, IPCTL_STATS, stats, CTLFLAG_RW, "IP statistics (struct ipstat, netinet/ip_var.h)"); static VNET_DEFINE(uma_zone_t, ipq_zone); -#define V_ipq_zone VNET_GET(ipq_zone) +#define V_ipq_zone VNET(ipq_zone) static struct mtx ipqlock; @@ -225,7 +225,7 @@ SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, stealth, CTLFLAG_RW, #ifdef FLOWTABLE static VNET_DEFINE(int, ip_output_flowtable_size) = 2048; VNET_DEFINE(struct flowtable *, ip_ft); -#define V_ip_output_flowtable_size VNET_GET(ip_output_flowtable_size) +#define V_ip_output_flowtable_size VNET(ip_output_flowtable_size) SYSCTL_VNET_INT(_net_inet_ip, OID_AUTO, output_flowtable_size, CTLFLAG_RDTUN, &VNET_NAME(ip_output_flowtable_size), 2048, diff --git a/sys/netinet/ip_ipsec.c b/sys/netinet/ip_ipsec.c index da34d77..f0d4a5f 100644 --- a/sys/netinet/ip_ipsec.c +++ b/sys/netinet/ip_ipsec.c @@ -77,7 +77,7 @@ static VNET_DEFINE(int, ip4_ipsec_filtertunnel) = 1; #else static VNET_DEFINE(int, ip4_ipsec_filtertunnel) = 0; #endif -#define V_ip4_ipsec_filtertunnel VNET_GET(ip4_ipsec_filtertunnel) +#define V_ip4_ipsec_filtertunnel VNET(ip4_ipsec_filtertunnel) SYSCTL_DECL(_net_inet_ipsec); SYSCTL_VNET_INT(_net_inet_ipsec, OID_AUTO, filtertunnel, diff --git a/sys/netinet/ip_var.h b/sys/netinet/ip_var.h index 0db34d2..74aecb1 100644 --- a/sys/netinet/ip_var.h +++ b/sys/netinet/ip_var.h @@ -171,16 +171,16 @@ VNET_DECLARE(int, rsvp_on); VNET_DECLARE(struct socket *, ip_rsvpd); /* reservation protocol daemon*/ VNET_DECLARE(struct socket *, ip_mrouter); /* multicast routing daemon */ -#define V_ipstat VNET_GET(ipstat) -#define V_ip_id VNET_GET(ip_id) -#define V_ip_defttl VNET_GET(ip_defttl) -#define V_ipforwarding VNET_GET(ipforwarding) +#define V_ipstat VNET(ipstat) +#define V_ip_id VNET(ip_id) +#define V_ip_defttl VNET(ip_defttl) +#define V_ipforwarding VNET(ipforwarding) #ifdef IPSTEALTH -#define V_ipstealth VNET_GET(ipstealth) +#define V_ipstealth VNET(ipstealth) #endif -#define V_rsvp_on VNET_GET(rsvp_on) -#define V_ip_rsvpd VNET_GET(ip_rsvpd) -#define V_ip_mrouter VNET_GET(ip_mrouter) +#define V_rsvp_on VNET(rsvp_on) +#define V_ip_rsvpd VNET(ip_rsvpd) +#define V_ip_mrouter VNET(ip_mrouter) extern u_char ip_protox[]; extern int (*legal_vif_num)(int); @@ -243,7 +243,7 @@ extern int (*ip_dn_io_ptr)(struct mbuf **m, int dir, struct ip_fw_args *fwa); extern void (*ip_dn_ruledel_ptr)(void *); /* in ip_fw2.c */ VNET_DECLARE(int, ip_do_randomid); -#define V_ip_do_randomid VNET_GET(ip_do_randomid) +#define V_ip_do_randomid VNET(ip_do_randomid) #define ip_newid() ((V_ip_do_randomid != 0) ? ip_randomid() : \ htons(V_ip_id++)) diff --git a/sys/netinet/ipfw/ip_fw2.c b/sys/netinet/ipfw/ip_fw2.c index 95efc2b..b1e8480 100644 --- a/sys/netinet/ipfw/ip_fw2.c +++ b/sys/netinet/ipfw/ip_fw2.c @@ -116,10 +116,10 @@ static VNET_DEFINE(int, fw_verbose); static VNET_DEFINE(struct callout, ipfw_timeout); static VNET_DEFINE(int, verbose_limit); -#define V_set_disable VNET_GET(set_disable) -#define V_fw_verbose VNET_GET(fw_verbose) -#define V_ipfw_timeout VNET_GET(ipfw_timeout) -#define V_verbose_limit VNET_GET(verbose_limit) +#define V_set_disable VNET(set_disable) +#define V_fw_verbose VNET(fw_verbose) +#define V_ipfw_timeout VNET(ipfw_timeout) +#define V_verbose_limit VNET(verbose_limit) #ifdef IPFIREWALL_DEFAULT_TO_ACCEPT static int default_to_accept = 1; @@ -151,7 +151,7 @@ struct table_entry { }; static VNET_DEFINE(int, autoinc_step); -#define V_autoinc_step VNET_GET(autoinc_step) +#define V_autoinc_step VNET(autoinc_step) extern int ipfw_chg_hook(SYSCTL_HANDLER_ARGS); @@ -220,9 +220,9 @@ static VNET_DEFINE(ipfw_dyn_rule **, ipfw_dyn_v); static VNET_DEFINE(u_int32_t, dyn_buckets); static VNET_DEFINE(u_int32_t, curr_dyn_buckets); -#define V_ipfw_dyn_v VNET_GET(ipfw_dyn_v) -#define V_dyn_buckets VNET_GET(dyn_buckets) -#define V_curr_dyn_buckets VNET_GET(curr_dyn_buckets) +#define V_ipfw_dyn_v VNET(ipfw_dyn_v) +#define V_dyn_buckets VNET(dyn_buckets) +#define V_curr_dyn_buckets VNET(curr_dyn_buckets) static struct mtx ipfw_dyn_mtx; /* mutex guarding dynamic rules */ #define IPFW_DYN_LOCK_INIT() \ @@ -242,12 +242,12 @@ static VNET_DEFINE(u_int32_t, dyn_rst_lifetime); static VNET_DEFINE(u_int32_t, dyn_udp_lifetime); static VNET_DEFINE(u_int32_t, dyn_short_lifetime); -#define V_dyn_ack_lifetime VNET_GET(dyn_ack_lifetime) -#define V_dyn_syn_lifetime VNET_GET(dyn_syn_lifetime) -#define V_dyn_fin_lifetime VNET_GET(dyn_fin_lifetime) -#define V_dyn_rst_lifetime VNET_GET(dyn_rst_lifetime) -#define V_dyn_udp_lifetime VNET_GET(dyn_udp_lifetime) -#define V_dyn_short_lifetime VNET_GET(dyn_short_lifetime) +#define V_dyn_ack_lifetime VNET(dyn_ack_lifetime) +#define V_dyn_syn_lifetime VNET(dyn_syn_lifetime) +#define V_dyn_fin_lifetime VNET(dyn_fin_lifetime) +#define V_dyn_rst_lifetime VNET(dyn_rst_lifetime) +#define V_dyn_udp_lifetime VNET(dyn_udp_lifetime) +#define V_dyn_short_lifetime VNET(dyn_short_lifetime) /* * Keepalives are sent if dyn_keepalive is set. They are sent every @@ -261,19 +261,19 @@ static VNET_DEFINE(u_int32_t, dyn_keepalive_interval); static VNET_DEFINE(u_int32_t, dyn_keepalive_period); static VNET_DEFINE(u_int32_t, dyn_keepalive); -#define V_dyn_keepalive_interval VNET_GET(dyn_keepalive_interval) -#define V_dyn_keepalive_period VNET_GET(dyn_keepalive_period) -#define V_dyn_keepalive VNET_GET(dyn_keepalive) +#define V_dyn_keepalive_interval VNET(dyn_keepalive_interval) +#define V_dyn_keepalive_period VNET(dyn_keepalive_period) +#define V_dyn_keepalive VNET(dyn_keepalive) static VNET_DEFINE(u_int32_t, static_count); /* # of static rules */ static VNET_DEFINE(u_int32_t, static_len); /* bytes of static rules */ static VNET_DEFINE(u_int32_t, dyn_count); /* # of dynamic rules */ static VNET_DEFINE(u_int32_t, dyn_max); /* max # of dynamic rules */ -#define V_static_count VNET_GET(static_count) -#define V_static_len VNET_GET(static_len) -#define V_dyn_count VNET_GET(dyn_count) -#define V_dyn_max VNET_GET(dyn_max) +#define V_static_count VNET(static_count) +#define V_static_len VNET(static_len) +#define V_dyn_count VNET(dyn_count) +#define V_dyn_max VNET(dyn_max) #ifdef SYSCTL_NODE SYSCTL_VNET_INT(_net_inet_ip_fw, OID_AUTO, dyn_buckets, @@ -323,7 +323,7 @@ static struct sysctl_oid *ip6_fw_sysctl_tree; #endif /* INET6 */ static VNET_DEFINE(int, fw_deny_unknown_exthdrs); -#define V_fw_deny_unknown_exthdrs VNET_GET(fw_deny_unknown_exthdrs) +#define V_fw_deny_unknown_exthdrs VNET(fw_deny_unknown_exthdrs) /* * L3HDR maps an ipv4 pointer into a layer3 header pointer of type T @@ -780,7 +780,7 @@ send_reject6(struct ip_fw_args *args, int code, u_int hlen, struct ip6_hdr *ip6) /* counter for ipfw_log(NULL...) */ static VNET_DEFINE(u_int64_t, norule_counter); -#define V_norule_counter VNET_GET(norule_counter) +#define V_norule_counter VNET(norule_counter) #define SNPARGS(buf, len) buf + len, sizeof(buf) > len ? sizeof(buf) - len : 0 #define SNP(buf) buf, sizeof(buf) diff --git a/sys/netinet/ipfw/ip_fw_nat.c b/sys/netinet/ipfw/ip_fw_nat.c index 9ba2f5f..ac7cc44 100644 --- a/sys/netinet/ipfw/ip_fw_nat.c +++ b/sys/netinet/ipfw/ip_fw_nat.c @@ -70,7 +70,7 @@ __FBSDID("$FreeBSD$"); MALLOC_DECLARE(M_IPFW); static VNET_DEFINE(eventhandler_tag, ifaddr_event_tag); -#define V_ifaddr_event_tag VNET_GET(ifaddr_event_tag) +#define V_ifaddr_event_tag VNET(ifaddr_event_tag) extern ipfw_nat_t *ipfw_nat_ptr; extern ipfw_nat_cfg_t *ipfw_nat_cfg_ptr; diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c index c3a0a74..517ac8e 100644 --- a/sys/netinet/raw_ip.c +++ b/sys/netinet/raw_ip.c @@ -77,8 +77,8 @@ __FBSDID("$FreeBSD$"); VNET_DEFINE(struct inpcbhead, ripcb); VNET_DEFINE(struct inpcbinfo, ripcbinfo); -#define V_ripcb VNET_GET(ripcb) -#define V_ripcbinfo VNET_GET(ripcbinfo) +#define V_ripcb VNET(ripcb) +#define V_ripcbinfo VNET(ripcbinfo) /* * Control and data hooks for ipfw and dummynet. diff --git a/sys/netinet/tcp_hostcache.c b/sys/netinet/tcp_hostcache.c index e7bf0d1..2d3d922 100644 --- a/sys/netinet/tcp_hostcache.c +++ b/sys/netinet/tcp_hostcache.c @@ -109,8 +109,8 @@ __FBSDID("$FreeBSD$"); static VNET_DEFINE(struct tcp_hostcache, tcp_hostcache); static VNET_DEFINE(struct callout, tcp_hc_callout); -#define V_tcp_hostcache VNET_GET(tcp_hostcache) -#define V_tcp_hc_callout VNET_GET(tcp_hc_callout) +#define V_tcp_hostcache VNET(tcp_hostcache) +#define V_tcp_hc_callout VNET(tcp_hc_callout) static struct hc_metrics *tcp_hc_lookup(struct in_conninfo *); static struct hc_metrics *tcp_hc_insert(struct in_conninfo *); diff --git a/sys/netinet/tcp_reass.c b/sys/netinet/tcp_reass.c index 88ef391..fa844b6 100644 --- a/sys/netinet/tcp_reass.c +++ b/sys/netinet/tcp_reass.c @@ -79,9 +79,9 @@ VNET_DEFINE(int, tcp_reass_qsize); static VNET_DEFINE(int, tcp_reass_maxqlen); static VNET_DEFINE(int, tcp_reass_overflows); -#define V_tcp_reass_maxseg VNET_GET(tcp_reass_maxseg) -#define V_tcp_reass_maxqlen VNET_GET(tcp_reass_maxqlen) -#define V_tcp_reass_overflows VNET_GET(tcp_reass_overflows) +#define V_tcp_reass_maxseg VNET(tcp_reass_maxseg) +#define V_tcp_reass_maxqlen VNET(tcp_reass_maxqlen) +#define V_tcp_reass_overflows VNET(tcp_reass_overflows) SYSCTL_NODE(_net_inet_tcp, OID_AUTO, reass, CTLFLAG_RW, 0, "TCP Segment Reassembly Queue"); diff --git a/sys/netinet/tcp_sack.c b/sys/netinet/tcp_sack.c index defc9eb..985eee8 100644 --- a/sys/netinet/tcp_sack.c +++ b/sys/netinet/tcp_sack.c @@ -128,11 +128,11 @@ VNET_DEFINE(int, tcp_sack_maxholes); VNET_DEFINE(int, tcp_sack_globalmaxholes); VNET_DEFINE(int, tcp_sack_globalholes); -#define V_sack_hole_zone VNET_GET(sack_hole_zone) -#define V_tcp_do_sack VNET_GET(tcp_do_sack) -#define V_tcp_sack_maxholes VNET_GET(tcp_sack_maxholes) -#define V_tcp_sack_globalmaxholes VNET_GET(tcp_sack_globalmaxholes) -#define V_tcp_sack_globalholes VNET_GET(tcp_sack_globalholes) +#define V_sack_hole_zone VNET(sack_hole_zone) +#define V_tcp_do_sack VNET(tcp_do_sack) +#define V_tcp_sack_maxholes VNET(tcp_sack_maxholes) +#define V_tcp_sack_globalmaxholes VNET(tcp_sack_globalmaxholes) +#define V_tcp_sack_globalholes VNET(tcp_sack_globalholes) SYSCTL_NODE(_net_inet_tcp, OID_AUTO, sack, CTLFLAG_RW, 0, "TCP SACK"); SYSCTL_VNET_INT(_net_inet_tcp_sack, OID_AUTO, enable, CTLFLAG_RW, diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 7839cfa..df61a00 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -126,13 +126,13 @@ static VNET_DEFINE(int, tcp_inflight_min); static VNET_DEFINE(int, tcp_inflight_max); static VNET_DEFINE(int, tcp_inflight_stab); -#define V_icmp_may_rst VNET_GET(icmp_may_rst) -#define V_tcp_isn_reseed_interval VNET_GET(tcp_isn_reseed_interval) -#define V_tcp_inflight_enable VNET_GET(tcp_inflight_enable) -#define V_tcp_inflight_rttthresh VNET_GET(tcp_inflight_rttthresh) -#define V_tcp_inflight_min VNET_GET(tcp_inflight_min) -#define V_tcp_inflight_max VNET_GET(tcp_inflight_max) -#define V_tcp_inflight_stab VNET_GET(tcp_inflight_stab) +#define V_icmp_may_rst VNET(icmp_may_rst) +#define V_tcp_isn_reseed_interval VNET(tcp_isn_reseed_interval) +#define V_tcp_inflight_enable VNET(tcp_inflight_enable) +#define V_tcp_inflight_rttthresh VNET(tcp_inflight_rttthresh) +#define V_tcp_inflight_min VNET(tcp_inflight_min) +#define V_tcp_inflight_max VNET(tcp_inflight_max) +#define V_tcp_inflight_stab VNET(tcp_inflight_stab) static int sysctl_net_inet_tcp_mss_check(SYSCTL_HANDLER_ARGS) @@ -252,7 +252,7 @@ SYSCTL_VNET_INT(_net_inet_tcp_inflight, OID_AUTO, stab, CTLFLAG_RW, "Inflight Algorithm Stabilization 20 = 2 packets"); VNET_DEFINE(uma_zone_t, sack_hole_zone); -#define V_sack_hole_zone VNET_GET(sack_hole_zone) +#define V_sack_hole_zone VNET(sack_hole_zone) static struct inpcb *tcp_notify(struct inpcb *, int); static void tcp_isn_tick(void *); @@ -279,7 +279,7 @@ struct tcpcb_mem { }; static VNET_DEFINE(uma_zone_t, tcpcb_zone); -#define V_tcpcb_zone VNET_GET(tcpcb_zone) +#define V_tcpcb_zone VNET(tcpcb_zone) MALLOC_DEFINE(M_TCPLOG, "tcplog", "TCP address and flags print buffers"); struct callout isn_callout; @@ -1514,10 +1514,10 @@ static VNET_DEFINE(int, isn_last_reseed); static VNET_DEFINE(u_int32_t, isn_offset); static VNET_DEFINE(u_int32_t, isn_offset_old); -#define V_isn_secret VNET_GET(isn_secret) -#define V_isn_last_reseed VNET_GET(isn_last_reseed) -#define V_isn_offset VNET_GET(isn_offset) -#define V_isn_offset_old VNET_GET(isn_offset_old) +#define V_isn_secret VNET(isn_secret) +#define V_isn_last_reseed VNET(isn_last_reseed) +#define V_isn_offset VNET(isn_offset) +#define V_isn_offset_old VNET(isn_offset_old) tcp_seq tcp_new_isn(struct tcpcb *tp) diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c index 9a7ce79..65c1d51 100644 --- a/sys/netinet/tcp_syncache.c +++ b/sys/netinet/tcp_syncache.c @@ -103,9 +103,9 @@ static VNET_DEFINE(int, tcp_syncookies); static VNET_DEFINE(int, tcp_syncookiesonly); VNET_DEFINE(int, tcp_sc_rst_sock_fail); -#define V_tcp_syncache VNET_GET(tcp_syncache) -#define V_tcp_syncookies VNET_GET(tcp_syncookies) -#define V_tcp_syncookiesonly VNET_GET(tcp_syncookiesonly) +#define V_tcp_syncache VNET(tcp_syncache) +#define V_tcp_syncookies VNET(tcp_syncookies) +#define V_tcp_syncookiesonly VNET(tcp_syncookiesonly) SYSCTL_VNET_INT(_net_inet_tcp, OID_AUTO, syncookies, CTLFLAG_RW, &VNET_NAME(tcp_syncookies), 0, diff --git a/sys/netinet/tcp_timewait.c b/sys/netinet/tcp_timewait.c index 1ac14ec..a6ac5c6 100644 --- a/sys/netinet/tcp_timewait.c +++ b/sys/netinet/tcp_timewait.c @@ -104,8 +104,8 @@ static VNET_DEFINE(uma_zone_t, tcptw_zone); static VNET_DEFINE(TAILQ_HEAD(, tcptw), twq_2msl); VNET_DEFINE(int, nolocaltimewait); -#define V_tcptw_zone VNET_GET(tcptw_zone) -#define V_twq_2msl VNET_GET(twq_2msl) +#define V_tcptw_zone VNET(tcptw_zone) +#define V_twq_2msl VNET(twq_2msl) static void tcp_tw_2msl_reset(struct tcptw *, int); static void tcp_tw_2msl_stop(struct tcptw *); diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index 8c175f8..8845769 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -44,9 +44,9 @@ VNET_DECLARE(int, tcp_do_rfc1323); VNET_DECLARE(int, tcp_reass_qsize); VNET_DECLARE(struct uma_zone *, tcp_reass_zone); -#define V_tcp_do_rfc1323 VNET_GET(tcp_do_rfc1323) -#define V_tcp_reass_qsize VNET_GET(tcp_reass_qsize) -#define V_tcp_reass_zone VNET_GET(tcp_reass_zone) +#define V_tcp_do_rfc1323 VNET(tcp_do_rfc1323) +#define V_tcp_reass_qsize VNET(tcp_reass_qsize) +#define V_tcp_reass_zone VNET(tcp_reass_zone) #endif /* _KERNEL */ @@ -551,16 +551,16 @@ VNET_DECLARE(int, path_mtu_discovery); VNET_DECLARE(int, ss_fltsz); VNET_DECLARE(int, ss_fltsz_local); -#define V_tcb VNET_GET(tcb) -#define V_tcbinfo VNET_GET(tcbinfo) -#define V_tcpstat VNET_GET(tcpstat) -#define V_tcp_mssdflt VNET_GET(tcp_mssdflt) -#define V_tcp_minmss VNET_GET(tcp_minmss) -#define V_tcp_delack_enabled VNET_GET(tcp_delack_enabled) -#define V_tcp_do_newreno VNET_GET(tcp_do_newreno) -#define V_path_mtu_discovery VNET_GET(path_mtu_discovery) -#define V_ss_fltsz VNET_GET(ss_fltsz) -#define V_ss_fltsz_local VNET_GET(ss_fltsz_local) +#define V_tcb VNET(tcb) +#define V_tcbinfo VNET(tcbinfo) +#define V_tcpstat VNET(tcpstat) +#define V_tcp_mssdflt VNET(tcp_mssdflt) +#define V_tcp_minmss VNET(tcp_minmss) +#define V_tcp_delack_enabled VNET(tcp_delack_enabled) +#define V_tcp_do_newreno VNET(tcp_do_newreno) +#define V_path_mtu_discovery VNET(path_mtu_discovery) +#define V_ss_fltsz VNET(ss_fltsz) +#define V_ss_fltsz_local VNET(ss_fltsz_local) VNET_DECLARE(int, blackhole); VNET_DECLARE(int, drop_synfin); @@ -573,30 +573,30 @@ VNET_DECLARE(int, tcp_autorcvbuf_max); VNET_DECLARE(int, tcp_do_rfc3465); VNET_DECLARE(int, tcp_abc_l_var); -#define V_blackhole VNET_GET(blackhole) -#define V_drop_synfin VNET_GET(drop_synfin) -#define V_tcp_do_rfc3042 VNET_GET(tcp_do_rfc3042) -#define V_tcp_do_rfc3390 VNET_GET(tcp_do_rfc3390) -#define V_tcp_insecure_rst VNET_GET(tcp_insecure_rst) -#define V_tcp_do_autorcvbuf VNET_GET(tcp_do_autorcvbuf) -#define V_tcp_autorcvbuf_inc VNET_GET(tcp_autorcvbuf_inc) -#define V_tcp_autorcvbuf_max VNET_GET(tcp_autorcvbuf_max) -#define V_tcp_do_rfc3465 VNET_GET(tcp_do_rfc3465) -#define V_tcp_abc_l_var VNET_GET(tcp_abc_l_var) +#define V_blackhole VNET(blackhole) +#define V_drop_synfin VNET(drop_synfin) +#define V_tcp_do_rfc3042 VNET(tcp_do_rfc3042) +#define V_tcp_do_rfc3390 VNET(tcp_do_rfc3390) +#define V_tcp_insecure_rst VNET(tcp_insecure_rst) +#define V_tcp_do_autorcvbuf VNET(tcp_do_autorcvbuf) +#define V_tcp_autorcvbuf_inc VNET(tcp_autorcvbuf_inc) +#define V_tcp_autorcvbuf_max VNET(tcp_autorcvbuf_max) +#define V_tcp_do_rfc3465 VNET(tcp_do_rfc3465) +#define V_tcp_abc_l_var VNET(tcp_abc_l_var) VNET_DECLARE(int, tcp_do_tso); VNET_DECLARE(int, tcp_do_autosndbuf); VNET_DECLARE(int, tcp_autosndbuf_inc); VNET_DECLARE(int, tcp_autosndbuf_max); -#define V_tcp_do_tso VNET_GET(tcp_do_tso) -#define V_tcp_do_autosndbuf VNET_GET(tcp_do_autosndbuf) -#define V_tcp_autosndbuf_inc VNET_GET(tcp_autosndbuf_inc) -#define V_tcp_autosndbuf_max VNET_GET(tcp_autosndbuf_max) +#define V_tcp_do_tso VNET(tcp_do_tso) +#define V_tcp_do_autosndbuf VNET(tcp_do_autosndbuf) +#define V_tcp_autosndbuf_inc VNET(tcp_autosndbuf_inc) +#define V_tcp_autosndbuf_max VNET(tcp_autosndbuf_max) VNET_DECLARE(int, nolocaltimewait); -#define V_nolocaltimewait VNET_GET(nolocaltimewait) +#define V_nolocaltimewait VNET(nolocaltimewait) VNET_DECLARE(int, tcp_do_sack); /* SACK enabled/disabled */ VNET_DECLARE(int, tcp_sack_maxholes); @@ -606,13 +606,13 @@ VNET_DECLARE(int, tcp_sc_rst_sock_fail); /* RST on sock alloc failure */ VNET_DECLARE(int, tcp_do_ecn); /* TCP ECN enabled/disabled */ VNET_DECLARE(int, tcp_ecn_maxretries); -#define V_tcp_do_sack VNET_GET(tcp_do_sack) -#define V_tcp_sack_maxholes VNET_GET(tcp_sack_maxholes) -#define V_tcp_sack_globalmaxholes VNET_GET(tcp_sack_globalmaxholes) -#define V_tcp_sack_globalholes VNET_GET(tcp_sack_globalholes) -#define V_tcp_sc_rst_sock_fail VNET_GET(tcp_sc_rst_sock_fail) -#define V_tcp_do_ecn VNET_GET(tcp_do_ecn) -#define V_tcp_ecn_maxretries VNET_GET(tcp_ecn_maxretries) +#define V_tcp_do_sack VNET(tcp_do_sack) +#define V_tcp_sack_maxholes VNET(tcp_sack_maxholes) +#define V_tcp_sack_globalmaxholes VNET(tcp_sack_globalmaxholes) +#define V_tcp_sack_globalholes VNET(tcp_sack_globalholes) +#define V_tcp_sc_rst_sock_fail VNET(tcp_sc_rst_sock_fail) +#define V_tcp_do_ecn VNET(tcp_do_ecn) +#define V_tcp_ecn_maxretries VNET(tcp_ecn_maxretries) int tcp_addoptions(struct tcpopt *, u_char *); struct tcpcb * diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index f9623f3..54fb996 100644 --- a/sys/netinet/udp_usrreq.c +++ b/sys/netinet/udp_usrreq.c @@ -136,7 +136,7 @@ VNET_DEFINE(struct inpcbinfo, udbinfo); static VNET_DEFINE(uma_zone_t, udpcb_zone); VNET_DEFINE(struct udpstat, udpstat); /* from udp_var.h */ -#define V_udpcb_zone VNET_GET(udpcb_zone) +#define V_udpcb_zone VNET(udpcb_zone) #ifndef UDBHASHSIZE #define UDBHASHSIZE 128 diff --git a/sys/netinet/udp_var.h b/sys/netinet/udp_var.h index 417c597..8031670 100644 --- a/sys/netinet/udp_var.h +++ b/sys/netinet/udp_var.h @@ -124,10 +124,10 @@ VNET_DECLARE(struct inpcbinfo, udbinfo); VNET_DECLARE(struct udpstat, udpstat); VNET_DECLARE(int, udp_blackhole); -#define V_udb VNET_GET(udb) -#define V_udbinfo VNET_GET(udbinfo) -#define V_udpstat VNET_GET(udpstat) -#define V_udp_blackhole VNET_GET(udp_blackhole) +#define V_udb VNET(udb) +#define V_udbinfo VNET(udbinfo) +#define V_udpstat VNET(udpstat) +#define V_udp_blackhole VNET(udp_blackhole) extern u_long udp_sendspace; extern u_long udp_recvspace; diff --git a/sys/netinet6/frag6.c b/sys/netinet6/frag6.c index 1531c87..3fd8605 100644 --- a/sys/netinet6/frag6.c +++ b/sys/netinet6/frag6.c @@ -80,9 +80,9 @@ static VNET_DEFINE(u_int, frag6_nfragpackets); static VNET_DEFINE(u_int, frag6_nfrags); static VNET_DEFINE(struct ip6q, ip6q); /* ip6 reassemble queue */ -#define V_frag6_nfragpackets VNET_GET(frag6_nfragpackets) -#define V_frag6_nfrags VNET_GET(frag6_nfrags) -#define V_ip6q VNET_GET(ip6q) +#define V_frag6_nfragpackets VNET(frag6_nfragpackets) +#define V_frag6_nfrags VNET(frag6_nfrags) +#define V_ip6q VNET(ip6q) #define IP6Q_LOCK_INIT() mtx_init(&ip6qlock, "ip6qlock", NULL, MTX_DEF); #define IP6Q_LOCK() mtx_lock(&ip6qlock) diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c index f65aec8..4a81b4d 100644 --- a/sys/netinet6/icmp6.c +++ b/sys/netinet6/icmp6.c @@ -118,17 +118,17 @@ VNET_DECLARE(struct inpcbhead, ripcb); VNET_DECLARE(int, icmp6errppslim); VNET_DECLARE(int, icmp6_nodeinfo); -#define V_ripcbinfo VNET_GET(ripcbinfo) -#define V_ripcb VNET_GET(ripcb) -#define V_icmp6errppslim VNET_GET(icmp6errppslim) -#define V_icmp6_nodeinfo VNET_GET(icmp6_nodeinfo) +#define V_ripcbinfo VNET(ripcbinfo) +#define V_ripcb VNET(ripcb) +#define V_icmp6errppslim VNET(icmp6errppslim) +#define V_icmp6_nodeinfo VNET(icmp6_nodeinfo) VNET_DEFINE(struct icmp6stat, icmp6stat); static VNET_DEFINE(int, icmp6errpps_count); static VNET_DEFINE(struct timeval, icmp6errppslim_last); -#define V_icmp6errpps_count VNET_GET(icmp6errpps_count) -#define V_icmp6errppslim_last VNET_GET(icmp6errppslim_last) +#define V_icmp6errpps_count VNET(icmp6errpps_count) +#define V_icmp6errppslim_last VNET(icmp6errppslim_last) static void icmp6_errcount(struct icmp6errstat *, int, int); static int icmp6_rip6_input(struct mbuf **, int); diff --git a/sys/netinet6/in6_ifattach.c b/sys/netinet6/in6_ifattach.c index 56d9f27..5d34b40 100644 --- a/sys/netinet6/in6_ifattach.c +++ b/sys/netinet6/in6_ifattach.c @@ -71,10 +71,10 @@ VNET_DEFINE(unsigned long, in6_maxmtu); VNET_DEFINE(int, ip6_auto_linklocal); VNET_DEFINE(struct callout, in6_tmpaddrtimer_ch); -#define V_in6_tmpaddrtimer_ch VNET_GET(in6_tmpaddrtimer_ch) +#define V_in6_tmpaddrtimer_ch VNET(in6_tmpaddrtimer_ch) VNET_DECLARE(struct inpcbinfo, ripcbinfo); -#define V_ripcbinfo VNET_GET(ripcbinfo) +#define V_ripcbinfo VNET(ripcbinfo) static int get_rand_ifid(struct ifnet *, struct in6_addr *); static int generate_tmp_ifid(u_int8_t *, const u_int8_t *, u_int8_t *); diff --git a/sys/netinet6/in6_rmx.c b/sys/netinet6/in6_rmx.c index b378f5a..dd7c19b 100644 --- a/sys/netinet6/in6_rmx.c +++ b/sys/netinet6/in6_rmx.c @@ -209,9 +209,9 @@ static VNET_DEFINE(int, rtq_reallyold6); static VNET_DEFINE(int, rtq_minreallyold6); static VNET_DEFINE(int, rtq_toomany6); -#define V_rtq_reallyold6 VNET_GET(rtq_reallyold6) -#define V_rtq_minreallyold6 VNET_GET(rtq_minreallyold6) -#define V_rtq_toomany6 VNET_GET(rtq_toomany6) +#define V_rtq_reallyold6 VNET(rtq_reallyold6) +#define V_rtq_minreallyold6 VNET(rtq_minreallyold6) +#define V_rtq_toomany6 VNET(rtq_toomany6) SYSCTL_VNET_INT(_net_inet6_ip6, IPV6CTL_RTEXPIRE, rtexpire, CTLFLAG_RW, &VNET_NAME(rtq_reallyold6) , 0, ""); @@ -281,8 +281,8 @@ in6_rtqkill(struct radix_node *rn, void *rock) static VNET_DEFINE(int, rtq_timeout6); static VNET_DEFINE(struct callout, rtq_timer6); -#define V_rtq_timeout6 VNET_GET(rtq_timeout6) -#define V_rtq_timer6 VNET_GET(rtq_timer6) +#define V_rtq_timeout6 VNET(rtq_timeout6) +#define V_rtq_timer6 VNET(rtq_timer6) static void in6_rtqtimo(void *rock) @@ -349,7 +349,7 @@ struct mtuex_arg { }; static VNET_DEFINE(struct callout, rtq_mtutimer); -#define V_rtq_mtutimer VNET_GET(rtq_mtutimer) +#define V_rtq_mtutimer VNET(rtq_mtutimer) static int in6_mtuexpire(struct radix_node *rn, void *rock) diff --git a/sys/netinet6/in6_src.c b/sys/netinet6/in6_src.c index ffa6c3e..f51c3bf 100644 --- a/sys/netinet6/in6_src.c +++ b/sys/netinet6/in6_src.c @@ -126,7 +126,7 @@ static struct sx addrsel_sxlock; static VNET_DEFINE(struct in6_addrpolicy, defaultaddrpolicy); VNET_DEFINE(int, ip6_prefer_tempaddr); -#define V_defaultaddrpolicy VNET_GET(defaultaddrpolicy) +#define V_defaultaddrpolicy VNET(defaultaddrpolicy) static int selectroute __P((struct sockaddr_in6 *, struct ip6_pktopts *, struct ip6_moptions *, struct route_in6 *, struct ifnet **, @@ -1028,7 +1028,7 @@ struct addrsel_policyent { TAILQ_HEAD(addrsel_policyhead, addrsel_policyent); static VNET_DEFINE(struct addrsel_policyhead, addrsel_policytab); -#define V_addrsel_policytab VNET_GET(addrsel_policytab) +#define V_addrsel_policytab VNET(addrsel_policytab) static void init_policy_queue(void) diff --git a/sys/netinet6/in6_var.h b/sys/netinet6/in6_var.h index f5f5954..d0a54e0 100644 --- a/sys/netinet6/in6_var.h +++ b/sys/netinet6/in6_var.h @@ -490,9 +490,9 @@ VNET_DECLARE(struct in6_ifaddrhead, in6_ifaddrhead); VNET_DECLARE(struct icmp6stat, icmp6stat); VNET_DECLARE(unsigned long, in6_maxmtu); -#define V_in6_ifaddrhead VNET_GET(in6_ifaddrhead) -#define V_icmp6stat VNET_GET(icmp6stat) -#define V_in6_maxmtu VNET_GET(in6_maxmtu) +#define V_in6_ifaddrhead VNET(in6_ifaddrhead) +#define V_icmp6stat VNET(icmp6stat) +#define V_in6_maxmtu VNET(in6_maxmtu) extern struct rwlock in6_ifaddr_lock; #define IN6_IFADDR_LOCK_ASSERT( ) rw_assert(&in6_ifaddr_lock, RA_LOCKED) diff --git a/sys/netinet6/ip6_input.c b/sys/netinet6/ip6_input.c index 78c0901..1fc3090 100644 --- a/sys/netinet6/ip6_input.c +++ b/sys/netinet6/ip6_input.c @@ -139,16 +139,16 @@ VNET_DECLARE(int, icmp6_nodeinfo); VNET_DECLARE(int, udp6_sendspace); VNET_DECLARE(int, udp6_recvspace); -#define V_in6_tmpaddrtimer_ch VNET_GET(in6_tmpaddrtimer_ch) -#define V_dad_init VNET_GET(dad_init) -#define V_pmtu_expire VNET_GET(pmtu_expire) -#define V_pmtu_probe VNET_GET(pmtu_probe) -#define V_rip6_sendspace VNET_GET(rip6_sendspace) -#define V_rip6_recvspace VNET_GET(rip6_recvspace) -#define V_icmp6errppslim VNET_GET(icmp6errppslim) -#define V_icmp6_nodeinfo VNET_GET(icmp6_nodeinfo) -#define V_udp6_sendspace VNET_GET(udp6_sendspace) -#define V_udp6_recvspace VNET_GET(udp6_recvspace) +#define V_in6_tmpaddrtimer_ch VNET(in6_tmpaddrtimer_ch) +#define V_dad_init VNET(dad_init) +#define V_pmtu_expire VNET(pmtu_expire) +#define V_pmtu_probe VNET(pmtu_probe) +#define V_rip6_sendspace VNET(rip6_sendspace) +#define V_rip6_recvspace VNET(rip6_recvspace) +#define V_icmp6errppslim VNET(icmp6errppslim) +#define V_icmp6_nodeinfo VNET(icmp6_nodeinfo) +#define V_udp6_sendspace VNET(udp6_sendspace) +#define V_udp6_recvspace VNET(udp6_recvspace) struct rwlock in6_ifaddr_lock; RW_SYSINIT(in6_ifaddr_lock, &in6_ifaddr_lock, "in6_ifaddr_lock"); diff --git a/sys/netinet6/ip6_ipsec.c b/sys/netinet6/ip6_ipsec.c index e763187..23d6f7f 100644 --- a/sys/netinet6/ip6_ipsec.c +++ b/sys/netinet6/ip6_ipsec.c @@ -85,7 +85,7 @@ static VNET_DEFINE(int, ip6_ipsec6_filtertunnel) = 1; #else static VNET_DEFINE(int, ip6_ipsec6_filtertunnel) = 0; #endif -#define V_ip6_ipsec6_filtertunnel VNET_GET(ip6_ipsec6_filtertunnel) +#define V_ip6_ipsec6_filtertunnel VNET(ip6_ipsec6_filtertunnel) SYSCTL_DECL(_net_inet6_ipsec6); SYSCTL_VNET_INT(_net_inet6_ipsec6, OID_AUTO, diff --git a/sys/netinet6/ip6_mroute.c b/sys/netinet6/ip6_mroute.c index ccdbbdc..09e4bd6 100644 --- a/sys/netinet6/ip6_mroute.c +++ b/sys/netinet6/ip6_mroute.c @@ -155,7 +155,7 @@ static const struct ip6protosw in6_pim_protosw = { static int pim6_encapcheck(const struct mbuf *, int, int, void *); static VNET_DEFINE(int, ip6_mrouter_ver); -#define V_ip6_mrouter_ver VNET_GET(ip6_mrouter_ver) +#define V_ip6_mrouter_ver VNET(ip6_mrouter_ver) SYSCTL_DECL(_net_inet6); SYSCTL_DECL(_net_inet6_ip6); @@ -214,7 +214,7 @@ static struct mtx mif6_mtx; #ifdef MRT6DEBUG static VNET_DEFINE(u_int, mrt6debug); /* debug level */ -#define V_mrt6debug VNET_GET(mrt6debug) +#define V_mrt6debug VNET(mrt6debug) #define DEBUG_MFC 0x02 #define DEBUG_FORWARD 0x04 #define DEBUG_EXPIRE 0x08 @@ -258,7 +258,7 @@ SYSCTL_STRUCT(_net_inet6_pim, PIM6CTL_STATS, stats, CTLFLAG_RD, "PIM Statistics (struct pim6stat, netinet6/pim_var.h)"); static VNET_DEFINE(int, pim6); -#define V_pim6 VNET_GET(pim6) +#define V_pim6 VNET(pim6) /* * Hash function for a source, group entry diff --git a/sys/netinet6/ip6_var.h b/sys/netinet6/ip6_var.h index b61da42..e8fe3ec 100644 --- a/sys/netinet6/ip6_var.h +++ b/sys/netinet6/ip6_var.h @@ -330,33 +330,33 @@ VNET_DECLARE(int, ip6stealth); VNET_DECLARE(int, ip6_use_defzone); /* Whether to use the default scope * zone when unspecified */ -#define V_ip6stat VNET_GET(ip6stat) -#define V_ip6_defhlim VNET_GET(ip6_defhlim) -#define V_ip6_defmcasthlim VNET_GET(ip6_defmcasthlim) -#define V_ip6_forwarding VNET_GET(ip6_forwarding) -#define V_ip6_gif_hlim VNET_GET(ip6_gif_hlim) -#define V_ip6_use_deprecated VNET_GET(ip6_use_deprecated) -#define V_ip6_rr_prune VNET_GET(ip6_rr_prune) -#define V_ip6_mcast_pmtu VNET_GET(ip6_mcast_pmtu) -#define V_ip6_v6only VNET_GET(ip6_v6only) -#define V_ip6_mrouter VNET_GET(ip6_mrouter) -#define V_ip6_sendredirects VNET_GET(ip6_sendredirects) -#define V_ip6_maxfragpackets VNET_GET(ip6_maxfragpackets) -#define V_ip6_maxfrags VNET_GET(ip6_maxfrags) -#define V_ip6_accept_rtadv VNET_GET(ip6_accept_rtadv) -#define V_ip6_keepfaith VNET_GET(ip6_keepfaith) -#define V_ip6_log_interval VNET_GET(ip6_log_interval) -#define V_ip6_log_time VNET_GET(ip6_log_time) -#define V_ip6_hdrnestlimit VNET_GET(ip6_hdrnestlimit) -#define V_ip6_dad_count VNET_GET(ip6_dad_count) -#define V_ip6_auto_flowlabel VNET_GET(ip6_auto_flowlabel) -#define V_ip6_auto_linklocal VNET_GET(ip6_auto_linklocal) -#define V_ip6_use_tempaddr VNET_GET(ip6_use_tempaddr) -#define V_ip6_prefer_tempaddr VNET_GET(ip6_prefer_tempaddr) +#define V_ip6stat VNET(ip6stat) +#define V_ip6_defhlim VNET(ip6_defhlim) +#define V_ip6_defmcasthlim VNET(ip6_defmcasthlim) +#define V_ip6_forwarding VNET(ip6_forwarding) +#define V_ip6_gif_hlim VNET(ip6_gif_hlim) +#define V_ip6_use_deprecated VNET(ip6_use_deprecated) +#define V_ip6_rr_prune VNET(ip6_rr_prune) +#define V_ip6_mcast_pmtu VNET(ip6_mcast_pmtu) +#define V_ip6_v6only VNET(ip6_v6only) +#define V_ip6_mrouter VNET(ip6_mrouter) +#define V_ip6_sendredirects VNET(ip6_sendredirects) +#define V_ip6_maxfragpackets VNET(ip6_maxfragpackets) +#define V_ip6_maxfrags VNET(ip6_maxfrags) +#define V_ip6_accept_rtadv VNET(ip6_accept_rtadv) +#define V_ip6_keepfaith VNET(ip6_keepfaith) +#define V_ip6_log_interval VNET(ip6_log_interval) +#define V_ip6_log_time VNET(ip6_log_time) +#define V_ip6_hdrnestlimit VNET(ip6_hdrnestlimit) +#define V_ip6_dad_count VNET(ip6_dad_count) +#define V_ip6_auto_flowlabel VNET(ip6_auto_flowlabel) +#define V_ip6_auto_linklocal VNET(ip6_auto_linklocal) +#define V_ip6_use_tempaddr VNET(ip6_use_tempaddr) +#define V_ip6_prefer_tempaddr VNET(ip6_prefer_tempaddr) #ifdef IPSTEALTH -#define V_ip6stealth VNET_GET(ip6stealth) +#define V_ip6stealth VNET(ip6stealth) #endif -#define V_ip6_use_defzone VNET_GET(ip6_use_defzone) +#define V_ip6_use_defzone VNET(ip6_use_defzone) extern struct pfil_head inet6_pfil_hook; /* packet filter hooks */ diff --git a/sys/netinet6/mld6.c b/sys/netinet6/mld6.c index 98c9021..9d69e11 100644 --- a/sys/netinet6/mld6.c +++ b/sys/netinet6/mld6.c @@ -211,11 +211,11 @@ static VNET_DEFINE(int, interface_timers_running6); static VNET_DEFINE(int, state_change_timers_running6); static VNET_DEFINE(int, current_state_timers_running6); -#define V_mld_gsrdelay VNET_GET(mld_gsrdelay) -#define V_mli_head VNET_GET(mli_head) -#define V_interface_timers_running6 VNET_GET(interface_timers_running6) -#define V_state_change_timers_running6 VNET_GET(state_change_timers_running6) -#define V_current_state_timers_running6 VNET_GET(current_state_timers_running6) +#define V_mld_gsrdelay VNET(mld_gsrdelay) +#define V_mli_head VNET(mli_head) +#define V_interface_timers_running6 VNET(interface_timers_running6) +#define V_state_change_timers_running6 VNET(state_change_timers_running6) +#define V_current_state_timers_running6 VNET(current_state_timers_running6) SYSCTL_DECL(_net_inet6); /* Note: Not in any common header. */ diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c index 9c97988..3584b17 100644 --- a/sys/netinet6/nd6.c +++ b/sys/netinet6/nd6.c @@ -93,8 +93,8 @@ VNET_DEFINE(int, nd6_gctimer); static VNET_DEFINE(int, nd6_maxndopt); VNET_DEFINE(int, nd6_maxnudhint); static VNET_DEFINE(int, nd6_maxqueuelen); -#define V_nd6_maxndopt VNET_GET(nd6_maxndopt) -#define V_nd6_maxqueuelen VNET_GET(nd6_maxqueuelen) +#define V_nd6_maxndopt VNET(nd6_maxndopt) +#define V_nd6_maxqueuelen VNET(nd6_maxqueuelen) VNET_DEFINE(int, nd6_debug); @@ -107,7 +107,7 @@ VNET_DEFINE(struct nd_drhead, nd_defrouter); VNET_DEFINE(struct nd_prhead, nd_prefix); VNET_DEFINE(int, nd6_recalc_reachtm_interval); -#define V_nd6_recalc_reachtm_interval VNET_GET(nd6_recalc_reachtm_interval) +#define V_nd6_recalc_reachtm_interval VNET(nd6_recalc_reachtm_interval) static struct sockaddr_in6 all1_sa; @@ -121,14 +121,14 @@ static void nd6_llinfo_timer(void *); static void clear_llinfo_pqueue(struct llentry *); static VNET_DEFINE(struct callout, nd6_slowtimo_ch); -#define V_nd6_slowtimo_ch VNET_GET(nd6_slowtimo_ch) +#define V_nd6_slowtimo_ch VNET(nd6_slowtimo_ch) VNET_DEFINE(struct callout, nd6_timer_ch); VNET_DECLARE(int, dad_ignore_ns); VNET_DECLARE(int, dad_maxtry); -#define V_dad_ignore_ns VNET_GET(dad_ignore_ns) -#define V_dad_maxtry VNET_GET(dad_maxtry) +#define V_dad_ignore_ns VNET(dad_ignore_ns) +#define V_dad_maxtry VNET(dad_maxtry) void nd6_init(void) diff --git a/sys/netinet6/nd6.h b/sys/netinet6/nd6.h index f54e02e..d770e48 100644 --- a/sys/netinet6/nd6.h +++ b/sys/netinet6/nd6.h @@ -331,18 +331,18 @@ VNET_DECLARE(int, nd6_debug); VNET_DECLARE(int, nd6_onlink_ns_rfc4861); VNET_DECLARE(struct callout, nd6_timer_ch); -#define V_nd6_prune VNET_GET(nd6_prune) -#define V_nd6_delay VNET_GET(nd6_delay) -#define V_nd6_umaxtries VNET_GET(nd6_umaxtries) -#define V_nd6_mmaxtries VNET_GET(nd6_mmaxtries) -#define V_nd6_useloopback VNET_GET(nd6_useloopback) -#define V_nd6_maxnudhint VNET_GET(nd6_maxnudhint) -#define V_nd6_gctimer VNET_GET(nd6_gctimer) -#define V_nd_defrouter VNET_GET(nd_defrouter) -#define V_nd_prefix VNET_GET(nd_prefix) -#define V_nd6_debug VNET_GET(nd6_debug) -#define V_nd6_onlink_ns_rfc4861 VNET_GET(nd6_onlink_ns_rfc4861) -#define V_nd6_timer_ch VNET_GET(nd6_timer_ch) +#define V_nd6_prune VNET(nd6_prune) +#define V_nd6_delay VNET(nd6_delay) +#define V_nd6_umaxtries VNET(nd6_umaxtries) +#define V_nd6_mmaxtries VNET(nd6_mmaxtries) +#define V_nd6_useloopback VNET(nd6_useloopback) +#define V_nd6_maxnudhint VNET(nd6_maxnudhint) +#define V_nd6_gctimer VNET(nd6_gctimer) +#define V_nd_defrouter VNET(nd_defrouter) +#define V_nd_prefix VNET(nd_prefix) +#define V_nd6_debug VNET(nd6_debug) +#define V_nd6_onlink_ns_rfc4861 VNET(nd6_onlink_ns_rfc4861) +#define V_nd6_timer_ch VNET(nd6_timer_ch) /* nd6_rtr.c */ VNET_DECLARE(int, nd6_defifindex); @@ -351,11 +351,11 @@ VNET_DECLARE(u_int32_t, ip6_temp_preferred_lifetime); /* seconds */ VNET_DECLARE(u_int32_t, ip6_temp_valid_lifetime); /* seconds */ VNET_DECLARE(int, ip6_temp_regen_advance); /* seconds */ -#define V_nd6_defifindex VNET_GET(nd6_defifindex) -#define V_ip6_desync_factor VNET_GET(ip6_desync_factor) -#define V_ip6_temp_preferred_lifetime VNET_GET(ip6_temp_preferred_lifetime) -#define V_ip6_temp_valid_lifetime VNET_GET(ip6_temp_valid_lifetime) -#define V_ip6_temp_regen_advance VNET_GET(ip6_temp_regen_advance) +#define V_nd6_defifindex VNET(nd6_defifindex) +#define V_ip6_desync_factor VNET(ip6_desync_factor) +#define V_ip6_temp_preferred_lifetime VNET(ip6_temp_preferred_lifetime) +#define V_ip6_temp_valid_lifetime VNET(ip6_temp_valid_lifetime) +#define V_ip6_temp_regen_advance VNET(ip6_temp_regen_advance) #define nd6log(x) do { if (V_nd6_debug) log x; } while (/*CONSTCOND*/ 0) diff --git a/sys/netinet6/nd6_nbr.c b/sys/netinet6/nd6_nbr.c index 751466e..37cea51 100644 --- a/sys/netinet6/nd6_nbr.c +++ b/sys/netinet6/nd6_nbr.c @@ -93,8 +93,8 @@ static void nd6_dad_na_input(struct ifaddr *); VNET_DEFINE(int, dad_ignore_ns); VNET_DEFINE(int, dad_maxtry); -#define V_dad_ignore_ns VNET_GET(dad_ignore_ns) -#define V_dad_maxtry VNET_GET(dad_maxtry) +#define V_dad_ignore_ns VNET(dad_ignore_ns) +#define V_dad_maxtry VNET(dad_maxtry) /* * Input a Neighbor Solicitation Message. @@ -1125,10 +1125,10 @@ struct dadq { }; static VNET_DEFINE(TAILQ_HEAD(, dadq), dadq); -#define V_dadq VNET_GET(dadq) +#define V_dadq VNET(dadq) VNET_DEFINE(int, dad_init); -#define V_dad_init VNET_GET(dad_init) +#define V_dad_init VNET(dad_init) static struct dadq * nd6_dad_find(struct ifaddr *ifa) diff --git a/sys/netinet6/nd6_rtr.c b/sys/netinet6/nd6_rtr.c index 86e8818..5ebe307 100644 --- a/sys/netinet6/nd6_rtr.c +++ b/sys/netinet6/nd6_rtr.c @@ -88,10 +88,10 @@ static void in6_init_address_ltimes __P((struct nd_prefix *, static int rt6_deleteroute(struct radix_node *, void *); VNET_DECLARE(int, nd6_recalc_reachtm_interval); -#define V_nd6_recalc_reachtm_interval VNET_GET(nd6_recalc_reachtm_interval) +#define V_nd6_recalc_reachtm_interval VNET(nd6_recalc_reachtm_interval) static VNET_DEFINE(struct ifnet *, nd6_defifp); -#define V_nd6_defifp VNET_GET(nd6_defifp) +#define V_nd6_defifp VNET(nd6_defifp) VNET_DEFINE(int, nd6_defifindex); VNET_DEFINE(int, ip6_use_tempaddr); diff --git a/sys/netinet6/raw_ip6.c b/sys/netinet6/raw_ip6.c index 32c3bca..01d5784 100644 --- a/sys/netinet6/raw_ip6.c +++ b/sys/netinet6/raw_ip6.c @@ -117,8 +117,8 @@ __FBSDID("$FreeBSD$"); VNET_DECLARE(struct inpcbhead, ripcb); VNET_DECLARE(struct inpcbinfo, ripcbinfo); -#define V_ripcb VNET_GET(ripcb) -#define V_ripcbinfo VNET_GET(ripcbinfo) +#define V_ripcb VNET(ripcb) +#define V_ripcbinfo VNET(ripcbinfo) VNET_DEFINE(struct rip6stat, rip6stat); diff --git a/sys/netinet6/raw_ip6.h b/sys/netinet6/raw_ip6.h index b8d58a1..23395a6 100644 --- a/sys/netinet6/raw_ip6.h +++ b/sys/netinet6/raw_ip6.h @@ -49,7 +49,7 @@ struct rip6stat { #ifdef _KERNEL VNET_DECLARE(struct rip6stat, rip6stat); -#define V_rip6stat VNET_GET(rip6stat) +#define V_rip6stat VNET(rip6stat) #endif #endif diff --git a/sys/netinet6/scope6.c b/sys/netinet6/scope6.c index a4093b1..a1e6921 100644 --- a/sys/netinet6/scope6.c +++ b/sys/netinet6/scope6.c @@ -65,7 +65,7 @@ static struct mtx scope6_lock; static VNET_DEFINE(struct scope6_id, sid_default); VNET_DEFINE(int, ip6_use_defzone); -#define V_sid_default VNET_GET(sid_default) +#define V_sid_default VNET(sid_default) #define SID(ifp) \ (((struct in6_ifextra *)(ifp)->if_afdata[AF_INET6])->scope6_id) diff --git a/sys/netinet6/tcp6_var.h b/sys/netinet6/tcp6_var.h index 3e0b6ec..7da325a 100644 --- a/sys/netinet6/tcp6_var.h +++ b/sys/netinet6/tcp6_var.h @@ -67,7 +67,7 @@ SYSCTL_DECL(_net_inet6_tcp6); VNET_DECLARE(int, tcp_v6mssdflt); /* XXX */ -#define V_tcp_v6mssdflt VNET_GET(tcp_v6mssdflt) +#define V_tcp_v6mssdflt VNET(tcp_v6mssdflt) #endif struct ip6_hdr; 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); |