aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/include/ndpi_typedefs.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/include/ndpi_typedefs.h b/src/include/ndpi_typedefs.h
index dc5e49655..9f58075d8 100644
--- a/src/include/ndpi_typedefs.h
+++ b/src/include/ndpi_typedefs.h
@@ -67,6 +67,15 @@ typedef enum {
- https://github.com/ntop/ntopng/blob/dev/scripts/lua/modules/flow_risk_utils.lua
- ndpi_risk_enum (in python/ndpi.py)
- ndpi_known_risks (ndpi_main.c)
+
+ To make sure the risk is also seen by ntopng:
+ 1. Add a new flow alert key to the enum FlowAlertTypeEnum in include/ntop_typedefs.h
+ 2. Add the very same flow alert key to the table flow_alert_keys in scripts/lua/modules/alert_keys/flow_alert_keys.lua
+ 3. Add the risk to the array risk_enum_to_alert_type in src/FlowRiskAlerts.cpp
+ - To initialize .alert_type use the flow alert key added in 1. and an AlertCategory
+ - To initialize .alert_lua_name use a unique string
+
+ Example: https://github.com/ntop/ntopng/commit/aecc1e3e6505a0522439dbb2b295a3703d3d0f9a
*/
typedef enum {
NDPI_NO_RISK = 0,