aboutsummaryrefslogtreecommitdiff
path: root/example/reader_util.c
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2022-06-20 00:22:13 +0200
committerLuca Deri <deri@ntop.org>2022-06-20 00:22:13 +0200
commitab09b8ce2e72c562ad1bfc2ec2cecca9c23fb2a8 (patch)
treefbfcf3755716752eb84ae35a4d14e0ac1c0df6e0 /example/reader_util.c
parentc287eb835b537ce64d9293a52ca13e670b6d3b0d (diff)
Added unidirectional traffic flow risk
Diffstat (limited to 'example/reader_util.c')
-rw-r--r--example/reader_util.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/example/reader_util.c b/example/reader_util.c
index c50c3281f..c0bfcc459 100644
--- a/example/reader_util.c
+++ b/example/reader_util.c
@@ -1434,6 +1434,7 @@ static struct ndpi_proto packet_processing(struct ndpi_workflow * workflow,
}
ndpi_data_add_value(flow->pktlen_s_to_c, rawsize);
flow->dst2src_packets++, flow->dst2src_bytes += rawsize, flow->dst2src_goodput_bytes += payload_len;
+ flow->risk &= ~(1UL << NDPI_UNIDIRECTIONAL_TRAFFIC); /* Clear bit */
memcpy(&flow->dst2src_last_pkt_time, &when, sizeof(when));
#ifdef DIRECTION_BINS
@@ -1579,7 +1580,7 @@ static struct ndpi_proto packet_processing(struct ndpi_workflow * workflow,
}
}
}
-
+
#if 0
if(flow->risk != 0) {
FILE *r = fopen("/tmp/e", "a");