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
This commit is contained in:
emanuele-f
2019-10-08 10:23:00 +02:00
parent 4bdbf02c2d
commit b2c8cb655c
3 changed files with 15 additions and 18 deletions
+2 -2
View File
@@ -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,