aboutsummaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
authorIvan Nardi <12729895+IvanNardi@users.noreply.github.com>2024-08-02 15:06:08 +0200
committerGitHub <noreply@github.com>2024-08-02 15:06:08 +0200
commit2740a4f4e3d56f992b37e1fa273b6e0f3490868e (patch)
tree839d7de0a913194efbc8db054e48f10b346dcd5b /example
parentdbfeb06e26bb91769b870a1694f85fb6f44e2499 (diff)
Update all IP lists (#2515)
The `suffix_id` is simply an incremental index (see `ndpi_load_domain_suffixes`), so its value might changes every time we update the public suffix list.
Diffstat (limited to 'example')
-rw-r--r--example/ndpiReader.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/example/ndpiReader.c b/example/ndpiReader.c
index 0fa66889b..5acaa99a0 100644
--- a/example/ndpiReader.c
+++ b/example/ndpiReader.c
@@ -6100,9 +6100,9 @@ void encodeDomainsUnitTest() {
assert(ndpi_load_domain_suffixes(ndpi_str, (char*)lists_path) == 0);
- ndpi_get_host_domain_suffix(ndpi_str, "lcb.it", &suffix_id); assert(suffix_id == 1117);
- ndpi_get_host_domain_suffix(ndpi_str, "www.ntop.org", &suffix_id); assert(suffix_id == 4503);
- ndpi_get_host_domain_suffix(ndpi_str, "www.bbc.co.uk", &suffix_id); assert(suffix_id == 5242);
+ ndpi_get_host_domain_suffix(ndpi_str, "lcb.it", &suffix_id);
+ ndpi_get_host_domain_suffix(ndpi_str, "www.ntop.org", &suffix_id);
+ ndpi_get_host_domain_suffix(ndpi_str, "www.bbc.co.uk", &suffix_id);
str = (char*)"www.ntop.org"; assert(ndpi_encode_domain(ndpi_str, str, out, sizeof(out)) == 8);
str = (char*)"www.bbc.co.uk"; assert(ndpi_encode_domain(ndpi_str, str, out, sizeof(out)) == 8);