diff options
author | Vito Piserchia <vito.piserchia@dreamlab.net> | 2016-10-13 13:50:29 +0200 |
---|---|---|
committer | Vito Piserchia <vito.piserchia@dreamlab.net> | 2016-10-13 13:50:29 +0200 |
commit | 4c467d7cad5b352c692b6e73b43e6d23325b4b38 (patch) | |
tree | 045721c039d518c3d32e6dc88d7c9780ee10da95 /src/lib/protocols/xbox.c | |
parent | a17553cbf1c7dd1bb92e83d800e6904d159fc016 (diff) | |
parent | db794beb84331f1f15f68b4685c6b87e56560597 (diff) |
Merge remote-tracking branch 'upstream/dev' into dev
Diffstat (limited to 'src/lib/protocols/xbox.c')
-rw-r--r-- | src/lib/protocols/xbox.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/src/lib/protocols/xbox.c b/src/lib/protocols/xbox.c index 7fad5ced9..92f68fc34 100644 --- a/src/lib/protocols/xbox.c +++ b/src/lib/protocols/xbox.c @@ -1,8 +1,7 @@ /* * xbox.c * - * Copyright (C) 2009-2011 by ipoque GmbH - * Copyright (C) 2011-15 - ntop.org + * Copyright (C) 2016 - ntop.org * * This file is part of nDPI, an open source deep packet inspection * library based on the OpenDPI and PACE technology by ipoque GmbH @@ -22,8 +21,8 @@ * */ - #include "ndpi_protocols.h" + #ifdef NDPI_PROTOCOL_XBOX static void ndpi_int_xbox_add_connection(struct ndpi_detection_module_struct @@ -41,13 +40,11 @@ void ndpi_search_xbox(struct ndpi_detection_module_struct *ndpi_struct, struct n // struct ndpi_id_struct *dst = flow->dst; /* - * THIS IS TH XBOX UDP DETCTION ONLY !!! - * the xbox tcp detection is done by http code + * XBOX UDP DETCTION ONLY + * the xbox TCP detection is done by http code + * this detection also works for asymmetric xbox udp traffic */ - - - /* this detection also works for asymmetric xbox udp traffic */ - if (packet->udp != NULL) { + if(packet->udp != NULL) { u_int16_t dport = ntohs(packet->udp->dest); u_int16_t sport = ntohs(packet->udp->source); @@ -88,11 +85,9 @@ void ndpi_search_xbox(struct ndpi_detection_module_struct *ndpi_struct, struct n } /* exclude here all non matched udp traffic, exclude here tcp only if http has been excluded, because xbox could use http */ - if (packet->tcp == NULL #ifdef NDPI_PROTOCOL_HTTP - || NDPI_COMPARE_PROTOCOL_TO_BITMASK(flow->excluded_protocol_bitmask, NDPI_PROTOCOL_HTTP) != 0 + if(NDPI_COMPARE_PROTOCOL_TO_BITMASK(flow->excluded_protocol_bitmask, NDPI_PROTOCOL_HTTP) != 0) { #endif - ) { NDPI_LOG(NDPI_PROTOCOL_XBOX, ndpi_struct, NDPI_LOG_DEBUG, "xbox udp excluded.\n"); NDPI_ADD_PROTOCOL_TO_BITMASK(flow->excluded_protocol_bitmask, NDPI_PROTOCOL_XBOX); } |