From 8689d3293ab7b09b84395d5351f7f3901db78653 Mon Sep 17 00:00:00 2001 From: Luca Date: Mon, 17 Sep 2018 17:57:47 +0200 Subject: Added ndpi_protocol2id() API call --- src/include/ndpi_api.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/include/ndpi_api.h') 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 @@ -432,6 +432,20 @@ extern "C" { char* ndpi_protocol2name(struct ndpi_detection_module_struct *ndpi_mod, 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 * -- cgit v1.2.3