aboutsummaryrefslogtreecommitdiff
path: root/example/reader_util.c
diff options
context:
space:
mode:
authorToni Uhlig <matzeton@googlemail.com>2023-12-03 09:03:56 +0100
committerToni Uhlig <matzeton@googlemail.com>2023-12-14 00:19:35 +0100
commit709e460c896861f413baa5189d46b15ba06c2673 (patch)
tree71ef4908d4778ba2f22bf83bd3f1506698779e71 /example/reader_util.c
parentef62391dba4814ab840539406f276685ba8535f1 (diff)
Add realtime protocol output to `ndpiReader`.add/output-realtime-protocols
* support for using a new flow callback invoked before the flow memory is free'd * minor fixes * Win32 gmtime fix Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'example/reader_util.c')
-rw-r--r--example/reader_util.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/example/reader_util.c b/example/reader_util.c
index 64b00b18f..480c3f180 100644
--- a/example/reader_util.c
+++ b/example/reader_util.c
@@ -1423,6 +1423,9 @@ void process_ndpi_collected_info(struct ndpi_workflow * workflow, struct ndpi_fl
flow->flow_payload = flow->ndpi_flow->flow_payload, flow->flow_payload_len = flow->ndpi_flow->flow_payload_len;
flow->ndpi_flow->flow_payload = NULL; /* We'll free the memory */
+ if(workflow->flow_callback != NULL)
+ workflow->flow_callback(workflow, flow, workflow->flow_callback_userdata);
+
ndpi_free_flow_info_half(flow);
}
}