Removed this party LRU and replaced with home grown

This commit is contained in:
Luca Deri
2019-01-17 00:40:28 +01:00
parent c856e0a563
commit efef99cbad
10 changed files with 79 additions and 377 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
library_includedir=$(includedir)/libndpi-@VERSION@/libndpi
plibrary_includedir=$(includedir)/libndpi-@VERSION@/libndpi
library_include_HEADERS = ndpi_api.h \
ndpi_define.h \
+6
View File
@@ -756,6 +756,12 @@ extern "C" {
u_int ndpi_get_ndpi_num_custom_protocols(struct ndpi_detection_module_struct *ndpi_mod);
u_int ndpi_get_ndpi_detection_module_size();
void ndpi_set_log_level(struct ndpi_detection_module_struct *ndpi_mod, u_int l);
/* LRU cache */
struct ndpi_lru_cache* ndpi_lru_cache_init(u_int32_t num_entries);
void ndpi_lru_free_cache(struct ndpi_lru_cache *c);
u_int8_t ndpi_lru_find_cache(struct ndpi_lru_cache *c, u_int32_t key, u_int8_t clean_key_when_found);
void ndpi_lru_add_to_cache(struct ndpi_lru_cache *c, u_int32_t key);
/**
* Add a string to match to an automata
+5 -1
View File
@@ -367,6 +367,10 @@ typedef enum {
HTTP_METHOD_CONNECT
} ndpi_http_method;
struct ndpi_lru_cache {
u_int32_t num_entries, *entries;
};
struct ndpi_id_struct {
/**
detected_protocol_bitmask:
@@ -997,7 +1001,7 @@ struct ndpi_detection_module_struct {
int bt_ann_len;
/* NDPI_PROTOCOL_OOKLA */
void *ookla_cache;
struct ndpi_lru_cache *ookla_cache;
/* NDPI_PROTOCOL_TINC */
struct cache *tinc_cache;