aboutsummaryrefslogtreecommitdiff
path: root/src/include/ndpi_api.h
diff options
context:
space:
mode:
authorLuca Deri <deri@ntop.org>2019-10-08 13:32:43 +0200
committerLuca Deri <deri@ntop.org>2019-10-08 13:32:43 +0200
commit0a7521060a910d0ea1d098af334c7bae8b92f0e3 (patch)
tree2a65d73c65399a091258a9c5b5db4cbd8d4191c9 /src/include/ndpi_api.h
parent6b5a9aa9929c6229a7bb0926edcf7ae713aabef9 (diff)
parent2dfdaa4d703ae2e7d88c72c5a1bd9ca3f8258ce9 (diff)
Merge branch 'dev' of https://github.com/ntop/nDPI into dev
Diffstat (limited to 'src/include/ndpi_api.h')
-rw-r--r--src/include/ndpi_api.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/include/ndpi_api.h b/src/include/ndpi_api.h
index e5c52610e..ccca9cc25 100644
--- a/src/include/ndpi_api.h
+++ b/src/include/ndpi_api.h
@@ -613,6 +613,16 @@ extern "C" {
int ndpi_load_protocols_file(struct ndpi_detection_module_struct *ndpi_mod,
const char* path);
+ /**
+ * Read a file and load the categories
+ *
+ * @par ndpi_mod = the detection module
+ * @par path = the path of the file
+ * @return 0 if the file is loaded correctly;
+ * -1 else
+ */
+ int ndpi_load_categories_file(struct ndpi_detection_module_struct *ndpi_str, const char* path);
+
/**
* Get the total number of the supported protocols
*
@@ -744,10 +754,12 @@ extern "C" {
*/
int ndpi_match_string(void *_automa, char *string_to_match);
- void ndpi_load_ip_category(struct ndpi_detection_module_struct *ndpi_struct,
+ int ndpi_load_ip_category(struct ndpi_detection_module_struct *ndpi_struct,
const char *ip_address_and_mask, ndpi_protocol_category_t category);
int ndpi_load_hostname_category(struct ndpi_detection_module_struct *ndpi_struct,
const char *name_to_add, ndpi_protocol_category_t category);
+ int ndpi_load_category(struct ndpi_detection_module_struct *ndpi_struct,
+ const char *ip_or_name, 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,