feat(v33): descriptive usage message
This commit is contained in:
parent
fe9cd55727
commit
27a98ee4b3
1 changed files with 9 additions and 2 deletions
11
tsock_v3.c
11
tsock_v3.c
|
@ -95,7 +95,7 @@ int main (int argc, char **argv)
|
||||||
|
|
||||||
default:
|
default:
|
||||||
print_usage();
|
print_usage();
|
||||||
break;
|
exit(1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -358,5 +358,12 @@ int count_digits(int lg) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void print_usage() {
|
void print_usage() {
|
||||||
printf("usage: cmd [-p|-s][-n ##]\n");
|
printf("usage: tsock_v3 [-psu] [-n nb_messages] [-l mess_length] [host] <port>\n");
|
||||||
|
printf("parameters: host With -s, address of the host to connect to. Required with -s.\n");
|
||||||
|
printf(" port Port to connect or bind to. Required.\n");
|
||||||
|
printf("options: -l mess_length Size of the messages to send. Min 5. Max 1400. Default 30. Ignored with -p.\n");
|
||||||
|
printf(" -n nb_messages Number of messages to send. Min 1. Default 10. Ignored with -p.\n");
|
||||||
|
printf(" -p Runs a TCP/UDP sink. Incompatible with -s.\n");
|
||||||
|
printf(" -s Runs a TCP/UDP faucet. Incompatible with -p.\n");
|
||||||
|
printf(" -u Use UDP instead of TCP.\n");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue