aboutsummaryrefslogtreecommitdiff
path: root/src/lib/ndpi_utils.c
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2021-03-03 00:41:07 +0100
committerLuca Deri <deri@ntop.org>2021-03-03 00:41:07 +0100
commit56bfb439f85b3e4054bd7c6b849a6e06e5c2ac27 (patch)
tree6c7e2066917acc1c2a313321c7c7be3043df195f /src/lib/ndpi_utils.c
parent4c00ff89dfa64f1026c2f1d267dc081a86b45243 (diff)
Improved DGA detection with trigrams. Disadvantage: slower startup time
Reworked Tor dissector embedded in TLS (fixes #1141) Removed false positive on HTTP User-Agent
Diffstat (limited to 'src/lib/ndpi_utils.c')
-rw-r--r--src/lib/ndpi_utils.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/ndpi_utils.c b/src/lib/ndpi_utils.c
index 75f7b903d..8c2af79da 100644
--- a/src/lib/ndpi_utils.c
+++ b/src/lib/ndpi_utils.c
@@ -2450,3 +2450,12 @@ int ndpi_hash_add_entry(ndpi_str_hash *h, char *key, u_int8_t key_len, u_int8_t
return(0);
}
+/* ******************************************************************** */
+
+void ndpi_set_risk(struct ndpi_flow_struct *flow, ndpi_risk_enum r) {
+ u_int32_t v = 1 << r;
+
+ // NDPI_SET_BIT(flow->risk, (u_int32_t)r);
+ flow->risk |= v;
+
+}