Add a counter for the number of times the listen queue was overflowed to
the tcpstat structure. (netstat -s) Reviewed by: wollman Obtained from: Steves, TCP/IP Ill. vol.3, page 189
This commit is contained in:
parent
9abcd27118
commit
1347f5b8e5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=14268
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)tcp_input.c 8.12 (Berkeley) 5/24/95
|
||||
* $Id: tcp_input.c,v 1.35 1996/01/31 08:22:24 olah Exp $
|
||||
* $Id: tcp_input.c,v 1.36 1996/02/22 11:46:39 davidg Exp $
|
||||
*/
|
||||
|
||||
#ifndef TUBA_INCLUDE
|
||||
@ -396,8 +396,10 @@ tcp_input(m, iphlen)
|
||||
if (so->so_options & SO_ACCEPTCONN) {
|
||||
register struct tcpcb *tp0 = tp;
|
||||
so = sonewconn(so, 0);
|
||||
if (so == 0)
|
||||
if (so == 0) {
|
||||
tcpstat.tcps_listendrop++;
|
||||
goto drop;
|
||||
}
|
||||
/*
|
||||
* This is ugly, but ....
|
||||
*
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)tcp_input.c 8.12 (Berkeley) 5/24/95
|
||||
* $Id: tcp_input.c,v 1.35 1996/01/31 08:22:24 olah Exp $
|
||||
* $Id: tcp_input.c,v 1.36 1996/02/22 11:46:39 davidg Exp $
|
||||
*/
|
||||
|
||||
#ifndef TUBA_INCLUDE
|
||||
@ -396,8 +396,10 @@ tcp_input(m, iphlen)
|
||||
if (so->so_options & SO_ACCEPTCONN) {
|
||||
register struct tcpcb *tp0 = tp;
|
||||
so = sonewconn(so, 0);
|
||||
if (so == 0)
|
||||
if (so == 0) {
|
||||
tcpstat.tcps_listendrop++;
|
||||
goto drop;
|
||||
}
|
||||
/*
|
||||
* This is ugly, but ....
|
||||
*
|
||||
|
@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)tcp_var.h 8.4 (Berkeley) 5/24/95
|
||||
* $Id: tcp_var.h,v 1.27 1996/01/19 08:02:34 peter Exp $
|
||||
* $Id: tcp_var.h,v 1.28 1996/01/30 22:58:33 mpp Exp $
|
||||
*/
|
||||
|
||||
#ifndef _NETINET_TCP_VAR_H_
|
||||
@ -289,6 +289,7 @@ struct tcpstat {
|
||||
u_long tcps_persistdrop; /* timeout in persist state */
|
||||
u_long tcps_badsyn; /* bogus SYN, e.g. premature ACK */
|
||||
u_long tcps_mturesent; /* resends due to MTU discovery */
|
||||
u_long tcps_listendrops; /* listen queue overflows */
|
||||
};
|
||||
|
||||
/*
|
||||
|
@ -218,6 +218,7 @@ tcp_stats(off, name)
|
||||
p(tcps_connattempt, "\t%d connection request%s\n");
|
||||
p(tcps_accepts, "\t%d connection accept%s\n");
|
||||
p(tcps_badsyn, "\t%d bad connection attempt%s\n");
|
||||
p(tcps_listendrop, "\t%d listen queue overflow%s\n");
|
||||
p(tcps_connects, "\t%d connection%s established (including accepts)\n");
|
||||
p2(tcps_closed, tcps_drops,
|
||||
"\t%d connection%s closed (including %d drop%s)\n");
|
||||
|
Loading…
Reference in New Issue
Block a user