aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2020-06-13 13:20:00 +0200
committerToni Uhlig <matzeton@googlemail.com>2020-06-13 13:20:00 +0200
commit27bafb029a97752e2cd5e3e6f67000e79274fc77 (patch)
tree8e60643529244c4f6a3f8c3979e4623fccbca018 /main.c
parent3423ca169b1e79d5e756ce6aeff28f63da842295 (diff)
don't print ARP stuff, use ndpi_is_protocol_detected for checked protocol detection
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'main.c')
-rw-r--r--main.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/main.c b/main.c
index 6e3b527be..21cd056aa 100644
--- a/main.c
+++ b/main.c
@@ -497,7 +497,6 @@ static void ndpi_process_packet(uint8_t * const args,
}
break;
case ETH_P_ARP: /* ARP */
- printf("%s\n", "ARP - skipping");
return;
default:
fprintf(stderr, "Unknown Ethernet packet with type 0x%X - skipping\n", type);
@@ -719,11 +718,13 @@ static void ndpi_process_packet(uint8_t * const args,
ip != NULL ? (uint8_t *)ip : (uint8_t *)ip6,
ip_size, time_ms, ndpi_src, ndpi_dst);
- if (flow_to_process->detected_l7_protocol.master_protocol != NDPI_PROTOCOL_UNKNOWN) {
+ if (ndpi_is_protocol_detected(workflow->ndpi_struct,
+ flow_to_process->detected_l7_protocol) != 0) {
flow_to_process->detection_completed = 1;
- fprintf(stderr, "DETECTED PROTOCOL: %s | APP PROTOCOL: %s\n",
+ fprintf(stderr, "DETECTED PROTOCOL: %s | APP PROTOCOL: %s | CATEGORY: %s\n",
ndpi_get_proto_name(workflow->ndpi_struct, flow_to_process->detected_l7_protocol.master_protocol),
- ndpi_get_proto_name(workflow->ndpi_struct, flow_to_process->detected_l7_protocol.app_protocol));
+ ndpi_get_proto_name(workflow->ndpi_struct, flow_to_process->detected_l7_protocol.app_protocol),
+ ndpi_category_get_name(workflow->ndpi_struct, flow_to_process->detected_l7_protocol.category));
}
}