Added ndpi_bitmap_andnot API call

This commit is contained in:
Luca
2023-08-21 13:26:38 +02:00
parent cc4461f424
commit 6e5466f9e5
2 changed files with 8 additions and 0 deletions
+1
View File
@@ -1983,6 +1983,7 @@ extern "C" {
ndpi_bitmap* ndpi_bitmap_deserialize(char *buf);
void ndpi_bitmap_and(ndpi_bitmap* a, ndpi_bitmap* b_and);
void ndpi_bitmap_andnot(ndpi_bitmap* a, ndpi_bitmap* b_and);
void ndpi_bitmap_or(ndpi_bitmap* a, ndpi_bitmap* b_or);
void ndpi_bitmap_xor(ndpi_bitmap* a, ndpi_bitmap* b_xor);
+7
View File
@@ -114,6 +114,13 @@ void ndpi_bitmap_and(ndpi_bitmap* a, ndpi_bitmap* b_and) {
/* ******************************************* */
/* b = b & !b_and */
void ndpi_bitmap_andnot(ndpi_bitmap* a, ndpi_bitmap* b_and) {
roaring_bitmap_andnot_inplace((ndpi_bitmap*)a, (ndpi_bitmap*)b_and);
}
/* ******************************************* */
/* b = b | b_or */
void ndpi_bitmap_or(ndpi_bitmap* a, ndpi_bitmap* b_or) {
roaring_bitmap_or_inplace((ndpi_bitmap*)a, (ndpi_bitmap*)b_or);