From ed210577101af311e70d6ddcde1b0282a76f6031 Mon Sep 17 00:00:00 2001 From: Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> Date: Tue, 3 Jun 2025 10:22:15 +0200 Subject: First step into a dynamic number of protocols (#2857) We want to get rid of the defines `NDPI_MAX_SUPPORTED_PROTOCOLS` and `NDPI_MAX_NUM_CUSTOM_PROTOCOLS`. You can use: ``` ndpi_get_num_protocols() ``` See #2136 Removed some unused functions from public API --- example/reader_util.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'example/reader_util.h') diff --git a/example/reader_util.h b/example/reader_util.h index 5fcae6582..2b76812c1 100644 --- a/example/reader_util.h +++ b/example/reader_util.h @@ -372,12 +372,12 @@ typedef struct ndpi_stats { u_int64_t raw_packet_count; u_int64_t ip_packet_count; u_int64_t total_wire_bytes, total_ip_bytes, total_discarded_bytes; - u_int64_t protocol_counter[NDPI_MAX_SUPPORTED_PROTOCOLS + NDPI_MAX_NUM_CUSTOM_PROTOCOLS + 1]; - u_int64_t protocol_counter_bytes[NDPI_MAX_SUPPORTED_PROTOCOLS + NDPI_MAX_NUM_CUSTOM_PROTOCOLS + 1]; - u_int32_t protocol_flows[NDPI_MAX_SUPPORTED_PROTOCOLS + NDPI_MAX_NUM_CUSTOM_PROTOCOLS + 1]; - u_int64_t fpc_protocol_counter[NDPI_MAX_SUPPORTED_PROTOCOLS + NDPI_MAX_NUM_CUSTOM_PROTOCOLS + 1]; - u_int64_t fpc_protocol_counter_bytes[NDPI_MAX_SUPPORTED_PROTOCOLS + NDPI_MAX_NUM_CUSTOM_PROTOCOLS + 1]; - u_int32_t fpc_protocol_flows[NDPI_MAX_SUPPORTED_PROTOCOLS + NDPI_MAX_NUM_CUSTOM_PROTOCOLS + 1]; + u_int64_t *protocol_counter; + u_int64_t *protocol_counter_bytes; + u_int32_t *protocol_flows; + u_int64_t *fpc_protocol_counter; + u_int64_t *fpc_protocol_counter_bytes; + u_int32_t *fpc_protocol_flows; u_int32_t ndpi_flow_count; u_int32_t flow_count[3]; u_int64_t tcp_count, udp_count; -- cgit v1.2.3