aboutsummaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
authorIvan Nardi <12729895+IvanNardi@users.noreply.github.com>2023-10-29 12:14:20 +0100
committerGitHub <noreply@github.com>2023-10-29 12:14:20 +0100
commit32b50f5aa4a199d6f63408b95dbf675689668418 (patch)
treefb09982cc360f30415c428e9ab29ebd3a76d3118 /example
parentc711251578001920dee09f1dd1b36516bd15045c (diff)
IPv6: add support for IPv6 risk exceptions (#2122)
Diffstat (limited to 'example')
-rw-r--r--example/ndpiReader.c6
-rw-r--r--example/protos.txt2
2 files changed, 8 insertions, 0 deletions
diff --git a/example/ndpiReader.c b/example/ndpiReader.c
index a22da5dac..aea2c4878 100644
--- a/example/ndpiReader.c
+++ b/example/ndpiReader.c
@@ -3895,6 +3895,9 @@ static void printResults(u_int64_t processing_time_usec, u_int64_t setup_time_us
printf("\tPatricia risk mask: %llu/%llu (search/found)\n",
(long long unsigned int)cumulative_stats.patricia_stats[NDPI_PTREE_RISK_MASK].n_search,
(long long unsigned int)cumulative_stats.patricia_stats[NDPI_PTREE_RISK_MASK].n_found);
+ printf("\tPatricia risk mask IPv6: %llu/%llu (search/found)\n",
+ (long long unsigned int)cumulative_stats.patricia_stats[NDPI_PTREE_RISK_MASK6].n_search,
+ (long long unsigned int)cumulative_stats.patricia_stats[NDPI_PTREE_RISK_MASK6].n_found);
printf("\tPatricia risk: %llu/%llu (search/found)\n",
(long long unsigned int)cumulative_stats.patricia_stats[NDPI_PTREE_RISK].n_search,
(long long unsigned int)cumulative_stats.patricia_stats[NDPI_PTREE_RISK].n_found);
@@ -3997,6 +4000,9 @@ static void printResults(u_int64_t processing_time_usec, u_int64_t setup_time_us
fprintf(results_file, "Patricia risk mask: %llu/%llu (search/found)\n",
(long long unsigned int)cumulative_stats.patricia_stats[NDPI_PTREE_RISK_MASK].n_search,
(long long unsigned int)cumulative_stats.patricia_stats[NDPI_PTREE_RISK_MASK].n_found);
+ fprintf(results_file, "Patricia risk mask IPv6: %llu/%llu (search/found)\n",
+ (long long unsigned int)cumulative_stats.patricia_stats[NDPI_PTREE_RISK_MASK6].n_search,
+ (long long unsigned int)cumulative_stats.patricia_stats[NDPI_PTREE_RISK_MASK6].n_found);
fprintf(results_file, "Patricia risk: %llu/%llu (search/found)\n",
(long long unsigned int)cumulative_stats.patricia_stats[NDPI_PTREE_RISK].n_search,
(long long unsigned int)cumulative_stats.patricia_stats[NDPI_PTREE_RISK].n_found);
diff --git a/example/protos.txt b/example/protos.txt
index cb8ec6044..683107f74 100644
--- a/example/protos.txt
+++ b/example/protos.txt
@@ -74,6 +74,8 @@ ipv6:[fe80::76ac:b9ff:fe6c:c124]:12718@CustomProtocolH
#ip_risk_mask:192.168.1.0/24=0
ip_risk_mask:10.10.120.0/24=0
ip_risk_mask:10.196.157.228=0
+ipv6_risk_mask:[fe80::356b:e047:3695:0]/112=0
+ipv6_risk_mask:[fe80::7c0:e74e:87c3:5d93]=0
host_risk_mask:".home"=0