From 191694f797639fc0b56adcf050bc9cfa8dc02f3d Mon Sep 17 00:00:00 2001 From: Luca Deri Date: Thu, 19 Sep 2024 13:18:26 +0200 Subject: Implemented ndpi_strrstr() Fixed bug in ndpi_get_host_domain --- example/ndpiReader.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'example') diff --git a/example/ndpiReader.c b/example/ndpiReader.c index 8a59b77e3..0d3a42791 100644 --- a/example/ndpiReader.c +++ b/example/ndpiReader.c @@ -6258,6 +6258,9 @@ void domainsUnitTest() { assert(ndpi_load_domain_suffixes(ndpi_str, (char*)lists_path) == 0); + assert(strcmp(ndpi_get_host_domain(ndpi_str, "extension.femetrics.grammarly.io"), "grammarly.io") == 0); + assert(strcmp(ndpi_get_host_domain(ndpi_str, "www.ovh.commander1.com"), "commander1.com") == 0); + assert(strcmp(ndpi_get_host_domain_suffix(ndpi_str, "www.chosei.chiba.jp", &suffix_id), "chosei.chiba.jp") == 0); assert(strcmp(ndpi_get_host_domain_suffix(ndpi_str, "www.unipi.it", &suffix_id), "it") == 0); assert(strcmp(ndpi_get_host_domain_suffix(ndpi_str, "mail.apple.com", &suffix_id), "com") == 0); -- cgit v1.2.3