From 3e5e9569ff6454e11a09d4cbb88efa778508ed05 Mon Sep 17 00:00:00 2001 From: Luca Deri Date: Wed, 20 Jan 2021 21:30:19 +0100 Subject: Added simple hash implementation to the nDPI API --- src/include/ndpi_typedefs.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/include/ndpi_typedefs.h') diff --git a/src/include/ndpi_typedefs.h b/src/include/ndpi_typedefs.h index 6f9cc9885..76f9198da 100644 --- a/src/include/ndpi_typedefs.h +++ b/src/include/ndpi_typedefs.h @@ -1559,4 +1559,21 @@ struct ndpi_bin { } u; }; +/* **************************************** */ + +struct ndpi_str_hash_info { + char *key; /* Key */ + u_int8_t key_len; + u_int8_t value; /* Value */ + struct ndpi_str_hash_info *next; +}; + +typedef struct { + u_int32_t num_buckets, max_num_entries; + struct ndpi_str_hash_info **buckets; +} ndpi_str_hash; + + +/* **************************************** */ + #endif /* __NDPI_TYPEDEFS_H__ */ -- cgit v1.2.3