diff options
author | Luca <deri@ntop.org> | 2019-11-07 19:28:16 +0000 |
---|---|---|
committer | Luca <deri@ntop.org> | 2019-11-07 19:28:16 +0000 |
commit | 0558d641f2230795ef856e5e1e5c77050becb932 (patch) | |
tree | 83be952091b9c14d73177ce43c7ee9fdd2bc8e27 /src/lib/third_party/include | |
parent | ac46a4dd58357b62d9b93253e47ade111efae649 (diff) |
Added ndpi_finalize_initalization() initialization function
Diffstat (limited to 'src/lib/third_party/include')
-rw-r--r-- | src/lib/third_party/include/ahocorasick.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/lib/third_party/include/ahocorasick.h b/src/lib/third_party/include/ahocorasick.h index 74812bef1..943be88eb 100644 --- a/src/lib/third_party/include/ahocorasick.h +++ b/src/lib/third_party/include/ahocorasick.h @@ -44,6 +44,12 @@ typedef struct * add pattern to automata anymore. */ unsigned short automata_open; + /* Statistic Variables */ + unsigned long total_patterns; /* Total patterns in the automata */ + +} AC_AUTOMATA_t; + +typedef struct { /* It is possible to feed a large input to the automata chunk by chunk to * be searched using ac_automata_search(). in fact by default automata * thinks that all chunks are related unless you do ac_automata_reset(). @@ -51,18 +57,13 @@ typedef struct AC_NODE_t * current_node; /* Pointer to current node while searching */ unsigned long base_position; /* Represents the position of current chunk related to whole input text */ - - /* Statistic Variables */ - unsigned long total_patterns; /* Total patterns in the automata */ - -} AC_AUTOMATA_t; +} AC_SEARCH_t; AC_AUTOMATA_t * ac_automata_init (MATCH_CALLBACK_f mc); AC_ERROR_t ac_automata_add (AC_AUTOMATA_t * thiz, AC_PATTERN_t * str); void ac_automata_finalize (AC_AUTOMATA_t * thiz); int ac_automata_search (AC_AUTOMATA_t * thiz, AC_TEXT_t * str, AC_REP_t * param); -void ac_automata_reset (AC_AUTOMATA_t * thiz); void ac_automata_release (AC_AUTOMATA_t * thiz, u_int8_t free_pattern); void ac_automata_display (AC_AUTOMATA_t * thiz, char repcast); |