From 0974075fa0411d4a652baa96f5a1f801e999a075 Mon Sep 17 00:00:00 2001 From: Luca Deri Date: Thu, 24 Oct 2019 19:48:55 +0200 Subject: Major cleanup Removed ndpi_pref_http_dont_dissect_response and ndpi_pref_dns_dont_dissect_response as the ndpi_extra_dissection_possible() call will now handle everything --- example/reader_util.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'example/reader_util.c') diff --git a/example/reader_util.c b/example/reader_util.c index 8f879b0b6..e7ec81d3c 100644 --- a/example/reader_util.c +++ b/example/reader_util.c @@ -1210,25 +1210,29 @@ static struct ndpi_proto packet_processing(struct ndpi_workflow * workflow, u_int enough_packets = (((proto == IPPROTO_UDP) && ((flow->src2dst_packets + flow->dst2src_packets) > max_num_udp_dissected_pkts)) || ((proto == IPPROTO_TCP) && ((flow->src2dst_packets + flow->dst2src_packets) > max_num_tcp_dissected_pkts))) ? 1 : 0; - + +#if 0 + printf("%s()\n", __FUNCTION__); +#endif + flow->detected_protocol = ndpi_detection_process_packet(workflow->ndpi_struct, ndpi_flow, iph ? (uint8_t *)iph : (uint8_t *)iph6, ipsize, time, src, dst); if(enough_packets || (flow->detected_protocol.app_protocol != NDPI_PROTOCOL_UNKNOWN)) { if((!enough_packets) - // TODO: remove the line below - && (flow->detected_protocol.master_protocol == NDPI_PROTOCOL_TLS) && ndpi_extra_dissection_possible(workflow->ndpi_struct, ndpi_flow)) ; /* Wait for certificate fingerprint */ else { /* New protocol detected or give up */ flow->detection_completed = 1; +#if 0 /* Check if we should keep checking extra packets */ if(ndpi_flow && ndpi_flow->check_extra_packets) flow->check_extra_packets = 1; - +#endif + if(flow->detected_protocol.app_protocol == NDPI_PROTOCOL_UNKNOWN) { u_int8_t proto_guessed; -- cgit v1.2.3