From e8d501158e07af7dbe67cc795d64532031a4f1d4 Mon Sep 17 00:00:00 2001 From: Ravi Kerur Date: Sat, 21 Sep 2019 10:38:04 -0700 Subject: Restore protocol extraction to original method. Add microseconds to time series if milliseconds returns 0. Signed-off-by: Ravi Kerur --- example/reader_util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'example') diff --git a/example/reader_util.c b/example/reader_util.c index 0b4e6c2c8..a5c99a88b 100644 --- a/example/reader_util.c +++ b/example/reader_util.c @@ -664,13 +664,13 @@ static struct ndpi_flow_info *get_ndpi_flow_info(struct ndpi_workflow * workflow l4_offset = iph->ihl * 4; l3 = (const u_int8_t*)iph; - *proto = iph->protocol; } else { l4_offset = sizeof(struct ndpi_ipv6hdr); l3 = (const u_int8_t*)iph6; - *proto = iph6->ip6_hdr.ip6_un1_nxt; } + *proto = iph->protocol; + if(l4_packet_len < 64) workflow->stats.packet_len[0]++; else if(l4_packet_len >= 64 && l4_packet_len < 128) -- cgit v1.2.3