Add ndpi_flow_tcp_struct and ndpi_flow_udp_struct api calls.

This commit is contained in:
Zied Aouini
2020-02-21 15:49:46 +01:00
parent 2972e29097
commit 5a0f609086
2 changed files with 27 additions and 0 deletions
+19
View File
@@ -78,6 +78,25 @@ extern "C" {
*/
u_int32_t ndpi_detection_get_sizeof_ndpi_id_struct(void);
/**
* Get the size of the flow struct
*
* @return the size of the flow struct
*
*/
u_int32_t ndpi_detection_get_sizeof_ndpi_flow_tcp_struct(void);
/**
* Get the size of the flow struct
*
* @return the size of the flow struct
*
*/
u_int32_t ndpi_detection_get_sizeof_ndpi_flow_udp_struct(void);
/**
* nDPI personal allocation and free functions
**/
+8
View File
@@ -165,6 +165,14 @@ u_int32_t ndpi_detection_get_sizeof_ndpi_id_struct(void) { return(sizeof(struct
/* *********************************************************************************** */
u_int32_t ndpi_detection_get_sizeof_ndpi_flow_tcp_struct(void) { return(sizeof(struct ndpi_flow_tcp_struct)); }
/* *********************************************************************************** */
u_int32_t ndpi_detection_get_sizeof_ndpi_flow_udp_struct(void) { return(sizeof(struct ndpi_flow_udp_struct)); }
/* *********************************************************************************** */
char * ndpi_get_proto_by_id(struct ndpi_detection_module_struct *ndpi_str, u_int id) {
return((id >= ndpi_str->ndpi_num_supported_protocols) ? NULL : ndpi_str->proto_defaults[id].protoName);
}