From 2e679ba8647aff7b0114de2940a03e4186ccc3dc Mon Sep 17 00:00:00 2001 From: Luca Deri Date: Wed, 28 May 2025 22:10:10 +0200 Subject: Added ndpi_load_protocols_dir() API call for loading IP-based protocol detection Added --protocols-list-dir to ndpiReader for loading IP_based protocol --- example/reader_util.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'example/reader_util.c') diff --git a/example/reader_util.c b/example/reader_util.c index 3efeaa595..46f19614f 100644 --- a/example/reader_util.c +++ b/example/reader_util.c @@ -85,6 +85,7 @@ u_int8_t enable_doh_dot_detection = 0; extern bool do_load_lists; extern int malloc_size_stats; extern int monitoring_enabled; +extern char *_protocolsDirPath; /* ****************************************************** */ @@ -443,6 +444,9 @@ struct ndpi_workflow* ndpi_workflow_init(const struct ndpi_workflow_prefs * pref return NULL; } + if(_protocolsDirPath != NULL) + ndpi_load_protocols_dir(module, _protocolsDirPath); + workflow = ndpi_calloc(1, sizeof(struct ndpi_workflow)); if(workflow == NULL) { LOG(NDPI_LOG_ERROR, "global structure initialization failed\n"); -- cgit v1.2.3