diff options
author | Sander Vrijders <sander.vrijders@intec.ugent.be> | 2016-05-27 15:18:27 +0200 |
---|---|---|
committer | Sander Vrijders <sander.vrijders@intec.ugent.be> | 2016-05-27 15:18:27 +0200 |
commit | 7d9e6dc52ef4fca6edf8199a3146f09308b57860 (patch) | |
tree | 56b88ae328a58f839d40838a92d49c5defde1c09 /src/tools/cbr/cbr.c | |
parent | 17e9c86c2fa45b39b88b73f9fd34c2d9b95ae7d4 (diff) | |
parent | 5f79244d8d83fffab21dc3d18697d938ef836c09 (diff) | |
download | ouroboros-7d9e6dc52ef4fca6edf8199a3146f09308b57860.tar.gz ouroboros-7d9e6dc52ef4fca6edf8199a3146f09308b57860.zip |
Merged in dstaesse/ouroboros/be-cbr-flood (pull request #116)
tools: updated cbr with flood and sleep options
Diffstat (limited to 'src/tools/cbr/cbr.c')
-rw-r--r-- | src/tools/cbr/cbr.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/tools/cbr/cbr.c b/src/tools/cbr/cbr.c index d7077e9c..e36b1856 100644 --- a/src/tools/cbr/cbr.c +++ b/src/tools/cbr/cbr.c @@ -55,9 +55,11 @@ static void usage(void) " -t, --timeout Server timeout interval (s)\n" "\n" "Client options:\n" - " -d --duration Duration for sending (s)\n" + " -d, --duration Duration for sending (s)\n" + " -f, --flood Send SDU's as fast as possible\n" " -s, --size SDU size (B)\n" " -r, --rate Rate (b/s)\n" + " --sleep Sleep in between sending sdu's\n" "\n\n" " --help Display this help text and exit\n"); } @@ -67,6 +69,8 @@ int main(int argc, char ** argv) int duration = 60; /* One minute test */ int size = 1000; /* 1000 byte SDU's */ long rate = 1000000; /* 1 Mb/s */ + bool flood = false; + bool sleep = false; char * rem; bool server = false; @@ -105,6 +109,11 @@ int main(int argc, char ** argv) } else if (strcmp(*argv, "-l") == 0 || strcmp(*argv, "--listen") == 0) { server = true; + } else if (strcmp(*argv, "-f") == 0 || + strcmp(*argv, "--flood") == 0) { + flood = true; + } else if (strcmp(*argv, "--sleep") == 0) { + sleep = true; } else { usage(); return 0; @@ -117,5 +126,5 @@ int main(int argc, char ** argv) return server_main(); } - return client_main(duration, size, rate); + return client_main(duration, size, rate, flood, sleep); } |