diff options
author | Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> | 2025-06-03 10:22:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-06-03 10:22:15 +0200 |
commit | ed210577101af311e70d6ddcde1b0282a76f6031 (patch) | |
tree | 2be00d2596b052ede26a9849a7c75c1828ca089c /example/reader_util.h | |
parent | 70a72f163800dd37dca1ec586ae0a58a6cef8206 (diff) |
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
Diffstat (limited to 'example/reader_util.h')
-rw-r--r-- | example/reader_util.h | 12 |
1 files changed, 6 insertions, 6 deletions
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; |