diff options
Diffstat (limited to 'example/reader_util.c')
-rw-r--r-- | example/reader_util.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/example/reader_util.c b/example/reader_util.c index 72e1843ae..cc74778e3 100644 --- a/example/reader_util.c +++ b/example/reader_util.c @@ -1440,7 +1440,8 @@ static struct ndpi_proto packet_processing(struct ndpi_workflow * workflow, const struct pcap_pkthdr *header, const u_char *packet, pkt_timeval when, - ndpi_risk *flow_risk) { + ndpi_risk *flow_risk, + struct ndpi_flow_info **flow_ext) { struct ndpi_flow_info *flow = NULL; struct ndpi_flow_struct *ndpi_flow = NULL; u_int8_t proto; @@ -1702,6 +1703,7 @@ static struct ndpi_proto packet_processing(struct ndpi_workflow * workflow, #endif *flow_risk = flow->risk; + *flow_ext = flow; return(flow->detected_protocol); } @@ -1851,7 +1853,8 @@ static uint32_t ndpi_is_valid_gre_tunnel(const struct pcap_pkthdr *header, struct ndpi_proto ndpi_workflow_process_packet(struct ndpi_workflow * workflow, const struct pcap_pkthdr *header, const u_char *packet, - ndpi_risk *flow_risk) { + ndpi_risk *flow_risk, + struct ndpi_flow_info **flow) { /* * Declare pointers to packet headers */ @@ -1900,6 +1903,7 @@ struct ndpi_proto ndpi_workflow_process_packet(struct ndpi_workflow * workflow, u_int8_t vlan_packet = 0; *flow_risk = 0 /* NDPI_NO_RISK */; + *flow = NULL; /* Increment raw packet counter */ workflow->stats.raw_packet_count++; @@ -2376,7 +2380,7 @@ struct ndpi_proto ndpi_workflow_process_packet(struct ndpi_workflow * workflow, return(packet_processing(workflow, time_ms, vlan_id, tunnel_type, iph, iph6, header->caplen - ip_offset, header->caplen, header, packet, header->ts, - flow_risk)); + flow_risk, flow)); } /* *********************************************** */ |