better random payload code
This commit is contained in:
parent
c44d17d1f7
commit
9e1f731a44
@ -1,6 +1,7 @@
|
|||||||
|
|
||||||
iperf3 is a complete rewrite of iperf2, with a goal of making the
|
iperf3 is a complete rewrite of iperf2, with a goal of making the
|
||||||
code smaller and easier to maintain.
|
code smaller and easier to maintain, and to support a client library
|
||||||
|
verion of the functionality.
|
||||||
|
|
||||||
|
|
||||||
Main designer: Jon Dugan, ESnet
|
Main designer: Jon Dugan, ESnet
|
||||||
|
@ -768,9 +768,9 @@ iperf_new_stream(struct iperf_test * testp)
|
|||||||
sp->result = (struct iperf_stream_result *) malloc(sizeof(struct iperf_stream_result));
|
sp->result = (struct iperf_stream_result *) malloc(sizeof(struct iperf_stream_result));
|
||||||
|
|
||||||
/* fill in buffer with random stuff */
|
/* fill in buffer with random stuff */
|
||||||
/* XXX: probably better to use something truely random here */
|
srandom (time(0));
|
||||||
for (i = 0; i < testp->default_settings->blksize; i++)
|
for (i = 0; i < testp->default_settings->blksize; i++)
|
||||||
sp->buffer[i] = i % 255;
|
sp->buffer[i] = random();
|
||||||
|
|
||||||
sp->socket = -1;
|
sp->socket = -1;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user