aboutsummaryrefslogtreecommitdiff
path: root/example/ndpiReader.c
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2016-03-04 19:15:13 +0100
committerLuca Deri <deri@ntop.org>2016-03-04 19:15:13 +0100
commit462368f959daf9ffc72fc0fd91ef62a03487354c (patch)
tree7e3b8fee378d6e80b7b5eec44f1a5fb978e27b83 /example/ndpiReader.c
parent73833e0ef040b461948d3132575ac678f3409f33 (diff)
Added new ndpi_detection_giveup() API call to call before giving up for a given flow
Code cleanup
Diffstat (limited to 'example/ndpiReader.c')
1 files changed, 3 insertions, 0 deletions
diff --git a/example/ndpiReader.c b/example/ndpiReader.c
index 76c0c30bf..037b194d2 100644
--- a/example/ndpiReader.c
+++ b/example/ndpiReader.c
@@ -653,6 +653,9 @@ static void node_proto_guess_walker(const void *node, ndpi_VISIT which, int dept
u_int16_t thread_id = *((u_int16_t *) user_data);
if((which == ndpi_preorder) || (which == ndpi_leaf)) { /* Avoid walking the same node multiple times */
+ if((!flow->detection_completed) && flow->ndpi_flow)
+ flow->detected_protocol = ndpi_detection_giveup(ndpi_thread_info[0].ndpi_struct, flow->ndpi_flow);
+
if(enable_protocol_guess) {
if(flow->detected_protocol.protocol == NDPI_PROTOCOL_UNKNOWN) {
node_guess_undetected_protocol(thread_id, flow);