From 1f55dc511f9eb4e2bc8f880f1599f01c527a6397 Mon Sep 17 00:00:00 2001 From: Luca Deri Date: Thu, 13 Jul 2023 21:54:51 +0200 Subject: Implemented Count-Min Sketch [count how many times a value has been observed] - ndpi_cm_sketch_init() - ndpi_cm_sketch_add() - ndpi_cm_sketch_count() - ndpi_cm_sketch_destroy() --- src/include/ndpi_typedefs.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/include/ndpi_typedefs.h') diff --git a/src/include/ndpi_typedefs.h b/src/include/ndpi_typedefs.h index e3a649892..373a704da 100644 --- a/src/include/ndpi_typedefs.h +++ b/src/include/ndpi_typedefs.h @@ -1897,6 +1897,12 @@ struct ndpi_hll { u_int8_t *registers; }; +struct ndpi_cm_sketch { + u_int16_t num_hashes; /* depth: Number of hash tables */ + u_int32_t num_hash_buckets; /* Number pf nuckets of each hash */ + u_int32_t *tables; +}; + /* **************************************** */ enum ndpi_bin_family { -- cgit v1.2.3