Răsfoiți Sursa

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.
Szabolcs Nagy 6 ani în urmă
părinte
comite
b47723ab3b
1 a modificat fișierele cu 8 adăugiri și 0 ștergeri
  1. 8 0
      include/netinet/tcp.h

+ 8 - 0
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