Added NDPI_PERIODIC_FLOW flow risk to be used by apps based on nDPI
This commit is contained in:
@@ -120,8 +120,9 @@ typedef enum {
|
||||
NDPI_UNIDIRECTIONAL_TRAFFIC, /* NOTE: as nDPI can detect a protocol with one packet, make sure
|
||||
your app will clear this risk if future packets (not sent to nDPI)
|
||||
are received in the opposite direction */
|
||||
|
||||
NDPI_HTTP_OBSOLETE_SERVER,
|
||||
NDPI_PERIODIC_FLOW, /* Set in case a flow repeats at a specific pace [used by apps on top of nDPI] */
|
||||
|
||||
/* Leave this as last member */
|
||||
NDPI_MAX_RISK /* must be <= 63 due to (**) */
|
||||
} ndpi_risk_enum;
|
||||
|
||||
@@ -166,6 +166,7 @@ static ndpi_risk_info ndpi_known_risks[] = {
|
||||
{ NDPI_ANONYMOUS_SUBSCRIBER, NDPI_RISK_MEDIUM, CLIENT_FAIR_RISK_PERCENTAGE, NDPI_CLIENT_ACCOUNTABLE },
|
||||
{ NDPI_UNIDIRECTIONAL_TRAFFIC, NDPI_RISK_LOW, CLIENT_FAIR_RISK_PERCENTAGE, NDPI_CLIENT_ACCOUNTABLE },
|
||||
{ NDPI_HTTP_OBSOLETE_SERVER, NDPI_RISK_MEDIUM, CLIENT_LOW_RISK_PERCENTAGE, NDPI_SERVER_ACCOUNTABLE },
|
||||
{ NDPI_PERIODIC_FLOW, NDPI_RISK_LOW, CLIENT_LOW_RISK_PERCENTAGE, NDPI_CLIENT_ACCOUNTABLE },
|
||||
|
||||
/* Leave this as last member */
|
||||
{ NDPI_MAX_RISK, NDPI_RISK_LOW, CLIENT_FAIR_RISK_PERCENTAGE, NDPI_NO_ACCOUNTABILITY }
|
||||
|
||||
@@ -2044,6 +2044,10 @@ const char* ndpi_risk2str(ndpi_risk_enum risk) {
|
||||
return("HTTP Obsolete Server");
|
||||
break;
|
||||
|
||||
case NDPI_PERIODIC_FLOW:
|
||||
return("Periodic Flow");
|
||||
break;
|
||||
|
||||
default:
|
||||
ndpi_snprintf(buf, sizeof(buf), "%d", (int)risk);
|
||||
return(buf);
|
||||
|
||||
Reference in New Issue
Block a user