diff options
author | bz <bz@FreeBSD.org> | 2010-04-29 11:52:42 +0000 |
---|---|---|
committer | bz <bz@FreeBSD.org> | 2010-04-29 11:52:42 +0000 |
commit | 0a90ef17283bc848eee90c3bdd5bec3fcc1bc879 (patch) | |
tree | e6f9695e24617b291f2a8f0b1f388eda2e605549 /sys/netinet6/ip6_var.h | |
parent | 043deeb56455e1129861bf93ec57f03b90200344 (diff) | |
download | FreeBSD-src-0a90ef17283bc848eee90c3bdd5bec3fcc1bc879.zip FreeBSD-src-0a90ef17283bc848eee90c3bdd5bec3fcc1bc879.tar.gz |
MFP4: @176978-176982, 176984, 176990-176994, 177441
"Whitspace" churn after the VIMAGE/VNET whirls.
Remove the need for some "init" functions within the network
stack, like pim6_init(), icmp_init() or significantly shorten
others like ip6_init() and nd6_init(), using static initialization
again where possible and formerly missed.
Move (most) variables back to the place they used to be before the
container structs and VIMAGE_GLOABLS (before r185088) and try to
reduce the diff to stable/7 and earlier as good as possible,
to help out-of-tree consumers to update from 6.x or 7.x to 8 or 9.
This also removes some header file pollution for putatively
static global variables.
Revert VIMAGE specific changes in ipfilter::ip_auth.c, that are
no longer needed.
Reviewed by: jhb
Discussed with: rwatson
Sponsored by: The FreeBSD Foundation
Sponsored by: CK Software GmbH
MFC after: 6 days
Diffstat (limited to 'sys/netinet6/ip6_var.h')
-rw-r--r-- | sys/netinet6/ip6_var.h | 53 |
1 files changed, 24 insertions, 29 deletions
diff --git a/sys/netinet6/ip6_var.h b/sys/netinet6/ip6_var.h index a0a0f3a..3e91a79 100644 --- a/sys/netinet6/ip6_var.h +++ b/sys/netinet6/ip6_var.h @@ -295,12 +295,20 @@ VNET_DECLARE(struct ip6stat, ip6stat); /* statistics */ VNET_DECLARE(int, ip6_defhlim); /* default hop limit */ VNET_DECLARE(int, ip6_defmcasthlim); /* default multicast hop limit */ VNET_DECLARE(int, ip6_forwarding); /* act as router? */ -VNET_DECLARE(int, ip6_gif_hlim); /* Hop limit for gif encap packet */ VNET_DECLARE(int, ip6_use_deprecated); /* allow deprecated addr as source */ VNET_DECLARE(int, ip6_rr_prune); /* router renumbering prefix * walk list every 5 sec. */ VNET_DECLARE(int, ip6_mcast_pmtu); /* enable pMTU discovery for multicast? */ VNET_DECLARE(int, ip6_v6only); +#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_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) + VNET_DECLARE(struct socket *, ip6_mrouter); /* multicast routing daemon */ VNET_DECLARE(int, ip6_sendredirects); /* send IP redirects when forwarding? */ VNET_DECLARE(int, ip6_maxfragpackets); /* Maximum packets in reassembly @@ -314,31 +322,6 @@ VNET_DECLARE(time_t, ip6_log_time); VNET_DECLARE(int, ip6_hdrnestlimit); /* upper limit of # of extension * headers */ VNET_DECLARE(int, ip6_dad_count); /* DupAddrDetectionTransmits */ - -VNET_DECLARE(int, ip6_auto_flowlabel); -VNET_DECLARE(int, ip6_auto_linklocal); - -VNET_DECLARE(int, ip6_use_tempaddr); /* Whether to use temporary addresses */ -VNET_DECLARE(int, ip6_prefer_tempaddr); /* Whether to prefer temporary - * addresses in the source address - * selection */ - -#ifdef IPSTEALTH -VNET_DECLARE(int, ip6stealth); -#endif - -VNET_DECLARE(int, ip6_use_defzone); /* Whether to use the default scope - * zone when unspecified */ - -#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) @@ -349,17 +332,29 @@ VNET_DECLARE(int, ip6_use_defzone); /* Whether to use the default scope #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) + +VNET_DECLARE(int, ip6_auto_flowlabel); +VNET_DECLARE(int, ip6_auto_linklocal); #define V_ip6_auto_flowlabel VNET(ip6_auto_flowlabel) #define V_ip6_auto_linklocal VNET(ip6_auto_linklocal) + +VNET_DECLARE(int, ip6_use_tempaddr); /* Whether to use temporary addresses */ +VNET_DECLARE(int, ip6_prefer_tempaddr); /* Whether to prefer temporary + * addresses in the source address + * selection */ #define V_ip6_use_tempaddr VNET(ip6_use_tempaddr) #define V_ip6_prefer_tempaddr VNET(ip6_prefer_tempaddr) -#ifdef IPSTEALTH -#define V_ip6stealth VNET(ip6stealth) -#endif + +VNET_DECLARE(int, ip6_use_defzone); /* Whether to use the default scope + * zone when unspecified */ #define V_ip6_use_defzone VNET(ip6_use_defzone) VNET_DECLARE (struct pfil_head, inet6_pfil_hook); /* packet filter hooks */ #define V_inet6_pfil_hook VNET(inet6_pfil_hook) +#ifdef IPSTEALTH +VNET_DECLARE(int, ip6stealth); +#define V_ip6stealth VNET(ip6stealth) +#endif extern struct pr_usrreqs rip6_usrreqs; struct sockopt; |