From b5f3facf7cab475ba805d0170760db52e025e13b Mon Sep 17 00:00:00 2001 From: Luca Deri Date: Fri, 26 Jun 2020 23:39:48 +0200 Subject: Added notes whenever a new flow risk is added --- src/include/ndpi_typedefs.h | 5 +++-- src/lib/ndpi_utils.c | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/include/ndpi_typedefs.h b/src/include/ndpi_typedefs.h index f81d80073..99b91d4be 100644 --- a/src/include/ndpi_typedefs.h +++ b/src/include/ndpi_typedefs.h @@ -52,8 +52,9 @@ typedef enum { /* NOTE - When the typedef below is modified don't forget - to update ndpi_risk2str (in ndpi_utils.c) + When the typedef below is modified don't forget to update + - ndpi_risk2str (in ndpi_utils.c) + - https://github.com/ntop/ntopng/blob/dev/scripts/lua/modules/flow_risk_utils.lua */ typedef enum { NDPI_NO_RISK = 0, diff --git a/src/lib/ndpi_utils.c b/src/lib/ndpi_utils.c index 0eb399783..708ac38a0 100644 --- a/src/lib/ndpi_utils.c +++ b/src/lib/ndpi_utils.c @@ -1503,6 +1503,7 @@ const char* ndpi_risk2str(ndpi_risk_enum risk) { case NDPI_MALFORMED_PACKET: return("Malformed packet"); + default: snprintf(buf, sizeof(buf), "%d", (int)risk); return(buf); -- cgit v1.2.3