]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
ss: report ecnseen
authorEric Dumazet <eric.dumazet@gmail.com>
Wed, 16 Nov 2011 07:59:06 +0000 (07:59 +0000)
committerStephen Hemminger <shemminger@vyatta.com>
Wed, 23 Nov 2011 22:51:54 +0000 (14:51 -0800)
Support ECNSEEN reporting in ss command.

ESTAB      0      0           10.170.73.123:4900
10.170.73.125:51001    uid:501 ino:385994 sk:f31e5f00
         mem:(r0,w0,f0,t0) ts sack ecn ecnseen bic wscale:8,8 rto:210
rtt:18.75/15 ato:40 cwnd:10 send 69.9Mbps rcv_space:32768

"ecn" means TCP session negociated ECN capability (TCP layer) at setup
time

"ecnseen" at least one frame with ECT(0) or ECT(1) or ECN (IP layer) was
received from peer.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
include/netinet/tcp.h
misc/ss.c

index 282b29c5dae64a7f8ccb3d0e88158376b1c17bca..3f890a1326ed91cfa0dcaecb64a379bdee32990b 100644 (file)
@@ -172,6 +172,7 @@ enum
 # define TCPI_OPT_SACK         2
 # define TCPI_OPT_WSCALE       4
 # define TCPI_OPT_ECN          8
+# define TCPI_OPT_ECN_SEEN     16
 
 /* Values for tcpi_state.  */
 enum tcp_ca_state
index af774d142479f9bf9eb23fccdc4878b9893f032f..5ce40c04e69017f5440f9deba47c75381fd85a9d 100644 (file)
--- a/misc/ss.c
+++ b/misc/ss.c
@@ -1363,6 +1363,8 @@ static void tcp_show_info(const struct nlmsghdr *nlh, struct inet_diag_msg *r)
                                printf(" sack");
                        if (info->tcpi_options & TCPI_OPT_ECN)
                                printf(" ecn");
+                       if (info->tcpi_options & TCPI_OPT_ECN_SEEN)
+                               printf(" ecnseen");
                }
 
                if (tb[INET_DIAG_CONG])