summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-moldudp64.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-moldudp64.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-moldudp64.c')
-rw-r--r--epan/dissectors/packet-moldudp64.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/epan/dissectors/packet-moldudp64.c b/epan/dissectors/packet-moldudp64.c
index 5126b65e..722e09b0 100644
--- a/epan/dissectors/packet-moldudp64.c
+++ b/epan/dissectors/packet-moldudp64.c
@@ -23,14 +23,14 @@ void proto_reg_handoff_moldudp64(void);
static dissector_handle_t moldudp64_handle;
/* Initialize the protocol and registered fields */
-static int proto_moldudp64 = -1;
-static int hf_moldudp64_session = -1;
-static int hf_moldudp64_sequence = -1;
-static int hf_moldudp64_count = -1;
-static int hf_moldudp64_msgblk = -1;
-static int hf_moldudp64_msglen = -1;
-static int hf_moldudp64_msgseq = -1;
-static int hf_moldudp64_msgdata = -1;
+static int proto_moldudp64;
+static int hf_moldudp64_session;
+static int hf_moldudp64_sequence;
+static int hf_moldudp64_count;
+static int hf_moldudp64_msgblk;
+static int hf_moldudp64_msglen;
+static int hf_moldudp64_msgseq;
+static int hf_moldudp64_msgdata;
#define MOLDUDP64_SESSION_LEN 10
#define MOLDUDP64_SEQUENCE_LEN 8
@@ -41,30 +41,30 @@ static int hf_moldudp64_msgdata = -1;
#define MOLDUDP64_ENDOFSESS 0xFFFF
/* Initialize the subtree pointers */
-static gint ett_moldudp64 = -1;
-static gint ett_moldudp64_msgblk = -1;
+static int ett_moldudp64;
+static int ett_moldudp64_msgblk;
-static expert_field ei_moldudp64_msglen_invalid = EI_INIT;
-static expert_field ei_moldudp64_end_of_session_extra = EI_INIT;
-static expert_field ei_moldudp64_count_invalid = EI_INIT;
-static expert_field ei_moldudp64_request = EI_INIT;
+static expert_field ei_moldudp64_msglen_invalid;
+static expert_field ei_moldudp64_end_of_session_extra;
+static expert_field ei_moldudp64_count_invalid;
+static expert_field ei_moldudp64_request;
static dissector_table_t moldudp64_payload_table;
-static void moldudp64_prompt(packet_info *pinfo _U_, gchar* result)
+static void moldudp64_prompt(packet_info *pinfo _U_, char* result)
{
snprintf(result, MAX_DECODE_AS_PROMPT_LEN, "Payload as");
}
/* Code to dissect a message block */
-static guint
+static unsigned
dissect_moldudp64_msgblk(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
- guint offset, guint64 sequence)
+ unsigned offset, uint64_t sequence)
{
proto_item *ti;
proto_tree *blk_tree;
- guint16 msglen, real_msglen, whole_len;
- gint remaining;
+ uint16_t msglen, real_msglen, whole_len;
+ int remaining;
tvbuff_t* next_tvb;
if (tvb_captured_length_remaining(tvb, offset) < MOLDUDP64_MSGLEN_LEN)
@@ -105,7 +105,7 @@ dissect_moldudp64_msgblk(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree,
offset += MOLDUDP64_MSGLEN_LEN;
next_tvb = tvb_new_subset_length(tvb, offset, real_msglen);
- if (!dissector_try_payload_new(moldudp64_payload_table, next_tvb, pinfo, tree, FALSE, NULL))
+ if (!dissector_try_payload_new(moldudp64_payload_table, next_tvb, pinfo, tree, false, NULL))
{
proto_tree_add_item(blk_tree, hf_moldudp64_msgdata, tvb, offset, real_msglen, ENC_NA);
}
@@ -119,9 +119,9 @@ dissect_moldudp64(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat
{
proto_item *ti;
proto_tree *moldudp64_tree;
- guint offset = 0;
- guint16 count, real_count = 0;
- guint64 sequence;
+ unsigned offset = 0;
+ uint16_t count, real_count = 0;
+ uint64_t sequence;
/* Check that there's enough data */
if (tvb_reported_length(tvb) < (MOLDUDP64_SESSION_LEN +
@@ -232,7 +232,7 @@ proto_register_moldudp64(void)
};
/* Setup protocol subtree array */
- static gint *ett[] = {
+ static int *ett[] = {
&ett_moldudp64,
&ett_moldudp64_msgblk
};