summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-llt.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-llt.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-llt.c')
-rw-r--r--epan/dissectors/packet-llt.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/epan/dissectors/packet-llt.c b/epan/dissectors/packet-llt.c
index 7dcf0a4a..da5dce17 100644
--- a/epan/dissectors/packet-llt.c
+++ b/epan/dissectors/packet-llt.c
@@ -26,21 +26,21 @@ static const value_string message_type_vs[] = {
};
/* Variables for our preferences */
-static guint preference_alternate_ethertype = 0x0;
+static unsigned preference_alternate_ethertype = 0x0;
/* Initialize the protocol and registered fields */
-static int proto_llt = -1;
+static int proto_llt;
-static int hf_llt_cluster_num = -1;
-static int hf_llt_node_id = -1;
-static int hf_llt_message_type = -1;
-static int hf_llt_sequence_num = -1;
-static int hf_llt_message_time = -1;
-static int hf_llt_dst_node_id = -1;
-static int hf_llt_src_node_id = -1;
+static int hf_llt_cluster_num;
+static int hf_llt_node_id;
+static int hf_llt_message_type;
+static int hf_llt_sequence_num;
+static int hf_llt_message_time;
+static int hf_llt_dst_node_id;
+static int hf_llt_src_node_id;
/* Initialize the subtree pointers */
-static gint ett_llt = -1;
+static int ett_llt;
/* Code to actually dissect the packets */
static int
@@ -49,13 +49,13 @@ dissect_llt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
/* Set up structures needed to add the protocol subtree and manage it */
proto_item *ti;
proto_tree *llt_tree;
- guint8 message_type;
- guint16 magic;
+ uint8_t message_type;
+ uint16_t magic;
/* Make entries in Protocol column and Info column on summary display */
col_set_str(pinfo->cinfo, COL_PROTOCOL, "LLT");
- magic = tvb_get_guint16(tvb, 0, ENC_BIG_ENDIAN);
+ magic = tvb_get_uint16(tvb, 0, ENC_BIG_ENDIAN);
if(magic == 0x0602){ /* v2 ? */
ti = proto_tree_add_item(tree, proto_llt, tvb, 0, -1, ENC_NA);
@@ -66,7 +66,7 @@ dissect_llt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
proto_tree_add_item(llt_tree, hf_llt_src_node_id, tvb, 8, 1, ENC_LITTLE_ENDIAN);
} else {
- message_type = tvb_get_guint8(tvb, 3);
+ message_type = tvb_get_uint8(tvb, 3);
col_add_fstr(pinfo->cinfo, COL_INFO, "Message type: %s", val_to_str(message_type, message_type_vs, "Unknown (0x%02x)"));
@@ -121,7 +121,7 @@ proto_register_llt(void)
};
/* Setup protocol subtree array */
- static gint *ett[] = {
+ static int *ett[] = {
&ett_llt,
};
@@ -148,12 +148,12 @@ proto_register_llt(void)
void
proto_reg_handoff_llt(void)
{
- static gboolean initialized = FALSE;
- static guint preference_alternate_ethertype_last;
+ static bool initialized = false;
+ static unsigned preference_alternate_ethertype_last;
if (!initialized) {
dissector_add_uint("ethertype", ETHERTYPE_LLT, llt_handle);
- initialized = TRUE;
+ initialized = true;
} else {
if (preference_alternate_ethertype_last != 0x0) {
dissector_delete_uint("ethertype", preference_alternate_ethertype_last, llt_handle);