Add help message.

This commit is contained in:
tim.schubert@tu-bs.de 2016-10-30 00:12:16 +02:00
parent c0ff7fa9f0
commit 04d5638c02

View file

@ -281,10 +281,15 @@ int main(int argc, char *argv[])
if (argc > 1 && strcmp(argv[1], "-c") == 0) {
CLIENT = 1; // client mode
if (argc > 3) {
if (argc > 2) {
host = argv[2];
port = argv[3];
if (argc > 3) {
port = argv[3];
}
}
} else if (argc > 1 && strcmp(argv[1], "-h") == 0) {
printf("usage: netcalc [-c hostname] [port]\n");
return 0;
} else {
CLIENT = 0;
afamiliy = AF_INET6;