diff options
author | bz <bz@FreeBSD.org> | 2008-12-11 16:26:38 +0000 |
---|---|---|
committer | bz <bz@FreeBSD.org> | 2008-12-11 16:26:38 +0000 |
commit | 83a32f8750135cc82be5727b54cb42797923009b (patch) | |
tree | 969ea1192ccca86b51199d256a5beea929f92162 /sys/netinet | |
parent | 83955c51afc9c7fd1b9b5164cbbbf65f1706262b (diff) | |
download | FreeBSD-src-83a32f8750135cc82be5727b54cb42797923009b.zip FreeBSD-src-83a32f8750135cc82be5727b54cb42797923009b.tar.gz |
Put a global variables, which were virtualized but formerly
missed under VIMAGE_GLOBAL.
Start putting the extern declarations of the virtualized globals
under VIMAGE_GLOBAL as the globals themsevles are already.
This will help by the time when we are going to remove the globals
entirely.
While there garbage collect a few dead externs from ip6_var.h.
Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/in_pcb.h | 2 | ||||
-rw-r--r-- | sys/netinet/ip_fw2.c | 2 | ||||
-rw-r--r-- | sys/netinet/ip_fw_nat.c | 3 | ||||
-rw-r--r-- | sys/netinet/ip_fw_pfil.c | 2 | ||||
-rw-r--r-- | sys/netinet/ip_var.h | 6 | ||||
-rw-r--r-- | sys/netinet/tcp_var.h | 5 | ||||
-rw-r--r-- | sys/netinet/udp_var.h | 7 |
7 files changed, 20 insertions, 7 deletions
diff --git a/sys/netinet/in_pcb.h b/sys/netinet/in_pcb.h index 081f490..f0275bd 100644 --- a/sys/netinet/in_pcb.h +++ b/sys/netinet/in_pcb.h @@ -450,6 +450,7 @@ void inp_4tuple_get(struct inpcb *inp, uint32_t *laddr, uint16_t *lp, #define INP_CHECK_SOCKAF(so, af) (INP_SOCKAF(so) == af) #ifdef _KERNEL +#ifdef VIMAGE_GLOBALS extern int ipport_reservedhigh; extern int ipport_reservedlow; extern int ipport_lowfirstauto; @@ -463,6 +464,7 @@ extern int ipport_randomcps; extern int ipport_randomtime; extern int ipport_stoprandom; extern int ipport_tcpallocs; +#endif extern struct callout ipport_tick_callout; void in_pcbpurgeif0(struct inpcbinfo *, struct ifnet *); diff --git a/sys/netinet/ip_fw2.c b/sys/netinet/ip_fw2.c index 61c76cf..5c3ac59 100644 --- a/sys/netinet/ip_fw2.c +++ b/sys/netinet/ip_fw2.c @@ -149,7 +149,9 @@ struct ip_fw_ugid { /* * list of rules for layer 3 */ +#ifdef VIMAGE_GLOBALS struct ip_fw_chain layer3_chain; +#endif MALLOC_DEFINE(M_IPFW, "IpFw/IpAcct", "IpFw/IpAcct chain's"); MALLOC_DEFINE(M_IPFW_TBL, "ipfw_tbl", "IpFw tables"); diff --git a/sys/netinet/ip_fw_nat.c b/sys/netinet/ip_fw_nat.c index d770d5c..54c91d9 100644 --- a/sys/netinet/ip_fw_nat.c +++ b/sys/netinet/ip_fw_nat.c @@ -69,9 +69,8 @@ __FBSDID("$FreeBSD$"); MALLOC_DECLARE(M_IPFW); -extern struct ip_fw_chain layer3_chain; - #ifdef VIMAGE_GLOBALS +extern struct ip_fw_chain layer3_chain; static eventhandler_tag ifaddr_event_tag; #endif diff --git a/sys/netinet/ip_fw_pfil.c b/sys/netinet/ip_fw_pfil.c index 246fdef..952574d 100644 --- a/sys/netinet/ip_fw_pfil.c +++ b/sys/netinet/ip_fw_pfil.c @@ -68,10 +68,12 @@ __FBSDID("$FreeBSD$"); #include <machine/in_cksum.h> +#ifdef VIMAGE_GLOBALS int fw_enable = 1; #ifdef INET6 int fw6_enable = 1; #endif +#endif int ipfw_chg_hook(SYSCTL_HANDLER_ARGS); diff --git a/sys/netinet/ip_var.h b/sys/netinet/ip_var.h index a4e73db..f023051 100644 --- a/sys/netinet/ip_var.h +++ b/sys/netinet/ip_var.h @@ -175,6 +175,7 @@ struct inpcb; struct route; struct sockopt; +#ifdef VIMAGE_GLOBALS extern struct ipstat ipstat; extern u_short ip_id; /* ip packet ctr, for ids */ extern int ip_do_randomid; @@ -183,12 +184,13 @@ extern int ipforwarding; /* ip forwarding */ #ifdef IPSTEALTH extern int ipstealth; /* stealth forwarding */ #endif -extern u_char ip_protox[]; +extern int rsvp_on; extern struct socket *ip_rsvpd; /* reservation protocol daemon */ extern struct socket *ip_mrouter; /* multicast routing daemon */ +#endif +extern u_char ip_protox[]; extern int (*legal_vif_num)(int); extern u_long (*ip_mcast_src)(int); -extern int rsvp_on; extern struct pr_usrreqs rip_usrreqs; void inp_freemoptions(struct ip_moptions *); diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index bb5c968..ed872b9 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -513,10 +513,12 @@ SYSCTL_DECL(_net_inet_tcp_sack); MALLOC_DECLARE(M_TCPLOG); #endif +extern int tcp_log_in_vain; + +#ifdef VIMAGE_GLOBALS extern struct inpcbhead tcb; /* head of queue of active tcpcb's */ extern struct inpcbinfo tcbinfo; extern struct tcpstat tcpstat; /* tcp statistics */ -extern int tcp_log_in_vain; extern int tcp_mssdflt; /* XXX */ extern int tcp_minmss; extern int tcp_delack_enabled; @@ -548,6 +550,7 @@ extern int tcp_sack_globalholes; extern int tcp_sc_rst_sock_fail; /* RST on sock alloc failure */ extern int tcp_do_ecn; /* TCP ECN enabled/disabled */ extern int tcp_ecn_maxretries; +#endif /* VIMAGE_GLOBALS */ int tcp_addoptions(struct tcpopt *, u_char *); struct tcpcb * diff --git a/sys/netinet/udp_var.h b/sys/netinet/udp_var.h index c4c077a..39805ed 100644 --- a/sys/netinet/udp_var.h +++ b/sys/netinet/udp_var.h @@ -94,12 +94,15 @@ struct udpstat { SYSCTL_DECL(_net_inet_udp); extern struct pr_usrreqs udp_usrreqs; + +#ifdef VIMAGE_GLOBALS extern struct inpcbhead udb; extern struct inpcbinfo udbinfo; -extern u_long udp_sendspace; -extern u_long udp_recvspace; extern struct udpstat udpstat; extern int udp_blackhole; +#endif +extern u_long udp_sendspace; +extern u_long udp_recvspace; extern int udp_log_in_vain; void udp_ctlinput(int, struct sockaddr *, void *); |