summaryrefslogtreecommitdiff
path: root/src/tools/ocbr/ocbr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/ocbr/ocbr.c')
-rw-r--r--src/tools/ocbr/ocbr.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/tools/ocbr/ocbr.c b/src/tools/ocbr/ocbr.c
index fe3f1a7d..c92ba0e0 100644
--- a/src/tools/ocbr/ocbr.c
+++ b/src/tools/ocbr/ocbr.c
@@ -1,10 +1,10 @@
/*
- * Ouroboros - Copyright (C) 2016 - 2020
+ * Ouroboros - Copyright (C) 2016 - 2026
*
* CBR traffic generator
*
- * Dimitri Staessens <dimitri.staessens@ugent.be>
- * Sander Vrijders <sander.vrijders@ugent.be>
+ * Dimitri Staessens <dimitri@ouroboros.rocks>
+ * Sander Vrijders <sander@ouroboros.rocks>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -155,17 +155,22 @@ int main(int argc, char ** argv)
if (s_apn == NULL) {
printf("No server specified.\n");
usage();
- return 0;
+ return 1;
}
if (size > BUF_SIZE) {
printf("Maximum size: %ld.\n", BUF_SIZE);
- return 0;
+ return 1;
}
if (size < 0) {
printf("Size overflow.\n");
- return 0;
+ return 1;
+ }
+
+ if (rate <= 0) {
+ printf("Invalid rate.\n");
+ return 1;
}
ret = client_main(s_apn, duration, size, rate, flood, sleep);