diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:14:26 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-09-19 04:14:26 +0000 |
commit | c4e8a3222648fcf22ca207f1815ebbf7cd144eeb (patch) | |
tree | 93d5c6aa93d9987680dd1adad5685e2ad698f223 /epan/dissectors/packet-ipmi-vita.c | |
parent | Adding upstream version 4.2.6. (diff) | |
download | wireshark-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-ipmi-vita.c')
-rw-r--r-- | epan/dissectors/packet-ipmi-vita.c | 310 |
1 files changed, 155 insertions, 155 deletions
diff --git a/epan/dissectors/packet-ipmi-vita.c b/epan/dissectors/packet-ipmi-vita.c index f4939c22..0d9bded8 100644 --- a/epan/dissectors/packet-ipmi-vita.c +++ b/epan/dissectors/packet-ipmi-vita.c @@ -19,158 +19,158 @@ void proto_register_ipmi_vita(void); /* Tree type identifiers. */ -static gint ett_vita_ipmc = -1; -static gint ett_vita_ipmb = -1; -static gint ett_vita_vso = -1; -static gint ett_vita_led_caps = -1; -static gint ett_vita_led_color = -1; -static gint ett_vita_led_flags = -1; -static gint ett_vita_led_states = -1; -static gint ett_vita_ipmb_state = -1; -static gint ett_vita_fru_policy_bits = -1; -static gint ett_vita_fan_properties = -1; -static gint ett_vita_fru_control_caps = -1; -static gint ett_vita_chassis_addr_type = -1; -static gint ett_vita_chassis_addr = -1; -static gint ett_vita_persistent_control_state = -1; -static gint ett_vita_persistent_control_caps = -1; +static int ett_vita_ipmc; +static int ett_vita_ipmb; +static int ett_vita_vso; +static int ett_vita_led_caps; +static int ett_vita_led_color; +static int ett_vita_led_flags; +static int ett_vita_led_states; +static int ett_vita_ipmb_state; +static int ett_vita_fru_policy_bits; +static int ett_vita_fan_properties; +static int ett_vita_fru_control_caps; +static int ett_vita_chassis_addr_type; +static int ett_vita_chassis_addr; +static int ett_vita_persistent_control_state; +static int ett_vita_persistent_control_caps; /* Field identifiers. */ -static gint hf_vita_reserved = -1; -static gint hf_vita_fruid = -1; -static gint hf_vita_addr_key_type = -1; -static gint hf_vita_addr_key = -1; -static gint hf_vita_hw_addr = -1; -static gint hf_vita_ipmb_addr = -1; -static gint hf_vita_site_type = -1; -static gint hf_vita_site_num = -1; -static gint hf_vita_ipmbl_addr = -1; - -static gint hf_vita_chassis_identifier = -1; -static gint hf_vita_chassis_identifier_type = -1; -static gint hf_vita_chassis_identifier_length = -1; -static gint hf_vita_ipmc = -1; -static gint hf_vita_tier = -1; -static gint hf_vita_layer = -1; -static gint hf_vita_ipmb = -1; -static gint hf_vita_ipmb_itfs = -1; -static gint hf_vita_ipmb_freq = -1; -static gint hf_vita_vso = -1; -static gint hf_vita_vso_std = -1; -static gint hf_vita_rev = -1; -static gint hf_vita_max_fruid = -1; -static gint hf_vita_ipmc_fruid = -1; -static gint hf_vita_fru_control = -1; - -static gint hf_vita_led_count = -1; -static gint hf_vita_led_id = -1; -static gint hf_vita_led_caps = -1; -static gint hf_vita_led_cap_blue = -1; -static gint hf_vita_led_cap_red = -1; -static gint hf_vita_led_cap_green = -1; -static gint hf_vita_led_cap_amber = -1; -static gint hf_vita_led_cap_orange = -1; -static gint hf_vita_led_cap_white = -1; -static gint hf_vita_led_def_loc_color = -1; -static gint hf_vita_led_def_ovr_color = -1; -static gint hf_vita_led_color = -1; -static gint hf_vita_led_flags = -1; -static gint hf_vita_led_flag_pwr = -1; -static gint hf_vita_led_flag_hw_restrict = -1; -static gint hf_vita_led_states = -1; -static gint hf_vita_led_loc_func = -1; -static gint hf_vita_led_loc_duration = -1; -static gint hf_vita_led_loc_color = -1; -static gint hf_vita_led_ovr_func = -1; -static gint hf_vita_led_ovr_duration = -1; -static gint hf_vita_led_ovr_color = -1; -static gint hf_vita_led_lamp_test_duration = -1; -static gint hf_vita_led_state_local = -1; -static gint hf_vita_led_state_override = -1; -static gint hf_vita_led_state_lamp_test = -1; -static gint hf_vita_led_state_hw_restrict = -1; - -static gint hf_vita_ipmba_state = -1; -static gint hf_vita_ipmbb_state = -1; -static gint hf_vita_ipmb_state = -1; -static gint hf_vita_ipmb_link_id = -1; - -static gint hf_vita_fru_policy_mask_bits = -1; -static gint hf_vita_fru_policy_set_bits = -1; -static gint hf_vita_fru_policy_bits = -1; -static gint hf_vita_fru_activation_locked = -1; -static gint hf_vita_fru_deactivation_locked = -1; -static gint hf_vita_fru_commanded_deactivation_ignored = -1; -static gint hf_vita_fru_default_activation_locked = -1; - -static gint hf_vita_fru_activation = -1; - -static gint hf_vita_record_id = -1; - -static gint hf_vita_fan_min_level = -1; -static gint hf_vita_fan_max_level = -1; -static gint hf_vita_fan_norm_level = -1; -static gint hf_vita_fan_properties = -1; -static gint hf_vita_fan_prop_local_control = -1; -static gint hf_vita_fan_override_level = -1; -static gint hf_vita_fan_local_level = -1; -static gint hf_vita_fan_local_control = -1; - -static gint hf_vita_ipmb_link_key_type = -1; -static gint hf_vita_ipmb_link_key_value = -1; -static gint hf_vita_ipmb_link_number = -1; -static gint hf_vita_ipmb_sensor_number = -1; - -static gint hf_vita_active_chmc_ipmb_addr = -1; -static gint hf_vita_backup_chmc_ipmb_addr = -1; - -static gint hf_vita_fan_number = -1; -static gint hf_vita_fan_policy = -1; -static gint hf_vita_fan_policy_timeout = -1; -static gint hf_vita_fan_coverage = -1; - -static gint hf_vita_fru_control_caps = -1; -static gint hf_vita_fru_control_cap_cold = -1; -static gint hf_vita_fru_control_cap_warm = -1; -static gint hf_vita_fru_control_cap_grace = -1; -static gint hf_vita_fru_control_cap_diag = -1; -static gint hf_vita_fru_control_cap_pwr = -1; - -static gint hf_vita_fru_lock_operation = -1; -static gint hf_vita_fru_lock_id = -1; -static gint hf_vita_fru_lock_timestamp = -1; - -static gint hf_vita_fru_write_offset = -1; -static gint hf_vita_fru_write_data = -1; -static gint hf_vita_fru_write_count = -1; - -static gint hf_vita_chassis_addr_number = -1; -static gint hf_vita_chassis_addr_timestamp = -1; -static gint hf_vita_chassis_addr_count = -1; -static gint hf_vita_chassis_max_unavail = -1; -static gint hf_vita_chassis_addr_type = -1; -static gint hf_vita_chassis_addr = -1; -static gint hf_vita_chassis_addr_chmc = -1; -static gint hf_vita_chassis_addr_format = -1; -static gint hf_vita_ipv4_addr = -1; -static gint hf_vita_rmcp_port = -1; - -static gint hf_vita_persistent_control_state = -1; -static gint hf_vita_persistent_control_cold = -1; -static gint hf_vita_persistent_control_warm = -1; -static gint hf_vita_persistent_control_mask = -1; -static gint hf_vita_persistent_control_set = -1; -static gint hf_vita_persistent_control_caps = -1; -static gint hf_vita_persistent_control_cap_cold = -1; -static gint hf_vita_persistent_control_cap_warm = -1; - -static gint hf_vita_fru_state_sensor_num = -1; -static gint hf_vita_fru_health_sensor_num = -1; -static gint hf_vita_fru_voltage_sensor_num = -1; -static gint hf_vita_fru_temp_sensor_num = -1; -static gint hf_vita_payload_test_results_sensor_num = -1; -static gint hf_vita_payload_test_status_sensor_num = -1; +static int hf_vita_reserved; +static int hf_vita_fruid; +static int hf_vita_addr_key_type; +static int hf_vita_addr_key; +static int hf_vita_hw_addr; +static int hf_vita_ipmb_addr; +static int hf_vita_site_type; +static int hf_vita_site_num; +static int hf_vita_ipmbl_addr; + +static int hf_vita_chassis_identifier; +static int hf_vita_chassis_identifier_type; +static int hf_vita_chassis_identifier_length; +static int hf_vita_ipmc; +static int hf_vita_tier; +static int hf_vita_layer; +static int hf_vita_ipmb; +static int hf_vita_ipmb_itfs; +static int hf_vita_ipmb_freq; +static int hf_vita_vso; +static int hf_vita_vso_std; +static int hf_vita_rev; +static int hf_vita_max_fruid; +static int hf_vita_ipmc_fruid; +static int hf_vita_fru_control; + +static int hf_vita_led_count; +static int hf_vita_led_id; +static int hf_vita_led_caps; +static int hf_vita_led_cap_blue; +static int hf_vita_led_cap_red; +static int hf_vita_led_cap_green; +static int hf_vita_led_cap_amber; +static int hf_vita_led_cap_orange; +static int hf_vita_led_cap_white; +static int hf_vita_led_def_loc_color; +static int hf_vita_led_def_ovr_color; +static int hf_vita_led_color; +static int hf_vita_led_flags; +static int hf_vita_led_flag_pwr; +static int hf_vita_led_flag_hw_restrict; +static int hf_vita_led_states; +static int hf_vita_led_loc_func; +static int hf_vita_led_loc_duration; +static int hf_vita_led_loc_color; +static int hf_vita_led_ovr_func; +static int hf_vita_led_ovr_duration; +static int hf_vita_led_ovr_color; +static int hf_vita_led_lamp_test_duration; +static int hf_vita_led_state_local; +static int hf_vita_led_state_override; +static int hf_vita_led_state_lamp_test; +static int hf_vita_led_state_hw_restrict; + +static int hf_vita_ipmba_state; +static int hf_vita_ipmbb_state; +static int hf_vita_ipmb_state; +static int hf_vita_ipmb_link_id; + +static int hf_vita_fru_policy_mask_bits; +static int hf_vita_fru_policy_set_bits; +static int hf_vita_fru_policy_bits; +static int hf_vita_fru_activation_locked; +static int hf_vita_fru_deactivation_locked; +static int hf_vita_fru_commanded_deactivation_ignored; +static int hf_vita_fru_default_activation_locked; + +static int hf_vita_fru_activation; + +static int hf_vita_record_id; + +static int hf_vita_fan_min_level; +static int hf_vita_fan_max_level; +static int hf_vita_fan_norm_level; +static int hf_vita_fan_properties; +static int hf_vita_fan_prop_local_control; +static int hf_vita_fan_override_level; +static int hf_vita_fan_local_level; +static int hf_vita_fan_local_control; + +static int hf_vita_ipmb_link_key_type; +static int hf_vita_ipmb_link_key_value; +static int hf_vita_ipmb_link_number; +static int hf_vita_ipmb_sensor_number; + +static int hf_vita_active_chmc_ipmb_addr; +static int hf_vita_backup_chmc_ipmb_addr; + +static int hf_vita_fan_number; +static int hf_vita_fan_policy; +static int hf_vita_fan_policy_timeout; +static int hf_vita_fan_coverage; + +static int hf_vita_fru_control_caps; +static int hf_vita_fru_control_cap_cold; +static int hf_vita_fru_control_cap_warm; +static int hf_vita_fru_control_cap_grace; +static int hf_vita_fru_control_cap_diag; +static int hf_vita_fru_control_cap_pwr; + +static int hf_vita_fru_lock_operation; +static int hf_vita_fru_lock_id; +static int hf_vita_fru_lock_timestamp; + +static int hf_vita_fru_write_offset; +static int hf_vita_fru_write_data; +static int hf_vita_fru_write_count; + +static int hf_vita_chassis_addr_number; +static int hf_vita_chassis_addr_timestamp; +static int hf_vita_chassis_addr_count; +static int hf_vita_chassis_max_unavail; +static int hf_vita_chassis_addr_type; +static int hf_vita_chassis_addr; +static int hf_vita_chassis_addr_chmc; +static int hf_vita_chassis_addr_format; +static int hf_vita_ipv4_addr; +static int hf_vita_rmcp_port; + +static int hf_vita_persistent_control_state; +static int hf_vita_persistent_control_cold; +static int hf_vita_persistent_control_warm; +static int hf_vita_persistent_control_mask; +static int hf_vita_persistent_control_set; +static int hf_vita_persistent_control_caps; +static int hf_vita_persistent_control_cap_cold; +static int hf_vita_persistent_control_cap_warm; + +static int hf_vita_fru_state_sensor_num; +static int hf_vita_fru_health_sensor_num; +static int hf_vita_fru_voltage_sensor_num; +static int hf_vita_fru_temp_sensor_num; +static int hf_vita_payload_test_results_sensor_num; +static int hf_vita_payload_test_status_sensor_num; /* String values. */ @@ -377,7 +377,7 @@ static const value_string cc20[] = { /* Array of sub-tree identifiers (needed for registration). */ -static gint * const ett_ipmi_vita[] = { +static int * const ett_ipmi_vita[] = { &ett_vita_ipmc, &ett_vita_ipmb, &ett_vita_vso, @@ -804,7 +804,7 @@ cmd00_rs(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) static void cmd01_rq(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) { - guint len = tvb_captured_length(tvb); + unsigned len = tvb_captured_length(tvb); if (len > 0) { proto_tree_add_item(tree, hf_vita_fruid, tvb, 0, 1, ENC_LITTLE_ENDIAN); @@ -842,7 +842,7 @@ cmd01_rs(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) static void cmd02_rs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { - ipmi_add_typelen(pinfo, tree, hf_vita_chassis_identifier, hf_vita_chassis_identifier_type, hf_vita_chassis_identifier_length, tvb, 0, TRUE); + ipmi_add_typelen(pinfo, tree, hf_vita_chassis_identifier, hf_vita_chassis_identifier_type, hf_vita_chassis_identifier_length, tvb, 0, true); } /* FRU Control (request) @@ -1199,7 +1199,7 @@ cmd21_rs(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) ENC_LITTLE_ENDIAN); item = proto_tree_add_item(tree, hf_vita_chassis_addr, tvb, 8, -1, ENC_NA); - if (!(tvb_get_guint8(tvb, 8) & 0x7f)) { + if (!(tvb_get_uint8(tvb, 8) & 0x7f)) { proto_tree * sub = proto_item_add_subtree(item, ett_vita_chassis_addr); proto_tree_add_item(sub, hf_vita_ipv4_addr, tvb, 9, 4, ENC_BIG_ENDIAN); proto_tree_add_item(sub, hf_vita_rmcp_port, tvb, 13, 2, ENC_BIG_ENDIAN); @@ -1264,7 +1264,7 @@ cmd44_rs(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) /* Array of VITA 46.11 command descriptors. */ -static ipmi_cmd_t cmd_vita[] = { +static const ipmi_cmd_t cmd_vita[] = { { 0x00, NULL, cmd00_rs, NULL, NULL, "[VITA] Get VSO Capabilities", 0 }, { 0x01, cmd01_rq, cmd01_rs, NULL, NULL, "[VITA] Get Chassis Address Table Info", 0 }, { 0x02, NULL, cmd02_rs, NULL, NULL, "[VITA] Get Chassis Identifier", 0 }, @@ -1302,7 +1302,7 @@ static ipmi_cmd_t cmd_vita[] = { void proto_register_ipmi_vita(void) { - static const guint8 sig_vita[1] = { 3 }; + static const uint8_t sig_vita[1] = { 3 }; proto_register_field_array(proto_ipmi, hf_ipmi_vita, array_length(hf_ipmi_vita)); |