Added ndpi_finalize_initalization() initialization function

This commit is contained in:
Luca
2019-11-07 19:28:16 +00:00
parent ac46a4dd58
commit 0558d641f2
6 changed files with 171 additions and 147 deletions
+11
View File
@@ -138,12 +138,23 @@ extern "C" {
/**
* Returns a new initialized detection module
* Note that before you can use it you can still load
* hosts and do other things. As soon as you are ready to use
* it do not forget to call first ndpi_finalize_initalization()
*
* @return the initialized detection module
*
*/
struct ndpi_detection_module_struct *ndpi_init_detection_module(void);
/**
* Completes the initialization (2nd step)
*
* @return the initialized detection module
*
*/
void ndpi_finalize_initalization(struct ndpi_detection_module_struct *ndpi_str);
/**
* Frees the memory allocated in the specified flow
*
+2 -1
View File
@@ -1057,7 +1057,8 @@ struct ndpi_detection_module_struct {
content_automa, /* Used for HTTP subprotocol_detection */
subprotocol_automa, /* Used for HTTP subprotocol_detection */
bigrams_automa, impossible_bigrams_automa; /* TOR */
/* IMPORTANT: please update ndpi_finalize_initalization() whenever you add a new automa */
struct {
#ifdef HAVE_HYPERSCAN
struct hs *hostnames;