forked from osmocom/wireshark
RTPS: Added PT PID parameters and infrastructure to dissect
Before, the dissector didn't have any code path to dissect the PT discovery parameters. The code path necessary as well as the parameter definitions have been added. Change-Id: I17665a56d033ffbfd16d47fe2e7374111aff9530 Reviewed-on: https://code.wireshark.org/review/14804 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:
parent
22a2821df2
commit
f494298d37
2 changed files with 168 additions and 0 deletions
|
@ -129,6 +129,7 @@ static int hf_rtps_parameter_id = -1;
|
|||
static int hf_rtps_parameter_id_v2 = -1;
|
||||
static int hf_rtps_parameter_id_toc = -1;
|
||||
static int hf_rtps_parameter_id_rti = -1;
|
||||
static int hf_rtps_parameter_id_pt = -1;
|
||||
static int hf_rtps_parameter_length = -1;
|
||||
static int hf_rtps_param_topic_name = -1;
|
||||
static int hf_rtps_param_strength = -1;
|
||||
|
@ -779,6 +780,35 @@ static const value_string parameter_id_toc_vals[] = {
|
|||
{ 0, NULL }
|
||||
};
|
||||
|
||||
static const value_string parameter_id_pt_vals[] = {
|
||||
/* Vendor specific: Prismtech */
|
||||
{ PID_PRISMTECH_WRITER_INFO, "PID_PRISMTECH_WRITER_INFO" },
|
||||
{ PID_PRISMTECH_READER_DATA_LIFECYCLE, "PID_PRISMTECH_READER_DATA_LIFECYCLE" },
|
||||
{ PID_PRISMTECH_WRITER_DATA_LIFECYCLE, "PID_PRISMTECH_WRITER_DATA_LIFECYCLE" },
|
||||
{ PID_PRISMTECH_ENDPOINT_GUID, "PID_PRISMTECH_ENDPOINT_GUID" },
|
||||
{ PID_PRISMTECH_SYNCHRONOUS_ENDPOINT, "PID_PRISMTECH_SYNCHRONOUS_ENDPOINT" },
|
||||
{ PID_PRISMTECH_RELAXED_QOS_MATCHING, "PID_PRISMTECH_RELAXED_QOS_MATCHING" },
|
||||
{ PID_PRISMTECH_PARTICIPANT_VERSION_INFO, "PID_PRISMTECH_PARTICIPANT_VERSION_INFO" },
|
||||
{ PID_PRISMTECH_NODE_NAME, "PID_PRISMTECH_NODE_NAME" },
|
||||
{ PID_PRISMTECH_EXEC_NAME, "PID_PRISMTECH_EXEC_NAME" },
|
||||
{ PID_PRISMTECH_PROCESS_ID, "PID_PRISMTECH_PROCESS_ID" },
|
||||
{ PID_PRISMTECH_SERVICE_TYPE, "PID_PRISMTECH_SERVICE_TYPE" },
|
||||
{ PID_PRISMTECH_ENTITY_FACTORY, "PID_PRISMTECH_ENTITY_FACTORY" },
|
||||
{ PID_PRISMTECH_WATCHDOG_SCHEDULING, "PID_PRISMTECH_WATCHDOG_SCHEDULING" },
|
||||
{ PID_PRISMTECH_LISTENER_SCHEDULING, "PID_PRISMTECH_LISTENER_SCHEDULING" },
|
||||
{ PID_PRISMTECH_SUBSCRIPTION_KEYS, "PID_PRISMTECH_SUBSCRIPTION_KEYS" },
|
||||
{ PID_PRISMTECH_READER_LIFESPAN, "PID_PRISMTECH_READER_LIFESPAN" },
|
||||
{ PID_PRISMTECH_SHARE, "PID_PRISMTECH_SHARE" },
|
||||
{ PID_PRISMTECH_TYPE_DESCRIPTION, "PID_PRISMTECH_TYPE_DESCRIPTION" },
|
||||
{ PID_PRISMTECH_LAN_ID, "PID_PRISMTECH_LAN_ID" },
|
||||
{ PID_PRISMTECH_ENDPOINT_GID, "PID_PRISMTECH_ENDPOINT_GID" },
|
||||
{ PID_PRISMTECH_GROUP_GID, "PID_PRISMTECH_GROUP_GID" },
|
||||
{ PID_PRISMTECH_EOTINFO, "PID_PRISMTECH_EOTINFO" },
|
||||
{ PID_PRISMTECH_PART_CERT_NAME, "PID_PRISMTECH_PART_CERT_NAME" },
|
||||
{ PID_PRISMTECH_LAN_CERT_NAME, "PID_PRISMTECH_LAN_CERT_NAME" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
static const value_string liveliness_qos_vals[] = {
|
||||
{ LIVELINESS_AUTOMATIC, "AUTOMATIC_LIVELINESS_QOS" },
|
||||
{ LIVELINESS_BY_PARTICIPANT, "MANUAL_BY_PARTICIPANT_LIVELINESS_QOS" },
|
||||
|
@ -3459,6 +3489,92 @@ static gboolean dissect_parameter_sequence_toc(proto_tree *rtps_parameter_tree,
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean dissect_parameter_sequence_pt(proto_tree *rtps_parameter_tree _U_, packet_info *pinfo _U_,
|
||||
tvbuff_t *tvb _U_, proto_item *parameter_item _U_, proto_item *param_len_item _U_, gint offset _U_,
|
||||
gboolean little_endian _U_, int param_length _U_,
|
||||
guint16 parameter) {
|
||||
|
||||
switch(parameter) {
|
||||
|
||||
case PID_PRISMTECH_WRITER_INFO: {
|
||||
break;
|
||||
}
|
||||
case PID_PRISMTECH_READER_DATA_LIFECYCLE: {
|
||||
break;
|
||||
}
|
||||
case PID_PRISMTECH_WRITER_DATA_LIFECYCLE: {
|
||||
break;
|
||||
}
|
||||
case PID_PRISMTECH_ENDPOINT_GUID: {
|
||||
break;
|
||||
}
|
||||
case PID_PRISMTECH_SYNCHRONOUS_ENDPOINT: {
|
||||
break;
|
||||
}
|
||||
case PID_PRISMTECH_RELAXED_QOS_MATCHING: {
|
||||
break;
|
||||
}
|
||||
case PID_PRISMTECH_PARTICIPANT_VERSION_INFO: {
|
||||
break;
|
||||
}
|
||||
case PID_PRISMTECH_NODE_NAME: {
|
||||
break;
|
||||
}
|
||||
case PID_PRISMTECH_EXEC_NAME: {
|
||||
break;
|
||||
}
|
||||
case PID_PRISMTECH_PROCESS_ID: {
|
||||
break;
|
||||
}
|
||||
case PID_PRISMTECH_SERVICE_TYPE: {
|
||||
break;
|
||||
}
|
||||
case PID_PRISMTECH_ENTITY_FACTORY: {
|
||||
break;
|
||||
}
|
||||
case PID_PRISMTECH_WATCHDOG_SCHEDULING: {
|
||||
break;
|
||||
}
|
||||
case PID_PRISMTECH_LISTENER_SCHEDULING: {
|
||||
break;
|
||||
}
|
||||
case PID_PRISMTECH_SUBSCRIPTION_KEYS: {
|
||||
break;
|
||||
}
|
||||
case PID_PRISMTECH_READER_LIFESPAN: {
|
||||
break;
|
||||
}
|
||||
case PID_PRISMTECH_SHARE: {
|
||||
break;
|
||||
}
|
||||
case PID_PRISMTECH_TYPE_DESCRIPTION: {
|
||||
break;
|
||||
}
|
||||
case PID_PRISMTECH_LAN_ID: {
|
||||
break;
|
||||
}
|
||||
case PID_PRISMTECH_ENDPOINT_GID: {
|
||||
break;
|
||||
}
|
||||
case PID_PRISMTECH_GROUP_GID: {
|
||||
break;
|
||||
}
|
||||
case PID_PRISMTECH_EOTINFO: {
|
||||
break;
|
||||
}
|
||||
case PID_PRISMTECH_PART_CERT_NAME: {
|
||||
break;
|
||||
}
|
||||
case PID_PRISMTECH_LAN_CERT_NAME: {
|
||||
break;
|
||||
}
|
||||
default:
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
static gboolean dissect_parameter_sequence_v1(proto_tree *rtps_parameter_tree, packet_info *pinfo, tvbuff_t *tvb,
|
||||
proto_item *parameter_item, proto_item * param_len_item, gint offset,
|
||||
gboolean little_endian, int size, int param_length,
|
||||
|
@ -4732,6 +4848,16 @@ static gint dissect_parameter_sequence(proto_tree *tree, packet_info *pinfo, tvb
|
|||
break;
|
||||
}
|
||||
}
|
||||
case RTPS_VENDOR_PT_DDS: {
|
||||
param_name = try_val_to_str(parameter, parameter_id_pt_vals);
|
||||
if (param_name != NULL) {
|
||||
rtps_parameter_tree = proto_tree_add_subtree(rtps_parameter_sequence_tree, tvb, offset, -1,
|
||||
ett_rtps_parameter, ¶m_item, val_to_str(parameter, parameter_id_pt_vals, "Unknown (0x%04x)"));
|
||||
|
||||
proto_tree_add_uint(rtps_parameter_tree, hf_rtps_parameter_id_pt, tvb, offset, 2, parameter);
|
||||
break;
|
||||
}
|
||||
}
|
||||
default: {
|
||||
rtps_parameter_tree = proto_tree_add_subtree(rtps_parameter_sequence_tree, tvb, offset, -1,
|
||||
ett_rtps_parameter, ¶m_item, val_to_str(parameter, parameter_id_v2_vals, "Unknown (0x%04x)"));
|
||||
|
@ -4777,6 +4903,11 @@ static gint dissect_parameter_sequence(proto_tree *tree, packet_info *pinfo, tvb
|
|||
param_item, param_len_item, offset, little_endian, param_length, parameter);
|
||||
break;
|
||||
}
|
||||
case RTPS_VENDOR_PT_DDS: {
|
||||
dissect_return_value = dissect_parameter_sequence_pt(rtps_parameter_tree, pinfo, tvb,
|
||||
param_item, param_len_item, offset, little_endian, param_length, parameter);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -8519,6 +8650,17 @@ void proto_register_rtps(void) {
|
|||
HFILL }
|
||||
},
|
||||
|
||||
{ &hf_rtps_parameter_id_pt, {
|
||||
"parameterId",
|
||||
"rtps.param.id",
|
||||
FT_UINT16,
|
||||
BASE_HEX,
|
||||
VALS(parameter_id_pt_vals),
|
||||
0,
|
||||
"Parameter Id",
|
||||
HFILL }
|
||||
},
|
||||
|
||||
/* Parameter Length ---------------------------------------------------- */
|
||||
{ &hf_rtps_parameter_length, {
|
||||
"parameterLength",
|
||||
|
|
|
@ -272,6 +272,32 @@ typedef struct _rtps_dissector_data {
|
|||
#define PID_EXTENDED (0x3f01)
|
||||
#define PID_LIST_END (0x3f02)
|
||||
|
||||
/* Vendor-specific: PT */
|
||||
#define PID_PRISMTECH_WRITER_INFO (0x8001)
|
||||
#define PID_PRISMTECH_READER_DATA_LIFECYCLE (0x8002)
|
||||
#define PID_PRISMTECH_WRITER_DATA_LIFECYCLE (0x8003)
|
||||
#define PID_PRISMTECH_ENDPOINT_GUID (0x8004)
|
||||
#define PID_PRISMTECH_SYNCHRONOUS_ENDPOINT (0x8005)
|
||||
#define PID_PRISMTECH_RELAXED_QOS_MATCHING (0x8006)
|
||||
#define PID_PRISMTECH_PARTICIPANT_VERSION_INFO (0x8007)
|
||||
#define PID_PRISMTECH_NODE_NAME (0x8008)
|
||||
#define PID_PRISMTECH_EXEC_NAME (0x8009)
|
||||
#define PID_PRISMTECH_PROCESS_ID (0x800a)
|
||||
#define PID_PRISMTECH_SERVICE_TYPE (0x800b)
|
||||
#define PID_PRISMTECH_ENTITY_FACTORY (0x800c)
|
||||
#define PID_PRISMTECH_WATCHDOG_SCHEDULING (0x800d)
|
||||
#define PID_PRISMTECH_LISTENER_SCHEDULING (0x800e)
|
||||
#define PID_PRISMTECH_SUBSCRIPTION_KEYS (0x800f)
|
||||
#define PID_PRISMTECH_READER_LIFESPAN (0x8010)
|
||||
#define PID_PRISMTECH_SHARE (0x8011)
|
||||
#define PID_PRISMTECH_TYPE_DESCRIPTION (0x8012)
|
||||
#define PID_PRISMTECH_LAN_ID (0x8013)
|
||||
#define PID_PRISMTECH_ENDPOINT_GID (0x8014)
|
||||
#define PID_PRISMTECH_GROUP_GID (0x8015)
|
||||
#define PID_PRISMTECH_EOTINFO (0x8016)
|
||||
#define PID_PRISMTECH_PART_CERT_NAME (0x8017)
|
||||
#define PID_PRISMTECH_LAN_CERT_NAME (0x8018)
|
||||
|
||||
/* appId.appKind possible values */
|
||||
#define APPKIND_UNKNOWN (0x00)
|
||||
#define APPKIND_MANAGED_APPLICATION (0x01)
|
||||
|
|
Loading…
Reference in a new issue