{"port", required_argument, 0, 'p'},
{"server", no_argument, 0, 's'},
{"timeout", required_argument, 0, 't'},
+ {"version", no_argument, 0, 'V'},
{"zero", no_argument, 0, 'z'},
{0, 0, 0, 0},
};
int done = 0;
while (!done) {
- int c = getopt_long(argc, argv, "c:dkp:st:zP:", long_options, &option_index);
+ int c = getopt_long(argc, argv, "c:dkp:st:zP:V", long_options, &option_index);
// End
if (c == -1)
// getopt_long already printed the error message
return 1;
+ case 'V':
+ printf("%s %s\n", PACKAGE_NAME, PACKAGE_VERSION);
+ printf("Copyright (C) 2021 The IPFire Project (https://www.ipfire.org/)\n");
+ printf("License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>\n");
+ printf("This is free software: you are free to change and redistribute it\n");
+ printf("There is NO WARRANTY, to the extent permitted by law.\n\n");
+ printf("Written by Michael Tremer\n");
+
+ exit(0);
+ break;
+
case 'c':
conf->mode = FIREPERF_MODE_CLIENT;