aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--epan/dissectors/packet-rtps.c163
1 files changed, 107 insertions, 56 deletions
diff --git a/epan/dissectors/packet-rtps.c b/epan/dissectors/packet-rtps.c
index fb45155512..3b66d8e7cc 100644
--- a/epan/dissectors/packet-rtps.c
+++ b/epan/dissectors/packet-rtps.c
@@ -3863,27 +3863,36 @@ static void rtps_util_format_typename(gchar * type_name, gchar ** output) {
g_free(result_caps);
}
-static gboolean rtps_util_show_topic_info(proto_tree *tree, packet_info *pinfo,
- tvbuff_t *tvb, gint offset, endpoint_guid * guid,
+static void rtps_util_topic_info_add_tree(proto_tree *tree, tvbuff_t *tvb,
+ gint offset, endpoint_guid * guid) {
+ if (enable_topic_info) {
+ proto_tree * topic_info_tree;
+ proto_item * ti;
+ type_mapping * type_mapping_object = rtps_util_get_topic_info(guid);
+ if (type_mapping_object != NULL) {
+ topic_info_tree = proto_tree_add_subtree(tree, tvb, offset, 0,
+ ett_rtps_topic_info, NULL, "[Topic Information (from Discovery)]");
+ ti = proto_tree_add_string(topic_info_tree, hf_rtps_param_topic_name, tvb, offset, 0,
+ type_mapping_object->topic_name);
+ PROTO_ITEM_SET_GENERATED(ti);
+ ti = proto_tree_add_string(topic_info_tree, hf_rtps_param_type_name, tvb, offset, 0,
+ type_mapping_object->type_name);
+ PROTO_ITEM_SET_GENERATED(ti);
+ }
+ }
+}
+
+static gboolean rtps_util_topic_info_add_column_info_and_try_dissector(proto_tree *tree,
+ packet_info *pinfo, tvbuff_t *tvb, gint offset, endpoint_guid * guid,
rtps_dissector_data * data) {
if (enable_topic_info) {
type_mapping * type_mapping_object = rtps_util_get_topic_info(guid);
if (type_mapping_object != NULL) {
- proto_tree * topic_info_tree;
- proto_item * ti;
gchar * dissector_name = NULL;
tvbuff_t *next_tvb;
/* This part shows information available for the sample */
if (data && !(data->info_displayed)) {
- topic_info_tree = proto_tree_add_subtree(tree, tvb, offset, 0,
- ett_rtps_topic_info, NULL, "[Topic Information (from Discovery)]");
- ti = proto_tree_add_string(topic_info_tree, hf_rtps_param_topic_name, tvb, offset, 0,
- type_mapping_object->topic_name);
- PROTO_ITEM_SET_GENERATED(ti);
- ti = proto_tree_add_string(topic_info_tree, hf_rtps_param_type_name, tvb, offset, 0,
- type_mapping_object->type_name);
- PROTO_ITEM_SET_GENERATED(ti);
col_append_sep_str(pinfo->cinfo, COL_INFO, " -> ", type_mapping_object->topic_name);
data->info_displayed = TRUE;
}
@@ -6258,8 +6267,8 @@ static void dissect_serialized_data(proto_tree *tree, packet_info *pinfo, tvbuff
/* Add Topic Information if enabled (checked inside). This call attemps to dissect
* the sample and will return TRUE if it did. We should return in that case.*/
- if (rtps_util_show_topic_info(rtps_parameter_sequence_tree, pinfo, tvb,
- offset, guid, data))
+ if (rtps_util_topic_info_add_column_info_and_try_dissector(rtps_parameter_sequence_tree,
+ pinfo, tvb, offset, guid, data))
return;
/* The payload */
@@ -6770,7 +6779,8 @@ static void dissect_DATA_v2(tvbuff_t *tvb, packet_info *pinfo, gint offset, guin
rtps_util_add_entity_id(tree, tvb, offset, hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key,
hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", &wid);
offset += 4;
-
+ guid->entity_id = wid;
+ rtps_util_topic_info_add_tree(tree, tvb, offset, guid);
/* Sequence number */
rtps_util_add_seq_number(tree, tvb, offset, encoding, "writerSeqNumber");
@@ -6808,7 +6818,6 @@ static void dissect_DATA_v2(tvbuff_t *tvb, packet_info *pinfo, gint offset, guin
if ((flags & FLAG_DATA_D_v2) != 0) {
from_builtin_writer =
(((wid & 0xc2) == 0xc2) || ((wid & 0xc3) == 0xc3)) ? TRUE : FALSE;
- guid->entity_id = wid;
dissect_serialized_data(tree, pinfo, tvb, offset,
octets_to_next_header - (offset - old_offset) + 4,
"serializedData", vendor_id, from_builtin_writer, guid);
@@ -6817,7 +6826,8 @@ static void dissect_DATA_v2(tvbuff_t *tvb, packet_info *pinfo, gint offset, guin
}
static void dissect_DATA_FRAG(tvbuff_t *tvb, packet_info *pinfo, gint offset, guint8 flags,
- const guint encoding, int octets_to_next_header, proto_tree *tree, guint16 vendor_id) {
+ const guint encoding, int octets_to_next_header, proto_tree *tree,
+ guint16 vendor_id, endpoint_guid *guid) {
/*
* 0...2...........7...............15.............23...............31
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
@@ -6886,6 +6896,8 @@ static void dissect_DATA_FRAG(tvbuff_t *tvb, packet_info *pinfo, gint offset, gu
rtps_util_add_entity_id(tree, tvb, offset, hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key,
hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", &wid);
offset += 4;
+ guid->entity_id = wid;
+ rtps_util_topic_info_add_tree(tree, tvb, offset, guid);
/* Sequence number */
rtps_util_add_seq_number(tree, tvb, offset, encoding, "writerSeqNumber");
@@ -7187,7 +7199,8 @@ static void dissect_NOKEY_DATA_FRAG(tvbuff_t *tvb, packet_info *pinfo, gint offs
/* * A C K N A C K * */
/* *********************************************************************** */
static void dissect_ACKNACK(tvbuff_t *tvb, packet_info *pinfo, gint offset, guint8 flags,
- const guint encoding, int octets_to_next_header, proto_tree *tree, proto_item *item) {
+ const guint encoding, int octets_to_next_header, proto_tree *tree,
+ proto_item *item, endpoint_guid *guid) {
/* RTPS 1.0/1.1:
* 0...2...........7...............15.............23...............31
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
@@ -7222,7 +7235,7 @@ static void dissect_ACKNACK(tvbuff_t *tvb, packet_info *pinfo, gint offset, guin
*/
gint original_offset; /* Offset to the readerEntityId */
proto_item *octet_item;
-
+ guint32 wid;
proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, ACKNACK_FLAGS, flags);
octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb, offset + 2, 2, encoding);
@@ -7242,8 +7255,10 @@ static void dissect_ACKNACK(tvbuff_t *tvb, packet_info *pinfo, gint offset, guin
/* writerEntityId */
rtps_util_add_entity_id(tree, tvb, offset, hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key,
- hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", NULL);
+ hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", &wid);
offset += 4;
+ guid->entity_id = wid;
+ rtps_util_topic_info_add_tree(tree, tvb, offset, guid);
/* Bitmap */
offset = rtps_util_add_bitmap(tree, tvb, offset, encoding, "readerSNState");
@@ -7337,7 +7352,8 @@ static void dissect_NACK_FRAG(tvbuff_t *tvb, packet_info *pinfo, gint offset, gu
/* * H E A R T B E A T * */
/* *********************************************************************** */
static void dissect_HEARTBEAT(tvbuff_t *tvb, packet_info *pinfo, gint offset, guint8 flags,
- const guint encoding, int octets_to_next_header, proto_tree *tree, guint16 version) {
+ const guint encoding, int octets_to_next_header, proto_tree *tree,
+ guint16 version, endpoint_guid *guid) {
/* RTPS 1.0/1.1:
* 0...2...........7...............15.............23...............31
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
@@ -7383,7 +7399,7 @@ static void dissect_HEARTBEAT(tvbuff_t *tvb, packet_info *pinfo, gint offset, gu
* +---------------+---------------+---------------+---------------+
*/
proto_item *octet_item;
-
+ guint32 wid;
proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, HEARTBEAT_FLAGS, flags);
octet_item = proto_tree_add_item(tree,
@@ -7411,8 +7427,10 @@ static void dissect_HEARTBEAT(tvbuff_t *tvb, packet_info *pinfo, gint offset, gu
/* writerEntityId */
rtps_util_add_entity_id(tree, tvb, offset, hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key,
- hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", NULL);
+ hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", &wid);
offset += 4;
+ guid->entity_id = wid;
+ rtps_util_topic_info_add_tree(tree, tvb, offset, guid);
/* First available Sequence Number */
rtps_util_add_seq_number(tree, tvb, offset, encoding, "firstAvailableSeqNumber");
@@ -7432,7 +7450,8 @@ static void dissect_HEARTBEAT(tvbuff_t *tvb, packet_info *pinfo, gint offset, gu
/* * H E A R T B E A T _ B A T C H * */
/* *********************************************************************** */
static void dissect_HEARTBEAT_BATCH(tvbuff_t *tvb, packet_info *pinfo, gint offset,
- guint8 flags, const guint encoding, int octets_to_next_header, proto_tree *tree) {
+ guint8 flags, const guint encoding, int octets_to_next_header,
+ proto_tree *tree, endpoint_guid *guid) {
/*
* 0...2...........7...............15.............23...............31
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
@@ -7462,7 +7481,7 @@ static void dissect_HEARTBEAT_BATCH(tvbuff_t *tvb, packet_info *pinfo, gint offs
* +---------------+---------------+---------------+---------------+
*/
proto_item *octet_item;
-
+ guint32 wid;
proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, HEARTBEAT_BATCH_FLAGS, flags);
octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb,
@@ -7487,8 +7506,10 @@ static void dissect_HEARTBEAT_BATCH(tvbuff_t *tvb, packet_info *pinfo, gint offs
/* writerEntityId */
rtps_util_add_entity_id(tree, tvb, offset, hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key,
- hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", NULL);
+ hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", &wid);
offset += 4;
+ guid->entity_id = wid;
+ rtps_util_topic_info_add_tree(tree, tvb, offset, guid);
/* First available Batch Sequence Number */
rtps_util_add_seq_number(tree, tvb, offset, encoding, "firstBatchSN");
@@ -7516,7 +7537,7 @@ static void dissect_HEARTBEAT_BATCH(tvbuff_t *tvb, packet_info *pinfo, gint offs
static void dissect_HEARTBEAT_VIRTUAL(tvbuff_t *tvb, packet_info *pinfo _U_, gint offset,
guint8 flags, const guint encoding, int octets_to_next_header, proto_tree *tree,
- guint16 vendor_id _U_) {
+ guint16 vendor_id _U_, endpoint_guid *guid) {
/*
* VIRTUAL_HB:
@@ -7589,7 +7610,7 @@ static void dissect_HEARTBEAT_VIRTUAL(tvbuff_t *tvb, packet_info *pinfo _U_, gin
* +---------------+---------------+---------------+---------------+
*/
- guint32 num_writers, num_virtual_guids;
+ guint32 num_writers, num_virtual_guids, wid;
gint writer_id_offset, virtual_guid_offset = 0, old_offset;
proto_item *octet_item, *ti;
@@ -7625,9 +7646,11 @@ static void dissect_HEARTBEAT_VIRTUAL(tvbuff_t *tvb, packet_info *pinfo _U_, gin
hf_rtps_sm_wrentity_id_kind,
ett_rtps_wrentity,
"writerEntityId",
- NULL);
+ &wid);
writer_id_offset = offset;
offset += 4;
+ guid->entity_id = wid;
+ rtps_util_topic_info_add_tree(tree, tvb, offset, guid);
/* virtualGUID */
if (!(flags & FLAG_VIRTUAL_HEARTBEAT_V) && !(flags & FLAG_VIRTUAL_HEARTBEAT_N)) {
@@ -7780,7 +7803,7 @@ static void dissect_HEARTBEAT_VIRTUAL(tvbuff_t *tvb, packet_info *pinfo _U_, gin
/* * H E A R T B E A T _ F R A G * */
/* *********************************************************************** */
static void dissect_HEARTBEAT_FRAG(tvbuff_t *tvb, packet_info *pinfo, gint offset, guint8 flags,
- const guint encoding, int octets_to_next_header, proto_tree *tree) {
+ const guint encoding, int octets_to_next_header, proto_tree *tree, endpoint_guid *guid) {
/*
* 0...2...........7...............15.............23...............31
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
@@ -7800,7 +7823,7 @@ static void dissect_HEARTBEAT_FRAG(tvbuff_t *tvb, packet_info *pinfo, gint offse
* +---------------+---------------+---------------+---------------+
*/
proto_item *octet_item;
-
+ guint32 wid;
proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, HEARTBEAT_FRAG_FLAGS, flags);
octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb,
@@ -7825,8 +7848,10 @@ static void dissect_HEARTBEAT_FRAG(tvbuff_t *tvb, packet_info *pinfo, gint offse
/* writerEntityId */
rtps_util_add_entity_id(tree, tvb, offset, hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key,
- hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", NULL);
+ hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", &wid);
offset += 4;
+ guid->entity_id = wid;
+ rtps_util_topic_info_add_tree(tree, tvb, offset, guid);
/* First available Sequence Number */
rtps_util_add_seq_number(tree, tvb, offset, encoding, "writerSeqNumber");
@@ -7847,7 +7872,7 @@ static void dissect_HEARTBEAT_FRAG(tvbuff_t *tvb, packet_info *pinfo, gint offse
/* *********************************************************************** */
static void dissect_RTPS_DATA(tvbuff_t *tvb, packet_info *pinfo, gint offset, guint8 flags,
guint encoding, int octets_to_next_header, proto_tree *tree,
- guint16 vendor_id, gboolean is_session, endpoint_guid * guid) {
+ guint16 vendor_id, gboolean is_session, endpoint_guid *guid) {
/*
*
* 0...2...........7...............15.............23...............31
@@ -7945,6 +7970,8 @@ static void dissect_RTPS_DATA(tvbuff_t *tvb, packet_info *pinfo, gint offset, gu
rtps_util_add_entity_id(tree, tvb, offset, hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key,
hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", &wid);
offset += 4;
+ guid->entity_id = wid;
+ rtps_util_topic_info_add_tree(tree, tvb, offset, guid);
/* Sequence number */
if (is_session) {
@@ -8178,7 +8205,6 @@ static void dissect_RTPS_DATA(tvbuff_t *tvb, packet_info *pinfo, gint offset, gu
from_builtin_writer =
(((wid & 0xc2) == 0xc2) || ((wid & 0xc3) == 0xc3)) ? TRUE : FALSE;
- guid->entity_id = wid;
/* At the end still dissect the rest of the bytes as raw data */
dissect_serialized_data(tree, pinfo, tvb, offset,
octets_to_next_header - (offset - old_offset) + 4,
@@ -8194,7 +8220,7 @@ static void dissect_RTPS_DATA(tvbuff_t *tvb, packet_info *pinfo, gint offset, gu
/* *********************************************************************** */
static void dissect_RTPS_DATA_FRAG(tvbuff_t *tvb, packet_info *pinfo, gint offset, guint8 flags,
const guint encoding, int octets_to_next_header, proto_tree *tree,
- guint16 vendor_id) {
+ guint16 vendor_id, endpoint_guid *guid) {
/*
*
* 0...2...........7...............15.............23...............31
@@ -8266,6 +8292,8 @@ static void dissect_RTPS_DATA_FRAG(tvbuff_t *tvb, packet_info *pinfo, gint offse
rtps_util_add_entity_id(tree, tvb, offset, hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key,
hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", &wid);
offset += 4;
+ guid->entity_id = wid;
+ rtps_util_topic_info_add_tree(tree, tvb, offset, guid);
/* Sequence number */
@@ -8317,7 +8345,7 @@ static void dissect_RTPS_DATA_FRAG(tvbuff_t *tvb, packet_info *pinfo, gint offse
/* *********************************************************************** */
static void dissect_RTPS_DATA_BATCH(tvbuff_t *tvb, packet_info *pinfo, gint offset,
guint8 flags, const guint encoding, int octets_to_next_header,
- proto_tree *tree, guint16 vendor_id, endpoint_guid * guid) {
+ proto_tree *tree, guint16 vendor_id, endpoint_guid *guid) {
/*
*
* 0...2...........7...............15.............23...............31
@@ -8438,8 +8466,9 @@ static void dissect_RTPS_DATA_BATCH(tvbuff_t *tvb, packet_info *pinfo, gint offs
/* writerEntityId */
rtps_util_add_entity_id(tree, tvb, offset, hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key,
hf_rtps_sm_wrentity_id_kind, ett_rtps_wrentity, "writerEntityId", &wid);
- guid->entity_id = wid;
offset += 4;
+ guid->entity_id = wid;
+ rtps_util_topic_info_add_tree(tree, tvb, offset, guid);
/* Batch sequence number */
@@ -8595,7 +8624,8 @@ static void dissect_RTPS_DATA_BATCH(tvbuff_t *tvb, packet_info *pinfo, gint offs
proto_tree_add_bytes_format(sil_tree, hf_rtps_serialized_key,
tvb, offset, sample_info_length[count], NULL, "serializedKey[%d]", count);
} else {
- if (!rtps_util_show_topic_info(sil_tree, pinfo, tvb, offset, guid, data)) {
+ if (!rtps_util_topic_info_add_column_info_and_try_dissector(
+ sil_tree, pinfo, tvb, offset, guid, data)) {
proto_tree_add_bytes_format(sil_tree, hf_rtps_serialized_data,
tvb, offset, sample_info_length[count], NULL, "serializedData[%d]", count);
}
@@ -8610,7 +8640,8 @@ static void dissect_RTPS_DATA_BATCH(tvbuff_t *tvb, packet_info *pinfo, gint offs
/* * G A P * */
/* *********************************************************************** */
static void dissect_GAP(tvbuff_t *tvb, packet_info *pinfo, gint offset,
- guint8 flags, const guint encoding, int octets_to_next_header, proto_tree *tree) {
+ guint8 flags, const guint encoding, int octets_to_next_header,
+ proto_tree *tree, endpoint_guid *guid) {
/* RTPS 1.0/1.1:
* 0...2...........7...............15.............23...............31
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
@@ -8648,7 +8679,7 @@ static void dissect_GAP(tvbuff_t *tvb, packet_info *pinfo, gint offset,
* +---------------+---------------+---------------+---------------+
*/
proto_item *octet_item;
-
+ guint32 wid;
proto_tree_add_bitmask_value(tree, tvb, offset + 1, hf_rtps_sm_flags, ett_rtps_flags, GAP_FLAGS, flags);
octet_item = proto_tree_add_item(tree, hf_rtps_sm_octets_to_next_header, tvb,
@@ -8670,8 +8701,10 @@ static void dissect_GAP(tvbuff_t *tvb, packet_info *pinfo, gint offset,
/* writerEntityId */
rtps_util_add_entity_id(tree, tvb, offset,
hf_rtps_sm_wrentity_id, hf_rtps_sm_wrentity_id_key, hf_rtps_sm_wrentity_id_kind,
- ett_rtps_wrentity, "writerEntityId", NULL);
+ ett_rtps_wrentity, "writerEntityId", &wid);
offset += 4;
+ guid->entity_id = wid;
+ rtps_util_topic_info_add_tree(tree, tvb, offset, guid);
/* First Sequence Number */
@@ -8899,7 +8932,8 @@ static void dissect_INFO_REPLY_IP4(tvbuff_t *tvb, packet_info *pinfo, gint offse
/* * I N F O _ D S T * */
/* *********************************************************************** */
static void dissect_INFO_DST(tvbuff_t *tvb, packet_info *pinfo, gint offset, guint8 flags,
- const guint encoding, int octets_to_next_header, proto_tree *tree, guint16 version) {
+ const guint encoding, int octets_to_next_header, proto_tree *tree,
+ guint16 version, endpoint_guid *dst_guid) {
/* RTPS 1.0/1.1:
* 0...2...........7...............15.............23...............31
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
@@ -8949,6 +8983,10 @@ static void dissect_INFO_DST(tvbuff_t *tvb, packet_info *pinfo, gint offset, gui
} else {
rtps_util_add_guid_prefix_v2(tree, tvb, offset, hf_rtps_guid_prefix_dst,
hf_rtps_host_id, hf_rtps_app_id, hf_rtps_sm_instance_id, hf_rtps_guid_prefix);
+
+ dst_guid->host_id = tvb_get_ntohl(tvb, offset);
+ dst_guid->app_id = tvb_get_ntohl(tvb, offset + 4);
+ dst_guid->instance_id = tvb_get_ntohl(tvb, offset + 8);
}
}
@@ -9174,15 +9212,17 @@ static void dissect_SECURE_POSTFIX(tvbuff_t *tvb, packet_info *pinfo _U_, gint o
proto_tree_add_item(sec_data_tag_tree, hf_rtps_secure_datatag_plugin_sec_tag, tvb,
offset, octets_to_next_header, encoding);
}
+
static gboolean dissect_rtps_submessage_v2(tvbuff_t *tvb, packet_info *pinfo, gint offset, guint8 flags,
const guint encoding, guint8 submessageId, guint16 vendor_id, gint octets_to_next_header,
proto_tree *rtps_submessage_tree, proto_item *submessage_item,
- endpoint_guid * guid)
+ endpoint_guid * guid, endpoint_guid * dst_guid)
{
switch (submessageId)
{
case SUBMESSAGE_DATA_FRAG:
- dissect_DATA_FRAG(tvb, pinfo, offset, flags, encoding, octets_to_next_header, rtps_submessage_tree, vendor_id);
+ dissect_DATA_FRAG(tvb, pinfo, offset, flags, encoding,
+ octets_to_next_header, rtps_submessage_tree, vendor_id, guid);
break;
case SUBMESSAGE_NOKEY_DATA_FRAG:
@@ -9195,7 +9235,8 @@ static gboolean dissect_rtps_submessage_v2(tvbuff_t *tvb, packet_info *pinfo, gi
case SUBMESSAGE_ACKNACK_SESSION:
case SUBMESSAGE_ACKNACK_BATCH:
- dissect_ACKNACK(tvb, pinfo, offset, flags, encoding, octets_to_next_header, rtps_submessage_tree, submessage_item);
+ dissect_ACKNACK(tvb, pinfo, offset, flags, encoding,
+ octets_to_next_header, rtps_submessage_tree, submessage_item, dst_guid);
break;
case SUBMESSAGE_APP_ACK:
@@ -9208,15 +9249,18 @@ static gboolean dissect_rtps_submessage_v2(tvbuff_t *tvb, packet_info *pinfo, gi
case SUBMESSAGE_HEARTBEAT_SESSION:
case SUBMESSAGE_HEARTBEAT_BATCH:
- dissect_HEARTBEAT_BATCH(tvb, pinfo, offset, flags, encoding, octets_to_next_header, rtps_submessage_tree);
+ dissect_HEARTBEAT_BATCH(tvb, pinfo, offset, flags, encoding,
+ octets_to_next_header, rtps_submessage_tree, guid);
break;
case SUBMESSAGE_HEARTBEAT_FRAG:
- dissect_HEARTBEAT_FRAG(tvb, pinfo, offset, flags, encoding, octets_to_next_header, rtps_submessage_tree);
+ dissect_HEARTBEAT_FRAG(tvb, pinfo, offset, flags, encoding,
+ octets_to_next_header, rtps_submessage_tree, guid);
break;
case SUBMESSAGE_HEARTBEAT_VIRTUAL:
- dissect_HEARTBEAT_VIRTUAL(tvb, pinfo, offset, flags, encoding, octets_to_next_header, rtps_submessage_tree, vendor_id);
+ dissect_HEARTBEAT_VIRTUAL(tvb, pinfo, offset, flags, encoding,
+ octets_to_next_header, rtps_submessage_tree, vendor_id, guid);
break;
case SUBMESSAGE_RTPS_DATA_SESSION:
@@ -9227,7 +9271,7 @@ static gboolean dissect_rtps_submessage_v2(tvbuff_t *tvb, packet_info *pinfo, gi
case SUBMESSAGE_RTPS_DATA_FRAG:
dissect_RTPS_DATA_FRAG(tvb, pinfo, offset, flags, encoding, octets_to_next_header,
- rtps_submessage_tree, vendor_id);
+ rtps_submessage_tree, vendor_id, guid);
break;
case SUBMESSAGE_RTPS_DATA_BATCH:
@@ -9265,7 +9309,7 @@ static gboolean dissect_rtps_submessage_v2(tvbuff_t *tvb, packet_info *pinfo, gi
static gboolean dissect_rtps_submessage_v1(tvbuff_t *tvb, packet_info *pinfo, gint offset, guint8 flags, const guint encoding,
guint8 submessageId, guint16 version, guint16 vendor_id, gint octets_to_next_header,
proto_tree *rtps_submessage_tree, proto_item *submessage_item,
- endpoint_guid * guid)
+ endpoint_guid * guid, endpoint_guid * dst_guid)
{
switch (submessageId)
{
@@ -9289,15 +9333,18 @@ static gboolean dissect_rtps_submessage_v1(tvbuff_t *tvb, packet_info *pinfo, gi
break;
case SUBMESSAGE_ACKNACK:
- dissect_ACKNACK(tvb, pinfo, offset, flags, encoding, octets_to_next_header, rtps_submessage_tree, submessage_item);
+ dissect_ACKNACK(tvb, pinfo, offset, flags, encoding,
+ octets_to_next_header, rtps_submessage_tree, submessage_item, dst_guid);
break;
case SUBMESSAGE_HEARTBEAT:
- dissect_HEARTBEAT(tvb, pinfo, offset, flags, encoding, octets_to_next_header, rtps_submessage_tree, version);
+ dissect_HEARTBEAT(tvb, pinfo, offset, flags, encoding,
+ octets_to_next_header, rtps_submessage_tree, version, guid);
break;
case SUBMESSAGE_GAP:
- dissect_GAP(tvb, pinfo, offset, flags, encoding, octets_to_next_header, rtps_submessage_tree);
+ dissect_GAP(tvb, pinfo, offset, flags, encoding,
+ octets_to_next_header, rtps_submessage_tree, guid);
break;
case SUBMESSAGE_INFO_TS:
@@ -9313,7 +9360,8 @@ static gboolean dissect_rtps_submessage_v1(tvbuff_t *tvb, packet_info *pinfo, gi
break;
case SUBMESSAGE_INFO_DST:
- dissect_INFO_DST(tvb, pinfo, offset, flags, encoding, octets_to_next_header, rtps_submessage_tree, version);
+ dissect_INFO_DST(tvb, pinfo, offset, flags, encoding,
+ octets_to_next_header, rtps_submessage_tree, version, dst_guid);
break;
case SUBMESSAGE_INFO_REPLY:
@@ -9342,6 +9390,7 @@ static gboolean dissect_rtps(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
int sub_hf;
const value_string *sub_vals;
endpoint_guid guid;
+ endpoint_guid dst_guid;
guint32 magic_number;
/* Check 'RTPS' signature:
* A header is invalid if it has less than 16 octets
@@ -9537,10 +9586,12 @@ static gboolean dissect_rtps(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
*/
if (!dissect_rtps_submessage_v1(tvb, pinfo, offset, flags, encoding,
submessageId, version, vendor_id,
- octets_to_next_header, rtps_submessage_tree, ti, &guid)) {
+ octets_to_next_header, rtps_submessage_tree,
+ ti, &guid, &dst_guid)) {
if ((version < 0x0200) ||
!dissect_rtps_submessage_v2(tvb, pinfo, offset, flags, encoding, submessageId,
- vendor_id, octets_to_next_header, rtps_submessage_tree, ti, &guid)) {
+ vendor_id, octets_to_next_header, rtps_submessage_tree,
+ ti, &guid, &dst_guid)) {
proto_tree_add_uint(rtps_submessage_tree, hf_rtps_sm_flags,
tvb, offset + 1, 1, flags);
proto_tree_add_uint(rtps_submessage_tree,