Added API for handling compressed bitmaps
ndpi_bitmap* ndpi_bitmap_alloc(); void ndpi_bitmap_free(ndpi_bitmap* b); u_int64_t ndpi_bitmap_cardinality(ndpi_bitmap* b); void ndpi_bitmap_set(ndpi_bitmap* b, u_int32_t value); void ndpi_bitmap_unset(ndpi_bitmap* b, u_int32_t value); bool ndpi_bitmap_isset(ndpi_bitmap* b, u_int32_t value); void ndpi_bitmap_clear(ndpi_bitmap* b); size_t ndpi_bitmap_serialize(ndpi_bitmap* b, char **buf); ndpi_bitmap* ndpi_bitmap_deserialize(char *buf); based on https://github.com/RoaringBitmap/CRoaring
This commit is contained in:
@@ -1610,6 +1610,18 @@ extern "C" {
|
||||
char* ndpi_get_flow_name(struct ndpi_flow_struct *flow);
|
||||
|
||||
/* ******************************* */
|
||||
|
||||
ndpi_bitmap* ndpi_bitmap_alloc();
|
||||
void ndpi_bitmap_free(ndpi_bitmap* b);
|
||||
u_int64_t ndpi_bitmap_cardinality(ndpi_bitmap* b);
|
||||
void ndpi_bitmap_set(ndpi_bitmap* b, u_int32_t value);
|
||||
void ndpi_bitmap_unset(ndpi_bitmap* b, u_int32_t value);
|
||||
bool ndpi_bitmap_isset(ndpi_bitmap* b, u_int32_t value);
|
||||
void ndpi_bitmap_clear(ndpi_bitmap* b);
|
||||
size_t ndpi_bitmap_serialize(ndpi_bitmap* b, char **buf);
|
||||
ndpi_bitmap* ndpi_bitmap_deserialize(char *buf);
|
||||
|
||||
/* ******************************* */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -1704,4 +1704,8 @@ typedef int (*ndpi_custom_dga_predict_fctn)(const char* domain, int domain_lengt
|
||||
|
||||
/* **************************************** */
|
||||
|
||||
typedef void ndpi_bitmap;
|
||||
|
||||
/* **************************************** */
|
||||
|
||||
#endif /* __NDPI_TYPEDEFS_H__ */
|
||||
|
||||
Reference in New Issue
Block a user