aboutsummaryrefslogtreecommitdiff
path: root/src/include/ndpi_api.h
diff options
context:
space:
mode:
authorLuca <deri@ntop.org>2018-09-17 17:57:47 +0200
committerLuca <deri@ntop.org>2018-09-17 17:57:47 +0200
commit8689d3293ab7b09b84395d5351f7f3901db78653 (patch)
treef2cdc480f32dbc6d654a7365ef09212321edd7a1 /src/include/ndpi_api.h
parent51fdd12d235e6c81eb0b48ec7acd4aeb02c3a3c2 (diff)
Added ndpi_protocol2id() API call
Diffstat (limited to 'src/include/ndpi_api.h')
-rw-r--r--src/include/ndpi_api.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/include/ndpi_api.h b/src/include/ndpi_api.h
index 3fefc8e4b..0409cb8c4 100644
--- a/src/include/ndpi_api.h
+++ b/src/include/ndpi_api.h
@@ -433,6 +433,20 @@ extern "C" {
ndpi_protocol proto, char *buf, u_int buf_len);
/**
+ * Same as ndpi_protocol2name() with the difference that the numeric protocol
+ * name is returned
+ *
+ * @par ndpi_mod = the detection module
+ * @par proto = the struct ndpi_protocol contain the protocols name
+ * @par buf = the buffer to write the name of the protocols
+ * @par buf_len = the length of the buffer
+ * @return the buffer contains the master_protocol and protocol name
+ *
+ */
+ char* ndpi_protocol2id(struct ndpi_detection_module_struct *ndpi_mod,
+ ndpi_protocol proto, char *buf, u_int buf_len);
+
+ /**
* Find out if a given category is custom/user-defined
*
* @par category = the category associated to the protocol