diff options
author | Luca <deri@ntop.org> | 2015-06-04 18:44:09 +0200 |
---|---|---|
committer | Luca <deri@ntop.org> | 2015-06-04 18:44:09 +0200 |
commit | 4ce9dec54ecb18b7eb5b9123bfbfc6c57aa35c6b (patch) | |
tree | ed6349cbe9da3a26e424a5ceb6e0a4d94d30fe40 /example/ndpiReader.c | |
parent | a31b0a3354d4a6f62ea9c338ed6f890136f1d3e6 (diff) |
Reworked the STUN plugin
Added support for WhatsApp Voice vs WhatsApp (chat, no voice)
Diffstat (limited to 'example/ndpiReader.c')
-rw-r--r-- | example/ndpiReader.c | 3 |
1 files changed, 3 insertions, 0 deletions
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)) { |