]> git.hungrycats.org Git - linux/commitdiff
[TCP]: Add receive DRS info to tcp_info.
authorStephen Hemminger <shemminger@osdl.org>
Mon, 7 Jun 2004 08:28:12 +0000 (01:28 -0700)
committerStephen Hemminger <shemminger@osdl.org>
Mon, 7 Jun 2004 08:28:12 +0000 (01:28 -0700)
include/linux/tcp.h
net/ipv4/tcp_diag.c

index a405c0f7d84123a4a09a0790cf2ed3173afc43fe..39e2d22619dcf173752634e529c325d9a1755eab 100644 (file)
@@ -183,6 +183,9 @@ struct tcp_info
        __u32   tcpi_snd_cwnd;
        __u32   tcpi_advmss;
        __u32   tcpi_reordering;
+
+       __u32   tcpi_rcv_rtt;
+       __u32   tcpi_rcv_space;
 };
 
 #ifdef __KERNEL__
index ff047707bbb88de6cfe42c839c393dcce8e750f0..5506944b7e7cbc621943fc4d80eed957be12b8c0 100644 (file)
@@ -91,6 +91,9 @@ void tcp_get_info(struct sock *sk, struct tcp_info *info)
        info->tcpi_snd_cwnd = tp->snd_cwnd;
        info->tcpi_advmss = tp->advmss;
        info->tcpi_reordering = tp->reordering;
+
+       info->tcpi_rcv_rtt = ((1000000*tp->rcv_rtt_est.rtt)/HZ)>>3;
+       info->tcpi_rcv_space = tp->rcvq_space.space;
 }
 
 static int tcpdiag_fill(struct sk_buff *skb, struct sock *sk,