diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:14:26 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:14:26 +0000 |
commit | c4e8a3222648fcf22ca207f1815ebbf7cd144eeb (patch) | |
tree | 93d5c6aa93d9987680dd1adad5685e2ad698f223 /epan/dissectors/packet-rtcdc.c | |
parent | Adding upstream version 4.2.6. (diff) | |
download | wireshark-upstream.tar.xz wireshark-upstream.zip |
Adding upstream version 4.4.0.upstream/4.4.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'epan/dissectors/packet-rtcdc.c')
-rw-r--r-- | epan/dissectors/packet-rtcdc.c | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/epan/dissectors/packet-rtcdc.c b/epan/dissectors/packet-rtcdc.c index 88681d1e..4fd64069 100644 --- a/epan/dissectors/packet-rtcdc.c +++ b/epan/dissectors/packet-rtcdc.c @@ -30,34 +30,34 @@ void proto_reg_handoff_rtcdc(void); static dissector_handle_t rtcdc_handle; /* Initialize the protocol and registered fields */ -static int proto_rtcdc = -1; -static int hf_message_type = -1; -static int hf_channel_type = -1; -static int hf_flags = -1; -static int hf_flags_reserved = -1; -static int hf_unordered_allowed = -1; -static int hf_reliability = -1; -static int hf_priority = -1; -static int hf_label = -1; -static int hf_error = -1; -static int hf_sid = -1; -static int hf_new_channel_type = -1; -static int hf_new_reliability = -1; -static int hf_new_priority = -1; -static int hf_new_label_length = -1; -static int hf_new_protocol_length = -1; -static int hf_new_label = -1; -static int hf_new_protocol = -1; +static int proto_rtcdc; +static int hf_message_type; +static int hf_channel_type; +static int hf_flags; +static int hf_flags_reserved; +static int hf_unordered_allowed; +static int hf_reliability; +static int hf_priority; +static int hf_label; +static int hf_error; +static int hf_sid; +static int hf_new_channel_type; +static int hf_new_reliability; +static int hf_new_priority; +static int hf_new_label_length; +static int hf_new_protocol_length; +static int hf_new_label; +static int hf_new_protocol; /* Initialize the subtree pointers */ -static gint ett_rtcdc = -1; -static gint ett_flags = -1; +static int ett_rtcdc; +static int ett_flags; -static expert_field ei_rtcdc_new_reliability_non_zero = EI_INIT; -static expert_field ei_rtcdc_message_type_unknown = EI_INIT; -static expert_field ei_rtcdc_inconsistent_label_and_parameter_length = EI_INIT; -static expert_field ei_rtcdc_message_too_long = EI_INIT; -static expert_field ei_rtcdc_new_channel_type = EI_INIT; +static expert_field ei_rtcdc_new_reliability_non_zero; +static expert_field ei_rtcdc_message_type_unknown; +static expert_field ei_rtcdc_inconsistent_label_and_parameter_length; +static expert_field ei_rtcdc_message_too_long; +static expert_field ei_rtcdc_new_channel_type; #define DATA_CHANNEL_OPEN_REQUEST 0x00 #define DATA_CHANNEL_OPEN_RESPONSE 0x01 @@ -173,7 +173,7 @@ static const value_string new_channel_type_values[] = { #define NEW_RELIABILITY_LENGTH 4 #define NEW_LABEL_LENGTH_LENGTH 2 #define NEW_PROTOCOL_LENGTH_LENGTH 2 -#define NEW_OPEN_REQUEST_HEADER_LENGTH (guint)(NEW_MESSAGE_TYPE_LENGTH + \ +#define NEW_OPEN_REQUEST_HEADER_LENGTH (unsigned)(NEW_MESSAGE_TYPE_LENGTH + \ NEW_CHANNEL_TYPE_LENGTH + \ NEW_PRIORITY_LENGTH + \ NEW_RELIABILITY_LENGTH + \ @@ -191,12 +191,12 @@ static const value_string new_channel_type_values[] = { static void dissect_new_open_request_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *rtcdc_tree, proto_item *rtcdc_item) { - guint8 channel_type; - guint32 reliability; - guint16 label_length; - guint16 protocol_length; + uint8_t channel_type; + uint32_t reliability; + uint16_t label_length; + uint16_t protocol_length; - channel_type = tvb_get_guint8(tvb, NEW_CHANNEL_TYPE_OFFSET); + channel_type = tvb_get_uint8(tvb, NEW_CHANNEL_TYPE_OFFSET); if ((channel_type & 0x7f) > 0x02) { expert_add_info(pinfo, rtcdc_item, &ei_rtcdc_new_channel_type); } @@ -206,7 +206,7 @@ dissect_new_open_request_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree * } label_length = tvb_get_ntohs(tvb, NEW_LABEL_LENGTH_OFFSET); protocol_length = tvb_get_ntohs(tvb, NEW_PROTOCOL_LENGTH_OFFSET); - if (NEW_OPEN_REQUEST_HEADER_LENGTH + (guint)label_length + (guint)protocol_length != tvb_reported_length(tvb)) { + if (NEW_OPEN_REQUEST_HEADER_LENGTH + (unsigned)label_length + (unsigned)protocol_length != tvb_reported_length(tvb)) { expert_add_info(pinfo, rtcdc_item, &ei_rtcdc_inconsistent_label_and_parameter_length); } if (rtcdc_tree) { @@ -226,9 +226,9 @@ dissect_rtcdc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U { proto_item *rtcdc_item, *msg_item; proto_tree *rtcdc_tree; - guint8 message_type; + uint8_t message_type; - message_type = tvb_get_guint8(tvb, MESSAGE_TYPE_OFFSET); + message_type = tvb_get_uint8(tvb, MESSAGE_TYPE_OFFSET); col_set_str(pinfo->cinfo, COL_PROTOCOL, "RTCDC"); col_add_fstr(pinfo->cinfo, COL_INFO, "%s ", val_to_str_const(message_type, message_type_values, "reserved")); @@ -348,7 +348,7 @@ proto_register_rtcdc(void) NULL, HFILL } } }; - static gint *ett[] = { + static int *ett[] = { &ett_rtcdc, &ett_flags }; |