From f2a5bbef173ee7f5447871f26024b9639735c096 Mon Sep 17 00:00:00 2001 From: Luca Deri Date: Sun, 29 Sep 2019 21:46:41 +0200 Subject: Reworked categories handling Removed GenericProtocol and replaced with categories Removed ndpi_pref_enable_category_substring_match option: substring matching is now default --- src/include/ndpi_api.h | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) (limited to 'src/include/ndpi_api.h') diff --git a/src/include/ndpi_api.h b/src/include/ndpi_api.h index 34b1fed67..194afa7d6 100644 --- a/src/include/ndpi_api.h +++ b/src/include/ndpi_api.h @@ -383,13 +383,12 @@ extern "C" { * @return the ID of the matched subprotocol * */ - int ndpi_match_host_subprotocol(struct ndpi_detection_module_struct *ndpi_struct, - struct ndpi_flow_struct *flow, - char *string_to_match, - u_int string_to_match_len, - ndpi_protocol_match_result *ret_match, - u_int16_t master_protocol_id); - + u_int16_t ndpi_match_host_subprotocol(struct ndpi_detection_module_struct *ndpi_struct, + struct ndpi_flow_struct *flow, + char *string_to_match, + u_int string_to_match_len, + ndpi_protocol_match_result *ret_match, + u_int16_t master_protocol_id); /** * Check if the string content passed match with a protocol @@ -403,12 +402,12 @@ extern "C" { * @return the ID of the matched subprotocol * */ - int ndpi_match_content_subprotocol(struct ndpi_detection_module_struct *ndpi_struct, - struct ndpi_flow_struct *flow, - char *string_to_match, - u_int string_to_match_len, - ndpi_protocol_match_result *ret_match, - u_int16_t master_protocol_id); + u_int16_t ndpi_match_content_subprotocol(struct ndpi_detection_module_struct *ndpi_struct, + struct ndpi_flow_struct *flow, + char *string_to_match, + u_int string_to_match_len, + ndpi_protocol_match_result *ret_match, + u_int16_t master_protocol_id); /** * Exclude protocol from search * @@ -755,7 +754,7 @@ extern "C" { u_int32_t daddr, ndpi_protocol *ret); int ndpi_match_custom_category(struct ndpi_detection_module_struct *ndpi_struct, - char *name, unsigned long *id); + char *name, unsigned long *id); void ndpi_fill_protocol_category(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow, ndpi_protocol *ret); -- cgit v1.2.3