Added tunnelling decapsulation

This commit is contained in:
Luca
2019-11-05 08:21:31 +00:00
parent 75302a10bd
commit 6298ecc271
6 changed files with 84 additions and 14 deletions
+1
View File
@@ -818,6 +818,7 @@ extern "C" {
struct ndpi_flow_struct *flow);
u_int8_t ndpi_is_safe_ssl_cipher(u_int32_t cipher);
const char* ndpi_cipher2str(u_int32_t cipher);
const char* ndpi_tunnel2str(ndpi_packet_tunnel tt);
u_int16_t ndpi_guess_host_protocol_id(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow);
int ndpi_has_human_readeable_string(struct ndpi_detection_module_struct *ndpi_struct,
+7
View File
@@ -42,6 +42,13 @@ typedef enum {
ndpi_l4_proto_tcp_and_udp,
} ndpi_l4_proto_info;
typedef enum {
ndpi_no_tunnel = 0,
ndpi_gtp_tunnel,
ndpi_capwap_tunnel,
ndpi_tzsp_tunnel,
} ndpi_packet_tunnel;
/* NDPI_VISIT */
typedef enum {
ndpi_preorder,
+22
View File
@@ -1072,3 +1072,25 @@ int ndpi_flow2json(struct ndpi_detection_module_struct *ndpi_struct,
}
/* ********************************** */
const char* ndpi_tunnel2str(ndpi_packet_tunnel tt) {
switch(tt) {
case ndpi_no_tunnel:
return("No-Tunnel");
break;
case ndpi_gtp_tunnel:
return("GTP");
break;
case ndpi_capwap_tunnel:
return("CAPWAP");
break;
case ndpi_tzsp_tunnel:
return("TZSP");
break;
}
}
/* ********************************** */