aboutsummaryrefslogtreecommitdiff
path: root/src/include/ndpi_api.h.in
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/ndpi_api.h.in')
-rw-r--r--src/include/ndpi_api.h.in14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/include/ndpi_api.h.in b/src/include/ndpi_api.h.in
index e9bfab257..81f929840 100644
--- a/src/include/ndpi_api.h.in
+++ b/src/include/ndpi_api.h.in
@@ -818,12 +818,13 @@ extern "C" {
u_int32_t daddr,
ndpi_protocol *ret);
int ndpi_match_custom_category(struct ndpi_detection_module_struct *ndpi_struct,
- char *name, u_int name_len, u_int32_t *id);
+ char *name, u_int name_len, ndpi_protocol_category_t *id);
void ndpi_fill_protocol_category(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow,
ndpi_protocol *ret);
int ndpi_get_custom_category_match(struct ndpi_detection_module_struct *ndpi_struct,
- char *name_or_ip, u_int name_len, u_int32_t *id);
+ char *name_or_ip, u_int name_len,
+ ndpi_protocol_category_t *id);
int ndpi_set_detection_preferences(struct ndpi_detection_module_struct *ndpi_mod,
ndpi_detection_preference pref,
int value);
@@ -846,16 +847,19 @@ extern "C" {
void ndpi_lru_add_to_cache(struct ndpi_lru_cache *c, u_int32_t key, u_int16_t value);
/**
- * Add a string to match to an automata
+ * Find a protocol id associated with a string automata
*
* @par The automata initialized with ndpi_init_automa();
* @par The (sub)string to search
* @par The (sub)string length
- * @par The id associated with the matched string or 0 id not found.
+ * @par The protocol id associated with the matched string or 0 id not found.
* @return 0 in case of match, or -1 if no match, or -2 if an error occurred.
*
*/
- int ndpi_match_string_id(void *_automa, char *string_to_match, u_int match_len, u_int32_t *id);
+ int ndpi_match_string_protocol_id(void *_automa, char *string_to_match, u_int match_len,
+ u_int16_t *protocol_id,
+ ndpi_protocol_category_t *category,
+ ndpi_protocol_breed_t *breed);
/* Utility functions to set ndpi malloc/free/print wrappers */
void set_ndpi_malloc(void* (*__ndpi_malloc)(size_t size));