diff options
author | Ravi Kerur <ravi.kerur@viasat.com> | 2019-09-21 10:38:04 -0700 |
---|---|---|
committer | Ravi Kerur <ravi.kerur@viasat.com> | 2019-09-21 10:38:04 -0700 |
commit | e8d501158e07af7dbe67cc795d64532031a4f1d4 (patch) | |
tree | 52a31be1b88e41ec911f07c2dd3755109ea61929 /example/reader_util.c | |
parent | d92015a0921c6cefd29c3ea7aa29e6994659f951 (diff) |
Restore protocol extraction to original method.
Add microseconds to time series if milliseconds returns 0.
Signed-off-by: Ravi Kerur <ravi.kerur@viasat.com>
Diffstat (limited to 'example/reader_util.c')
-rw-r--r-- | example/reader_util.c | 4 |
1 files changed, 2 insertions, 2 deletions
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) |