aboutsummaryrefslogtreecommitdiff
path: root/src/options.c
diff options
context:
space:
mode:
authorMasaq- <tilt@techie.com>2019-02-08 04:17:50 +0000
committerMasaq- <tilt@techie.com>2019-02-08 04:17:50 +0000
commitdfb47d868a46b8d3aacc8ee1446fa9302e047a79 (patch)
treea3b557307ade2df9120e179e9301340cd2b10710 /src/options.c
parent18e57efacab2be387a42ea566125ee65c915cc78 (diff)
command line option -y payload size
Diffstat (limited to 'src/options.c')
-rw-r--r--src/options.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/options.c b/src/options.c
index f1080aa..f6dba79 100644
--- a/src/options.c
+++ b/src/options.c
@@ -384,7 +384,7 @@ int parse_options(int argc, char **argv) {
* since you have to pass long options as '--option=value'. Commonly used
* '--option value' is *NOT* allowed for some libc implementations.
*/
- c = getopt_long(argc, argv, "m:p:l:r::R::c:v:L::o::sP:d::Su::g::C::e::w:a:t:h", &long_options[0], &oidx);
+ c = getopt_long(argc, argv, "m:p:l:r::R::c:v:L::o::sP:d::Su::g::C::e::w:a:t:y:h", &long_options[0], &oidx);
if (c == -1) break;
switch (c) {
@@ -548,6 +548,11 @@ int parse_options(int argc, char **argv) {
break;
opts.resend_interval = atoi(optarg);
break;
+ case 'y':
+ if (!optarg)
+ break;
+ opts.payload_size = atoi(optarg);
+ break;
case 'h':
print_usage(argv[0]);
exit(EXIT_SUCCESS);