Commit Graph

520 Commits

Author SHA1 Message Date
Bruce A. Mah
c550ef4605 Non-platform-specific detection of TCP_CONGESTION socket option.
Rather than checking for anything Linux-specific at configure-time,
see if TCP_CONGESTION is defined in <netinet/tcp.h> and if so define
a CPP variable HAVE_TCP_CONGESTION, which we then use to enable
conditional compilation of the code for this feature.
2014-04-10 10:53:18 -07:00
Bruce A. Mah
e90f34f61a Merge remote-tracking branch 'origin/master' into feature/sctp-build-fixes 2014-04-09 13:55:03 -07:00
Bruce A. Mah
449f47e4ef
Use the PACKAGE_BUGREPORT and PACKAGE_STRING macros from automake
in --help and --version.  Notably this provides the correct URL
for the bugtracker.
2014-04-09 13:29:03 -07:00
Bruce A. Mah
cfed9382b7
Get rid of definitions of ntohll and htonll that were broken on FreeBSD.
These macros were never used anywhere in iperf3 anyways, and
conflicted with macro definitions that were in FreeBSD's system
headers.

Bump copyright date and add a comment to inclusion guard while here.
2014-04-09 11:28:02 -07:00
Bruce A. Mah
81f9bbb451 Regen. 2014-04-09 10:36:32 -07:00
Bruce A. Mah
cd81de3c0a
Rework detection / enabling of SCTP support.
Rather than doing checks for platforms that we believe support SCTP,
instead look for an indication (notably the presence of <netinet/sctp.h>)
that it's supported.  This makes the conditionals for SCTP more obvious.
In addition, it opens up the possibility that SCTP might work on some
new OS that's not FreeBSD or Linux.

This change may force some additional build-time requirements on Linux,
such as lksctp-tools-devel on CentOS / Fedora or libsctp-dev on
Ubuntu.

Committing this first cut for review and to enable testing on multiple
platforms.  So far this works correctly on Linux (SCTP support) and
MacOS (no SCTP support).
2014-04-09 10:29:16 -07:00
Bruce A. Mah
e3990c3cc0
Provide more useful links to get to content in a hurry.
While here some minor formatting tweaks.
2014-04-08 10:50:42 -07:00
Bruce A. Mah
7a80dfb20e
Minor doc-building fix-ups.
Put the sphinx-generated docs/Makefile under revision control like it
should have been from the start (requires some changes and fixes
to .gitignore).

Change project name from iperf to iperf3 in a few generated places in
the documentation pages, most notably the page headers.
2014-04-08 10:27:16 -07:00
Bruce A. Mah
2939863b1a
Resolves #147.
Squashed commit of the following:

commit 23ef0d047fb5396df671be9245f7872153fc299c
Author: Bruce A. Mah <bmah@es.net>
Date:   Mon Apr 7 13:35:29 2014 -0700

    Add a few API calls to the client-side example program so we can
    exercise recently-added JSON-related functionality.

commit 5f8301e8d0380133d533da9b2e39ca4ac522e1c3
Author: Bruce A. Mah <bmah@es.net>
Date:   Mon Apr 7 13:16:39 2014 -0700

    Revert part of earlier change.

    We still want to save the JSON for libiperf consumers that might want it,
    but preserve the prior behavior of writing that JSON to stdout.  This
    maintains (roughly) the behavior of older libiperf, in which libiperf
    consumers (such as the iperf3 executable) do not need to explicitly print
    the JSON if that's all they're doing with it.

commit 173dcdb05867af00103205bfe39d1b71e18689e9
Author: Bruce A. Mah <bmah@es.net>
Date:   Tue Mar 25 13:55:45 2014 -0700

    Update manpage for newly-added library calls.

    Bump document date while here.

    Part of Issue #147.

commit 51a275de9463febc440d41cee9d971fcd381e01c
Author: Bruce A. Mah <bmah@es.net>
Date:   Tue Mar 25 13:30:09 2014 -0700

    Allow consumers of libiperf3 to get the JSON output for a just-completed test.

    This changes the behavior of iperf_json_finish() so that it no longer
    outputs JSON output, but saves the rendered output in a NUL-terminated
    string buffer.  After calling iperf_run_server() or iperf_run_client(),
    the client application should check iperf_get_test_json_output() to see
    if it returns a non-NULL pointer.  If so, there is JSON data available
    for it to print or otherwise consume.  The buffer is automatically
    deallocated when the containing iperf_test structure is deallocated
    with iperf_free_test().

    Also adds a new API call iperf_get_test_outfile() to find the output
    FILE* structure.

    Modifies the iperf3 application to use the new API.  Users of iperf3
    will not notice any functional change.

    No effect in "normal" output mode (non-JSON).
