Minor improvements

This commit is contained in:
Luca Deri
2023-08-23 11:04:31 +02:00
parent 95fcd08687
commit ff4f291afe
3 changed files with 157 additions and 0 deletions
+14
View File
@@ -2009,6 +2009,20 @@ extern "C" {
/* ******************************* */
/*
Efficient (space and speed) probabilitic datastructure
for exact string searching with a false positive rate
of 5 * 10 ^ -8
*/
ndpi_string_search* ndpi_string_search_alloc();
void ndpi_string_search_free(ndpi_string_search *s);
u_int32_t ndpi_string_search_size(ndpi_string_search *s);
bool ndpi_string_search_add(ndpi_string_search *s, char *string);
bool ndpi_string_search_contains(ndpi_string_search *s, char *string);
u_int32_t ndpi_string_search_cardinality(ndpi_string_search *f);
/* ******************************* */
char* ndpi_get_flow_risk_info(struct ndpi_flow_struct *flow,
char *out, u_int out_len,
u_int8_t use_json);
+4
View File
@@ -2021,6 +2021,10 @@ typedef void ndpi_bitmap;
typedef void ndpi_bitmap_iterator;
typedef void ndpi_filter;
typedef struct {
ndpi_filter *filter[2 /* direct and reverse */];
} ndpi_string_search;
/* **************************************** */
#endif /* __NDPI_TYPEDEFS_H__ */