aboutsummaryrefslogtreecommitdiff
path: root/example/ndpiReader.c
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2019-10-08 11:35:33 +0200
committerLuca Deri <deri@ntop.org>2019-10-08 11:35:33 +0200
commit10873bfe3564b52561f692400ad51fc9923e0b14 (patch)
tree4966de24bd08b1dc11bdc12ffa520fb49829d053 /example/ndpiReader.c
parent4bdbf02c2d5eb871dca4ec620bb66fcc16a74af1 (diff)
Added ndpi_get_l4_proto_name() and ndpi_get_l4_proto_info() API calls to print L4 protocol
Diffstat (limited to 'example/ndpiReader.c')
-rw-r--r--example/ndpiReader.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/example/ndpiReader.c b/example/ndpiReader.c
index 2a1bbd8bb..46656cb96 100644
--- a/example/ndpiReader.c
+++ b/example/ndpiReader.c
@@ -412,9 +412,15 @@ static void help(u_int long_help) {
#endif
if(long_help) {
+ NDPI_PROTOCOL_BITMASK all;
+
printf("\n\nnDPI supported protocols:\n");
- printf("%3s %-22s %-12s %s\n", "Id", "Protocol", "Breed", "Category");
+ printf("%3s %-22s %-8s %-12s %s\n", "Id", "Protocol", "Layer_4", "Breed", "Category");
num_threads = 1;
+
+ NDPI_BITMASK_SET_ALL(all);
+ ndpi_set_protocol_detection_bitmask2(ndpi_info_mod, &all);
+
ndpi_dump_protocols(ndpi_info_mod);
}
exit(!long_help);