Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support SO_BINDTODEVICE #817

Closed
wants to merge 45 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
d95a444
Support SO_BINDTODEVICE
greearb Nov 16, 2018
57d7294
Exit process if we cannot write to outfile.
greearb Nov 17, 2018
85a0bd8
Allow pidfile in client mode too.
greearb Dec 19, 2018
5c523fe
Print out netdev and local-ip we bind to.
greearb Dec 20, 2018
095abe2
Allow specifying precision.
greearb Feb 11, 2019
6aa4c80
iperf3: Support cross-compiling with mingw to create win32 executable.
greearb Oct 21, 2019
d49cc94
Fix windows problems and bad socket management.
greearb Oct 21, 2019
7f6c513
Add lots of debugging.
greearb Oct 22, 2019
3511259
Add a bit more state debugging.
greearb Oct 22, 2019
1bca8c3
Add hexdump debugging to socket read/write calls.
greearb Oct 22, 2019
afacb73
More debugging around client-side udp transactions.
greearb Oct 22, 2019
4216042
More debugging around netannounce.
greearb Oct 22, 2019
ee7ef1c
Remove un-needed fd-clear.
greearb Oct 22, 2019
5925cc2
Retry udp connect message.
greearb Oct 22, 2019
a1ac79e
Fix udp-connect retry logic, fix printing hexdump of socket communica…
greearb Oct 22, 2019
ef3c28d
Never block select more than one second in server mode.
greearb Oct 22, 2019
715b773
Do not block forever in udp-accept.
greearb Oct 23, 2019
9900d02
Fix jitter calculation.
greearb Oct 23, 2019
e4b36b3
Fix memory leak of json print object.
greearb Oct 23, 2019
b8fc74a
Support packaging nsis installer for Windows.
greearb Oct 23, 2019
a9cecde
Fix build on older C compilers.
greearb Oct 23, 2019
0446a12
Windows cannot support setting ToS: Warn and continue.
greearb Oct 23, 2019
e0af34a
Improve debugging.
greearb Oct 23, 2019
cbb5726
Remove un-needed is_closed() logic.
greearb Oct 24, 2019
cfe7ea4
Add comments, and remove some un-needed calls to clear FDs
greearb Oct 24, 2019
7665427
Make all sockets non-blocking.
greearb Oct 24, 2019
5a339ea
debugging: Add timestamps to some logging, log state changes.
greearb Oct 24, 2019
46f335f
Use helper method to close sockets.
greearb Oct 24, 2019
2e39014
Fix hang in waitRead
greearb Oct 24, 2019
837c682
Stop test if it has been in create-streams state for more than 5 seco…
greearb Oct 25, 2019
98df879
Fix compile warnings.
greearb Oct 25, 2019
c64cb64
Use stdout instead of stderr for windows errors.
greearb Oct 25, 2019
b6217ec
Fix compile on Linux.
greearb Oct 25, 2019
9ffff80
Move cleanup-server to one location.
greearb Oct 25, 2019
d61ed5b
Clean up streams in test cleanup code.
greearb Oct 25, 2019
a1e3330
Rename stream id to stream_id
greearb Oct 25, 2019
f4c2c54
Use stream_id for 'id' instead of the stream socket.
greearb Oct 25, 2019
3aa1961
Fix reporting peer's results in server mode when server is sender.
greearb Oct 28, 2019
9c767ce
Fix summary stats exhange in client mode when server is sender.
greearb Oct 28, 2019
22757a2
Fix server-side summary reporting when peer is sender.
greearb Oct 28, 2019
e3ff364
Update rls notes.
greearb Oct 28, 2019
ae300c1
Allow reading more than blksize for TCP connections.
greearb Oct 28, 2019
21ea36c
Update rls notes.
greearb Oct 28, 2019
d4c14aa
Add zlib1.dll to the windows installer.
greearb Oct 29, 2019
04af26a
Fix busy-spin in client mode, make sure test eventually completes.
greearb Dec 13, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Allow pidfile in client mode too.
Automated use of iperf needs a way to clean up client-mode
connections too, so let the pidfile work in either mode.

Signed-off-by: Ben Greear <greearb@candelatech.com>
greearb committed Oct 16, 2019

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 85a0bd86bf4147ee6cd6e803fd385989e93fe0bd
6 changes: 3 additions & 3 deletions src/iperf3.1
Original file line number Diff line number Diff line change
@@ -153,6 +153,9 @@ send output to a log file.
force flushing output at every interval.
Used to avoid buffering when sending output to pipe.
.TP
.BR -I ", " --pidfile " \fIfile\fR"
write a file with the process ID, useful for automated process cleanup.
.TP
.BR -d ", " --debug " "
emit debugging output.
Primarily (perhaps exclusively) of use to developers.
@@ -171,9 +174,6 @@ run in server mode
.BR -D ", " --daemon " "
run the server in background as a daemon
.TP
.BR -I ", " --pidfile " \fIfile\fR"
write a file with the process ID, most useful when running as a daemon.
.TP
.BR -1 ", " --one-off
handle one client connection, then exit.
.TP
1 change: 0 additions & 1 deletion src/iperf_api.c
Original file line number Diff line number Diff line change
@@ -1199,7 +1199,6 @@ iperf_parse_arguments(struct iperf_test *test, int argc, char **argv)
break;
case 'I':
test->pidfile = strdup(optarg);
server_flag = 1;
break;
case OPT_LOGFILE:
test->logfile = strdup(optarg);
2 changes: 1 addition & 1 deletion src/iperf_locale.c
Original file line number Diff line number Diff line change
@@ -110,13 +110,13 @@ const char usage_longstr[] = "Usage: iperf3 [-s|-c host] [options]\n"
" -J, --json output in JSON format\n"
" --logfile f send output to a log file\n"
" --forceflush force flushing output at every interval\n"
" -I, --pidfile file write PID file\n"
" -d, --debug emit debugging output\n"
" -v, --version show version information and quit\n"
" -h, --help show this message and quit\n"
"Server specific:\n"
" -s, --server run in server mode\n"
" -D, --daemon run the server as a daemon\n"
" -I, --pidfile file write PID file\n"
" -1, --one-off handle one client connection then exit\n"
#if defined(HAVE_SSL)
" --rsa-private-key-path path to the RSA private key used to decrypt\n"
12 changes: 7 additions & 5 deletions src/main.c
Original file line number Diff line number Diff line change
@@ -133,6 +133,11 @@ run(struct iperf_test *test)
/* Ignore SIGPIPE to simplify error handling */
signal(SIGPIPE, SIG_IGN);

if (iperf_create_pidfile(test) < 0) {
i_errno = IEPIDFILE;
iperf_errexit(test, "error - %s", iperf_strerror(i_errno));
}

switch (test->role) {
case 's':
if (test->daemon) {
@@ -143,10 +148,6 @@ run(struct iperf_test *test)
iperf_errexit(test, "error - %s", iperf_strerror(i_errno));
}
}
if (iperf_create_pidfile(test) < 0) {
i_errno = IEPIDFILE;
iperf_errexit(test, "error - %s", iperf_strerror(i_errno));
}
for (;;) {
int rc;
rc = iperf_run_server(test);
@@ -165,7 +166,6 @@ run(struct iperf_test *test)
break;
}
}
iperf_delete_pidfile(test);
break;
case 'c':
if (iperf_run_client(test) < 0)
@@ -176,6 +176,8 @@ run(struct iperf_test *test)
break;
}

iperf_delete_pidfile(test);

iperf_catch_sigend(SIG_DFL);
signal(SIGPIPE, SIG_DFL);