Revert "TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags"
[wireshark-sm.git] / epan / dissectors / packet-ipmi-se.c
blob71ec30b8e57a937e4b18647fe06732835aed0b74
1 /* packet-ipmi-se.c
2 * Sub-dissectors for IPMI messages (netFn=Sensor/Event)
3 * Copyright 2007-2008, Alexey Neyman, Pigeon Point Systems <avn@pigeonpoint.com>
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
9 * SPDX-License-Identifier: GPL-2.0-or-later
12 #include "config.h"
14 #include <epan/packet.h>
15 #include <epan/tfs.h>
16 #include <wsutil/array.h>
17 #include "packet-ipmi.h"
19 void proto_register_ipmi_se(void);
21 /* Data types for sensor-specific info */
22 struct sensor_info;
23 typedef bool (*intrp_t)(proto_tree *, tvbuff_t *, const struct sensor_info *,
24 uint32_t, uint32_t, uint32_t);
26 struct sensor_info {
27 const value_string *offsets;
28 intrp_t intrp2;
29 intrp_t intrp3;
30 const char *desc;
33 struct evtype_info {
34 const value_string *byte2;
35 const value_string *byte3;
36 const value_string *offsets;
37 intrp_t intrp2;
38 intrp_t intrp3;
41 static int ett_ipmi_se_evt_byte3;
42 static int ett_ipmi_se_evt_evd_byte1;
43 static int ett_ipmi_se_evt_evd_byte2;
44 static int ett_ipmi_se_evt_evd_byte3;
46 static int ett_ipmi_se_cp06_byte1;
47 static int ett_ipmi_se_cp07_byte1;
48 static int ett_ipmi_se_cp09_byte1;
49 static int ett_ipmi_se_cp10_byte1;
50 static int ett_ipmi_se_cp12_byte1;
51 static int ett_ipmi_se_cp12_byte2;
52 static int ett_ipmi_se_cp12_byte3;
53 static int ett_ipmi_se_cp13_byte1;
54 static int ett_ipmi_se_cp15_byte1;
55 static int ett_ipmi_se_cp15_byte2;
56 static int ett_ipmi_se_cp15_member;
57 static int ett_ipmi_se_cp15_byte11;
59 static int ett_ipmi_se_00_byte2;
60 static int ett_ipmi_se_01_byte2;
61 static int ett_ipmi_se_10_action;
62 static int ett_ipmi_se_12_byte1;
63 static int ett_ipmi_se_13_byte1;
64 static int ett_ipmi_se_13_rev;
65 static int ett_ipmi_se_14_byte1;
66 static int ett_ipmi_se_16_byte1;
67 static int ett_ipmi_se_16_byte2;
68 static int ett_ipmi_se_16_byte3;
69 static int ett_ipmi_se_20_rq_byte1;
70 static int ett_ipmi_se_20_rs_byte2;
71 static int ett_ipmi_se_23_readingfactors;
72 static int ett_ipmi_se_23_byte1;
73 static int ett_ipmi_se_23_byte2;
74 static int ett_ipmi_se_23_byte3;
75 static int ett_ipmi_se_23_byte4;
76 static int ett_ipmi_se_23_byte5;
77 static int ett_ipmi_se_23_byte6;
78 static int ett_ipmi_se_XX_mask;
79 static int ett_ipmi_se_XX_b1;
80 static int ett_ipmi_se_XX_b2;
81 static int ett_ipmi_se_XX_b3;
82 static int ett_ipmi_se_XX_b4;
83 static int ett_ipmi_se_28_byte2;
84 static int ett_ipmi_se_29_byte1;
85 static int ett_ipmi_se_2a_byte2;
86 static int ett_ipmi_se_2b_byte1;
87 static int ett_ipmi_se_2d_byte2;
88 static int ett_ipmi_se_2d_b1;
89 static int ett_ipmi_se_2d_b2;
91 static expert_field ei_ipmi_se_13_request_param_rev;
92 static expert_field ei_ipmi_se_13_request_param_data;
94 static int hf_ipmi_se_evt_rev;
95 static int hf_ipmi_se_evt_sensor_type;
96 static int hf_ipmi_se_evt_sensor_num;
97 static int hf_ipmi_se_evt_byte3;
98 static int hf_ipmi_se_evt_dir;
99 static int hf_ipmi_se_evt_type;
100 static int hf_ipmi_se_evt_data1;
101 static int hf_ipmi_se_evt_data1_b2;
102 static int hf_ipmi_se_evt_data1_b3;
103 static int hf_ipmi_se_evt_data1_offs;
104 static int hf_ipmi_se_evt_data2;
105 static int hf_ipmi_se_evt_data3;
107 static int hf_ipmi_se_cp00_sip;
108 static int hf_ipmi_se_cp01_alert_startup;
109 static int hf_ipmi_se_cp01_startup;
110 static int hf_ipmi_se_cp01_event_msg;
111 static int hf_ipmi_se_cp01_pef;
112 static int hf_ipmi_se_cp02_diag_intr;
113 static int hf_ipmi_se_cp02_oem_action;
114 static int hf_ipmi_se_cp02_pwr_cycle;
115 static int hf_ipmi_se_cp02_reset;
116 static int hf_ipmi_se_cp02_pwr_down;
117 static int hf_ipmi_se_cp02_alert;
118 static int hf_ipmi_se_cp03_startup;
119 static int hf_ipmi_se_cp04_alert_startup;
120 static int hf_ipmi_se_cp05_num_evfilters;
121 static int hf_ipmi_se_cp06_filter;
122 static int hf_ipmi_se_cp06_data;
123 static int hf_ipmi_se_cp07_filter;
124 /* static int hf_ipmi_se_cp07_data; */
125 static int hf_ipmi_se_cp08_policies;
126 static int hf_ipmi_se_cp09_entry;
127 static int hf_ipmi_se_cp09_data;
128 static int hf_ipmi_se_cp10_useval;
129 static int hf_ipmi_se_cp10_guid;
130 static int hf_ipmi_se_cp11_num_alertstr;
131 static int hf_ipmi_se_cp12_byte1;
132 static int hf_ipmi_se_cp12_alert_stringsel;
133 static int hf_ipmi_se_cp12_evfilter;
134 static int hf_ipmi_se_cp12_alert_stringset;
135 static int hf_ipmi_se_cp13_stringsel;
136 static int hf_ipmi_se_cp13_blocksel;
137 static int hf_ipmi_se_cp13_string;
138 static int hf_ipmi_se_cp14_num_gct;
139 static int hf_ipmi_se_cp15_gctsel;
140 static int hf_ipmi_se_cp15_force;
141 static int hf_ipmi_se_cp15_delayed;
142 static int hf_ipmi_se_cp15_channel;
143 static int hf_ipmi_se_cp15_group;
144 static int hf_ipmi_se_cp15_member_check;
145 static int hf_ipmi_se_cp15_member_id;
146 static int hf_ipmi_se_cp15_retries;
147 static int hf_ipmi_se_cp15_operation;
149 static int hf_ipmi_se_00_addr;
150 static int hf_ipmi_se_00_lun;
152 static int hf_ipmi_se_01_addr;
153 static int hf_ipmi_se_01_lun;
155 static int hf_ipmi_se_10_pef_version;
156 static int hf_ipmi_se_10_action_oem_filter;
157 static int hf_ipmi_se_10_action_diag_intr;
158 static int hf_ipmi_se_10_action_oem_action;
159 static int hf_ipmi_se_10_action_pwr_cycle;
160 static int hf_ipmi_se_10_action_reset;
161 static int hf_ipmi_se_10_action_pwr_down;
162 static int hf_ipmi_se_10_action_alert;
163 static int hf_ipmi_se_10_entries;
164 static int hf_ipmi_se_10_evtype;
166 static int hf_ipmi_se_11_rq_timeout;
167 static int hf_ipmi_se_11_rs_timeout;
169 static int hf_ipmi_se_12_byte1;
170 static int hf_ipmi_se_12_param;
171 static int hf_ipmi_se_12_data;
173 static int hf_ipmi_se_13_byte1;
174 static int hf_ipmi_se_13_getrev;
175 static int hf_ipmi_se_13_param;
176 static int hf_ipmi_se_13_set;
177 static int hf_ipmi_se_13_block;
178 static int hf_ipmi_se_13_rev_present;
179 static int hf_ipmi_se_13_rev_compat;
180 static int hf_ipmi_se_13_data;
182 static int hf_ipmi_se_14_processed_by;
183 static int hf_ipmi_se_14_rid;
185 static int hf_ipmi_se_15_tstamp;
186 static int hf_ipmi_se_15_lastrec;
187 static int hf_ipmi_se_15_proc_sw;
188 static int hf_ipmi_se_15_proc_bmc;
190 static int hf_ipmi_se_16_chan;
191 static int hf_ipmi_se_16_op;
192 static int hf_ipmi_se_16_dst;
193 static int hf_ipmi_se_16_send_string;
194 static int hf_ipmi_se_16_string_sel;
195 static int hf_ipmi_se_16_gen;
196 static int hf_ipmi_se_16_status;
198 static int hf_ipmi_se_17_seq;
199 static int hf_ipmi_se_17_tstamp;
200 static int hf_ipmi_se_17_evsrc;
201 static int hf_ipmi_se_17_sensor_dev;
202 static int hf_ipmi_se_17_sensor_num;
203 static int hf_ipmi_se_17_evdata1;
204 static int hf_ipmi_se_17_evdata2;
205 static int hf_ipmi_se_17_evdata3;
207 static int hf_ipmi_se_20_rq_op;
208 static int hf_ipmi_se_20_rs_num;
209 static int hf_ipmi_se_20_rs_sdr;
210 static int hf_ipmi_se_20_rs_population;
211 static int hf_ipmi_se_20_rs_lun3;
212 static int hf_ipmi_se_20_rs_lun2;
213 static int hf_ipmi_se_20_rs_lun1;
214 static int hf_ipmi_se_20_rs_lun0;
215 static int hf_ipmi_se_20_rs_change;
217 static int hf_ipmi_se_21_rid;
218 static int hf_ipmi_se_21_record;
219 static int hf_ipmi_se_21_offset;
220 static int hf_ipmi_se_21_len;
221 static int hf_ipmi_se_21_next;
222 static int hf_ipmi_se_21_recdata;
224 static int hf_ipmi_se_22_resid;
226 static int hf_ipmi_se_23_rq_sensor;
227 static int hf_ipmi_se_23_rq_reading;
228 static int hf_ipmi_se_23_rs_next_reading;
230 static int hf_ipmi_se_24_sensor;
231 static int hf_ipmi_se_24_mask;
232 static int hf_ipmi_se_24_hyst_pos;
233 static int hf_ipmi_se_24_hyst_neg;
235 static int hf_ipmi_se_25_sensor;
236 static int hf_ipmi_se_25_mask;
237 static int hf_ipmi_se_25_hyst_pos;
238 static int hf_ipmi_se_25_hyst_neg;
240 static int hf_ipmi_se_26_sensor;
241 static int hf_ipmi_se_XX_m_unr;
242 static int hf_ipmi_se_XX_m_uc;
243 static int hf_ipmi_se_XX_m_unc;
244 static int hf_ipmi_se_XX_m_lnr;
245 static int hf_ipmi_se_XX_m_lc;
246 static int hf_ipmi_se_XX_m_lnc;
247 static int hf_ipmi_se_XX_thr_lnc;
248 static int hf_ipmi_se_XX_thr_lc;
249 static int hf_ipmi_se_XX_thr_lnr;
250 static int hf_ipmi_se_XX_thr_unc;
251 static int hf_ipmi_se_XX_thr_uc;
252 static int hf_ipmi_se_XX_thr_unr;
254 static int hf_ipmi_se_27_sensor;
256 static int hf_ipmi_se_XX_b1_7;
257 static int hf_ipmi_se_XX_b1_6;
258 static int hf_ipmi_se_XX_b1_5;
259 static int hf_ipmi_se_XX_b1_4;
260 static int hf_ipmi_se_XX_b1_3;
261 static int hf_ipmi_se_XX_b1_2;
262 static int hf_ipmi_se_XX_b1_1;
263 static int hf_ipmi_se_XX_b1_0;
264 static int hf_ipmi_se_XX_b2_6;
265 static int hf_ipmi_se_XX_b2_5;
266 static int hf_ipmi_se_XX_b2_4;
267 static int hf_ipmi_se_XX_b2_3;
268 static int hf_ipmi_se_XX_b2_2;
269 static int hf_ipmi_se_XX_b2_1;
270 static int hf_ipmi_se_XX_b2_0;
271 static int hf_ipmi_se_XX_b3_7;
272 static int hf_ipmi_se_XX_b3_6;
273 static int hf_ipmi_se_XX_b3_5;
274 static int hf_ipmi_se_XX_b3_4;
275 static int hf_ipmi_se_XX_b3_3;
276 static int hf_ipmi_se_XX_b3_2;
277 static int hf_ipmi_se_XX_b3_1;
278 static int hf_ipmi_se_XX_b3_0;
279 static int hf_ipmi_se_XX_b4_6;
280 static int hf_ipmi_se_XX_b4_5;
281 static int hf_ipmi_se_XX_b4_4;
282 static int hf_ipmi_se_XX_b4_3;
283 static int hf_ipmi_se_XX_b4_2;
284 static int hf_ipmi_se_XX_b4_1;
285 static int hf_ipmi_se_XX_b4_0;
287 static int hf_ipmi_se_28_sensor;
288 static int hf_ipmi_se_28_fl_evm;
289 static int hf_ipmi_se_28_fl_scan;
290 static int hf_ipmi_se_28_fl_action;
292 static int hf_ipmi_se_29_sensor;
293 static int hf_ipmi_se_29_fl_evm;
294 static int hf_ipmi_se_29_fl_scan;
296 static int hf_ipmi_se_2a_sensor;
297 static int hf_ipmi_se_2a_fl_sel;
299 static int hf_ipmi_se_2b_sensor;
300 static int hf_ipmi_se_2b_fl_evm;
301 static int hf_ipmi_se_2b_fl_scan;
302 static int hf_ipmi_se_2b_fl_unavail;
304 static int hf_ipmi_se_2d_sensor;
305 static int hf_ipmi_se_2d_reading;
306 static int hf_ipmi_se_2d_b1_7;
307 static int hf_ipmi_se_2d_b1_6;
308 static int hf_ipmi_se_2d_b1_5;
309 static int hf_ipmi_se_2d_b1_4;
310 static int hf_ipmi_se_2d_b1_3;
311 static int hf_ipmi_se_2d_b1_2;
312 static int hf_ipmi_se_2d_b1_1;
313 static int hf_ipmi_se_2d_b1_0;
314 static int hf_ipmi_se_2d_b2_6;
315 static int hf_ipmi_se_2d_b2_5;
316 static int hf_ipmi_se_2d_b2_4;
317 static int hf_ipmi_se_2d_b2_3;
318 static int hf_ipmi_se_2d_b2_2;
319 static int hf_ipmi_se_2d_b2_1;
320 static int hf_ipmi_se_2d_b2_0;
322 static int hf_ipmi_se_2e_sensor;
323 static int hf_ipmi_se_2e_stype;
324 static int hf_ipmi_se_2e_evtype;
326 static int hf_ipmi_se_2f_sensor;
327 static int hf_ipmi_se_2f_stype;
328 static int hf_ipmi_se_2f_evtype;
330 /* Generated from convert_proto_tree_add_text.pl */
331 static int hf_ipmi_se_f3_gs_management_power;
332 static int hf_ipmi_se_f0_cause;
333 static int hf_ipmi_se_28_logical_fru_device;
334 static int hf_ipmi_se_evt_trigger_threshold;
335 static int hf_ipmi_se_10_logging_disable;
336 static int hf_ipmi_se_28_sensor_number;
337 static int hf_ipmi_se_23_interrupt_type;
338 static int hf_ipmi_se_23_accuracy_exponent;
339 static int hf_ipmi_se_2a_session_deactivated_by;
340 static int hf_ipmi_se_0c_memory_module;
341 static int hf_ipmi_se_f1_ipmb_a_override_state;
342 static int hf_ipmi_se_12_reset;
343 static int hf_ipmi_se_f1_ipmb_b_local_status;
344 static int hf_ipmi_se_f1_ipmb_a_local_status;
345 static int hf_ipmi_se_1d_restart_cause;
346 static int hf_ipmi_se_12_power_off;
347 static int hf_ipmi_se_f3_management_power_overcurrent;
348 static int hf_ipmi_se_2a_user_id;
349 static int hf_ipmi_se_12_event;
350 static int hf_ipmi_se_2c_previous_state;
351 static int hf_ipmi_se_1d_channel;
352 static int hf_ipmi_se_f3_channel_management_power;
353 static int hf_ipmi_se_12_power_cycle;
354 static int hf_ipmi_se_f1_ipmb_b_override_state;
355 static int hf_ipmi_se_19_requested_power_state;
356 static int hf_ipmi_se_f3_payload_power_overcurrent;
357 static int hf_ipmi_se_f0_previous_state;
358 static int hf_ipmi_se_f3_ps1;
359 static int hf_ipmi_se_13_parameter;
360 static int hf_ipmi_se_28_i2c_slave_address;
361 static int hf_ipmi_se_0f_extension_code_err;
362 static int hf_ipmi_se_28_lun_for_master_read_write_command;
363 static int hf_ipmi_se_evt_trigger_reading;
364 static int hf_ipmi_se_21_slot_connector_type;
365 static int hf_ipmi_se_f3_pwr_on;
366 static int hf_ipmi_se_28_fru_device_id_within_controller;
367 static int hf_ipmi_se_12_log_entry_action;
368 static int hf_ipmi_se_12_log_type;
369 static int hf_ipmi_se_23_accuracy;
370 static int hf_ipmi_se_f3_role;
371 static int hf_ipmi_se_f3_channel_payload_power;
372 static int hf_ipmi_se_23_m;
373 static int hf_ipmi_se_f1_channel;
374 static int hf_ipmi_se_10_event_offset;
375 static int hf_ipmi_se_f3_gs_payload_power;
376 static int hf_ipmi_se_pst_severity;
377 static int hf_ipmi_se_f3_global_status;
378 static int hf_ipmi_se_f3_channel_status;
379 static int hf_ipmi_se_12_alert;
380 static int hf_ipmi_se_23_timer_use_at_expiration;
381 static int hf_ipmi_se_12_oem_action;
382 static int hf_ipmi_se_f0_fru_id;
383 static int hf_ipmi_se_pst_previous_state;
384 static int hf_ipmi_se_23_tolerance;
385 static int hf_ipmi_se_21_slot_connector;
386 static int hf_ipmi_se_12_diagnostic_interrupt;
387 static int hf_ipmi_se_2c_cause;
388 static int hf_ipmi_se_f3_enable;
389 static int hf_ipmi_se_10_sel_filled;
390 static int hf_ipmi_se_23_b_exponent;
391 static int hf_ipmi_se_0f_extension_code_progress;
392 static int hf_ipmi_se_05_network_controller;
393 static int hf_ipmi_se_28_private_bus_id;
394 static int hf_ipmi_se_10_event;
395 static int hf_ipmi_se_23_r_exponent;
396 static int hf_ipmi_se_f3_power_channel_number;
397 static int hf_ipmi_se_2a_channel;
398 static int hf_ipmi_se_2b_version_change_type;
399 static int hf_ipmi_se_f3_redundant_pm;
400 static int hf_ipmi_se_19_power_state;
401 static int hf_ipmi_se_08_error_type;
402 static int hf_ipmi_se_23_b;
403 static int hf_ipmi_se_12_timestamp_clock_type;
404 static int hf_ipmi_se_10_memory_module;
407 /* Platform Event parsing. Common for Platform Event and Alert Immediate.
409 static const value_string evt_evm_rev_vals[] = {
410 { 0x03, "IPMI 1.0" },
411 { 0x04, "IPMI 1.5+" },
412 { 0, NULL },
415 static const struct true_false_string evt_evdir_tfs = {
416 "Deassertion event",
417 "Assertion event"
420 static const value_string et_empty[] = {
421 { 0, NULL }
424 static const value_string etb2_thr[] = {
425 { 0x00, "Unspecified" },
426 { 0x01, "Trigger reading" },
427 { 0x02, "OEM code" },
428 { 0x03, "Sensor-specific" },
429 { 0, NULL }
432 static const value_string etb3_thr[] = {
433 { 0x00, "Unspecified" },
434 { 0x01, "Trigger threshold" },
435 { 0x02, "OEM code" },
436 { 0x03, "Sensor-specific" },
437 { 0, NULL }
440 static const value_string etb2_dscr[] = {
441 { 0x00, "Unspecified" },
442 { 0x01, "Previous state and/or severity" },
443 { 0x02, "OEM code" },
444 { 0x03, "Sensor-specific" },
445 { 0, NULL }
448 static const value_string etb3_dscr[] = {
449 { 0x00, "Unspecified" },
450 { 0x02, "OEM code" },
451 { 0x03, "Sensor-specific" },
452 { 0, NULL }
455 static const value_string etb2_oem[] = {
456 { 0x00, "Unspecified" },
457 { 0x01, "Previous state and/or severity" },
458 { 0x02, "OEM code" },
459 { 0, NULL }
462 static const value_string etb3_oem[] = {
463 { 0x00, "Unspecified" },
464 { 0x02, "OEM code" },
465 { 0, NULL }
468 static const value_string etoff_01[] = {
469 { 0x00, "Lower Non-Critical: going low" },
470 { 0x01, "Lower Non-Critical: going high" },
471 { 0x02, "Lower Critical: going low" },
472 { 0x03, "Lower Critical: going high" },
473 { 0x04, "Lower Non-Recoverable: going low" },
474 { 0x05, "Lower Non-Recoverable: going high" },
475 { 0x06, "Upper Non-Critical: going low" },
476 { 0x07, "Upper Non-Critical: going high" },
477 { 0x08, "Upper Critical: going low" },
478 { 0x09, "Upper Critical: going high" },
479 { 0x0a, "Upper Non-Recoverable: going low" },
480 { 0x0b, "Upper Non-Recoverable: going high" },
481 { 0, NULL }
484 static const value_string etoff_02[] = {
485 { 0x00, "Transition to Idle" },
486 { 0x01, "Transition to Active" },
487 { 0x02, "Transition to Busy" },
488 { 0, NULL }
491 static const value_string etoff_03[] = {
492 { 0x00, "State Deasserted" },
493 { 0x01, "State Asserted" },
494 { 0, NULL }
497 static const value_string etoff_04[] = {
498 { 0x00, "Predictive Failure Deasserted" },
499 { 0x01, "Predictive Failure Asserted" },
500 { 0, NULL }
503 static const value_string etoff_05[] = {
504 { 0x00, "Limit Not Exceeded" },
505 { 0x01, "Limit Exceeded" },
506 { 0, NULL }
509 static const value_string etoff_06[] = {
510 { 0x00, "Performance Met" },
511 { 0x01, "Performance Lags" },
512 { 0, NULL }
515 static const value_string etoff_07[] = {
516 { 0x00, "Transition to OK" },
517 { 0x01, "Transition to Non-Critical from OK" },
518 { 0x02, "Transition to Critical from less severe" },
519 { 0x03, "Transition to Non-Recoverable from less severe" },
520 { 0x04, "Transition to Non-Critical from more severe" },
521 { 0x05, "Transition to Critical from Non-Recoverable" },
522 { 0x06, "Transition to Non-Recoverable" },
523 { 0x07, "Monitor" },
524 { 0x08, "Informational" },
525 { 0x0F, "Unspecified" },
526 { 0, NULL }
529 static const value_string etoff_08[] = {
530 { 0x00, "Device Removed/Absent" },
531 { 0x01, "Device Inserted/Present" },
532 { 0, NULL }
535 static const value_string etoff_09[] = {
536 { 0x00, "Device Disabled" },
537 { 0x01, "Device Enabled" },
538 { 0, NULL }
541 static const value_string etoff_0a[] = {
542 { 0x00, "Transition to Running" },
543 { 0x01, "Transition to In Test" },
544 { 0x02, "Transition to Power Off" },
545 { 0x03, "Transition to On Line" },
546 { 0x04, "Transition to Off Line" },
547 { 0x05, "Transition to Off Duty" },
548 { 0x06, "Transition to Degraded" },
549 { 0x07, "Transition to Power Save" },
550 { 0x08, "Install Error" },
551 { 0, NULL }
554 static const value_string etoff_0b[] = {
555 { 0x00, "Fully Redundant" },
556 { 0x01, "Redundancy Lost" },
557 { 0x02, "Redundancy Degraded" },
558 { 0x03, "Non-Redundant: Sufficient Resources from Redundant" },
559 { 0x04, "Non-Redundant: Sufficient Resources from Insufficient Resources" },
560 { 0x05, "Non-Redundant: Insufficient Resources" },
561 { 0x06, "Redundancy Degraded from Fully Redundant" },
562 { 0x07, "Redundancy Degraded from Non-Redundant" },
563 { 0, NULL }
566 static const value_string etoff_0c[] = {
567 { 0x00, "D0 Power State" },
568 { 0x01, "D1 Power State" },
569 { 0x02, "D2 Power State" },
570 { 0x03, "D3 Power State" },
571 { 0, NULL }
574 static bool
575 eti_thr_2(proto_tree *tree, tvbuff_t *tvb, const struct sensor_info *si _U_,
576 uint32_t b, uint32_t offs _U_, uint32_t d)
578 proto_item* ti;
580 if (b == 0x1) {
581 ti = proto_tree_add_item(tree, hf_ipmi_se_evt_trigger_reading, tvb, 0, 1, ENC_LITTLE_ENDIAN);
582 if (d == 0xff)
583 proto_item_append_text(ti, " (unspecified)");
584 return true;
586 return false;
589 static bool
590 eti_thr_3(proto_tree *tree, tvbuff_t *tvb, const struct sensor_info *si _U_,
591 uint32_t b, uint32_t offs _U_, uint32_t d)
593 proto_item* ti;
595 if (b == 0x1) {
596 ti = proto_tree_add_item(tree, hf_ipmi_se_evt_trigger_threshold, tvb, 0, 1, ENC_LITTLE_ENDIAN);
597 if (d == 0xff)
598 proto_item_append_text(ti, " (unspecified)");
599 return true;
601 return false;
604 static bool
605 eti_2_pst_sev(proto_tree *tree, tvbuff_t *tvb, const struct sensor_info *si,
606 uint32_t b, uint32_t offs _U_, uint32_t d)
608 proto_tree *s_tree;
609 uint32_t tmp;
610 const char *desc;
612 if (b == 0x1) {
613 s_tree = proto_tree_add_subtree(tree, tvb, 0, 1, ett_ipmi_se_evt_evd_byte2, NULL, "Previous state/severity");
614 proto_tree_add_item(s_tree, hf_ipmi_se_pst_severity, tvb, 0, 1, ENC_LITTLE_ENDIAN);
615 tmp = d & 0xf;
616 desc = (tmp == 0x0f) ? "Unspecified" : val_to_str_const(tmp, si->offsets, "Unknown");
617 proto_tree_add_uint_format_value(s_tree, hf_ipmi_se_pst_previous_state, tvb, 0, 1,
618 tmp, "%s (0x%02x)", desc, tmp);
619 return true;
621 return false;
624 static const range_string evtype_rvals[] = {
625 {0x00, 0x00, "Reserved"},
626 {0x01, 0x01, "Threshold"},
627 {0x02, 0x0C, "Discrete"},
628 {0x0D, 0x6E, "Reserved"},
629 {0x6F, 0x6F, "Sensor-specific"},
630 {0x70, 0x7F, "OEM-specific"},
631 {0,0,NULL}
634 static const struct evtype_info *
635 get_evtype_info(unsigned int evtype)
637 static const struct {
638 unsigned int id;
639 struct evtype_info eti;
640 } eti_tab[] = {
641 { 0x01, { etb2_thr, etb3_thr, etoff_01, eti_thr_2, eti_thr_3}},
642 { 0x02, { etb2_dscr, etb3_dscr, etoff_02, eti_2_pst_sev, NULL}},
643 { 0x03, { etb2_dscr, etb3_dscr, etoff_03, eti_2_pst_sev, NULL}},
644 { 0x04, { etb2_dscr, etb3_dscr, etoff_04, eti_2_pst_sev, NULL}},
645 { 0x05, { etb2_dscr, etb3_dscr, etoff_05, eti_2_pst_sev, NULL}},
646 { 0x06, { etb2_dscr, etb3_dscr, etoff_06, eti_2_pst_sev, NULL}},
647 { 0x07, { etb2_dscr, etb3_dscr, etoff_07, eti_2_pst_sev, NULL}},
648 { 0x08, { etb2_dscr, etb3_dscr, etoff_08, eti_2_pst_sev, NULL}},
649 { 0x09, { etb2_dscr, etb3_dscr, etoff_09, eti_2_pst_sev, NULL}},
650 { 0x0a, { etb2_dscr, etb3_dscr, etoff_0a, eti_2_pst_sev, NULL}},
651 { 0x0b, { etb2_dscr, etb3_dscr, etoff_0b, eti_2_pst_sev, NULL}},
652 { 0x0c, { etb2_dscr, etb3_dscr, etoff_0c, eti_2_pst_sev, NULL}},
653 { 0x6f, { etb2_dscr, etb3_dscr, NULL, eti_2_pst_sev, NULL}}
655 static const struct evtype_info eti_oem = {
656 etb2_oem, etb3_oem, et_empty, eti_2_pst_sev, NULL
658 static const struct evtype_info eti_rsrv = {
659 et_empty, et_empty, et_empty, NULL, NULL
661 unsigned int i;
663 /* Look for explicitly specified event/reading type */
664 for (i = 0; i < array_length(eti_tab); i++) {
665 if (eti_tab[i].id == evtype) {
666 return &eti_tab[i].eti;
670 /* Falls in OEM range? */
671 if (evtype >= 0x70 && evtype <= 0x7f) {
672 return &eti_oem;
675 return &eti_rsrv;
678 static const value_string ssoff_05[] = {
679 { 0x00, "General Chassis Intrusion" },
680 { 0x01, "Drive Bay Intrusion" },
681 { 0x02, "I/O Card Area Intrusion" },
682 { 0x03, "Processor Area Intrusion" },
683 { 0x04, "LAN Leash Lost" },
684 { 0x05, "Unauthorized dock" },
685 { 0x06, "FAN Area Intrusion" },
686 { 0, NULL }
689 static const value_string ssoff_06[] = {
690 { 0x00, "Secure Mode (Front Panel Lockout) Violation Attempt" },
691 { 0x01, "Pre-boot Password Violation: user password" },
692 { 0x02, "Pre-boot Password Violation: setup password" },
693 { 0x03, "Pre-boot Password Violation: network boot password" },
694 { 0x04, "Other pre-boot password violation" },
695 { 0x05, "Out-of-band password violation" },
696 { 0, NULL }
699 static const value_string ssoff_07[] = {
700 { 0x00, "IERR" },
701 { 0x01, "Thermal Trip" },
702 { 0x02, "FRB1/BIST Failure" },
703 { 0x03, "FRB2/Hang in POST Failure" },
704 { 0x04, "FRB3/Processor Startup/Initialization Failure" },
705 { 0x05, "Configuration Error" },
706 { 0x06, "SM BIOS Uncorrectable CPU-complex error" },
707 { 0x07, "Processor Presence Detected" },
708 { 0x08, "Processor Disabled" },
709 { 0x09, "Terminator Presence Detected" },
710 { 0x0a, "Processor Automatically Throttled" },
711 { 0, NULL }
714 static const value_string ssoff_08[] = {
715 { 0x00, "Presence Detected" },
716 { 0x01, "Power Supply Failure Detected" },
717 { 0x02, "Predictive Failure" },
718 { 0x03, "Power Supply input lost (AC/DC)" },
719 { 0x04, "Power Supply input lost or out-of-range" },
720 { 0x05, "Power Supply out-of-range, but present" },
721 { 0x06, "Configuration error" },
722 { 0, NULL }
725 static const value_string ssoff_09[] = {
726 { 0x00, "Power Off / Power Down" },
727 { 0x01, "Power Cycle" },
728 { 0x02, "240VA Power Down" },
729 { 0x03, "Interlock Power Down" },
730 { 0x04, "AC Lost" },
731 { 0x05, "Soft Power Control Failure" },
732 { 0x06, "Power Unit Failure Detected" },
733 { 0x07, "Predictive Failure" },
734 { 0, NULL }
737 static const value_string ssoff_0c[] = {
738 { 0x00, "Correctable ECC/other correctable memory error" },
739 { 0x01, "Uncorrectable ECC/other uncorrectable memory error" },
740 { 0x02, "Parity" },
741 { 0x03, "Memory Scrub Failed" },
742 { 0x04, "Memory Device Disabled" },
743 { 0x05, "Correctable ECC/other correctable memory error: logging limit reached" },
744 { 0x06, "Presence Detected" },
745 { 0x07, "Configuration Error" },
746 { 0x08, "Spare" },
747 { 0x09, "Memory Automatically Throttled" },
748 { 0x0a, "Critical Overtemperature" },
749 { 0, NULL }
752 static const value_string ssoff_0d[] = {
753 { 0x00, "Drive Presence" },
754 { 0x01, "Drive Fault" },
755 { 0x02, "Predictive Failure" },
756 { 0x03, "Hot Spare" },
757 { 0x04, "Consistency Check / Parity Check in progress" },
758 { 0x05, "In Critical Array" },
759 { 0x06, "In Failed Array" },
760 { 0x07, "Rebuild/Remap in progress" },
761 { 0x08, "Rebuild/Remap aborted" },
762 { 0, NULL }
765 static const value_string ssoff_0f[] = {
766 { 0x00, "System Firmware Error (POST Error)" },
767 { 0x01, "System Firmware Hang" },
768 { 0x02, "System Firmware Progress" },
769 { 0, NULL }
772 static const value_string ssoff_10[] = {
773 { 0x00, "Correctable Memory Error Logging Disabled" },
774 { 0x01, "Event type Logging Disabled" },
775 { 0x02, "Log Area Reset/Cleared" },
776 { 0x03, "All Event Logging Disabled" },
777 { 0x04, "SEL Full" },
778 { 0x05, "SEL Almost Full" },
779 { 0, NULL }
782 static const value_string ssoff_11[] = {
783 { 0x00, "BIOS Watchdog Reset" },
784 { 0x01, "OS Watchdog Reset" },
785 { 0x02, "OS Watchdog Shutdown" },
786 { 0x03, "OS Watchdog Power Down" },
787 { 0x04, "OS Watchdog Power Cycle" },
788 { 0x05, "OS Watchdog NMI/Diagnostic Interrupt" },
789 { 0x06, "OS Watchdog Expired, status only" },
790 { 0x07, "OS Watchdog pre-timeout interrupt, non-NMI" },
791 { 0, NULL }
794 static const value_string ssoff_12[] = {
795 { 0x00, "System Reconfigured" },
796 { 0x01, "OEM System Boot Event" },
797 { 0x02, "Undetermined system hardware failure" },
798 { 0x03, "Entry added to Auxiliary Log" },
799 { 0x04, "PEF Action" },
800 { 0x05, "Timestamp Clock Synch" },
801 { 0, NULL }
804 static const value_string ssoff_13[] = {
805 { 0x00, "Front Panel NMI/Diagnostic Interrupt" },
806 { 0x01, "Bus Timeout" },
807 { 0x02, "I/O Channel Check NMI" },
808 { 0x03, "Software NMI" },
809 { 0x04, "PCI PERR" },
810 { 0x05, "PCI SERR" },
811 { 0x06, "EISA Fail Safe Timeout" },
812 { 0x07, "Bus Correctable Error" },
813 { 0x08, "Bus Uncorrectable Error" },
814 { 0x09, "Fatal NMI" },
815 { 0x0a, "Bus Fatal Error" },
816 { 0x0b, "Bus Degraded" },
817 { 0, NULL }
820 static const value_string ssoff_14[] = {
821 { 0x00, "Power Button Pressed" },
822 { 0x01, "Sleep Button Pressed" },
823 { 0x02, "Reset Button Pressed" },
824 { 0x03, "FRU Latch open" },
825 { 0x04, "FRU Service Request Button Pressed" },
826 { 0, NULL }
829 static const value_string ssoff_19[] = {
830 { 0x00, "Soft Power Control Failure" },
831 { 0, NULL }
834 static const value_string ssoff_1b[] = {
835 { 0x00, "Cable/Interconnect is connected" },
836 { 0x01, "Configuration error - Incorrect cable connected / Incorrect interconnection" },
837 { 0, NULL }
840 static const value_string ssoff_1d[] = {
841 { 0x00, "Initiated by Power Up" },
842 { 0x01, "Initiated by hard reset" },
843 { 0x02, "Initiated by warm reset" },
844 { 0x03, "User requested PXE boot" },
845 { 0x04, "Automatic boot to diagnostic" },
846 { 0x05, "OS / run-time software initiated hard reset" },
847 { 0x06, "OS / run-time software initiated warm reset" },
848 { 0x07, "System Restart" },
849 { 0, NULL }
852 static const value_string ssoff_1e[] = {
853 { 0x00, "No bootable media" },
854 { 0x01, "No bootable diskette left in drive" },
855 { 0x02, "PXE Server not found" },
856 { 0x03, "Invalid boot sector" },
857 { 0x04, "Timeout waiting for user selection of boot source" },
858 { 0, NULL }
861 static const value_string ssoff_1f[] = {
862 { 0x00, "A: boot completed" },
863 { 0x01, "C: boot completed" },
864 { 0x02, "PXE boot completed" },
865 { 0x03, "Diagnostic boot completed" },
866 { 0x04, "CD-ROM boot completed" },
867 { 0x05, "ROM boot completed" },
868 { 0x06, "Boot completed - boot device not specified" },
869 { 0, NULL }
872 static const value_string ssoff_20[] = {
873 { 0x00, "Critical stop during OS load/initialization" },
874 { 0x01, "Run-time critical stop" },
875 { 0x02, "OS Graceful Stop" },
876 { 0x03, "OS Graceful Shutdown" },
877 { 0x04, "Soft Shutdown initiated by PEF" },
878 { 0x05, "Agent Not Responding" },
879 { 0, NULL }
882 static const value_string ssoff_21[] = {
883 { 0x00, "Fault Status asserted" },
884 { 0x01, "Identify Status asserted" },
885 { 0x02, "Slot/Connector Device installed/attached" },
886 { 0x03, "Slot/Connector Ready for Device Installation" },
887 { 0x04, "Slot/Connector Ready for Device Removal" },
888 { 0x05, "Slot Power is Off" },
889 { 0x06, "Slot/Connector Device Removal Request" },
890 { 0x07, "Interlock Asserted" },
891 { 0x08, "Slot is Disabled" },
892 { 0x09, "Slot holds spare device" },
893 { 0, NULL }
896 static const value_string ssoff_22[] = {
897 { 0x00, "S0/G0 'working'" },
898 { 0x01, "S1 'sleeping with system h/w & processor context maintained'" },
899 { 0x02, "S2 'sleeping, processor context lost'" },
900 { 0x03, "S3 'sleeping, processor & h/w, memory retained'" },
901 { 0x04, "S4 'non-volatile sleep / suspend-to-disk'" },
902 { 0x05, "S5/G2 'soft-off'" },
903 { 0x06, "S4/S5 'soft-off', particular S4/S5 state cannot be determined" },
904 { 0x07, "G3 / Mechanical Off" },
905 { 0x08, "Sleeping in S1, S2 or S3 states" },
906 { 0x09, "G1 sleeping" },
907 { 0x0a, "S5 entered by override" },
908 { 0x0b, "Legacy ON state" },
909 { 0x0c, "Legacy OFF state" },
910 { 0x0e, "Unknown" },
911 { 0, NULL }
914 static const value_string ssoff_23[] = {
915 { 0x00, "Timer expired, status only" },
916 { 0x01, "Hard Reset" },
917 { 0x02, "Power Down" },
918 { 0x03, "Power Cycle" },
919 { 0x08, "Timer Interrupt" },
920 { 0, NULL }
923 static const value_string ssoff_24[] = {
924 { 0x00, "Platform Generated Page" },
925 { 0x01, "Platform Generated LAN Event" },
926 { 0x02, "Platform Event Trap generated" },
927 { 0x03, "Platform generated SNMP trap" },
928 { 0, NULL }
931 static const value_string ssoff_25[] = {
932 { 0x00, "Entity Present" },
933 { 0x01, "Entity Absent" },
934 { 0x02, "Entity Disabled" },
935 { 0, NULL }
938 static const value_string ssoff_27[] = {
939 { 0x00, "LAN Heartbeat Lost" },
940 { 0x01, "LAN Heartbeat" },
941 { 0, NULL }
944 static const value_string ssoff_28[] = {
945 { 0x00, "Sensor access degraded or unavailable" },
946 { 0x01, "Controller access degraded or unavailable" },
947 { 0x02, "Management controller off-line" },
948 { 0x03, "Management controller unavailable" },
949 { 0x04, "Sensor failure" },
950 { 0x05, "FRU failure" },
951 { 0, NULL }
954 static const value_string ssoff_29[] = {
955 { 0x00, "Battery low" },
956 { 0x01, "Battery failed" },
957 { 0x02, "Battery presence detected" },
958 { 0, NULL }
961 static const value_string ssoff_2a[] = {
962 { 0x00, "Session Activated" },
963 { 0x01, "Session Deactivated" },
964 { 0, NULL }
967 static const value_string ssoff_2b[] = {
968 { 0x00, "Hardware change detected with associated Entity" },
969 { 0x01, "Firmware or software change detected with associated Entity" },
970 { 0x02, "Hardware incompatibility detected with associated Entity" },
971 { 0x03, "Firmware or software incompatibility detected with associated Entity" },
972 { 0x04, "Entity is of an invalid or unsupported hardware version" },
973 { 0x05, "Entity contains an invalid or unsupported firmware or software version" },
974 { 0x06, "Hardware Change detected with associated Entity was successful" },
975 { 0x07, "Software or Firmware Change detected with associated Entity was successful" },
976 { 0, NULL }
979 static const value_string ssoff_2c[] = {
980 { 0x00, "M0 - FRU Not Installed" },
981 { 0x01, "M1 - FRU Inactive" },
982 { 0x02, "M2 - FRU Activation Requested" },
983 { 0x03, "M3 - FRU Activation In Progress" },
984 { 0x04, "M4 - FRU Active" },
985 { 0x05, "M5 - FRU Deactivation Requested" },
986 { 0x06, "M6 - FRU Deactivation In Progress" },
987 { 0x07, "M7 - FRU Communication Lost" },
988 { 0, NULL }
991 static const value_string ssoff_f0[] = {
992 { 0x00, "M0 - FRU Not Installed" },
993 { 0x01, "M1 - FRU Inactive" },
994 { 0x02, "M2 - FRU Activation Requested" },
995 { 0x03, "M3 - FRU Activation In Progress" },
996 { 0x04, "M4 - FRU Active" },
997 { 0x05, "M5 - FRU Deactivation Requested" },
998 { 0x06, "M6 - FRU Deactivation In Progress" },
999 { 0x07, "M7 - FRU Communication Lost" },
1000 { 0, NULL }
1003 static const value_string ssoff_f1[] = {
1004 { 0x00, "IPMB-A disabled, IPMB-B disabled" },
1005 { 0x01, "IPMB-A enabled, IPMB-B disabled" },
1006 { 0x02, "IPMB-A disabled, IPMB-B enabled" },
1007 { 0x03, "IPMB-A enabled, IPMB-B enabled" },
1008 { 0, NULL }
1011 static const value_string ssoff_f2[] = {
1012 { 0x00, "Module handle closed" },
1013 { 0x01, "Module handle open" },
1014 { 0x02, "Quiesced" },
1015 { 0x03, "Backend Power Failure" },
1016 { 0x04, "Backend Power Shut Down" },
1017 { 0, NULL }
1020 static const value_string ssoff_f3[] = {
1021 { 0x00, "Global status change" },
1022 { 0x01, "Channel status change" },
1023 { 0, NULL }
1026 static const value_string ssoff_f4[] = {
1027 { 0x00, "Minor Reset" },
1028 { 0x01, "Major Reset" },
1029 { 0x02, "Alarm Cutoff" },
1030 { 0, NULL }
1033 static bool
1034 ssi_05_2(proto_tree *tree, tvbuff_t *tvb, const struct sensor_info *si _U_,
1035 uint32_t b, uint32_t offs, uint32_t d _U_)
1037 if (b == 0x3 && offs == 0x04) {
1038 /* LAN Leash Lost */
1039 proto_tree_add_item(tree, hf_ipmi_se_05_network_controller, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1040 return true;
1042 return false;
1045 static const value_string ssi_08_3_err_vals[] = {
1046 { 0x00, "Vendor mismatch" },
1047 { 0x01, "Revision mismatch" },
1048 { 0x02, "Processor missing" },
1049 { 0, NULL }
1052 static bool
1053 ssi_08_3(proto_tree *tree, tvbuff_t *tvb, const struct sensor_info *si _U_,
1054 uint32_t b, uint32_t offs, uint32_t d _U_)
1056 if (b == 0x3 && offs == 0x06) {
1057 /* Configuration error */
1058 proto_tree_add_item(tree, hf_ipmi_se_08_error_type, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1059 return true;
1061 return false;
1064 static bool
1065 ssi_0c_3(proto_tree *tree, tvbuff_t *tvb, const struct sensor_info *si _U_,
1066 uint32_t b, uint32_t offs _U_, uint32_t d _U_)
1068 if (b == 0x3) {
1069 proto_tree_add_item(tree, hf_ipmi_se_0c_memory_module, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1070 return true;
1072 return false;
1075 static const value_string ssi_0f_2_err_vals[] = {
1076 { 0x00, "Unspecified" },
1077 { 0x01, "No system memory is physically installed" },
1078 { 0x02, "No usable system memory" },
1079 { 0x03, "Unrecoverable hard-disk/ATAPI/IDE device failure" },
1080 { 0x04, "Unrecoverable system board failure" },
1081 { 0x05, "Unrecoverable diskette subsystem failure" },
1082 { 0x06, "Unrecoverable hard-disk controller failure" },
1083 { 0x07, "Unrecoverable PS/2 or USB keyboard failure" },
1084 { 0x08, "Removable boot media not found" },
1085 { 0x09, "Unrecoverable video controller failure" },
1086 { 0x0a, "No video device detected" },
1087 { 0x0b, "Firmware (BIOS) ROM corruption detected" },
1088 { 0x0c, "CPU voltage mismatch" },
1089 { 0x0d, "CPU speed matching failure" },
1090 { 0, NULL }
1092 static const value_string ssi_0f_2_progress_vals[] = {
1093 { 0x00, "Unspecified" },
1094 { 0x01, "Memory initialization" },
1095 { 0x02, "Hard-disk initialization" },
1096 { 0x03, "Secondary processor(s) initialization" },
1097 { 0x04, "User authentication" },
1098 { 0x05, "User-initiated system setup" },
1099 { 0x06, "USB resource configuration" },
1100 { 0x07, "PCI resource configuration" },
1101 { 0x08, "Option ROM initialization" },
1102 { 0x09, "Video initialization" },
1103 { 0x0a, "Cache initialization" },
1104 { 0x0b, "SM Bus initialization" },
1105 { 0x0c, "Keyboard controller initialization" },
1106 { 0x0d, "Embedded controller / management controller initialization" },
1107 { 0x0e, "Docking station attachment" },
1108 { 0x0f, "Enabling docking station" },
1109 { 0x10, "Docking station ejection" },
1110 { 0x11, "Disabling docking station" },
1111 { 0x12, "Calling operating system wake-up vector" },
1112 { 0x13, "Starting operating system boot process" },
1113 { 0x14, "Baseboard or motherboard initialization" },
1114 { 0x16, "Floppy initialization" },
1115 { 0x17, "Keyboard test" },
1116 { 0x18, "Pointing device test" },
1117 { 0x19, "Primary processor initialization" },
1118 { 0, NULL }
1121 static bool
1122 ssi_0f_2(proto_tree *tree, tvbuff_t *tvb, const struct sensor_info *si _U_,
1123 uint32_t b, uint32_t offs, uint32_t d _U_)
1126 if (b == 0x3 && offs == 0x00) {
1127 proto_tree_add_item(tree, hf_ipmi_se_0f_extension_code_err, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1128 return true;
1130 if (b == 0x3 && (offs == 0x01 || offs == 0x02)) {
1131 proto_tree_add_item(tree, hf_ipmi_se_0f_extension_code_progress, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1132 return true;
1134 return false;
1137 static const struct evtype_info *ssi_10_saveptr;
1139 static bool
1140 ssi_10_2(proto_tree *tree, tvbuff_t *tvb, const struct sensor_info *si _U_,
1141 uint32_t b, uint32_t offs, uint32_t d)
1143 if (b == 0x3 && offs == 0x00) {
1144 proto_tree_add_item(tree, hf_ipmi_se_10_memory_module, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1145 return true;
1147 if (b == 0x3 && offs == 0x01) {
1148 ssi_10_saveptr = get_evtype_info(d);
1149 proto_tree_add_item(tree, hf_ipmi_se_10_evtype, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1150 return true;
1152 return false;
1155 static const true_false_string tfs_deassertion_assertion = {
1156 "Deassertion",
1157 "Assertion"
1160 static bool
1161 ssi_10_3(proto_tree *tree, tvbuff_t *tvb, const struct sensor_info *si _U_,
1162 uint32_t b, uint32_t offs, uint32_t d)
1164 proto_tree *s_tree;
1165 const value_string *off_vals;
1167 if (b == 0x3 && offs == 0x01) {
1168 if (!ssi_10_saveptr) {
1169 return false; /* something went wrong */
1171 off_vals = ssi_10_saveptr->offsets ? ssi_10_saveptr->offsets : et_empty;
1172 s_tree = proto_tree_add_subtree(tree, tvb, 0, 1, ett_ipmi_se_evt_evd_byte3, NULL, "Logging details/Offset");
1173 proto_tree_add_item(s_tree, hf_ipmi_se_10_logging_disable, tvb, 0, 1, ENC_NA);
1174 proto_tree_add_item(s_tree, hf_ipmi_se_10_event, tvb, 0, 1, ENC_NA);
1175 d &= 0x0f;
1176 proto_tree_add_uint_format_value(s_tree, hf_ipmi_se_10_event_offset, tvb, 0, 1,
1177 d, "%s (0x%02x)", val_to_str_const(d, off_vals, "Unknown"), d);
1178 return true;
1180 if (b == 0x3 && offs == 0x05) {
1181 proto_tree_add_item(tree, hf_ipmi_se_10_sel_filled, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1182 return true;
1184 return false;
1187 static const value_string ssi_12_2_act_vals[] = {
1188 { 0x00, "Entry added" },
1189 { 0x01, "Entry added because event did not map to standard IPMI event" },
1190 { 0x02, "Entry added along with one or more corresponding SEL entries" },
1191 { 0x03, "Log cleared" },
1192 { 0x04, "Log disabled" },
1193 { 0x05, "Log enabled" },
1194 { 0, NULL }
1196 static const value_string ssi_12_2_type_vals[] = {
1197 { 0x00, "MCA Log" },
1198 { 0x01, "OEM 1" },
1199 { 0x02, "OEM 2" },
1200 { 0, NULL }
1202 static const value_string ssi_12_2_clock_vals[] = {
1203 { 0x00, "SEL Timestamp Clock updated" },
1204 { 0x01, "SDR Timestamp Clock updated" },
1205 { 0, NULL }
1208 static const true_false_string tfs_second_first_pair = {
1209 "Second of pair",
1210 "First of pair"
1213 static bool
1214 ssi_12_2(proto_tree *tree, tvbuff_t *tvb, const struct sensor_info *si _U_,
1215 uint32_t b, uint32_t offs, uint32_t d _U_)
1217 proto_tree *s_tree;
1219 if (b == 0x3 && offs == 0x03) {
1220 s_tree = proto_tree_add_subtree(tree, tvb, 0, 1, ett_ipmi_se_evt_evd_byte2, NULL, "Log action/type");
1221 proto_tree_add_item(s_tree, hf_ipmi_se_12_log_entry_action, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1222 proto_tree_add_item(s_tree, hf_ipmi_se_12_log_type, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1223 return true;
1225 if (b == 0x3 && offs == 0x04) {
1226 s_tree = proto_tree_add_subtree(tree, tvb, 0, 1, ett_ipmi_se_evt_evd_byte2, NULL, "PEF Actions to be taken");
1227 proto_tree_add_item(s_tree, hf_ipmi_se_12_diagnostic_interrupt, tvb, 0, 1, ENC_NA);
1228 proto_tree_add_item(s_tree, hf_ipmi_se_12_oem_action, tvb, 0, 1, ENC_NA);
1229 proto_tree_add_item(s_tree, hf_ipmi_se_12_power_cycle, tvb, 0, 1, ENC_NA);
1230 proto_tree_add_item(s_tree, hf_ipmi_se_12_reset, tvb, 0, 1, ENC_NA);
1231 proto_tree_add_item(s_tree, hf_ipmi_se_12_power_off, tvb, 0, 1, ENC_NA);
1232 proto_tree_add_item(s_tree, hf_ipmi_se_12_alert, tvb, 0, 1, ENC_NA);
1233 return true;
1235 if (b == 0x3 && offs == 0x05) {
1236 s_tree = proto_tree_add_subtree(tree, tvb, 0, 1, ett_ipmi_se_evt_evd_byte2, NULL, "Details");
1237 proto_tree_add_item(s_tree, hf_ipmi_se_12_event, tvb, 0, 1, ENC_NA);
1238 proto_tree_add_item(s_tree, hf_ipmi_se_12_timestamp_clock_type, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1240 return false;
1243 static bool
1244 ssi_19_2(proto_tree *tree, tvbuff_t *tvb, const struct sensor_info *si _U_,
1245 uint32_t b, uint32_t offs, uint32_t d _U_)
1247 if (b == 0x3 && offs == 0x00) {
1248 proto_tree_add_item(tree, hf_ipmi_se_19_requested_power_state, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1249 return true;
1251 return false;
1254 static bool
1255 ssi_19_3(proto_tree *tree, tvbuff_t *tvb, const struct sensor_info *si _U_,
1256 uint32_t b, uint32_t offs, uint32_t d _U_)
1258 if (b == 0x3 && offs == 0x00) {
1259 proto_tree_add_item(tree, hf_ipmi_se_19_power_state, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1260 return true;
1262 return false;
1265 /* Copied from ipmi_chassis.c */
1266 static const value_string ssi_1d_2_cause_vals[] = {
1267 { 0x00, "Unknown" },
1268 { 0x01, "Chassis Control command" },
1269 { 0x02, "Reset via pushbutton" },
1270 { 0x03, "Power-up via pushbutton" },
1271 { 0x04, "Watchdog expiration" },
1272 { 0x05, "OEM" },
1273 { 0x06, "Automatic power-up on AC being applied due to 'always restore' power restore policy" },
1274 { 0x07, "Automatic power-up on AC being applied due to 'restore previous power state' power restore policy" },
1275 { 0x08, "Reset via PEF" },
1276 { 0x09, "Power-cycle via PEF" },
1277 { 0x0a, "Soft reset" },
1278 { 0x0b, "Power-up via RTC wakeup" },
1279 { 0, NULL }
1282 static bool
1283 ssi_1d_2(proto_tree *tree, tvbuff_t *tvb, const struct sensor_info *si _U_,
1284 uint32_t b, uint32_t offs, uint32_t d _U_)
1286 if (b == 0x3 && offs == 0x07) {
1287 proto_tree_add_item(tree, hf_ipmi_se_1d_restart_cause, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1288 return true;
1290 return false;
1293 static bool
1294 ssi_1d_3(proto_tree *tree, tvbuff_t *tvb, const struct sensor_info *si _U_,
1295 uint32_t b, uint32_t offs, uint32_t d _U_)
1297 char s[ITEM_LABEL_LENGTH];
1299 ipmi_fmt_channel(s, d);
1300 if (b == 0x3 && offs == 0x07) {
1301 proto_tree_add_item(tree, hf_ipmi_se_1d_channel, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1302 return true;
1304 return false;
1307 static const value_string ssi_21_2_type_vals[] = {
1308 { 0x00, "PCI" },
1309 { 0x01, "Drive Array" },
1310 { 0x02, "External Peripheral Connector" },
1311 { 0x03, "Docking" },
1312 { 0x04, "Other standard internal expansion slot" },
1313 { 0x05, "Slot associated with entity specified by Entity ID for sensor" },
1314 { 0x06, "AdvancedTCA" },
1315 { 0x07, "DIMM/Memory device" },
1316 { 0x08, "FAN" },
1317 { 0x09, "PCI Express" },
1318 { 0x0a, "SCSI (parallel)" },
1319 { 0x0b, "SATA/SAS" },
1320 { 0, NULL }
1323 static bool
1324 ssi_21_2(proto_tree *tree, tvbuff_t *tvb, const struct sensor_info *si _U_,
1325 uint32_t b, uint32_t offs _U_, uint32_t d _U_)
1327 if (b == 0x3) {
1328 proto_tree_add_item(tree, hf_ipmi_se_21_slot_connector_type, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1329 return true;
1331 return false;
1334 static bool
1335 ssi_21_3(proto_tree *tree, tvbuff_t *tvb, const struct sensor_info *si _U_,
1336 uint32_t b, uint32_t offs _U_, uint32_t d _U_)
1338 if (b == 0x3) {
1339 proto_tree_add_item(tree, hf_ipmi_se_21_slot_connector, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1340 return true;
1342 return false;
1345 static const value_string ssi_23_2_intr_vals[] = {
1346 { 0x00, "None" },
1347 { 0x01, "SMI" },
1348 { 0x02, "NMI" },
1349 { 0x03, "Messaging interrupt" },
1350 { 0x0f, "Unspecified" },
1351 { 0, NULL }
1353 static const value_string ssi_23_2_use_vals[] = {
1354 { 0x01, "BIOS FRB2" },
1355 { 0x02, "BIOS/POST" },
1356 { 0x03, "OS Load" },
1357 { 0x04, "SMS/OS" },
1358 { 0x05, "OEM" },
1359 { 0x0f, "Unspecified" },
1360 { 0, NULL }
1363 static bool
1364 ssi_23_2(proto_tree *tree, tvbuff_t *tvb, const struct sensor_info *si _U_,
1365 uint32_t b, uint32_t offs _U_, uint32_t d _U_)
1367 proto_tree *s_tree;
1369 if (b == 0x3) {
1370 s_tree = proto_tree_add_subtree(tree, tvb, 0, 1, ett_ipmi_se_evt_evd_byte2, NULL, "Timer use/interrupt");
1371 proto_tree_add_item(s_tree, hf_ipmi_se_23_interrupt_type, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1372 proto_tree_add_item(s_tree, hf_ipmi_se_23_timer_use_at_expiration, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1374 return true;
1376 return false;
1379 static int ssi28_is_logical_fru;
1381 static bool
1382 ssi_28_2(proto_tree *tree, tvbuff_t *tvb, const struct sensor_info *si _U_,
1383 uint32_t b, uint32_t offs _U_, uint32_t d)
1385 proto_tree *s_tree;
1387 if (b == 0x3 && (offs == 0x00 || offs == 0x04)) {
1388 proto_tree_add_item(tree, hf_ipmi_se_28_sensor_number, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1389 return true;
1391 if (b == 0x3 && offs == 0x05) {
1392 s_tree = proto_tree_add_subtree(tree, tvb, 0, 1, ett_ipmi_se_evt_evd_byte2, NULL, "FRU details");
1393 ssi28_is_logical_fru = (d & 0x80) ? 1 : 0;
1394 proto_tree_add_item(s_tree, hf_ipmi_se_28_logical_fru_device, tvb, 0, 1, ENC_NA);
1395 proto_tree_add_item(s_tree, hf_ipmi_se_28_lun_for_master_read_write_command, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1396 proto_tree_add_item(s_tree, hf_ipmi_se_28_private_bus_id, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1397 return true;
1399 return false;
1402 static bool
1403 ssi_28_3(proto_tree *tree, tvbuff_t *tvb, const struct sensor_info *si _U_,
1404 uint32_t b, uint32_t offs _U_, uint32_t d _U_)
1406 if (b == 0x3 && offs == 0x05) {
1407 if (ssi28_is_logical_fru == -1) {
1408 return false; /* something went wrong */
1410 if (ssi28_is_logical_fru) {
1411 proto_tree_add_item(tree, hf_ipmi_se_28_fru_device_id_within_controller, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1412 } else {
1413 proto_tree_add_item(tree, hf_ipmi_se_28_i2c_slave_address, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1415 return true;
1417 return false;
1420 static bool
1421 ssi_2a_2(proto_tree *tree, tvbuff_t *tvb, const struct sensor_info *si _U_,
1422 uint32_t b, uint32_t offs _U_, uint32_t d)
1424 proto_item *ti;
1426 if (b == 0x3) {
1427 ti = proto_tree_add_item(tree, hf_ipmi_se_2a_user_id, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1428 if ((d & 0x3f) == 0)
1429 proto_item_append_text(ti, " (unspecified)");
1431 return false;
1434 static const value_string ssi_2a_3_deact_vals[] = {
1435 { 0x00, "Unspecified cause" },
1436 { 0x01, "Close Session command" },
1437 { 0x02, "Timeout" },
1438 { 0x03, "Configuration change" },
1439 { 0, NULL }
1442 static bool
1443 ssi_2a_3(proto_tree *tree, tvbuff_t *tvb, const struct sensor_info *si _U_,
1444 uint32_t b, uint32_t offs _U_, uint32_t d _U_)
1446 proto_tree *s_tree;
1448 if (b == 0x3) {
1449 s_tree = proto_tree_add_subtree(tree, tvb, 0, 1, ett_ipmi_se_evt_evd_byte3, NULL, "Deactivation cause/Channel #");
1450 proto_tree_add_item(s_tree, hf_ipmi_se_2a_session_deactivated_by, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1451 proto_tree_add_item(s_tree, hf_ipmi_se_2a_channel, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1452 return true;
1454 return false;
1457 static const value_string ssi_2b_2_vctype_vals[] = {
1458 { 0x00, "Unspecified" },
1459 { 0x01, "Management controller device ID" },
1460 { 0x02, "Management controller firmware revision" },
1461 { 0x03, "Management controller device revision" },
1462 { 0x04, "Management controller manufacturer ID" },
1463 { 0x05, "Management controller IPMI version" },
1464 { 0x06, "Management controller auxiliary firmware ID" },
1465 { 0x07, "Management controller firmware boot block" },
1466 { 0x08, "Other management controller firmware" },
1467 { 0x09, "System firmware (EFI/BIOS) change" },
1468 { 0x0a, "SMBIOS change" },
1469 { 0x0b, "Operating system change" },
1470 { 0x0c, "Operating system loader change" },
1471 { 0x0d, "Service or diagnostic partition change" },
1472 { 0x0e, "Management software agent change" },
1473 { 0x0f, "Management software application change" },
1474 { 0x10, "Management software middleware change" },
1475 { 0x11, "Programmable hardware change" },
1476 { 0x12, "Board/FRU module change" },
1477 { 0x13, "Board/FRU component change" },
1478 { 0x14, "Board/FRU replaced with equivalent version" },
1479 { 0x15, "Board/FRU replaced with newer version" },
1480 { 0x16, "Board/FRU replaced with older version" },
1481 { 0x17, "Board/FRU configuration change" },
1482 { 0, NULL }
1485 static bool
1486 ssi_2b_2(proto_tree *tree, tvbuff_t *tvb, const struct sensor_info *si _U_,
1487 uint32_t b, uint32_t offs _U_, uint32_t d _U_)
1489 if (b == 0x3) {
1490 proto_tree_add_item(tree, hf_ipmi_se_2b_version_change_type, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1491 return true;
1493 return false;
1496 static const value_string ssi_2c_2_cause_vals[] = {
1497 { 0x00, "Normal State Change" },
1498 { 0x01, "Change commanded by software external to FRU" },
1499 { 0x02, "State Change due to operator changing a handle latch" },
1500 { 0x03, "State Change due to operator pressing the hot swap push button" },
1501 { 0x04, "State Change due to FRU programmatic action" },
1502 { 0x05, "Communication lost" },
1503 { 0x06, "Communication lost due to local failure" },
1504 { 0x07, "State Change due to unexpected extraction" },
1505 { 0x08, "State Change due to operator intervention/update" },
1506 { 0x09, "Unable to compute IPMB address" },
1507 { 0x0a, "Unexpected Deactivation" },
1508 { 0x0f, "State Change, Cause Unknown" },
1509 { 0, NULL }
1512 static bool
1513 ssi_2c_2(proto_tree *tree, tvbuff_t *tvb, const struct sensor_info *si,
1514 uint32_t b, uint32_t offs _U_, uint32_t d)
1516 proto_tree *s_tree;
1518 if (b == 0x3) {
1519 s_tree = proto_tree_add_subtree(tree, tvb, 0, 1, ett_ipmi_se_evt_evd_byte2, NULL, "Previous state/Cause");
1520 proto_tree_add_item(s_tree, hf_ipmi_se_2c_cause, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1521 d &= 0xf;
1522 proto_tree_add_uint_format_value(s_tree, hf_ipmi_se_2c_previous_state, tvb, 0, 1,
1523 d, "%s (0x%02x)", val_to_str_const(d, si->offsets, "Reserved"), d);
1524 return true;
1526 return false;
1529 static const value_string ssi_f0_2_cause_vals[] = {
1530 { 0x00, "Normal State Change" },
1531 { 0x01, "Change Commanded by Shelf Manager with Set FRU Activation" },
1532 { 0x02, "State Change due to operator changing a Handle Switch" },
1533 { 0x03, "State Change due to FRU programmatic action" },
1534 { 0x04, "Communication Lost or Regained" },
1535 { 0x05, "Communication Lost or Regained - locally detected" },
1536 { 0x06, "Surprise State Change due to extraction" },
1537 { 0x07, "State Change due to provided information" },
1538 { 0x08, "Invalid Hardware Address Detected" },
1539 { 0x09, "Unexpected Deactivation" },
1540 { 0x0f, "State Change, Cause Unknown" },
1541 { 0, NULL }
1544 static bool
1545 ssi_f0_2(proto_tree *tree, tvbuff_t *tvb, const struct sensor_info *si,
1546 uint32_t b, uint32_t offs _U_, uint32_t d)
1548 proto_tree *s_tree;
1550 if (b == 0x2) {
1551 s_tree = proto_tree_add_subtree(tree, tvb, 0, 1, ett_ipmi_se_evt_evd_byte2, NULL, "Previous state/Cause");
1552 proto_tree_add_item(s_tree, hf_ipmi_se_f0_cause, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1553 d &= 0xf;
1554 proto_tree_add_uint_format_value(s_tree, hf_ipmi_se_f0_previous_state, tvb, 0, 1,
1555 d, "%s (0x%02x)", val_to_str_const(d, si->offsets, "Reserved"), d);
1556 return true;
1558 return false;
1561 static bool
1562 ssi_f0_3(proto_tree *tree, tvbuff_t *tvb, const struct sensor_info *si _U_,
1563 uint32_t b, uint32_t offs _U_, uint32_t d _U_)
1565 if (b == 0x2) {
1566 proto_tree_add_item(tree, hf_ipmi_se_f0_fru_id, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1567 return true;
1569 return false;
1572 static bool
1573 ssi_f1_2(proto_tree *tree, tvbuff_t *tvb, const struct sensor_info *si _U_,
1574 uint32_t b, uint32_t offs _U_, uint32_t d _U_)
1576 if (b == 0x02) {
1577 proto_tree_add_item(tree, hf_ipmi_se_f1_channel, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1578 return true;
1580 return false;
1583 static const true_false_string tfs_f1_3_override_state = {
1584 "Override state, bus isolated",
1585 "Local control state"
1588 static const value_string ssi_f1_3_status_vals[] = {
1589 { 0x00, "No failure" },
1590 { 0x01, "Unable to drive clock HI" },
1591 { 0x02, "Unable to drive data HI" },
1592 { 0x03, "Unable to drive clock LO" },
1593 { 0x04, "Unable to drive data LO" },
1594 { 0x05, "Clock low timeout" },
1595 { 0x06, "Under test" },
1596 { 0x07, "Undiagnosed communications failure" },
1597 { 0, NULL }
1600 static bool
1601 ssi_f1_3(proto_tree *tree, tvbuff_t *tvb, const struct sensor_info *si _U_,
1602 uint32_t b, uint32_t offs _U_, uint32_t d _U_)
1604 proto_tree *s_tree;
1606 if (b == 0x02) {
1607 s_tree = proto_tree_add_subtree(tree, tvb, 0, 1, ett_ipmi_se_evt_evd_byte3, NULL, "Override state / Local status");
1608 proto_tree_add_item(s_tree, hf_ipmi_se_f1_ipmb_b_override_state, tvb, 0, 1, ENC_NA);
1609 proto_tree_add_item(s_tree, hf_ipmi_se_f1_ipmb_b_local_status, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1610 proto_tree_add_item(s_tree, hf_ipmi_se_f1_ipmb_a_override_state, tvb, 0, 1, ENC_NA);
1611 proto_tree_add_item(s_tree, hf_ipmi_se_f1_ipmb_a_local_status, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1612 return true;
1614 return false;
1617 static const true_false_string tfs_provide_not_provide_payload_current = {
1618 "providing Payload Current",
1619 "not providing Payload Current (or this is Primary PM)"
1622 static const true_false_string tfs_is_good_not_good = {
1623 "is good",
1624 "is not good"
1627 static const true_false_string tfs_primary_redundant = {
1628 "Primary",
1629 "Redundant"
1632 static const true_false_string tfs_asserted_not_asserted = {
1633 "Asserted",
1634 "Not asserted"
1637 static bool
1638 ssi_f3_2(proto_tree *tree, tvbuff_t *tvb, const struct sensor_info *si _U_,
1639 uint32_t b, uint32_t offs, uint32_t d _U_)
1641 proto_tree *s_tree;
1642 proto_item *ti;
1644 if (b == 0x02 && offs == 0x00) {
1645 /* Global status change */
1646 ti = proto_tree_add_item(tree, hf_ipmi_se_f3_global_status, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1647 s_tree = proto_item_add_subtree(ti, ett_ipmi_se_evt_evd_byte2);
1648 proto_tree_add_item(s_tree, hf_ipmi_se_f3_redundant_pm, tvb, 0, 1, ENC_NA);
1649 proto_tree_add_item(s_tree, hf_ipmi_se_f3_gs_payload_power, tvb, 0, 1, ENC_NA);
1650 proto_tree_add_item(s_tree, hf_ipmi_se_f3_gs_management_power, tvb, 0, 1, ENC_NA);
1651 proto_tree_add_item(s_tree, hf_ipmi_se_f3_role, tvb, 0, 1, ENC_NA);
1652 return true;
1653 } else if (b == 0x02 && offs == 0x01) {
1654 /* Channel status change */
1655 ti = proto_tree_add_item(tree, hf_ipmi_se_f3_channel_status, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1656 s_tree = proto_item_add_subtree(ti, ett_ipmi_se_evt_evd_byte2);
1657 proto_tree_add_item(s_tree, hf_ipmi_se_f3_pwr_on, tvb, 0, 1, ENC_NA);
1658 proto_tree_add_item(s_tree, hf_ipmi_se_f3_payload_power_overcurrent, tvb, 0, 1, ENC_NA);
1659 proto_tree_add_item(s_tree, hf_ipmi_se_f3_channel_payload_power, tvb, 0, 1, ENC_NA);
1660 proto_tree_add_item(s_tree, hf_ipmi_se_f3_enable, tvb, 0, 1, ENC_NA);
1661 proto_tree_add_item(s_tree, hf_ipmi_se_f3_management_power_overcurrent, tvb, 0, 1, ENC_NA);
1662 proto_tree_add_item(s_tree, hf_ipmi_se_f3_channel_management_power, tvb, 0, 1, ENC_NA);
1663 proto_tree_add_item(s_tree, hf_ipmi_se_f3_ps1, tvb, 0, 1, ENC_NA);
1664 return true;
1667 return false;
1670 static bool
1671 ssi_f3_3(proto_tree *tree, tvbuff_t *tvb, const struct sensor_info *si _U_,
1672 uint32_t b, uint32_t offs, uint32_t d _U_)
1674 if (b == 0x02 && offs == 0x01) {
1675 /* Channel status change */
1676 proto_tree_add_item(tree, hf_ipmi_se_f3_power_channel_number, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1677 return true;
1680 return false;
1683 static void
1684 reinit_statics(void)
1686 ssi_10_saveptr = NULL;
1687 ssi28_is_logical_fru = -1;
1690 static const struct sensor_info *
1691 get_sensor_info(unsigned int stype)
1693 static const struct {
1694 unsigned int id;
1695 struct sensor_info si;
1696 } si_tab[] = {
1697 { 0x01, { NULL, NULL, NULL, "Temperature" }},
1698 { 0x02, { NULL, NULL, NULL, "Voltage" }},
1699 { 0x03, { NULL, NULL, NULL, "Current" }},
1700 { 0x04, { NULL, NULL, NULL, "Fan" }},
1701 { 0x05, { ssoff_05, ssi_05_2, NULL, "Physical Security (Chassis Intrusion)" }},
1702 { 0x06, { ssoff_06, NULL, NULL, "Platform Security Violation Attempt" }},
1703 { 0x07, { ssoff_07, NULL, NULL, "Processor" }},
1704 { 0x08, { ssoff_08, NULL, ssi_08_3, "Power Supply" }},
1705 { 0x09, { ssoff_09, NULL, NULL, "Power Unit" }},
1706 { 0x0a, { NULL, NULL, NULL, "Cooling Device" }},
1707 { 0x0b, { NULL, NULL, NULL, "Other Units-based Sensor (per units given in SDR)" }},
1708 { 0x0c, { ssoff_0c, NULL, ssi_0c_3, "Memory" }},
1709 { 0x0d, { ssoff_0d, NULL, NULL, "Drive Slot (Bay)" }},
1710 { 0x0e, { NULL, NULL, NULL, "POST Memory Resize" }},
1711 { 0x0f, { ssoff_0f, ssi_0f_2, NULL, "System Firmware Progress (formerly POST Error)" }},
1712 { 0x10, { ssoff_10, ssi_10_2, ssi_10_3, "Event Logging Disabled" }},
1713 { 0x11, { ssoff_11, NULL, NULL, "Watchdog 1" }},
1714 { 0x12, { ssoff_12, ssi_12_2, NULL, "System Event" }},
1715 { 0x13, { ssoff_13, NULL, NULL, "Critical Interrupt" }},
1716 { 0x14, { ssoff_14, NULL, NULL, "Button" }},
1717 { 0x15, { NULL, NULL, NULL, "Module / Board" }},
1718 { 0x16, { NULL, NULL, NULL, "Microcontroller / Coprocessor" }},
1719 { 0x17, { NULL, NULL, NULL, "Add-in Card" }},
1720 { 0x18, { NULL, NULL, NULL, "Chassis" }},
1721 { 0x19, { ssoff_19, ssi_19_2, ssi_19_3, "Chip Set" }},
1722 { 0x1a, { NULL, NULL, NULL, "Other FRU" }},
1723 { 0x1b, { ssoff_1b, NULL, NULL, "Cable / Interconnect" }},
1724 { 0x1c, { NULL, NULL, NULL, "Terminator" }},
1725 { 0x1d, { ssoff_1d, ssi_1d_2, ssi_1d_3, "System Boot / Restart Initiated" }},
1726 { 0x1e, { ssoff_1e, NULL, NULL, "Boot Error" }},
1727 { 0x1f, { ssoff_1f, NULL, NULL, "OS Boot" }},
1728 { 0x20, { ssoff_20, NULL, NULL, "OS Critical Stop" }},
1729 { 0x21, { ssoff_21, ssi_21_2, ssi_21_3, "Slot / Connector" }},
1730 { 0x22, { ssoff_22, NULL, NULL, "System ACPI Power State" }},
1731 { 0x23, { ssoff_23, ssi_23_2, NULL, "Watchdog 2" }},
1732 { 0x24, { ssoff_24, NULL, NULL, "Platform Alert" }},
1733 { 0x25, { ssoff_25, NULL, NULL, "Entity Presence" }},
1734 { 0x26, { NULL, NULL, NULL, "Monitor ASIC / IC" }},
1735 { 0x27, { ssoff_27, NULL, NULL, "LAN" }},
1736 { 0x28, { ssoff_28, ssi_28_2, ssi_28_3, "Management Subsystem Health" }},
1737 { 0x29, { ssoff_29, NULL, NULL, "Battery" }},
1738 { 0x2a, { ssoff_2a, ssi_2a_2, ssi_2a_3, "Session Audit" }},
1739 { 0x2b, { ssoff_2b, ssi_2b_2, NULL, "Version Change" }},
1740 { 0x2c, { ssoff_2c, ssi_2c_2, NULL, "FRU State" }},
1741 { 0xf0, { ssoff_f0, ssi_f0_2, ssi_f0_3, "Hot Swap (ATCA)" }},
1742 { 0xf1, { ssoff_f1, ssi_f1_2, ssi_f1_3, "IPMB Physical State (ATCA)" }},
1743 { 0xf2, { ssoff_f2, NULL, NULL, "Module Hot Swap (AMC.0)" }},
1744 { 0xf3, { ssoff_f3, ssi_f3_2, ssi_f3_3, "Power Channel Notification" }},
1745 { 0xf4, { ssoff_f4, NULL, NULL, "Telco Alarm Input" }}
1747 static const struct sensor_info si_oem = {
1748 NULL, NULL, NULL, "OEM Reserved"
1750 static const struct sensor_info si_rsrv = {
1751 NULL, NULL, NULL, "Reserved"
1753 unsigned int i;
1755 /* Look for explicitly defined ones */
1756 for (i = 0; i < array_length(si_tab); i++) {
1757 if (si_tab[i].id == stype) {
1758 return &si_tab[i].si;
1762 if (stype >= 0xc0 && stype <= 0xff) {
1763 return &si_oem;
1766 return &si_rsrv;
1769 static void
1770 parse_platform_event(tvbuff_t *tvb, proto_tree *tree)
1772 proto_item *ti;
1773 proto_tree *s_tree;
1774 tvbuff_t *next_tvb;
1775 unsigned int stype, evtype;
1776 const struct sensor_info *si;
1777 const struct evtype_info *eti;
1778 unsigned int d, b2, b3, offs;
1779 const value_string *off_vals;
1781 stype = tvb_get_uint8(tvb, 1);
1782 si = get_sensor_info(stype);
1783 evtype = tvb_get_uint8(tvb, 3) & 0x7f;
1784 eti = get_evtype_info(evtype);
1786 proto_tree_add_item(tree, hf_ipmi_se_evt_rev, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1787 proto_tree_add_uint_format_value(tree, hf_ipmi_se_evt_sensor_type, tvb, 1, 1, stype,
1788 "%s (0x%02x)", si->desc, stype);
1789 proto_tree_add_item(tree, hf_ipmi_se_evt_sensor_num, tvb, 2, 1, ENC_LITTLE_ENDIAN);
1790 ti = proto_tree_add_item(tree, hf_ipmi_se_evt_byte3, tvb, 3, 1, ENC_LITTLE_ENDIAN);
1791 s_tree = proto_item_add_subtree(ti, ett_ipmi_se_evt_byte3);
1792 proto_tree_add_item(s_tree, hf_ipmi_se_evt_dir, tvb, 3, 1, ENC_LITTLE_ENDIAN);
1793 proto_tree_add_item(s_tree, hf_ipmi_se_evt_type, tvb, 3, 1, ENC_LITTLE_ENDIAN);
1795 offs = tvb_get_uint8(tvb, 4);
1796 b2 = offs >> 6;
1797 b3 = (offs >> 4) & 0x3;
1798 off_vals = eti->offsets ? eti->offsets : si->offsets ? si->offsets : et_empty;
1800 ti = proto_tree_add_item(tree, hf_ipmi_se_evt_data1, tvb, 4, 1, ENC_LITTLE_ENDIAN);
1801 s_tree = proto_item_add_subtree(ti, ett_ipmi_se_evt_evd_byte1);
1802 proto_tree_add_uint_format_value(s_tree, hf_ipmi_se_evt_data1_b2, tvb, 4, 1, offs,
1803 "%s (0x%02x)", val_to_str_const(b2, eti->byte2, "Reserved"), b2);
1804 proto_tree_add_uint_format_value(s_tree, hf_ipmi_se_evt_data1_b3, tvb, 4, 1, offs,
1805 "%s (0x%02x)", val_to_str_const(b3, eti->byte3, "Reserved"), b3);
1806 offs &= 0x0f;
1807 proto_tree_add_uint_format_value(s_tree, hf_ipmi_se_evt_data1_offs, tvb, 4, 1, offs,
1808 "%s (0x%02x)", val_to_str_const(offs, off_vals, "Reserved"), offs);
1810 /* This is tricky. First, bytes 2-3 are optional and may be absent.
1811 Second, the necessity to interpret them either in a generic way or in
1812 sensor-specific way depends on the value in byte 1. And at last,
1813 there could be mixture of both ways: the byte 2 can relate to
1814 'previous state', which could be sensor-specific.
1816 Thus, intrp() methods return whether they actually handled the
1817 value. If the 'generic' (related to event/reading type) method fails
1818 to handle the value, we call the 'specific' one. If that fails as
1819 well, we just output it as a hex value.
1821 This is further complicated by the fact that in some events, the
1822 interpretation of the byte 3 depends on the 2nd byte - which could
1823 be specified as having some generic type. Thus, we check it and
1824 fall back to "default" display in such weird cases.
1826 reinit_statics();
1827 if (tvb_captured_length(tvb) <= 5) {
1828 return;
1831 next_tvb = tvb_new_subset_length(tvb, 5, 1);
1832 d = tvb_get_uint8(next_tvb, 0);
1833 if ((eti->intrp2 && eti->intrp2(tree, next_tvb, si, b2, offs, d))
1834 || (si->intrp2 && si->intrp2(tree, next_tvb, si, b2, offs, d))) {
1835 /* One of them succeeded. */
1836 ti = proto_tree_add_item(tree, hf_ipmi_se_evt_data2, next_tvb, 0, 1, ENC_LITTLE_ENDIAN);
1837 proto_item_set_hidden(ti);
1838 } else {
1839 /* Just add as hex */
1840 proto_tree_add_item(tree, hf_ipmi_se_evt_data2, next_tvb, 0, 1, ENC_LITTLE_ENDIAN);
1843 /* Now the same for byte 3 */
1844 if (tvb_captured_length(tvb) <= 6) {
1845 return;
1848 next_tvb = tvb_new_subset_length(tvb, 6, 1);
1849 d = tvb_get_uint8(next_tvb, 0);
1850 if ((eti->intrp3 && eti->intrp3(tree, next_tvb, si, b3, offs, d))
1851 || (si->intrp3 && si->intrp3(tree, next_tvb, si, b3, offs, d))) {
1852 /* One of them succeeded. */
1853 ti = proto_tree_add_item(tree, hf_ipmi_se_evt_data3, next_tvb, 0, 1, ENC_LITTLE_ENDIAN);
1854 proto_item_set_hidden(ti);
1855 } else {
1856 /* Just add as hex */
1857 proto_tree_add_item(tree, hf_ipmi_se_evt_data3, next_tvb, 0, 1, ENC_LITTLE_ENDIAN);
1861 /* Common for set/get config parameters */
1862 static const value_string cp00_sip_vals[] = {
1863 { 0x00, "Set complete" },
1864 { 0x01, "Set in progress" },
1865 { 0x02, "Commit write" },
1866 { 0x03, "Reserved" },
1867 { 0, NULL }
1870 static const struct true_false_string cp10_use_tfs = {
1871 "BMC uses the following value",
1872 "BMC uses the value returned from Get System GUID command"
1875 static const struct true_false_string cp15_rq_frc_tfs = {
1876 "Force control operation",
1877 "Request control operation"
1880 static const struct true_false_string cp15_imm_delay_tfs = {
1881 "Delayed control",
1882 "Immediate control"
1885 static const value_string cp15_op_vals[] = {
1886 { 0x00, "Power down" },
1887 { 0x01, "Power up" },
1888 { 0x02, "Power cycle" },
1889 { 0x03, "Hard reset" },
1890 { 0x04, "Pulse diagnostic interrupt" },
1891 { 0x05, "Initiate a soft-shutdown of OS via ACPI by emulating a fatal overtemperature" },
1892 { 0, NULL }
1895 static const value_string unique_selects_volatile_string_parameters[] = {
1896 { 0, "Selects volatile string parameters" },
1897 { 0, NULL }
1900 static const value_string unique_disable_message_generation[] = {
1901 { 0xFF, "Disable Message Generation" },
1902 { 0, NULL }
1905 static const value_string unique_sel_is_empty[] = {
1906 { 0xFFFF, "SEL is empty" },
1907 { 0, NULL }
1910 static const value_string unique_event_processed_not_logged[] = {
1911 { 0, "Event processed but cannot be logged" },
1912 { 0, NULL }
1915 static void
1916 cfgparam_00(tvbuff_t *tvb, packet_info* pinfo _U_, proto_tree *tree)
1918 proto_tree_add_item(tree, hf_ipmi_se_cp00_sip, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1921 static void
1922 cfgparam_01(tvbuff_t *tvb, packet_info* pinfo _U_, proto_tree *tree)
1924 proto_tree_add_item(tree, hf_ipmi_se_cp01_alert_startup, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1925 proto_tree_add_item(tree, hf_ipmi_se_cp01_startup, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1926 proto_tree_add_item(tree, hf_ipmi_se_cp01_event_msg, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1927 proto_tree_add_item(tree, hf_ipmi_se_cp01_pef, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1930 static void
1931 cfgparam_02(tvbuff_t *tvb, packet_info* pinfo _U_, proto_tree *tree)
1933 proto_tree_add_item(tree, hf_ipmi_se_cp02_diag_intr, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1934 proto_tree_add_item(tree, hf_ipmi_se_cp02_oem_action, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1935 proto_tree_add_item(tree, hf_ipmi_se_cp02_pwr_cycle, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1936 proto_tree_add_item(tree, hf_ipmi_se_cp02_reset, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1937 proto_tree_add_item(tree, hf_ipmi_se_cp02_pwr_down, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1938 proto_tree_add_item(tree, hf_ipmi_se_cp02_alert, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1942 static void
1943 cfgparam_03(tvbuff_t *tvb, packet_info* pinfo _U_, proto_tree *tree)
1945 proto_tree_add_item(tree, hf_ipmi_se_cp03_startup, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1948 static void
1949 cfgparam_04(tvbuff_t *tvb, packet_info* pinfo _U_, proto_tree *tree)
1951 proto_tree_add_item(tree, hf_ipmi_se_cp04_alert_startup, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1954 static void
1955 cfgparam_05(tvbuff_t *tvb, packet_info* pinfo _U_, proto_tree *tree)
1957 proto_tree_add_item(tree, hf_ipmi_se_cp05_num_evfilters, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1960 static void
1961 cfgparam_06(tvbuff_t *tvb, packet_info* pinfo _U_, proto_tree *tree)
1963 proto_tree_add_item(tree, hf_ipmi_se_cp06_filter, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1964 proto_tree_add_item(tree, hf_ipmi_se_cp06_data, tvb, 1, 20, ENC_NA);
1967 static void
1968 cfgparam_07(tvbuff_t *tvb, packet_info* pinfo _U_, proto_tree *tree)
1970 proto_tree_add_item(tree, hf_ipmi_se_cp07_filter, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1971 proto_tree_add_item(tree, hf_ipmi_se_cp06_data, tvb, 1, 1, ENC_NA);
1974 static void
1975 cfgparam_08(tvbuff_t *tvb, packet_info* pinfo _U_, proto_tree *tree)
1977 proto_tree_add_item(tree, hf_ipmi_se_cp08_policies, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1980 static void
1981 cfgparam_09(tvbuff_t *tvb, packet_info* pinfo _U_, proto_tree *tree)
1983 proto_tree_add_item(tree, hf_ipmi_se_cp09_entry, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1984 proto_tree_add_item(tree, hf_ipmi_se_cp09_data, tvb, 1, 3, ENC_NA);
1987 static void
1988 cfgparam_10(tvbuff_t *tvb, packet_info* pinfo _U_, proto_tree *tree)
1990 proto_tree_add_item(tree, hf_ipmi_se_cp10_useval, tvb, 0, 1, ENC_NA);
1991 ipmi_add_guid(tree, hf_ipmi_se_cp10_guid, tvb, 1);
1994 static void
1995 cfgparam_11(tvbuff_t *tvb, packet_info* pinfo _U_, proto_tree *tree)
1997 proto_tree_add_item(tree, hf_ipmi_se_cp11_num_alertstr, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2000 static void
2001 cfgparam_12(tvbuff_t *tvb, packet_info* pinfo _U_, proto_tree *tree)
2003 proto_item *ti;
2004 proto_tree *s_tree;
2006 ti = proto_tree_add_item(tree, hf_ipmi_se_cp12_byte1, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2007 s_tree = proto_item_add_subtree(ti, ett_ipmi_se_cp12_byte1);
2008 proto_tree_add_item(s_tree, hf_ipmi_se_cp12_alert_stringsel, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2009 proto_tree_add_item(tree, hf_ipmi_se_cp12_evfilter, tvb, 1, 1, ENC_LITTLE_ENDIAN);
2010 proto_tree_add_item(tree, hf_ipmi_se_cp12_alert_stringset, tvb, 2, 1, ENC_LITTLE_ENDIAN);
2013 static void
2014 cfgparam_13(tvbuff_t *tvb, packet_info* pinfo _U_, proto_tree *tree)
2016 proto_tree_add_item(tree, hf_ipmi_se_cp13_stringsel, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2017 proto_tree_add_item(tree, hf_ipmi_se_cp13_blocksel, tvb, 1, 1, ENC_LITTLE_ENDIAN);
2018 proto_tree_add_item(tree, hf_ipmi_se_cp13_string, tvb, 2, -1, ENC_ASCII);
2021 static void
2022 cfgparam_14(tvbuff_t *tvb, packet_info* pinfo _U_, proto_tree *tree)
2024 proto_tree_add_item(tree, hf_ipmi_se_cp14_num_gct, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2027 static void
2028 cp15_add_group_and_member(proto_tree *tree, tvbuff_t *tvb, unsigned offs, unsigned num)
2030 static int * const byte2[] = { &hf_ipmi_se_cp15_member_check, &hf_ipmi_se_cp15_member_id, NULL };
2031 const char *gdesc;
2032 uint8_t tmp;
2034 tmp = tvb_get_uint8(tvb, offs);
2035 if (tmp == 0x00) {
2036 gdesc = " (unspecified)";
2037 } else if (tmp == 0xff) {
2038 gdesc = " (all groups)";
2039 } else {
2040 gdesc = "";
2043 proto_tree_add_uint_format(tree, hf_ipmi_se_cp15_group, tvb, offs, 1, tmp,
2044 "Group ID %d: %d%s", num, tmp, gdesc);
2045 proto_tree_add_bitmask_text(tree, tvb, offs + 1, 1, NULL, NULL, ett_ipmi_se_cp15_member, byte2, ENC_LITTLE_ENDIAN, 0);
2048 static void
2049 cfgparam_15(tvbuff_t *tvb, packet_info* pinfo _U_, proto_tree *tree)
2051 static int * const byte2[] = { &hf_ipmi_se_cp15_force, &hf_ipmi_se_cp15_delayed, &hf_ipmi_se_cp15_channel, NULL };
2052 static int * const byte11[] = { &hf_ipmi_se_cp15_retries, &hf_ipmi_se_cp15_operation, NULL };
2054 proto_tree_add_item(tree, hf_ipmi_se_cp15_gctsel, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2055 proto_tree_add_bitmask_text(tree, tvb, 1, 1, NULL, NULL, ett_ipmi_se_cp15_byte2, byte2, ENC_LITTLE_ENDIAN, 0);
2056 cp15_add_group_and_member(tree, tvb, 2, 0);
2057 cp15_add_group_and_member(tree, tvb, 4, 1);
2058 cp15_add_group_and_member(tree, tvb, 6, 2);
2059 cp15_add_group_and_member(tree, tvb, 8, 3);
2060 proto_tree_add_bitmask_text(tree, tvb, 10, 1, NULL, NULL, ett_ipmi_se_cp15_byte11, byte11, ENC_LITTLE_ENDIAN, 0);
2063 static struct {
2064 void (*intrp)(tvbuff_t *tvb, packet_info* pinfo, proto_tree *tree);
2065 const char *name;
2066 } conf_params[] = {
2067 { cfgparam_00, "Set In Progress" },
2068 { cfgparam_01, "PEF Control" },
2069 { cfgparam_02, "PEF Action global control" },
2070 { cfgparam_03, "PEF Startup Delay" },
2071 { cfgparam_04, "PEF Alert Startup Delay" },
2072 { cfgparam_05, "Number of Event Filters" },
2073 { cfgparam_06, "Event Filter Table" },
2074 { cfgparam_07, "Event Filter Table Data 1" },
2075 { cfgparam_08, "Number of Alert Policy Entries" },
2076 { cfgparam_09, "Alert Policy Table" },
2077 { cfgparam_10, "System GUID" },
2078 { cfgparam_11, "Number of Alert Strings" },
2079 { cfgparam_12, "Alert String Keys" },
2080 { cfgparam_13, "Alert Strings" },
2081 { cfgparam_14, "Number of Group Control Table Entries" },
2082 { cfgparam_15, "Group Control Table" }
2085 static const value_string vals_11_pef_timer[] = {
2086 { 0x00, "Disable Postpone Timer" },
2087 { 0xfe, "Temporary PEF disable" },
2088 { 0xff, "Get Present Countdown Value" },
2089 { 0, NULL }
2092 static const struct true_false_string tfs_14_processed = {
2093 "BMC",
2094 "software"
2097 static const value_string vals_16_op[] = {
2098 { 0x00, "Initiate Alert" },
2099 { 0x01, "Get Alert Immediate status" },
2100 { 0x02, "Clear Alert Immediate status" },
2101 { 0x03, "Reserved" },
2102 { 0, NULL }
2105 static const value_string vals_16_status[] = {
2106 { 0x00, "No status" },
2107 { 0x01, "Alert was Normal End" },
2108 { 0x02, "`Call Retry' retries failed" },
2109 { 0x03, "Alert failed due to timeouts waiting for acknowledge on all retries" },
2110 { 0xFF, "Alert by this command is in progress" },
2111 { 0, NULL }
2114 static const struct true_false_string tfs_20_op = {
2115 "Get SDR Count", "Get sensor count"
2118 static const struct true_false_string tfs_20_pop = {
2119 "Dynamic", "Static"
2122 static const value_string vals_28_act[] = {
2123 { 0x00, "Do not change individual enables" },
2124 { 0x01, "Enable selected event messages" },
2125 { 0x02, "Disable selected event messages" },
2126 { 0x03, "Reserved" },
2127 { 0, NULL }
2130 static const struct true_false_string tfs_28_enable = {
2131 "Enable", "Disable"
2134 static const struct true_false_string tfs_29_enabled = {
2135 "Enabled", "Disabled"
2138 static const struct true_false_string tfs_2a_sel = {
2139 "Selected", "All"
2142 static const struct true_false_string tfs_2b_enabled = {
2143 "Enabled", "Disabled"
2146 /* Set event receiver.
2148 static void
2149 rq00(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2151 proto_tree_add_item(tree, hf_ipmi_se_00_addr, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2152 proto_tree_add_item(tree, hf_ipmi_se_00_lun, tvb, 1, 1, ENC_LITTLE_ENDIAN);
2155 /* Get event receiver.
2157 static void
2158 rs01(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2160 proto_tree_add_item(tree, hf_ipmi_se_01_addr, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2161 proto_tree_add_item(tree, hf_ipmi_se_01_lun, tvb, 1, 1, ENC_LITTLE_ENDIAN);
2164 /* Platform event.
2166 static void
2167 rq02(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2169 parse_platform_event(tvb, tree);
2172 /* Get PEF capabilities.
2174 static void
2175 rs10(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2177 static int * const byte2[] = { &hf_ipmi_se_10_action_oem_filter, &hf_ipmi_se_10_action_diag_intr,
2178 &hf_ipmi_se_10_action_oem_action, &hf_ipmi_se_10_action_pwr_cycle, &hf_ipmi_se_10_action_reset,
2179 &hf_ipmi_se_10_action_pwr_down, &hf_ipmi_se_10_action_alert, NULL };
2181 proto_tree_add_item(tree, hf_ipmi_se_10_pef_version, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2182 proto_tree_add_bitmask_text(tree, tvb, 1, 1, "Action support: ", "None", ett_ipmi_se_10_action,
2183 byte2, ENC_LITTLE_ENDIAN, 0);
2184 proto_tree_add_item(tree, hf_ipmi_se_10_entries, tvb, 2, 1, ENC_LITTLE_ENDIAN);
2187 /* Arm PEF Postpone Timer.
2189 static void
2190 rq11(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2192 uint8_t val;
2194 val = tvb_get_uint8(tvb, 0);
2195 proto_tree_add_uint_format(tree, hf_ipmi_se_11_rq_timeout, tvb, 0, 1,
2196 val, "%s", val_to_str(val, vals_11_pef_timer, "Arm Timer for: %d sec"));
2199 static void
2200 rs11(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2202 uint8_t val;
2204 val = tvb_get_uint8(tvb, 0);
2205 proto_tree_add_uint_format(tree, hf_ipmi_se_11_rs_timeout, tvb, 0, 1,
2206 val, "%s", val_to_str(val, vals_11_pef_timer, "Present Timer Countdown value: %d sec"));
2209 /* Set PEF Configuration Parameters.
2211 static void
2212 rq12(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
2214 proto_item *ti;
2215 proto_tree *s_tree;
2216 tvbuff_t *sub;
2217 uint8_t pno;
2218 const char *desc;
2220 pno = tvb_get_uint8(tvb, 0) & 0x7f;
2221 if (pno < array_length(conf_params)) {
2222 desc = conf_params[pno].name;
2223 } else if (pno >= 96 && pno <= 127) {
2224 desc = "OEM";
2225 } else {
2226 desc = "Reserved";
2228 ti = proto_tree_add_uint_format_value(tree, hf_ipmi_se_12_byte1, tvb, 0, 1,
2229 pno, "%s (0x%02x)", desc, pno);
2230 s_tree = proto_item_add_subtree(ti, ett_ipmi_se_12_byte1);
2231 proto_tree_add_uint_format_value(s_tree, hf_ipmi_se_12_param, tvb, 0, 1,
2232 pno, "Parameter selector: %s (0x%02x)", desc, pno);
2234 if (pno < array_length(conf_params)) {
2235 sub = tvb_new_subset_remaining(tvb, 1);
2236 conf_params[pno].intrp(sub, pinfo, tree);
2237 } else {
2238 proto_tree_add_none_format(tree, hf_ipmi_se_12_data, tvb, 1, -1,
2239 "Configuration parameter data: %s", desc);
2243 static const value_string cc12[] = {
2244 { 0x80, "Parameter not supported" },
2245 { 0x81, "Attempt to set the 'set in progress' value (in parameter #0) when not in the 'set complete' state" },
2246 { 0x82, "Attempt to write read-only parameter" },
2247 { 0x83, "Attempt to read write-only parameter" },
2248 { 0, NULL }
2251 /* Get PEF Configuration Parameters.
2253 static void
2254 rq13(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2256 proto_item *ti;
2257 proto_tree *s_tree;
2258 uint32_t pno;
2259 const char *desc;
2261 pno = tvb_get_uint8(tvb, 0);
2263 ipmi_set_data(pinfo, 0, pno);
2264 if (!tree) {
2265 /* Just cache parameter selector */
2266 return;
2269 pno &= 0x7f;
2271 if (pno < array_length(conf_params)) {
2272 desc = conf_params[pno].name;
2273 } else if (pno >= 96 && pno <= 127) {
2274 desc = "OEM";
2275 } else {
2276 desc = "Reserved";
2278 ti = proto_tree_add_uint_format_value(tree, hf_ipmi_se_13_byte1, tvb, 0, 1,
2279 pno, "%s (0x%02x)", desc, pno);
2280 s_tree = proto_item_add_subtree(ti, ett_ipmi_se_13_byte1);
2281 proto_tree_add_item(s_tree, hf_ipmi_se_13_getrev, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2282 proto_tree_add_uint_format_value(s_tree, hf_ipmi_se_13_param, tvb, 0, 1,
2283 pno, "%s (0x%02x)", desc, pno);
2285 proto_tree_add_item(tree, hf_ipmi_se_13_set, tvb, 1, 1, ENC_LITTLE_ENDIAN);
2286 proto_tree_add_item(tree, hf_ipmi_se_13_block, tvb, 2, 1, ENC_LITTLE_ENDIAN);
2289 static void
2290 rs13(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
2292 static int * const byte1[] = { &hf_ipmi_se_13_rev_present, &hf_ipmi_se_13_rev_compat, NULL };
2293 proto_item *ti;
2294 tvbuff_t *sub;
2295 uint32_t pno;
2296 const char *desc;
2298 ti = proto_tree_add_bitmask_text(tree, tvb, 0, 1, "Parameter revision", NULL,
2299 ett_ipmi_se_13_rev, byte1, ENC_LITTLE_ENDIAN, 0);
2301 if (!ipmi_get_data(pinfo, 0, &pno)) {
2302 /* No request found - cannot parse further */
2303 if (tvb_captured_length(tvb) > 1) {
2304 proto_tree_add_item(tree, hf_ipmi_se_13_data, tvb, 1, -1, ENC_NA);
2306 return;
2309 if ((pno & 0x80) && tvb_captured_length(tvb) > 1) {
2310 expert_add_info(pinfo, ti, &ei_ipmi_se_13_request_param_rev);
2311 } else if (!(pno & 0x80) && tvb_captured_length(tvb) == 1) {
2312 expert_add_info(pinfo, ti, &ei_ipmi_se_13_request_param_data);
2315 pno &= 0x7f;
2316 if (pno < array_length(conf_params)) {
2317 desc = conf_params[pno].name;
2318 } else if (pno >= 96 && pno <= 127) {
2319 desc = "OEM";
2320 } else {
2321 desc = "Reserved";
2324 ti = proto_tree_add_uint_format_value(tree, hf_ipmi_se_13_parameter, tvb, 0, 0,
2325 pno, "%s", desc);
2326 proto_item_set_generated(ti);
2328 if (tvb_captured_length(tvb) > 1) {
2329 if (pno < array_length(conf_params)) {
2330 sub = tvb_new_subset_remaining(tvb, 1);
2331 conf_params[pno].intrp(sub, pinfo, tree);
2332 } else {
2333 proto_tree_add_item(tree, hf_ipmi_se_13_data, tvb, 1, -1, ENC_NA);
2338 static const value_string cc13[] = {
2339 { 0x80, "Parameter not supported" },
2340 { 0, NULL }
2343 /* Set Last Processed Event ID Command.
2345 static void
2346 rq14(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2348 proto_tree_add_item(tree, hf_ipmi_se_14_processed_by, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2349 proto_tree_add_item(tree, hf_ipmi_se_14_rid, tvb, 1, 2, ENC_LITTLE_ENDIAN);
2352 static const value_string cc14[] = {
2353 { 0x81, "Cannot execute command, SEL erase in progress" },
2354 { 0, NULL }
2357 /* Get Last Processed Event ID Command.
2359 static void
2360 rs15(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
2362 ipmi_add_timestamp(pinfo, tree, hf_ipmi_se_15_tstamp, tvb, 0);
2363 proto_tree_add_item(tree, hf_ipmi_se_15_lastrec, tvb, 4, 2, ENC_LITTLE_ENDIAN);
2364 proto_tree_add_item(tree, hf_ipmi_se_15_proc_sw, tvb, 6, 2, ENC_LITTLE_ENDIAN);
2365 proto_tree_add_item(tree, hf_ipmi_se_15_proc_bmc, tvb, 8, 2, ENC_LITTLE_ENDIAN);
2368 static const value_string cc15[] = {
2369 { 0x81, "Cannot execute command, SEL erase in progress" },
2370 { 0, NULL }
2373 /* Alert Immediate.
2375 static void
2376 rq16(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2378 static int * const byte1[] = { &hf_ipmi_se_16_chan, NULL };
2379 static int * const byte2[] = { &hf_ipmi_se_16_op, &hf_ipmi_se_16_dst, NULL };
2380 static int * const byte3[] = { &hf_ipmi_se_16_send_string, &hf_ipmi_se_16_string_sel, NULL };
2381 tvbuff_t *sub;
2383 ipmi_set_data(pinfo, 0, (tvb_get_uint8(tvb, 1) & 0xc0) >> 6);
2384 if (!tree) {
2385 /* Save the operation */
2386 return;
2389 proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL, ett_ipmi_se_16_byte1, byte1, ENC_LITTLE_ENDIAN, 0);
2390 proto_tree_add_bitmask_text(tree, tvb, 1, 1, NULL, NULL, ett_ipmi_se_16_byte2, byte2, ENC_LITTLE_ENDIAN, 0);
2391 proto_tree_add_bitmask_text(tree, tvb, 2, 1, NULL, NULL, ett_ipmi_se_16_byte3, byte3, ENC_LITTLE_ENDIAN, 0);
2392 if (tvb_captured_length(tvb) > 3) {
2393 proto_tree_add_item(tree, hf_ipmi_se_16_gen, tvb, 3, 1, ENC_LITTLE_ENDIAN);
2394 sub = tvb_new_subset_remaining(tvb, 4);
2395 parse_platform_event(sub, tree);
2399 static void
2400 rs16(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2402 uint32_t val;
2404 if (ipmi_get_data(pinfo, 0, &val) && val == 0x01) {
2405 /* Operation == Get Alert Immediate Status */
2406 proto_tree_add_item(tree, hf_ipmi_se_16_status, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2410 static const value_string cc16[] = {
2411 { 0x81, "Alert Immediate rejected due to alert already in progress" },
2412 { 0x82, "Alert Immediate rejected due to IPMI messaging session active on this channel" },
2413 { 0x83, "Platform Event parameters not supported" },
2414 { 0, NULL }
2417 /* PET Acknowledge.
2419 static void
2420 rq17(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
2422 proto_tree_add_item(tree, hf_ipmi_se_17_seq, tvb, 0, 2, ENC_LITTLE_ENDIAN);
2423 ipmi_add_timestamp(pinfo, tree, hf_ipmi_se_17_tstamp, tvb, 2);
2424 proto_tree_add_item(tree, hf_ipmi_se_17_evsrc, tvb, 6, 1, ENC_LITTLE_ENDIAN);
2425 proto_tree_add_item(tree, hf_ipmi_se_17_sensor_dev, tvb, 7, 1, ENC_LITTLE_ENDIAN);
2426 proto_tree_add_item(tree, hf_ipmi_se_17_sensor_num, tvb, 8, 1, ENC_LITTLE_ENDIAN);
2427 proto_tree_add_item(tree, hf_ipmi_se_17_evdata1, tvb, 9, 1, ENC_LITTLE_ENDIAN);
2428 proto_tree_add_item(tree, hf_ipmi_se_17_evdata2, tvb, 10, 1, ENC_LITTLE_ENDIAN);
2429 proto_tree_add_item(tree, hf_ipmi_se_17_evdata3, tvb, 11, 1, ENC_LITTLE_ENDIAN);
2432 /* Get Device SDR Info.
2434 static void
2435 rq20(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2437 if (tvb_captured_length(tvb) > 0) {
2438 ipmi_set_data(pinfo, 0, tvb_get_uint8(tvb, 0) & 0x01);
2440 proto_tree_add_item(tree, hf_ipmi_se_20_rq_op, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2444 static void
2445 rs20(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2447 static int * const byte2[] = { &hf_ipmi_se_20_rs_population, &hf_ipmi_se_20_rs_lun3,
2448 &hf_ipmi_se_20_rs_lun2, &hf_ipmi_se_20_rs_lun1, &hf_ipmi_se_20_rs_lun0, NULL };
2449 uint32_t val;
2451 if (ipmi_get_data(pinfo, 0, &val) && val) {
2452 proto_tree_add_item(tree, hf_ipmi_se_20_rs_sdr, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2453 } else {
2454 proto_tree_add_item(tree, hf_ipmi_se_20_rs_num, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2456 proto_tree_add_bitmask_text(tree, tvb, 1, 1, NULL, NULL, ett_ipmi_se_20_rs_byte2,
2457 byte2, ENC_LITTLE_ENDIAN, 0);
2458 if (tvb_get_uint8(tvb, 1) & 0x80) {
2459 /* Dynamic sensor population */
2460 proto_tree_add_item(tree, hf_ipmi_se_20_rs_change, tvb, 2, 4, ENC_LITTLE_ENDIAN);
2465 /* Get Device SDR.
2467 static void
2468 rq21(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2470 uint8_t len;
2472 len = tvb_get_uint8(tvb, 5);
2474 proto_tree_add_item(tree, hf_ipmi_se_21_rid, tvb, 0, 2, ENC_LITTLE_ENDIAN);
2475 proto_tree_add_item(tree, hf_ipmi_se_21_record, tvb, 2, 2, ENC_LITTLE_ENDIAN);
2476 proto_tree_add_item(tree, hf_ipmi_se_21_offset, tvb, 4, 1, ENC_LITTLE_ENDIAN);
2477 proto_tree_add_uint_format_value(tree, hf_ipmi_se_21_len, tvb, 5, 1, len,
2478 "%u%s", len, len == 0xff ? "(entire record)" : "");
2481 static void
2482 rs21(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2484 proto_tree_add_item(tree, hf_ipmi_se_21_next, tvb, 0, 2, ENC_LITTLE_ENDIAN);
2485 proto_tree_add_item(tree, hf_ipmi_se_21_recdata, tvb, 2, -1, ENC_NA);
2488 static const value_string cc21[] = {
2489 { 0x80, "Record changed" },
2490 { 0, NULL }
2493 /* Reserve Device SDR Repository.
2495 static void
2496 rs22(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2498 proto_tree_add_item(tree, hf_ipmi_se_22_resid, tvb, 0, 2, ENC_LITTLE_ENDIAN);
2501 /* Get Sensor Reading Factors.
2503 static void
2504 rq23(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2506 proto_tree_add_item(tree, hf_ipmi_se_23_rq_sensor, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2507 proto_tree_add_item(tree, hf_ipmi_se_23_rq_reading, tvb, 1, 1, ENC_LITTLE_ENDIAN);
2510 static inline int16_t
2511 sign_extend(int16_t v, int bits)
2513 if ((v & (1 << (bits - 1))) == 0) {
2514 return v;
2517 return v | (0xffff << bits);
2520 static void
2521 rs23(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2523 proto_tree *s_tree;
2524 uint16_t tol, acc, accexp, tmp;
2525 int16_t m, b, bexp, rexp;
2527 proto_tree_add_item(tree, hf_ipmi_se_23_rs_next_reading, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2529 m = tvb_get_uint8(tvb, 1);
2530 tmp = tvb_get_uint8(tvb, 2);
2531 m |= (tmp & 0xc0) << 2;
2532 tol = tmp & 0x3f;
2533 b = tvb_get_uint8(tvb, 3);
2534 tmp = tvb_get_uint8(tvb, 4);
2535 b |= (tmp & 0xc0) << 2;
2536 acc = tmp & 0x3f;
2537 tmp = tvb_get_uint8(tvb, 5);
2538 acc |= (tmp & 0xf0) << 4;
2539 accexp = (tmp & 0x0c) >> 2;
2540 tmp = tvb_get_uint8(tvb, 6);
2541 rexp = (tmp & 0xf0) >> 4;
2542 bexp = tmp & 0x0f;
2544 m = sign_extend(m, 10);
2545 b = sign_extend(b, 10);
2546 bexp = sign_extend(bexp, 4);
2547 rexp = sign_extend(rexp, 4);
2549 s_tree = proto_tree_add_subtree_format(tree, tvb, 1, 6, ett_ipmi_se_23_readingfactors, NULL,
2550 "Factors: M=%d B=%d K1=%d K2=%d Acc=%u*10^%u Tol=%u",
2551 m, b, bexp, rexp, acc, accexp, tol);
2553 proto_tree_add_item(s_tree, hf_ipmi_se_23_m, tvb, 1, 2, ENC_LITTLE_ENDIAN);
2554 proto_tree_add_item(s_tree, hf_ipmi_se_23_tolerance, tvb, 1, 2, ENC_LITTLE_ENDIAN);
2555 proto_tree_add_item(s_tree, hf_ipmi_se_23_b, tvb, 3, 2, ENC_LITTLE_ENDIAN);
2556 proto_tree_add_item(s_tree, hf_ipmi_se_23_accuracy, tvb, 4, 2, ENC_LITTLE_ENDIAN);
2557 proto_tree_add_item(s_tree, hf_ipmi_se_23_accuracy_exponent, tvb, 5, 1, ENC_LITTLE_ENDIAN);
2558 proto_tree_add_item(s_tree, hf_ipmi_se_23_r_exponent, tvb, 6, 1, ENC_LITTLE_ENDIAN);
2559 proto_tree_add_item(s_tree, hf_ipmi_se_23_b_exponent, tvb, 6, 1, ENC_LITTLE_ENDIAN);
2562 /* Set Sensor Hysteresis.
2564 static void
2565 rq24(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2567 proto_tree_add_item(tree, hf_ipmi_se_24_sensor, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2568 proto_tree_add_item(tree, hf_ipmi_se_24_mask, tvb, 1, 1, ENC_LITTLE_ENDIAN);
2569 proto_tree_add_item(tree, hf_ipmi_se_24_hyst_pos, tvb, 2, 1, ENC_LITTLE_ENDIAN);
2570 proto_tree_add_item(tree, hf_ipmi_se_24_hyst_neg, tvb, 3, 1, ENC_LITTLE_ENDIAN);
2573 /* Get Sensor Hysteresis.
2575 static void
2576 rq25(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2578 proto_tree_add_item(tree, hf_ipmi_se_25_sensor, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2579 proto_tree_add_item(tree, hf_ipmi_se_25_mask, tvb, 1, 1, ENC_LITTLE_ENDIAN);
2582 static void
2583 rs25(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2585 proto_tree_add_item(tree, hf_ipmi_se_25_hyst_pos, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2586 proto_tree_add_item(tree, hf_ipmi_se_25_hyst_neg, tvb, 1, 1, ENC_LITTLE_ENDIAN);
2589 /* Common for Get/Set Thresholds */
2590 static void
2591 add_thresholds(tvbuff_t *tvb, int offs, proto_tree *tree, const char *desc)
2593 static int * const threshold_mask[] = { &hf_ipmi_se_XX_m_unr, &hf_ipmi_se_XX_m_uc, &hf_ipmi_se_XX_m_unc,
2594 &hf_ipmi_se_XX_m_lnr, &hf_ipmi_se_XX_m_lc, &hf_ipmi_se_XX_m_lnc, NULL };
2596 proto_tree_add_bitmask_text(tree, tvb, offs, 1, desc, "None",
2597 ett_ipmi_se_XX_mask, threshold_mask, ENC_LITTLE_ENDIAN, 0);
2598 proto_tree_add_item(tree, hf_ipmi_se_XX_thr_lnc, tvb, offs + 1, 1, ENC_LITTLE_ENDIAN);
2599 proto_tree_add_item(tree, hf_ipmi_se_XX_thr_lc, tvb, offs + 2, 1, ENC_LITTLE_ENDIAN);
2600 proto_tree_add_item(tree, hf_ipmi_se_XX_thr_lnr, tvb, offs + 3, 1, ENC_LITTLE_ENDIAN);
2601 proto_tree_add_item(tree, hf_ipmi_se_XX_thr_unc, tvb, offs + 4, 1, ENC_LITTLE_ENDIAN);
2602 proto_tree_add_item(tree, hf_ipmi_se_XX_thr_uc, tvb, offs + 5, 1, ENC_LITTLE_ENDIAN);
2603 proto_tree_add_item(tree, hf_ipmi_se_XX_thr_unr, tvb, offs + 6, 1, ENC_LITTLE_ENDIAN);
2606 /* Set Sensor Thresholds.
2608 static void
2609 rq26(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2611 proto_tree_add_item(tree, hf_ipmi_se_26_sensor, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2612 add_thresholds(tvb, 1, tree, "Set thresholds: ");
2615 /* Get Sensor Thresholds.
2617 static void
2618 rq27(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2620 proto_tree_add_item(tree, hf_ipmi_se_27_sensor, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2623 static void
2624 rs27(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2626 add_thresholds(tvb, 0, tree, "Readable thresholds: ");
2629 /* Common for Get EE/Set EE/Rearm
2631 static void
2632 add_events(tvbuff_t *tvb, int offs, proto_tree *tree, const struct true_false_string *tfs,
2633 const char *desc)
2635 static int * const bsel[4][8] = {
2636 { &hf_ipmi_se_XX_b1_0, &hf_ipmi_se_XX_b1_1, &hf_ipmi_se_XX_b1_2, &hf_ipmi_se_XX_b1_3,
2637 &hf_ipmi_se_XX_b1_4, &hf_ipmi_se_XX_b1_5, &hf_ipmi_se_XX_b1_6, &hf_ipmi_se_XX_b1_7 },
2638 { &hf_ipmi_se_XX_b2_0, &hf_ipmi_se_XX_b2_1, &hf_ipmi_se_XX_b2_2, &hf_ipmi_se_XX_b2_3,
2639 &hf_ipmi_se_XX_b2_4, &hf_ipmi_se_XX_b2_5, &hf_ipmi_se_XX_b2_6, NULL },
2640 { &hf_ipmi_se_XX_b3_0, &hf_ipmi_se_XX_b3_1, &hf_ipmi_se_XX_b3_2, &hf_ipmi_se_XX_b3_3,
2641 &hf_ipmi_se_XX_b3_4, &hf_ipmi_se_XX_b3_5, &hf_ipmi_se_XX_b3_6, &hf_ipmi_se_XX_b3_7 },
2642 { &hf_ipmi_se_XX_b4_0, &hf_ipmi_se_XX_b4_1, &hf_ipmi_se_XX_b4_2, &hf_ipmi_se_XX_b4_3,
2643 &hf_ipmi_se_XX_b4_4, &hf_ipmi_se_XX_b4_5, &hf_ipmi_se_XX_b4_6, NULL }
2645 static int * const tsel[] = { &ett_ipmi_se_XX_b1, &ett_ipmi_se_XX_b2, &ett_ipmi_se_XX_b3, &ett_ipmi_se_XX_b4 };
2646 proto_tree *s_tree;
2647 int len = tvb_captured_length(tvb);
2648 int i, j, val, msk;
2650 for (i = 0; (offs < len) && (i < 4); i++, offs++) {
2651 val = tvb_get_uint8(tvb, offs);
2652 s_tree = proto_tree_add_subtree_format(tree, tvb, offs, 1, *tsel[i], NULL, "%s (byte %d)", desc, i);
2653 for (j = 7; j >= 0; j--) {
2654 if (!bsel[i][j]) {
2655 continue;
2657 msk = 1 << j;
2658 proto_tree_add_boolean_format_value(s_tree, *bsel[i][j], tvb, offs, 1,
2659 val & msk, "%s", tfs_get_string(val & msk, tfs));
2665 /* Set Sensor Event Enable.
2667 static void
2668 rq28(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2670 static int * const byte2[] = { &hf_ipmi_se_28_fl_evm, &hf_ipmi_se_28_fl_scan, &hf_ipmi_se_28_fl_action, NULL };
2671 static const struct true_false_string tfs_lect = { "Select", "Do not select" };
2673 proto_tree_add_item(tree, hf_ipmi_se_28_sensor, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2674 proto_tree_add_bitmask_text(tree, tvb, 1, 1, NULL, NULL, ett_ipmi_se_28_byte2, byte2, ENC_LITTLE_ENDIAN, 0);
2675 add_events(tvb, 2, tree, &tfs_lect, "Selected events");
2678 /* Get Sensor Event Enable.
2680 static void
2681 rq29(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2683 proto_tree_add_item(tree, hf_ipmi_se_29_sensor, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2686 static void
2687 rs29(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2689 static int * const byte1[] = { &hf_ipmi_se_29_fl_evm, &hf_ipmi_se_29_fl_scan, NULL };
2691 proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL, ett_ipmi_se_29_byte1, byte1, ENC_LITTLE_ENDIAN, 0);
2692 add_events(tvb, 1, tree, &tfs_29_enabled, "Enabled events");
2695 /* Re-arm Sensor Events.
2697 static void
2698 rq2a(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2700 static const struct true_false_string rearm_tfs = { "Re-arm", "Do not re-arm" };
2702 proto_tree_add_item(tree, hf_ipmi_se_2a_sensor, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2703 proto_tree_add_item(tree, hf_ipmi_se_2a_fl_sel, tvb, 1, 1, ENC_LITTLE_ENDIAN);
2704 add_events(tvb, 2, tree, &rearm_tfs, "Re-arm Events");
2707 /* Get Sensor Event Status.
2709 static void
2710 rq2b(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2712 proto_tree_add_item(tree, hf_ipmi_se_2b_sensor, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2715 static void
2716 rs2b(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2718 static int * const byte1[] = { &hf_ipmi_se_2b_fl_evm, &hf_ipmi_se_2b_fl_scan, &hf_ipmi_se_2b_fl_unavail, NULL };
2719 static const struct true_false_string occur_tfs = { "Occurred", "Did not occur" };
2721 proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL, ett_ipmi_se_2b_byte1, byte1, ENC_LITTLE_ENDIAN, 0);
2722 add_events(tvb, 1, tree, &occur_tfs, "Event Status");
2725 /* Get Sensor Reading.
2727 static void
2728 rq2d(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2730 proto_tree_add_item(tree, hf_ipmi_se_2d_sensor, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2733 static void
2734 rs2d(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2736 /* Reuse flags from Event Status message */
2737 static int * const byte2[] = { &hf_ipmi_se_2b_fl_evm, &hf_ipmi_se_2b_fl_scan, &hf_ipmi_se_2b_fl_unavail, NULL };
2738 static int * const bsel[2][8] = {
2739 { &hf_ipmi_se_2d_b1_0, &hf_ipmi_se_2d_b1_1, &hf_ipmi_se_2d_b1_2, &hf_ipmi_se_2d_b1_3,
2740 &hf_ipmi_se_2d_b1_4, &hf_ipmi_se_2d_b1_5, &hf_ipmi_se_2d_b1_6, &hf_ipmi_se_2d_b1_7 },
2741 { &hf_ipmi_se_2d_b2_0, &hf_ipmi_se_2d_b2_1, &hf_ipmi_se_2d_b2_2, &hf_ipmi_se_2d_b2_3,
2742 &hf_ipmi_se_2d_b2_4, &hf_ipmi_se_2d_b2_5, &hf_ipmi_se_2d_b2_6, NULL }
2744 static int * const tsel[2] = { &ett_ipmi_se_2d_b1, &ett_ipmi_se_2d_b2 };
2745 proto_tree *s_tree;
2746 int i, j, len;
2748 proto_tree_add_item(tree, hf_ipmi_se_2d_reading, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2749 proto_tree_add_bitmask_text(tree, tvb, 1, 1, NULL, NULL, ett_ipmi_se_2d_byte2, byte2, ENC_LITTLE_ENDIAN, 0);
2750 len = tvb_captured_length(tvb);
2751 for (i = 0; i < 2 && i < len - 2; i++) {
2752 s_tree = proto_tree_add_subtree_format(tree, tvb, i + 2, 1, *tsel[i], NULL,
2753 "Threshold comparisons/assertions (byte %d)", i);
2754 for (j = 7; j >= 0; j--) {
2755 if (bsel[i][j]) {
2756 proto_tree_add_item(s_tree, *bsel[i][j], tvb, i + 2, 1, ENC_LITTLE_ENDIAN);
2762 /* Set Sensor Type.
2764 static void
2765 rq2e(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2767 uint8_t stype;
2768 const struct sensor_info *si;
2770 stype = tvb_get_uint8(tvb, 1);
2771 si = get_sensor_info(stype);
2773 proto_tree_add_item(tree, hf_ipmi_se_2e_sensor, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2774 proto_tree_add_uint_format_value(tree, hf_ipmi_se_2e_stype, tvb, 1, 1,
2775 stype, "%s (0x%02x)", si->desc, stype);
2777 proto_tree_add_item(tree, hf_ipmi_se_2e_evtype, tvb, 2, 1, ENC_LITTLE_ENDIAN);
2780 /* Get Sensor Type.
2782 static void
2783 rq2f(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2785 proto_tree_add_item(tree, hf_ipmi_se_2f_sensor, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2788 static void
2789 rs2f(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2791 uint8_t stype;
2792 const struct sensor_info *si;
2794 stype = tvb_get_uint8(tvb, 0);
2795 si = get_sensor_info(stype);
2797 proto_tree_add_uint_format_value(tree, hf_ipmi_se_2f_stype, tvb, 0, 1,
2798 stype, "%s (0x%02x)", si->desc, stype);
2800 proto_tree_add_item(tree, hf_ipmi_se_2f_evtype, tvb, 1, 1, ENC_LITTLE_ENDIAN);
2803 static const value_string cc30[] = {
2804 { 0x80, "Attempt to change not-settable reading/status bits" },
2805 { 0x81, "Setting Event Data Bytes not supported" },
2806 { 0, NULL }
2809 static const ipmi_cmd_t cmd_se[] = {
2810 /* Event commands */
2811 { 0x00, rq00, NULL, NULL, NULL, "Set Event Receiver", 0 },
2812 { 0x01, NULL, rs01, NULL, NULL, "Get Event Receiver", 0 },
2813 { 0x02, rq02, NULL, NULL, NULL, "Platform Event", 0 },
2815 /* PEF and Alerting Commands */
2816 { 0x10, NULL, rs10, NULL, NULL, "Get PEF Capabilities", 0 },
2817 { 0x11, rq11, rs11, NULL, NULL, "Arm PEF Postpone Timer", 0 },
2818 { 0x12, rq12, NULL, cc12, NULL, "Set PEF Configuration Parameters", 0 },
2819 { 0x13, rq13, rs13, cc13, NULL, "Get PEF Configuration Parameters", CMD_CALLRQ },
2820 { 0x14, rq14, NULL, cc14, NULL, "Set Last Processed Event ID", 0 },
2821 { 0x15, NULL, rs15, cc15, NULL, "Get Last Processed Event ID", 0 },
2822 { 0x16, rq16, rs16, cc16, NULL, "Alert Immediate", CMD_CALLRQ },
2823 { 0x17, rq17, NULL, NULL, NULL, "PET Acknowledge", 0 },
2825 /* Sensor Device Commands */
2826 { 0x20, rq20, rs20, NULL, NULL, "Get Device SDR Info", CMD_CALLRQ },
2827 { 0x21, rq21, rs21, cc21, NULL, "Get Device SDR", 0 },
2828 { 0x22, NULL, rs22, NULL, NULL, "Reserve Device SDR Repository", 0 },
2829 { 0x23, rq23, rs23, NULL, NULL, "Get Sensor Reading Factors", 0 },
2830 { 0x24, rq24, NULL, NULL, NULL, "Set Sensor Hysteresis", 0 },
2831 { 0x25, rq25, rs25, NULL, NULL, "Get Sensor Hysteresis", 0 },
2832 { 0x26, rq26, NULL, NULL, NULL, "Set Sensor Threshold", 0 },
2833 { 0x27, rq27, rs27, NULL, NULL, "Get Sensor Threshold", 0 },
2834 { 0x28, rq28, NULL, NULL, NULL, "Set Sensor Event Enable", 0 },
2835 { 0x29, rq29, rs29, NULL, NULL, "Get Sensor Event Enable", 0 },
2836 { 0x2a, rq2a, NULL, NULL, NULL, "Re-arm Sensor Events", 0 },
2837 { 0x2b, rq2b, rs2b, NULL, NULL, "Get Sensor Event Status", 0 },
2838 { 0x2d, rq2d, rs2d, NULL, NULL, "Get Sensor Reading", 0 },
2839 { 0x2e, rq2e, NULL, NULL, NULL, "Set Sensor Type", 0 },
2840 { 0x2f, rq2f, rs2f, NULL, NULL, "Get Sensor Type", 0 },
2841 { 0x30, IPMI_TBD, cc30, NULL, "Set Sensor Reading and Event Status", 0 },
2844 void
2845 proto_register_ipmi_se(void)
2847 static hf_register_info hf[] = {
2848 { &hf_ipmi_se_evt_rev,
2849 { "Event Message Revision",
2850 "ipmi.evt.evmrev", FT_UINT8, BASE_HEX, VALS(evt_evm_rev_vals), 0, NULL, HFILL }},
2851 { &hf_ipmi_se_evt_sensor_type,
2852 { "Sensor Type",
2853 "ipmi.evt.sensor_type", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
2854 { &hf_ipmi_se_evt_sensor_num,
2855 { "Sensor #",
2856 "ipmi.evt.sensor_num", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
2857 { &hf_ipmi_se_evt_byte3,
2858 { "Event Dir/Type",
2859 "ipmi.evt.byte3", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
2860 { &hf_ipmi_se_evt_dir,
2861 { "Event Direction",
2862 "ipmi.evt.evdir", FT_BOOLEAN, 8, TFS(&evt_evdir_tfs), 0x80, NULL, HFILL }},
2863 { &hf_ipmi_se_evt_type,
2864 { "Event/Reading type",
2865 "ipmi.evt.evtype", FT_UINT8, BASE_HEX|BASE_RANGE_STRING, RVALS(evtype_rvals), 0x7f, NULL, HFILL }},
2866 { &hf_ipmi_se_evt_data1,
2867 { "Event Data 1",
2868 "ipmi.evt.data1", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
2869 { &hf_ipmi_se_evt_data1_b2,
2870 { "Byte 2",
2871 "ipmi.evt.data1.b2", FT_UINT8, BASE_HEX, NULL, 0xc0, NULL, HFILL }},
2872 { &hf_ipmi_se_evt_data1_b3,
2873 { "Byte 3",
2874 "ipmi.evt.data1.b3", FT_UINT8, BASE_HEX, NULL, 0x30, NULL, HFILL }},
2875 { &hf_ipmi_se_evt_data1_offs,
2876 { "Offset",
2877 "ipmi.evt.data1.offs", FT_UINT8, BASE_HEX, NULL, 0x0f, NULL, HFILL }},
2878 { &hf_ipmi_se_evt_data2,
2879 { "Event Data 2",
2880 "ipmi.evt.data2", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
2881 { &hf_ipmi_se_evt_data3,
2882 { "Event Data 3",
2883 "ipmi.evt.data3", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
2885 { &hf_ipmi_se_cp00_sip,
2886 { "Set In Progress",
2887 "ipmi.cp00.sip", FT_UINT8, BASE_HEX, VALS(cp00_sip_vals), 0x03, NULL, HFILL }},
2888 { &hf_ipmi_se_cp01_alert_startup,
2889 { "PEF Alert Startup Delay disable",
2890 "ipmi.cp01.alert_startup", FT_BOOLEAN, 8, NULL, 0x08, NULL, HFILL }},
2891 { &hf_ipmi_se_cp01_startup,
2892 { "PEF Startup Delay disable",
2893 "ipmi.cp01.startup", FT_BOOLEAN, 8, NULL, 0x04, NULL, HFILL }},
2894 { &hf_ipmi_se_cp01_event_msg,
2895 { "Enable Event Messages for PEF actions",
2896 "ipmi.cp01.event_msg", FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL }},
2897 { &hf_ipmi_se_cp01_pef,
2898 { "Enable PEF",
2899 "ipmi.cp01.pef", FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL }},
2900 { &hf_ipmi_se_cp02_diag_intr,
2901 { "Enable Diagnostic Interrupt",
2902 "ipmi.cp02.diag_intr", FT_BOOLEAN, 8, NULL, 0x20, NULL, HFILL }},
2903 { &hf_ipmi_se_cp02_oem_action,
2904 { "Enable OEM action",
2905 "ipmi.cp02.oem_action", FT_BOOLEAN, 8, NULL, 0x10, NULL, HFILL }},
2906 { &hf_ipmi_se_cp02_pwr_cycle,
2907 { "Enable Power Cycle action",
2908 "ipmi.cp02.pwr_cycle", FT_BOOLEAN, 8, NULL, 0x08, NULL, HFILL }},
2909 { &hf_ipmi_se_cp02_reset,
2910 { "Enable Reset action",
2911 "ipmi.cp02.reset", FT_BOOLEAN, 8, NULL, 0x04, NULL, HFILL }},
2912 { &hf_ipmi_se_cp02_pwr_down,
2913 { "Enable Power Down action",
2914 "ipmi.cp02.pwr_down", FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL }},
2915 { &hf_ipmi_se_cp02_alert,
2916 { "Enable Alert action",
2917 "ipmi.cp02.alert", FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL }},
2918 { &hf_ipmi_se_cp03_startup,
2919 { "PEF Startup delay",
2920 "ipmi.cp03.startup", FT_UINT8, BASE_CUSTOM, CF_FUNC(ipmi_fmt_1s_1based), 0, NULL, HFILL }},
2921 { &hf_ipmi_se_cp04_alert_startup,
2922 { "PEF Alert Startup delay",
2923 "ipmi.cp04.alert_startup", FT_UINT8, BASE_CUSTOM, CF_FUNC(ipmi_fmt_1s_1based), 0, NULL, HFILL }},
2924 { &hf_ipmi_se_cp05_num_evfilters,
2925 { "Number of Event Filters",
2926 "ipmi.cp05.num_evfilters", FT_UINT8, BASE_DEC, NULL, 0x7f, NULL, HFILL }},
2927 { &hf_ipmi_se_cp06_filter,
2928 { "Filter number (set selector)",
2929 "ipmi.cp06.filter", FT_UINT8, BASE_DEC, NULL, 0x7f, NULL, HFILL }},
2930 { &hf_ipmi_se_cp06_data,
2931 { "Filter data",
2932 "ipmi.cp06.data", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
2933 { &hf_ipmi_se_cp07_filter,
2934 { "Filter number (set selector)",
2935 "ipmi.cp07.filter", FT_UINT8, BASE_DEC, NULL, 0x7f, NULL, HFILL }},
2936 #if 0
2937 { &hf_ipmi_se_cp07_data,
2938 { "Filter data (byte 1)",
2939 "ipmi.cp07.data", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
2940 #endif
2941 { &hf_ipmi_se_cp08_policies,
2942 { "Number of Alert Policy Entries",
2943 "ipmi.cp08.policies", FT_UINT8, BASE_DEC, NULL, 0x7f, NULL, HFILL }},
2944 { &hf_ipmi_se_cp09_entry,
2945 { "Entry number (set selector)",
2946 "ipmi.cp09.entry", FT_UINT8, BASE_DEC, NULL, 0x7f, NULL, HFILL }},
2947 { &hf_ipmi_se_cp09_data,
2948 { "Entry data",
2949 "ipmi.cp09.data", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
2950 { &hf_ipmi_se_cp10_useval,
2951 { "Used to fill the GUID field in PET Trap",
2952 "ipmi.cp10.useval", FT_BOOLEAN, 8, TFS(&cp10_use_tfs), 0x01, NULL, HFILL }},
2953 { &hf_ipmi_se_cp10_guid,
2954 { "GUID",
2955 "ipmi.cp10.guid", FT_GUID, BASE_NONE, NULL, 0, NULL, HFILL }},
2956 { &hf_ipmi_se_cp11_num_alertstr,
2957 { "Number of Alert Strings",
2958 "ipmi.cp11.num_alertstr", FT_UINT8, BASE_DEC, NULL, 0x7f, NULL, HFILL }},
2959 { &hf_ipmi_se_cp12_byte1,
2960 { "Alert String Selector",
2961 "ipmi.cp12.byte1", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
2962 { &hf_ipmi_se_cp12_alert_stringsel,
2963 { "Alert String Selector (set selector)",
2964 "ipmi.cp12.alert_stringsel", FT_UINT8, BASE_HEX|BASE_SPECIAL_VALS, VALS(unique_selects_volatile_string_parameters), 0x7f, NULL, HFILL }},
2965 { &hf_ipmi_se_cp12_evfilter,
2966 { "Filter Number",
2967 "ipmi.cp12.evfilter", FT_UINT8, BASE_HEX, NULL, 0x7f, NULL, HFILL }},
2968 { &hf_ipmi_se_cp12_alert_stringset,
2969 { "Set number for string",
2970 "ipmi.cp12.alert_stringset", FT_UINT8, BASE_HEX, NULL, 0x7f, NULL, HFILL }},
2971 { &hf_ipmi_se_cp13_stringsel,
2972 { "String selector (set selector)",
2973 "ipmi.cp13.stringsel", FT_UINT8, BASE_HEX, NULL, 0x7f, NULL, HFILL }},
2974 { &hf_ipmi_se_cp13_blocksel,
2975 { "Block selector",
2976 "ipmi.cp13.blocksel", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
2977 { &hf_ipmi_se_cp13_string,
2978 { "String data",
2979 "ipmi.cp13.string", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
2980 { &hf_ipmi_se_cp14_num_gct,
2981 { "Number of Group Control Table entries",
2982 "ipmi.cp14.num_gct", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
2983 { &hf_ipmi_se_cp15_gctsel,
2984 { "Group control table entry selector (set selector)",
2985 "ipmi.cp15.gctsel", FT_UINT8, BASE_HEX, NULL, 0x7f, NULL, HFILL }},
2986 { &hf_ipmi_se_cp15_force,
2987 { "Request/Force",
2988 "ipmi.cp15.force", FT_BOOLEAN, 8, TFS(&cp15_rq_frc_tfs), 0x20, NULL, HFILL }},
2989 { &hf_ipmi_se_cp15_delayed,
2990 { "Immediate/Delayed",
2991 "ipmi.cp15.delayed", FT_BOOLEAN, 8, TFS(&cp15_imm_delay_tfs), 0x10, NULL, HFILL }},
2992 { &hf_ipmi_se_cp15_channel,
2993 { "Channel",
2994 "ipmi.cp15.channel", FT_UINT8, BASE_CUSTOM, CF_FUNC(ipmi_fmt_channel), 0x0f, NULL, HFILL }},
2995 { &hf_ipmi_se_cp15_group,
2996 { "Group ID",
2997 "ipmi.cp15.group_id", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
2998 { &hf_ipmi_se_cp15_member_check,
2999 { "Member ID check disabled",
3000 "ipmi.cp15.member_check", FT_BOOLEAN, 8, NULL, 0x10, NULL, HFILL }},
3001 { &hf_ipmi_se_cp15_member_id,
3002 { "Member ID",
3003 "ipmi.cp15_member_id", FT_UINT8, BASE_DEC, NULL, 0x0f, NULL, HFILL }},
3004 { &hf_ipmi_se_cp15_retries,
3005 { "Retries",
3006 "ipmi.cp15.retries", FT_UINT8, BASE_DEC, NULL, 0x70, NULL, HFILL }},
3007 { &hf_ipmi_se_cp15_operation,
3008 { "Operation",
3009 "ipmi.cp15.operation", FT_UINT8, BASE_HEX, VALS(cp15_op_vals), 0x0f, NULL, HFILL }},
3011 { &hf_ipmi_se_00_addr,
3012 { "Event Receiver slave address",
3013 "ipmi.se00.addr", FT_UINT8, BASE_HEX|BASE_SPECIAL_VALS, VALS(unique_disable_message_generation), 0, NULL, HFILL }},
3014 { &hf_ipmi_se_00_lun,
3015 { "Event Receiver LUN",
3016 "ipmi.se00.lun", FT_UINT8, BASE_HEX, NULL, 0x3, NULL, HFILL }},
3018 { &hf_ipmi_se_01_addr,
3019 { "Event Receiver slave address",
3020 "ipmi.se01.addr", FT_UINT8, BASE_HEX|BASE_SPECIAL_VALS, VALS(unique_disable_message_generation), 0, NULL, HFILL }},
3021 { &hf_ipmi_se_01_lun,
3022 { "Event Receiver LUN",
3023 "ipmi.se01.lun", FT_UINT8, BASE_HEX, NULL, 0x3, NULL, HFILL }},
3025 { &hf_ipmi_se_10_pef_version,
3026 { "PEF Version",
3027 "ipmi.se10.pef_version", FT_UINT8, BASE_CUSTOM, CF_FUNC(ipmi_fmt_version), 0, NULL, HFILL }},
3028 { &hf_ipmi_se_10_action_oem_filter,
3029 { "OEM Event Record Filtering supported",
3030 "ipmi.se10.action.oem_filter", FT_BOOLEAN, 8, NULL, 0x80, NULL, HFILL }},
3031 { &hf_ipmi_se_10_action_diag_intr,
3032 { "Diagnostic Interrupt",
3033 "ipmi.se10.action.diag_intr", FT_BOOLEAN, 8, NULL, 0x20, NULL, HFILL }},
3034 { &hf_ipmi_se_10_action_oem_action,
3035 { "OEM Action",
3036 "ipmi.se10.action.oem_action", FT_BOOLEAN, 8, NULL, 0x10, NULL, HFILL }},
3037 { &hf_ipmi_se_10_action_pwr_cycle,
3038 { "Power Cycle",
3039 "ipmi.se10.action.pwr_cycle", FT_BOOLEAN, 8, NULL, 0x08, NULL, HFILL }},
3040 { &hf_ipmi_se_10_action_reset,
3041 { "Reset",
3042 "ipmi.se10.action.reset", FT_BOOLEAN, 8, NULL, 0x04, NULL, HFILL }},
3043 { &hf_ipmi_se_10_action_pwr_down,
3044 { "Power Down",
3045 "ipmi.se10.action.pwr_down", FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL }},
3046 { &hf_ipmi_se_10_action_alert,
3047 { "Alert",
3048 "ipmi.se10.action.alert", FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL }},
3049 { &hf_ipmi_se_10_entries,
3050 { "Number of event filter table entries",
3051 "ipmi.se10.entries", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3052 { &hf_ipmi_se_10_evtype,
3053 { "Event/Reading type",
3054 "ipmi.se10.evtype", FT_UINT8, BASE_HEX|BASE_RANGE_STRING, RVALS(evtype_rvals), 0x7f, NULL, HFILL }},
3056 { &hf_ipmi_se_11_rq_timeout,
3057 { "Timeout value",
3058 "ipmi.se11.rq_timeout", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3059 { &hf_ipmi_se_11_rs_timeout,
3060 { "Timeout value",
3061 "ipmi.se11.rs_timeout", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3063 { &hf_ipmi_se_12_byte1,
3064 { "Parameter selector",
3065 "ipmi.se12.byte1", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
3066 { &hf_ipmi_se_12_param,
3067 { "Parameter selector",
3068 "ipmi.se12.param", FT_UINT8, BASE_HEX, NULL, 0x7f, NULL, HFILL }},
3069 { &hf_ipmi_se_12_data,
3070 { "Parameter data",
3071 "ipmi.se12.data", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
3073 { &hf_ipmi_se_13_byte1,
3074 { "Parameter selector",
3075 "ipmi.se13.byte1", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
3076 { &hf_ipmi_se_13_getrev,
3077 { "Get Parameter Revision only",
3078 "ipmi.se13.getrev", FT_BOOLEAN, 8, NULL, 0x80, NULL, HFILL }},
3079 { &hf_ipmi_se_13_param,
3080 { "Parameter selector",
3081 "ipmi.se13.param", FT_UINT8, BASE_HEX, NULL, 0x7f, NULL, HFILL }},
3082 { &hf_ipmi_se_13_set,
3083 { "Set Selector",
3084 "ipmi.se13.set", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
3085 { &hf_ipmi_se_13_block,
3086 { "Block Selector",
3087 "ipmi.se13.block", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
3088 { &hf_ipmi_se_13_rev_present,
3089 { "Present",
3090 "ipmi.se13.rev.present", FT_UINT8, BASE_DEC, NULL, 0xf0, NULL, HFILL }},
3091 { &hf_ipmi_se_13_rev_compat,
3092 { "Oldest forward-compatible",
3093 "ipmi.se13.rev.compat", FT_UINT8, BASE_DEC, NULL, 0x0f, NULL, HFILL }},
3094 { &hf_ipmi_se_13_data,
3095 { "Parameter data",
3096 "ipmi.se13.data", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
3098 { &hf_ipmi_se_14_processed_by,
3099 { "Set Record ID for last record processed by",
3100 "ipmi.se14.processed_by", FT_BOOLEAN, 8, TFS(&tfs_14_processed), 0x01, NULL, HFILL }},
3101 { &hf_ipmi_se_14_rid,
3102 { "Record ID",
3103 "ipmi.se14.rid", FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL }},
3105 { &hf_ipmi_se_15_tstamp,
3106 { "Most recent addition timestamp",
3107 "ipmi.se15.tstamp", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
3108 { &hf_ipmi_se_15_lastrec,
3109 { "Record ID for last record in SEL",
3110 "ipmi.se15.lastrec", FT_UINT16, BASE_HEX|BASE_SPECIAL_VALS, VALS(unique_sel_is_empty), 0, NULL, HFILL }},
3111 { &hf_ipmi_se_15_proc_sw,
3112 { "Last SW Processed Event Record ID",
3113 "ipmi.se15.proc_sw", FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL }},
3114 { &hf_ipmi_se_15_proc_bmc,
3115 { "Last BMC Processed Event Record ID",
3116 "ipmi.se15.proc_bmc", FT_UINT16, BASE_HEX|BASE_SPECIAL_VALS, VALS(unique_event_processed_not_logged), 0, NULL, HFILL }},
3118 { &hf_ipmi_se_16_chan,
3119 { "Channel",
3120 "ipmi.se16.chan", FT_UINT8, BASE_CUSTOM, CF_FUNC(ipmi_fmt_channel), 0x0f, NULL, HFILL }},
3121 { &hf_ipmi_se_16_op,
3122 { "Operation",
3123 "ipmi.se16.op", FT_UINT8, BASE_HEX, VALS(vals_16_op), 0xc0, NULL, HFILL }},
3124 { &hf_ipmi_se_16_dst,
3125 { "Destination",
3126 "ipmi.se16.dst", FT_UINT8, BASE_HEX, NULL, 0x0f, NULL, HFILL }},
3127 { &hf_ipmi_se_16_send_string,
3128 { "Send Alert String",
3129 "ipmi.se16.send_string", FT_BOOLEAN, 8, NULL, 0x80, NULL, HFILL }},
3130 { &hf_ipmi_se_16_string_sel,
3131 { "String selector",
3132 "ipmi.se16.string_sel", FT_UINT8, BASE_HEX, NULL, 0x7f, NULL, HFILL }},
3133 { &hf_ipmi_se_16_gen,
3134 { "Generator ID",
3135 "ipmi.se16.gen", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
3136 { &hf_ipmi_se_16_status,
3137 { "Alert Immediate Status",
3138 "ipmi.se16.status", FT_UINT8, BASE_HEX, VALS(vals_16_status), 0, NULL, HFILL }},
3140 { &hf_ipmi_se_17_seq,
3141 { "Sequence Number",
3142 "ipmi.se17.seq", FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL }},
3143 { &hf_ipmi_se_17_tstamp,
3144 { "Local Timestamp",
3145 "ipmi.se17.tstamp", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
3146 { &hf_ipmi_se_17_evsrc,
3147 { "Event Source Type",
3148 "ipmi.se17.evsrc", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
3149 { &hf_ipmi_se_17_sensor_dev,
3150 { "Sensor Device",
3151 "ipmi.se17.sensor_dev", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
3152 { &hf_ipmi_se_17_sensor_num,
3153 { "Sensor Number",
3154 "ipmi.se17.sensor_num", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
3155 { &hf_ipmi_se_17_evdata1,
3156 { "Event Data 1",
3157 "ipmi.se17.evdata1", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
3158 { &hf_ipmi_se_17_evdata2,
3159 { "Event Data 2",
3160 "ipmi.se17.evdata2", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
3161 { &hf_ipmi_se_17_evdata3,
3162 { "Event Data 3",
3163 "ipmi.se17.evdata3", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
3165 { &hf_ipmi_se_20_rq_op,
3166 { "Operation",
3167 "ipmi.se20.rq_op", FT_BOOLEAN, 8, TFS(&tfs_20_op), 0x01, NULL, HFILL }},
3168 { &hf_ipmi_se_20_rs_num,
3169 { "Number of sensors in device for LUN",
3170 "ipmi.se20.rs_num", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3171 { &hf_ipmi_se_20_rs_sdr,
3172 { "Total Number of SDRs in the device",
3173 "ipmi.se20.rs_sdr", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3174 { &hf_ipmi_se_20_rs_population,
3175 { "Sensor population",
3176 "ipmi.se20.rs_population", FT_BOOLEAN, 8, TFS(&tfs_20_pop), 0x80, NULL, HFILL }},
3177 { &hf_ipmi_se_20_rs_lun3,
3178 { "LUN3 has sensors",
3179 "ipmi.se20.rs_lun3", FT_BOOLEAN, 8, NULL, 0x08, NULL, HFILL }},
3180 { &hf_ipmi_se_20_rs_lun2,
3181 { "LUN2 has sensors",
3182 "ipmi.se20.rs_lun2", FT_BOOLEAN, 8, NULL, 0x04, NULL, HFILL }},
3183 { &hf_ipmi_se_20_rs_lun1,
3184 { "LUN1 has sensors",
3185 "ipmi.se20.rs_lun1", FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL }},
3186 { &hf_ipmi_se_20_rs_lun0,
3187 { "LUN0 has sensors",
3188 "ipmi.se20.rs_lun0", FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL }},
3189 { &hf_ipmi_se_20_rs_change,
3190 { "Sensor Population Change Indicator",
3191 "ipmi.se20.rs_change", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }},
3193 { &hf_ipmi_se_21_rid,
3194 { "Reservation ID",
3195 "ipmi.se21.rid", FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL }},
3196 { &hf_ipmi_se_21_record,
3197 { "Record ID",
3198 "ipmi.se21.record", FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL }},
3199 { &hf_ipmi_se_21_offset,
3200 { "Offset into data",
3201 "ipmi.se21.offset", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
3202 { &hf_ipmi_se_21_len,
3203 { "Bytes to read",
3204 "ipmi.se21.len", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
3205 { &hf_ipmi_se_21_next,
3206 { "Next record ID",
3207 "ipmi.se21.next", FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL }},
3208 { &hf_ipmi_se_21_recdata,
3209 { "Record data",
3210 "ipmi.se21.recdata", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
3212 { &hf_ipmi_se_22_resid,
3213 { "Reservation ID",
3214 "ipmi.se22.resid", FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL }},
3216 { &hf_ipmi_se_23_rq_sensor,
3217 { "Sensor Number",
3218 "ipmi.se23.rq_sensor", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3219 { &hf_ipmi_se_23_rq_reading,
3220 { "Reading",
3221 "ipmi.se23.rq_reading", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3222 { &hf_ipmi_se_23_rs_next_reading,
3223 { "Next reading",
3224 "ipmi.se23.rs_next_reading", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3226 { &hf_ipmi_se_24_sensor,
3227 { "Sensor Number",
3228 "ipmi.se24.sensor", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3229 { &hf_ipmi_se_24_mask,
3230 { "Reserved for future 'hysteresis mask'",
3231 "ipmi.se24.mask", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
3232 { &hf_ipmi_se_24_hyst_pos,
3233 { "Positive-going hysteresis",
3234 "ipmi.se24.hyst_pos", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3235 { &hf_ipmi_se_24_hyst_neg,
3236 { "Negative-going hysteresis",
3237 "ipmi.se24.hyst_neg", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3239 { &hf_ipmi_se_25_sensor,
3240 { "Sensor Number",
3241 "ipmi.se25.sensor", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3242 { &hf_ipmi_se_25_mask,
3243 { "Reserved for future 'hysteresis mask'",
3244 "ipmi.se25.mask", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
3245 { &hf_ipmi_se_25_hyst_pos,
3246 { "Positive-going hysteresis",
3247 "ipmi.se25.hyst_pos", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3248 { &hf_ipmi_se_25_hyst_neg,
3249 { "Negative-going hysteresis",
3250 "ipmi.se25.hyst_neg", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3252 { &hf_ipmi_se_26_sensor,
3253 { "Sensor Number",
3254 "ipmi.seXX.sensor", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3255 { &hf_ipmi_se_XX_m_unr,
3256 { "Upper Non-Recoverable",
3257 "ipmi.seXX.mask.unr", FT_BOOLEAN, 8, NULL, 0x20, NULL, HFILL }},
3258 { &hf_ipmi_se_XX_m_uc,
3259 { "Upper Critical",
3260 "ipmi.seXX.mask.uc", FT_BOOLEAN, 8, NULL, 0x10, NULL, HFILL }},
3261 { &hf_ipmi_se_XX_m_unc,
3262 { "Upper Non-Critical",
3263 "ipmi.seXX.mask.unc", FT_BOOLEAN, 8, NULL, 0x08, NULL, HFILL }},
3264 { &hf_ipmi_se_XX_m_lnr,
3265 { "Lower Non-Recoverable",
3266 "ipmi.seXX.mask.lnr", FT_BOOLEAN, 8, NULL, 0x04, NULL, HFILL }},
3267 { &hf_ipmi_se_XX_m_lc,
3268 { "Lower Critical",
3269 "ipmi.seXX.mask.lc", FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL }},
3270 { &hf_ipmi_se_XX_m_lnc,
3271 { "Lower Non-Critical",
3272 "ipmi.seXX.mask.lnc", FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL }},
3273 { &hf_ipmi_se_XX_thr_lnc,
3274 { "Lower Non-Critical Threshold",
3275 "ipmi.seXX.lnc", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3276 { &hf_ipmi_se_XX_thr_lc,
3277 { "Lower Critical Threshold",
3278 "ipmi.seXX.lc", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3279 { &hf_ipmi_se_XX_thr_lnr,
3280 { "Lower Non-Recoverable Threshold",
3281 "ipmi.seXX.lnr", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3282 { &hf_ipmi_se_XX_thr_unc,
3283 { "Upper Non-Critical Threshold",
3284 "ipmi.seXX.unc", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3285 { &hf_ipmi_se_XX_thr_uc,
3286 { "Upper Critical Threshold",
3287 "ipmi.seXX.uc", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3288 { &hf_ipmi_se_XX_thr_unr,
3289 { "Upper Non-Recoverable Threshold",
3290 "ipmi.seXX.unr", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3292 { &hf_ipmi_se_27_sensor,
3293 { "Sensor Number",
3294 "ipmi.se27.sensor", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3296 { &hf_ipmi_se_XX_b1_7,
3297 { "Assertion for UNC (going high) / state bit 7",
3298 "ipmi.seXX.a_7", FT_BOOLEAN, 8, NULL, 0x80, NULL, HFILL }},
3299 { &hf_ipmi_se_XX_b1_6,
3300 { "Assertion for UNC (going low) / state bit 6",
3301 "ipmi.seXX.a_6", FT_BOOLEAN, 8, NULL, 0x40, NULL, HFILL }},
3302 { &hf_ipmi_se_XX_b1_5,
3303 { "Assertion for LNR (going high) / state bit 5",
3304 "ipmi.seXX.a_5", FT_BOOLEAN, 8, NULL, 0x20, NULL, HFILL }},
3305 { &hf_ipmi_se_XX_b1_4,
3306 { "Assertion for LNR (going low) / state bit 4",
3307 "ipmi.seXX.a_4", FT_BOOLEAN, 8, NULL, 0x10, NULL, HFILL }},
3308 { &hf_ipmi_se_XX_b1_3,
3309 { "Assertion for LC (going high) / state bit 3",
3310 "ipmi.seXX.a_3", FT_BOOLEAN, 8, NULL, 0x08, NULL, HFILL }},
3311 { &hf_ipmi_se_XX_b1_2,
3312 { "Assertion for LC (going low) / state bit 2",
3313 "ipmi.seXX.a_2", FT_BOOLEAN, 8, NULL, 0x04, NULL, HFILL }},
3314 { &hf_ipmi_se_XX_b1_1,
3315 { "Assertion for LNC (going high) / state bit 1",
3316 "ipmi.seXX.a_1", FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL }},
3317 { &hf_ipmi_se_XX_b1_0,
3318 { "Assertion for LNC (going low) / state bit 0",
3319 "ipmi.seXX.a_0", FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL }},
3320 { &hf_ipmi_se_XX_b2_6,
3321 { "Reserved / Assertion for state bit 14",
3322 "ipmi.seXX.a_14", FT_BOOLEAN, 8, NULL, 0x40, NULL, HFILL }},
3323 { &hf_ipmi_se_XX_b2_5,
3324 { "Reserved / Assertion for state bit 13",
3325 "ipmi.seXX.a_13", FT_BOOLEAN, 8, NULL, 0x20, NULL, HFILL }},
3326 { &hf_ipmi_se_XX_b2_4,
3327 { "Reserved / Assertion for state bit 12",
3328 "ipmi.seXX.a_12", FT_BOOLEAN, 8, NULL, 0x10, NULL, HFILL }},
3329 { &hf_ipmi_se_XX_b2_3,
3330 { "Assertion for UNR (going high) / state bit 11",
3331 "ipmi.seXX.a_11", FT_BOOLEAN, 8, NULL, 0x08, NULL, HFILL }},
3332 { &hf_ipmi_se_XX_b2_2,
3333 { "Assertion for UNR (going low) / state bit 10",
3334 "ipmi.seXX.a_10", FT_BOOLEAN, 8, NULL, 0x04, NULL, HFILL }},
3335 { &hf_ipmi_se_XX_b2_1,
3336 { "Assertion for UC (going high) / state bit 9",
3337 "ipmi.seXX.a_9", FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL }},
3338 { &hf_ipmi_se_XX_b2_0,
3339 { "Assertion for UC (going low) / state bit 8",
3340 "ipmi.seXX.a_8", FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL }},
3341 { &hf_ipmi_se_XX_b3_7,
3342 { "Deassertion for UNC (going high) / state bit 7",
3343 "ipmi.seXX.d_7", FT_BOOLEAN, 8, NULL, 0x80, NULL, HFILL }},
3344 { &hf_ipmi_se_XX_b3_6,
3345 { "Deassertion for UNC (going low) / state bit 6",
3346 "ipmi.seXX.d_6", FT_BOOLEAN, 8, NULL, 0x40, NULL, HFILL }},
3347 { &hf_ipmi_se_XX_b3_5,
3348 { "Deassertion for LNR (going high) / state bit 5",
3349 "ipmi.seXX.d_5", FT_BOOLEAN, 8, NULL, 0x20, NULL, HFILL }},
3350 { &hf_ipmi_se_XX_b3_4,
3351 { "Deassertion for LNR (going low) / state bit 4",
3352 "ipmi.seXX.d_4", FT_BOOLEAN, 8, NULL, 0x10, NULL, HFILL }},
3353 { &hf_ipmi_se_XX_b3_3,
3354 { "Deassertion for LC (going high) / state bit 3",
3355 "ipmi.seXX.d_3", FT_BOOLEAN, 8, NULL, 0x08, NULL, HFILL }},
3356 { &hf_ipmi_se_XX_b3_2,
3357 { "Deassertion for LC (going low) / state bit 2",
3358 "ipmi.seXX.d_2", FT_BOOLEAN, 8, NULL, 0x04, NULL, HFILL }},
3359 { &hf_ipmi_se_XX_b3_1,
3360 { "Deassertion for LNC (going high) / state bit 1",
3361 "ipmi.seXX.d_1", FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL }},
3362 { &hf_ipmi_se_XX_b3_0,
3363 { "Deassertion for LNC (going low) / state bit 0",
3364 "ipmi.seXX.d_0", FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL }},
3365 { &hf_ipmi_se_XX_b4_6,
3366 { "Reserved / Deassertion for state bit 14",
3367 "ipmi.seXX.d_14", FT_BOOLEAN, 8, NULL, 0x40, NULL, HFILL }},
3368 { &hf_ipmi_se_XX_b4_5,
3369 { "Reserved / Deassertion for state bit 13",
3370 "ipmi.seXX.d_13", FT_BOOLEAN, 8, NULL, 0x20, NULL, HFILL }},
3371 { &hf_ipmi_se_XX_b4_4,
3372 { "Reserved / Deassertion for state bit 12",
3373 "ipmi.seXX.d_12", FT_BOOLEAN, 8, NULL, 0x10, NULL, HFILL }},
3374 { &hf_ipmi_se_XX_b4_3,
3375 { "Deassertion for UNR (going high) / state bit 11",
3376 "ipmi.seXX.d_11", FT_BOOLEAN, 8, NULL, 0x08, NULL, HFILL }},
3377 { &hf_ipmi_se_XX_b4_2,
3378 { "Deassertion for UNR (going low) / state bit 10",
3379 "ipmi.seXX.d_10", FT_BOOLEAN, 8, NULL, 0x04, NULL, HFILL }},
3380 { &hf_ipmi_se_XX_b4_1,
3381 { "Deassertion for UC (going high) / state bit 9",
3382 "ipmi.seXX.d_9", FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL }},
3383 { &hf_ipmi_se_XX_b4_0,
3384 { "Deassertion for UC (going low) / state bit 8",
3385 "ipmi.seXX.d_8", FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL }},
3387 { &hf_ipmi_se_28_sensor,
3388 { "Sensor Number",
3389 "ipmi.se28.sensor", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3390 { &hf_ipmi_se_28_fl_evm,
3391 { "Event Messages",
3392 "ipmi.se28.fl_evm", FT_BOOLEAN, 8, TFS(&tfs_28_enable), 0x80, NULL, HFILL }},
3393 { &hf_ipmi_se_28_fl_scan,
3394 { "Scanning",
3395 "ipmi.se28.fl_scan", FT_BOOLEAN, 8, TFS(&tfs_28_enable), 0x40, NULL, HFILL }},
3396 { &hf_ipmi_se_28_fl_action,
3397 { "Action",
3398 "ipmi.se28.fl_action", FT_UINT8, BASE_HEX, VALS(vals_28_act), 0x30, NULL, HFILL }},
3400 { &hf_ipmi_se_29_sensor,
3401 { "Sensor Number",
3402 "ipmi.se29.sensor", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3403 { &hf_ipmi_se_29_fl_evm,
3404 { "Event Messages",
3405 "ipmi.se29.fl_evm", FT_BOOLEAN, 8, TFS(&tfs_29_enabled), 0x80, NULL, HFILL }},
3406 { &hf_ipmi_se_29_fl_scan,
3407 { "Scanning",
3408 "ipmi.se29.fl_scan", FT_BOOLEAN, 8, TFS(&tfs_29_enabled), 0x40, NULL, HFILL }},
3410 { &hf_ipmi_se_2a_sensor,
3411 { "Sensor Number",
3412 "ipmi.se2a.sensor", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3413 { &hf_ipmi_se_2a_fl_sel,
3414 { "Re-arm Events",
3415 "ipmi.se2a.fl_sel", FT_BOOLEAN, 8, TFS(&tfs_2a_sel), 0x80, NULL, HFILL }},
3417 { &hf_ipmi_se_2b_sensor,
3418 { "Sensor Number",
3419 "ipmi.se2b.sensor", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3420 { &hf_ipmi_se_2b_fl_evm,
3421 { "Event Messages",
3422 "ipmi.se2b.fl_evm", FT_BOOLEAN, 8, TFS(&tfs_2b_enabled), 0x80, NULL, HFILL }},
3423 { &hf_ipmi_se_2b_fl_scan,
3424 { "Sensor scanning",
3425 "ipmi.se2b.fl_scan", FT_BOOLEAN, 8, TFS(&tfs_2b_enabled), 0x40, NULL, HFILL }},
3426 { &hf_ipmi_se_2b_fl_unavail,
3427 { "Reading/status unavailable",
3428 "ipmi.se2b.fl_unavail", FT_BOOLEAN, 8, NULL, 0x20, NULL, HFILL }},
3430 { &hf_ipmi_se_2d_sensor,
3431 { "Sensor Number",
3432 "ipmi.se2d.sensor", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3433 { &hf_ipmi_se_2d_reading,
3434 { "Sensor Reading",
3435 "ipmi.se2d.reading", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3436 { &hf_ipmi_se_2d_b1_7,
3437 { "Reserved / State 7 asserted",
3438 "ipmi.se2d.b1_7", FT_BOOLEAN, 8, NULL, 0x80, NULL, HFILL }},
3439 { &hf_ipmi_se_2d_b1_6,
3440 { "Reserved / State 6 asserted",
3441 "ipmi.se2d.b1_6", FT_BOOLEAN, 8, NULL, 0x40, NULL, HFILL }},
3442 { &hf_ipmi_se_2d_b1_5,
3443 { "At or above UNR threshold / State 5 asserted",
3444 "ipmi.se2d.b1_5", FT_BOOLEAN, 8, NULL, 0x20, NULL, HFILL }},
3445 { &hf_ipmi_se_2d_b1_4,
3446 { "At or above UC threshold / State 4 asserted",
3447 "ipmi.se2d.b1_4", FT_BOOLEAN, 8, NULL, 0x10, NULL, HFILL }},
3448 { &hf_ipmi_se_2d_b1_3,
3449 { "At or above UNC threshold / State 3 asserted",
3450 "ipmi.se2d.b1_3", FT_BOOLEAN, 8, NULL, 0x08, NULL, HFILL }},
3451 { &hf_ipmi_se_2d_b1_2,
3452 { "At or below LNR threshold / State 2 asserted",
3453 "ipmi.se2d.b1_2", FT_BOOLEAN, 8, NULL, 0x04, NULL, HFILL }},
3454 { &hf_ipmi_se_2d_b1_1,
3455 { "At or below LC threshold / State 1 asserted",
3456 "ipmi.se2d.b1_1", FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL }},
3457 { &hf_ipmi_se_2d_b1_0,
3458 { "At or below LNC threshold / State 0 asserted",
3459 "ipmi.se2d.b1_0", FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL }},
3460 { &hf_ipmi_se_2d_b2_6,
3461 { "Reserved / State 14 asserted",
3462 "ipmi.se2d.b1_6", FT_BOOLEAN, 8, NULL, 0x40, NULL, HFILL }},
3463 { &hf_ipmi_se_2d_b2_5,
3464 { "Reserved / State 13 asserted",
3465 "ipmi.se2d.b1_5", FT_BOOLEAN, 8, NULL, 0x20, NULL, HFILL }},
3466 { &hf_ipmi_se_2d_b2_4,
3467 { "Reserved / State 12 asserted",
3468 "ipmi.se2d.b1_4", FT_BOOLEAN, 8, NULL, 0x10, NULL, HFILL }},
3469 { &hf_ipmi_se_2d_b2_3,
3470 { "Reserved / State 11 asserted",
3471 "ipmi.se2d.b1_3", FT_BOOLEAN, 8, NULL, 0x08, NULL, HFILL }},
3472 { &hf_ipmi_se_2d_b2_2,
3473 { "Reserved / State 10 asserted",
3474 "ipmi.se2d.b1_2", FT_BOOLEAN, 8, NULL, 0x04, NULL, HFILL }},
3475 { &hf_ipmi_se_2d_b2_1,
3476 { "Reserved / State 9 asserted",
3477 "ipmi.se2d.b1_1", FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL }},
3478 { &hf_ipmi_se_2d_b2_0,
3479 { "Reserved / State 8 asserted",
3480 "ipmi.se2d.b1_0", FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL }},
3482 { &hf_ipmi_se_2e_sensor,
3483 { "Sensor number",
3484 "ipmi.se2e.sensor", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3485 { &hf_ipmi_se_2e_stype,
3486 { "Sensor type",
3487 "ipmi.se2e.stype", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
3488 { &hf_ipmi_se_2e_evtype,
3489 { "Event/Reading type",
3490 "ipmi.se2e.evtype", FT_UINT8, BASE_HEX|BASE_RANGE_STRING, RVALS(evtype_rvals), 0x7f, NULL, HFILL }},
3492 { &hf_ipmi_se_2f_sensor,
3493 { "Sensor number",
3494 "ipmi.se2f.sensor", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3495 { &hf_ipmi_se_2f_stype,
3496 { "Sensor type",
3497 "ipmi.se2f.stype", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
3498 { &hf_ipmi_se_2f_evtype,
3499 { "Event/Reading type",
3500 "ipmi.se2f.evtype", FT_UINT8, BASE_HEX|BASE_RANGE_STRING, RVALS(evtype_rvals), 0x7f, NULL, HFILL }},
3502 /* Generated from convert_proto_tree_add_text.pl */
3503 { &hf_ipmi_se_evt_trigger_reading, { "Trigger reading", "ipmi.evt.trigger_reading", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
3504 { &hf_ipmi_se_evt_trigger_threshold, { "Trigger threshold", "ipmi.evt.trigger_threshold", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
3505 { &hf_ipmi_se_pst_severity, { "Severity", "ipmi.pst.severity", FT_UINT8, BASE_HEX, VALS(etoff_07), 0xF0, NULL, HFILL }},
3506 { &hf_ipmi_se_pst_previous_state, { "Previous state", "ipmi.pst.previous_state", FT_UINT8, BASE_HEX, NULL, 0x0F, NULL, HFILL }},
3507 { &hf_ipmi_se_05_network_controller, { "Network controller #", "ipmi.se05.network_controller", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
3508 { &hf_ipmi_se_08_error_type, { "Error type", "ipmi.se08.error_type", FT_UINT8, BASE_HEX, VALS(ssi_08_3_err_vals), 0x0F, NULL, HFILL }},
3509 { &hf_ipmi_se_0c_memory_module, { "Memory module/device ID", "ipmi.se0c.memory_module", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
3510 { &hf_ipmi_se_0f_extension_code_err, { "Extension code", "ipmi.se0f.extension_code", FT_UINT8, BASE_HEX, VALS(ssi_0f_2_err_vals), 0x0, NULL, HFILL }},
3511 { &hf_ipmi_se_0f_extension_code_progress, { "Extension code", "ipmi.se0f.extension_code", FT_UINT8, BASE_HEX, VALS(ssi_0f_2_progress_vals), 0x0, NULL, HFILL }},
3512 { &hf_ipmi_se_10_memory_module, { "Memory module/device ID", "ipmi.se10.memory_module", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
3513 { &hf_ipmi_se_10_logging_disable, { "Logging disable for all events of given type", "ipmi.se10.logging_disable", FT_BOOLEAN, 8, NULL, 0x20, NULL, HFILL }},
3514 { &hf_ipmi_se_10_event, { "Event", "ipmi.se10.event", FT_BOOLEAN, 8, TFS(&tfs_deassertion_assertion), 0x10, NULL, HFILL }},
3515 { &hf_ipmi_se_10_event_offset, { "Event Offset", "ipmi.se10.event_offset", FT_UINT8, BASE_HEX, NULL, 0x0F, NULL, HFILL }},
3516 { &hf_ipmi_se_10_sel_filled, { "SEL filled (%)", "ipmi.se10.sel_filled", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
3517 { &hf_ipmi_se_12_log_entry_action, { "Log entry action", "ipmi.se12.log_entry_action", FT_UINT8, BASE_HEX, VALS(ssi_12_2_act_vals), 0xF0, NULL, HFILL }},
3518 { &hf_ipmi_se_12_log_type, { "Log type", "ipmi.se12.log_type", FT_UINT8, BASE_HEX, VALS(ssi_12_2_type_vals), 0x0F, NULL, HFILL }},
3519 { &hf_ipmi_se_12_diagnostic_interrupt, { "Diagnostic interrupt (NMI)", "ipmi.se12.diagnostic_interrupt", FT_BOOLEAN, 8, NULL, 0x20, NULL, HFILL }},
3520 { &hf_ipmi_se_12_oem_action, { "OEM Action", "ipmi.se12.oem_action", FT_BOOLEAN, 8, NULL, 0x10, NULL, HFILL }},
3521 { &hf_ipmi_se_12_power_cycle, { "Power Cycle", "ipmi.se12.power_cycle", FT_BOOLEAN, 8, NULL, 0x08, NULL, HFILL }},
3522 { &hf_ipmi_se_12_reset, { "Reset", "ipmi.se12.reset", FT_BOOLEAN, 8, NULL, 0x04, NULL, HFILL }},
3523 { &hf_ipmi_se_12_power_off, { "Power Off", "ipmi.se12.power_off", FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL }},
3524 { &hf_ipmi_se_12_alert, { "Alert", "ipmi.se12.alert", FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL }},
3525 { &hf_ipmi_se_12_event, { "Event", "ipmi.se12.event", FT_BOOLEAN, 8, TFS(&tfs_second_first_pair), 0x80, NULL, HFILL }},
3526 { &hf_ipmi_se_12_timestamp_clock_type, { "Timestamp clock type", "ipmi.se12.timestamp_clock_type", FT_UINT8, BASE_HEX, VALS(ssi_12_2_clock_vals), 0x0F, NULL, HFILL }},
3527 { &hf_ipmi_se_19_requested_power_state, { "Requested power state", "ipmi.se19.requested_power_state", FT_UINT8, BASE_HEX, VALS(ssoff_22), 0x0, NULL, HFILL }},
3528 { &hf_ipmi_se_19_power_state, { "Power state at time of request", "ipmi.se19.power_state", FT_UINT8, BASE_HEX, VALS(ssoff_22), 0x0, NULL, HFILL }},
3529 { &hf_ipmi_se_1d_restart_cause, { "Restart cause", "ipmi.se1d.restart_cause", FT_UINT8, BASE_HEX, VALS(ssi_1d_2_cause_vals), 0x0F, NULL, HFILL }},
3530 { &hf_ipmi_se_1d_channel, { "Channel", "ipmi.se1d.channel", FT_UINT8, BASE_CUSTOM, CF_FUNC(ipmi_fmt_channel), 0x0, NULL, HFILL }},
3531 { &hf_ipmi_se_21_slot_connector_type, { "Slot/connector type", "ipmi.se21.slot_connector_type", FT_UINT8, BASE_HEX, VALS(ssi_21_2_type_vals), 0x0, NULL, HFILL }},
3532 { &hf_ipmi_se_21_slot_connector, { "Slot/connector #", "ipmi.se21.slot_connector", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
3533 { &hf_ipmi_se_23_interrupt_type, { "Interrupt type", "ipmi.se23.interrupt_type", FT_UINT8, BASE_HEX, VALS(ssi_23_2_intr_vals), 0xF0, NULL, HFILL }},
3534 { &hf_ipmi_se_23_timer_use_at_expiration, { "Timer use at expiration", "ipmi.se23.timer_use_at_expiration", FT_UINT8, BASE_HEX, VALS(ssi_23_2_use_vals), 0x0F, NULL, HFILL }},
3535 { &hf_ipmi_se_28_sensor_number, { "Sensor number", "ipmi.se28.sensor_number", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
3536 { &hf_ipmi_se_28_logical_fru_device, { "Logical FRU device", "ipmi.se28.logical_fru_device", FT_BOOLEAN, 8, NULL, 0x80, NULL, HFILL }},
3537 { &hf_ipmi_se_28_lun_for_master_read_write_command, { "LUN for Master Read-Write command", "ipmi.se28.lun_for_master_read_write_command", FT_UINT8, BASE_HEX, NULL, 0x18, NULL, HFILL }},
3538 { &hf_ipmi_se_28_private_bus_id, { "Private Bus ID", "ipmi.se28.private_bus_id", FT_UINT8, BASE_HEX, NULL, 0x07, NULL, HFILL }},
3539 { &hf_ipmi_se_28_fru_device_id_within_controller, { "FRU Device ID within controller", "ipmi.se28.fru_device_id_within_controller", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
3540 { &hf_ipmi_se_28_i2c_slave_address, { "I2C Slave Address", "ipmi.se28.i2c_slave_address", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
3541 { &hf_ipmi_se_2a_user_id, { "User ID", "ipmi.se2a.user_id", FT_UINT8, BASE_DEC, NULL, 0x3F, NULL, HFILL }},
3542 { &hf_ipmi_se_2a_session_deactivated_by, { "Session deactivated by", "ipmi.se2a.session_deactivated_by", FT_UINT8, BASE_HEX, VALS(ssi_2a_3_deact_vals), 0x30, NULL, HFILL }},
3543 { &hf_ipmi_se_2a_channel, { "Channel", "ipmi.se2a.channel", FT_UINT8, BASE_CUSTOM, CF_FUNC(ipmi_fmt_channel), 0x0F, NULL, HFILL }},
3544 { &hf_ipmi_se_2b_version_change_type, { "Version change type", "ipmi.se2b.version_change_type", FT_UINT8, BASE_DEC, VALS(ssi_2b_2_vctype_vals), 0x0, NULL, HFILL }},
3545 { &hf_ipmi_se_2c_cause, { "Cause", "ipmi.se2c.cause", FT_UINT8, BASE_HEX, VALS(ssi_2c_2_cause_vals), 0xF0, NULL, HFILL }},
3546 { &hf_ipmi_se_2c_previous_state, { "Previous state", "ipmi.se2c.previous_state", FT_UINT8, BASE_HEX, NULL, 0x0F, NULL, HFILL }},
3547 { &hf_ipmi_se_f0_cause, { "Cause", "ipmi.sef0.cause", FT_UINT8, BASE_HEX, VALS(ssi_f0_2_cause_vals), 0xF0, NULL, HFILL }},
3548 { &hf_ipmi_se_f0_previous_state, { "Previous state", "ipmi.sef0.previous_state", FT_UINT8, BASE_HEX, NULL, 0x0F, NULL, HFILL }},
3549 { &hf_ipmi_se_f0_fru_id, { "FRU Id", "ipmi.sef0.fru_id", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
3550 { &hf_ipmi_se_f1_channel, { "Channel", "ipmi.sef1.channel", FT_UINT8, BASE_CUSTOM, CF_FUNC(ipmi_fmt_channel), 0xF0, NULL, HFILL }},
3551 { &hf_ipmi_se_f1_ipmb_b_override_state, { "IPMB-B Override state", "ipmi.sef1.ipmb_b_override_state", FT_BOOLEAN, 8, TFS(&tfs_f1_3_override_state), 0x80, NULL, HFILL }},
3552 { &hf_ipmi_se_f1_ipmb_b_local_status, { "IPMB-B Local status", "ipmi.sef1.ipmb_b_local_status", FT_UINT8, BASE_HEX, VALS(ssi_f1_3_status_vals), 0x70, NULL, HFILL }},
3553 { &hf_ipmi_se_f1_ipmb_a_override_state, { "IPMB-A Override state", "ipmi.sef1.ipmb_a_override_state", FT_BOOLEAN, 8, TFS(&tfs_f1_3_override_state), 0x08, NULL, HFILL }},
3554 { &hf_ipmi_se_f1_ipmb_a_local_status, { "IPMB-A Local status", "ipmi.sef1.ipmb_a_local_status", FT_UINT8, BASE_HEX, VALS(ssi_f1_3_status_vals), 0x07, NULL, HFILL }},
3555 { &hf_ipmi_se_f3_global_status, { "Global Status", "ipmi.sef3.global_status", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
3556 { &hf_ipmi_se_f3_redundant_pm, { "Redundant PM", "ipmi.sef3.redundant_pm", FT_BOOLEAN, 8, TFS(&tfs_provide_not_provide_payload_current), 0x08, NULL, HFILL }},
3557 { &hf_ipmi_se_f3_gs_payload_power, { "Payload Power", "ipmi.sef3.payload_power", FT_BOOLEAN, 8, TFS(&tfs_is_good_not_good), 0x04, NULL, HFILL }},
3558 { &hf_ipmi_se_f3_gs_management_power, { "Management Power", "ipmi.sef3.management_power", FT_BOOLEAN, 8, TFS(&tfs_is_good_not_good), 0x02, NULL, HFILL }},
3559 { &hf_ipmi_se_f3_role, { "Role", "ipmi.sef3.role", FT_BOOLEAN, 8, TFS(&tfs_primary_redundant), 0x01, NULL, HFILL }},
3560 { &hf_ipmi_se_f3_channel_status, { "Channel Status", "ipmi.sef3.channel_status", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
3561 { &hf_ipmi_se_f3_pwr_on, { "PWR_ON", "ipmi.sef3.pwr_on", FT_BOOLEAN, 8, TFS(&tfs_asserted_not_asserted), 0x40, NULL, HFILL }},
3562 { &hf_ipmi_se_f3_payload_power_overcurrent, { "Payload Power Overcurrent", "ipmi.sef3.payload_power_overcurrent", FT_BOOLEAN, 8, TFS(&tfs_detected_not_detected), 0x20, NULL, HFILL }},
3563 { &hf_ipmi_se_f3_channel_payload_power, { "Payload Power", "ipmi.sef3.payload_power", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x10, NULL, HFILL }},
3564 { &hf_ipmi_se_f3_enable, { "ENABLE#", "ipmi.sef3.enable", FT_BOOLEAN, 8, TFS(&tfs_asserted_not_asserted), 0x08, NULL, HFILL }},
3565 { &hf_ipmi_se_f3_management_power_overcurrent, { "Management Power Overcurrent", "ipmi.sef3.management_power_overcurrent", FT_BOOLEAN, 8, TFS(&tfs_detected_not_detected), 0x04, NULL, HFILL }},
3566 { &hf_ipmi_se_f3_channel_management_power, { "Management Power", "ipmi.sef3.management_power", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x02, NULL, HFILL }},
3567 { &hf_ipmi_se_f3_ps1, { "PS1#", "ipmi.sef3.ps1", FT_BOOLEAN, 8, TFS(&tfs_asserted_not_asserted), 0x01, NULL, HFILL }},
3568 { &hf_ipmi_se_f3_power_channel_number, { "Power Channel number", "ipmi.sef3.power_channel_number", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
3569 { &hf_ipmi_se_13_parameter, { "Parameter", "ipmi.se13.parameter", FT_UINT8, BASE_DEC, NULL, 0x7F, NULL, HFILL }},
3570 { &hf_ipmi_se_23_m, { "M", "ipmi.se23.m", FT_UINT16, BASE_HEX, NULL, 0xFFC0, NULL, HFILL }},
3571 { &hf_ipmi_se_23_tolerance, { "Tolerance", "ipmi.se23.tolerance", FT_UINT16, BASE_DEC, NULL, 0x003F, NULL, HFILL }},
3572 { &hf_ipmi_se_23_b, { "B", "ipmi.se23.b", FT_UINT16, BASE_HEX, NULL, 0xFFC0, NULL, HFILL }},
3573 { &hf_ipmi_se_23_accuracy, { "Accuracy", "ipmi.se23.accuracy", FT_UINT16, BASE_DEC, NULL, 0x3FF0, NULL, HFILL }},
3574 { &hf_ipmi_se_23_accuracy_exponent, { "Accuracy exponent", "ipmi.se23.accuracy_exponent", FT_UINT8, BASE_DEC, NULL, 0x0C, NULL, HFILL }},
3575 { &hf_ipmi_se_23_r_exponent, { "R exponent", "ipmi.se23.r_exponent", FT_UINT8, BASE_DEC, NULL, 0xF0, NULL, HFILL }},
3576 { &hf_ipmi_se_23_b_exponent, { "B exponent", "ipmi.se23.b_exponent", FT_UINT8, BASE_DEC, NULL, 0x0F, NULL, HFILL }},
3579 static int *ett[] = {
3580 &ett_ipmi_se_evt_byte3,
3581 &ett_ipmi_se_evt_evd_byte1,
3582 &ett_ipmi_se_evt_evd_byte2,
3583 &ett_ipmi_se_evt_evd_byte3,
3584 &ett_ipmi_se_cp06_byte1,
3585 &ett_ipmi_se_cp07_byte1,
3586 &ett_ipmi_se_cp09_byte1,
3587 &ett_ipmi_se_cp10_byte1,
3588 &ett_ipmi_se_cp12_byte1,
3589 &ett_ipmi_se_cp12_byte2,
3590 &ett_ipmi_se_cp12_byte3,
3591 &ett_ipmi_se_cp13_byte1,
3592 &ett_ipmi_se_cp15_byte1,
3593 &ett_ipmi_se_cp15_byte2,
3594 &ett_ipmi_se_cp15_member,
3595 &ett_ipmi_se_cp15_byte11,
3596 &ett_ipmi_se_00_byte2,
3597 &ett_ipmi_se_01_byte2,
3598 &ett_ipmi_se_10_action,
3599 &ett_ipmi_se_12_byte1,
3600 &ett_ipmi_se_13_byte1,
3601 &ett_ipmi_se_13_rev,
3602 &ett_ipmi_se_14_byte1,
3603 &ett_ipmi_se_16_byte1,
3604 &ett_ipmi_se_16_byte2,
3605 &ett_ipmi_se_16_byte3,
3606 &ett_ipmi_se_20_rq_byte1,
3607 &ett_ipmi_se_20_rs_byte2,
3608 &ett_ipmi_se_23_readingfactors,
3609 &ett_ipmi_se_23_byte1,
3610 &ett_ipmi_se_23_byte2,
3611 &ett_ipmi_se_23_byte3,
3612 &ett_ipmi_se_23_byte4,
3613 &ett_ipmi_se_23_byte5,
3614 &ett_ipmi_se_23_byte6,
3615 &ett_ipmi_se_XX_mask,
3616 &ett_ipmi_se_XX_b1,
3617 &ett_ipmi_se_XX_b2,
3618 &ett_ipmi_se_XX_b3,
3619 &ett_ipmi_se_XX_b4,
3620 &ett_ipmi_se_28_byte2,
3621 &ett_ipmi_se_29_byte1,
3622 &ett_ipmi_se_2a_byte2,
3623 &ett_ipmi_se_2b_byte1,
3624 &ett_ipmi_se_2d_byte2,
3625 &ett_ipmi_se_2d_b1,
3626 &ett_ipmi_se_2d_b2,
3629 static ei_register_info ei[] = {
3630 { &ei_ipmi_se_13_request_param_rev, { "ipmi.se13.request_param_rev", PI_PROTOCOL, PI_NOTE, "Requested parameter revision; parameter data returned", EXPFILL }},
3631 { &ei_ipmi_se_13_request_param_data, { "ipmi.se13.mrequest_param_data", PI_PROTOCOL, PI_NOTE, "Requested parameter data; only parameter version returned", EXPFILL }},
3634 expert_module_t* expert_ipmi_se;
3636 proto_register_field_array(proto_ipmi, hf, array_length(hf));
3637 proto_register_subtree_array(ett, array_length(ett));
3638 expert_ipmi_se = expert_register_protocol(proto_ipmi);
3639 expert_register_field_array(expert_ipmi_se, ei, array_length(ei));
3640 ipmi_register_netfn_cmdtab(IPMI_SE_REQ, IPMI_OEM_NONE, NULL, 0, NULL,
3641 cmd_se, array_length(cmd_se));
3647 * Editor modelines - https://www.wireshark.org/tools/modelines.html
3649 * Local variables:
3650 * c-basic-offset: 8
3651 * tab-width: 8
3652 * indent-tabs-mode: t
3653 * End:
3655 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
3656 * :indentSize=8:tabSize=8:noTabs=false: