summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-rdt.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:26 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:26 +0000
commitc4e8a3222648fcf22ca207f1815ebbf7cd144eeb (patch)
tree93d5c6aa93d9987680dd1adad5685e2ad698f223 /epan/dissectors/packet-rdt.c
parentAdding upstream version 4.2.6. (diff)
downloadwireshark-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-rdt.c')
-rw-r--r--epan/dissectors/packet-rdt.c386
1 files changed, 193 insertions, 193 deletions
diff --git a/epan/dissectors/packet-rdt.c b/epan/dissectors/packet-rdt.c
index 06be6a25..4c9a1635 100644
--- a/epan/dissectors/packet-rdt.c
+++ b/epan/dissectors/packet-rdt.c
@@ -29,127 +29,127 @@
static dissector_handle_t rdt_handle;
-static gint proto_rdt = -1;
+static int proto_rdt;
/* Packet fields */
-static gint hf_rdt_packet = -1;
+static int hf_rdt_packet;
/* flags1: shared */
-static gint hf_rdt_len_included = -1;
+static int hf_rdt_len_included;
/* flags1: data packet */
-static gint hf_rdt_data_flags1 = -1;
-static gint hf_rdt_data_need_reliable = -1;
-static gint hf_rdt_data_stream_id = -1;
-static gint hf_rdt_data_is_reliable = -1;
+static int hf_rdt_data_flags1;
+static int hf_rdt_data_need_reliable;
+static int hf_rdt_data_stream_id;
+static int hf_rdt_data_is_reliable;
/* flags2: data packet */
-static gint hf_rdt_data_flags2 = -1;
-static gint hf_rdt_data_backtoback = -1;
-static gint hf_rdt_data_slowdata = -1;
-static gint hf_rdt_data_asmrule = -1;
+static int hf_rdt_data_flags2;
+static int hf_rdt_data_backtoback;
+static int hf_rdt_data_slowdata;
+static int hf_rdt_data_asmrule;
/* flags1: asm action packet */
-static gint hf_rdt_aact_flags = -1;
-static gint hf_rdt_aact_stream_id = -1;
+static int hf_rdt_aact_flags;
+static int hf_rdt_aact_stream_id;
/* flags1: ack packet */
-static gint hf_rdt_ack_flags = -1;
-static gint hf_rdt_ack_lost_high = -1;
+static int hf_rdt_ack_flags;
+static int hf_rdt_ack_lost_high;
/* flags1: latency report packet */
-static gint hf_rdt_latency_report_flags = -1;
+static int hf_rdt_latency_report_flags;
/* flags1: bandwidth report packet */
-static gint hf_rdt_bandwidth_report_flags = -1;
+static int hf_rdt_bandwidth_report_flags;
/* flags1: stream end packet */
-static gint hf_rdt_stre_flags = -1;
-static gint hf_rdt_stre_need_reliable = -1;
-static gint hf_rdt_stre_stream_id = -1;
-static gint hf_rdt_stre_packet_sent = -1;
-static gint hf_rdt_stre_ext_flag = -1;
-
-/* static gint hf_rdt_rtt_request_flags = -1; */
-/* static gint hf_rdt_rtt_response_flags = -1; */
-/* static gint hf_rdt_congestion_flags = -1; */
-static gint hf_rdt_report_flags = -1;
-/* static gint hf_rdt_tirq_flags = -1; */
-static gint hf_rdt_tirp_flags = -1;
-static gint hf_rdt_bw_probing_flags = -1;
+static int hf_rdt_stre_flags;
+static int hf_rdt_stre_need_reliable;
+static int hf_rdt_stre_stream_id;
+static int hf_rdt_stre_packet_sent;
+static int hf_rdt_stre_ext_flag;
+
+/* static int hf_rdt_rtt_request_flags; */
+/* static int hf_rdt_rtt_response_flags; */
+/* static int hf_rdt_congestion_flags; */
+static int hf_rdt_report_flags;
+/* static int hf_rdt_tirq_flags; */
+static int hf_rdt_tirp_flags;
+static int hf_rdt_bw_probing_flags;
/* Octets 1-2: sequence number or packet type */
-static gint hf_rdt_sequence_number = -1;
-static gint hf_rdt_packet_type = -1;
+static int hf_rdt_sequence_number;
+static int hf_rdt_packet_type;
/* Only present if length_included */
-static gint hf_rdt_packet_length = -1;
+static int hf_rdt_packet_length;
/* General shared fields */
-static gint hf_rdt_timestamp = -1;
-static gint hf_rdt_stream_id_ex = -1;
-static gint hf_rdt_asmrule_ex = -1;
-static gint hf_rdt_total_reliable = -1;
-static gint hf_rdt_data = -1;
+static int hf_rdt_timestamp;
+static int hf_rdt_stream_id_ex;
+static int hf_rdt_asmrule_ex;
+static int hf_rdt_total_reliable;
+static int hf_rdt_data;
/* Special use fields */
-static gint hf_rdt_aact_reliable_seqno = -1;
-static gint hf_rdt_brpt_interval = -1;
-static gint hf_rdt_brpt_bandwidth = -1;
-static gint hf_rdt_brpt_sequence = -1;
-static gint hf_rdt_rtrp_ts_sec = -1;
-static gint hf_rdt_rtrp_ts_usec = -1;
-static gint hf_rdt_cong_xmit_mult = -1;
-static gint hf_rdt_cong_recv_mult = -1;
-static gint hf_rdt_stre_seqno = -1;
-static gint hf_rdt_stre_dummy_flags1 = -1;
-static gint hf_rdt_stre_dummy_type = -1;
-static gint hf_rdt_stre_reason_code = -1;
-static gint hf_rdt_lrpt_server_out_time = -1;
-static gint hf_rdt_tirq_request_rtt_info = -1;
-static gint hf_rdt_tirq_request_buffer_info = -1;
-static gint hf_rdt_tirq_request_time_msec = -1;
-static gint hf_rdt_tirp_has_rtt_info = -1;
-static gint hf_rdt_tirp_is_delayed = -1;
-static gint hf_rdt_tirp_has_buffer_info = -1;
-static gint hf_rdt_tirp_request_time_msec = -1;
-static gint hf_rdt_tirp_response_time_msec = -1;
-static gint hf_rdt_tirp_buffer_info = -1;
-static gint hf_rdt_tirp_buffer_info_count = -1;
-static gint hf_rdt_tirp_buffer_info_stream_id = -1;
-static gint hf_rdt_tirp_buffer_info_lowest_timestamp = -1;
-static gint hf_rdt_tirp_buffer_info_highest_timestamp = -1;
-static gint hf_rdt_tirp_buffer_info_bytes_buffered = -1;
-static gint hf_rdt_bwpp_seqno = -1;
-static gint hf_rdt_unk_flags1 = -1;
+static int hf_rdt_aact_reliable_seqno;
+static int hf_rdt_brpt_interval;
+static int hf_rdt_brpt_bandwidth;
+static int hf_rdt_brpt_sequence;
+static int hf_rdt_rtrp_ts_sec;
+static int hf_rdt_rtrp_ts_usec;
+static int hf_rdt_cong_xmit_mult;
+static int hf_rdt_cong_recv_mult;
+static int hf_rdt_stre_seqno;
+static int hf_rdt_stre_dummy_flags1;
+static int hf_rdt_stre_dummy_type;
+static int hf_rdt_stre_reason_code;
+static int hf_rdt_lrpt_server_out_time;
+static int hf_rdt_tirq_request_rtt_info;
+static int hf_rdt_tirq_request_buffer_info;
+static int hf_rdt_tirq_request_time_msec;
+static int hf_rdt_tirp_has_rtt_info;
+static int hf_rdt_tirp_is_delayed;
+static int hf_rdt_tirp_has_buffer_info;
+static int hf_rdt_tirp_request_time_msec;
+static int hf_rdt_tirp_response_time_msec;
+static int hf_rdt_tirp_buffer_info;
+static int hf_rdt_tirp_buffer_info_count;
+static int hf_rdt_tirp_buffer_info_stream_id;
+static int hf_rdt_tirp_buffer_info_lowest_timestamp;
+static int hf_rdt_tirp_buffer_info_highest_timestamp;
+static int hf_rdt_tirp_buffer_info_bytes_buffered;
+static int hf_rdt_bwpp_seqno;
+static int hf_rdt_unk_flags1;
/* RDT setup fields */
-static gint hf_rdt_setup = -1;
-static gint hf_rdt_setup_frame = -1;
-static gint hf_rdt_setup_method = -1;
-static gint hf_rdt_feature_level = -1;
+static int hf_rdt_setup;
+static int hf_rdt_setup_frame;
+static int hf_rdt_setup_method;
+static int hf_rdt_feature_level;
/* RDT fields defining a sub tree */
-static gint ett_rdt = -1;
-static gint ett_rdt_packet = -1;
-static gint ett_rdt_setup = -1;
-static gint ett_rdt_data_flags1 = -1;
-static gint ett_rdt_data_flags2 = -1;
-static gint ett_rdt_aact_flags = -1;
-static gint ett_rdt_ack_flags = -1;
-static gint ett_rdt_latency_report_flags = -1;
-static gint ett_rdt_bandwidth_report_flags = -1;
-static gint ett_rdt_stre_flags = -1;
-static gint ett_rdt_rtt_request_flags = -1;
-static gint ett_rdt_rtt_response_flags = -1;
-static gint ett_rdt_congestion_flags = -1;
-static gint ett_rdt_report_flags = -1;
-static gint ett_rdt_tirq_flags = -1;
-static gint ett_rdt_tirp_flags = -1;
-static gint ett_rdt_tirp_buffer_info = -1;
-static gint ett_rdt_bw_probing_flags = -1;
-
-static expert_field ei_rdt_packet_length = EI_INIT;
+static int ett_rdt;
+static int ett_rdt_packet;
+static int ett_rdt_setup;
+static int ett_rdt_data_flags1;
+static int ett_rdt_data_flags2;
+static int ett_rdt_aact_flags;
+static int ett_rdt_ack_flags;
+static int ett_rdt_latency_report_flags;
+static int ett_rdt_bandwidth_report_flags;
+static int ett_rdt_stre_flags;
+static int ett_rdt_rtt_request_flags;
+static int ett_rdt_rtt_response_flags;
+static int ett_rdt_congestion_flags;
+static int ett_rdt_report_flags;
+static int ett_rdt_tirq_flags;
+static int ett_rdt_tirp_flags;
+static int ett_rdt_tirp_buffer_info;
+static int ett_rdt_bw_probing_flags;
+
+static expert_field ei_rdt_packet_length;
#define RDT_UDP_PORT 6970
@@ -157,25 +157,25 @@ void proto_register_rdt(void);
void proto_reg_handoff_rdt(void);
/* Parse individual packet types */
-static guint dissect_rdt_data_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
-static guint dissect_rdt_asm_action_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
-static guint dissect_rdt_bandwidth_report_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
-static guint dissect_rdt_ack_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
-static guint dissect_rdt_rtt_request_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
-static guint dissect_rdt_rtt_response_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
-static guint dissect_rdt_congestion_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
-static guint dissect_rdt_stream_end_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
-static guint dissect_rdt_report_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
-static guint dissect_rdt_latency_report_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
-static guint dissect_rdt_transport_info_request_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
-static guint dissect_rdt_transport_info_response_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
-static guint dissect_rdt_bw_probing_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
-static guint dissect_rdt_unknown_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset);
+static unsigned dissect_rdt_data_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset);
+static unsigned dissect_rdt_asm_action_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset);
+static unsigned dissect_rdt_bandwidth_report_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset);
+static unsigned dissect_rdt_ack_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset);
+static unsigned dissect_rdt_rtt_request_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset);
+static unsigned dissect_rdt_rtt_response_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset);
+static unsigned dissect_rdt_congestion_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset);
+static unsigned dissect_rdt_stream_end_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset);
+static unsigned dissect_rdt_report_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset);
+static unsigned dissect_rdt_latency_report_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset);
+static unsigned dissect_rdt_transport_info_request_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset);
+static unsigned dissect_rdt_transport_info_response_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset);
+static unsigned dissect_rdt_bw_probing_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset);
+static unsigned dissect_rdt_unknown_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset);
static void show_setup_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
/* Preferences bool to control whether or not setup info should be shown */
-static gboolean global_rdt_show_setup_info = TRUE;
+static bool global_rdt_show_setup_info = true;
/* Packet types */
#define RDT_ASMACTIION_PACKET 0xff00
@@ -213,8 +213,8 @@ static const value_string packet_type_vals[] =
void rdt_add_address(packet_info *pinfo,
address *addr, int port,
int other_port,
- const gchar *setup_method,
- gint rdt_feature_level)
+ const char *setup_method,
+ int rdt_feature_level)
{
address null_addr;
conversation_t* p_conv;
@@ -239,7 +239,7 @@ void rdt_add_address(packet_info *pinfo,
if ( !p_conv || p_conv->setup_frame != pinfo->num)
{
p_conv = conversation_new(pinfo->num, addr, &null_addr, CONVERSATION_UDP,
- (guint32)port, (guint32)other_port,
+ (uint32_t)port, (uint32_t)other_port,
NO_ADDR2 | (!other_port ? NO_PORT2 : 0));
}
@@ -270,12 +270,12 @@ void rdt_add_address(packet_info *pinfo,
/****************************************************************************/
static int dissect_rdt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
- guint previous_offset = 0;
- gint offset = 0;
+ unsigned previous_offset = 0;
+ int offset = 0;
proto_item *ti;
proto_tree *rdt_tree = NULL;
proto_tree *rdt_packet_tree;
- guint16 packet_type;
+ uint16_t packet_type;
/* Set/clear columns */
col_set_str(pinfo->cinfo, COL_PROTOCOL, "RDT");
@@ -379,27 +379,27 @@ static int dissect_rdt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void
/************************************************/
/* Dissect a data packet */
-guint dissect_rdt_data_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+unsigned dissect_rdt_data_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset)
{
- guint start_offset = offset;
- guint16 packet_length;
- guint8 flags1;
- guint8 length_included_flag;
- guint8 need_reliable_flag;
- guint16 stream_id;
- guint16 sequence_number;
- guint8 is_reliable_flag;
- guint8 flags2;
- guint32 timestamp;
- guint16 asm_rule_number;
- guint8 back_to_back;
- guint8 slow_data;
+ unsigned start_offset = offset;
+ uint16_t packet_length;
+ uint8_t flags1;
+ uint8_t length_included_flag;
+ uint8_t need_reliable_flag;
+ uint16_t stream_id;
+ uint16_t sequence_number;
+ uint8_t is_reliable_flag;
+ uint8_t flags2;
+ uint32_t timestamp;
+ uint16_t asm_rule_number;
+ uint8_t back_to_back;
+ uint8_t slow_data;
proto_tree *flags_tree1;
proto_tree *flags_tree2;
proto_item *ti;
/* Flags in first byte */
- flags1 = tvb_get_guint8(tvb, offset);
+ flags1 = tvb_get_uint8(tvb, offset);
length_included_flag = (flags1 & 0x80) >> 7;
need_reliable_flag = (flags1 & 0x40) >> 6;
stream_id = (flags1 & 0x3e) >> 1;
@@ -442,7 +442,7 @@ guint dissect_rdt_data_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
}
/* More flags */
- flags2 = tvb_get_guint8(tvb, offset);
+ flags2 = tvb_get_uint8(tvb, offset);
back_to_back = (flags2 & 0x80) >> 7;
slow_data = (flags2 & 0x40) >> 6;
asm_rule_number = flags2 & 0x3f;
@@ -511,19 +511,19 @@ guint dissect_rdt_data_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre
}
/* Dissect an asm-action packet */
-guint dissect_rdt_asm_action_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+unsigned dissect_rdt_asm_action_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset)
{
- guint start_offset = offset;
- guint16 packet_length;
- guint8 flags1;
- guint8 length_included_flag;
- guint16 stream_id;
- guint16 rel_seqno;
+ unsigned start_offset = offset;
+ uint16_t packet_length;
+ uint8_t flags1;
+ uint8_t length_included_flag;
+ uint16_t stream_id;
+ uint16_t rel_seqno;
proto_tree *flags_tree;
proto_item *ti;
/* Flags in first byte */
- flags1 = tvb_get_guint8(tvb, offset);
+ flags1 = tvb_get_uint8(tvb, offset);
length_included_flag = (flags1 & 0x80) >> 7;
stream_id = (flags1 & 0x7c) >> 2;
@@ -589,17 +589,17 @@ guint dissect_rdt_asm_action_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tre
}
/* Dissect an bandwidth-report packet */
-guint dissect_rdt_bandwidth_report_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+unsigned dissect_rdt_bandwidth_report_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset)
{
- guint start_offset = offset;
- guint16 packet_length;
- guint8 flags1;
- guint8 length_included_flag;
+ unsigned start_offset = offset;
+ uint16_t packet_length;
+ uint8_t flags1;
+ uint8_t length_included_flag;
proto_tree *flags_tree;
proto_item *ti;
/* Flags in first byte */
- flags1 = tvb_get_guint8(tvb, offset);
+ flags1 = tvb_get_uint8(tvb, offset);
length_included_flag = (flags1 & 0x80) >> 7;
/* Create subtree for flags fields */
@@ -651,18 +651,18 @@ guint dissect_rdt_bandwidth_report_packet(tvbuff_t *tvb, packet_info *pinfo, pro
}
/* Dissect an ack packet */
-guint dissect_rdt_ack_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+unsigned dissect_rdt_ack_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset)
{
- guint start_offset = offset;
- guint16 packet_length;
- guint8 flags1;
- guint8 length_included_flag;
- guint8 lost_high_flag;
+ unsigned start_offset = offset;
+ uint16_t packet_length;
+ uint8_t flags1;
+ uint8_t length_included_flag;
+ uint8_t lost_high_flag;
proto_tree *flags_tree;
proto_item *ti;
/* Flags in first byte */
- flags1 = tvb_get_guint8(tvb, offset);
+ flags1 = tvb_get_uint8(tvb, offset);
length_included_flag = (flags1 & 0x80) >> 7;
lost_high_flag = (flags1 & 0x40) >> 6;
@@ -713,7 +713,7 @@ guint dissect_rdt_ack_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree
}
/* Dissect an att-request packet */
-guint dissect_rdt_rtt_request_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+unsigned dissect_rdt_rtt_request_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset)
{
/* Flags in first byte */
offset++;
@@ -728,7 +728,7 @@ guint dissect_rdt_rtt_request_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tr
}
/* Dissect an att-response packet */
-guint dissect_rdt_rtt_response_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+unsigned dissect_rdt_rtt_response_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset)
{
/* Flags in first byte */
offset++;
@@ -748,7 +748,7 @@ guint dissect_rdt_rtt_response_packet(tvbuff_t *tvb, packet_info *pinfo, proto_t
}
/* Dissect an congestion packet */
-guint dissect_rdt_congestion_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+unsigned dissect_rdt_congestion_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset)
{
/* Flags in first byte */
offset++;
@@ -768,18 +768,18 @@ guint dissect_rdt_congestion_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tre
}
/* Dissect an stream-end packet */
-guint dissect_rdt_stream_end_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+unsigned dissect_rdt_stream_end_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset)
{
- guint8 flags1;
- guint8 need_reliable;
- guint16 stream_id;
- guint8 packet_sent;
- guint8 ext_flag;
+ uint8_t flags1;
+ uint8_t need_reliable;
+ uint16_t stream_id;
+ uint8_t packet_sent;
+ uint8_t ext_flag;
proto_tree *flags_tree;
proto_item *ti;
/* Flags in first byte */
- flags1 = tvb_get_guint8(tvb, offset);
+ flags1 = tvb_get_uint8(tvb, offset);
need_reliable = (flags1 & 0x80) >> 7;
stream_id = (flags1 & 0x7c) >> 2;
packet_sent = (flags1 & 0x2) >> 1;
@@ -843,17 +843,17 @@ guint dissect_rdt_stream_end_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tre
}
/* Dissect an report packet */
-guint dissect_rdt_report_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+unsigned dissect_rdt_report_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset)
{
- guint start_offset = offset;
- guint16 packet_length;
- guint8 flags1;
- guint8 length_included_flag;
+ unsigned start_offset = offset;
+ uint16_t packet_length;
+ uint8_t flags1;
+ uint8_t length_included_flag;
proto_tree *flags_tree;
proto_item *ti;
/* Flags in first byte */
- flags1 = tvb_get_guint8(tvb, offset);
+ flags1 = tvb_get_uint8(tvb, offset);
length_included_flag = (flags1 & 0x80) >> 7;
/* Create subtree for flags fields */
@@ -901,18 +901,18 @@ guint dissect_rdt_report_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *t
}
/* Dissect an latency-report packet */
-guint dissect_rdt_latency_report_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+unsigned dissect_rdt_latency_report_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset)
{
- guint start_offset = offset;
- guint16 packet_length;
- guint8 flags1;
- guint8 length_included_flag;
- guint32 server_out_time;
+ unsigned start_offset = offset;
+ uint16_t packet_length;
+ uint8_t flags1;
+ uint8_t length_included_flag;
+ uint32_t server_out_time;
proto_tree *flags_tree;
proto_item *ti;
/* Flags in first byte */
- flags1 = tvb_get_guint8(tvb, offset);
+ flags1 = tvb_get_uint8(tvb, offset);
length_included_flag = (flags1 & 0x80) >> 7;
/* Create subtree for flags fields */
@@ -961,16 +961,16 @@ guint dissect_rdt_latency_report_packet(tvbuff_t *tvb, packet_info *pinfo, proto
}
/* Dissect a transport-info packet */
-guint dissect_rdt_transport_info_request_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+unsigned dissect_rdt_transport_info_request_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset)
{
- guint8 flags1;
- guint8 request_rtt_info_flag;
- guint8 request_buffer_info_flag;
+ uint8_t flags1;
+ uint8_t request_rtt_info_flag;
+ uint8_t request_buffer_info_flag;
proto_tree *flags_tree;
proto_item *ti;
/* Flags in first byte */
- flags1 = tvb_get_guint8(tvb, offset);
+ flags1 = tvb_get_uint8(tvb, offset);
request_rtt_info_flag = (flags1 & 0x2) >> 1;
request_buffer_info_flag = (flags1 & 0x01);
@@ -1002,17 +1002,17 @@ guint dissect_rdt_transport_info_request_packet(tvbuff_t *tvb, packet_info *pinf
}
/* Dissect an transport-info-response packet */
-guint dissect_rdt_transport_info_response_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+unsigned dissect_rdt_transport_info_response_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset)
{
- guint8 flags1;
- guint8 has_rtt_info;
- guint8 is_delayed;
- guint8 has_buffer_info;
+ uint8_t flags1;
+ uint8_t has_rtt_info;
+ uint8_t is_delayed;
+ uint8_t has_buffer_info;
proto_tree *flags_tree;
proto_item *ti;
/* Flags in first byte */
- flags1 = tvb_get_guint8(tvb, offset);
+ flags1 = tvb_get_uint8(tvb, offset);
has_rtt_info = (flags1 & 0x4) >> 2;
is_delayed = (flags1 & 0x2) >> 1;
has_buffer_info = (flags1 & 0x1);
@@ -1051,10 +1051,10 @@ guint dissect_rdt_transport_info_response_packet(tvbuff_t *tvb, packet_info *pin
/* Buffer info */
if (has_buffer_info)
{
- guint16 n;
+ uint16_t n;
/* Read number of buffers */
- guint16 buffer_info_count = tvb_get_ntohs(tvb, offset);
+ uint16_t buffer_info_count = tvb_get_ntohs(tvb, offset);
proto_tree_add_item(tree, hf_rdt_tirp_buffer_info_count, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
@@ -1091,17 +1091,17 @@ guint dissect_rdt_transport_info_response_packet(tvbuff_t *tvb, packet_info *pin
}
/* Dissect a bw-probing packet */
-guint dissect_rdt_bw_probing_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+unsigned dissect_rdt_bw_probing_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset)
{
- guint start_offset = offset;
- guint16 packet_length;
- guint8 flags1;
- guint8 length_included_flag;
+ unsigned start_offset = offset;
+ uint16_t packet_length;
+ uint8_t flags1;
+ uint8_t length_included_flag;
proto_tree *flags_tree;
proto_item *ti;
/* Flags in first byte */
- flags1 = tvb_get_guint8(tvb, offset);
+ flags1 = tvb_get_uint8(tvb, offset);
length_included_flag = (flags1 & 0x80) >> 7;
/* Create subtree for flags fields */
@@ -1151,7 +1151,7 @@ guint dissect_rdt_bw_probing_packet(tvbuff_t *tvb, packet_info *pinfo, proto_tre
}
/* Dissect an unknown control packet */
-guint dissect_rdt_unknown_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint offset)
+unsigned dissect_rdt_unknown_control(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, unsigned offset)
{
/* Flags in first byte */
proto_tree_add_item(tree, hf_rdt_unk_flags1, tvb, offset, 1, ENC_BIG_ENDIAN);
@@ -2076,7 +2076,7 @@ void proto_register_rdt(void)
},
};
- static gint *ett[] =
+ static int *ett[] =
{
&ett_rdt,
&ett_rdt_packet,