Don't count data for tests received after the end of a test.
This prevents is from reporting an incorrect number of bytes
received at the end of the test, which doesn't match up with the
sum of the data received during the test intervals.
Log late receives if debugging mode enabled.
Fixes#692.
This can happen with multiple parallel streams or with two single
stream tests run close together in time.
The fix is to allow flow labels to be reused by multiple sockets
simultaneously or within their timeout.
Submitted by @cygnus2048 and fixes#689.
Might be useful for other platforms as well (no effects on Linux
because the semantics of listen(2) are subtly different there).
Submitted by Matt Macy. Fixes#691.
The user-visible symptom was messages of the following form on the
server:
iperf3: the client has unexpectedly closed the connection
This bug was introduced in #597 and was present in iperf 3.2 and 3.3.
Fixes#677.
That mention points to the iperf3 FAQ, which contains information
about the history of iperf2 and iperf3, and a pointer to continued
iperf2 development. Suggested by a comment from @beau-williamson
in #27.
* Attempt to quiet a warning with print(3) formatting. As a part of this, factor out PRIu64 support / compatibility (added in #664) into a header file and make it more portable by taking into account the size of a long integer. Based on email conversation with: @pprindeville.
* Follow-up to pull request #669, fixing compiler warnings on platforms that don't have HAVE_TCP_CONGESTION defined.
Namely, getsock_tcp_mss(), set_tcp_options() and iperf_test_reset().
Also fix a typo in the libiperf manual;
iperf_test_reset() was listed instead of iperf_reset_test().
* EXIT_SUCCESS and EXIT_FAILURE are defined in stdlib.h, not sysexits.h
so no need to include the latter.
* No need to include pthread.h.
* Remove the no longer used delay() function.
This also removes the reliance on nanosleep().
* Remove get_tcp_windowsize() and set_tcp_windowsize() which are unused.
These days, iperf uses get/setsockopt() with SO_SNDBUF SO_RCVBUF directly.
* Fix warnings about _GNU_SOURCE being redefined.
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
* Fix warnings of format-specified mismatching type
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
* Simplify endianness checks
Linux can be built with too many types of C run-time library and it's
not reasonable to have to enumerate all of them, especially since at
least one of them (MUSL) goes out of its way to not be easily
detectable.
Instead, leverage autoconf better for Linux/BSD to detect either
<endian.h> or <sys/endian.h> directly.
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
* Sys headers should not be included directly
There's usually a top-level header which then includes the sys/
descendent.
Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>