2014-04-07 14:12:47 -07:00
Bruce A. Mah
8c369d40f4
Minor updates, wording fixes, etc. 2014-04-07 11:02:32 -07:00
Bruce A. Mah
95d7c7d5fd Tweak .gitignore so we don't obsess over a documentation directory. 2014-04-07 10:23:01 -07:00
Bruce A. Mah
14741dcbb4 First pass at new iperf3 documentation, implemented in reStructuredText.
Building and deploying the documentation requires some infrastructure
that's not part of this tree.
2014-03-31 11:52:23 -07:00
Bruce A. Mah
6a3cd13e36 Merge commit 'a3356c98134c9e2995207a00c40276587de05bc2' as 'docs/_esnet' 2014-03-28 14:55:12 -07:00
Bruce A. Mah
a3356c9813 Squashed 'docs/_esnet/' content from commit c02bf57
git-subtree-dir: docs/_esnet
git-subtree-split: c02bf57d43dbfcd7c727cdd17c54f0a480279f9a
2014-03-28 14:55:12 -07:00
Bruce A. Mah
b479182cd2
Make this work on old git (1.7). 2014-03-26 11:05:40 -07:00
Bruce A. Mah
d467b2912a
Update release notes on mainline. 2014-03-26 10:04:03 -07:00
Bruce A. Mah
73936538a7
Minor style fixes, no functional change.
Related to Issue #155.
2014-03-25 13:05:03 -07:00
Bruce A. Mah
13b65724fb Merge pull request #155 from ajaissle/patch-1
Prevent possible buffer overflow in iperf_error.c
2014-03-25 12:59:57 -07:00
Aeneas Jaißle
ce38fb1029 Prevent possible buffer overflow in iperf_error.c 2014-03-25 14:09:21 +01:00
Bruce A. Mah
2808a0b6c4 Fix a crash that can be triggered by libiperf3 clients that don't use
iperf_parse_arguments().  Basically we need to initialize the
output stream in the iperf_test structure regardless of whether
iperf_parse_arguments() gets called; some programs (in particular
the programs in the examples/ directory and bwctl) don't do this
(and indeed should not need to).

This problem was introduced in the solution for Issue #119; the fix
needs to be merged to any codeline where fixes for Issue #119 go.
2014-03-20 10:24:25 -07:00
Bruce A. Mah
6c03583982
Update for files in examples/ directory. 2014-03-20 10:02:25 -07:00
Bruce A. Mah
5d2f2cf983 Regen. 2014-03-20 09:58:27 -07:00
Bruce A. Mah
ad319fac6f
automake / libtool support for programs in the examples/ subdirectory.
Addresses part of Issue #152.
2014-03-20 09:52:09 -07:00
Bruce A. Mah
082157bdb0
MacPorts installs libtoolize as glibtoolize. Autodetect this and DTRT. 2014-03-20 09:46:04 -07:00
Bruce A. Mah
974c88e8d9
Include summary structures in JSON even if there's only one stream.
This makes consuming the JSON easier and more consistent.

Resolves #151.

Submitted by:	@i2aaron
2014-03-18 09:44:37 -07:00
Bruce A. Mah
3fa8072e9b Fix a call to iprintf(), also fix sequencing of some output flushes.
Related to Issue #119.
2014-03-14 15:48:31 -07:00
Bruce A. Mah
aeb6938d5a
Support --logfile argument to make all output go to a file.
This works for both client and server side (in the case of the server,
either for daemon or non-daemon mode).

Consistifies a few places that were using printf instead of iprintf.

