diff options
author | Vito Piserchia <vito.piserchia@dreamlab.net> | 2016-10-25 14:37:31 +0200 |
---|---|---|
committer | Vito Piserchia <vito.piserchia@dreamlab.net> | 2016-10-25 14:37:31 +0200 |
commit | 78ebb3445a34f3bc2aea494c9a3d5c5499f2503e (patch) | |
tree | 44b57080c27cb2e605e72984ecad63f2bcb05026 /src/include/ndpi_api.h | |
parent | 4c467d7cad5b352c692b6e73b43e6d23325b4b38 (diff) | |
parent | b8fb5fb403a48820787ea87bca63acbfd658d31c (diff) |
Merge remote-tracking branch 'upstream/dev' into dev
Diffstat (limited to 'src/include/ndpi_api.h')
-rw-r--r-- | src/include/ndpi_api.h | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/src/include/ndpi_api.h b/src/include/ndpi_api.h index 737e29cb9..b380c8b03 100644 --- a/src/include/ndpi_api.h +++ b/src/include/ndpi_api.h @@ -122,7 +122,7 @@ extern "C" { * @return the initialized detection module * */ - struct ndpi_detection_module_struct *ndpi_init_detection_module(); + struct ndpi_detection_module_struct *ndpi_init_detection_module(void); /** * Frees the memory allocated in the specified flow @@ -431,6 +431,23 @@ ndpi_protocol ndpi_l4_detection_process_packet(struct ndpi_detection_module_stru */ char* ndpi_protocol2name(struct ndpi_detection_module_struct *ndpi_mod, ndpi_protocol proto, char *buf, u_int buf_len); + /** + * Get protocol category as string + * + * @par category = the category associated to the protocol + * @return the string name of the category + * + */ + const char* ndpi_category_str(ndpi_protocol_category_t category); + + /** + * Get protocol category + * + * @par ndpi_mod = the detection module + * @par proto = the struct ndpi_protocol contain the protocols name + * @return the protocol category + */ + ndpi_protocol_category_t ndpi_get_proto_category(struct ndpi_detection_module_struct *ndpi_mod, ndpi_protocol proto); /** * Get the protocol name associated to the ID @@ -588,7 +605,7 @@ ndpi_protocol ndpi_l4_detection_process_packet(struct ndpi_detection_module_stru * @return The requested automata, or NULL if an error occurred * */ - void* ndpi_init_automa(); + void* ndpi_init_automa(void); /** @@ -634,7 +651,7 @@ ndpi_protocol ndpi_l4_detection_process_packet(struct ndpi_detection_module_stru /* Utility functions to set ndpi malloc/free/print wrappers */ void set_ndpi_malloc(void* (*__ndpi_malloc)(size_t size)); void set_ndpi_free(void (*__ndpi_free)(void *ptr)); - void set_ndpi_debug_function(ndpi_debug_function_ptr ndpi_debug_printf); + void set_ndpi_debug_function(struct ndpi_detection_module_struct *ndpi_str, ndpi_debug_function_ptr ndpi_debug_printf); #ifdef __cplusplus } |