aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/ndpi_api.h13
-rw-r--r--src/include/ndpi_typedefs.h4
2 files changed, 17 insertions, 0 deletions
diff --git a/src/include/ndpi_api.h b/src/include/ndpi_api.h
index 56815ff3b..8688fb2a4 100644
--- a/src/include/ndpi_api.h
+++ b/src/include/ndpi_api.h
@@ -823,6 +823,19 @@ extern "C" {
char* path);
/**
+ * Load files (whose name is <protocolid>_<label>.<extension>) stored
+ * in a directory and binds each IP/network to the specified protocol.
+ * This function is used to bind IP addresses to protocols
+ *
+ * @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_protocols_dir(struct ndpi_detection_module_struct *ndpi_str,
+ char* path);
+
+ /**
* Read a file and load the list of risky domains
*
* @par ndpi_mod = the detection module
diff --git a/src/include/ndpi_typedefs.h b/src/include/ndpi_typedefs.h
index 70a305938..d4616da6c 100644
--- a/src/include/ndpi_typedefs.h
+++ b/src/include/ndpi_typedefs.h
@@ -1158,6 +1158,10 @@ typedef enum {
NDPI_PROTOCOL_CATEGORY_DATING,
NDPI_PROTOCOL_CATEGORY_TRAVEL,
NDPI_PROTOCOL_CATEGORY_FOOD,
+
+ NDPI_PROTOCOL_CATEGORY_BOTS, /* Crawlers, bots */
+ NDPI_PROTOCOL_CATEGORY_SCANNERS, /* e.g. shodan.io, censys.io */
+
/*
IMPORTANT