From 460ff3c7aba42d0e7b99a227e0cb846af296e4e0 Mon Sep 17 00:00:00 2001 From: Luca Deri Date: Mon, 31 Aug 2020 08:47:16 +0200 Subject: Added (optional) notifier for LRU add --- src/include/ndpi_typedefs.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/include') diff --git a/src/include/ndpi_typedefs.h b/src/include/ndpi_typedefs.h index ab6f56d31..31a718bde 100644 --- a/src/include/ndpi_typedefs.h +++ b/src/include/ndpi_typedefs.h @@ -1017,6 +1017,11 @@ struct pcre_struct { }; #endif +typedef enum { + ndpi_stun_cache, + ndpi_hangout_cache +} ndpi_lru_cache_type; + struct ndpi_detection_module_struct { NDPI_PROTOCOL_BITMASK detection_bitmask; NDPI_PROTOCOL_BITMASK generic_http_packet_bitmask; @@ -1128,9 +1133,10 @@ struct ndpi_detection_module_struct { ndpi_proto_defaults_t proto_defaults[NDPI_MAX_SUPPORTED_PROTOCOLS+NDPI_MAX_NUM_CUSTOM_PROTOCOLS]; - u_int8_t direction_detect_disable:1, /* disable internal detection of packet direction */ - _pad:7; + u_int8_t direction_detect_disable:1, /* disable internal detection of packet direction */ _pad:7; + void (*ndpi_notify_lru_add_handler_ptr)(ndpi_lru_cache_type cache_type, u_int32_t proto, u_int32_t app_proto); + #ifdef CUSTOM_NDPI_PROTOCOLS #include "../../../nDPI-custom/custom_ndpi_typedefs.h" #endif @@ -1547,5 +1553,4 @@ struct ndpi_bin { } u; }; - #endif /* __NDPI_TYPEDEFS_H__ */ -- cgit v1.2.3