From b47723ab3b61d7840b08c56375e35546f7b4a8a9 Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Sat, 10 Nov 2018 20:04:50 +0000 Subject: netinet/tcp.h: add tcp_info fields from linux v4.19 new fields for RFC 4898 tcp stats in linux tcpi_bytes_sent added in commit ba113c3aa79a7f941ac162d05a3620bdc985c58d tcpi_bytes_retrans added in commit fb31c9b9f6c85b1bad569ecedbde78d9e37cd87b tcpi_dsack_dups added in commit 7e10b6554ff2ce7f86d5d3eec3af5db8db482caa tcpi_reord_seen added in commit 7ec65372ca534217b53fd208500cf7aac223a383 The new fields change the size of a public struct and thus an ABI break, but this is how the getsockopt TCP_INFO api is designed: the tcp_info type must only be used with a length parameter in extern interfaces. --- include/netinet/tcp.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include') diff --git a/include/netinet/tcp.h b/include/netinet/tcp.h index 584af2f5..2eac793e 100644 --- a/include/netinet/tcp.h +++ b/include/netinet/tcp.h @@ -72,6 +72,10 @@ enum { TCP_NLA_SND_SSTHRESH, TCP_NLA_DELIVERED, TCP_NLA_DELIVERED_CE, + TCP_NLA_BYTES_SENT, + TCP_NLA_BYTES_RETRANS, + TCP_NLA_DSACK_DUPS, + TCP_NLA_REORD_SEEN, }; #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) @@ -225,6 +229,10 @@ struct tcp_info { uint64_t tcpi_sndbuf_limited; uint32_t tcpi_delivered; uint32_t tcpi_delivered_ce; + uint64_t tcpi_bytes_sent; + uint64_t tcpi_bytes_retrans; + uint32_t tcpi_dsack_dups; + uint32_t tcpi_reord_seen; }; #define TCP_MD5SIG_MAXKEYLEN 80 -- cgit v1.2.1