diff options
author | jef <jef@odev-vm-4.es.net> | 2012-11-28 07:22:51 -0800 |
---|---|---|
committer | jef <jef@odev-vm-4.es.net> | 2012-11-28 07:22:51 -0800 |
commit | 874856ab6bb8861c1a865bcac73bfc978df588b0 (patch) | |
tree | 15e792b42420442f955890a7e56f878586556124 /src/tcp_info.c | |
parent | 0d48915c69990badad5376f18eff591ad85dc1d2 (diff) | |
download | iperf3-874856ab6bb8861c1a865bcac73bfc978df588b0.tar.gz |
Show retransmit count for FreeBSD too. This may not actually
be implemented by the OS yet - the struct member starting with
a double underscore indicates that it's not fully implemented.
Diffstat (limited to 'src/tcp_info.c')
-rw-r--r-- | src/tcp_info.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/tcp_info.c b/src/tcp_info.c index 22e26dd..5cc63f3 100644 --- a/src/tcp_info.c +++ b/src/tcp_info.c @@ -56,8 +56,12 @@ has_tcpinfo_retransmits(void) #if defined(linux) return 1; #else +#if defined(__FreeBSD__) && __FreeBSD_version >= 600000 + return 1; +#else return 0; #endif +#endif } /*************************************************************/ @@ -80,8 +84,12 @@ get_tcpinfo_retransmits(struct iperf_interval_results *irp) #if defined(linux) return irp->tcpInfo.tcpi_retransmits; #else +#if defined(__FreeBSD__) && __FreeBSD_version >= 600000 + return irp->tcpInfo.__tcpi_retransmits; +#else return -1; #endif +#endif } /*************************************************************/ |