diff options
author | Luca <deri@ntop.org> | 2024-01-15 19:03:46 +0100 |
---|---|---|
committer | Luca <deri@ntop.org> | 2024-01-15 19:03:46 +0100 |
commit | 162c38f18f81a4e069db5f957c13f68c2cdc9b89 (patch) | |
tree | 33555b3e246c83832c0e3a99fda75912ba686461 /src/lib/ndpi_main.c | |
parent | 61a18623e71626b4c9197f171ca219fae6f5792b (diff) |
Added new API calls
- ndpi_load_domain_suffixes()
- ndpi_get_host_domain_suffix()
whose goal is to find the domain name of a hostname. Example:
www.bbc.co.uk -> co.uk
mail.apple.com -> com
Diffstat (limited to 'src/lib/ndpi_main.c')
-rw-r--r-- | src/lib/ndpi_main.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/lib/ndpi_main.c b/src/lib/ndpi_main.c index d870ffe5c..28c53714f 100644 --- a/src/lib/ndpi_main.c +++ b/src/lib/ndpi_main.c @@ -4000,9 +4000,14 @@ void ndpi_exit_detection_module(struct ndpi_detection_module_struct *ndpi_str) { ndpi_free_geoip(ndpi_str); if(ndpi_str->callback_buffer) - ndpi_free(ndpi_str->callback_buffer); + ndpi_free(ndpi_str->callback_buffer); + if(ndpi_str->callback_buffer_tcp_payload) - ndpi_free(ndpi_str->callback_buffer_tcp_payload); + ndpi_free(ndpi_str->callback_buffer_tcp_payload); + + if(ndpi_str->public_domain_suffixes) + ndpi_domain_classify_free(ndpi_str->public_domain_suffixes); + ndpi_free(ndpi_str); } |