diff options
author | Gleb Smirnoff <glebius@FreeBSD.org> | 2016-01-27 00:45:46 +0000 |
---|---|---|
committer | Gleb Smirnoff <glebius@FreeBSD.org> | 2016-01-27 00:45:46 +0000 |
commit | 57a78e3baeb583a817195e5aee153f6387b9b2b0 (patch) | |
tree | dd0b39d31460d52fec634711ce845f26d7406828 /sys/netinet/tcp_var.h | |
parent | 2027d8784f8376de9f24d93495cb879349ab1220 (diff) | |
download | src-57a78e3baeb583a817195e5aee153f6387b9b2b0.tar.gz src-57a78e3baeb583a817195e5aee153f6387b9b2b0.zip |
Augment struct tcpstat with tcps_states[], which is used for book-keeping
the amount of TCP connections by state. Provides a cheap way to get
connection count without traversing the whole pcb list.
Sponsored by: Netflix
Notes
Notes:
svn path=/head/; revision=294869
Diffstat (limited to 'sys/netinet/tcp_var.h')
-rw-r--r-- | sys/netinet/tcp_var.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index 4712c6b2d51d..32aa0bbf912c 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -34,6 +34,7 @@ #define _NETINET_TCP_VAR_H_ #include <netinet/tcp.h> +#include <netinet/tcp_fsm.h> #ifdef _KERNEL #include <net/vnet.h> @@ -587,6 +588,9 @@ struct tcpstat { uint64_t tcps_sig_err_sigopt; /* No signature expected by socket */ uint64_t tcps_sig_err_nosigopt; /* No signature provided by segment */ + /* Running connection count. */ + uint64_t tcps_states[TCP_NSTATES]; + uint64_t _pad[12]; /* 6 UTO, 6 TBD */ }; |