summaryrefslogtreecommitdiff
path: root/epan
diff options
context:
space:
mode:
authorJuanjo Martin <juanjo@rti.com>2015-11-24 18:59:54 +0100
committerMichael Mann <mmann78@netscape.net>2015-11-25 20:15:09 +0000
commitf5404e5f7000988630d275e6631cf04189c9c389 (patch)
tree7c4a1da7a3b4b9c8d2a893904ee6ce8992c2b5bd /epan
parentb314342c0043d411912a7aff339d8cdd6ee413aa (diff)
downloadwireshark-f5404e5f7000988630d275e6631cf04189c9c389.tar.gz
RTPS: feature to add a preference that enables the dissection
of the RTPS special announcements that RTI sends. They just start by RTPX and are sent to the domain 0 always. Bug: 11765 Change-Id: I00b47f1aa1702bb35aeb8c4686c7012fecc94baa Reviewed-on: https://code.wireshark.org/review/12105 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-rtps.c10
-rw-r--r--epan/dissectors/packet-rtps.h1
2 files changed, 8 insertions, 3 deletions
diff --git a/epan/dissectors/packet-rtps.c b/epan/dissectors/packet-rtps.c
index c22ea0e3a3..cc238de4ea 100644
--- a/epan/dissectors/packet-rtps.c
+++ b/epan/dissectors/packet-rtps.c
@@ -7543,14 +7543,18 @@ static gboolean dissect_rtps(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
int sub_hf;
const value_string *sub_vals;
endpoint_guid guid;
-
+ guint32 magic_number;
/* Check 'RTPS' signature:
* A header is invalid if it has less than 16 octets
*/
if (!tvb_bytes_exist(tvb, offset, 16))
return FALSE;
- if (tvb_get_ntohl(tvb, offset) != RTPS_MAGIC_NUMBER)
- return FALSE;
+
+ magic_number = tvb_get_ntohl(tvb, offset);
+ if (magic_number != RTPX_MAGIC_NUMBER &&
+ magic_number != RTPS_MAGIC_NUMBER) {
+ return FALSE;
+ }
/* Distinguish between RTPS 1.x and 2.x here */
majorRev = tvb_get_guint8(tvb,offset+4);
if ((majorRev != 1) && (majorRev != 2))
diff --git a/epan/dissectors/packet-rtps.h b/epan/dissectors/packet-rtps.h
index a8fbf5e3ec..77597cb5fb 100644
--- a/epan/dissectors/packet-rtps.h
+++ b/epan/dissectors/packet-rtps.h
@@ -111,6 +111,7 @@ typedef enum {
} RTICdrTypeObjectTypeKind;
#define RTPS_MAGIC_NUMBER 0x52545053 /* RTPS */
+#define RTPX_MAGIC_NUMBER 0x52545058 /* RTPX */
/* Traffic type */
#define PORT_BASE (7400)