diff options
author | Luca Giovenzana <luca@giovenzana.org> | 2015-05-21 01:18:31 +0200 |
---|---|---|
committer | Luca Giovenzana <luca@giovenzana.org> | 2015-05-21 01:51:36 +0200 |
commit | b3b0ce7237fed3d236d2113933a3041264a52828 (patch) | |
tree | a86e3dee33a01fa7992731d05c4fddd5c3b710ba /example/ndpiReader.c | |
parent | e792ed68908a32ae01861e13dc977cdcb8d90f8f (diff) |
Update ndpiReader.c: added -r to print used nDPI version and release
Diffstat (limited to 'example/ndpiReader.c')
-rw-r--r-- | example/ndpiReader.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/example/ndpiReader.c b/example/ndpiReader.c index f6f0e55f1..50ace72b1 100644 --- a/example/ndpiReader.c +++ b/example/ndpiReader.c @@ -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; |