diff options
author | Bruce A. Mah <bmah@es.net> | 2014-02-14 11:17:43 -0800 |
---|---|---|
committer | Bruce A. Mah <bmah@es.net> | 2014-02-14 11:17:43 -0800 |
commit | d076653bd4a92a1587c8214a6e0603e25eda2307 (patch) | |
tree | dcaedcb49d2f2480aaa2ee160a0900e229695d24 /src/tcp_info.c | |
parent | 4addea850295d28afff630cb436000f0cb8988c0 (diff) | |
download | iperf3-d076653bd4a92a1587c8214a6e0603e25eda2307.tar.gz |
Output TCP snd_cwnd (on platforms supporting it) in normal output.
We were computing and printing this in JSON output mode anyway; this
change just exposes this quantity in a human-friendly manner (better
than the first attempt at this) when doing normal output.
Resolves Issue 99 (Additional TCP_INFO items).
Diffstat (limited to 'src/tcp_info.c')
-rw-r--r-- | src/tcp_info.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/tcp_info.c b/src/tcp_info.c index dd07ef3..b0336fa 100644 --- a/src/tcp_info.c +++ b/src/tcp_info.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2013, The Regents of the University of California, + * Copyright (c) 2009-2014, The Regents of the University of California, * through Lawrence Berkeley National Laboratory (subject to receipt of any * required approvals from the U.S. Dept. of Energy). All rights reserved. * @@ -81,6 +81,12 @@ save_tcpinfo(struct iperf_stream *sp, struct iperf_interval_results *irp) if (getsockopt(sp->socket, IPPROTO_TCP, TCP_INFO, (void *)&irp->tcpInfo, &tcp_info_length) < 0) iperf_err(sp->test, "getsockopt - %s", strerror(errno)); + + if (sp->test->debug) { + printf("tcpi_snd_cwnd %u tcpi_snd_mss %u\n", + irp->tcpInfo.tcpi_snd_cwnd, irp->tcpInfo.tcpi_snd_mss); + } + #endif } |