From 517321138a3f091713550af17f1556360e3843c7 Mon Sep 17 00:00:00 2001 From: Kevin Constantine Date: Mon, 15 Sep 2014 14:15:04 -0700 Subject: [PATCH] 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;