summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-rtitcp.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:33 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:33 +0000
commit9f153fbfec0fb9c9ce38e749a7c6f4a5e115d4e9 (patch)
tree2784370cda9bbf2da9114d70f05399c0b229d28c /epan/dissectors/packet-rtitcp.c
parentAdding debian version 4.2.6-1. (diff)
downloadwireshark-9f153fbfec0fb9c9ce38e749a7c6f4a5e115d4e9.tar.xz
wireshark-9f153fbfec0fb9c9ce38e749a7c6f4a5e115d4e9.zip
Merging upstream version 4.4.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'epan/dissectors/packet-rtitcp.c')
-rw-r--r--epan/dissectors/packet-rtitcp.c263
1 files changed, 133 insertions, 130 deletions
diff --git a/epan/dissectors/packet-rtitcp.c b/epan/dissectors/packet-rtitcp.c
index 0615b4f2..6b449255 100644
--- a/epan/dissectors/packet-rtitcp.c
+++ b/epan/dissectors/packet-rtitcp.c
@@ -124,38 +124,38 @@ void proto_reg_handoff_rtitcp(void);
void proto_register_rtitcp(void);
/* Initialize the protocol and registered fields */
-static gint proto_rtitcp = -1;
-static gint hf_rtitcp_header_control_byte = -1;
-static gint hf_rtitcp_header_magic_number = -1;
-static gint hf_rtitcp_header_message_length = -1;
-static gint hf_rtitcp_control_transaction_id = -1;
-static gint hf_rtitcp_control_kind = -1;
-static gint hf_rtitcp_control_attribute_type = -1;
-static gint hf_rtitcp_control_attribute_length = -1;
-static gint hf_rtitcp_control_attribute_port = -1;
-static gint hf_rtitcp_attributes_list_length = -1;
-static gint hf_rtitcp_control_magic_cookie = -1;
-static gint hf_rtitcp_control_attribute_connection_cookie = -1;
-static gint hf_rtitcp_control_attribute_connection_type = -1;
-static gint hf_rtitcp_control_attribute_session_id = -1;
-static gint hf_rtitcp_control_attribute_error_code_value = -1;
-static gint hf_rtitcp_control_attribute_error_code_description = -1;
-static gint hf_rtitcp_locator_ipv4 = -1;
-static gint hf_rtitcp_locator_port = -1;
-static gint hf_rtitcp_locator_ipv6 = -1;
-static gint hf_rtitcp_locator_kind = -1;
-static gint hf_rtitcp_crc_magic_cookie = -1;
-static gint hf_rtitcp_control_crc_value = -1;
-
-static gint hf_rtitcp_response_in = -1;
-static gint hf_rtitcp_response_to = -1;
-static gint hf_rtitcp_response_time = -1;
+static int proto_rtitcp;
+static int hf_rtitcp_header_control_byte;
+static int hf_rtitcp_header_magic_number;
+static int hf_rtitcp_header_message_length;
+static int hf_rtitcp_control_transaction_id;
+static int hf_rtitcp_control_kind;
+static int hf_rtitcp_control_attribute_type;
+static int hf_rtitcp_control_attribute_length;
+static int hf_rtitcp_control_attribute_port;
+static int hf_rtitcp_attributes_list_length;
+static int hf_rtitcp_control_magic_cookie;
+static int hf_rtitcp_control_attribute_connection_cookie;
+static int hf_rtitcp_control_attribute_connection_type;
+static int hf_rtitcp_control_attribute_session_id;
+static int hf_rtitcp_control_attribute_error_code_value;
+static int hf_rtitcp_control_attribute_error_code_description;
+static int hf_rtitcp_locator_ipv4;
+static int hf_rtitcp_locator_port;
+static int hf_rtitcp_locator_ipv6;
+static int hf_rtitcp_locator_kind;
+static int hf_rtitcp_crc_magic_cookie;
+static int hf_rtitcp_control_crc_value;
+
+static int hf_rtitcp_response_in;
+static int hf_rtitcp_response_to;
+static int hf_rtitcp_response_time;
#define RTITCP_FLAG_NOT_REQUEST 0x0100
typedef struct _rtitcp_transaction_t {
- guint32 req_frame;
- guint32 rep_frame;
+ uint32_t req_frame;
+ uint32_t rep_frame;
nstime_t req_time;
} rtitcp_transaction_t;
@@ -164,13 +164,13 @@ typedef struct _rtitcp_conv_info_t {
} rtitcp_conv_info_t;
/* Subtree pointers */
-static gint ett_rtitcp = -1;
-static gint ett_rtitcp_signalling_protocol = -1;
-static gint ett_rtitcp_message = -1;
-static gint ett_rtitcp_attributes_list = -1;
-static gint ett_rtitcp_attribute = -1;
+static int ett_rtitcp;
+static int ett_rtitcp_signalling_protocol;
+static int ett_rtitcp_message;
+static int ett_rtitcp_attributes_list;
+static int ett_rtitcp_attribute;
-static header_field_info *hfi_rtitcp = NULL;
+static header_field_info *hfi_rtitcp;
static heur_dissector_list_t heur_subdissector_list;
static const value_string ctrl_message_types_vals[] = {
@@ -259,18 +259,18 @@ static const value_string rtitcp_attribute_connection_type_vals[] = {
};
static void rtitcp_util_add_error_attribute(proto_tree *attribute, tvbuff_t* tvb,
- gint offset, guint size) {
+ int offset, unsigned size) {
proto_tree_add_item(attribute, hf_rtitcp_control_attribute_error_code_value, tvb, offset, 4, ENC_BIG_ENDIAN);
proto_tree_add_item(attribute, hf_rtitcp_control_attribute_error_code_description, tvb, offset + 4,
size - 4, ENC_ASCII);
}
static void rtitcp_util_add_locator_t(proto_tree *tree, packet_info *pinfo _U_, tvbuff_t * tvb,
- gint offset, gboolean little_endian,
- proto_item * rtitcp_message, gboolean * first_attribute) {
- gint32 kind;
- guint16 port;
- kind = tvb_get_guint16(tvb, offset+8, little_endian ? ENC_LITTLE_ENDIAN : ENC_BIG_ENDIAN);
+ int offset, bool little_endian,
+ proto_item * rtitcp_message, bool * first_attribute) {
+ int32_t kind;
+ uint16_t port;
+ kind = tvb_get_uint16(tvb, offset+8, little_endian ? ENC_LITTLE_ENDIAN : ENC_BIG_ENDIAN);
if (kind == 0xFFFF) {
kind = LOCATOR_KIND_IPV4;
@@ -283,7 +283,7 @@ static void rtitcp_util_add_locator_t(proto_tree *tree, packet_info *pinfo _U_,
proto_tree_add_item(tree, hf_rtitcp_locator_port, tvb, offset+10, 2, ENC_BIG_ENDIAN);
proto_tree_add_item(tree, hf_rtitcp_locator_ipv4, tvb, offset+12, 4, ENC_BIG_ENDIAN);
- port = tvb_get_guint16(tvb, offset+10, little_endian ? ENC_LITTLE_ENDIAN : ENC_BIG_ENDIAN);
+ port = tvb_get_uint16(tvb, offset+10, little_endian ? ENC_LITTLE_ENDIAN : ENC_BIG_ENDIAN);
if (*first_attribute) {
proto_item_append_text(rtitcp_message," (");
col_append_str(pinfo->cinfo, COL_INFO, " (");
@@ -305,16 +305,16 @@ static void rtitcp_util_add_locator_t(proto_tree *tree, packet_info *pinfo _U_,
}
}
-static guint dissect_attribute(tvbuff_t *tvb, packet_info *pinfo,
- proto_tree *attributes_list, guint offset, guint attributes_list_offset,
- proto_item * rtitcp_message, gboolean * first_attribute) {
+static unsigned dissect_attribute(tvbuff_t *tvb, packet_info *pinfo,
+ proto_tree *attributes_list, unsigned offset, unsigned attributes_list_offset,
+ proto_item * rtitcp_message, bool * first_attribute) {
- guint16 attribute_length, attribute_type;
- guint padding;
+ uint16_t attribute_length, attribute_type;
+ unsigned padding;
proto_item *attribute;
- attribute_type = tvb_get_guint16(tvb, attributes_list_offset+offset, ENC_BIG_ENDIAN);
- attribute_length = tvb_get_guint16(tvb, attributes_list_offset+offset+2, ENC_BIG_ENDIAN);
+ attribute_type = tvb_get_uint16(tvb, attributes_list_offset+offset, ENC_BIG_ENDIAN);
+ attribute_length = tvb_get_uint16(tvb, attributes_list_offset+offset+2, ENC_BIG_ENDIAN);
attribute = proto_tree_add_subtree_format(attributes_list, tvb,
attributes_list_offset+offset, attribute_length+4,
@@ -328,8 +328,8 @@ static guint dissect_attribute(tvbuff_t *tvb, packet_info *pinfo,
switch (attribute_type) {
case RTPS_LOCATOR_PORT_ATTRIBUTE_TYPE: {
- guint32 port;
- port = tvb_get_guint32(tvb, attributes_list_offset+offset+4, ENC_BIG_ENDIAN);
+ uint32_t port;
+ port = tvb_get_uint32(tvb, attributes_list_offset+offset+4, ENC_BIG_ENDIAN);
if (*first_attribute) {
proto_item_append_text(rtitcp_message," (");
col_append_str(pinfo->cinfo, COL_INFO, " (");
@@ -338,7 +338,7 @@ static guint dissect_attribute(tvbuff_t *tvb, packet_info *pinfo,
*first_attribute ? "" : ", ", port);
col_append_fstr(pinfo->cinfo, COL_INFO, "%s%u",
*first_attribute ? "" : ", ", port);
- (*first_attribute) = FALSE;
+ (*first_attribute) = false;
proto_item_append_text(attribute, " (Port = %u)", port);
proto_tree_add_item(attribute, hf_rtitcp_control_attribute_port, tvb,
attributes_list_offset+offset+4, attribute_length, ENC_BIG_ENDIAN);
@@ -347,7 +347,7 @@ static guint dissect_attribute(tvbuff_t *tvb, packet_info *pinfo,
case RTPS_LOCATOR_ADDRESS_ATTRIBUTE_TYPE: {
rtitcp_util_add_locator_t(attribute, pinfo, tvb, attributes_list_offset+offset+4,
ENC_BIG_ENDIAN, rtitcp_message, first_attribute);
- (*first_attribute) = FALSE;
+ (*first_attribute) = false;
break;
}
@@ -364,11 +364,11 @@ static guint dissect_attribute(tvbuff_t *tvb, packet_info *pinfo,
col_append_fstr(pinfo->cinfo, COL_INFO, "%s%s",
(*first_attribute) ? "" : ", ",
tvb_bytes_to_str(pinfo->pool, tvb, attributes_list_offset+offset+4, 16));
- (*first_attribute) = FALSE;
+ (*first_attribute) = false;
break;
}
case CONNECTION_TYPE_ATTRIBUTE_TYPE: {
- guint8 attribute_connection_type = tvb_get_guint8(tvb, attributes_list_offset+offset+4);
+ uint8_t attribute_connection_type = tvb_get_uint8(tvb, attributes_list_offset+offset+4);
proto_tree_add_item(attribute, hf_rtitcp_control_attribute_connection_type, tvb,
attributes_list_offset+offset+4, attribute_length, ENC_BIG_ENDIAN);
if (*first_attribute) {
@@ -381,7 +381,7 @@ static guint dissect_attribute(tvbuff_t *tvb, packet_info *pinfo,
col_append_fstr(pinfo->cinfo, COL_INFO, "%s%s",
(*first_attribute) ? "" : ", ",
val_to_str_const(attribute_connection_type, rtitcp_attribute_connection_type_vals, "Unknown attribute"));
- (*first_attribute) = FALSE;
+ (*first_attribute) = false;
break;
}
case SESSION_ID_ATTRIBUTE_TYPE: {
@@ -400,8 +400,8 @@ static guint dissect_attribute(tvbuff_t *tvb, packet_info *pinfo,
padding = (4 - attribute_length%4)%4;
return (attribute_length+padding+4);
}
-static proto_tree* print_header(proto_tree *tree, proto_tree *rtitcp_message, tvbuff_t *tvb, guint offset,
- guint16 msg_length, gboolean printCRC, gboolean is_data) {
+static proto_tree* print_header(proto_tree *tree, proto_tree *rtitcp_message, tvbuff_t *tvb, unsigned offset,
+ uint16_t msg_length, bool printCRC, bool is_data) {
proto_item *ti;
if (is_data) {
@@ -412,11 +412,11 @@ static proto_tree* print_header(proto_tree *tree, proto_tree *rtitcp_message, tv
ett_rtitcp_message, NULL, "RTI TCP Control Message");
}
if (is_data) {
- guint32 msg_length32;
+ uint32_t msg_length32;
proto_tree_add_item(rtitcp_message, hf_rtitcp_header_control_byte, tvb, offset, 1, ENC_BIG_ENDIAN);
ti = proto_tree_add_item(rtitcp_message, hf_rtitcp_header_message_length,
tvb, offset+1, 3, ENC_BIG_ENDIAN);
- msg_length32 = tvb_get_guint32(tvb, offset, ENC_BIG_ENDIAN);
+ msg_length32 = tvb_get_uint32(tvb, offset, ENC_BIG_ENDIAN);
msg_length32 = msg_length32 % NUMBER_2E30;
proto_item_set_text(ti,"RTI TCP Message Length: %d", msg_length32);
} else {
@@ -431,8 +431,8 @@ static proto_tree* print_header(proto_tree *tree, proto_tree *rtitcp_message, tv
return rtitcp_message;
}
-static guint16 dissect_control_message(proto_tree *rtitcp_tree, tvbuff_t *tvb, packet_info *pinfo,
- guint offset) {
+static uint16_t dissect_control_message(proto_tree *rtitcp_tree, tvbuff_t *tvb, packet_info *pinfo,
+ unsigned offset) {
/* 0...2...........7...............15.............23...............31
* +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
@@ -456,26 +456,26 @@ static guint16 dissect_control_message(proto_tree *rtitcp_tree, tvbuff_t *tvb, p
* +---------------+---------------+---------------+---------------+ --------------------------------*/
proto_tree *attributes_list, *rtitcp_message = NULL;
- guint16 msg_length, control_message_kind, attributes_list_length, header_length;
- guint attributes_list_offset, attribute_offset, offset_header = offset;
- guint attributes_count;
- gboolean is_data = FALSE, printCRC = FALSE, first_attribute;
- gchar * transaction_id_str;
- guint64 seq_num;
+ uint16_t msg_length, control_message_kind, attributes_list_length, header_length;
+ unsigned attributes_list_offset, attribute_offset, offset_header = offset;
+ unsigned attributes_count;
+ bool is_data = false, printCRC = false, first_attribute;
+ char * transaction_id_str;
+ uint64_t seq_num;
conversation_t *conversation;
rtitcp_conv_info_t *rtitcp_info;
rtitcp_transaction_t *rtitcp_trans;
- guint64 * conversation_info_key = NULL;
+ uint64_t * conversation_info_key = NULL;
/* The header length is 8 if it doesn't contain optional fields */
header_length = 8;
- msg_length = tvb_get_guint16(tvb, offset+2, ENC_BIG_ENDIAN);
+ msg_length = tvb_get_uint16(tvb, offset+2, ENC_BIG_ENDIAN);
offset += 8;
/* Check if CRC is present */
if (tvb_get_ntohl(tvb, offset) == RTITCP_CRC_MAGIC_NUMBER) {
- printCRC = TRUE;
+ printCRC = true;
header_length += 8;
offset += 8; /* Because of 0xCRC32 + actual CRC (4 bytes) */
}
@@ -484,7 +484,7 @@ static guint16 dissect_control_message(proto_tree *rtitcp_tree, tvbuff_t *tvb, p
rtitcp_message = print_header(rtitcp_tree, rtitcp_message, tvb, offset_header, msg_length + header_length, printCRC, is_data);
/* Check the control message kind */
- control_message_kind = tvb_get_guint16(tvb, offset, ENC_BIG_ENDIAN);
+ control_message_kind = tvb_get_uint16(tvb, offset, ENC_BIG_ENDIAN);
col_append_sep_str(pinfo->cinfo, COL_INFO, ", ",
val_to_str_const(control_message_kind,ctrl_message_types_vals, "Unknown control message"));
proto_tree_add_uint(rtitcp_message, hf_rtitcp_control_kind, tvb, offset, 2, control_message_kind);
@@ -493,7 +493,7 @@ static guint16 dissect_control_message(proto_tree *rtitcp_tree, tvbuff_t *tvb, p
offset += 2;
/* Take the length in bytes of the attributes list */
- attributes_list_length = tvb_get_guint16(tvb, offset, ENC_BIG_ENDIAN);
+ attributes_list_length = tvb_get_uint16(tvb, offset, ENC_BIG_ENDIAN);
proto_tree_add_item(rtitcp_message, hf_rtitcp_attributes_list_length, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
@@ -536,7 +536,7 @@ static guint16 dissect_control_message(proto_tree *rtitcp_tree, tvbuff_t *tvb, p
rtitcp_trans->req_frame = pinfo->num;
rtitcp_trans->rep_frame = 0;
rtitcp_trans->req_time = pinfo->abs_ts;
- conversation_info_key = wmem_new0(wmem_file_scope(), guint64);
+ conversation_info_key = wmem_new0(wmem_file_scope(), uint64_t);
*conversation_info_key = seq_num;
wmem_map_insert(rtitcp_info->pdus, conversation_info_key, (void *)rtitcp_trans);
} else {
@@ -592,7 +592,7 @@ static guint16 dissect_control_message(proto_tree *rtitcp_tree, tvbuff_t *tvb, p
ett_rtitcp_attributes_list, NULL, "Attributes List");
attributes_count = 0;
- first_attribute = TRUE;
+ first_attribute = true;
while (attributes_list_offset < attributes_list_length) {
++attributes_count;
attribute_offset = dissect_attribute(tvb, pinfo, attributes_list,
@@ -614,10 +614,10 @@ static guint16 dissect_control_message(proto_tree *rtitcp_tree, tvbuff_t *tvb, p
}
/* This function dissects all the control messages found */
-static guint dissect_rtitcp_control_protocol(proto_tree *rtitcp_tree, tvbuff_t *tvb, packet_info *pinfo) {
- guint offset;
- guint16 msg_length;
- guint32 tvb_len;
+static unsigned dissect_rtitcp_control_protocol(proto_tree *rtitcp_tree, tvbuff_t *tvb, packet_info *pinfo) {
+ unsigned offset;
+ uint16_t msg_length;
+ uint32_t tvb_len;
offset = 0;
tvb_len = tvb_reported_length(tvb);
@@ -630,7 +630,7 @@ static guint dissect_rtitcp_control_protocol(proto_tree *rtitcp_tree, tvbuff_t *
return offset;
}
-static gint dissect_rtitcp_common(tvbuff_t *tvb, packet_info *pinfo,
+static int dissect_rtitcp_common(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void *data _U_) {
/* FORMAT OF THE CONTROL MESSAGE
@@ -658,10 +658,10 @@ static gint dissect_rtitcp_common(tvbuff_t *tvb, packet_info *pinfo,
proto_item *ti;
proto_tree *rtitcp_tree, *rtitcp_message = NULL;
- guint offset, offset_header;
- guint16 rtitcp_msg_length, header_length;
- guint32 tvb_len, rtitcp_rtps_msg_length;
- gboolean printCRC = FALSE, is_data = FALSE;
+ unsigned offset, offset_header;
+ uint16_t rtitcp_msg_length, header_length;
+ uint32_t tvb_len, rtitcp_rtps_msg_length;
+ bool printCRC = false, is_data = false;
tvbuff_t *next_tvb;
heur_dtbl_entry_t *hdtbl_entry;
@@ -671,7 +671,7 @@ static gint dissect_rtitcp_common(tvbuff_t *tvb, packet_info *pinfo,
/* From this point, we can consider that this is a RTI TCP message */
col_set_str(pinfo->cinfo, COL_PROTOCOL, "RTI-TCP");
- rtitcp_msg_length = tvb_get_guint16(tvb, offset+2, ENC_BIG_ENDIAN);
+ rtitcp_msg_length = tvb_get_uint16(tvb, offset+2, ENC_BIG_ENDIAN);
ti = proto_tree_add_item(tree, proto_rtitcp, tvb, offset, -1, ENC_NA);
rtitcp_tree = proto_item_add_subtree(ti, ett_rtitcp);
@@ -684,7 +684,7 @@ static gint dissect_rtitcp_common(tvbuff_t *tvb, packet_info *pinfo,
/* if bytes 8 to 12 are RTITCP_CRC_MAGIC_NUMBER, we got a CRC */
if (tvb_get_ntohl(tvb, offset) == RTITCP_CRC_MAGIC_NUMBER) {
- printCRC = TRUE; /* To specify later that CRC must be printed */
+ printCRC = true; /* To specify later that CRC must be printed */
header_length += 8; /* header increases in 8 bytes */
offset += 8; /* Because of 0xCRC32 + actual CRC (4 bytes) */
}
@@ -697,16 +697,16 @@ static gint dissect_rtitcp_common(tvbuff_t *tvb, packet_info *pinfo,
/* IMPORTANT NOTE: We assume always one RTPS message per RTITCP message */
/* If the TCP layer has provided us with garbage at the end of the buffer,
process only the length specified by rtitcp_msg_length */
- if (tvb_len > (guint32)(rtitcp_msg_length + header_length)) {
+ if (tvb_len > (uint32_t)(rtitcp_msg_length + header_length)) {
tvb_set_reported_length(tvb, (rtitcp_msg_length + header_length));
}
/* When we encapsulate RTPS, packet length is given by the 30 less
significant bits of the first four bytes */
- rtitcp_rtps_msg_length = tvb_get_guint32(tvb, 0, ENC_BIG_ENDIAN);
+ rtitcp_rtps_msg_length = tvb_get_uint32(tvb, 0, ENC_BIG_ENDIAN);
rtitcp_rtps_msg_length = rtitcp_rtps_msg_length % NUMBER_2E30;
/* Add RTI TCP Data Message subtree and print header */
- is_data = TRUE;
+ is_data = true;
rtitcp_message = print_header(rtitcp_tree, rtitcp_message, tvb, offset_header,
rtitcp_rtps_msg_length + header_length, printCRC, is_data);
@@ -723,14 +723,14 @@ static gint dissect_rtitcp_common(tvbuff_t *tvb, packet_info *pinfo,
}
}
-static guint get_rtitcp_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb,
- gint offset, void * data _U_) {
- guint16 plen;
- guint16 header_length = 8;
+static unsigned get_rtitcp_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb,
+ int offset, void * data _U_) {
+ uint16_t plen;
+ uint16_t header_length = 8;
/*
* Get the length of the RTITCP packet.
*/
- plen = tvb_get_guint16(tvb, offset+2, ENC_BIG_ENDIAN);
+ plen = tvb_get_uint16(tvb, offset+2, ENC_BIG_ENDIAN);
/*
* That length doesn't include the header field itself; add that in.
*/
@@ -743,10 +743,10 @@ static guint get_rtitcp_pdu_len(packet_info *pinfo _U_, tvbuff_t *tvb,
return plen + header_length;
}
-static gint dissect_rtitcp(tvbuff_t *tvb, packet_info *pinfo,
+static int dissect_rtitcp(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree, void *data _U_) {
- gboolean desegmentation = TRUE;
+ bool desegmentation = true;
if (tvb_captured_length(tvb) < 8)
return 0;
@@ -764,6 +764,11 @@ static gint dissect_rtitcp(tvbuff_t *tvb, packet_info *pinfo,
}
+static bool
+dissect_rtitcp_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
+{
+ return dissect_rtitcp(tvb, pinfo, tree, data) > 0;
+}
/* Register the protocol with Wireshark.
*
@@ -781,25 +786,25 @@ proto_register_rtitcp(void)
{ &hf_rtitcp_header_control_byte, {
"Control Byte", "rtitcp.header.control_byte",
FT_UINT16, BASE_HEX, NULL, 0,
- 0, HFILL }
+ NULL, HFILL }
},
{ &hf_rtitcp_header_message_length, {
"Message Length", "rtitcp.header.message_length",
FT_UINT16, BASE_DEC, NULL, 0,
- 0, HFILL }
+ NULL, HFILL }
},
{ &hf_rtitcp_header_magic_number, {
"Magic Cookie", "rtitcp.header.magic_cookie",
FT_UINT32, BASE_HEX, NULL, 0,
- 0, HFILL }
+ NULL, HFILL }
},
{ &hf_rtitcp_crc_magic_cookie, {
"CRC Magic Cookie", "rtitcp.header.crc_magic_cookie",
FT_UINT32, BASE_HEX, NULL, 0,
- 0, HFILL }
+ NULL, HFILL }
},
{ &hf_rtitcp_control_kind,
@@ -811,19 +816,19 @@ proto_register_rtitcp(void)
{ &hf_rtitcp_control_magic_cookie, {
"Control Magic Cookie", "rtitcp.control.magic_cookie",
FT_UINT32, BASE_HEX, NULL, 0,
- 0, HFILL }
+ NULL, HFILL }
},
{ &hf_rtitcp_control_transaction_id, {
"Transaction ID", "rtitcp.control.transaction_id",
FT_BYTES, BASE_NONE, NULL, 0,
- 0, HFILL }
+ NULL, HFILL }
},
{ &hf_rtitcp_control_attribute_session_id, {
"Session ID", "rtitcp.control.attribute.session_id",
FT_BYTES, BASE_NONE, NULL, 0,
- 0, HFILL }
+ NULL, HFILL }
},
{ &hf_rtitcp_control_attribute_type,
@@ -841,38 +846,37 @@ proto_register_rtitcp(void)
{ &hf_rtitcp_control_attribute_error_code_description, {
"Description", "rtitcp.control.attribute.error_code.description",
FT_STRING, BASE_NONE, NULL, 0,
- 0, HFILL }
+ NULL, HFILL }
},
{ &hf_rtitcp_control_attribute_connection_cookie, {
"Connection Cookie", "rtitcp.control.attribute.connection_cookie",
FT_BYTES, BASE_NONE, NULL, 0,
- 0, HFILL }
+ NULL, HFILL }
},
{ &hf_rtitcp_control_attribute_connection_type, {
"Class ID", "rtitcp.control_attribute.connection_type",
FT_UINT8, BASE_HEX, VALS(rtitcp_attribute_connection_type_vals), 0,
- 0, HFILL }
+ NULL, HFILL }
},
{ &hf_rtitcp_attributes_list_length, {
"Attributes list length", "rtitcp.attributes_list_length",
FT_UINT16, BASE_DEC, NULL, 0,
- 0,
- HFILL }
+ NULL, HFILL }
},
{ &hf_rtitcp_control_attribute_length, {
"Attribute Length", "rtitcp.control.attribute.length",
FT_UINT16, BASE_DEC, NULL, 0,
- 0, HFILL }
+ NULL, HFILL }
},
{ &hf_rtitcp_control_attribute_port, {
"Port", "rtitcp.control.attribute_port",
FT_UINT32, BASE_DEC, NULL, 0,
- 0, HFILL }
+ NULL, HFILL }
},
{ &hf_rtitcp_locator_kind,
@@ -899,33 +903,32 @@ proto_register_rtitcp(void)
NULL, HFILL }
},
- { &hf_rtitcp_control_crc_value, {
- "CRC", "rtitcp.control.crc",
- FT_UINT32, BASE_HEX, NULL, 0,
- 0, HFILL }
- },
-
- { &hf_rtitcp_response_in, {
- "Response In", "rtitcp.response_in",
- FT_FRAMENUM, BASE_NONE, NULL, 0x0,
- "The response to this RTITCP request is in this frame", HFILL }
+ { &hf_rtitcp_control_crc_value,
+ { "CRC", "rtitcp.control.crc",
+ FT_UINT32, BASE_HEX, NULL, 0,
+ NULL, HFILL }
},
- { &hf_rtitcp_response_to, {
- "Request In", "rtitcp.response_to",
- FT_FRAMENUM, BASE_NONE, NULL, 0x0,
- "This is a response to the RTITCP request in this frame", HFILL }
+ { &hf_rtitcp_response_in,
+ { "Response In", "rtitcp.response_in",
+ FT_FRAMENUM, BASE_NONE, NULL, 0x0,
+ "The response to this RTITCP request is in this frame", HFILL }
},
- { &hf_rtitcp_response_time, {
- "Response Time", "rtitcp.response_time",
- FT_RELATIVE_TIME, BASE_NONE, NULL, 0x0,
- "The time between the Request and the Reply", HFILL }
+ { &hf_rtitcp_response_to,
+ { "Request In", "rtitcp.response_to",
+ FT_FRAMENUM, BASE_NONE, NULL, 0x0,
+ "This is a response to the RTITCP request in this frame", HFILL }
},
+ { &hf_rtitcp_response_time,
+ { "Response Time", "rtitcp.response_time",
+ FT_RELATIVE_TIME, BASE_NONE, NULL, 0x0,
+ "The time between the Request and the Reply", HFILL }
+ }
};
- static gint *ett[] = {
+ static int *ett[] = {
&ett_rtitcp,
&ett_rtitcp_signalling_protocol,
&ett_rtitcp_message,
@@ -950,7 +953,7 @@ proto_register_rtitcp(void)
expert_register_field_array(expert_rtitcp, ei, array_length(ei)); */
register_dissector("rtitcp", dissect_rtitcp, proto_rtitcp);
- heur_subdissector_list = register_heur_dissector_list("rtitcp", proto_rtitcp);
+ heur_subdissector_list = register_heur_dissector_list_with_description("rtitcp", "RTI TCP signalling message", proto_rtitcp);
}
@@ -959,7 +962,7 @@ proto_register_rtitcp(void)
void
proto_reg_handoff_rtitcp(void)
{
- heur_dissector_add("tcp", dissect_rtitcp, "RTI TCP Layer" , "rtitcp", proto_rtitcp, HEURISTIC_ENABLE);
+ heur_dissector_add("tcp", dissect_rtitcp_heur, "RTI TCP Layer" , "rtitcp", proto_rtitcp, HEURISTIC_ENABLE);
}
/*