From 50216991bd41f0cdfea599a76ace08ebd00501d3 Mon Sep 17 00:00:00 2001 From: Luca Deri Date: Thu, 10 May 2018 23:46:35 +0200 Subject: Improved hyperscan support and category definition --- example/ndpiReader.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'example/ndpiReader.c') diff --git a/example/ndpiReader.c b/example/ndpiReader.c index 3069adf8e..8560b0910 100644 --- a/example/ndpiReader.c +++ b/example/ndpiReader.c @@ -755,11 +755,17 @@ static void printFlow(u_int16_t id, struct ndpi_flow_info *flow, u_int16_t threa flow->detected_protocol.master_protocol, flow->detected_protocol.app_protocol, ndpi_protocol2name(ndpi_thread_info[thread_id].workflow->ndpi_struct, flow->detected_protocol, buf, sizeof(buf))); + + if(flow->detected_protocol.category != 0) + fprintf(out, "[cat: %u]", flow->detected_protocol.category); } else fprintf(out, "[proto: %u/%s]", flow->detected_protocol.app_protocol, ndpi_get_proto_name(ndpi_thread_info[thread_id].workflow->ndpi_struct, flow->detected_protocol.app_protocol)); + if(flow->detected_protocol.category != 0) + fprintf(out, "[cat: %u]", flow->detected_protocol.category); + fprintf(out, "[%u pkts/%llu bytes ", flow->src2dst_packets, (long long unsigned int) flow->src2dst_bytes); fprintf(out, "%s %u pkts/%llu bytes]", (flow->dst2src_packets > 0) ? "<->" : "->", -- cgit v1.2.3