1
1
Граф коммитов

69 Коммитов

Автор SHA1 Сообщение Дата
Bruce A. Mah
da9f046f19
Update license and copyright text to conform to LBNL standards.
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-29 14:00:46 -07:00
Bruce A. Mah
a1861d5f87
Rename locale.{c,h} to iperf_locale.{c,h} to avoid filename collision
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-15 10:42:36 -07:00
Bruce A. Mah
426221a327
Check HAVE_STDINT_H before trying to include <stdint.h>.
Partial fix for compilation on some Solaris versions.  Fixes #175.

Submitted by:	@marksolaris
2014-05-19 10:15:36 -07:00
Bruce A. Mah
081ba8e4e9
Commit a version of the patch for #125 for testing.
Originally submitted by:	@i2aaron
2014-04-16 16:23:13 -07:00
Bruce A. Mah
40050b7bee
Fix breakage due to iperf.h depending on the autoconf config.h file but
not including it.

To fix this required us to change config.h to iperf_config.h (to
avoid potential filename collisions with this generic name).  Then
iperf.h could include this.

Adjust the existing header file inclusions to track this, and also
canonicalize their inclusion to be at the top of *.c files.
2014-04-14 13:33:33 -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
441d8b75a0 Add support for writing the PID to a file in server mode.
This is specified with the -I or --pidfile option.

Issue:		120 (PID file support)
2014-01-24 16:42:10 -08:00
Bruce A. Mah
ac0786c828 Fix typos: s/exitting/exiting/
Bump a couple of copyright dates while here.
2014-01-03 11:24:06 -08:00
Bruce A. Mah
fe4a13ab4d Support daemonizing with -D flag.
Possible related work still under consideration:

o Use syslog in daemon mode for output that would normally go to
  stdout / stderr.

o Write a PID file.

