diff options
author | Jonathan Lemon <jlemon@FreeBSD.org> | 1999-08-26 19:52:17 +0000 |
---|---|---|
committer | Jonathan Lemon <jlemon@FreeBSD.org> | 1999-08-26 19:52:17 +0000 |
commit | 6da3d6578bc408f4d25a2f379160358ce46dcf8c (patch) | |
tree | a4aeb5d7a1b2a4081d443524a75804786a929f89 /sys/netinet/tcp_subr.c | |
parent | 5916b53ae25019e007266626c0ccd335342569b3 (diff) | |
download | src-6da3d6578bc408f4d25a2f379160358ce46dcf8c.tar.gz src-6da3d6578bc408f4d25a2f379160358ce46dcf8c.zip |
Add readonly OID ``net.inet.tcp.tcbhashsize'' so it is possible to
discover the size of the TCB hashtable on a running system.
Notes
Notes:
svn path=/head/; revision=50426
Diffstat (limited to 'sys/netinet/tcp_subr.c')
-rw-r--r-- | sys/netinet/tcp_subr.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index adc4ac90d2fa..f5c5b10aa412 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)tcp_subr.c 8.2 (Berkeley) 5/24/95 - * $Id: tcp_subr.c,v 1.56 1999/07/05 08:46:55 msmith Exp $ + * $Id: tcp_subr.c,v 1.57 1999/07/11 18:32:45 green Exp $ */ #include "opt_compat.h" @@ -86,6 +86,10 @@ static int tcp_do_rfc1644 = 0; SYSCTL_INT(_net_inet_tcp, TCPCTL_DO_RFC1644, rfc1644, CTLFLAG_RW, &tcp_do_rfc1644 , 0, "Enable rfc1644 (TTCP) extensions"); +static int tcp_tcbhashsize = 0; +SYSCTL_INT(_net_inet_tcp, OID_AUTO, tcbhashsize, CTLFLAG_RD, + &tcp_tcbhashsize, 0, "Size of TCP control-block hashtable"); + SYSCTL_INT(_net_inet_tcp, OID_AUTO, pcbcount, CTLFLAG_RD, &tcbinfo.ipi_count, 0, "Number of active PCBs"); @@ -140,6 +144,7 @@ tcp_init() printf("WARNING: TCB hash size not a power of 2\n"); hashsize = 512; /* safe default */ } + tcp_tcbhashsize = hashsize; tcbinfo.hashbase = hashinit(hashsize, M_PCB, &tcbinfo.hashmask); tcbinfo.porthashbase = hashinit(hashsize, M_PCB, &tcbinfo.porthashmask); |