diff options
author | Luca Deri <deri@ntop.org> | 2020-05-11 09:07:30 +0200 |
---|---|---|
committer | Luca Deri <deri@ntop.org> | 2020-05-11 09:07:30 +0200 |
commit | cd765c08d6f1038ea5efd7a7cc556ca89bdec9e4 (patch) | |
tree | a1128ff1cb414928857204ae3291c570ce3c911e | |
parent | ee15c6149db30b64c63a9009a3c4ef24280495a6 (diff) |
Added NDPI_XXX_BIT_16
-rw-r--r-- | src/include/ndpi_define.h.in | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/include/ndpi_define.h.in b/src/include/ndpi_define.h.in index ce4c4cc60..f173e6ce7 100644 --- a/src/include/ndpi_define.h.in +++ b/src/include/ndpi_define.h.in @@ -274,6 +274,12 @@ #define NDPI_BITMASK_SET_ALL(a) NDPI_ONE(&a) #define NDPI_BITMASK_SET(a, b) { memcpy(&a, &b, sizeof(NDPI_PROTOCOL_BITMASK)); } +#define NDPI_SET_BIT_16(num, n) num |= 1UL << n +#define NDPI_CLR_BIT_16(num, n) num &= ~(1UL << n) +#define NDPI_CLR_BIT_16(num, n) num &= ~(1UL << n) +#define NDPI_ZERO_16(num) num = 0 +#define NDPI_ISSET_BIT_16(num, n) (num & (1 << n)) + /* this is a very very tricky macro *g*, * the compiler will remove all shifts here if the protocol is static... */ |