diff options
author | Davide Caratti <dcaratti@redhat.com> | 2022-03-03 16:19:32 +0100 |
---|---|---|
committer | David Ahern <dsahern@kernel.org> | 2022-03-04 09:40:27 -0700 |
commit | 5e17b715295f76709f4088ae5374ae1cadcc2029 (patch) | |
tree | 1f0d627eae8b0bc41689fda4cc453cf77bf87ba5 | |
parent | 07cebdd00d5857a3c79e36e513a957ae1e88f4d6 (diff) | |
download | iproute2-5e17b715295f76709f4088ae5374ae1cadcc2029.tar.gz |
ss: display advertised TCP receive window and out-of-order counter
these members of TCP_INFO have been included in v5.4.
tested with:
# ss -nti
Signed-off-by: Davide Caratti <dcaratti@redhat.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
-rw-r--r-- | misc/ss.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -854,6 +854,8 @@ struct tcpstat { unsigned int reord_seen; double rcv_rtt; double min_rtt; + unsigned int rcv_ooopack; + unsigned int snd_wnd; int rcv_space; unsigned int rcv_ssthresh; unsigned long long busy_time; @@ -2654,6 +2656,10 @@ static void tcp_stats_print(struct tcpstat *s) out(" notsent:%u", s->not_sent); if (s->min_rtt) out(" minrtt:%g", s->min_rtt); + if (s->rcv_ooopack) + out(" rcv_ooopack:%u", s->rcv_ooopack); + if (s->snd_wnd) + out(" snd_wnd:%u", s->snd_wnd); } static void tcp_timer_print(struct tcpstat *s) @@ -3088,6 +3094,8 @@ static void tcp_show_info(const struct nlmsghdr *nlh, struct inet_diag_msg *r, s.reord_seen = info->tcpi_reord_seen; s.bytes_sent = info->tcpi_bytes_sent; s.bytes_retrans = info->tcpi_bytes_retrans; + s.rcv_ooopack = info->tcpi_rcv_ooopack; + s.snd_wnd = info->tcpi_snd_wnd; tcp_stats_print(&s); free(s.dctcp); free(s.bbr_info); |