Support --cport and --parallel

When running multiple parallel streams, the specified port number
is incremented for each successive stream.

Signed-off-by: Kevin Constantine <kevin.constantine@gmail.com>
This commit is contained in:
Kevin Constantine 2014-09-15 14:15:04 -07:00
parent 90f317355d
commit 517321138a

View File

@ -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;