diff options
author | Luca Deri <deri@ntop.org> | 2021-05-17 22:39:07 +0200 |
---|---|---|
committer | Luca Deri <deri@ntop.org> | 2021-05-17 22:39:07 +0200 |
commit | 0b3d627185db10c690026a32828d76d4db52eeef (patch) | |
tree | 597fcd021981bd794c6a1481e62e590da9dd7a5e /src/include | |
parent | 43a8576efbf1de97fd5e5c266f55a2b8b684ee25 (diff) |
Updated API for ndpi_risk2score()
Added ndpi_get_upper_proto() API call
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/ndpi_api.h.in | 5 | ||||
-rw-r--r-- | src/include/ndpi_typedefs.h | 16 |
2 files changed, 12 insertions, 9 deletions
diff --git a/src/include/ndpi_api.h.in b/src/include/ndpi_api.h.in index 2e484b53c..ecf696f7f 100644 --- a/src/include/ndpi_api.h.in +++ b/src/include/ndpi_api.h.in @@ -895,6 +895,9 @@ extern "C" { ndpi_l4_proto_info ndpi_get_l4_proto_info(struct ndpi_detection_module_struct *ndpi_struct, u_int16_t ndpi_proto_id); const char* ndpi_get_l4_proto_name(ndpi_l4_proto_info proto); + u_int16_t ndpi_get_lower_proto(ndpi_protocol proto); + u_int16_t ndpi_get_upper_proto(ndpi_protocol proto); + ndpi_proto_defaults_t* ndpi_get_proto_defaults(struct ndpi_detection_module_struct *ndpi_mod); u_int ndpi_get_ndpi_num_supported_protocols(struct ndpi_detection_module_struct *ndpi_mod); u_int ndpi_get_ndpi_num_custom_protocols(struct ndpi_detection_module_struct *ndpi_mod); @@ -1510,7 +1513,7 @@ extern "C" { const char* ndpi_risk2str(ndpi_risk_enum risk); ndpi_risk_severity ndpi_risk2severity(ndpi_risk_enum risk); - u_int16_t ndpi_risk2score(ndpi_risk_enum risk); + u_int16_t ndpi_risk2score(ndpi_risk risk); /* ******************************* */ diff --git a/src/include/ndpi_typedefs.h b/src/include/ndpi_typedefs.h index fe846baf1..ab8066aad 100644 --- a/src/include/ndpi_typedefs.h +++ b/src/include/ndpi_typedefs.h @@ -922,14 +922,14 @@ typedef struct { } ndpi_port_range; typedef enum { - NDPI_PROTOCOL_SAFE = 0, /* Surely doesn't provide risks for the network. (e.g., a news site) */ - NDPI_PROTOCOL_ACCEPTABLE, /* Probably doesn't provide risks, but could be malicious (e.g., Dropbox) */ - NDPI_PROTOCOL_FUN, /* Pure fun protocol, which may be prohibited by the user policy (e.g., Netflix) */ - NDPI_PROTOCOL_UNSAFE, /* Probably provides risks, but could be a normal traffic. Unencrypted protocols with clear pass should be here (e.g., telnet) */ - NDPI_PROTOCOL_POTENTIALLY_DANGEROUS, /* Possibly dangerous (ex. Tor). */ - NDPI_PROTOCOL_DANGEROUS, /* Surely is dangerous (ex. smbv1). Be prepared to troubles */ - NDPI_PROTOCOL_TRACKER_ADS, /* Trackers, Advertisements... */ - NDPI_PROTOCOL_UNRATED /* No idea, not implemented or impossible to classify */ + NDPI_PROTOCOL_SAFE = 0, /* Surely doesn't provide risks for the network. (e.g., a news site) */ + NDPI_PROTOCOL_ACCEPTABLE, /* Probably doesn't provide risks, but could be malicious (e.g., Dropbox) */ + NDPI_PROTOCOL_FUN, /* Pure fun protocol, which may be prohibited by the user policy (e.g., Netflix) */ + NDPI_PROTOCOL_UNSAFE, /* Probably provides risks, but could be a normal traffic. Unencrypted protocols with clear pass should be here (e.g., telnet) */ + NDPI_PROTOCOL_POTENTIALLY_DANGEROUS, /* Possibly dangerous (ex. Tor). */ + NDPI_PROTOCOL_DANGEROUS, /* Surely is dangerous (ex. smbv1). Be prepared to troubles */ + NDPI_PROTOCOL_TRACKER_ADS, /* Trackers, Advertisements... */ + NDPI_PROTOCOL_UNRATED /* No idea, not implemented or impossible to classify */ } ndpi_protocol_breed_t; #define NUM_BREEDS (NDPI_PROTOCOL_UNRATED+1) |