add SCM_TIMESTAMPING_OPT_STATS and related TCP_ enums from linux v4.10
authorSzabolcs Nagy <nsz@port70.net>
Sun, 5 Mar 2017 20:51:23 +0000 (20:51 +0000)
committerRich Felker <dalias@aerifal.cx>
Sun, 5 Nov 2017 23:39:25 +0000 (18:39 -0500)
for tcp timestamp control messages, new in linux commit
1c885808e45601b2b6f68b30ac1d999e10b6f606
and export time measurements via tcp_info, added in linux commit
efd90174167530c67a54273fd5d8369c87f9bd32

include/netinet/tcp.h
include/sys/socket.h

index 1339fcc..935107a 100644 (file)
 #define TCP_LISTEN       10
 #define TCP_CLOSING      11
 
+enum {
+       TCP_NLA_PAD,
+       TCP_NLA_BUSY,
+       TCP_NLA_RWND_LIMITED,
+       TCP_NLA_SNDBUF_LIMITED,
+};
+
 #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
 #define TCPOPT_EOL              0
 #define TCPOPT_NOP              1
@@ -190,6 +197,9 @@ struct tcp_info {
        uint32_t tcpi_data_segs_in;
        uint32_t tcpi_data_segs_out;
        uint64_t tcpi_delivery_rate;
+       uint64_t tcpi_busy_time;
+       uint64_t tcpi_rwnd_limited;
+       uint64_t tcpi_sndbuf_limited;
 };
 
 #define TCP_MD5SIG_MAXKEYLEN    80
index 8664779..acb6ee0 100644 (file)
@@ -224,6 +224,7 @@ struct linger {
 #define SO_ATTACH_REUSEPORT_CBPF 51
 #define SO_ATTACH_REUSEPORT_EBPF 52
 #define SO_CNX_ADVICE           53
+#define SCM_TIMESTAMPING_OPT_STATS 54
 
 #ifndef SOL_SOCKET
 #define SOL_SOCKET      1