aboutsummaryrefslogtreecommitdiff
path: root/src/include/ndpi_api.h
diff options
context:
space:
mode:
authorToni <matzeton@googlemail.com>2023-07-22 14:51:33 +0200
committerGitHub <noreply@github.com>2023-07-22 14:51:33 +0200
commit2b230e28e0612e8654ad617534deb9aaaabd51b7 (patch)
tree1a1045082ae3ad0d7527fb634d512f85b5f9bc62 /src/include/ndpi_api.h
parent88a757c4cd3a6912fa5c8405677168e6a4f06ab1 (diff)
Allow init of app protocols w/o any hostnames set. (#2057)
Diffstat (limited to 'src/include/ndpi_api.h')
-rw-r--r--src/include/ndpi_api.h26
1 files changed, 24 insertions, 2 deletions
diff --git a/src/include/ndpi_api.h b/src/include/ndpi_api.h
index e48fc013e..653510e82 100644
--- a/src/include/ndpi_api.h
+++ b/src/include/ndpi_api.h
@@ -167,14 +167,36 @@ extern "C" {
u_int16_t port /* network byte order */);
/**
- * Init single protocol match
+ * Creates a protocol match that does not contain any hostnames.
+ *
+ * @par hostname_list = the desired hostname list form which the first entry is used to create the match
+ * @par empty_app_protocol = the resulting protocol match that does contain all information except the hostname
+ *
+ * @return 0 on success, 1 otherwise
+ */
+ int ndpi_init_empty_app_protocol(ndpi_protocol_match const * const hostname_list,
+ ndpi_protocol_match * const empty_app_protocol);
+
+ /**
+ * Init single protocol match.
+ *
+ * @par ndpi_mod = the struct created for the protocol detection
+ * @par match = the struct passed to match the protocol
+ *
+ * @return 0 on success, 1 otherwise
+ */
+ int ndpi_init_app_protocol(struct ndpi_detection_module_struct *ndpi_str,
+ ndpi_protocol_match const * const match);
+
+ /**
+ * Init single protocol match and adds it to the Aho-Corasick automata.
*
* @par ndpi_mod = the struct created for the protocol detection
* @par match = the struct passed to match the protocol
*
*/
void ndpi_init_protocol_match(struct ndpi_detection_module_struct *ndpi_mod,
- ndpi_protocol_match *match);
+ ndpi_protocol_match const * const match);
/**
* Returns a new initialized detection module