Bruce A. Mah
73936538a7
Minor style fixes, no functional change.
...
Related to Issue #155 .
2014-03-25 13:05:03 -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
5d2f2cf983
Regen.
2014-03-20 09:58:27 -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
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
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
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
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
Bruce A. Mah
60bd98a538
Add SCTP support with the --sctp flag (Linux and FreeBSD only).
...
Note this option only has a long option flag; we're running out of
letters for short options.
Based heavily on a patch submitted in Issue 131 (SCTP support for
iperf); I added support for FreeBSD and did some other packaging and
documentation improvements.
We probably shouldn't tie SCTP support to looking specifically for
Linux or FreeBSD; we probably leave support enabled all the time if
possible, possibly with some configure-time checks.
2014-02-14 11:52:16 -08:00
Bruce A. Mah
d076653bd4
Output TCP snd_cwnd (on platforms supporting it) in normal output.
...
We were computing and printing this in JSON output mode anyway; this
change just exposes this quantity in a human-friendly manner (better
than the first attempt at this) when doing normal output.
Resolves Issue 99 (Additional TCP_INFO items).
2014-02-14 11:17:43 -08:00
Bruce A. Mah
4addea8502
Fix unfiled bug that could break TCP tests under some circumstances.
...
The bug and solution are very similar to Issue 126 (fixed in
d7e0c1445c0a). Basically a setsockopt(IPV6_V6ONLY) call had a bogus
level argument, but we never checked the return value so we never
noticed this.
As with the prior issue, the fix is to unbreak the setsockopt() call,
and add some error checking to detect future breakage.
This bug was on a codepath that only got called if non-default values
were set for the socket buffer size, the MSS, or the NODELAY parameter.
It might have affected some FreeBSD tests, but really only got noticed
when debugging some other code that was (probably) cut-and-pasted
from this code.
2014-02-04 15:05:39 -08:00
Bruce A. Mah
9a829841eb
Replace system("uname -a") with call to uname(3).
...
Slightly reworked version of a patch that was...
Submitted by: Susant Sahani <ssahani@redhat.com>
2014-01-30 15:15:53 -08: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
09f54a4f44
Fix warning on platforms that don't support processor affinity.
...
No functional change.
2014-01-21 15:03:29 -08:00
Bruce A. Mah
723f2f7b2a
Fix an abort observed on MacOS X 10.9 (but applicable to other platforms).
...
mapped_v4_to_regular_v4() committed the sin of doing strcpy(3) on
overlapping buffers. This caused an abort on MacOS X 10.9. Fix this
to use memcpy(3) instead, which handles overlapping buffers correctly.
Issue: 135 (Crash on OS X when using IP address)
2014-01-21 12:59:47 -08:00
Bruce A. Mah
0ff7575499
Fix build on Linux distros that don't support TCP_CONGESTION.
...
Apparently older kernels don't support TCP_CONGESTION, so we can't
just test for defined(linux) to know if we can use this sockopt or not.
This change unbreaks the build on (notably) CentOS 5.
2014-01-16 10:43:08 -08:00
Bruce A. Mah
7234074fe8
Whoops. Forgot to document the -d flag properly. Do this.
2014-01-15 12:01:22 -08:00
Bruce A. Mah
cf59099b49
Add support for a -d debug flag to enable debugging output.
...
Mostly intended for developer use. At the moment there are no public
uses for this flag.
2014-01-15 10:27:33 -08:00
Bruce A. Mah
deefb95fea
Add FreeBSD support for -A (set CPU affinity).
...
Mostly this change consists of adding FreeBSD-specific code to handle
this feature. The concepts and system calls are very similar to what's
already done for Linux. One difference is that on FreeBSD, the CPU
affinity mask is saved before -A processing and restored afterwards.
This causes a slight change to the function signatures for
iperf_setaffinity() and iperf_clearaffinity() (these functions
however are not documented as a part of the libiperf3 API).
Slightly improve some of the documentation for the -A command line
option, to hopefully stave off some of the questions about this
feature.
Mostly based on a submitted patch.
Issue: 128 (better error message for CPU affinity failure)
Submitted by: Susant Sahani <ssahani@redhat.com>
2014-01-13 10:58:47 -08:00
Bruce A. Mah
55a453c2a1
Clean up some memory leaks in iperf_new_stream error handling.
...
Submitted by: Susant Sahani <ssahani@redhat.com>
2014-01-13 09:27:42 -08:00
Bruce A. Mah
49f74e582c
Prepare for iperf3 3.0.1.
2014-01-10 13:22:11 -08:00
Bruce A. Mah
c04bdcb9d0
Second try at printing statistics when processes are interrupted.
...
When the client process gets interrupted, both the client and server
dump out accumulated interval statistics, as well as a partial set of
summary statistics (basically each side dumps what it has, but without
the exchange of information that usually happens at the end of a
normal run).
If the server process gets interrupted, the server dumps out its
accumulated interval and summary statistics as above. The client does
this as well in the -R case, but exits with a "Broken pipe" in the non
-R case (this behavior was present all along; it was not introduced in
this change). More investigation will be needed to understand the
client behavior.
Bump copyright dates in a few places.
Issue: 132 (signal handler for API calls)
Discussed with: aaron@internet2.edu
2014-01-07 16:06:27 -08:00
Bruce A. Mah
a898ff8b8e
If the client gets interrupted / signaled, dump JSON output.
...
Issue: 132 (signal handler for API calls)
2014-01-06 12:18:21 -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
c7ddebaa6c
Fix memory leaks in iperf_reset_test().
...
Submitted by: Susant Sahani <ssahani@redhat.com>
2014-01-03 11:19:26 -08:00
Bruce A. Mah
0b9ba1005a
Fix a server side crash with -P and -R.
...
The problem was a mangled printf format string, which I introduced in
616ac79bd80b.
Issue: 129 (iperf3 hangs with -R and -Z flags)
2014-01-03 10:33:28 -08:00
Bruce A. Mah
0fdda50c64
Fix a deadlock leading to a hang in -R mode.
...
In -R mode, the test consists of the server sending to the client
until the client tells it to stop by setting the test state to
TEST_END via the control socket. However once the client changes the
test state, it stopped reading the incoming test data from the server.
In many (but not all) scenarios this could result in the server
filling up its send window (thus blocking on writes) before the
TEST_END message arrived from the client. At this point the server
was hanging waiting for the client to drain its data connection(s),
and the client was waiting for the server to send a state change
message for EXCHANGE_RESULTS.
Bump copyright date while here.
This fix handles at least part of...
Issue: 129 (iperf3 hangs with -R and -Z flags)
2014-01-03 10:06:16 -08:00
Bruce A. Mah
48e66b9b9a
Improve error message for TCP congestion algorithm setting failure.
...
Also remove a couple of places where we were saving and restoring errno
where we didn't need to.
Submitted by: Susant Sahani <ssahani@redhat.com>
Issue: 121 (TCP congestion control algorithm support for client)
2014-01-02 13:49:56 -08:00
Bruce A. Mah
7da3d76096
Fix another minor memory leak.
...
Submitted by: Susant Sahani <ssahani@redhat.com>
2014-01-02 13:26:51 -08:00
Bruce A. Mah
e3faf8e421
Fix minor memory leak.
...
Submitted by: Susant Sahani <ssahani@redhat.com>
2014-01-02 13:21:49 -08:00
Bruce A. Mah
39ad947995
For now, suppress printing congestion window stats in the output.
...
(It remains in the JSON output.)
We have some issues we need to resolve about the formatting and
representation of this (and other future values that we might be
adding).
2013-12-19 14:44:15 -08:00
Bruce A. Mah
dcd7b32b15
Follow-on to 4cfce137e89c based on some feedback and experience.
...
Rip out the tcpi_sacked support...it doesn't really keep a cumulative
total of SACKs received like we thought it did (it's instantaneous
state).
Convert tcpi_snd_cwnd (originally expressed in segments) to octets before
printing.
Re-work internal APIs for functions to get stuff out of tcp_info...rather
than doing a getsockopt() call per value, grab the values out of a
saved copy of the tcp_info structure (which we were getting in almost
every case anyway).
Issue: 99 (Additional TCP_INFO items)
2013-12-19 13:37:50 -08:00
Bruce A. Mah
310bd92410
Fix minor output glitch where we printed "receiver" when we meant "sender".
2013-12-19 11:44:03 -08:00
Bruce A. Mah
8d1388a3b8
Fix a logic bug in JSON output where default MSS was output as 0.
2013-12-19 11:33:38 -08:00
Jef Poskanzer
f11d3fa332
Added -k / --blockcount.
2013-12-19 10:31:22 -08:00
Bruce A. Mah
c2cb7b7520
Remove some (commented out) debugging code accidentally left in.
2013-12-19 09:27:12 -08:00
Jef Poskanzer
3f4d657209
Added note to -h output for -b flag's burst mode.
2013-12-18 20:56:21 -08:00
Jef Poskanzer
6a00b2dfdd
Branch merge.
2013-12-18 15:12:43 -08:00
Bruce A. Mah
5cdc6a4ac8
Keep track of SACKs and snd_cwnd from tcp_info (Linux only for now).
...
Committing this WIP so we can get some experimentation done with it.
2013-12-18 15:09:46 -08:00
Jef Poskanzer
10e7a31811
Branch merge.
2013-12-18 15:08:20 -08:00
Bruce A. Mah
cfe8c5fb47
Make "iperf3 -s" accept both IPv4 and IPv6 connections on FreeBSD.
...
(Formerly it was just accepting IPv6.)
The problem here was that FreeBSD by default wasn't allowing IPv4
mapped addresses on IPv6 sockets, whereas other platforms
(specifically Linux and OS X) both do permit this. We tried to turn
on mapped addresses via a setsockopt(IPV6_V6ONLY) call, but this call
was broken because the level argument was incorrect. We didn't know
about this because we never checked the return value.
Fix this by providing the correct argument to setsockopt(). Add some
error checking to this and one other setsockopt() call, so we at least
don't fail silently in similar situations.
Issue: 126 (FreeBSD: iperf3 -s only accepts IPv6
connections)
2013-12-18 14:43:12 -08:00
Jef Poskanzer
bdf5335c2b
Added burst mode.
2013-12-17 16:12:24 -08:00
Jef Poskanzer
62bfa88ceb
Added -C / --linux-congestion.
...
Also a few other bugfixes I ran across.
2013-12-13 19:57:52 -08:00
Jef Poskanzer
adec7fe48b
Re-order one line to clarify code.
2013-12-12 12:09:42 -08:00
Jef Poskanzer
950f6c8f59
Better error checking in net.c
2013-12-12 12:07:17 -08:00
Jef Poskanzer
fdcbd49578
Check return from tmr_create in timer test.
2013-12-12 12:04:11 -08:00
Bruce A. Mah
0193ee1881
Commit a file addition I forgot in 2ad1efdb977e.
2013-12-12 09:32:15 -08:00
Bruce A. Mah
d04c7bd0a4
Support setting the IPv6 flow label on Linux systems (only).
...
This functionality uses some setsockopt(2) calls that unfortunately
don't seem to have an analog on other platforms.
Slightly tweaked version of a patch that was...
Submitted by: ssahani@redhat.com
Issue: 40 (Option for setting Flow Label field in IPv6
header)
2013-12-12 09:21:36 -08:00
Jef Poskanzer
c8a0a2229d
Added a check for malloc fail.
...
Eventually we need to add a whole bunch more of these.
2013-12-12 08:15:15 -08:00
Jef Poskanzer
b70c54055f
Fixed t_units.c so that 'make check' once again works.
2013-12-09 17:52:59 -08:00
Jef Poskanzer
c06bc78c65
Fixed initialization issue.
...
It was causing the server side to mess up after the first test.
2013-12-05 12:00:46 -08:00
Jef Poskanzer
a4c1383a77
Fixed bug where -R mode selected on a closed file.
...
Also added a debugging routine to dump an fd_set.
2013-12-05 08:49:27 -08:00
Jef Poskanzer
95360b2046
Show UDP stats in interval reports.
...
To the extent possible, anyway - on the sender side,
only the packet counts are available.
Also a few minor bug fixes.
2013-12-04 09:16:37 -08:00
Jef Poskanzer
e41823c46b
Pushing out merge of inadvertent branch.
2013-12-02 09:55:48 -08:00
Bruce A. Mah
adbc1f4860
Document the recently-added -D / --daemon flag from changeset
...
4a9b814c16e6.
2013-12-02 09:38:13 -08:00
Jef Poskanzer
ba123d5c1e
Use setitimer() instead of alarm().
...
This lets us check timers every tenth second instead of every second,
so we can switch out of the more expensive select() mode even with
the default reporting interval of a second.
2013-11-29 08:58:51 -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
ace30a641e
Fix server-side timers.
2013-11-26 15:14:07 -08:00
Jef Poskanzer
056361fc5d
Show user/system CPU usage as well as total.
2013-11-26 14:47:15 -08:00
Jef Poskanzer
ba7b91d26e
Changed bug report email to google code link.
...
Also bumped package id from 3.0a4 to 3.0a5.
This changeset consists of a one-line edit to configure.ac, plus
about fifty kilolines of diffs to a bunch of other config files
generated by bootstrap.sh.
2013-11-26 10:07:32 -08:00
Jef Poskanzer
96feeac5a4
Performance improvement - only put socket fd's into the appropriate
...
fdset, not into both sets.
2013-11-25 11:13:28 -08:00
Jef Poskanzer
979405373d
When receiving a disk file with the -F flag, do an fsync() after each write().
2013-11-25 09:57:50 -08:00
Jef Poskanzer
7bcbb1f653
Performance improvements.
2013-11-15 09:54:21 -08:00
Jef Poskanzer
37ba3f73dd
Simplified output formatting.
2013-11-12 08:58:00 -08:00
Jef Poskanzer
b47e9f6a66
Couple of improvements to the report format.
2013-11-11 12:16:38 -08:00
Jef Poskanzer
a98b10bf91
Get rid of compiler warning.
2013-11-11 11:38:52 -08:00
Jef Poskanzer
d1405717cd
Redid the CPU Utilization report so it shows sender/receiver as
...
well as local/remote.
2013-11-11 11:37:07 -08:00
Jef Poskanzer
558c9b8013
Moved a bunch more output strings to locale.[hc].
2013-11-11 11:18:46 -08:00
Jef Poskanzer
5348f76aa9
Typo in test code.
2013-11-09 14:26:01 -08:00
Jef Poskanzer
32ebd649b3
Fixed some memory & fd leaks in error cases of various network setup
...
routines.
2013-11-09 14:23:36 -08:00
Jef Poskanzer
0e60ef1f9c
Get rid of some compiler warnings about iprintf.
2013-11-08 21:19:59 -08:00
Jef Poskanzer
d38ab4c8df
Added the -T / --title flag.
2013-11-08 20:31:19 -08:00
Jef Poskanzer
243c974f23
Note -i's default in the man page.
2013-11-08 16:13:40 -08:00
Jef Poskanzer
565366424b
Changed default for -i from 0 to 1.
2013-11-08 16:12:26 -08:00
Jef Poskanzer
082cbb0ee6
The ctrl_sck does not need to be in the select write_set, and indeed
...
having it there may cause the select to return immediately every
time. Which is bad, m'kay?
Also, changed the coding idiom used to keep track of the maximum fd
in the fd sets, to be clearer.
2013-11-08 15:59:17 -08:00
Jef Poskanzer
e35f2035d5
Added a cast to avoid a compiler warning.
2013-11-07 08:20:04 -08:00
Jef Poskanzer
d2b9eb1a87
Another potentially protocol-breaking but necessary change.
...
The error numbers sent for SERVER_ERROR state were declared
as ints, and therefore could be 32 or 64 bits depending on
architecture. I changed them to be explicitly 32 bits.
This should be the last of these, I've checked out at every network
read/write call and they look ok.
And bumped the version to 3.0-RC5.
2013-11-07 08:14:45 -08:00
Jef Poskanzer
8115b2a26e
Grammar correction in error message.
2013-11-06 15:24:47 -08:00
Jef Poskanzer
4e2ef5070b
More sizeof changes.
...
A couple more sizeof issues found and fixed. One of them is
actually another protocol change, but due to a fortuitous accident
it should remain compatible with older versions.
Detailed explanation: When a client attempts to connect to a server that
is already busy, the server is supposed to return ACCESS_DENIED as a
state value. It was doing so, but was writing it as an int, even though
state values are supposed to be signed chars. The client read the value
correctly as a signed char, getting one byte and throwing away the rest.
So why did this ever work? Because ACCESS_DENIED is the value -1, and
any byte of an int -1 equals a signed char -1. If ACCESS_DENIED had been
any other value, this would have been an opvious bug and would have long
since been fixed. As is, it stuck around working by accident until now.
2013-11-06 11:05:46 -08:00
Jef Poskanzer
2944aaa05b
State is signed char.
...
test->state is an explicitly signed char, so the two routines that
manipulate it must use explicitly signed chars too.
One could argue that the two negative state values should have been
positive like the rest, but changing them now would be a protocol change.
2013-11-06 10:33:26 -08:00
Jef Poskanzer
3651fa29e2
Bump version.
...
On further reflection, last night's seemingly trivial change to
the JSON sending/receiving routines is actually a protocol change,
on some machines, and therefore merits a version number change.
2013-11-06 09:42:54 -08:00
Jef Poskanzer
ddb503b5a3
The JSON length field should be explicitly 32 bits, not just "int",
...
for better interoperation.
2013-11-05 21:50:29 -08:00
Jef Poskanzer
9393606f5b
Changed -O default from 1 to 0.
2013-11-03 14:22:37 -08:00
Jef Poskanzer
578a1961cf
Bump version to 3.0-RC3.
2013-11-01 14:01:20 -07:00
Jef Poskanzer
38917b1f3f
Run -i interval timers on the server as well as the client.
2013-11-01 13:59:33 -07:00
Jef Poskanzer
9019e92411
Bump version to RC2.
2013-10-29 15:05:05 -07: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
7639c1a631
Bump version to RC1.
2013-10-28 17:14:25 -07:00
Jef Poskanzer
69376ec7ed
Fix retransmit accounting so it works right with the --omit flag.
2013-10-28 17:13:30 -07:00
Jef Poskanzer
8a7e01eb8f
Implement -A flag to set CPU affinity.
2013-10-25 17:00:52 -07:00
Jef Poskanzer
a953f5aa2c
Re-do of how --omit works.
2013-10-24 14:08:04 -07:00
Jef Poskanzer
ea5d93b241
Always send omit client->server, otherwise omit==0 doesn't work.
2013-10-22 13:55:56 -07:00
Jef Poskanzer
965d8d7688
Added a summary line to the final report for the -F option.
2013-10-21 16:15:27 -07:00
Jef Poskanzer
e32a7bcd77
Added the -F / --file flag, to use a specified file instead
...
of random data for sending, and to save the data in the file
on receiving.
2013-10-19 07:43:38 -07:00
Jef Poskanzer
36662029e5
Added a timestamp in verbose and JSON output.
2013-09-14 08:59:50 -07:00
Jef Poskanzer
66ee0e2084
Got rid of the -d/--debug flag, it was not being used for anything.
2013-09-14 08:36:11 -07:00
Jef Poskanzer
cc2376c1e3
Bump version & date.
2013-09-14 08:33:17 -07:00
Jef Poskanzer
9e5f6f57f4
Add note in man page about the -w flag getting transmitted to the server.
2013-09-14 08:31:06 -07:00
Jef Poskanzer
f8bd11af23
Ran across a little error in some code that is currently
...
commented out. Worth fixing anyway.
2013-09-12 11:01:48 -07:00
Jef Poskanzer
65b2261d4c
Slight enhancement to the logic for switching to SIGALRM timing mode.
2013-08-29 17:43:20 -07:00
Jef Poskanzer
8bdc8fffcf
Fix bug in reverse mode.
2013-08-29 11:38:20 -07:00
Jef Poskanzer
78a711169e
Crash fix from Aaron Brown.
2013-08-19 12:29:35 -07:00
Jef Poskanzer
5c01581b32
Detect that the system doesn't support IPv6 and try falling back to IPv4.
2013-08-19 10:02:01 -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
cb6347fba9
Fix for issue 79, bad results when using the API.
2013-08-10 09:12:07 -07:00
Jef Poskanzer
d611f13e18
Fix incorrect default bandwidth limit when using the API instead
...
of the command line.
2013-07-12 19:56:49 -07:00
Andy Lake
861c06d862
Add queue.h to Makefile so will be included in package generated by 'make dist'
2013-07-11 14:07:41 -04:00
Jef Poskanzer
ba51358f7c
Added API routines to get/set the verbose flag.
2013-07-10 15:12:51 -07:00
Jef Poskanzer
5789260432
Changed the -I / --ignore flag to -O / --omit, so that we can use the
...
same flag in bwctl.
2013-07-05 13:52:19 -07:00
Jef Poskanzer
26e392e175
Oops, left out the --version4 long opt.
2013-07-04 18:06:29 -07:00
Jef Poskanzer
c969359995
Added -I flag to ignore an initial period of data transfer,
...
defaulting to one second.
2013-07-03 12:01:57 -07:00
Jef Poskanzer
434e786fd0
More descriptive variable names for the throttling code.
2013-06-25 15:05:37 -07:00
Jef Poskanzer
647d3b95a8
New implementation of the -b bandwidth limit flag, that applies to
...
TCP as well as UDP.
2013-06-24 07:14:14 -07:00
Jef Poskanzer
cf06ba653a
Server now exits after five consecutive errors.
2013-06-07 15:28:05 -07:00
Jef Poskanzer
3433c4d2c1
Better ifdefs for sendfile on OS/X.
2013-06-07 08:41:38 -07:00
Jef Poskanzer
c39c4f503f
Added an ifdef for Mac OS/X version, to better protect the sendfile code.
2013-06-07 08:16:24 -07:00
Jef Poskanzer
5ec1d758f1
Raise maximum TCP buffer size to 512 MB.
2013-06-04 16:38:49 -07:00
Jef Poskanzer
481853ae5a
Convert IPv4-mapped IPv6 address strings into regular old IPv4 format.
2013-06-04 00:11:41 -07:00
Jef Poskanzer
c687db9da2
Storing the known-to-not-work Flow Label code, just to save it.
...
The user-visible parts are commented out or return a "not implemented
yet" error message. The other parts are harmless.
We'll come back to this once we figure out how exactly one sets
the Flow Label.
2013-06-03 13:12:43 -07:00
Jef Poskanzer
912bf5784f
Add message emphasizing when we're doing reverse mode.
2013-05-31 10:36:12 -07:00
Jef Poskanzer
69bdbfd36d
Handle retransmits correctly in reverse mode.
2013-05-29 15:18:18 -07:00
Jef Poskanzer
2c042fd469
Simplify multiple client/server forward/reverse checks into
...
a single sender boolean.
2013-05-29 12:32:42 -07:00
Jef Poskanzer
aa0e8fd5ac
Remove temp file.
2013-05-25 07:22:11 -07:00
Jef Poskanzer
d95da48aee
Bytes == 0 is no longer notable; bytes < 0 remains so.
2013-05-08 18:45:25 -07:00
Brian Tierney
854088329a
remove "NLANR" tag
2013-05-08 14:53:31 -07:00
Jef Poskanzer
e321855d26
getopt_long returns int, not char.
2013-05-06 09:41:35 -07:00
Jef Poskanzer
12d474e2b4
A couple other places that used struct sockaddr_in when they should
...
have used struct sockaddr_storage - fixed now.
2013-05-02 15:28:30 -07:00
Jef Poskanzer
111645ed0f
Fix UDP for IPv6 and dual-stack.
2013-05-02 15:18:07 -07:00
Jef Poskanzer
a27f6534b5
Added second concurrency model based on SIGALRM.
2013-04-09 11:42:30 -07:00
Jef Poskanzer
a6b3f26be1
Dual-stack operation - IPv4 and IP46 in the same server.
...
Also added -4 flag to force IPv4.
2013-03-29 17:49:27 -07:00
Jon M. Dugan
495aeb6ba7
bump date to current date
2013-03-28 12:02:39 -05:00
Jef Poskanzer
c50556ff4f
Renamed burst mode to multisend mode, because there's an nuttcp feature
...
we want to add someday that is also called burst mode.
2013-03-13 09:41:02 -07:00
Jef Poskanzer
0f53b154a3
Improved setnonblocking() to set the flag on or off instead of just on.
2013-03-12 13:05:50 -07:00
Jef Poskanzer
65db384358
Polishing up the iperf3.1 man page.
2013-03-12 12:57:19 -07:00
Jef Poskanzer
3e58754281
Added library man page and examples subdir.
2013-03-11 22:03:36 -07:00
Jef Poskanzer
e96ab74093
Move the JSON initialization/finalization insode the API.
2013-03-08 20:56:52 -08:00
Jef Poskanzer
a5621dd908
Added zerocopy stuff to the API, so that bwctl can use it.
2013-03-06 07:46:28 -08:00
Jef Poskanzer
c57e9f2494
Slight change to net.c routines to better handle writes/sendfiles
...
to a full socket.
2013-03-04 16:11:03 -08:00
Jef Poskanzer
987b432316
A bunch of changes mixed together in this commit, but the significant
...
one is the new -Z flag.
- Fixed potential bug in net.c's Nread and Nwrite routines. If they
had ever needed to loop they would have read/written the wrong address,
due to incorrect pointer arithmetic - sizeof(void) is not 1. Fix
was to change the type of the buffer pointer to char*, which also
meant adding casts to some callers.
- Better checking for conflicts between command-line flags - now they
should no longer be order-dependent.
- Added a new -Z / --zerocopy flag, to use a "zero copy" method of
sending data, such as sendfile(2) instead of the usual write(2).
- Renumbered error enum to make inserting new ones easier.
2013-03-04 15:55:16 -08:00
Jef Poskanzer
358985eb58
Page-align the read/write buffer. Unclear if this helps, but
...
it certainly doesn't hurt.
2013-03-01 09:41:33 -08:00
Jef Poskanzer
0da578e79f
Improved version of setnonblocking() - still not used.
2013-02-28 11:26:51 -08:00
Jef Poskanzer
6ae6111b27
Show correct error on connect() failure.
2013-02-27 14:35:23 -08:00
Jef Poskanzer
1133dd0b6c
Fix long help message to show theactual default values from the .h file.
...
Correct the default test duration to ten seconds.
2013-02-27 14:22:44 -08:00
Jef Poskanzer
50a45ea47e
Add get/set json_output to the API.
2013-02-26 15:54:29 -08:00
Jef Poskanzer
43929b3698
Added "burst mode" to send a bunch of packets in a row without
...
intervening select() calls. This increases performance quite a bit.
2013-02-22 15:54:05 -08:00
Jef Poskanzer
231c56296e
Comment out the "__attribute__((hot))" declarations because they cause
...
compiler warnings on older systems. They probably didn't help
performance anyway. They'll remain in the source as markers.
2013-02-18 14:56:37 -08:00
Jef Poskanzer
3a34e7c11b
With the define corrected to long-long, no longer need an explicit cast
...
in the tmr_create calls.
2013-02-18 10:30:21 -08:00
Jef Poskanzer
e232c5d16e
Couple of defines that should be long-longs.
2013-02-18 10:28:17 -08:00
Jef Poskanzer
037c0c2367
Handle timers longer than 2147 seconds (2^31 microseconds).
2013-02-18 09:06:50 -08:00
Jef Poskanzer
ba55284d44
Added some "hot" attributes to mark a few routines that deserve
...
extra optimization. Most likely this has no effect.
2013-02-18 07:33:36 -08:00
Jef Poskanzer
63a0b8d5df
Branch merge.
2013-02-18 07:21:59 -08:00
Jef Poskanzer
fbaa2467a6
Change the meaning of the combination of -n and -P flags.
...
Previously, if you used -n to specify a test sending a specified number
of bytes and -P to send multiple streams in parallel, iperf3 would send
that many bytes on each stream. With this change it just sends the
specified total number of bytes regardless of how many streams are used.
2013-02-18 07:19:59 -08:00
Jef Poskanzer
a5122e8951
Fix a couple problems noted by the C++ compiler.
2013-02-15 09:10:56 -08:00
Jef Poskanzer
96609aecad
Makefile tweak to get iperf3_profile to actual generate profiles.
2013-02-12 11:40:16 -08:00
Jef Poskanzer
2724cb3139
Don't need -lm in Makefile any more.
2013-02-11 22:04:52 -08:00
Jef Poskanzer
f19a68d53a
Oops, left out the important line from the error routine.
2013-02-07 17:54:52 -08:00
Jef Poskanzer
7ea98727a8
Initialize a couple variables to NULL to get rid of bogus warnings.
2013-02-07 13:39:33 -08:00
Jef Poskanzer
079579187a
Portability fix for cJSON.
2013-02-07 13:34:53 -08:00
Jef Poskanzer
eb0206e686
Better handling of non-exit errors in JSON.
...
Also converted one more error to the unified call.
2013-02-07 13:30:58 -08:00
Jef Poskanzer
bf501899e7
Added fflush to JSON output.
2013-02-07 12:37:10 -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
cda2ce2a7e
Fixed cjson.c to no longer require -lm.
2013-02-05 21:18:47 -08:00
Jef Poskanzer
5a561d9d40
Get rid of commented-out obsolete code. If it's needed it's in the
...
revision history.
2013-02-05 15:38:45 -08:00
Jef Poskanzer
9bfb54c0cc
Add -J flag to produce JSON output instead.
2013-02-01 11:42:35 -08:00
Jef Poskanzer
17666b94d9
Updated the man page and help string so they correspond with the code.
...
This entailed some re-ordering, so the diff is large.
2013-01-28 18:14:34 -08:00
Jef Poskanzer
0569f7d192
Also change iperf.1 to iperf3.1 in the makefile.
2013-01-28 17:33:51 -08:00
Jef Poskanzer
a2adc385e2
Rename iperf.1 to iperf3.1.
2013-01-28 16:52:54 -08:00
Jef Poskanzer
2efc602fb2
The units handling was interpreting capital K/M/G as 1024/1048576/1073741824
...
and lowercase k/m/g as 1000/1000000/1000000000. This was deemed to be
too confusing. Now both capital and lowercase give the powers-of-two version.
2013-01-28 16:52:04 -08:00
Jef Poskanzer
1f4b249abb
Better fix for the -u/-l argument parsing mixup. This one avoids
...
the problem of explicitly setting the UDP block size to the TCP default
and getting ignored.
2013-01-28 14:19:07 -08:00
Jef Poskanzer
1ac282ccdd
Raise default UDP block size, for better performance.
2013-01-28 14:04:39 -08:00
Jef Poskanzer
45080fc6b7
Fixed little glitch in argument handling order: "-l nnn -u" was
...
setting the block size back to the UDP default, while "-u -l nnn"
worked. Now both orders work.
2013-01-28 11:48:19 -08:00
Jef Poskanzer
6177a7f1f1
Get rid of extra select() calls before reading and writing,
...
in both client and server. Instead we pass in and use the
fdsets from the main loop's select().
2013-01-18 10:17:05 -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
5cd3317d98
Get rid of compiler warning.
2012-12-11 22:45:15 -08:00
Jef Poskanzer
88dd44b040
Need a couple more include files to compile on FreeBSD.
2012-12-11 22:41:37 -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 Poskanzer
9673370f98
Move non-timer routines from timer.[hc] to iperf_util.[hc]
2012-12-05 12:34:58 -08:00
Jef Poskanzer
d6e2781d18
Better detection of when linux has retransmit info in tcp_info.
2012-12-03 22:02:31 -08:00
Jef Poskanzer
9d1fc7c676
Line up output columns better.
2012-12-03 16:20:49 -08:00
Jef Poskanzer
d7ebadafa4
Make the retransmits code compile again on systems without retransmits.
2012-12-03 16:00:14 -08:00
Jef Poskanzer
46baab59e8
Disable retransmit reporting for FreeBSD, it's not actually
...
implemented in the OS yet.
2012-12-03 15:50:29 -08:00
Jef Poskanzer
acad430d3d
Fix retransmit reporting for Linux.
2012-12-03 15:48:54 -08:00
Jef Poskanzer
437537fe30
Test commit.
2012-11-30 12:16:17 -08:00
jef
eb3c71b8fe
Don't do getsockopt(TCP_INFO) on UDP runs.
2012-11-30 10:13:25 -08:00
jef
874856ab6b
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.
2012-11-28 07:22:51 -08:00
jef
0d48915c69
A few portability changes, now builds on OSX without warnings.
2012-11-13 11:33:52 -08:00
jef
0115558217
Run uname for the -v/--version flag. Also, show version and uname for
...
the -V/--verbose flag. Still debating whether version/uname should be
shown by default.
2012-11-12 10:01:26 -08:00
jef
6b7db8f774
Get rid of the -T/--tcpinfo flag and show retransmits if they
...
are available.
Also, show them in interval results as well as at the end.
2012-11-09 16:02:42 -08:00
jef
8a0cc10076
Testing timeval equality deserves to be its own routine.
2012-11-02 09:04:46 -07:00
jef
99502d9409
Re-jiggered the "Interval Transfer Bandwidth" header so it only
...
appears at the start and end of the results, and added a separator
line when there are both multiple streams and multiple intervals.
2012-10-29 22:30:31 -07:00
jef
7b43a90638
Switch the JSON parameter names from single letters to words.
...
That gets rid of the case-sensitivity issue, and is nicer.
2012-10-27 17:29:29 -07:00
jef
d23d944f12
Fix JSON parsing to handle very long ints better. Should still
...
do something better about them on output.
2012-10-27 16:43:04 -07:00
jef
ff3c7fba24
JSON names are case-insensitive so we have to use different
...
names for e.g. p and P. I prefixed the upper case flags with "cap".
2012-10-27 16:24:54 -07:00
jef
53a87a0b9d
Oops, -lm is still needed by cjson for floor(). Still worth getting
...
rid of pow() though.
2012-10-26 07:45:28 -07:00
jef
ea71aaeaee
Fixed cjson to not need -lm any more, by adding an ipow() routine
...
to use instead of pow().
2012-10-25 22:14:02 -07:00
jef
4095757536
Converted the parameter exchange to use JSON.
...
This also gets rid of the antique tiny version of getopt that I added
to hack around a stubborn SEGV error.
2012-10-18 13:08:30 -07:00
jef
23481e7953
Converted the results exchange to use JSON.
2012-10-18 10:47:27 -07:00
jef
10d202a998
Simplify/clarify use of htonl/ntohl.
2012-10-17 09:14:14 -07:00
jef
0b96eba3e3
Move results-formatting into a new format_results() function.
...
Also, parse_results() doesn't need to be declared in iperf_api.h.
There are probably a whole bunch of other routines in there which
should be similarly made module-local.
2012-10-17 08:30:12 -07:00
jef
a497129b4d
Oops, the cjson files need to be in the src directory.
...
Also changed the makefiles so that cjson gets compiled and linked in.
Next step: actually call it.
2012-10-15 09:49:20 -07:00
jef
8bb79aee26
Switched interval_results to use the queue.h macros.
2012-10-05 10:24:03 -07: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
jef
56a97f9337
Commented 'AX_LIB_SOCKET_NSL' out of configure.ac to fix build problem.
...
There's still lots of historical cruft in there, at some point we should
start over from a more modern template.
2012-08-20 14:35:58 -07:00
jef
2ab386bf13
Got rid of libuuid stuff, for portability.
2012-08-10 12:43:50 -07:00
Jon Dugan
94d391af37
Fix stats for multiple streams from Alexey Zaytsev <alexey.zaytsev@gmail.com>
2011-05-02 23:09:06 +00:00
Jon Dugan
7d375156aa
update license info for all source files
2011-04-20 20:33:09 +00:00
sethdelliott
fecb120f91
Fixed TCP_INFO bug on linux. BSD prints nothing for now...
2011-03-16 18:17:54 +00:00
sethdelliott
e170832926
Added working TCP_INFO code (only displays retransmits for now)
2011-03-16 17:43:25 +00:00
sethdelliott
f970ce8ecd
Added warning() function for iperf warnings. Using --server and --udp now gives a warning instead of an error.
2011-03-10 15:56:17 +00:00
sethdelliott
ad426c6fd4
Added CPU utilization exchange and display (use verbose mode [-V]).
2011-03-02 21:32:04 +00:00
sethdelliott
3331e801b9
Added portable CPU utilization code. Still need to exchange utilizations between client and server.
2011-02-24 17:08:54 +00:00
Jon Dugan
9286415c86
update autoconf goo to accomodate Solaris; minor tweaks to includes for Solaris
2010-09-20 21:50:12 +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
Jon Dugan
009a41300f
if IPV6_TCLASS isn't defined do something reasonable
2010-09-08 20:33:54 +00:00
sethdelliott
2c206d5456
Critical server errors are now communicated back to client
2010-08-05 20:09:54 +00:00
sethdelliott
02a35f07e3
Merged print mss (-m) into verbose mode (-V)
2010-08-04 19:19:08 +00:00
sethdelliott
9a599d5f8d
Added support for setting the IP TOS (IPv4) and IPv6 Traffic Class (-S option)
2010-08-03 21:38:48 +00:00
sethdelliott
76ceadbc24
Updated documentation
2010-08-02 23:30:22 +00:00
sethdelliott
0e8720fa64
Small memory leak fixes in iperf_free_test.
2010-08-02 23:15:27 +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
dd4bc0089b
Stream list is now managed by queue.h SLIST macros
2010-07-28 20:29:25 +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
f99bd3b2c6
Added support for IPv6 mode (-6)
2010-07-27 20:27:34 +00:00
sethdelliott
5e0e1e974e
Exchanged gethostbyname for getaddrinfo
2010-07-27 17:32:21 +00:00
sethdelliott
a1344ede16
Added support for binding (-B) to a specific interface
2010-07-26 21:30:34 +00:00
sethdelliott
eb85608f64
Updated autoconf files
2010-07-23 23:48:45 +00:00
sethdelliott
18631aacdb
Moved client code from iperf_api.* to iperf_client_api.*
2010-07-23 22:48:48 +00:00
sethdelliott
2e3dfab7eb
Updated documentation
2010-07-23 21:39:41 +00:00
sethdelliott
4df383f6d8
Added callback functions to the iperf API
2010-07-23 20:46:58 +00:00
sethdelliott
112a907cc3
More code restructuring
2010-07-23 18:39:14 +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
Jon Dugan
7585c69638
bump version number
2010-07-16 23:19:31 +00:00
sethdelliott
1e621fb16c
Small updates to man page and documentation.
2010-07-15 23:38:10 +00:00
sethdelliott
c81883bf08
Added support for setting the MAXSEG (MSS) and NODELAY TCP options. Setting MSS is still a little buggy.
2010-07-15 23:19:42 +00:00
sethdelliott
aa89cda29f
Added bandwidth mode (-b) support for UDP.
2010-07-15 20:05:43 +00:00
sethdelliott
86afd62bfe
UDP results are now exchanged. Made results exchange process better.
2010-07-15 17:43:25 +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
Jon Dugan
b0b16b86cc
rename uuid.[ch] to iperf_util.[ch] to avoid confusion on some platforms
2010-07-09 00:29:51 +00:00
Jon Dugan
a5d9c7f182
remove extraneous -I../include
2010-07-09 00:20:59 +00:00
Jon Dugan
1c16864715
bump version for beta release
2010-07-08 23:29:17 +00:00
Jon Dugan
e34c20c89f
update autoconf stuff
2010-07-08 23:26:52 +00:00
sethdelliott
1ac522ec39
Fixed a bug where the server died on client interrupt. Also updated README, TODO, and man page.
2010-07-08 22:41:22 +00:00
sethdelliott
2b1d7e965c
Added buffer length (-l) to parameter exchange.
2010-07-07 23:34:48 +00:00
sethdelliott
f1b3bd81f9
Quite a bit of code restructuring.
2010-07-07 21:54:24 +00:00
sethdelliott
b68ac00ee9
Some code restructuring.
2010-07-06 23:12:54 +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
efb7bbe44b
Added support for reverse mode (-R for now).
2010-07-01 00:01:57 +00:00
sethdelliott
abfced3c26
Added parameter exchange for MSS, bytes to send, and test duration.
2010-06-30 22:32:17 +00:00
sethdelliott
af70b448ee
All communications are now on port 5201 (including streams)
2010-06-30 22:09:45 +00:00
sethdelliott
32885561a4
Server side bug fixes.
2010-06-30 19:57:17 +00:00
sethdelliott
efdc02f743
The server now runs until terminated by the user. Also fixed several memory leaks.
2010-06-30 15:58:16 +00:00
sethdelliott
181d61afab
Iperf results are now exchanged between client and server. The server also now prints results.
2010-06-29 22:02:30 +00:00
sethdelliott
43bcc9709c
Added iperf_exchange_results function.
2010-06-28 23:56:09 +00:00
sethdelliott
fd10304cbd
Updates to Nread/Nwrite in net.c
2010-06-28 22:25:03 +00:00
sethdelliott
4f43111900
Removed unused functions from the iperf api code.
2010-06-26 00:02:22 +00:00
sethdelliott
f0a7395b20
Added usage_long() to iperf_api.h.
2010-06-25 00:33:39 +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
36d18d07fc
Fixed a bug that caused control message errors on different platforms.
2010-06-24 22:40:11 +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
59aaeda792
Updated parameter exchange to be cross platform compatible.
2010-06-24 20:42:04 +00:00
sethdelliott
7fa9f68fd5
Fixed a bug that caused an error at results display.
2010-06-23 21:34:07 +00:00
sethdelliott
873952e31c
Updated reporting to fit the new control socket design.
2010-06-23 20:28:32 +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
ba2672a209
Note: The redesign is almost working. Should be finished shortly.
2010-06-21 15:08:47 +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
ff385f98e9
Fixed format and improved readibility of timer.c functions. Also formalized timer.h header.
2010-06-16 21:48:20 +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
ccb086576f
Updated iperf_reporter_callback to print out its message rather than returning a pointer to it
2010-06-15 23:33:32 +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
AaronMatthewBrown
a067fb27c2
Modify auto* scripts to handle the different uuid libraries/headers.
2009-12-10 14:20:48 +00:00
Jon Dugan
79e6f22912
remove svn:executable from locale.[ch]
2009-12-10 08:08:00 +00:00
AaronMatthewBrown
f4a3ddaae6
Add an initial autotools setup.
...
The main iperf binary is compiled, along with a static libiperf, the unit
tests, and a profiled iperf binary.
The tests, and the profiled iperf binary do not get installed.
To compile, run:
./bootstrap.sh
./configure
make
It has all the normal make options (they come mostly for free). e.g.:
You can run "make install" to install it.
You can run "make dist" which will create a distribution tarball.
You can run "make check" to run all the tests.
I backed up the existing Makefile as "src/Makefile.old" in case folks want to
use that still.
2009-12-08 21:36:24 +00:00
Jon Dugan
d768f73dce
more cleanup and rearrangement
2009-12-02 02:08:47 +00:00
Jon Dugan
27f1f3508e
move man page into src dir
2009-12-02 02:06:16 +00:00
Brian Tierney
5fa2f3b044
some cleanup, updates
2009-11-20 23:43:53 +00:00
Brian Tierney
78379b172e
more Makefile updates
2009-11-20 23:27:54 +00:00
Brian Tierney
ca3ed92e2b
better 'make dist' command (still could be better yet)
2009-11-20 23:22:44 +00:00
Brian Tierney
380c769248
fixed bug in final stats summary calculation
2009-11-20 23:13:35 +00:00
Brian Tierney
54cdc61e24
fixed bug where -T flag without -i flag caused core dump
2009-11-20 23:04:23 +00:00
Brian Tierney
6796ba135a
fixed minor issue with server stats
2009-11-20 22:38:47 +00:00
Brian Tierney
fda84f3feb
fixed bug in server side thoughput calculation
2009-11-20 22:20:10 +00:00
Brian Tierney
6146bde494
fixed stats computation
2009-11-17 18:44:01 +00:00
Brian Tierney
d033e8cefc
more valgrind-based cleanup of memory usage
2009-11-16 20:26:20 +00:00
Brian Tierney
dfb2d9d470
some memory usage cleanup based on valgrind report
2009-11-16 20:10:48 +00:00
Brian Tierney
f4e1c1d4a4
fixes for -T mode
2009-11-16 02:50:24 +00:00
Brian Tierney
01a5081d51
working on fixing TCP_INFO, in progress
2009-11-16 01:58:22 +00:00
Brian Tierney
5ed85b8fa1
a bit more cleanup
2009-11-15 17:06:16 +00:00
Brian Tierney
1882b9cb65
turned off some debug code, and fixed a bug in interval times
2009-11-15 04:47:19 +00:00
Brian Tierney
97887027e7
completely reworked stats collection/display code. Mostly working again, and much more readable.
2009-11-15 04:29:47 +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
70866d6dc0
some fixes/cleanup for Linux
2009-11-13 19:20:52 +00:00
Brian Tierney
7d8b10f945
added version.h to svn, and other minor changes
2009-11-13 18:29:10 +00:00
Brian Tierney
9e1f731a44
better random payload code
2009-11-13 15:26:49 +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
5083c489af
more cleanup and bug fixes: TCP mode mostly working. Still bug in using -i on the server
2009-11-10 05:21: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
Brian Tierney
150a09e9e2
refactoring of state machine now complete! works for single stream TCP only at the moment
2009-11-06 02:19:20 +00:00
Brian Tierney
8f4e66c9d0
interrim commit: work in progress
2009-11-06 01:43:50 +00:00
Brian Tierney
8d41fbd712
more bug fixes, still needs work
2009-11-03 06:38:09 +00:00
Brian Tierney
c27f38e5be
more work on state cleanup: not yet done
2009-11-03 05:37:06 +00:00
Brian Tierney
a36921c2dd
state machine cleanup (still in progress)
2009-11-02 23:56:55 +00:00
Brian Tierney
a951c98062
lots of code restructuring
2009-11-02 22:43:19 +00:00
Brian Tierney
da54a271ad
a bit more cleanup, and determined that UDP is more broken than I thought.
2009-10-27 03:51:04 +00:00
Brian Tierney
1b85468f0c
more cleanup of TCP/UDP code
2009-10-27 03:06:56 +00:00
Brian Tierney
513fcaefe1
more better comments
2009-10-26 14:34:41 +00:00
Brian Tierney
02fed106c4
worked on receive_result_from_server, more cleanup and comments
2009-10-24 22:31:38 +00:00
Brian Tierney
9a51510ab3
more cleanup: separate file for main routine
2009-10-24 21:15:04 +00:00
Brian Tierney
146be079ba
added comment on lack of portability
2009-10-24 20:43:06 +00:00
Brian Tierney
d56546318e
add comment
2009-10-23 23:01:46 +00:00
Brian Tierney
a1eb8922d3
TCP_INFO seems to be working on FreeBSD now
2009-10-23 22:58:32 +00:00
Brian Tierney
c0c797b0eb
some cleanup for FreeBSD, and further work on TCP_INFO (not finished)
2009-10-23 22:30:17 +00:00
Brian Tierney
d842bb6c9c
some minor cleanup
2009-10-23 19:14:17 +00:00
Brian Tierney
6f5723846d
lots more cleanup. Seems to work for single stream TCP now. UDP broke. Parallel TCP not tested
2009-10-23 01:30:55 +00:00
Brian Tierney
a725333452
more cleanup; TCP works again now, lots of debug messages still in there
2009-10-22 20:12:57 +00:00
Brian Tierney
c00858d228
added Nread and Nwrite routines, as alternatives to recv
2009-10-22 20:12:27 +00:00
Brian Tierney
657083f27f
more cleanup, lots of comments/questions/debug code added, currently broken
2009-10-20 16:56:02 +00:00
Brian Tierney
371c23d833
now compiles on FreeBSD, and fixed -h option
2009-10-20 03:33:50 +00:00
Brian Tierney
b25e5235cb
updates/bug fixes (still not done)
2009-10-20 00:07:42 +00:00
Brian Tierney
540d2ae4c2
starting adding TCP_INFO stuff. Not yet tested or finished
2009-10-19 23:44:36 +00:00
Brian Tierney
e434aab6a2
code cleanup: used 'indent' to enforce consistant style
2009-10-19 22:35:18 +00:00
kaustubhprabhu
2d62ee81b2
removed extra log prints
2009-08-13 23:16:06 +00:00
kaustubhprabhu
702c882fe2
added support for abrupt termination Ctrl+c
2009-08-10 21:57:52 +00:00
kaustubhprabhu
27a5c9f3ec
changed TCP payload buffer assignment
2009-08-08 00:37:28 +00:00
kaustubhprabhu
aadd324191
corrected interval [sum] bandwidth
2009-08-06 21:22:44 +00:00
kaustubhprabhu
f2eccde89e
changed tcp payload to normal for performance improvement
2009-08-06 21:00:03 +00:00
kaustubhprabhu
7ec1259bd7
added setpriority to increase the priority of execution
2009-08-06 20:29:22 +00:00
kaustubhprabhu
7e97b90df5
replaced malloc()for buffer in send() with sp->buffer in stream
2009-08-06 20:26:59 +00:00
kaustubhprabhu
b359357773
changed default window size assignment in iperf_init_test()
2009-08-03 22:20:45 +00:00
kaustubhprabhu
4cb629896a
changed recv window assignment, added non-blocking sockets on server side
2009-08-03 20:14:08 +00:00
kaustubhprabhu
c434311b0d
changed default port assignment in main()
2009-07-29 21:16:52 +00:00
kaustubhprabhu
675aadd72a
simplified main()
2009-07-29 00:30:52 +00:00
kaustubhprabhu
c5038eea0a
disabled timer for -n option
2009-07-28 20:21:30 +00:00
kaustubhprabhu
5212846ff4
added -n option for bytes to be sent, added function headers in iperf_api.h
2009-07-28 18:39:18 +00:00
kaustubhprabhu
62aab8d53d
corrected blksize in result exchange messages, removed unncessary conditions in reporter callback
2009-07-27 23:01:31 +00:00
kaustubhprabhu
d47cf1d204
added cookie in all state messages, changed tcp payload, changed receive_result_from_server
2009-07-27 22:05:49 +00:00
Jon Dugan
6f6716aed1
rework iperf_run using switch statement; add missing break from arg processing
2009-07-24 21:30:17 +00:00
Jon Dugan
a28983bbe1
fix linux compilation (needed -luuid); linux doesn't define FD_COPY, use memcpy instaed; formatting fixes
2009-07-24 21:06:16 +00:00
Jon Dugan
a613b6a3b6
fix formatting
2009-07-24 21:01:48 +00:00
kaustubhprabhu
40a1df10c1
changed cookie as a string in struct iperf_setting, param_exchange and in Param_exchange message
2009-07-24 18:21:50 +00:00
Jon Dugan
aa3ad76730
rework uuids; rework Makefile
2009-07-23 18:22:24 +00:00
kaustubhprabhu
e7c1d33fce
added uuid related functions, added macros for compilation on FreeBSD
2009-07-23 00:34:57 +00:00
kaustubhprabhu
89fe565493
added PARAM_Exchange messages and cookies to prevent test collisions
2009-07-21 23:28:18 +00:00
Jon Dugan
7b63081921
client select was reusing fd_set; use FD_COPY to copy fd_sets
2009-07-21 20:16:09 +00:00
Jon Dugan
955db52cda
always report bytes transferred in units of bytes, data rates still use the -f option
2009-07-21 19:00:54 +00:00
kaustubhprabhu
8bc20ef280
added iperf_free_test() and changed server side code in main()
2009-07-20 19:13:08 +00:00
kaustubhprabhu
cbd16a325f
bug fix:name resolution issue, TCP reception corrected by adding MSG_WAITALL flag in recv function
2009-07-16 23:17:05 +00:00
kaustubhprabhu
254a65cf73
regular EOD backup, TCP/UDP payload converted to network address format by client
2009-07-16 00:45:24 +00:00
kaustubhprabhu
04b7ffa70f
changed TCP Payload assignment, added a sleep() betweeen ALL_STREAM_END and RESULT_REQUEST message to ensure server gets both messages
2009-07-15 01:00:27 +00:00
kaustubhprabhu
3023ce6ec5
corrected interval byte count mismatch, corrected out of order packet count
2009-07-13 21:50:08 +00:00
kaustubhprabhu
fea54f51f7
omitted STREAM_BEGIN message from bytes calculation
2009-07-13 18:44:18 +00:00
kaustubhprabhu
48b0f1a334
added lost UDP packet count, added timeval struct for intervals measurement
2009-07-11 00:09:23 +00:00
kaustubhprabhu
f4ca73a1b1
added udp jitter/packet count calculation
2009-07-09 23:44:05 +00:00
kaustubhprabhu
71a7ccf6d3
minor changes and packet payloads changed
2009-07-08 22:57:43 +00:00
kaustubhprabhu
6b65cf6e25
removed memory leaks from reporter callback
2009-07-08 00:44:00 +00:00
kaustubhprabhu
515e2f6e2c
added listener socket for UDP. This allows server to listen for TCP/UDP on same port
2009-07-07 00:37:47 +00:00
kaustubhprabhu
a428063b8b
simplified reporter callback by removing conditional assignments
2009-07-06 21:29:23 +00:00
kaustubhprabhu
7dd1f0cd55
modified reporter callback for floating point errors
2009-07-06 18:37:21 +00:00
kaustubhprabhu
c6ffef11b4
implemented UDP-timer changes , o/p format changes
2009-07-02 01:07:32 +00:00
kaustubhprabhu
8b44cd5a88
implemented code review changes - r100/101, added a check on failure to receive STREAM_END message
2009-06-30 23:41:23 +00:00
kaustubhprabhu
6044ffd6f5
changed reporter callback for udp display, code review comments -99/100
2009-06-30 00:42:33 +00:00
kaustubhprabhu
81a2df59df
changed timer_expired function call
2009-06-29 19:30:39 +00:00
kaustubhprabhu
e1634906f1
corrected interval statics calculation
2009-06-29 18:20:40 +00:00
kaustubhprabhu
b406b735e8
added interval_results to linked list
2009-06-27 00:34:38 +00:00
kaustubhprabhu
5ebed4362f
added locale.h for standard o/p formats
2009-06-26 01:00:45 +00:00
kaustubhprabhu
5f0a15f96f
changed format of reports to default iperf format, added timer functions, added local.h for standard o/p formats
2009-06-26 00:55:56 +00:00
kaustubhprabhu
b890e75d5e
added ALL_STREAMS_END message from client to server, changed message communication code for TCP
2009-06-25 19:40:48 +00:00
kaustubhprabhu
368cc7bc7c
Corrected message communication memory leak, added result exchange messages for TCP
2009-06-25 00:59:56 +00:00
kaustubhprabhu
16975b3bba
added messege communication betweenn client and serverin iperf_api.c, moved state to iperf_settings in iperf_api.h
2009-06-24 00:52:45 +00:00
kaustubhprabhu
d7f56e1528
Changed iperf_udp_send() function : added timer and timer delay calcualation
2009-06-23 00:11:18 +00:00
kaustubhprabhu
aa9ca2689b
added function- timer_expired_micro() for timer expiry in microseconds
2009-06-23 00:07:36 +00:00
kaustubhprabhu
6162535684
implemented options -m, -M, -N, -f for command line arguements
2009-06-19 22:35:42 +00:00
kaustubhprabhu
ff4f2d4430
implemented changes in reporter_callback functionality
2009-06-19 00:05:29 +00:00
Jon Dugan
bc3211eea3
moved constants and #define from iperf_api.c to iperf_api.h
2009-06-18 02:40:48 +00:00
Jon Dugan
7b1bded36e
significant changes to the iperf structures:
...
iperf_stream_result now uses two struct timeval's instead of a duration
bufsize in iperf_settings is now blksize
iperf_test no longer has remote_addr and local_addr
iperf_test now uses server_hostname to hold the server name
listener_port in iperf_test has been renamed server_port
custom_data in iperf_stream_result is now data (opaque data)
added an opaque data memeber to iperf_stream, named data
updates to iperf_api.c from the name changes
this simplifies the run client code because we don't have to do so much
footwork for netdial
the calculation for the throughput currently uses test->duration rather than
the difference of the stream_results timevals.
2009-06-18 02:39:13 +00:00
Jon Dugan
4f54b8f91b
reformat comments after tab normalization
2009-06-18 02:32:12 +00:00
Jon Dugan
1276da5bdf
normalize tabs to 4 spaces
2009-06-18 01:49:38 +00:00
Jon Dugan
e1558c20ad
update Makefile to work with iperf_api.c
2009-06-18 01:49:18 +00:00
kaustubhprabhu
12c37dca2f
implemented -p (protocol) related changes, added connect_msg() function
2009-06-18 00:07:55 +00:00
kaustubhprabhu
07222cef2f
implmented code review changes and stats_callback, reporter_callback functions
2009-06-17 00:01:32 +00:00
kaustubhprabhu
d70a792d6c
implemented code review changes from r81 -r87
2009-06-16 18:59:50 +00:00
kaustubhprabhu
c5826da269
added basic stats_callback for -i option
2009-06-16 00:57:29 +00:00
kaustubhprabhu
f05558b01d
added function iperf_free_stream() with appropriate contents, changed few references
2009-06-15 23:57:43 +00:00
kaustubhprabhu
ba492bef36
added new field listener_port in iperf_api.h, changed udp_Accept() port assignment in iperf_api.c
2009-06-15 19:43:52 +00:00
kaustubhprabhu
d1dc4db8c2
corrected recv error check condition in server, added Display() function for debug purpose
2009-06-15 17:53:09 +00:00
kaustubhprabhu
116e8bcbcf
added iperf_run_client, iperf_tcp_send, iperf_udp_Send and client side changes in iperf_init_test
2009-06-12 22:23:05 +00:00
kaustubhprabhu
2d4dec84ad
corrected UDP accept part in iperf_udp_accept
2009-06-12 19:04:37 +00:00
kaustubhprabhu
3a96746bc2
added the tcp window related checks on server side
2009-06-12 00:03:12 +00:00
kaustubhprabhu
24b42564ea
changed TCP/UDP server code in accordance with Jon's last commit
2009-06-11 22:18:19 +00:00
Jon Dugan
930b564653
add new_stream and accept callbacks to iperf_test
...
remove init callback from iperf_stream
rework client initialization to take advantage of new_stream callback
2009-06-11 06:55:00 +00:00
Jon Dugan
c2b87ef8d9
rename functions with _create_ to _new_
...
rename functions with _destroy_ to _free_
collapse settings into a single struct for simplicity
rework iperf_new_udp_stream, iperf_new_tcp_stream
2009-06-11 06:36:53 +00:00
kaustubhprabhu
c6f24137f1
changed newlty created APIs for Server side
2009-06-11 01:18:18 +00:00
kaustubhprabhu
6c6757c6f8
Added more APIs for iperf_api.c and changed main.c for comments and log
2009-06-10 00:23:21 +00:00
kaustubhprabhu
061af7d9aa
created new iperf_api.c with functions defined in iperf_api.h
2009-06-09 00:03:37 +00:00
kaustubhprabhu
b085d6d102
created new iperf_api.c with functions defined in iperf_api.h
2009-06-09 00:00:30 +00:00
kaustubhprabhu
9f62884d32
Split Server function in TCP/UDP related functions
2009-06-05 22:00:10 +00:00
kaustubhprabhu
5633640e37
Updated Client side code with Select
2009-06-03 21:04:32 +00:00
kaustubhprabhu
db1760105f
changed the linked list functions
2009-06-02 22:06:49 +00:00
kaustubhprabhu
beec2717ab
changed the linked list functions
2009-06-02 21:26:58 +00:00
kaustubhprabhu
4bd06c53f0
changed code for Select API
2009-06-02 01:13:26 +00:00
Jon Dugan
ff5411c68d
initial whack at iperf API -- still rough
2009-05-30 01:21:44 +00:00
Jon Dugan
56cb7ca790
pass settings rather than using a global
2009-02-24 09:44:14 +00:00
Jon Dugan
bc495fb9f7
fix UNIT_LEN
...
tweak format in unit_snprintf
2009-02-24 09:43:27 +00:00
Jon Dugan
e92877004e
add unit conversion and formatting from old code. remove hungarian gobbledeygook
2009-02-24 08:05:14 +00:00
Jon Dugan
d18ce8e918
bring over old unit converting functions
2009-02-24 06:25:08 +00:00
Jon Dugan
0fdaab072e
initial commit of new code
2009-02-24 06:22:58 +00:00
Jon Dugan
38e1acb706
move old source out of the way, we'll cherry pick some stuff back
2009-02-24 06:19:03 +00:00
Jon Dugan
b99858c29e
move windows service cruft into service.c
2009-01-24 10:52:31 +00:00
Jon Dugan
bd8c92d8f6
merged Gerrit's nanosleep patch
...
tweaked type of currLen as fixup for Nathan's patch
2008-05-10 03:18:35 +00:00
Jon Dugan
0c9092408e
added patch to address underflow when -n is not a multiple of -l
...
from Nathan Jones: https://sourceforge.net/tracker/index.php?func=detail&aid=1943432&group_id=128336&atid=711373
2008-05-10 02:26:48 +00:00
Jon Dugan
2c094e1e14
print report headers only once
...
use correct report header for UDP tests
2008-04-09 00:08:11 +00:00
Jon Dugan
1e12002c82
worked in Claus Klein's help string patches
...
removed silly #error from the congestion patch
preliminary manpage (!)
bumped version number to 2.0.4
changed email address to iperf-users@lists.sourceforge.net
removed duplicate help strings
2008-04-02 08:25:36 +00:00
Jon Dugan
62bb2588af
Stephen Hemminger's congestion control patch for Linux
2008-03-19 22:23:26 +00:00
Jon Dugan
4ca10dd877
Rework Client::RunTCP so to update the stats for every packet if -i is set.
...
If -i is not set then the stats are only updated at the end of the run. This
was fallout of Andrew's patch.
2008-03-12 21:55:22 +00:00
Jon Dugan
1efd8f8c50
2008-03-12 Jon Dugan <jdugan@x1024.net>
...
* Added -Wall to CXXFLAGS and CFLAGS. This generated a lot of noise in the
autotools generated files.
* Added initial AUTHORS file. This is incomplete, but it's a start.
2008-03-12 Andrew Gallatin <gallatin@gmail.com>
* Rework threading. This is done by having a condition variable for the reporting
thread rather than using sched_yield and/or usleep.
* Address performance issues on non Linux systems by avoiding system calls
which are expensive on platforms other than Linux.
* Fixes from FreeBSD ports: max_size_t is now 64 bits and not Iperf does not
exit on ENOBUFS.
2008-03-12 20:28:21 +00:00
Jon Dugan
d9bae63405
import Iperf 2.0.2 release
2007-08-29 22:07:15 +00:00
Jon Dugan
ea532f4f4b
update to Iperf 2.0.1
2007-08-29 22:02:04 +00:00
Jon Dugan
aa594bbb79
import of iperf-2.0 release
2007-08-29 21:57:27 +00:00