aboutsummaryrefslogtreecommitdiff
path: root/example/reader_util.h
diff options
context:
space:
mode:
authorIvan Nardi <12729895+IvanNardi@users.noreply.github.com>2025-06-23 11:24:18 +0200
committerGitHub <noreply@github.com>2025-06-23 11:24:18 +0200
commit978ca1ba1ab0f9d3f7d3c46e6f80a829b08205db (patch)
treef7748c2d810c75c0155fa3f81e3146a797f6fdba /example/reader_util.h
parent6cbc8d1471be221766fac49ed73f5b0e837917be (diff)
New API to enable/disable protocols. Removed `NDPI_LAST_IMPLEMENTED_PROTOCOL` (#2894)
Change the API to enable/disable protocols: you can set that via the standard `ndpi_set_config()` function, as every configuration parameters. By default, all protocols are enabled. Split the (local) context initialization into two phases: * `ndpi_init_detection_module()`: generic part. It does not depend on the configuration and on the protocols being enabled or not. It also calculates the real number of internal protocols * `ndpi_finalize_initialization()`: apply the configuration. All the initialization stuff that depend on protocols being enabled or not must be put here This is the last step to have the protocols number fully calculated at runtime Remove a (now) useless fuzzer. Important API changes: * remove `NDPI_LAST_IMPLEMENTED_PROTOCOL` define * remove `ndpi_get_num_internal_protocols()`. To get the number of configured protocols (internal and custom) you must use `ndpi_get_num_protocols()` after having called `ndpi_finalize_initialization()`
Diffstat (limited to 'example/reader_util.h')
-rw-r--r--example/reader_util.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/example/reader_util.h b/example/reader_util.h
index bbd1ac949..daf86861f 100644
--- a/example/reader_util.h
+++ b/example/reader_util.h
@@ -438,7 +438,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, struct ndpi_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);
/* workflow main free function */
@@ -474,7 +474,6 @@ 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, struct ndpi_bitmask *bitmask, int inverted_logic);
extern int reader_log_level;