diff options
author | Luca Deri <deri@ntop.org> | 2021-07-24 17:50:32 +0200 |
---|---|---|
committer | Luca Deri <deri@ntop.org> | 2021-07-24 17:50:32 +0200 |
commit | 51e48884429015b94d58d9e3240c0fb3ceb465f2 (patch) | |
tree | 10ed46614347ef18f38569e1f3ff90ed6ac05608 /src/include | |
parent | 526568fcd519ccef3216b563f79e77c7326e11b9 (diff) |
Implemented ALPN automa for checking uncommon ALPNs
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/ndpi_main.h | 5 | ||||
-rw-r--r-- | src/include/ndpi_typedefs.h | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/include/ndpi_main.h b/src/include/ndpi_main.h index 3369e979a..0cd41d2b8 100644 --- a/src/include/ndpi_main.h +++ b/src/include/ndpi_main.h @@ -131,7 +131,7 @@ extern "C" { extern u_int8_t ndpi_is_proto(ndpi_protocol proto, u_int16_t p); extern u_int16_t ndpi_get_lower_proto(ndpi_protocol p); - + #ifdef NDPI_ENABLE_DEBUG_MESSAGES void ndpi_debug_get_last_log_function_line(struct ndpi_detection_module_struct *ndpi_struct, const char **file, const char **func, u_int32_t * line); @@ -155,6 +155,9 @@ extern "C" { struct ndpi_flow_struct *flow, ndpi_risk_enum r); int ndpi_is_printable_string(char const * const str, size_t len); float ndpi_calculate_entropy(u_int8_t const * const buf, size_t len); + void load_common_alpns(struct ndpi_detection_module_struct *ndpi_str); + u_int8_t is_a_common_alpn(struct ndpi_detection_module_struct *ndpi_str, + const char *alpn_to_check, u_int alpn_to_check_len); #ifdef __cplusplus } #endif diff --git a/src/include/ndpi_typedefs.h b/src/include/ndpi_typedefs.h index 486af76ed..68745a69a 100644 --- a/src/include/ndpi_typedefs.h +++ b/src/include/ndpi_typedefs.h @@ -1161,7 +1161,7 @@ struct ndpi_detection_module_struct { subprotocol_automa, /* Used for HTTP subprotocol_detection */ risky_domain_automa, tls_cert_subject_automa, malicious_ja3_automa, malicious_sha1_automa, - host_risk_mask_automa; + host_risk_mask_automa, common_alpns_automa; /* IMPORTANT: please update ndpi_finalize_initialization() whenever you add a new automa */ void *ip_risk_mask_ptree; |