This is basically the gist of Issue 105.
2013-11-26 15:40:19 -08:00
Jef Poskanzer
afe6222a89 Move termination signal handing from main into iperf_run_client
and iperf_run_server, so that API users get it too.  Also, call
iperf_errexit with an appropriate message, which in -J mode dumps
out any accumulated JSON data.
2013-10-29 15:03:17 -07:00
Jef Poskanzer
019434022c test->state needs to be explicitly signed char to accomodate a couple
of error states which are negative.  On most systems this doesn't
matter because char is signed, but on ARM CPUs char is unsigned.
2013-08-16 13:19:42 -07:00
Jef Poskanzer
cf06ba653a Server now exits after five consecutive errors. 2013-06-07 15:28:05 -07:00
Jef Poskanzer
a27f6534b5 Added second concurrency model based on SIGALRM. 2013-04-09 11:42:30 -07:00
Jef Poskanzer
e96ab74093 Move the JSON initialization/finalization insode the API. 2013-03-08 20:56:52 -08:00
Jef Poskanzer
b5e0751f59 (Mostly) switched error reporting to a single routine that handles JSON mode. 2013-02-07 12:35:17 -08:00
Jef Poskanzer
9bfb54c0cc Add -J flag to produce JSON output instead. 2013-02-01 11:42:35 -08:00
Jef Poskanzer
d7613a8e9f Allow API client to provide an fd for the client-side control socket. 2012-12-13 09:37:55 -08:00
Jef Poskanzer
ec2d0670b8 Switched to using a new timer package, adapted from thttpd and http_load. 2012-12-11 22:29:26 -08:00
jef
98ce496b1b Some changes to the iperf3 API to work with bwctl, mostly having to
do with what defs are in which include file.  End result is we now have
only one public include file, iperf_api.h.
2012-09-28 16:00:14 -07:00
Jon Dugan
7d375156aa update license info for all source files 2011-04-20 20:33:09 +00:00
Jon Dugan
1fac1d2626 add queue.h from OpenBSD; use self contained queue.h from OpenBSD; fix indenting on previous commit 2010-09-08 20:35:47 +00:00
sethdelliott
0bd8d9da6e Added ability to set TCP window size (-w). Modified code to keep test structures intact after a test is complete. Improved interval timer granularity. Fixed a bug with timeval_diff. 2010-08-02 22:45:53 +00:00
sethdelliott
4559e27a01 Small bug fix to main.c 2010-07-29 19:18:29 +00:00
sethdelliott
ffdcc7d457 Updated iperf_error and moved the SIGINT handler out of the library 2010-07-27 22:11:09 +00:00
sethdelliott
18631aacdb Moved client code from iperf_api.* to iperf_client_api.* 2010-07-23 22:48:48 +00:00
sethdelliott
66ce7ad49d Made the protocol implementation better. Lots of code clean up 2010-07-22 23:26:38 +00:00
sethdelliott
8a0b5a5d18 Added support for adding new protocols. Slightly modified iperf_error() 2010-07-22 18:57:08 +00:00
sethdelliott
b60a49dd37 All error handling is now handled by iperf_error. Also cleaned up some code 2010-07-20 22:27:50 +00:00
sethdelliott
3118b42010 All client side error handling is now handled by iperf_error 2010-07-20 00:03:03 +00:00
sethdelliott
01ca972b6c Updated autoconf stuff and fixed a small error with ierror() 2010-07-19 20:38:40 +00:00
sethdelliott
8430ad49e6 Added iperf error code (iperf_error.*). Also added iperf_parse_parameters(). 2010-07-19 19:45:08 +00:00
sethdelliott
8556db5d08 Added support for UDP mode (-b mode not yet supported). Added htonll/ntohll functions. Cleaned up code. 2010-07-14 23:24:58 +00:00
sethdelliott
bfd0c25dba Fixed an error when compiling on Ubuntu systems. Also fixed a small server memory leak. 2010-07-01 21:21:04 +00:00
sethdelliott
1c9c053c6c Updated code to make '-s' parameter a requirement while running server. Also added usage() and usage_long() functions for printing out iperf usage messages. 2010-06-25 00:31:15 +00:00
sethdelliott
29e3ec74c3 Fixed a bug that caused getopt not to work properly when command line arguments are given to the server. 2010-06-24 22:02:24 +00:00
sethdelliott
465b565c50 New control socket design now works. Now working on finishing up the reporting. 2010-06-23 19:13:37 +00:00
sethdelliott
982c704a8a NOTE: This is not a working revision. I'm in the process of redesigning how the client and server communicate. It will be fixed soon 2010-06-18 21:08:50 +00:00
sethdelliott
3e402adeb7 Updated reporter callback, interval report, and the tcp info report to print out its message rather than allocating memory. 2010-06-16 20:32:01 +00:00
sethdelliott
2d8bc019f7 Fixed client side code to be more module and follow state diagram. 2010-06-15 22:26:12 +00:00
sethdelliott
aebbe3a08f Updated the client code to behave like the state machine for TEST_START 2010-06-14 23:49:41 +00:00
Jon Dugan
e088d2d305 move the parameter exchange into iperf_run_client() where it belongs; propogate return status 2010-02-09 07:29:13 +00:00
Brian Tierney
d033e8cefc more valgrind-based cleanup of memory usage 2009-11-16 20:26:20 +00:00
Brian Tierney
01a5081d51 working on fixing TCP_INFO, in progress 2009-11-16 01:58:22 +00:00
Brian Tierney
b9cef2e24c cleanup of interval_results linked list and stats_callback function. Now uses
a pointer to the last element so doesnt walk the list every time.
2009-11-13 20:14:06 +00:00
Brian Tierney
7d8b10f945 added version.h to svn, and other minor changes 2009-11-13 18:29:10 +00:00
Brian Tierney
c44d17d1f7 added AUTHORS fie, and more info to README 2009-11-13 13:59:07 +00:00
Brian Tierney
08dc8710e1 added -v (version option) 2009-11-10 17:05:44 +00:00
Brian Tierney
d44c04d478 fixed bug with -i mode in the server 2009-11-10 16:03:17 +00:00
Brian Tierney
e99faeae86 more cleanup and bug fixes 2009-11-10 04:41:42 +00:00
Brian Tierney
a3281a3dc6 parallel streams now mostly working. Still some issues with repeated connections 2009-11-06 07:25:10 +00:00