From fd89c81b83ac215ba838b66c57f5a6beee2dec6a Mon Sep 17 00:00:00 2001 From: Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> Date: Mon, 19 May 2025 21:18:18 +0200 Subject: Flow: keep track of "dissectors" (#2828) In the flow, we should keep track of state of "dissectors", not "protocols". This way, flow structure doesn't depend anymore on the max number of protocols. This is also the first step into fixing #2136 --- windows/src/ndpi_define.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'windows/src') diff --git a/windows/src/ndpi_define.h b/windows/src/ndpi_define.h index dc002a5a7..b965f6282 100644 --- a/windows/src/ndpi_define.h +++ b/windows/src/ndpi_define.h @@ -138,6 +138,10 @@ #define NDPI_ISSET_BIT(num, n) (num & (1ULL << ( n ))) #define NDPI_ZERO_BIT(num) num = 0 +#define NDPI_DISSECTOR_BITMASK ndpi_dissector_bitmask_struct_t +#define NDPI_DISSECTOR_BITMASK_IS_SET(p, n) NDPI_ISSET(&(p), (n)) +#define NDPI_DISSECTOR_BITMASK_SET(p, n) NDPI_SET(&(p), (n) & NDPI_NUM_BITS_MASK) + /* this is a very very tricky macro *g*, * the compiler will remove all shifts here if the protocol is static... */ -- cgit v1.2.3