From cbd7136b3480774a10f18744d33d3694ffee221b Mon Sep 17 00:00:00 2001 From: Ivan Nardi <12729895+IvanNardi@users.noreply.github.com> Date: Mon, 9 Jun 2025 09:00:17 +0200 Subject: Remove `NDPI_PROTOCOL_BITMASK`; add a new generic bitmask data structure (#2871) The main difference is that the memory is allocated at runtime Typical usercase: ``` struct ndpi_bitmask b; ndpi_bitmask_alloc(&b, ndpi_get_num_internal_protocols()); ndpi_bitmask_set(&b, $BIT); ndpi_bitmask_is_set(&b, $BIT); [...] ndpi_bitmask_dealloc(&b); ``` See #2136 --- example/reader_util.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'example/reader_util.h') diff --git a/example/reader_util.h b/example/reader_util.h index 2b76812c1..b755d3ab6 100644 --- a/example/reader_util.h +++ b/example/reader_util.h @@ -435,7 +435,7 @@ typedef struct ndpi_workflow { /* TODO: remove wrappers parameters and use ndpi global, when their initialization will be fixed... */ -struct ndpi_workflow * ndpi_workflow_init(const struct ndpi_workflow_prefs * prefs, pcap_t * pcap_handle, int do_init_flows_root, ndpi_serialization_format serialization_format, struct ndpi_global_context *g_ctx, NDPI_INTERNAL_PROTOCOL_BITMASK *enabled_bitmask); +struct ndpi_workflow * ndpi_workflow_init(const struct ndpi_workflow_prefs * prefs, pcap_t * pcap_handle, int do_init_flows_root, ndpi_serialization_format serialization_format, struct ndpi_global_context *g_ctx, struct ndpi_bitmask *enabled_bitmask); /* workflow main free function */ @@ -471,7 +471,7 @@ void process_ndpi_collected_info(struct ndpi_workflow * workflow, struct ndpi_fl void ndpi_flow_info_free_data(struct ndpi_flow_info *flow); void ndpi_flow_info_freer(void *node); const char* print_cipher_id(u_int32_t cipher); -int parse_proto_name_list(char *str, NDPI_INTERNAL_PROTOCOL_BITMASK *bitmask, int inverted_logic); +int parse_proto_name_list(char *str, struct ndpi_bitmask *bitmask, int inverted_logic); extern int reader_log_level; -- cgit v1.2.3