diff options
author | Bruce M Simpson <bms@FreeBSD.org> | 2007-02-02 18:34:18 +0000 |
---|---|---|
committer | Bruce M Simpson <bms@FreeBSD.org> | 2007-02-02 18:34:18 +0000 |
commit | 1baaf8347c4456bf08be6411d56cea565b1e03e7 (patch) | |
tree | 0ae1360fb35941307f57c06705ebfa1191ce32c5 | |
parent | e8117c82f6332bd20028ac50306bd43fd213d079 (diff) |
Notes
-rw-r--r-- | sys/netinet/tcp.h | 4 | ||||
-rw-r--r-- | sys/netinet/tcp_usrreq.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/sys/netinet/tcp.h b/sys/netinet/tcp.h index 2e3467a3b8f6..04c86633963b 100644 --- a/sys/netinet/tcp.h +++ b/sys/netinet/tcp.h @@ -208,8 +208,8 @@ struct tcp_info { /* Metrics; variable units. */ u_int32_t __tcpi_pmtu; u_int32_t __tcpi_rcv_ssthresh; - u_int32_t __tcpi_rtt; - u_int32_t __tcpi_rttvar; + u_int32_t tcpi_rtt; /* Smoothed RTT in usecs. */ + u_int32_t tcpi_rttvar; /* RTT variance in usecs. */ u_int32_t tcpi_snd_ssthresh; /* Slow start threshold. */ u_int32_t tcpi_snd_cwnd; /* Send congestion window. */ u_int32_t __tcpi_advmss; diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index 161814344c71..85f3222c0166 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -1245,6 +1245,10 @@ tcp_fill_info(tp, ti) ti->tcpi_snd_wscale = tp->snd_scale; ti->tcpi_rcv_wscale = tp->rcv_scale; } + + ti->tcpi_rtt = ((u_int64_t)tp->t_srtt * tick) >> TCP_RTT_SHIFT; + ti->tcpi_rttvar = ((u_int64_t)tp->t_rttvar * tick) >> TCP_RTTVAR_SHIFT; + ti->tcpi_snd_ssthresh = tp->snd_ssthresh; ti->tcpi_snd_cwnd = tp->snd_cwnd; |