summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-artemis.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-artemis.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-artemis.c')
-rw-r--r--epan/dissectors/packet-artemis.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/epan/dissectors/packet-artemis.c b/epan/dissectors/packet-artemis.c
index 146b7360..938de327 100644
--- a/epan/dissectors/packet-artemis.c
+++ b/epan/dissectors/packet-artemis.c
@@ -21,31 +21,31 @@
#define ARTEMIS_PORT 5445 /* Not IANA registered */
-static int proto_artemis = -1;
+static int proto_artemis;
/* handles */
-static int hf_artemis_len = -1;
-static int hf_artemis_type = -1;
-static int hf_artemis_channel = -1;
-static int hf_artemis_buffer = -1;
+static int hf_artemis_len;
+static int hf_artemis_type;
+static int hf_artemis_channel;
+static int hf_artemis_buffer;
-static gint ett_artemis = -1;
+static int ett_artemis;
-static expert_field ei_artemis_len_short = EI_INIT;
+static expert_field ei_artemis_len_short;
-static dissector_handle_t artemis_tcp_handle = NULL;
+static dissector_handle_t artemis_tcp_handle;
void proto_register_artemis(void);
void proto_reg_handoff_artemis(void);
static int dissect_artemis(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree _U_, void *data _U_);
-static guint
+static unsigned
get_artemis_message_len(packet_info *pinfo _U_, tvbuff_t *tvb,
int offset, void *data _U_)
{
/* The 4bytes length doesn't include the actual length byte, that's why the "+4" */
- return (guint) tvb_get_ntohl(tvb, offset) + 4;
+ return (unsigned) tvb_get_ntohl(tvb, offset) + 4;
}
static int
@@ -54,7 +54,7 @@ dissect_artemis_frame(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
proto_item *ti, *len_item;
proto_tree *artemis_tree;
- guint32 length;
+ uint32_t length;
ti = proto_tree_add_item(tree, proto_artemis, tvb, 0, -1, ENC_NA);
artemis_tree = proto_item_add_subtree(ti, ett_artemis);
@@ -80,7 +80,7 @@ dissect_artemis(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree _U_, void *d
col_clear(pinfo->cinfo, COL_INFO);
/* fixed_len = 4(len) + 1(type) + 8(channel) */
- tcp_dissect_pdus(tvb, pinfo, tree, TRUE, 4, get_artemis_message_len,
+ tcp_dissect_pdus(tvb, pinfo, tree, true, 4, get_artemis_message_len,
dissect_artemis_frame, data);
return tvb_captured_length(tvb);
@@ -108,7 +108,7 @@ proto_register_artemis(void)
"Binary buffer", HFILL}}
};
- static gint *ett [] = {
+ static int *ett [] = {
&ett_artemis
};
@@ -131,12 +131,12 @@ proto_register_artemis(void)
void
proto_reg_handoff_artemis(void)
{
- static gboolean initialize = FALSE;
+ static bool initialize = false;
if (!initialize) {
/* Register TCP port for dissection */
dissector_add_uint_with_preference("tcp.port", ARTEMIS_PORT, artemis_tcp_handle);
- initialize = TRUE;
+ initialize = true;
}
}