aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet
diff options
context:
space:
mode:
authorMarko Zec <zec@FreeBSD.org>2008-11-28 23:30:51 +0000
committerMarko Zec <zec@FreeBSD.org>2008-11-28 23:30:51 +0000
commitf02493cbbd6e5e5f9094dc7ef872f773fa8b1a11 (patch)
treebb923196c85b9e71d363a7650c292edddfbc6beb /sys/netinet
parent39a7471508a20f2b15ca3bee3e532de069483811 (diff)
Notes
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 f2d7ccbe04e5..b57049f155d6 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 ce8c6b42ec78..ed0a3e49b044 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 8e40d8455eb1..7f12098fac20 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 3b052547661a..e23fe93379c0 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 25dc44a72799..ae89d59d6547 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 005a46b27fe5..5fdb1c0c28b0 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_ */