Fixes Issue 119.
2014-03-14 14:23:38 -07:00
Bruce A. Mah
3f5f7f7591
Minor whitespace fixes that make the markdown output make more sense
(but try to preserve aesthetics as a plain text file).
2014-03-12 14:04:14 -07:00
Bruce A. Mah
fbf7a3b3d5
This file doesn't really add value, get rid of it. 2014-03-11 09:34:18 -07:00
Bruce A. Mah
49a345cc02 Roll tarballs slightly differently so we actually get compression.
We were relying on "git archive" being able to create tar.gz files,
but that ability isn't present in the git that comes with CentOS 6,
so we use git to create a tar file and then compress it ourselves.
2014-03-10 13:30:20 -07:00
Brian Tierney
e684b144d6 Merge branch 'master' of https://github.com/esnet/iperf 2014-03-06 17:15:04 -08:00
Brian Tierney
7f6c44f325 Updating 'known issues' for Linux TCP buffer size oddness 2014-03-06 17:03:19 -08:00
Bruce A. Mah
7af6d5a2f9
In debug mode, print out SO_SNDBUF when setting up each socket
(regardless of whether this was set explicitly or not).
2014-03-06 15:11:25 -08:00
Bruce A. Mah
c9cfca0a93
Update release notes for mainline changes since 3.0.1 release. 2014-03-04 15:13:36 -08:00
Bruce A. Mah
dc1dd2dc7d Regen to pick up changes from issue #146. 2014-03-04 14:34:40 -08:00
Bruce A. Mah
3c4ef74e5e
Build libiperf3 as both a shared library and a static library by default.
Use --disable-static or --disable-shared to build only one flavor
of libraries.

Tested on MacOS, FreeBSD, and CentOS 6 Linux.

Resolves #146.

Originally submitted by:	@i2aaron
2014-03-04 14:31:35 -08:00
Bruce A. Mah
2be606a503
Three-clause BSD license, not two-clause. Also tweak more README text. 2014-02-28 17:52:52 -08:00
Bruce A. Mah
34a7596545 Point downloads to a directory, not a single file. 2014-02-28 15:38:36 -08:00
Bruce A. Mah
0f72a12069
See if we can get GitHub to properly parse markdown if the README file
has the right extension.
2014-02-28 14:17:16 -08:00
Bruce A. Mah
396ccaf45c
Reorganize the README, and try to format it so it looks better when
it's displayed on the iperf page on GitHub.

I wish there was a way to preview this change before pushing it.
2014-02-28 13:44:12 -08:00
Bruce A. Mah
f274eea090
Minor tweaks to README. 2014-02-28 10:08:35 -08:00
Bruce A. Mah
c897d7368a
Try to make make_release work for git. "tar" works, "tag" might. 2014-02-28 09:37:34 -08:00
Bruce A. Mah
103838183a Update version and bug-report fields in AC_INIT and regen files. 2014-02-27 22:40:01 -08:00
Bruce A. Mah
70e4b713b7
Update URLs pointing to Google Code to use GitHub.
While here, update a couple of dates in manpages.
2014-02-27 21:56:53 -08:00
Bruce A. Mah
445a25c059 Try to convert .hgignore to .gitignore. 2014-02-27 18:38:00 -08:00
Bruce A. Mah
91d5d5e717 Increase buffer size for formatted numeric quantities, to avoid truncation.
This can happen if the user forces a particular output format that leads
to many digits (6 or more) being printed.  The new buffer size is probably
larger than it needs to be, but better safe than sorry.

Fixes Issue 142.
2014-02-21 14:24:56 -08:00
Bruce A. Mah
a3736b64e7 Don't append a colon and two spaces to title in --json output.
Resolves Issue 139.
2014-02-21 13:24:38 -08:00
Bruce A. Mah
f2c4e2b5bd Provide an API call in libiperf to set the test unit format.
Resolves Issue 144.

Submitted by:	 AaronMatthewBrown
2014-02-21 13:07:55 -08:00
Bruce A. Mah
3eaf324ab3 Remove incorrect references to multicast from -B documentation.
(This is partially because iperf3 doesn't do multicast, yet.)

Also it's not specifically a client-side option, so relocate it in
the manpage.
2014-02-14 14:58:01 -08:00
Bruce A. Mah
ede8dabb83 Set the default message size for SCTP to 64KB.
This makes SCTP with default parameters work on CentOS 6; formerly
it was just using the TCP default (128KB) and failing with
a "message too long" error.  It might be possible to fix this with
some manipulation of other default values, so that TCP and SCTP
can use the same default message size, but I haven't figure out
what this would be.

This ties up one loose end from Issue 131.
2014-02-14 14:06:08 -08:00