aboutsummaryrefslogtreecommitdiff
path: root/example/reader_util.c
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2019-10-24 19:48:55 +0200
committerLuca Deri <deri@ntop.org>2019-10-24 19:48:55 +0200
commit0974075fa0411d4a652baa96f5a1f801e999a075 (patch)
tree83a62cdd42b4192d34fb0b476864ab326f4fed82 /example/reader_util.c
parent0ffe5cf1ff7ab2ec90b5674936aa0f2555e3d414 (diff)
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
Diffstat (limited to 'example/reader_util.c')
-rw-r--r--example/reader_util.c12
1 files changed, 8 insertions, 4 deletions
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;