Added new risks (future use)

-  NDPI_RISKY_ASN
-  NDPI_RISKY_DOMAIN
-  NDPI_RISKY_COUNTRY
This commit is contained in:
Luca Deri
2021-02-16 18:23:19 +01:00
parent 177f1785da
commit 4609e2084b
2 changed files with 12 additions and 0 deletions
+3
View File
@@ -85,6 +85,9 @@ typedef enum {
NDPI_DNS_SUSPICIOUS_TRAFFIC,
NDPI_TLS_MISSING_SNI,
NDPI_HTTP_SUSPICIOUS_CONTENT,
NDPI_RISKY_ASN,
NDPI_RISKY_DOMAIN,
NDPI_RISKY_COUNTRY,
/* Leave this as last member */
NDPI_MAX_RISK /* must be <= 31 due to (**) */
+9
View File
@@ -1753,6 +1753,15 @@ const char* ndpi_risk2str(ndpi_risk_enum risk) {
case NDPI_HTTP_SUSPICIOUS_CONTENT:
return("HTTP suspicious content");
case NDPI_RISKY_ASN:
return("Risky ASN");
case NDPI_RISKY_DOMAIN:
return("Risky domain name");
case NDPI_RISKY_COUNTRY:
return("Risky country name");
default:
snprintf(buf, sizeof(buf), "%d", (int)risk);
return(buf);