Update ndpiReader.c: added -r to print used nDPI version and release
This commit is contained in:
@@ -208,6 +208,7 @@ static void help(u_int long_help) {
|
|||||||
" -d | Disable protocol guess and use only DPI\n"
|
" -d | Disable protocol guess and use only DPI\n"
|
||||||
" -q | Quiet mode\n"
|
" -q | Quiet mode\n"
|
||||||
" -t | Dissect GTP tunnels\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"
|
" -w <path> | Write test output on the specified file. This is useful for\n"
|
||||||
" | testing purposes in order to compare results across runs\n"
|
" | testing purposes in order to compare results across runs\n"
|
||||||
" -h | This help\n"
|
" -h | This help\n"
|
||||||
@@ -232,7 +233,7 @@ static void parseOptions(int argc, char **argv) {
|
|||||||
u_int num_cores = sysconf(_SC_NPROCESSORS_ONLN);
|
u_int num_cores = sysconf(_SC_NPROCESSORS_ONLN);
|
||||||
#endif
|
#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) {
|
switch (opt) {
|
||||||
case 'd':
|
case 'd':
|
||||||
enable_protocol_guess = 0;
|
enable_protocol_guess = 0;
|
||||||
@@ -271,6 +272,10 @@ static void parseOptions(int argc, char **argv) {
|
|||||||
decode_tunnels = 1;
|
decode_tunnels = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'r':
|
||||||
|
printf("ndpiReader, nDPI (%s)\n\n", ndpi_revision());
|
||||||
|
exit(0);
|
||||||
|
|
||||||
case 'v':
|
case 'v':
|
||||||
verbose = atoi(optarg);
|
verbose = atoi(optarg);
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user