From b2c8cb655c8d70dafe67bad8da8099a4e8c6a517 Mon Sep 17 00:00:00 2001 From: emanuele-f Date: Tue, 8 Oct 2019 10:12:41 +0200 Subject: ndpi_load_hostname_category now performs strdup on the name argument This simplifies the API as an application is not required to keep references to the strings to free --- src/include/ndpi_api.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/include/ndpi_api.h') diff --git a/src/include/ndpi_api.h b/src/include/ndpi_api.h index 6bf2d5779..37291d1b7 100644 --- a/src/include/ndpi_api.h +++ b/src/include/ndpi_api.h @@ -745,9 +745,9 @@ extern "C" { int ndpi_match_string(void *_automa, char *string_to_match); void ndpi_load_ip_category(struct ndpi_detection_module_struct *ndpi_struct, - char *ip_address_and_mask, ndpi_protocol_category_t category); + const char *ip_address_and_mask, ndpi_protocol_category_t category); int ndpi_load_hostname_category(struct ndpi_detection_module_struct *ndpi_struct, - char *name, ndpi_protocol_category_t category); + const char *name_to_add, ndpi_protocol_category_t category); int ndpi_enable_loaded_categories(struct ndpi_detection_module_struct *ndpi_struct); int ndpi_fill_ip_protocol_category(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t saddr, -- cgit v1.2.3