summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-maccontrol.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:53 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:53 +0000
commita86c5f7cae7ec9a3398300555a0b644689d946a1 (patch)
tree39fe4b107c71174fd1e8a8ceb9a4d2aa14116248 /epan/dissectors/packet-maccontrol.c
parentReleasing progress-linux version 4.2.6-1~progress7.99u1. (diff)
downloadwireshark-a86c5f7cae7ec9a3398300555a0b644689d946a1.tar.xz
wireshark-a86c5f7cae7ec9a3398300555a0b644689d946a1.zip
Merging upstream version 4.4.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'epan/dissectors/packet-maccontrol.c')
-rw-r--r--epan/dissectors/packet-maccontrol.c90
1 files changed, 45 insertions, 45 deletions
diff --git a/epan/dissectors/packet-maccontrol.c b/epan/dissectors/packet-maccontrol.c
index a1117a56..8254e89a 100644
--- a/epan/dissectors/packet-maccontrol.c
+++ b/epan/dissectors/packet-maccontrol.c
@@ -27,44 +27,44 @@ void proto_reg_handoff_macctrl(void);
static dissector_handle_t macctrl_handle;
-static int proto_macctrl = -1;
-
-static int hf_macctrl_opcode = -1;
-static int hf_macctrl_timestamp = -1;
-static int hf_macctrl_pause_time = -1;
-static int hf_macctrl_cbfc_enbv = -1;
-static int hf_macctrl_cbfc_enbv_c0 = -1;
-static int hf_macctrl_cbfc_enbv_c1 = -1;
-static int hf_macctrl_cbfc_enbv_c2 = -1;
-static int hf_macctrl_cbfc_enbv_c3 = -1;
-static int hf_macctrl_cbfc_enbv_c4 = -1;
-static int hf_macctrl_cbfc_enbv_c5 = -1;
-static int hf_macctrl_cbfc_enbv_c6 = -1;
-static int hf_macctrl_cbfc_enbv_c7 = -1;
-static int hf_macctrl_cbfc_pause_time_c0 = -1;
-static int hf_macctrl_cbfc_pause_time_c1 = -1;
-static int hf_macctrl_cbfc_pause_time_c2 = -1;
-static int hf_macctrl_cbfc_pause_time_c3 = -1;
-static int hf_macctrl_cbfc_pause_time_c4 = -1;
-static int hf_macctrl_cbfc_pause_time_c5 = -1;
-static int hf_macctrl_cbfc_pause_time_c6 = -1;
-static int hf_macctrl_cbfc_pause_time_c7 = -1;
-
-static int hf_reg_flags = -1;
-static int hf_reg_req_grants = -1;
-static int hf_reg_grants = -1;
-static int hf_reg_port = -1;
-static int hf_reg_ack_port = -1;
-static int hf_reg_time = -1;
-static int hf_reg_ack_time = -1;
-
-static gint ett_macctrl = -1;
-static gint ett_macctrl_cbfc_enbv = -1;
-static gint ett_macctrl_cbfc_pause_times = -1;
-
-static expert_field ei_macctrl_opcode = EI_INIT;
-static expert_field ei_macctrl_cbfc_enbv = EI_INIT;
-static expert_field ei_macctrl_dst_address = EI_INIT;
+static int proto_macctrl;
+
+static int hf_macctrl_opcode;
+static int hf_macctrl_timestamp;
+static int hf_macctrl_pause_time;
+static int hf_macctrl_cbfc_enbv;
+static int hf_macctrl_cbfc_enbv_c0;
+static int hf_macctrl_cbfc_enbv_c1;
+static int hf_macctrl_cbfc_enbv_c2;
+static int hf_macctrl_cbfc_enbv_c3;
+static int hf_macctrl_cbfc_enbv_c4;
+static int hf_macctrl_cbfc_enbv_c5;
+static int hf_macctrl_cbfc_enbv_c6;
+static int hf_macctrl_cbfc_enbv_c7;
+static int hf_macctrl_cbfc_pause_time_c0;
+static int hf_macctrl_cbfc_pause_time_c1;
+static int hf_macctrl_cbfc_pause_time_c2;
+static int hf_macctrl_cbfc_pause_time_c3;
+static int hf_macctrl_cbfc_pause_time_c4;
+static int hf_macctrl_cbfc_pause_time_c5;
+static int hf_macctrl_cbfc_pause_time_c6;
+static int hf_macctrl_cbfc_pause_time_c7;
+
+static int hf_reg_flags;
+static int hf_reg_req_grants;
+static int hf_reg_grants;
+static int hf_reg_port;
+static int hf_reg_ack_port;
+static int hf_reg_time;
+static int hf_reg_ack_time;
+
+static int ett_macctrl;
+static int ett_macctrl_cbfc_enbv;
+static int ett_macctrl_cbfc_pause_times;
+
+static expert_field ei_macctrl_opcode;
+static expert_field ei_macctrl_cbfc_enbv;
+static expert_field ei_macctrl_dst_address;
static int * const macctrl_cbfc_enbv_list[] = {
&hf_macctrl_cbfc_enbv_c0,
@@ -116,7 +116,7 @@ static const value_string reg_flags_vals[] = {
{ 0, NULL }
};
-static const guint8 dst_addr[] = {0x01, 0x80, 0xC2, 0x00, 0x00, 0x01};
+static const uint8_t dst_addr[] = {0x01, 0x80, 0xC2, 0x00, 0x00, 0x01};
static const address macctrl_dst_address = ADDRESS_INIT(AT_ETHER, 6, dst_addr);
static int
@@ -125,10 +125,10 @@ dissect_macctrl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
proto_item *ti, *opcode_item;
proto_tree *macctrl_tree = NULL;
proto_tree *pause_times_tree = NULL;
- guint16 opcode;
- guint16 pause_time;
+ uint16_t opcode;
+ uint16_t pause_time;
int i;
- gint offset = 0;
+ int offset = 0;
col_set_str(pinfo->cinfo, COL_PROTOCOL, "MAC CTRL");
col_clear(pinfo->cinfo, COL_INFO);
@@ -144,7 +144,7 @@ dissect_macctrl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
proto_tree_add_item(macctrl_tree, hf_macctrl_timestamp, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
}
- col_add_str(pinfo->cinfo, COL_INFO, val_to_str_const(opcode, opcode_vals, "Unknown"));
+ col_set_str(pinfo->cinfo, COL_INFO, val_to_str_const(opcode, opcode_vals, "Unknown"));
switch (opcode) {
@@ -223,7 +223,7 @@ dissect_macctrl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
ti = proto_tree_add_bitmask(macctrl_tree, tvb, offset, hf_macctrl_cbfc_enbv,
ett_macctrl_cbfc_enbv, macctrl_cbfc_enbv_list, ENC_BIG_ENDIAN);
- if (tvb_get_guint8(tvb, offset) != 0) {
+ if (tvb_get_uint8(tvb, offset) != 0) {
expert_add_info(pinfo, ti, &ei_macctrl_cbfc_enbv);
}
offset += 2;
@@ -356,7 +356,7 @@ proto_register_macctrl(void)
NULL, 0x0, NULL, HFILL }}
};
- static gint *ett[] = {
+ static int *ett[] = {
&ett_macctrl,
&ett_macctrl_cbfc_enbv,
&ett_macctrl_cbfc_pause_times