diff options
author | emanuele-f <black.silver@hotmail.it> | 2019-10-08 10:12:41 +0200 |
---|---|---|
committer | emanuele-f <black.silver@hotmail.it> | 2019-10-08 10:23:00 +0200 |
commit | b2c8cb655c8d70dafe67bad8da8099a4e8c6a517 (patch) | |
tree | 1ccb7cc56a817419f21acaed2029b0a4d43797ce /src/include/ndpi_api.h | |
parent | 4bdbf02c2d5eb871dca4ec620bb66fcc16a74af1 (diff) |
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
Diffstat (limited to 'src/include/ndpi_api.h')
-rw-r--r-- | src/include/ndpi_api.h | 4 |
1 files changed, 2 insertions, 2 deletions
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, |