From 90f317355dfc5c03caae323769027c4a038fb437 Mon Sep 17 00:00:00 2001 From: Kevin Constantine Date: Mon, 15 Sep 2014 14:14:10 -0700 Subject: [PATCH 1/3] Fix declaration of iperf_test.bind_port Signed-off-by: Kevin Constantine --- src/iperf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/iperf.h b/src/iperf.h index dec9c7a..983070d 100644 --- a/src/iperf.h +++ b/src/iperf.h @@ -172,7 +172,7 @@ struct iperf_test signed char state; char *server_hostname; /* -c option */ char *bind_address; /* -B option */ - int *bind_port; /* -e option */ + int bind_port; /* -e option */ int server_port; int omit; /* duration of omit period (-O flag) */ int duration; /* total duration of test (-t flag) */ From 517321138a3f091713550af17f1556360e3843c7 Mon Sep 17 00:00:00 2001 From: Kevin Constantine Date: Mon, 15 Sep 2014 14:15:04 -0700 Subject: [PATCH 2/3] Support --cport and --parallel When running multiple parallel streams, the specified port number is incremented for each successive stream. Signed-off-by: Kevin Constantine --- src/iperf_client_api.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/iperf_client_api.c b/src/iperf_client_api.c index ab84cfa..7f800cd 100644 --- a/src/iperf_client_api.c +++ b/src/iperf_client_api.c @@ -33,8 +33,10 @@ iperf_create_streams(struct iperf_test *test) int i, s; struct iperf_stream *sp; + int orig_bind_port = test->bind_port; for (i = 0; i < test->num_streams; ++i) { + test->bind_port = orig_bind_port + i; if ((s = test->protocol->connect(test)) < 0) return -1; From ac468c8bc0445dd6f3ba46ee2c92bc9e9728b70a Mon Sep 17 00:00:00 2001 From: "Bruce A. Mah" Date: Mon, 15 Sep 2014 14:30:33 -0700 Subject: [PATCH 3/3] Comment fix: Fix the option associated with iperf_test.bind_port. No functional change. --- src/iperf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/iperf.h b/src/iperf.h index 983070d..4cfab50 100644 --- a/src/iperf.h +++ b/src/iperf.h @@ -172,7 +172,7 @@ struct iperf_test signed char state; char *server_hostname; /* -c option */ char *bind_address; /* -B option */ - int bind_port; /* -e option */ + int bind_port; /* --cport option */ int server_port; int omit; /* duration of omit period (-O flag) */ int duration; /* total duration of test (-t flag) */