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>
This commit is contained in:
Juanjo Martin 2015-11-24 18:59:54 +01:00 committed by Michael Mann
parent b314342c00
commit f5404e5f70
2 changed files with 8 additions and 3 deletions

View File

@ -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))

View File

@ -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)