Update ndpiReader.c: added -r to print used nDPI version and release

This commit is contained in:
Luca Giovenzana
2015-05-21 01:51:36 +02:00
parent e792ed6890
commit b3b0ce7237
+6 -1
View File
@@ -208,6 +208,7 @@ static void help(u_int long_help) {
" -d | Disable protocol guess and use only DPI\n"
" -q | Quiet mode\n"
" -t | Dissect GTP tunnels\n"
" -r | Print nDPI version and git revision\n"
" -w <path> | Write test output on the specified file. This is useful for\n"
" | testing purposes in order to compare results across runs\n"
" -h | This help\n"
@@ -232,7 +233,7 @@ static void parseOptions(int argc, char **argv) {
u_int num_cores = sysconf(_SC_NPROCESSORS_ONLN);
#endif
while ((opt = getopt(argc, argv, "df:g:i:hp:l:s:tv:V:n:j:w:q")) != EOF) {
while ((opt = getopt(argc, argv, "df:g:i:hp:l:s:tv:V:n:j:rp:w:q")) != EOF) {
switch (opt) {
case 'd':
enable_protocol_guess = 0;
@@ -271,6 +272,10 @@ static void parseOptions(int argc, char **argv) {
decode_tunnels = 1;
break;
case 'r':
printf("ndpiReader, nDPI (%s)\n\n", ndpi_revision());
exit(0);
case 'v':
verbose = atoi(optarg);
break;