From 57d529f74f7a53d62d62d2292ac5fed194e9e7d0 Mon Sep 17 00:00:00 2001 From: Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> Date: Mon, 16 Jun 2025 14:04:56 +0200 Subject: No limits on the number of (custom) protocols (#2875) The hard limit of total number of protocols (internal and custom) is ~65535, because protocol ids are `u_int16_t`... API changes: 1. From `NDPI_MAX_SUPPORTED_PROTOCOLS + NDPI_MAX_NUM_CUSTOM_PROTOCOLS` to `ndpi_get_num_protocols()` (after having called `ndpi_finalize_initialization()`); 2. From `proto_id >= NDPI_MAX_SUPPORTED_PROTOCOLS` to `ndpi_is_custom_protocol(proto_id)` (after having called `ndpi_finalize_initialization()`); Close #2136 Close #2545 --- windows/src/ndpi_define.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'windows/src') diff --git a/windows/src/ndpi_define.h b/windows/src/ndpi_define.h index af39185c6..375be8d9f 100644 --- a/windows/src/ndpi_define.h +++ b/windows/src/ndpi_define.h @@ -100,8 +100,6 @@ #define NDPI_COMPARE_IPV6_ADDRESS_STRUCTS(x,y) \ ((x.u6_addr.u6_addr64[0] < y.u6_addr.u6_addr64[0]) || ((x.u6_addr.u6_addr64[0] == y.u6_addr.u6_addr64[0]) && (x.u6_addr.u6_addr64[1] < y.u6_addr.u6_addr64[1]))) -#define NDPI_NUM_BITS 512 - #define howmanybits(x, y) (((x)+((y)-1))/(y)) #define NDPI_SET_BIT(num, n) num |= 1ULL << ( n ) -- cgit v1.2.3