aboutsummaryrefslogtreecommitdiff
path: root/example/reader_util.c
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2025-05-28 22:10:10 +0200
committerLuca Deri <deri@ntop.org>2025-05-28 22:13:11 +0200
commit2e679ba8647aff7b0114de2940a03e4186ccc3dc (patch)
tree0aa314ed93842c06d9a9a3e178aa6a6d64be36d6 /example/reader_util.c
parent651daeb01a15c0880c34e7b482710e35b92d98e2 (diff)
Added ndpi_load_protocols_dir() API call for loading IP-based protocol detection
Added --protocols-list-dir <dir> to ndpiReader for loading IP_based protocol
Diffstat (limited to 'example/reader_util.c')
-rw-r--r--example/reader_util.c4
1 files changed, 4 insertions, 0 deletions
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");