From 4ce9dec54ecb18b7eb5b9123bfbfc6c57aa35c6b Mon Sep 17 00:00:00 2001 From: Luca Date: Thu, 4 Jun 2015 18:44:09 +0200 Subject: Reworked the STUN plugin Added support for WhatsApp Voice vs WhatsApp (chat, no voice) --- example/ndpiReader.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'example/ndpiReader.c') diff --git a/example/ndpiReader.c b/example/ndpiReader.c index d7293f626..d3a334e10 100644 --- a/example/ndpiReader.c +++ b/example/ndpiReader.c @@ -975,6 +975,9 @@ static unsigned int packet_processing(u_int16_t thread_id, || ((proto == IPPROTO_TCP) && (flow->packets > 10))) { flow->detection_completed = 1; + if((flow->detected_protocol == NDPI_PROTOCOL_UNKNOWN) && (ndpi_flow->num_stun_udp_pkts > 0)) + ndpi_int_add_connection(ndpi_thread_info[thread_id].ndpi_struct, ndpi_flow, NDPI_PROTOCOL_STUN, NDPI_REAL_PROTOCOL); + snprintf(flow->host_server_name, sizeof(flow->host_server_name), "%s", flow->ndpi_flow->host_server_name); if((proto == IPPROTO_TCP) && (flow->detected_protocol != NDPI_PROTOCOL_DNS)) { -- cgit v1.2.3