aboutsummaryrefslogtreecommitdiff
path: root/example/ndpiReader.c
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2020-11-30 22:01:49 +0100
committerLuca Deri <deri@ntop.org>2020-11-30 22:01:49 +0100
commiteb689b2069ebd9d78e376e812af5163ad61fd7ad (patch)
treee16b8e15240a729923d87a4ad8995a5e8e96492f /example/ndpiReader.c
parentb77a4276f9c9273b9abefb76e4c5409265fe747c (diff)
nDPI rules (work in progress) implementation
Diffstat (limited to 'example/ndpiReader.c')
-rw-r--r--example/ndpiReader.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/example/ndpiReader.c b/example/ndpiReader.c
index fe81c2265..86dc261a1 100644
--- a/example/ndpiReader.c
+++ b/example/ndpiReader.c
@@ -3669,6 +3669,16 @@ void analysisUnitTest() {
/* *********************************************** */
+void rulesUnitTest() {
+#ifdef HAVE_JSON_H
+#ifdef DEBUG_RULES
+ ndpi_parse_rules(ndpi_info_mod, "../rules/sample_rules.txt");
+#endif
+#endif
+}
+
+/* *********************************************** */
+
/**
@brief MAIN FUNCTION
**/
@@ -3698,6 +3708,7 @@ int orginal_main(int argc, char **argv) {
analyzeUnitTest();
ndpi_self_check_host_match();
analysisUnitTest();
+ rulesUnitTest();
memset(ndpi_thread_info, 0, sizeof(ndpi_thread_info));
parseOptions(argc, argv);