From 133f45f3f3c9f8895d87f15b4072dd5dd5c83437 Mon Sep 17 00:00:00 2001 From: Luca Deri Date: Thu, 31 Aug 2023 23:51:05 +0200 Subject: Added ndpi_binary_bitmap datastruture It is similar to ndpi_filter but based on binary search and with the ability to store a category per value (as ndpi_domain_classify) --- src/include/ndpi_typedefs.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/include/ndpi_typedefs.h') diff --git a/src/include/ndpi_typedefs.h b/src/include/ndpi_typedefs.h index bece570cc..1106f7768 100644 --- a/src/include/ndpi_typedefs.h +++ b/src/include/ndpi_typedefs.h @@ -2033,6 +2033,18 @@ typedef void ndpi_filter; #define MAX_NUM_NDPI_DOMAIN_CLASSIFICATIONS 16 +PACK_ON +struct ndpi_binary_bitmap_entry { + u_int32_t value; + u_int8_t category; +} PACK_OFF; + +typedef struct { + u_int32_t num_allocated_entries, num_used_entries; + struct ndpi_binary_bitmap_entry *entries; + bool is_compressed; +} ndpi_binary_bitmap; + /* **************************************** */ #endif /* __NDPI_TYPEDEFS_H__ */ -- cgit v1.2.3