From 20374b542d9830564cc9f50aabbf47656a9db4b0 Mon Sep 17 00:00:00 2001 From: Luca Deri Date: Sat, 27 Feb 2016 09:00:02 +0100 Subject: Fixed warning Reworked protocol initialization --- src/include/ndpi_api.h | 6 ++++++ src/include/ndpi_typedefs.h | 12 ++++++++++++ 2 files changed, 18 insertions(+) (limited to 'src/include') diff --git a/src/include/ndpi_api.h b/src/include/ndpi_api.h index 364fd0101..a39acd536 100644 --- a/src/include/ndpi_api.h +++ b/src/include/ndpi_api.h @@ -67,6 +67,12 @@ extern "C" { */ u_int16_t ndpi_host_ptree_match(struct ndpi_detection_module_struct *ndpi_struct, u_int32_t host); + /** + * Init single protocol match + */ + void ndpi_init_protocol_match(struct ndpi_detection_module_struct *ndpi_mod, + ndpi_protocol_match *match); + /** * This function returns a new initialized detection module. * @param ticks_per_second the timestamp resolution per second (like 1000 for millisecond resolution) diff --git a/src/include/ndpi_typedefs.h b/src/include/ndpi_typedefs.h index 33fe5430c..c52d43716 100644 --- a/src/include/ndpi_typedefs.h +++ b/src/include/ndpi_typedefs.h @@ -1015,4 +1015,16 @@ struct ndpi_flow_struct { struct ndpi_id_struct *dst; }; +typedef struct { + char *string_to_match, *proto_name; + int protocol_id; + ndpi_protocol_breed_t protocol_breed; +} ndpi_protocol_match; + +typedef struct { + u_int32_t network; + u_int8_t cidr; + u_int8_t value; +} ndpi_network; + #endif/* __NDPI_TYPEDEFS_H__ */ -- cgit v1.2.3