diff options
author | Campus <campus@ntop.org> | 2016-10-07 11:37:42 +0200 |
---|---|---|
committer | Campus <campus@ntop.org> | 2016-10-07 11:37:42 +0200 |
commit | 2c47dca086940c643f98ad5e868899f84b61dd82 (patch) | |
tree | 598acb5b3a7623b495c491bd793cc4f97f6a28d6 /src/lib/protocols/xbox.c | |
parent | 7e8e243e68bc6bc4d979e03887d57d75fd36f00b (diff) |
fixed some dissector for logic or syntax
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); } |