aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2014-09-29Update license and copyright text to conform to LBNL standards.Bruce A. Mah
Note that the license remains a 3-clause BSD license; the only license changes were to add the name of the program and to add some punctuation.
2014-09-22Don't pass NULL when we really mean to pass 0.Bruce A. Mah
Fixes a warning on MacOS.
2014-09-22Fix a couple of printf format warnings.Bruce A. Mah
Also if we try to compile on an unsupported platform, emit some code in portable_endian.h that at least has a chance of compiling, rather than erroring out right away. For #191.
2014-09-19Make this work on FreeBSD.Bruce A. Mah
From my understanding this should make it work on NetBSD and Dragonfly as well. Part of #191.
2014-09-19Make portable_endian.h more portable.Bruce A. Mah
Add a minimal amount of stuff so we can compile on Solaris 11. Fixes (sort of) #191.
2014-09-19Use HAVE_STDINT_H to prevent a recurrence of #175.Bruce A. Mah
2014-09-16Merge pull request #206 from duyaokun/fix-compile-cjson-errorBruce A. Mah
Fixed compilation error in src/cjson.c observed in Visual Studio 2013. This problem didn't cause breakage on any other platform, but this change should have been present anyway. (cherry picked from commit dd2968f21e641945026db4bbdf02b3c13f833d74) Signed-off-by: Bruce A. Mah <bmah@es.net>
2014-09-15Fix build on OpenBSD (tested on 5.4).Bruce A. Mah
Breakage was introduced with commits for Issue #191.
2014-09-15Comment fix: Fix the option associated with iperf_test.bind_port.Bruce A. Mah
No functional change.
2014-09-15Support --cport and --parallelKevin Constantine
When running multiple parallel streams, the specified port number is incremented for each successive stream. Signed-off-by: Kevin Constantine <kevin.constantine@gmail.com>
2014-09-15Fix declaration of iperf_test.bind_portKevin Constantine
Signed-off-by: Kevin Constantine <kevin.constantine@gmail.com>
2014-09-15Minor documentation updates for new --cport option.Bruce A. Mah
For #207.
2014-09-15Merge branch 'master' of github.com:kevinconstantine/iperf into ↵Bruce A. Mah
kevinconstantine-master
2014-09-15specify client-side port: UDP supportKevin Constantine
--cport can be specified for udp connections Signed-off-by: Kevin Constantine <kevin.constantine@gmail.com>
2014-09-15specify client-side port: Only support --cportKevin Constantine
Remove support for short-option -e Signed-off-by: Kevin Constantine <kevin.constantine@gmail.com>
2014-09-15Regen.Bruce A. Mah
2014-09-15Rename locale.{c,h} to iperf_locale.{c,h} to avoid filename collisionBruce A. Mah
with system header <locale.h>. This apparently fixes problems on an ARM build, but this was generally broken anyway. It's slightly amazing this didn't cause problems before; perhaps we never used <locale.h> before? Addresses #203.
2014-09-09Add support for specifying client-side epemeral portKevin Constantine
-e/--cport now allows a user to specify the client-side port used for data transfer. Signed-off-by: Kevin Constantine <kevin.constantine@gmail.com>
2014-08-28Add a --udp-counters-64bit feature to support very long UDP tests.Bruce A. Mah
UDP tests store a packet sequence number in the packets to detect loss and ordering issues. This sequence number is a 32-bit signed integer, which can wrap during very long-running UDP tests. This change adds an option (defaulting to off) which uses a 64-bit unsigned integer to store this quantity in the packet. The option is specified on the client side; the server must support this feature for proper functioning (older servers will interoperate with newer clients, as long as --udp-counters-64-bit is not used). The default might be changed in a future version of iperf3. As a part of this change, the client sends its version string to the server in the parameter block. Uses a public-domain compatibility shim for 64-bit byte order conversions. There are probably some additional platforms that need to be supported, in particular Solaris. We might add some configure-time checks to only enable this feature on platforms where we can support the byte-order conversions. This change is not well-tested. Towards issue #191.
2014-08-27Fix a problem that could disrupt existing tests.Bruce A. Mah
By design, an iperf3 server only runs one test at a time. New connections from other clients (during an existing test) are rejected. A problem is that the server code that rejects the test tries (for some reason) to read the cookie from the client, even though it's going to reject the connection anyway. A way to break an existing test is: With a test running, make a TCP connection to the server's control port (this can easily be done with a telnet client). The server will hang in a blocking read call trying to read the cookie from a non-existent client, while the test is essentially frozen. The fix is to remove the attempted read of the cookie. Fixes #202.
2014-08-25When parsing the -b (bandwidth) argument, use 10-based suffices.Bruce A. Mah
We support using k, m, and g as suffices on input values. In most cases these are 2-based suffixes (i.e. K == 1024) because they are sizes of objects. In the case of rates, we need to use 10-based suffices (i.e. K == 1000). We do this by implementing (using copy-and-paste) a unit_atof_rate() subroutine that parses strings similarly to unit_atof but using 10-based suffices instead. Fixes #173.
2014-08-25Note that specifying -b 0 disables bandwidth limits.Bruce A. Mah
Documentation change only, no functional changes. Fixes #170.
2014-08-01Another iteration on issue #193, fixes -B with some TCP tests.Bruce A. Mah
When we do TCP tests and specify the socket buffer size, MSS, or TCP no delay option, the iperf3 server destroys the socket it was using to listen for the control connection and opens up a new listening socket for the test's data connections. This is (I think) to make sure that the data connections all have the correct TCP parameters. When we re-create the listening socket, we also need to go through the binding logic again (with all of the address family selectiion, etc. goop). The bug fixes that were a part of issue #193 need to be ported to this code as well. This problem only affects TCP tests, because for other protocols, the listening socket for data cannot be the same listening sock as for the control connection. While here, add some comments so anybody trying to understand this code will have an easier time. Based on patch by: @i2aaron
2014-07-24Minor doc fix: add some missing (?) characters in manpage.Bruce A. Mah
2014-07-24Add API methods to allow setting the bind_address test parameter.Bruce A. Mah
This is the same functionality as the -B iperf3 command-line option. Fixes #197.
2014-06-16Don't try to do IPV6_V6ONLY on OpenBSD either.Bruce A. Mah
setsockopt(3) returns an error if passing 0 to this option (which we do if no address family is specified when we bind to the wildcard address, say by invoking "iperf3 -s" with no other options). This is because OpenBSD explicitly does not support IPv4-mapped addresses, so even though the IPV6_V6ONLY socket options exists, it only works with a non-zero argument. Fixes #196.
2014-07-21Only do the IPV6_V6ONLY setsockopt(3) stuff if that option is available.Bruce A. Mah
Should fix #177, in which compilation failed on older Solaris systems that didn't have it. This is a different approach than a patch suggested in that issue. Weakly regression-tested on other platforms (test this by specifying -6, -4, or neither to the server when binding to the wildcard address, and seeing if a client can connect with various of -6, -4, or neither).
2014-07-17Fix a problem with binding to the wildcard address.Bruce A. Mah
On CentOS 6 and MacOS, if no address family was specified, we'd get back an IPv4 address from getaddrinfo(3), with the result that we couldn't accept IPv6 connections in the default server configuration. There was an earlier attempt at fixing this problem that caused Issue #193. This change is a follow-up fix to that issue. While here, put lots of comments around the fix so we remember why we're doing these shenanigans.
2014-07-17Fix two related bugs with -B and IPv4 addresses.Bruce A. Mah
If specifying -B with an IPv4 literal address or with an FQDN that resolved to an IPv4 address, but we had not explicitly specified an address family with -4, we failed to set up the socket correctly because we assumed binding to an IPv6 address, and instead (after some error spewage) wound up binding to wildcard address. The fix in this commit has multiple parts: First, if the address family hasn't been explictly specified, don't force AF_INET6 in the hints to getaddrinfo(3). AF_UNSPEC should generate the correct (according to RFC 6724) behavior. Second, iperf_reset_test() should not discard members that were passed from command-line parameters, because that alters the behavior of the iperf3 when it tries to recreate the listening socket. In the failure situation described in this issue (and possibly other as well), the value of -B gets discarded, so on subsequent attempts to set up the listening socket it just binds to the wildcard address. While here, fix on-line help related to the -B option to match reality. Note that we're not completely in compliance with RFC 6724, which states that we should actually try all of the addresses in returned by getaddrinfo(3), rather than just the first one. Fixes Issue #193.
2014-07-10Fix incorrect help text; "--num" should be "--bytes".Bruce A. Mah
Fixes issue #192.
2014-06-17Remove unnecessary inclusion of <sys/queue.h>, as well as some ifdef-edBruce A. Mah
out code that depended on it. Fixes #180.
2014-06-17Merge pull request #185 from ↵Bruce A. Mah
fornwall/struct-in6_flowlabel_req-already-defined-on-android in6_flowlabel_req is already defined on Android
2014-06-17Merge pull request #184 from fornwall/include-select-hBruce A. Mah
Include <sys/select.h> for select(2)
2014-06-16in6_flowlabel_req is already defined on AndroidFredrik Fornwall
2014-06-16Include <sys/select.h> for select(2)Fredrik Fornwall
The sys/select.h include is the correct one and fixes building on Android. See e.g. http://pubs.opengroup.org/onlinepubs/009604599/functions/pselect.html
2014-06-12Regen.Bruce A. Mah
2014-06-12Fix a bug in the structure of the --json output.Bruce A. Mah
The various "connected" structures were just dumped into the "start" structure. This caused problems if there were multiple connections (i.e. multiple parallel streams), because the "connected" structures would overwrite themselves. Instead, make these structures members of a "connected" array. This is technically an incompatible API change, but the prior behavior was unusable. Discovered and fix suggested by: @i2aaron
2014-06-11Revert "Explicitly run ldconfig after "make install"."Bruce A. Mah
This reverts commit 72d410561eabec2ffff3b714cf4c6bacc0b19b40.
2014-06-11Be more tolerant of certain autoconf-defined variables not beingBruce A. Mah
available. This can happen if needing to regenerate the autoconf goop on an older system (such as CentOS 6), where PACKAGE_URL doesn't get defined.
2014-06-11Fix programming misteak.Bruce A. Mah
Part of issue #160, pointed out by @i2aaron.
2014-06-09Fix build on Fedora 21.Bruce A. Mah
An open(2) call had two arguments instead of the required three. While here, replace a hard-coded mode in a different open(2) call with symbolic constants for readability. Fixes #183. Submitted by @ssahani.
2014-06-09Consolidate multiple (not current) copies of the author list intoBruce A. Mah
the GitHub Pages documentation and attempt to make current.
2014-06-05Implement a --get-server-output flag that allows the client toBruce A. Mah
retrieve (most of) the output emitted by the server. If the server was invoked with the --json flag, the output will be in JSON, otherwise it will be in the human-readable format. If the client was invoked with the --json flag, the output will be contained within the JSON output structure, otherwise it will be appended (in whatever format) to the bottom of the human-readable output. Because of the sequencing of the output generation and display, the server-side output includes only the starting output, interval statistics and summaries, but not the overall summaries. (The overall summaries were already displayed in the client's output.) Towards issue #160.
2014-05-19Another try at portability. Don't do -Werror. While probablyBruce A. Mah
the best thing to do from a code hygeine standpoint, it's too painful to try to get right for now. Fixes #174 (second try).
2014-05-19Portability fixes for Solaris Sun Studio and MacOS.Bruce A. Mah
Only do -Wall by default if on GCC (or something that looks like GCC, such as clang/llvm). Turn on -Werror so we can get some better error-checking, but we also need -Wno-deprecated-declarations at least for MacOS, because daemon(3) is deprecated starting with MacOS 10.5. Fixes #174 (I think). Submitted by: @marksolaris
2014-05-19Check HAVE_STDINT_H before trying to include <stdint.h>.Bruce A. Mah
Partial fix for compilation on some Solaris versions. Fixes #175. Submitted by: @marksolaris
2014-05-12Regen.Bruce A. Mah
2014-05-12Explicitly run ldconfig after "make install".Bruce A. Mah
This might address Issue #153.
2014-05-12Merge branch 'master' of github.com:/esnet/iperfBruce A. Mah
2014-05-12Add reverse member to start.test_start JSON, which is 1 in --reverse mode.Bruce A. Mah
This lets us tell easily from the JSON output whether a test was run in --reverse mode or not. Resolves #167 (one comment made in that issue anyway).