diff options
author | lns <matzeton@googlemail.com> | 2023-09-24 22:50:22 +0200 |
---|---|---|
committer | lns <matzeton@googlemail.com> | 2023-09-24 22:50:22 +0200 |
commit | 7fde1db6a4b00696c433de8498e88e3928d6d757 (patch) | |
tree | 9010a0326b2f5c2edf975a3c974160c30a123231 /example/ndpiReader.c | |
parent | 725fcf4852f06e2f54469c2439d13169d5d68d09 (diff) |
Added printf/fprintf replacement for some internal modules.improved/logging_callback_ndpi_printf
* logging is instead redirected to `ndpi_debug_printf`
Signed-off-by: lns <matzeton@googlemail.com>
Diffstat (limited to 'example/ndpiReader.c')
-rw-r--r-- | example/ndpiReader.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/example/ndpiReader.c b/example/ndpiReader.c index 9f6643b57..711964695 100644 --- a/example/ndpiReader.c +++ b/example/ndpiReader.c @@ -40,6 +40,7 @@ #else #include <unistd.h> #include <netinet/in.h> +#include <netinet/ip.h> #include <sys/socket.h> #include <sys/mman.h> #endif @@ -612,10 +613,10 @@ static void help(u_int long_help) { NDPI_BITMASK_SET_ALL(all); ndpi_set_protocol_detection_bitmask2(ndpi_info_mod, &all); - ndpi_dump_protocols(ndpi_info_mod); + ndpi_dump_protocols(ndpi_info_mod, stdout); printf("\n\nnDPI supported risks:\n"); - ndpi_dump_risks_score(); + ndpi_dump_risks_score(stdout); ndpi_exit_detection_module(ndpi_info_mod); } @@ -977,7 +978,7 @@ static void parseOptions(int argc, char **argv) { switch (opt) { case 'a': - ndpi_generate_options(atoi(optarg)); + ndpi_generate_options(atoi(optarg), stdout); exit(0); case 'A': |