summaryrefslogtreecommitdiffstats
path: root/sys/netinet
diff options
context:
space:
mode:
authorzec <zec@FreeBSD.org>2008-11-28 23:30:51 +0000
committerzec <zec@FreeBSD.org>2008-11-28 23:30:51 +0000
commit7ecd715d484a68ba07dae8dcb30670d691129c07 (patch)
treebb923196c85b9e71d363a7650c292edddfbc6beb /sys/netinet
parentd8aff71262b6224530a865344e20823189bd5cb1 (diff)
downloadFreeBSD-src-7ecd715d484a68ba07dae8dcb30670d691129c07.zip
FreeBSD-src-7ecd715d484a68ba07dae8dcb30670d691129c07.tar.gz
Unhide declarations of network stack virtualization structs from
underneath #ifdef VIMAGE blocks. This change introduces some churn in #include ordering and nesting throughout the network stack and drivers but is not expected to cause any additional issues. In the next step this will allow us to instantiate the virtualization container structures and switch from using global variables to their "containerized" counterparts. Reviewed by: bz, julian Approved by: julian (mentor) Obtained from: //depot/projects/vimage-commit2/... X-MFC after: never Sponsored by: NLnet Foundation, The FreeBSD Foundation
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/in.c1
-rw-r--r--sys/netinet/ip_id.c1
-rw-r--r--sys/netinet/ip_input.c2
-rw-r--r--sys/netinet/ip_var.h12
-rw-r--r--sys/netinet/tcp_hostcache.c43
-rw-r--r--sys/netinet/vinet.h17
6 files changed, 15 insertions, 61 deletions
diff --git a/sys/netinet/in.c b/sys/netinet/in.c
index f2d7ccb..b57049f 100644
--- a/sys/netinet/in.c
+++ b/sys/netinet/in.c
@@ -70,7 +70,6 @@ static void in_purgemaddrs(struct ifnet *);
static int subnetsarelocal;
static int sameprefixcarponly;
extern struct inpcbinfo ripcbinfo;
-extern struct inpcbinfo udbinfo;
#endif
SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_ip, OID_AUTO, subnets_are_local,
diff --git a/sys/netinet/ip_id.c b/sys/netinet/ip_id.c
index ce8c6b4..ed0a3e4 100644
--- a/sys/netinet/ip_id.c
+++ b/sys/netinet/ip_id.c
@@ -104,7 +104,6 @@ static int sysctl_ip_id_change(SYSCTL_HANDLER_ARGS);
MTX_SYSINIT(ip_id_mtx, &ip_id_mtx, "ip_id_mtx", MTX_DEF);
-SYSCTL_DECL(_net_inet_ip);
SYSCTL_PROC(_net_inet_ip, OID_AUTO, random_id_period, CTLTYPE_INT|CTLFLAG_RW,
&array_size, 0, sysctl_ip_id_change, "IU", "IP ID Array size");
SYSCTL_INT(_net_inet_ip, OID_AUTO, random_id_collisions, CTLFLAG_RD,
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c
index 8e40d84..7f12098 100644
--- a/sys/netinet/ip_input.c
+++ b/sys/netinet/ip_input.c
@@ -104,7 +104,7 @@ struct ipstat ipstat;
static int ip_rsvp_on;
struct socket *ip_rsvpd;
int rsvp_on;
-static TAILQ_HEAD(ipqhead, ipq) ipq[IPREASS_NHASH];
+static struct ipqhead ipq[IPREASS_NHASH];
static int maxnipq; /* Administrative limit on # reass queues. */
static int maxfragsperpacket;
int ipstealth;
diff --git a/sys/netinet/ip_var.h b/sys/netinet/ip_var.h
index 3b05254..e23fe93 100644
--- a/sys/netinet/ip_var.h
+++ b/sys/netinet/ip_var.h
@@ -234,18 +234,6 @@ extern struct pfil_head inet_pfil_hook; /* packet filter hooks */
void in_delayed_cksum(struct mbuf *m);
-static __inline uint16_t ip_newid(void);
-extern int ip_do_randomid;
-
-static __inline uint16_t
-ip_newid(void)
-{
- if (V_ip_do_randomid)
- return ip_randomid();
-
- return htons(V_ip_id++);
-}
-
#endif /* _KERNEL */
#endif /* !_NETINET_IP_VAR_H_ */
diff --git a/sys/netinet/tcp_hostcache.c b/sys/netinet/tcp_hostcache.c
index 25dc44a..ae89d59 100644
--- a/sys/netinet/tcp_hostcache.c
+++ b/sys/netinet/tcp_hostcache.c
@@ -98,55 +98,12 @@ __FBSDID("$FreeBSD$");
#include <vm/uma.h>
-
-TAILQ_HEAD(hc_qhead, hc_metrics);
-
-struct hc_head {
- struct hc_qhead hch_bucket;
- u_int hch_length;
- struct mtx hch_mtx;
-};
-
-struct hc_metrics {
- /* housekeeping */
- TAILQ_ENTRY(hc_metrics) rmx_q;
- struct hc_head *rmx_head; /* head of bucket tail queue */
- struct in_addr ip4; /* IP address */
- struct in6_addr ip6; /* IP6 address */
- /* endpoint specific values for TCP */
- u_long rmx_mtu; /* MTU for this path */
- u_long rmx_ssthresh; /* outbound gateway buffer limit */
- u_long rmx_rtt; /* estimated round trip time */
- u_long rmx_rttvar; /* estimated rtt variance */
- u_long rmx_bandwidth; /* estimated bandwidth */
- u_long rmx_cwnd; /* congestion window */
- u_long rmx_sendpipe; /* outbound delay-bandwidth product */
- u_long rmx_recvpipe; /* inbound delay-bandwidth product */
- /* TCP hostcache internal data */
- int rmx_expire; /* lifetime for object */
- u_long rmx_hits; /* number of hits */
- u_long rmx_updates; /* number of updates */
-};
-
/* Arbitrary values */
#define TCP_HOSTCACHE_HASHSIZE 512
#define TCP_HOSTCACHE_BUCKETLIMIT 30
#define TCP_HOSTCACHE_EXPIRE 60*60 /* one hour */
#define TCP_HOSTCACHE_PRUNE 5*60 /* every 5 minutes */
-struct tcp_hostcache {
- struct hc_head *hashbase;
- uma_zone_t zone;
- u_int hashsize;
- u_int hashmask;
- u_int bucket_limit;
- u_int cache_count;
- u_int cache_limit;
- int expire;
- int prune;
- int purgeall;
-};
-
#ifdef VIMAGE_GLOBALS
static struct tcp_hostcache tcp_hostcache;
static struct callout tcp_hc_callout;
diff --git a/sys/netinet/vinet.h b/sys/netinet/vinet.h
index 005a46b..5fdb1c0 100644
--- a/sys/netinet/vinet.h
+++ b/sys/netinet/vinet.h
@@ -33,11 +33,12 @@
#ifndef _NETINET_VINET_H_
#define _NETINET_VINET_H_
-#ifdef VIMAGE
#include <sys/socketvar.h>
#include <sys/sysctl.h>
#include <sys/md5.h>
+#include <net/vnet.h>
+
#include <netinet/in.h>
#include <netinet/in_systm.h>
#include <netinet/in_var.h>
@@ -196,8 +197,6 @@ struct vnet_inet {
int _icmp_quotelen;
int _icmpbmcastecho;
};
-#endif
-
/*
* Symbol translation macros
@@ -333,4 +332,16 @@ struct vnet_inet {
#define V_udpstat VNET_INET(udpstat)
#define V_useloopback VNET_INET(useloopback)
+static __inline uint16_t ip_newid(void);
+extern int ip_do_randomid;
+
+static __inline uint16_t
+ip_newid(void)
+{
+ if (V_ip_do_randomid)
+ return ip_randomid();
+
+ return htons(V_ip_id++);
+}
+
#endif /* !_NETINET_VINET_H_ */
OpenPOWER on IntegriCloud