aboutsummaryrefslogtreecommitdiff
path: root/src/include/ndpi_typedefs.h
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2023-08-31 23:51:05 +0200
committerLuca Deri <deri@ntop.org>2023-08-31 23:51:50 +0200
commit133f45f3f3c9f8895d87f15b4072dd5dd5c83437 (patch)
treeec67839ed17f57888207c8580d607a91fb112aba /src/include/ndpi_typedefs.h
parent19381f330ae735d361d9e765148be5e14478256d (diff)
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)
Diffstat (limited to 'src/include/ndpi_typedefs.h')
-rw-r--r--src/include/ndpi_typedefs.h12
1 files changed, 12 insertions, 0 deletions
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__ */