Coverage Report

Created: 2026-11-12 07:01

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/wireshark/epan/dissectors/packet-ipmi-se.c
Line
Count
Source
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>
4
 *
5
 * Wireshark - Network traffic analyzer
6
 * By Gerald Combs <gerald@wireshark.org>
7
 * Copyright 1998 Gerald Combs
8
 *
9
 * SPDX-License-Identifier: GPL-2.0-or-later
10
 */
11
12
#include "config.h"
13
14
#include <epan/packet.h>
15
#include <epan/tfs.h>
16
#include <wsutil/array.h>
17
#include "packet-ipmi.h"
18
19
void proto_register_ipmi_se(void);
20
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);
25
26
struct sensor_info {
27
  const value_string *offsets;
28
  intrp_t intrp2;
29
  intrp_t intrp3;
30
  const char *desc;
31
};
32
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;
39
};
40
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;
45
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;
58
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;
90
91
static expert_field ei_ipmi_se_13_request_param_rev;
92
static expert_field ei_ipmi_se_13_request_param_data;
93
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;
106
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;
148
149
static int hf_ipmi_se_00_addr;
150
static int hf_ipmi_se_00_lun;
151
152
static int hf_ipmi_se_01_addr;
153
static int hf_ipmi_se_01_lun;
154
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;
165
166
static int hf_ipmi_se_11_rq_timeout;
167
static int hf_ipmi_se_11_rs_timeout;
168
169
static int hf_ipmi_se_12_byte1;
170
static int hf_ipmi_se_12_param;
171
static int hf_ipmi_se_12_data;
172
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;
181
182
static int hf_ipmi_se_14_processed_by;
183
static int hf_ipmi_se_14_rid;
184
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;
189
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;
197
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;
206
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;
216
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;
223
224
static int hf_ipmi_se_22_resid;
225
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;
229
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;
234
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;
239
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;
253
254
static int hf_ipmi_se_27_sensor;
255
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;
286
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;
291
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;
295
296
static int hf_ipmi_se_2a_sensor;
297
static int hf_ipmi_se_2a_fl_sel;
298
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;
303
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;
321
322
static int hf_ipmi_se_2e_sensor;
323
static int hf_ipmi_se_2e_stype;
324
static int hf_ipmi_se_2e_evtype;
325
326
static int hf_ipmi_se_2f_sensor;
327
static int hf_ipmi_se_2f_stype;
328
static int hf_ipmi_se_2f_evtype;
329
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;
405
406
407
/* Platform Event parsing. Common for Platform Event and Alert Immediate.
408
 */
409
static const value_string evt_evm_rev_vals[] = {
410
  { 0x03, "IPMI 1.0" },
411
  { 0x04, "IPMI 1.5+" },
412
  { 0, NULL },
413
};
414
415
static const struct true_false_string evt_evdir_tfs = {
416
  "Deassertion event",
417
  "Assertion event"
418
};
419
420
static const value_string et_empty[] = {
421
  { 0, NULL }
422
};
423
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 }
430
};
431
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 }
438
};
439
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 }
446
};
447
448
static const value_string etb3_dscr[] = {
449
  { 0x00, "Unspecified" },
450
  { 0x02, "OEM code" },
451
  { 0x03, "Sensor-specific" },
452
  { 0, NULL }
453
};
454
455
static const value_string etb2_oem[] = {
456
  { 0x00, "Unspecified" },
457
  { 0x01, "Previous state and/or severity" },
458
  { 0x02, "OEM code" },
459
  { 0, NULL }
460
};
461
462
static const value_string etb3_oem[] = {
463
  { 0x00, "Unspecified" },
464
  { 0x02, "OEM code" },
465
  { 0, NULL }
466
};
467
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 }
482
};
483
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 }
489
};
490
491
static const value_string etoff_03[] = {
492
  { 0x00, "State Deasserted" },
493
  { 0x01, "State Asserted" },
494
  { 0, NULL }
495
};
496
497
static const value_string etoff_04[] = {
498
  { 0x00, "Predictive Failure Deasserted" },
499
  { 0x01, "Predictive Failure Asserted" },
500
  { 0, NULL }
501
};
502
503
static const value_string etoff_05[] = {
504
  { 0x00, "Limit Not Exceeded" },
505
  { 0x01, "Limit Exceeded" },
506
  { 0, NULL }
507
};
508
509
static const value_string etoff_06[] = {
510
  { 0x00, "Performance Met" },
511
  { 0x01, "Performance Lags" },
512
  { 0, NULL }
513
};
514
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 }
527
};
528
529
static const value_string etoff_08[] = {
530
  { 0x00, "Device Removed/Absent" },
531
  { 0x01, "Device Inserted/Present" },
532
  { 0, NULL }
533
};
534
535
static const value_string etoff_09[] = {
536
  { 0x00, "Device Disabled" },
537
  { 0x01, "Device Enabled" },
538
  { 0, NULL }
539
};
540
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 }
552
};
553
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 }
564
};
565
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 }
572
};
573
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)
577
0
{
578
0
  proto_item* ti;
579
580
0
  if (b == 0x1) {
581
0
    ti = proto_tree_add_item(tree, hf_ipmi_se_evt_trigger_reading, tvb, 0, 1, ENC_LITTLE_ENDIAN);
582
0
    if (d == 0xff)
583
0
      proto_item_append_text(ti, " (unspecified)");
584
0
    return true;
585
0
  }
586
0
  return false;
587
0
}
588
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)
592
0
{
593
0
  proto_item* ti;
594
595
0
  if (b == 0x1) {
596
0
    ti = proto_tree_add_item(tree, hf_ipmi_se_evt_trigger_threshold, tvb, 0, 1, ENC_LITTLE_ENDIAN);
597
0
    if (d == 0xff)
598
0
      proto_item_append_text(ti, " (unspecified)");
599
0
    return true;
600
0
  }
601
0
  return false;
602
0
}
603
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)
607
0
{
608
0
  proto_tree *s_tree;
609
0
  uint32_t tmp;
610
0
  const char *desc;
611
612
0
  if (b == 0x1) {
613
0
    s_tree = proto_tree_add_subtree(tree, tvb, 0, 1, ett_ipmi_se_evt_evd_byte2, NULL, "Previous state/severity");
614
0
    proto_tree_add_item(s_tree, hf_ipmi_se_pst_severity, tvb, 0, 1, ENC_LITTLE_ENDIAN);
615
0
    tmp = d & 0xf;
616
0
    desc = (tmp == 0x0f) ? "Unspecified" : val_to_str_const(tmp, si->offsets, "Unknown");
617
0
    proto_tree_add_uint_format_value(s_tree, hf_ipmi_se_pst_previous_state, tvb, 0, 1,
618
0
        tmp, "%s (0x%02x)", desc, tmp);
619
0
    return true;
620
0
  }
621
0
  return false;
622
0
}
623
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}
632
};
633
634
static const struct evtype_info *
635
get_evtype_info(unsigned int evtype)
636
0
{
637
0
  static const struct {
638
0
    unsigned int id;
639
0
    struct evtype_info eti;
640
0
  } eti_tab[] = {
641
0
    { 0x01, { etb2_thr,  etb3_thr,  etoff_01, eti_thr_2,  eti_thr_3}},
642
0
    { 0x02, { etb2_dscr, etb3_dscr, etoff_02, eti_2_pst_sev, NULL}},
643
0
    { 0x03, { etb2_dscr, etb3_dscr, etoff_03, eti_2_pst_sev, NULL}},
644
0
    { 0x04, { etb2_dscr, etb3_dscr, etoff_04, eti_2_pst_sev, NULL}},
645
0
    { 0x05, { etb2_dscr, etb3_dscr, etoff_05, eti_2_pst_sev, NULL}},
646
0
    { 0x06, { etb2_dscr, etb3_dscr, etoff_06, eti_2_pst_sev, NULL}},
647
0
    { 0x07, { etb2_dscr, etb3_dscr, etoff_07, eti_2_pst_sev, NULL}},
648
0
    { 0x08, { etb2_dscr, etb3_dscr, etoff_08, eti_2_pst_sev, NULL}},
649
0
    { 0x09, { etb2_dscr, etb3_dscr, etoff_09, eti_2_pst_sev, NULL}},
650
0
    { 0x0a, { etb2_dscr, etb3_dscr, etoff_0a, eti_2_pst_sev, NULL}},
651
0
    { 0x0b, { etb2_dscr, etb3_dscr, etoff_0b, eti_2_pst_sev, NULL}},
652
0
    { 0x0c, { etb2_dscr, etb3_dscr, etoff_0c, eti_2_pst_sev, NULL}},
653
0
    { 0x6f, { etb2_dscr, etb3_dscr, NULL,     eti_2_pst_sev, NULL}}
654
0
  };
655
0
  static const struct evtype_info eti_oem = {
656
0
    etb2_oem, etb3_oem, et_empty, eti_2_pst_sev, NULL
657
0
  };
658
0
  static const struct evtype_info eti_rsrv = {
659
0
    et_empty, et_empty, et_empty, NULL, NULL
660
0
  };
661
0
  unsigned int i;
662
663
  /* Look for explicitly specified event/reading type */
664
0
  for (i = 0; i < array_length(eti_tab); i++) {
665
0
    if (eti_tab[i].id == evtype) {
666
0
      return &eti_tab[i].eti;
667
0
    }
668
0
  }
669
670
  /* Falls in OEM range? */
671
0
  if (evtype >= 0x70 && evtype <= 0x7f) {
672
0
    return &eti_oem;
673
0
  }
674
675
0
  return &eti_rsrv;
676
0
}
677
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 }
687
};
688
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 }
697
};
698
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 }
712
};
713
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 }
723
};
724
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 }
735
};
736
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 }
750
};
751
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 }
763
};
764
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 }
770
};
771
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 }
780
};
781
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 }
792
};
793
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 }
802
};
803
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 }
818
};
819
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 }
827
};
828
829
static const value_string ssoff_19[] = {
830
  { 0x00, "Soft Power Control Failure" },
831
  { 0, NULL }
832
};
833
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 }
838
};
839
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 }
850
};
851
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 }
859
};
860
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 }
870
};
871
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 }
880
};
881
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 }
894
};
895
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 }
912
};
913
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 }
921
};
922
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 }
929
};
930
931
static const value_string ssoff_25[] = {
932
  { 0x00, "Entity Present" },
933
  { 0x01, "Entity Absent" },
934
  { 0x02, "Entity Disabled" },
935
  { 0, NULL }
936
};
937
938
static const value_string ssoff_27[] = {
939
  { 0x00, "LAN Heartbeat Lost" },
940
  { 0x01, "LAN Heartbeat" },
941
  { 0, NULL }
942
};
943
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 }
952
};
953
954
static const value_string ssoff_29[] = {
955
  { 0x00, "Battery low" },
956
  { 0x01, "Battery failed" },
957
  { 0x02, "Battery presence detected" },
958
  { 0, NULL }
959
};
960
961
static const value_string ssoff_2a[] = {
962
  { 0x00, "Session Activated" },
963
  { 0x01, "Session Deactivated" },
964
  { 0, NULL }
965
};
966
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 }
977
};
978
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 }
989
};
990
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 }
1001
};
1002
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 }
1009
};
1010
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 }
1018
};
1019
1020
static const value_string ssoff_f3[] = {
1021
  { 0x00, "Global status change" },
1022
  { 0x01, "Channel status change" },
1023
  { 0, NULL }
1024
};
1025
1026
static const value_string ssoff_f4[] = {
1027
  { 0x00, "Minor Reset" },
1028
  { 0x01, "Major Reset" },
1029
  { 0x02, "Alarm Cutoff" },
1030
  { 0, NULL }
1031
};
1032
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_)
1036
0
{
1037
0
  if (b == 0x3 && offs == 0x04) {
1038
    /* LAN Leash Lost */
1039
0
    proto_tree_add_item(tree, hf_ipmi_se_05_network_controller, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1040
0
    return true;
1041
0
  }
1042
0
  return false;
1043
0
}
1044
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 }
1050
};
1051
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_)
1055
0
{
1056
0
  if (b == 0x3 && offs == 0x06) {
1057
    /* Configuration error */
1058
0
    proto_tree_add_item(tree, hf_ipmi_se_08_error_type, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1059
0
    return true;
1060
0
  }
1061
0
  return false;
1062
0
}
1063
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_)
1067
0
{
1068
0
  if (b == 0x3) {
1069
0
    proto_tree_add_item(tree, hf_ipmi_se_0c_memory_module, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1070
0
    return true;
1071
0
  }
1072
0
  return false;
1073
0
}
1074
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 }
1091
};
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
  { 0x15, "Reserved" },
1115
  { 0x16, "Floppy initialization" },
1116
  { 0x17, "Keyboard test" },
1117
  { 0x18, "Pointing device test" },
1118
  { 0x19, "Primary processor initialization" },
1119
  { 0, NULL }
1120
};
1121
1122
static bool
1123
ssi_0f_2(proto_tree *tree, tvbuff_t *tvb, const struct sensor_info *si _U_,
1124
    uint32_t b, uint32_t offs, uint32_t d _U_)
1125
0
{
1126
1127
0
  if (b == 0x3 && offs == 0x00) {
1128
0
    proto_tree_add_item(tree, hf_ipmi_se_0f_extension_code_err, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1129
0
    return true;
1130
0
  }
1131
0
  if (b == 0x3 && (offs == 0x01 || offs == 0x02)) {
1132
0
    proto_tree_add_item(tree, hf_ipmi_se_0f_extension_code_progress, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1133
0
    return true;
1134
0
  }
1135
0
  return false;
1136
0
}
1137
1138
static const struct evtype_info *ssi_10_saveptr;
1139
1140
static bool
1141
ssi_10_2(proto_tree *tree, tvbuff_t *tvb, const struct sensor_info *si _U_,
1142
    uint32_t b, uint32_t offs, uint32_t d)
1143
0
{
1144
0
  if (b == 0x3 && offs == 0x00) {
1145
0
    proto_tree_add_item(tree, hf_ipmi_se_10_memory_module, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1146
0
    return true;
1147
0
  }
1148
0
  if (b == 0x3 && offs == 0x01) {
1149
0
    ssi_10_saveptr = get_evtype_info(d);
1150
0
    proto_tree_add_item(tree, hf_ipmi_se_10_evtype, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1151
0
    return true;
1152
0
  }
1153
0
  return false;
1154
0
}
1155
1156
static const true_false_string tfs_deassertion_assertion = {
1157
  "Deassertion",
1158
  "Assertion"
1159
};
1160
1161
static bool
1162
ssi_10_3(proto_tree *tree, tvbuff_t *tvb, const struct sensor_info *si _U_,
1163
    uint32_t b, uint32_t offs, uint32_t d)
1164
0
{
1165
0
  proto_tree *s_tree;
1166
0
  const value_string *off_vals;
1167
1168
0
  if (b == 0x3 && offs == 0x01) {
1169
0
    if (!ssi_10_saveptr) {
1170
0
      return false; /* something went wrong */
1171
0
    }
1172
0
    off_vals = ssi_10_saveptr->offsets ? ssi_10_saveptr->offsets : et_empty;
1173
0
    s_tree = proto_tree_add_subtree(tree, tvb, 0, 1, ett_ipmi_se_evt_evd_byte3, NULL, "Logging details/Offset");
1174
0
    proto_tree_add_item(s_tree, hf_ipmi_se_10_logging_disable, tvb, 0, 1, ENC_NA);
1175
0
    proto_tree_add_item(s_tree, hf_ipmi_se_10_event, tvb, 0, 1, ENC_NA);
1176
0
    d &= 0x0f;
1177
0
    proto_tree_add_uint_format_value(s_tree, hf_ipmi_se_10_event_offset, tvb, 0, 1,
1178
0
        d, "%s (0x%02x)", val_to_str_const(d, off_vals, "Unknown"), d);
1179
0
    return true;
1180
0
  }
1181
0
  if (b == 0x3 && offs == 0x05) {
1182
0
    proto_tree_add_item(tree, hf_ipmi_se_10_sel_filled, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1183
0
    return true;
1184
0
  }
1185
0
  return false;
1186
0
}
1187
1188
static const value_string ssi_12_2_act_vals[] = {
1189
  { 0x00, "Entry added" },
1190
  { 0x01, "Entry added because event did not map to standard IPMI event" },
1191
  { 0x02, "Entry added along with one or more corresponding SEL entries" },
1192
  { 0x03, "Log cleared" },
1193
  { 0x04, "Log disabled" },
1194
  { 0x05, "Log enabled" },
1195
  { 0, NULL }
1196
};
1197
static const value_string ssi_12_2_type_vals[] = {
1198
  { 0x00, "MCA Log" },
1199
  { 0x01, "OEM 1" },
1200
  { 0x02, "OEM 2" },
1201
  { 0, NULL }
1202
};
1203
static const value_string ssi_12_2_clock_vals[] = {
1204
  { 0x00, "SEL Timestamp Clock updated" },
1205
  { 0x01, "SDR Timestamp Clock updated" },
1206
  { 0, NULL }
1207
};
1208
1209
static const true_false_string tfs_second_first_pair = {
1210
  "Second of pair",
1211
  "First of pair"
1212
};
1213
1214
static bool
1215
ssi_12_2(proto_tree *tree, tvbuff_t *tvb, const struct sensor_info *si _U_,
1216
    uint32_t b, uint32_t offs, uint32_t d _U_)
1217
0
{
1218
0
  proto_tree *s_tree;
1219
1220
0
  if (b == 0x3 && offs == 0x03) {
1221
0
    s_tree = proto_tree_add_subtree(tree, tvb, 0, 1, ett_ipmi_se_evt_evd_byte2, NULL, "Log action/type");
1222
0
    proto_tree_add_item(s_tree, hf_ipmi_se_12_log_entry_action, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1223
0
    proto_tree_add_item(s_tree, hf_ipmi_se_12_log_type, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1224
0
    return true;
1225
0
  }
1226
0
  if (b == 0x3 && offs == 0x04) {
1227
0
    s_tree = proto_tree_add_subtree(tree, tvb, 0, 1, ett_ipmi_se_evt_evd_byte2, NULL, "PEF Actions to be taken");
1228
0
    proto_tree_add_item(s_tree, hf_ipmi_se_12_diagnostic_interrupt, tvb, 0, 1, ENC_NA);
1229
0
    proto_tree_add_item(s_tree, hf_ipmi_se_12_oem_action, tvb, 0, 1, ENC_NA);
1230
0
    proto_tree_add_item(s_tree, hf_ipmi_se_12_power_cycle, tvb, 0, 1, ENC_NA);
1231
0
    proto_tree_add_item(s_tree, hf_ipmi_se_12_reset, tvb, 0, 1, ENC_NA);
1232
0
    proto_tree_add_item(s_tree, hf_ipmi_se_12_power_off, tvb, 0, 1, ENC_NA);
1233
0
    proto_tree_add_item(s_tree, hf_ipmi_se_12_alert, tvb, 0, 1, ENC_NA);
1234
0
    return true;
1235
0
  }
1236
0
  if (b == 0x3 && offs == 0x05) {
1237
0
    s_tree = proto_tree_add_subtree(tree, tvb, 0, 1, ett_ipmi_se_evt_evd_byte2, NULL, "Details");
1238
0
    proto_tree_add_item(s_tree, hf_ipmi_se_12_event, tvb, 0, 1, ENC_NA);
1239
0
    proto_tree_add_item(s_tree, hf_ipmi_se_12_timestamp_clock_type, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1240
0
    return true;
1241
0
  }
1242
0
  return false;
1243
0
}
1244
1245
static bool
1246
ssi_19_2(proto_tree *tree, tvbuff_t *tvb, const struct sensor_info *si _U_,
1247
    uint32_t b, uint32_t offs, uint32_t d _U_)
1248
0
{
1249
0
  if (b == 0x3 && offs == 0x00) {
1250
0
    proto_tree_add_item(tree, hf_ipmi_se_19_requested_power_state, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1251
0
    return true;
1252
0
  }
1253
0
  return false;
1254
0
}
1255
1256
static bool
1257
ssi_19_3(proto_tree *tree, tvbuff_t *tvb, const struct sensor_info *si _U_,
1258
    uint32_t b, uint32_t offs, uint32_t d _U_)
1259
0
{
1260
0
  if (b == 0x3 && offs == 0x00) {
1261
0
    proto_tree_add_item(tree, hf_ipmi_se_19_power_state, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1262
0
    return true;
1263
0
  }
1264
0
  return false;
1265
0
}
1266
1267
/* Copied from ipmi_chassis.c */
1268
static const value_string ssi_1d_2_cause_vals[] = {
1269
  { 0x00, "Unknown" },
1270
  { 0x01, "Chassis Control command" },
1271
  { 0x02, "Reset via pushbutton" },
1272
  { 0x03, "Power-up via pushbutton" },
1273
  { 0x04, "Watchdog expiration" },
1274
  { 0x05, "OEM" },
1275
  { 0x06, "Automatic power-up on AC being applied due to 'always restore' power restore policy" },
1276
  { 0x07, "Automatic power-up on AC being applied due to 'restore previous power state' power restore policy" },
1277
  { 0x08, "Reset via PEF" },
1278
  { 0x09, "Power-cycle via PEF" },
1279
  { 0x0a, "Soft reset" },
1280
  { 0x0b, "Power-up via RTC wakeup" },
1281
  { 0, NULL }
1282
};
1283
1284
static bool
1285
ssi_1d_2(proto_tree *tree, tvbuff_t *tvb, const struct sensor_info *si _U_,
1286
    uint32_t b, uint32_t offs, uint32_t d _U_)
1287
0
{
1288
0
  if (b == 0x3 && offs == 0x07) {
1289
0
    proto_tree_add_item(tree, hf_ipmi_se_1d_restart_cause, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1290
0
    return true;
1291
0
  }
1292
0
  return false;
1293
0
}
1294
1295
static bool
1296
ssi_1d_3(proto_tree *tree, tvbuff_t *tvb, const struct sensor_info *si _U_,
1297
    uint32_t b, uint32_t offs, uint32_t d _U_)
1298
0
{
1299
0
  char s[ITEM_LABEL_LENGTH];
1300
1301
0
  ipmi_fmt_channel(s, d);
1302
0
  if (b == 0x3 && offs == 0x07) {
1303
0
    proto_tree_add_item(tree, hf_ipmi_se_1d_channel, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1304
0
    return true;
1305
0
  }
1306
0
  return false;
1307
0
}
1308
1309
static const value_string ssi_21_2_type_vals[] = {
1310
  { 0x00, "PCI" },
1311
  { 0x01, "Drive Array" },
1312
  { 0x02, "External Peripheral Connector" },
1313
  { 0x03, "Docking" },
1314
  { 0x04, "Other standard internal expansion slot" },
1315
  { 0x05, "Slot associated with entity specified by Entity ID for sensor" },
1316
  { 0x06, "AdvancedTCA" },
1317
  { 0x07, "DIMM/Memory device" },
1318
  { 0x08, "FAN" },
1319
  { 0x09, "PCI Express" },
1320
  { 0x0a, "SCSI (parallel)" },
1321
  { 0x0b, "SATA/SAS" },
1322
  { 0, NULL }
1323
};
1324
1325
static bool
1326
ssi_21_2(proto_tree *tree, tvbuff_t *tvb, const struct sensor_info *si _U_,
1327
    uint32_t b, uint32_t offs _U_, uint32_t d _U_)
1328
0
{
1329
0
  if (b == 0x3) {
1330
0
    proto_tree_add_item(tree, hf_ipmi_se_21_slot_connector_type, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1331
0
    return true;
1332
0
  }
1333
0
  return false;
1334
0
}
1335
1336
static bool
1337
ssi_21_3(proto_tree *tree, tvbuff_t *tvb, const struct sensor_info *si _U_,
1338
    uint32_t b, uint32_t offs _U_, uint32_t d _U_)
1339
0
{
1340
0
  if (b == 0x3) {
1341
0
    proto_tree_add_item(tree, hf_ipmi_se_21_slot_connector, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1342
0
    return true;
1343
0
  }
1344
0
  return false;
1345
0
}
1346
1347
static const value_string ssi_23_2_intr_vals[] = {
1348
  { 0x00, "None" },
1349
  { 0x01, "SMI" },
1350
  { 0x02, "NMI" },
1351
  { 0x03, "Messaging interrupt" },
1352
  { 0x0f, "Unspecified" },
1353
  { 0, NULL }
1354
};
1355
static const value_string ssi_23_2_use_vals[] = {
1356
  { 0x01, "BIOS FRB2" },
1357
  { 0x02, "BIOS/POST" },
1358
  { 0x03, "OS Load" },
1359
  { 0x04, "SMS/OS" },
1360
  { 0x05, "OEM" },
1361
  { 0x0f, "Unspecified" },
1362
  { 0, NULL }
1363
};
1364
1365
static bool
1366
ssi_23_2(proto_tree *tree, tvbuff_t *tvb, const struct sensor_info *si _U_,
1367
    uint32_t b, uint32_t offs _U_, uint32_t d _U_)
1368
0
{
1369
0
  proto_tree *s_tree;
1370
1371
0
  if (b == 0x3) {
1372
0
    s_tree = proto_tree_add_subtree(tree, tvb, 0, 1, ett_ipmi_se_evt_evd_byte2, NULL, "Timer use/interrupt");
1373
0
    proto_tree_add_item(s_tree, hf_ipmi_se_23_interrupt_type, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1374
0
    proto_tree_add_item(s_tree, hf_ipmi_se_23_timer_use_at_expiration, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1375
1376
0
    return true;
1377
0
  }
1378
0
  return false;
1379
0
}
1380
1381
static int ssi28_is_logical_fru;
1382
1383
static bool
1384
ssi_28_2(proto_tree *tree, tvbuff_t *tvb, const struct sensor_info *si _U_,
1385
    uint32_t b, uint32_t offs _U_, uint32_t d)
1386
0
{
1387
0
  proto_tree *s_tree;
1388
1389
0
  if (b == 0x3 && (offs == 0x00 || offs == 0x04)) {
1390
0
    proto_tree_add_item(tree, hf_ipmi_se_28_sensor_number, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1391
0
    return true;
1392
0
  }
1393
0
  if (b == 0x3 && offs == 0x05) {
1394
0
    s_tree = proto_tree_add_subtree(tree, tvb, 0, 1, ett_ipmi_se_evt_evd_byte2, NULL, "FRU details");
1395
0
    ssi28_is_logical_fru = (d & 0x80) ? 1 : 0;
1396
0
    proto_tree_add_item(s_tree, hf_ipmi_se_28_logical_fru_device, tvb, 0, 1, ENC_NA);
1397
0
    proto_tree_add_item(s_tree, hf_ipmi_se_28_lun_for_master_read_write_command, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1398
0
    proto_tree_add_item(s_tree, hf_ipmi_se_28_private_bus_id, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1399
0
    return true;
1400
0
  }
1401
0
  return false;
1402
0
}
1403
1404
static bool
1405
ssi_28_3(proto_tree *tree, tvbuff_t *tvb, const struct sensor_info *si _U_,
1406
    uint32_t b, uint32_t offs _U_, uint32_t d _U_)
1407
0
{
1408
0
  if (b == 0x3 && offs == 0x05) {
1409
0
    if (ssi28_is_logical_fru == -1) {
1410
0
      return false; /* something went wrong */
1411
0
    }
1412
0
    if (ssi28_is_logical_fru) {
1413
0
      proto_tree_add_item(tree, hf_ipmi_se_28_fru_device_id_within_controller, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1414
0
    } else {
1415
0
      proto_tree_add_item(tree, hf_ipmi_se_28_i2c_slave_address, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1416
0
    }
1417
0
    return true;
1418
0
  }
1419
0
  return false;
1420
0
}
1421
1422
static bool
1423
ssi_2a_2(proto_tree *tree, tvbuff_t *tvb, const struct sensor_info *si _U_,
1424
    uint32_t b, uint32_t offs _U_, uint32_t d)
1425
0
{
1426
0
  proto_item *ti;
1427
1428
0
  if (b == 0x3) {
1429
0
    ti = proto_tree_add_item(tree, hf_ipmi_se_2a_user_id, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1430
0
    if ((d & 0x3f) == 0)
1431
0
      proto_item_append_text(ti, " (unspecified)");
1432
0
    return true;
1433
0
  }
1434
0
  return false;
1435
0
}
1436
1437
static const value_string ssi_2a_3_deact_vals[] = {
1438
  { 0x00, "Unspecified cause" },
1439
  { 0x01, "Close Session command" },
1440
  { 0x02, "Timeout" },
1441
  { 0x03, "Configuration change" },
1442
  { 0, NULL }
1443
};
1444
1445
static bool
1446
ssi_2a_3(proto_tree *tree, tvbuff_t *tvb, const struct sensor_info *si _U_,
1447
    uint32_t b, uint32_t offs _U_, uint32_t d _U_)
1448
0
{
1449
0
  proto_tree *s_tree;
1450
1451
0
  if (b == 0x3) {
1452
0
    s_tree = proto_tree_add_subtree(tree, tvb, 0, 1, ett_ipmi_se_evt_evd_byte3, NULL, "Deactivation cause/Channel #");
1453
0
    proto_tree_add_item(s_tree, hf_ipmi_se_2a_session_deactivated_by, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1454
0
    proto_tree_add_item(s_tree, hf_ipmi_se_2a_channel, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1455
0
    return true;
1456
0
  }
1457
0
  return false;
1458
0
}
1459
1460
static const value_string ssi_2b_2_vctype_vals[] = {
1461
  { 0x00, "Unspecified" },
1462
  { 0x01, "Management controller device ID" },
1463
  { 0x02, "Management controller firmware revision" },
1464
  { 0x03, "Management controller device revision" },
1465
  { 0x04, "Management controller manufacturer ID" },
1466
  { 0x05, "Management controller IPMI version" },
1467
  { 0x06, "Management controller auxiliary firmware ID" },
1468
  { 0x07, "Management controller firmware boot block" },
1469
  { 0x08, "Other management controller firmware" },
1470
  { 0x09, "System firmware (EFI/BIOS) change" },
1471
  { 0x0a, "SMBIOS change" },
1472
  { 0x0b, "Operating system change" },
1473
  { 0x0c, "Operating system loader change" },
1474
  { 0x0d, "Service or diagnostic partition change" },
1475
  { 0x0e, "Management software agent change" },
1476
  { 0x0f, "Management software application change" },
1477
  { 0x10, "Management software middleware change" },
1478
  { 0x11, "Programmable hardware change" },
1479
  { 0x12, "Board/FRU module change" },
1480
  { 0x13, "Board/FRU component change" },
1481
  { 0x14, "Board/FRU replaced with equivalent version" },
1482
  { 0x15, "Board/FRU replaced with newer version" },
1483
  { 0x16, "Board/FRU replaced with older version" },
1484
  { 0x17, "Board/FRU configuration change" },
1485
  { 0, NULL }
1486
};
1487
1488
static bool
1489
ssi_2b_2(proto_tree *tree, tvbuff_t *tvb, const struct sensor_info *si _U_,
1490
    uint32_t b, uint32_t offs _U_, uint32_t d _U_)
1491
0
{
1492
0
  if (b == 0x3) {
1493
0
    proto_tree_add_item(tree, hf_ipmi_se_2b_version_change_type, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1494
0
    return true;
1495
0
  }
1496
0
  return false;
1497
0
}
1498
1499
static const value_string ssi_2c_2_cause_vals[] = {
1500
  { 0x00, "Normal State Change" },
1501
  { 0x01, "Change commanded by software external to FRU" },
1502
  { 0x02, "State Change due to operator changing a handle latch" },
1503
  { 0x03, "State Change due to operator pressing the hot swap push button" },
1504
  { 0x04, "State Change due to FRU programmatic action" },
1505
  { 0x05, "Communication lost" },
1506
  { 0x06, "Communication lost due to local failure" },
1507
  { 0x07, "State Change due to unexpected extraction" },
1508
  { 0x08, "State Change due to operator intervention/update" },
1509
  { 0x09, "Unable to compute IPMB address" },
1510
  { 0x0a, "Unexpected Deactivation" },
1511
  { 0x0f, "State Change, Cause Unknown" },
1512
  { 0, NULL }
1513
};
1514
1515
static bool
1516
ssi_2c_2(proto_tree *tree, tvbuff_t *tvb, const struct sensor_info *si,
1517
    uint32_t b, uint32_t offs _U_, uint32_t d)
1518
0
{
1519
0
  proto_tree *s_tree;
1520
1521
0
  if (b == 0x3) {
1522
0
    s_tree = proto_tree_add_subtree(tree, tvb, 0, 1, ett_ipmi_se_evt_evd_byte2, NULL, "Previous state/Cause");
1523
0
    proto_tree_add_item(s_tree, hf_ipmi_se_2c_cause, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1524
0
    d &= 0xf;
1525
0
    proto_tree_add_uint_format_value(s_tree, hf_ipmi_se_2c_previous_state, tvb, 0, 1,
1526
0
        d, "%s (0x%02x)", val_to_str_const(d, si->offsets, "Reserved"), d);
1527
0
    return true;
1528
0
  }
1529
0
  return false;
1530
0
}
1531
1532
static const value_string ssi_f0_2_cause_vals[] = {
1533
  { 0x00, "Normal State Change" },
1534
  { 0x01, "Change Commanded by Shelf Manager with Set FRU Activation" },
1535
  { 0x02, "State Change due to operator changing a Handle Switch" },
1536
  { 0x03, "State Change due to FRU programmatic action" },
1537
  { 0x04, "Communication Lost or Regained" },
1538
  { 0x05, "Communication Lost or Regained - locally detected" },
1539
  { 0x06, "Surprise State Change due to extraction" },
1540
  { 0x07, "State Change due to provided information" },
1541
  { 0x08, "Invalid Hardware Address Detected" },
1542
  { 0x09, "Unexpected Deactivation" },
1543
  { 0x0f, "State Change, Cause Unknown" },
1544
  { 0, NULL }
1545
};
1546
1547
static bool
1548
ssi_f0_2(proto_tree *tree, tvbuff_t *tvb, const struct sensor_info *si,
1549
    uint32_t b, uint32_t offs _U_, uint32_t d)
1550
0
{
1551
0
  proto_tree *s_tree;
1552
1553
0
  if (b == 0x2) {
1554
0
    s_tree = proto_tree_add_subtree(tree, tvb, 0, 1, ett_ipmi_se_evt_evd_byte2, NULL, "Previous state/Cause");
1555
0
    proto_tree_add_item(s_tree, hf_ipmi_se_f0_cause, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1556
0
    d &= 0xf;
1557
0
    proto_tree_add_uint_format_value(s_tree, hf_ipmi_se_f0_previous_state, tvb, 0, 1,
1558
0
        d, "%s (0x%02x)", val_to_str_const(d, si->offsets, "Reserved"), d);
1559
0
    return true;
1560
0
  }
1561
0
  return false;
1562
0
}
1563
1564
static bool
1565
ssi_f0_3(proto_tree *tree, tvbuff_t *tvb, const struct sensor_info *si _U_,
1566
    uint32_t b, uint32_t offs _U_, uint32_t d _U_)
1567
0
{
1568
0
  if (b == 0x2) {
1569
0
    proto_tree_add_item(tree, hf_ipmi_se_f0_fru_id, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1570
0
    return true;
1571
0
  }
1572
0
  return false;
1573
0
}
1574
1575
static bool
1576
ssi_f1_2(proto_tree *tree, tvbuff_t *tvb, const struct sensor_info *si _U_,
1577
    uint32_t b, uint32_t offs _U_, uint32_t d _U_)
1578
0
{
1579
0
  if (b == 0x02) {
1580
0
    proto_tree_add_item(tree, hf_ipmi_se_f1_channel, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1581
0
    return true;
1582
0
  }
1583
0
  return false;
1584
0
}
1585
1586
static const true_false_string tfs_f1_3_override_state = {
1587
  "Override state, bus isolated",
1588
  "Local control state"
1589
};
1590
1591
static const value_string ssi_f1_3_status_vals[] = {
1592
  { 0x00, "No failure" },
1593
  { 0x01, "Unable to drive clock HI" },
1594
  { 0x02, "Unable to drive data HI" },
1595
  { 0x03, "Unable to drive clock LO" },
1596
  { 0x04, "Unable to drive data LO" },
1597
  { 0x05, "Clock low timeout" },
1598
  { 0x06, "Under test" },
1599
  { 0x07, "Undiagnosed communications failure" },
1600
  { 0, NULL }
1601
};
1602
1603
static bool
1604
ssi_f1_3(proto_tree *tree, tvbuff_t *tvb, const struct sensor_info *si _U_,
1605
    uint32_t b, uint32_t offs _U_, uint32_t d _U_)
1606
0
{
1607
0
  proto_tree *s_tree;
1608
1609
0
  if (b == 0x02) {
1610
0
    s_tree = proto_tree_add_subtree(tree, tvb, 0, 1, ett_ipmi_se_evt_evd_byte3, NULL, "Override state / Local status");
1611
0
    proto_tree_add_item(s_tree, hf_ipmi_se_f1_ipmb_b_override_state, tvb, 0, 1, ENC_NA);
1612
0
    proto_tree_add_item(s_tree, hf_ipmi_se_f1_ipmb_b_local_status, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1613
0
    proto_tree_add_item(s_tree, hf_ipmi_se_f1_ipmb_a_override_state, tvb, 0, 1, ENC_NA);
1614
0
    proto_tree_add_item(s_tree, hf_ipmi_se_f1_ipmb_a_local_status, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1615
0
    return true;
1616
0
  }
1617
0
  return false;
1618
0
}
1619
1620
static const true_false_string tfs_provide_not_provide_payload_current = {
1621
  "providing Payload Current",
1622
  "not providing Payload Current (or this is Primary PM)"
1623
};
1624
1625
static const true_false_string tfs_is_good_not_good = {
1626
  "is good",
1627
  "is not good"
1628
};
1629
1630
static const true_false_string tfs_primary_redundant = {
1631
  "Primary",
1632
  "Redundant"
1633
};
1634
1635
static const true_false_string tfs_asserted_not_asserted = {
1636
  "Asserted",
1637
  "Not asserted"
1638
};
1639
1640
static bool
1641
ssi_f3_2(proto_tree *tree, tvbuff_t *tvb, const struct sensor_info *si _U_,
1642
    uint32_t b, uint32_t offs, uint32_t d _U_)
1643
0
{
1644
0
  proto_tree *s_tree;
1645
0
  proto_item *ti;
1646
1647
0
  if (b == 0x02 && offs == 0x00) {
1648
    /* Global status change */
1649
0
    ti = proto_tree_add_item(tree, hf_ipmi_se_f3_global_status, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1650
0
    s_tree = proto_item_add_subtree(ti, ett_ipmi_se_evt_evd_byte2);
1651
0
    proto_tree_add_item(s_tree, hf_ipmi_se_f3_redundant_pm, tvb, 0, 1, ENC_NA);
1652
0
    proto_tree_add_item(s_tree, hf_ipmi_se_f3_gs_payload_power, tvb, 0, 1, ENC_NA);
1653
0
    proto_tree_add_item(s_tree, hf_ipmi_se_f3_gs_management_power, tvb, 0, 1, ENC_NA);
1654
0
    proto_tree_add_item(s_tree, hf_ipmi_se_f3_role, tvb, 0, 1, ENC_NA);
1655
0
    return true;
1656
0
  } else if (b == 0x02 && offs == 0x01) {
1657
    /* Channel status change */
1658
0
    ti = proto_tree_add_item(tree, hf_ipmi_se_f3_channel_status, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1659
0
    s_tree = proto_item_add_subtree(ti, ett_ipmi_se_evt_evd_byte2);
1660
0
    proto_tree_add_item(s_tree, hf_ipmi_se_f3_pwr_on, tvb, 0, 1, ENC_NA);
1661
0
    proto_tree_add_item(s_tree, hf_ipmi_se_f3_payload_power_overcurrent, tvb, 0, 1, ENC_NA);
1662
0
    proto_tree_add_item(s_tree, hf_ipmi_se_f3_channel_payload_power, tvb, 0, 1, ENC_NA);
1663
0
    proto_tree_add_item(s_tree, hf_ipmi_se_f3_enable, tvb, 0, 1, ENC_NA);
1664
0
    proto_tree_add_item(s_tree, hf_ipmi_se_f3_management_power_overcurrent, tvb, 0, 1, ENC_NA);
1665
0
    proto_tree_add_item(s_tree, hf_ipmi_se_f3_channel_management_power, tvb, 0, 1, ENC_NA);
1666
0
    proto_tree_add_item(s_tree, hf_ipmi_se_f3_ps1, tvb, 0, 1, ENC_NA);
1667
0
    return true;
1668
0
  }
1669
1670
0
  return false;
1671
0
}
1672
1673
static bool
1674
ssi_f3_3(proto_tree *tree, tvbuff_t *tvb, const struct sensor_info *si _U_,
1675
    uint32_t b, uint32_t offs, uint32_t d _U_)
1676
0
{
1677
0
  if (b == 0x02 && offs == 0x01) {
1678
    /* Channel status change */
1679
0
    proto_tree_add_item(tree, hf_ipmi_se_f3_power_channel_number, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1680
0
    return true;
1681
0
  }
1682
1683
0
  return false;
1684
0
}
1685
1686
static void
1687
reinit_statics(void)
1688
0
{
1689
0
  ssi_10_saveptr = NULL;
1690
0
  ssi28_is_logical_fru = -1;
1691
0
}
1692
1693
static const struct sensor_info *
1694
get_sensor_info(unsigned int stype)
1695
0
{
1696
0
  static const struct {
1697
0
    unsigned int id;
1698
0
    struct sensor_info si;
1699
0
  } si_tab[] = {
1700
0
    { 0x01, { NULL,     NULL,     NULL,     "Temperature" }},
1701
0
    { 0x02, { NULL,     NULL,     NULL,     "Voltage" }},
1702
0
    { 0x03, { NULL,     NULL,     NULL,     "Current" }},
1703
0
    { 0x04, { NULL,     NULL,     NULL,     "Fan" }},
1704
0
    { 0x05, { ssoff_05, ssi_05_2, NULL,     "Physical Security (Chassis Intrusion)" }},
1705
0
    { 0x06, { ssoff_06, NULL,     NULL,     "Platform Security Violation Attempt" }},
1706
0
    { 0x07, { ssoff_07, NULL,     NULL,     "Processor" }},
1707
0
    { 0x08, { ssoff_08, NULL,     ssi_08_3, "Power Supply" }},
1708
0
    { 0x09, { ssoff_09, NULL,     NULL,     "Power Unit" }},
1709
0
    { 0x0a, { NULL,     NULL,     NULL,     "Cooling Device" }},
1710
0
    { 0x0b, { NULL,     NULL,     NULL,     "Other Units-based Sensor (per units given in SDR)" }},
1711
0
    { 0x0c, { ssoff_0c, NULL,     ssi_0c_3, "Memory" }},
1712
0
    { 0x0d, { ssoff_0d, NULL,     NULL,     "Drive Slot (Bay)" }},
1713
0
    { 0x0e, { NULL,     NULL,     NULL,     "POST Memory Resize" }},
1714
0
    { 0x0f, { ssoff_0f, ssi_0f_2, NULL,     "System Firmware Progress (formerly POST Error)" }},
1715
0
    { 0x10, { ssoff_10, ssi_10_2, ssi_10_3, "Event Logging Disabled" }},
1716
0
    { 0x11, { ssoff_11, NULL,     NULL,     "Watchdog 1" }},
1717
0
    { 0x12, { ssoff_12, ssi_12_2, NULL,     "System Event" }},
1718
0
    { 0x13, { ssoff_13, NULL,     NULL,     "Critical Interrupt" }},
1719
0
    { 0x14, { ssoff_14, NULL,     NULL,     "Button" }},
1720
0
    { 0x15, { NULL,     NULL,     NULL,     "Module / Board" }},
1721
0
    { 0x16, { NULL,     NULL,     NULL,     "Microcontroller / Coprocessor" }},
1722
0
    { 0x17, { NULL,     NULL,     NULL,     "Add-in Card" }},
1723
0
    { 0x18, { NULL,     NULL,     NULL,     "Chassis" }},
1724
0
    { 0x19, { ssoff_19, ssi_19_2, ssi_19_3, "Chip Set" }},
1725
0
    { 0x1a, { NULL,     NULL,     NULL,     "Other FRU" }},
1726
0
    { 0x1b, { ssoff_1b, NULL,     NULL,     "Cable / Interconnect" }},
1727
0
    { 0x1c, { NULL,     NULL,     NULL,     "Terminator" }},
1728
0
    { 0x1d, { ssoff_1d, ssi_1d_2, ssi_1d_3, "System Boot / Restart Initiated" }},
1729
0
    { 0x1e, { ssoff_1e, NULL,     NULL,     "Boot Error" }},
1730
0
    { 0x1f, { ssoff_1f, NULL,     NULL,     "OS Boot" }},
1731
0
    { 0x20, { ssoff_20, NULL,     NULL,     "OS Critical Stop" }},
1732
0
    { 0x21, { ssoff_21, ssi_21_2, ssi_21_3, "Slot / Connector" }},
1733
0
    { 0x22, { ssoff_22, NULL,     NULL,     "System ACPI Power State" }},
1734
0
    { 0x23, { ssoff_23, ssi_23_2, NULL,     "Watchdog 2" }},
1735
0
    { 0x24, { ssoff_24, NULL,     NULL,     "Platform Alert" }},
1736
0
    { 0x25, { ssoff_25, NULL,     NULL,     "Entity Presence" }},
1737
0
    { 0x26, { NULL,     NULL,     NULL,     "Monitor ASIC / IC" }},
1738
0
    { 0x27, { ssoff_27, NULL,     NULL,     "LAN" }},
1739
0
    { 0x28, { ssoff_28, ssi_28_2, ssi_28_3, "Management Subsystem Health" }},
1740
0
    { 0x29, { ssoff_29, NULL,     NULL,     "Battery" }},
1741
0
    { 0x2a, { ssoff_2a, ssi_2a_2, ssi_2a_3, "Session Audit" }},
1742
0
    { 0x2b, { ssoff_2b, ssi_2b_2, NULL,     "Version Change" }},
1743
0
    { 0x2c, { ssoff_2c, ssi_2c_2, NULL,     "FRU State" }},
1744
0
    { 0xf0, { ssoff_f0, ssi_f0_2, ssi_f0_3, "Hot Swap (ATCA)" }},
1745
0
    { 0xf1, { ssoff_f1, ssi_f1_2, ssi_f1_3, "IPMB Physical State (ATCA)" }},
1746
0
    { 0xf2, { ssoff_f2, NULL,     NULL,     "Module Hot Swap (AMC.0)" }},
1747
0
    { 0xf3, { ssoff_f3, ssi_f3_2, ssi_f3_3, "Power Channel Notification" }},
1748
0
    { 0xf4, { ssoff_f4, NULL,     NULL,     "Telco Alarm Input" }}
1749
0
  };
1750
0
  static const struct sensor_info si_oem = {
1751
0
    NULL, NULL, NULL, "OEM Reserved"
1752
0
  };
1753
0
  static const struct sensor_info si_rsrv = {
1754
0
    NULL, NULL, NULL, "Reserved"
1755
0
  };
1756
0
  unsigned int i;
1757
1758
  /* Look for explicitly defined ones */
1759
0
  for (i = 0; i < array_length(si_tab); i++) {
1760
0
    if (si_tab[i].id == stype) {
1761
0
      return &si_tab[i].si;
1762
0
    }
1763
0
  }
1764
1765
0
  if (stype >= 0xc0 && stype <= 0xff) {
1766
0
    return &si_oem;
1767
0
  }
1768
1769
0
  return &si_rsrv;
1770
0
}
1771
1772
static void
1773
parse_platform_event(tvbuff_t *tvb, proto_tree *tree)
1774
0
{
1775
0
  proto_item *ti;
1776
0
  proto_tree *s_tree;
1777
0
  tvbuff_t *next_tvb;
1778
0
  unsigned int stype, evtype;
1779
0
  const struct sensor_info *si;
1780
0
  const struct evtype_info *eti;
1781
0
  unsigned int d, b2, b3, offs;
1782
0
  const value_string *off_vals;
1783
1784
0
  stype = tvb_get_uint8(tvb, 1);
1785
0
  si = get_sensor_info(stype);
1786
0
  evtype = tvb_get_uint8(tvb, 3) & 0x7f;
1787
0
  eti = get_evtype_info(evtype);
1788
1789
0
  proto_tree_add_item(tree, hf_ipmi_se_evt_rev, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1790
0
  proto_tree_add_uint_format_value(tree, hf_ipmi_se_evt_sensor_type, tvb, 1, 1, stype,
1791
0
      "%s (0x%02x)", si->desc, stype);
1792
0
  proto_tree_add_item(tree, hf_ipmi_se_evt_sensor_num, tvb, 2, 1, ENC_LITTLE_ENDIAN);
1793
0
  ti = proto_tree_add_item(tree, hf_ipmi_se_evt_byte3, tvb, 3, 1, ENC_LITTLE_ENDIAN);
1794
0
  s_tree = proto_item_add_subtree(ti, ett_ipmi_se_evt_byte3);
1795
0
  proto_tree_add_item(s_tree, hf_ipmi_se_evt_dir, tvb, 3, 1, ENC_LITTLE_ENDIAN);
1796
0
  proto_tree_add_item(s_tree, hf_ipmi_se_evt_type, tvb, 3, 1, ENC_LITTLE_ENDIAN);
1797
1798
0
  offs = tvb_get_uint8(tvb, 4);
1799
0
  b2 = offs >> 6;
1800
0
  b3 = (offs >> 4) & 0x3;
1801
0
  off_vals = eti->offsets ? eti->offsets : si->offsets ? si->offsets : et_empty;
1802
1803
0
  ti = proto_tree_add_item(tree, hf_ipmi_se_evt_data1, tvb, 4, 1, ENC_LITTLE_ENDIAN);
1804
0
  s_tree = proto_item_add_subtree(ti, ett_ipmi_se_evt_evd_byte1);
1805
0
  proto_tree_add_uint_format_value(s_tree, hf_ipmi_se_evt_data1_b2, tvb, 4, 1, offs,
1806
0
      "%s (0x%02x)", val_to_str_const(b2, eti->byte2, "Reserved"), b2);
1807
0
  proto_tree_add_uint_format_value(s_tree, hf_ipmi_se_evt_data1_b3, tvb, 4, 1, offs,
1808
0
      "%s (0x%02x)", val_to_str_const(b3, eti->byte3, "Reserved"), b3);
1809
0
  offs &= 0x0f;
1810
0
  proto_tree_add_uint_format_value(s_tree, hf_ipmi_se_evt_data1_offs, tvb, 4, 1, offs,
1811
0
      "%s (0x%02x)", val_to_str_const(offs, off_vals, "Reserved"), offs);
1812
1813
  /* This is tricky. First, bytes 2-3 are optional and may be absent.
1814
     Second, the necessity to interpret them either in a generic way or in
1815
     sensor-specific way depends on the value in byte 1. And at last,
1816
     there could be mixture of both ways: the byte 2 can relate to
1817
     'previous state', which could be sensor-specific.
1818
1819
     Thus, intrp() methods return whether they actually handled the
1820
     value. If the 'generic' (related to event/reading type) method fails
1821
     to handle the value, we call the 'specific' one. If that fails as
1822
     well, we just output it as a hex value.
1823
1824
     This is further complicated by the fact that in some events, the
1825
     interpretation of the byte 3 depends on the 2nd byte - which could
1826
     be specified as having some generic type. Thus, we check it and
1827
     fall back to "default" display in such weird cases.
1828
  */
1829
0
  reinit_statics();
1830
0
  if (tvb_captured_length(tvb) <= 5) {
1831
0
    return;
1832
0
  }
1833
1834
0
  next_tvb = tvb_new_subset_length(tvb, 5, 1);
1835
0
  d = tvb_get_uint8(next_tvb, 0);
1836
0
  if ((eti->intrp2 && eti->intrp2(tree, next_tvb, si, b2, offs, d))
1837
0
      || (si->intrp2 && si->intrp2(tree, next_tvb, si, b2, offs, d))) {
1838
    /* One of them succeeded. */
1839
0
    ti = proto_tree_add_item(tree, hf_ipmi_se_evt_data2, next_tvb, 0, 1, ENC_LITTLE_ENDIAN);
1840
0
    proto_item_set_hidden(ti);
1841
0
  } else {
1842
    /* Just add as hex */
1843
0
    proto_tree_add_item(tree, hf_ipmi_se_evt_data2, next_tvb, 0, 1, ENC_LITTLE_ENDIAN);
1844
0
  }
1845
1846
  /* Now the same for byte 3 */
1847
0
  if (tvb_captured_length(tvb) <= 6) {
1848
0
    return;
1849
0
  }
1850
1851
0
  next_tvb = tvb_new_subset_length(tvb, 6, 1);
1852
0
  d = tvb_get_uint8(next_tvb, 0);
1853
0
  if ((eti->intrp3 && eti->intrp3(tree, next_tvb, si, b3, offs, d))
1854
0
      || (si->intrp3 && si->intrp3(tree, next_tvb, si, b3, offs, d))) {
1855
    /* One of them succeeded. */
1856
0
    ti = proto_tree_add_item(tree, hf_ipmi_se_evt_data3, next_tvb, 0, 1, ENC_LITTLE_ENDIAN);
1857
0
    proto_item_set_hidden(ti);
1858
0
  } else {
1859
    /* Just add as hex */
1860
0
    proto_tree_add_item(tree, hf_ipmi_se_evt_data3, next_tvb, 0, 1, ENC_LITTLE_ENDIAN);
1861
0
  }
1862
0
}
1863
1864
/* Common for set/get config parameters */
1865
static const value_string cp00_sip_vals[] = {
1866
  { 0x00, "Set complete" },
1867
  { 0x01, "Set in progress" },
1868
  { 0x02, "Commit write" },
1869
  { 0x03, "Reserved" },
1870
  { 0, NULL }
1871
};
1872
1873
static const struct true_false_string cp10_use_tfs = {
1874
  "BMC uses the following value",
1875
  "BMC uses the value returned from Get System GUID command"
1876
};
1877
1878
static const struct true_false_string cp15_rq_frc_tfs = {
1879
  "Force control operation",
1880
  "Request control operation"
1881
};
1882
1883
static const struct true_false_string cp15_imm_delay_tfs = {
1884
  "Delayed control",
1885
  "Immediate control"
1886
};
1887
1888
static const value_string cp15_op_vals[] = {
1889
  { 0x00, "Power down" },
1890
  { 0x01, "Power up" },
1891
  { 0x02, "Power cycle" },
1892
  { 0x03, "Hard reset" },
1893
  { 0x04, "Pulse diagnostic interrupt" },
1894
  { 0x05, "Initiate a soft-shutdown of OS via ACPI by emulating a fatal overtemperature" },
1895
  { 0, NULL }
1896
};
1897
1898
static const value_string unique_selects_volatile_string_parameters[] = {
1899
  { 0, "Selects volatile string parameters" },
1900
  { 0, NULL }
1901
};
1902
1903
static const value_string unique_disable_message_generation[] = {
1904
  { 0xFF, "Disable Message Generation" },
1905
  { 0, NULL }
1906
};
1907
1908
static const value_string unique_sel_is_empty[] = {
1909
  { 0xFFFF, "SEL is empty" },
1910
  { 0, NULL }
1911
};
1912
1913
static const value_string unique_event_processed_not_logged[] = {
1914
  { 0, "Event processed but cannot be logged" },
1915
  { 0, NULL }
1916
};
1917
1918
static void
1919
cfgparam_00(tvbuff_t *tvb, packet_info* pinfo _U_, proto_tree *tree)
1920
0
{
1921
0
  proto_tree_add_item(tree, hf_ipmi_se_cp00_sip, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1922
0
}
1923
1924
static void
1925
cfgparam_01(tvbuff_t *tvb, packet_info* pinfo _U_, proto_tree *tree)
1926
0
{
1927
0
  proto_tree_add_item(tree, hf_ipmi_se_cp01_alert_startup, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1928
0
  proto_tree_add_item(tree, hf_ipmi_se_cp01_startup, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1929
0
  proto_tree_add_item(tree, hf_ipmi_se_cp01_event_msg, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1930
0
  proto_tree_add_item(tree, hf_ipmi_se_cp01_pef, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1931
0
}
1932
1933
static void
1934
cfgparam_02(tvbuff_t *tvb, packet_info* pinfo _U_, proto_tree *tree)
1935
0
{
1936
0
  proto_tree_add_item(tree, hf_ipmi_se_cp02_diag_intr, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1937
0
  proto_tree_add_item(tree, hf_ipmi_se_cp02_oem_action, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1938
0
  proto_tree_add_item(tree, hf_ipmi_se_cp02_pwr_cycle, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1939
0
  proto_tree_add_item(tree, hf_ipmi_se_cp02_reset, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1940
0
  proto_tree_add_item(tree, hf_ipmi_se_cp02_pwr_down, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1941
0
  proto_tree_add_item(tree, hf_ipmi_se_cp02_alert, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1942
0
}
1943
1944
1945
static void
1946
cfgparam_03(tvbuff_t *tvb, packet_info* pinfo _U_, proto_tree *tree)
1947
0
{
1948
0
  proto_tree_add_item(tree, hf_ipmi_se_cp03_startup, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1949
0
}
1950
1951
static void
1952
cfgparam_04(tvbuff_t *tvb, packet_info* pinfo _U_, proto_tree *tree)
1953
0
{
1954
0
  proto_tree_add_item(tree, hf_ipmi_se_cp04_alert_startup, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1955
0
}
1956
1957
static void
1958
cfgparam_05(tvbuff_t *tvb, packet_info* pinfo _U_, proto_tree *tree)
1959
0
{
1960
0
  proto_tree_add_item(tree, hf_ipmi_se_cp05_num_evfilters, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1961
0
}
1962
1963
static void
1964
cfgparam_06(tvbuff_t *tvb, packet_info* pinfo _U_, proto_tree *tree)
1965
0
{
1966
0
  proto_tree_add_item(tree, hf_ipmi_se_cp06_filter, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1967
0
  proto_tree_add_item(tree, hf_ipmi_se_cp06_data, tvb, 1, 20, ENC_NA);
1968
0
}
1969
1970
static void
1971
cfgparam_07(tvbuff_t *tvb, packet_info* pinfo _U_, proto_tree *tree)
1972
0
{
1973
0
  proto_tree_add_item(tree, hf_ipmi_se_cp07_filter, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1974
0
  proto_tree_add_item(tree, hf_ipmi_se_cp06_data, tvb, 1, 1, ENC_NA);
1975
0
}
1976
1977
static void
1978
cfgparam_08(tvbuff_t *tvb, packet_info* pinfo _U_, proto_tree *tree)
1979
0
{
1980
0
  proto_tree_add_item(tree, hf_ipmi_se_cp08_policies, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1981
0
}
1982
1983
static void
1984
cfgparam_09(tvbuff_t *tvb, packet_info* pinfo _U_, proto_tree *tree)
1985
0
{
1986
0
  proto_tree_add_item(tree, hf_ipmi_se_cp09_entry, tvb, 0, 1, ENC_LITTLE_ENDIAN);
1987
0
  proto_tree_add_item(tree, hf_ipmi_se_cp09_data, tvb, 1, 3, ENC_NA);
1988
0
}
1989
1990
static void
1991
cfgparam_10(tvbuff_t *tvb, packet_info* pinfo _U_, proto_tree *tree)
1992
0
{
1993
0
  proto_tree_add_item(tree, hf_ipmi_se_cp10_useval, tvb, 0, 1, ENC_NA);
1994
0
  ipmi_add_guid(tree, hf_ipmi_se_cp10_guid, tvb, 1);
1995
0
}
1996
1997
static void
1998
cfgparam_11(tvbuff_t *tvb, packet_info* pinfo _U_, proto_tree *tree)
1999
0
{
2000
0
  proto_tree_add_item(tree, hf_ipmi_se_cp11_num_alertstr, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2001
0
}
2002
2003
static void
2004
cfgparam_12(tvbuff_t *tvb, packet_info* pinfo _U_, proto_tree *tree)
2005
0
{
2006
0
  proto_item *ti;
2007
0
  proto_tree *s_tree;
2008
2009
0
  ti = proto_tree_add_item(tree, hf_ipmi_se_cp12_byte1, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2010
0
  s_tree = proto_item_add_subtree(ti, ett_ipmi_se_cp12_byte1);
2011
0
  proto_tree_add_item(s_tree, hf_ipmi_se_cp12_alert_stringsel, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2012
0
  proto_tree_add_item(tree, hf_ipmi_se_cp12_evfilter, tvb, 1, 1, ENC_LITTLE_ENDIAN);
2013
0
  proto_tree_add_item(tree, hf_ipmi_se_cp12_alert_stringset, tvb, 2, 1, ENC_LITTLE_ENDIAN);
2014
0
}
2015
2016
static void
2017
cfgparam_13(tvbuff_t *tvb, packet_info* pinfo _U_, proto_tree *tree)
2018
0
{
2019
0
  proto_tree_add_item(tree, hf_ipmi_se_cp13_stringsel, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2020
0
  proto_tree_add_item(tree, hf_ipmi_se_cp13_blocksel, tvb, 1, 1, ENC_LITTLE_ENDIAN);
2021
0
  proto_tree_add_item(tree, hf_ipmi_se_cp13_string, tvb, 2, -1, ENC_ASCII);
2022
0
}
2023
2024
static void
2025
cfgparam_14(tvbuff_t *tvb, packet_info* pinfo _U_, proto_tree *tree)
2026
0
{
2027
0
  proto_tree_add_item(tree, hf_ipmi_se_cp14_num_gct, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2028
0
}
2029
2030
static void
2031
cp15_add_group_and_member(proto_tree *tree, tvbuff_t *tvb, unsigned offs, unsigned num)
2032
0
{
2033
0
  static int * const byte2[] = { &hf_ipmi_se_cp15_member_check, &hf_ipmi_se_cp15_member_id, NULL };
2034
0
  const char *gdesc;
2035
0
  uint8_t tmp;
2036
2037
0
  tmp = tvb_get_uint8(tvb, offs);
2038
0
  if (tmp == 0x00) {
2039
0
    gdesc = " (unspecified)";
2040
0
  } else if (tmp == 0xff) {
2041
0
    gdesc = " (all groups)";
2042
0
  } else {
2043
0
    gdesc = "";
2044
0
  }
2045
2046
0
  proto_tree_add_uint_format(tree, hf_ipmi_se_cp15_group, tvb, offs, 1, tmp,
2047
0
      "Group ID %d: %d%s", num, tmp, gdesc);
2048
0
  proto_tree_add_bitmask_text(tree, tvb, offs + 1, 1, NULL, NULL, ett_ipmi_se_cp15_member, byte2, ENC_LITTLE_ENDIAN, 0);
2049
0
}
2050
2051
static void
2052
cfgparam_15(tvbuff_t *tvb, packet_info* pinfo _U_, proto_tree *tree)
2053
0
{
2054
0
  static int * const byte2[] = { &hf_ipmi_se_cp15_force, &hf_ipmi_se_cp15_delayed, &hf_ipmi_se_cp15_channel, NULL };
2055
0
  static int * const byte11[] = { &hf_ipmi_se_cp15_retries, &hf_ipmi_se_cp15_operation, NULL };
2056
2057
0
  proto_tree_add_item(tree, hf_ipmi_se_cp15_gctsel, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2058
0
  proto_tree_add_bitmask_text(tree, tvb, 1, 1, NULL, NULL, ett_ipmi_se_cp15_byte2, byte2, ENC_LITTLE_ENDIAN, 0);
2059
0
  cp15_add_group_and_member(tree, tvb, 2, 0);
2060
0
  cp15_add_group_and_member(tree, tvb, 4, 1);
2061
0
  cp15_add_group_and_member(tree, tvb, 6, 2);
2062
0
  cp15_add_group_and_member(tree, tvb, 8, 3);
2063
0
  proto_tree_add_bitmask_text(tree, tvb, 10, 1, NULL, NULL, ett_ipmi_se_cp15_byte11, byte11, ENC_LITTLE_ENDIAN, 0);
2064
0
}
2065
2066
static const struct {
2067
  void (*intrp)(tvbuff_t *tvb, packet_info* pinfo, proto_tree *tree);
2068
  const char *name;
2069
} conf_params[] = {
2070
  { cfgparam_00, "Set In Progress" },
2071
  { cfgparam_01, "PEF Control" },
2072
  { cfgparam_02, "PEF Action global control" },
2073
  { cfgparam_03, "PEF Startup Delay" },
2074
  { cfgparam_04, "PEF Alert Startup Delay" },
2075
  { cfgparam_05, "Number of Event Filters" },
2076
  { cfgparam_06, "Event Filter Table" },
2077
  { cfgparam_07, "Event Filter Table Data 1" },
2078
  { cfgparam_08, "Number of Alert Policy Entries" },
2079
  { cfgparam_09, "Alert Policy Table" },
2080
  { cfgparam_10, "System GUID" },
2081
  { cfgparam_11, "Number of Alert Strings" },
2082
  { cfgparam_12, "Alert String Keys" },
2083
  { cfgparam_13, "Alert Strings" },
2084
  { cfgparam_14, "Number of Group Control Table Entries" },
2085
  { cfgparam_15, "Group Control Table" }
2086
};
2087
2088
static const value_string vals_11_pef_timer[] = {
2089
  { 0x00, "Disable Postpone Timer" },
2090
  { 0xfe, "Temporary PEF disable" },
2091
  { 0xff, "Get Present Countdown Value" },
2092
  { 0, NULL }
2093
};
2094
2095
static const struct true_false_string tfs_14_processed = {
2096
  "BMC",
2097
  "software"
2098
};
2099
2100
static const value_string vals_16_op[] = {
2101
  { 0x00, "Initiate Alert" },
2102
  { 0x01, "Get Alert Immediate status" },
2103
  { 0x02, "Clear Alert Immediate status" },
2104
  { 0x03, "Reserved" },
2105
  { 0, NULL }
2106
};
2107
2108
static const value_string vals_16_status[] = {
2109
  { 0x00, "No status" },
2110
  { 0x01, "Alert was Normal End" },
2111
  { 0x02, "`Call Retry' retries failed" },
2112
  { 0x03, "Alert failed due to timeouts waiting for acknowledge on all retries" },
2113
  { 0xFF, "Alert by this command is in progress" },
2114
  { 0, NULL }
2115
};
2116
2117
static const struct true_false_string tfs_20_op = {
2118
  "Get SDR Count", "Get sensor count"
2119
};
2120
2121
static const struct true_false_string tfs_20_pop = {
2122
  "Dynamic", "Static"
2123
};
2124
2125
static const value_string vals_28_act[] = {
2126
  { 0x00, "Do not change individual enables" },
2127
  { 0x01, "Enable selected event messages" },
2128
  { 0x02, "Disable selected event messages" },
2129
  { 0x03, "Reserved" },
2130
  { 0, NULL }
2131
};
2132
2133
static const struct true_false_string tfs_28_enable = {
2134
  "Enable", "Disable"
2135
};
2136
2137
static const struct true_false_string tfs_29_enabled = {
2138
  "Enabled", "Disabled"
2139
};
2140
2141
static const struct true_false_string tfs_2a_sel = {
2142
  "Selected", "All"
2143
};
2144
2145
static const struct true_false_string tfs_2b_enabled = {
2146
  "Enabled", "Disabled"
2147
};
2148
2149
/* Set event receiver.
2150
 */
2151
static void
2152
rq00(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2153
0
{
2154
0
  proto_tree_add_item(tree, hf_ipmi_se_00_addr, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2155
0
  proto_tree_add_item(tree, hf_ipmi_se_00_lun, tvb, 1, 1, ENC_LITTLE_ENDIAN);
2156
0
}
2157
2158
/* Get event receiver.
2159
 */
2160
static void
2161
rs01(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2162
0
{
2163
0
  proto_tree_add_item(tree, hf_ipmi_se_01_addr, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2164
0
  proto_tree_add_item(tree, hf_ipmi_se_01_lun, tvb, 1, 1, ENC_LITTLE_ENDIAN);
2165
0
}
2166
2167
/* Platform event.
2168
 */
2169
static void
2170
rq02(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2171
0
{
2172
0
  parse_platform_event(tvb, tree);
2173
0
}
2174
2175
/* Get PEF capabilities.
2176
 */
2177
static void
2178
rs10(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2179
0
{
2180
0
  static int * const byte2[] = { &hf_ipmi_se_10_action_oem_filter, &hf_ipmi_se_10_action_diag_intr,
2181
0
    &hf_ipmi_se_10_action_oem_action, &hf_ipmi_se_10_action_pwr_cycle, &hf_ipmi_se_10_action_reset,
2182
0
    &hf_ipmi_se_10_action_pwr_down, &hf_ipmi_se_10_action_alert, NULL };
2183
2184
0
  proto_tree_add_item(tree, hf_ipmi_se_10_pef_version, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2185
0
  proto_tree_add_bitmask_text(tree, tvb, 1, 1, "Action support: ", "None", ett_ipmi_se_10_action,
2186
0
      byte2, ENC_LITTLE_ENDIAN, 0);
2187
0
  proto_tree_add_item(tree, hf_ipmi_se_10_entries, tvb, 2, 1, ENC_LITTLE_ENDIAN);
2188
0
}
2189
2190
/* Arm PEF Postpone Timer.
2191
 */
2192
static void
2193
rq11(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
2194
0
{
2195
0
  uint8_t val;
2196
2197
0
  val = tvb_get_uint8(tvb, 0);
2198
0
  proto_tree_add_uint_format(tree, hf_ipmi_se_11_rq_timeout, tvb, 0, 1,
2199
0
      val, "%s", val_to_str(pinfo->pool, val, vals_11_pef_timer, "Arm Timer for: %d sec"));
2200
0
}
2201
2202
static void
2203
rs11(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
2204
0
{
2205
0
  uint8_t val;
2206
2207
0
  val = tvb_get_uint8(tvb, 0);
2208
0
  proto_tree_add_uint_format(tree, hf_ipmi_se_11_rs_timeout, tvb, 0, 1,
2209
0
      val, "%s", val_to_str(pinfo->pool, val, vals_11_pef_timer, "Present Timer Countdown value: %d sec"));
2210
0
}
2211
2212
/* Set PEF Configuration Parameters.
2213
 */
2214
static void
2215
rq12(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
2216
0
{
2217
0
  proto_item *ti;
2218
0
  proto_tree *s_tree;
2219
0
  tvbuff_t *sub;
2220
0
  uint8_t pno;
2221
0
  const char *desc;
2222
2223
0
  pno = tvb_get_uint8(tvb, 0) & 0x7f;
2224
0
  if (pno < array_length(conf_params)) {
2225
0
    desc = conf_params[pno].name;
2226
0
  } else if (pno >= 96 && pno <= 127) {
2227
0
    desc = "OEM";
2228
0
  } else {
2229
0
    desc = "Reserved";
2230
0
  }
2231
0
  ti = proto_tree_add_uint_format_value(tree, hf_ipmi_se_12_byte1, tvb, 0, 1,
2232
0
      pno, "%s (0x%02x)", desc, pno);
2233
0
  s_tree = proto_item_add_subtree(ti, ett_ipmi_se_12_byte1);
2234
0
  proto_tree_add_uint_format_value(s_tree, hf_ipmi_se_12_param, tvb, 0, 1,
2235
0
      pno, "Parameter selector: %s (0x%02x)", desc, pno);
2236
2237
0
  if (pno < array_length(conf_params)) {
2238
0
    sub = tvb_new_subset_remaining(tvb, 1);
2239
0
    conf_params[pno].intrp(sub, pinfo, tree);
2240
0
  } else {
2241
0
    proto_tree_add_none_format(tree, hf_ipmi_se_12_data, tvb, 1, -1,
2242
0
        "Configuration parameter data: %s", desc);
2243
0
  }
2244
0
}
2245
2246
static const value_string cc12[] = {
2247
  { 0x80, "Parameter not supported" },
2248
  { 0x81, "Attempt to set the 'set in progress' value (in parameter #0) when not in the 'set complete' state" },
2249
  { 0x82, "Attempt to write read-only parameter" },
2250
  { 0x83, "Attempt to read write-only parameter" },
2251
  { 0, NULL }
2252
};
2253
2254
/* Get PEF Configuration Parameters.
2255
 */
2256
static void
2257
rq13(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2258
0
{
2259
0
  proto_item *ti;
2260
0
  proto_tree *s_tree;
2261
0
  uint32_t pno;
2262
0
  const char *desc;
2263
2264
0
  pno = tvb_get_uint8(tvb, 0);
2265
2266
0
  ipmi_set_data(pinfo, 0, pno);
2267
0
  if (!tree) {
2268
    /* Just cache parameter selector */
2269
0
    return;
2270
0
  }
2271
2272
0
  pno &= 0x7f;
2273
2274
0
  if (pno < array_length(conf_params)) {
2275
0
    desc = conf_params[pno].name;
2276
0
  } else if (pno >= 96 && pno <= 127) {
2277
0
    desc = "OEM";
2278
0
  } else {
2279
0
    desc = "Reserved";
2280
0
  }
2281
0
  ti = proto_tree_add_uint_format_value(tree, hf_ipmi_se_13_byte1, tvb, 0, 1,
2282
0
      pno, "%s (0x%02x)", desc, pno);
2283
0
  s_tree = proto_item_add_subtree(ti, ett_ipmi_se_13_byte1);
2284
0
  proto_tree_add_item(s_tree, hf_ipmi_se_13_getrev, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2285
0
  proto_tree_add_uint_format_value(s_tree, hf_ipmi_se_13_param, tvb, 0, 1,
2286
0
      pno, "%s (0x%02x)", desc, pno);
2287
2288
0
  proto_tree_add_item(tree, hf_ipmi_se_13_set, tvb, 1, 1, ENC_LITTLE_ENDIAN);
2289
0
  proto_tree_add_item(tree, hf_ipmi_se_13_block, tvb, 2, 1, ENC_LITTLE_ENDIAN);
2290
0
}
2291
2292
static void
2293
rs13(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
2294
0
{
2295
0
  static int * const byte1[] = { &hf_ipmi_se_13_rev_present, &hf_ipmi_se_13_rev_compat, NULL };
2296
0
  proto_item *ti;
2297
0
  tvbuff_t *sub;
2298
0
  uint32_t pno;
2299
0
  const char *desc;
2300
2301
0
  ti = proto_tree_add_bitmask_text(tree, tvb, 0, 1, "Parameter revision", NULL,
2302
0
      ett_ipmi_se_13_rev, byte1, ENC_LITTLE_ENDIAN, 0);
2303
2304
0
  if (!ipmi_get_data(pinfo, 0, &pno)) {
2305
    /* No request found - cannot parse further */
2306
0
    if (tvb_captured_length(tvb) > 1) {
2307
0
      proto_tree_add_item(tree, hf_ipmi_se_13_data, tvb, 1, -1, ENC_NA);
2308
0
    }
2309
0
    return;
2310
0
  }
2311
2312
0
  if ((pno & 0x80) && tvb_captured_length(tvb) > 1) {
2313
0
    expert_add_info(pinfo, ti, &ei_ipmi_se_13_request_param_rev);
2314
0
  } else if (!(pno & 0x80) && tvb_captured_length(tvb) == 1) {
2315
0
    expert_add_info(pinfo, ti, &ei_ipmi_se_13_request_param_data);
2316
0
  }
2317
2318
0
  pno &= 0x7f;
2319
0
  if (pno < array_length(conf_params)) {
2320
0
    desc = conf_params[pno].name;
2321
0
  } else if (pno >= 96 && pno <= 127) {
2322
0
    desc = "OEM";
2323
0
  } else {
2324
0
    desc = "Reserved";
2325
0
  }
2326
2327
0
  ti = proto_tree_add_uint_format_value(tree, hf_ipmi_se_13_parameter, tvb, 0, 0,
2328
0
    pno, "%s", desc);
2329
0
  proto_item_set_generated(ti);
2330
2331
0
  if (tvb_captured_length(tvb) > 1) {
2332
0
    if (pno < array_length(conf_params)) {
2333
0
      sub = tvb_new_subset_remaining(tvb, 1);
2334
0
      conf_params[pno].intrp(sub, pinfo, tree);
2335
0
    } else {
2336
0
      proto_tree_add_item(tree, hf_ipmi_se_13_data, tvb, 1, -1, ENC_NA);
2337
0
    }
2338
0
  }
2339
0
}
2340
2341
static const value_string cc13[] = {
2342
  { 0x80, "Parameter not supported" },
2343
  { 0, NULL }
2344
};
2345
2346
/* Set Last Processed Event ID Command.
2347
 */
2348
static void
2349
rq14(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2350
0
{
2351
0
  proto_tree_add_item(tree, hf_ipmi_se_14_processed_by, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2352
0
  proto_tree_add_item(tree, hf_ipmi_se_14_rid, tvb, 1, 2, ENC_LITTLE_ENDIAN);
2353
0
}
2354
2355
static const value_string cc14[] = {
2356
  { 0x81, "Cannot execute command, SEL erase in progress" },
2357
  { 0, NULL }
2358
};
2359
2360
/* Get Last Processed Event ID Command.
2361
 */
2362
static void
2363
rs15(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
2364
0
{
2365
0
  ipmi_add_timestamp(pinfo, tree, hf_ipmi_se_15_tstamp, tvb, 0);
2366
0
  proto_tree_add_item(tree, hf_ipmi_se_15_lastrec, tvb, 4, 2, ENC_LITTLE_ENDIAN);
2367
0
  proto_tree_add_item(tree, hf_ipmi_se_15_proc_sw, tvb, 6, 2, ENC_LITTLE_ENDIAN);
2368
0
  proto_tree_add_item(tree, hf_ipmi_se_15_proc_bmc, tvb, 8, 2, ENC_LITTLE_ENDIAN);
2369
0
}
2370
2371
static const value_string cc15[] = {
2372
  { 0x81, "Cannot execute command, SEL erase in progress" },
2373
  { 0, NULL }
2374
};
2375
2376
/* Alert Immediate.
2377
 */
2378
static void
2379
rq16(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2380
0
{
2381
0
  static int * const byte1[] = { &hf_ipmi_se_16_chan, NULL };
2382
0
  static int * const byte2[] = { &hf_ipmi_se_16_op, &hf_ipmi_se_16_dst, NULL };
2383
0
  static int * const byte3[] = { &hf_ipmi_se_16_send_string, &hf_ipmi_se_16_string_sel, NULL };
2384
0
  tvbuff_t *sub;
2385
2386
0
  ipmi_set_data(pinfo, 0, (tvb_get_uint8(tvb, 1) & 0xc0) >> 6);
2387
0
  if (!tree) {
2388
    /* Save the operation */
2389
0
    return;
2390
0
  }
2391
2392
0
  proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL, ett_ipmi_se_16_byte1, byte1, ENC_LITTLE_ENDIAN, 0);
2393
0
  proto_tree_add_bitmask_text(tree, tvb, 1, 1, NULL, NULL, ett_ipmi_se_16_byte2, byte2, ENC_LITTLE_ENDIAN, 0);
2394
0
  proto_tree_add_bitmask_text(tree, tvb, 2, 1, NULL, NULL, ett_ipmi_se_16_byte3, byte3, ENC_LITTLE_ENDIAN, 0);
2395
0
  if (tvb_captured_length(tvb) > 3) {
2396
0
    proto_tree_add_item(tree, hf_ipmi_se_16_gen, tvb, 3, 1, ENC_LITTLE_ENDIAN);
2397
0
    sub = tvb_new_subset_remaining(tvb, 4);
2398
0
    parse_platform_event(sub, tree);
2399
0
  }
2400
0
}
2401
2402
static void
2403
rs16(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2404
0
{
2405
0
  uint32_t val;
2406
2407
0
  if (ipmi_get_data(pinfo, 0, &val) && val == 0x01) {
2408
    /* Operation == Get Alert Immediate Status */
2409
0
    proto_tree_add_item(tree, hf_ipmi_se_16_status, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2410
0
  }
2411
0
}
2412
2413
static const value_string cc16[] = {
2414
  { 0x81, "Alert Immediate rejected due to alert already in progress" },
2415
  { 0x82, "Alert Immediate rejected due to IPMI messaging session active on this channel" },
2416
  { 0x83, "Platform Event parameters not supported" },
2417
  { 0, NULL }
2418
};
2419
2420
/* PET Acknowledge.
2421
 */
2422
static void
2423
rq17(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
2424
0
{
2425
0
  proto_tree_add_item(tree, hf_ipmi_se_17_seq, tvb, 0, 2, ENC_LITTLE_ENDIAN);
2426
0
  ipmi_add_timestamp(pinfo, tree, hf_ipmi_se_17_tstamp, tvb, 2);
2427
0
  proto_tree_add_item(tree, hf_ipmi_se_17_evsrc, tvb, 6, 1, ENC_LITTLE_ENDIAN);
2428
0
  proto_tree_add_item(tree, hf_ipmi_se_17_sensor_dev, tvb, 7, 1, ENC_LITTLE_ENDIAN);
2429
0
  proto_tree_add_item(tree, hf_ipmi_se_17_sensor_num, tvb, 8, 1, ENC_LITTLE_ENDIAN);
2430
0
  proto_tree_add_item(tree, hf_ipmi_se_17_evdata1, tvb, 9, 1, ENC_LITTLE_ENDIAN);
2431
0
  proto_tree_add_item(tree, hf_ipmi_se_17_evdata2, tvb, 10, 1, ENC_LITTLE_ENDIAN);
2432
0
  proto_tree_add_item(tree, hf_ipmi_se_17_evdata3, tvb, 11, 1, ENC_LITTLE_ENDIAN);
2433
0
}
2434
2435
/* Get Device SDR Info.
2436
 */
2437
static void
2438
rq20(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2439
0
{
2440
0
  if (tvb_captured_length(tvb) > 0) {
2441
0
    ipmi_set_data(pinfo, 0, tvb_get_uint8(tvb, 0) & 0x01);
2442
2443
0
    proto_tree_add_item(tree, hf_ipmi_se_20_rq_op, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2444
0
  }
2445
0
}
2446
2447
static void
2448
rs20(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2449
0
{
2450
0
  static int * const byte2[] = { &hf_ipmi_se_20_rs_population, &hf_ipmi_se_20_rs_lun3,
2451
0
    &hf_ipmi_se_20_rs_lun2, &hf_ipmi_se_20_rs_lun1, &hf_ipmi_se_20_rs_lun0, NULL };
2452
0
  uint32_t val;
2453
2454
0
  if (ipmi_get_data(pinfo, 0, &val) && val) {
2455
0
    proto_tree_add_item(tree, hf_ipmi_se_20_rs_sdr, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2456
0
  } else {
2457
0
    proto_tree_add_item(tree, hf_ipmi_se_20_rs_num, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2458
0
  }
2459
0
  proto_tree_add_bitmask_text(tree, tvb, 1, 1, NULL, NULL, ett_ipmi_se_20_rs_byte2,
2460
0
      byte2, ENC_LITTLE_ENDIAN, 0);
2461
0
  if (tvb_get_uint8(tvb, 1) & 0x80) {
2462
    /* Dynamic sensor population */
2463
0
    proto_tree_add_item(tree, hf_ipmi_se_20_rs_change, tvb, 2, 4, ENC_LITTLE_ENDIAN);
2464
0
  }
2465
0
}
2466
2467
2468
/* Get Device SDR.
2469
 */
2470
static void
2471
rq21(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2472
0
{
2473
0
  uint8_t len;
2474
2475
0
  len = tvb_get_uint8(tvb, 5);
2476
2477
0
  proto_tree_add_item(tree, hf_ipmi_se_21_rid, tvb, 0, 2, ENC_LITTLE_ENDIAN);
2478
0
  proto_tree_add_item(tree, hf_ipmi_se_21_record, tvb, 2, 2, ENC_LITTLE_ENDIAN);
2479
0
  proto_tree_add_item(tree, hf_ipmi_se_21_offset, tvb, 4, 1, ENC_LITTLE_ENDIAN);
2480
0
  proto_tree_add_uint_format_value(tree, hf_ipmi_se_21_len, tvb, 5, 1, len,
2481
0
      "%u%s", len, len == 0xff ? "(entire record)" : "");
2482
0
}
2483
2484
static void
2485
rs21(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2486
0
{
2487
0
  proto_tree_add_item(tree, hf_ipmi_se_21_next, tvb, 0, 2, ENC_LITTLE_ENDIAN);
2488
0
  proto_tree_add_item(tree, hf_ipmi_se_21_recdata, tvb, 2, -1, ENC_NA);
2489
0
}
2490
2491
static const value_string cc21[] = {
2492
  { 0x80, "Record changed" },
2493
  { 0, NULL }
2494
};
2495
2496
/* Reserve Device SDR Repository.
2497
 */
2498
static void
2499
rs22(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2500
0
{
2501
0
  proto_tree_add_item(tree, hf_ipmi_se_22_resid, tvb, 0, 2, ENC_LITTLE_ENDIAN);
2502
0
}
2503
2504
/* Get Sensor Reading Factors.
2505
 */
2506
static void
2507
rq23(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2508
0
{
2509
0
  proto_tree_add_item(tree, hf_ipmi_se_23_rq_sensor, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2510
0
  proto_tree_add_item(tree, hf_ipmi_se_23_rq_reading, tvb, 1, 1, ENC_LITTLE_ENDIAN);
2511
0
}
2512
2513
static inline int16_t
2514
sign_extend(int16_t v, int bits)
2515
0
{
2516
0
  if ((v & (1 << (bits - 1))) == 0) {
2517
0
    return v;
2518
0
  }
2519
2520
0
  return v | (0xffff << bits);
2521
0
}
2522
2523
static void
2524
rs23(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2525
0
{
2526
0
  proto_tree *s_tree;
2527
0
  uint16_t tol, acc, accexp, tmp;
2528
0
  int16_t m, b, bexp, rexp;
2529
2530
0
  proto_tree_add_item(tree, hf_ipmi_se_23_rs_next_reading, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2531
2532
0
  m = tvb_get_uint8(tvb, 1);
2533
0
  tmp = tvb_get_uint8(tvb, 2);
2534
0
  m |= (tmp & 0xc0) << 2;
2535
0
  tol = tmp & 0x3f;
2536
0
  b = tvb_get_uint8(tvb, 3);
2537
0
  tmp = tvb_get_uint8(tvb, 4);
2538
0
  b |= (tmp & 0xc0) << 2;
2539
0
  acc = tmp & 0x3f;
2540
0
  tmp = tvb_get_uint8(tvb, 5);
2541
0
  acc |= (tmp & 0xf0) << 4;
2542
0
  accexp = (tmp & 0x0c) >> 2;
2543
0
  tmp = tvb_get_uint8(tvb, 6);
2544
0
  rexp = (tmp & 0xf0) >> 4;
2545
0
  bexp = tmp & 0x0f;
2546
2547
0
  m = sign_extend(m, 10);
2548
0
  b = sign_extend(b, 10);
2549
0
  bexp = sign_extend(bexp, 4);
2550
0
  rexp = sign_extend(rexp, 4);
2551
2552
0
  s_tree = proto_tree_add_subtree_format(tree, tvb, 1, 6, ett_ipmi_se_23_readingfactors, NULL,
2553
0
      "Factors: M=%d B=%d K1=%d K2=%d Acc=%u*10^%u Tol=%u",
2554
0
      m, b, bexp, rexp, acc, accexp, tol);
2555
2556
0
  proto_tree_add_item(s_tree, hf_ipmi_se_23_m, tvb, 1, 2, ENC_LITTLE_ENDIAN);
2557
0
  proto_tree_add_item(s_tree, hf_ipmi_se_23_tolerance, tvb, 1, 2, ENC_LITTLE_ENDIAN);
2558
0
  proto_tree_add_item(s_tree, hf_ipmi_se_23_b, tvb, 3, 2, ENC_LITTLE_ENDIAN);
2559
0
  proto_tree_add_item(s_tree, hf_ipmi_se_23_accuracy, tvb, 4, 2, ENC_LITTLE_ENDIAN);
2560
0
  proto_tree_add_item(s_tree, hf_ipmi_se_23_accuracy_exponent, tvb, 5, 1, ENC_LITTLE_ENDIAN);
2561
0
  proto_tree_add_item(s_tree, hf_ipmi_se_23_r_exponent, tvb, 6, 1, ENC_LITTLE_ENDIAN);
2562
0
  proto_tree_add_item(s_tree, hf_ipmi_se_23_b_exponent, tvb, 6, 1, ENC_LITTLE_ENDIAN);
2563
0
}
2564
2565
/* Set Sensor Hysteresis.
2566
 */
2567
static void
2568
rq24(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2569
0
{
2570
0
  proto_tree_add_item(tree, hf_ipmi_se_24_sensor, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2571
0
  proto_tree_add_item(tree, hf_ipmi_se_24_mask, tvb, 1, 1, ENC_LITTLE_ENDIAN);
2572
0
  proto_tree_add_item(tree, hf_ipmi_se_24_hyst_pos, tvb, 2, 1, ENC_LITTLE_ENDIAN);
2573
0
  proto_tree_add_item(tree, hf_ipmi_se_24_hyst_neg, tvb, 3, 1, ENC_LITTLE_ENDIAN);
2574
0
}
2575
2576
/* Get Sensor Hysteresis.
2577
 */
2578
static void
2579
rq25(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2580
0
{
2581
0
  proto_tree_add_item(tree, hf_ipmi_se_25_sensor, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2582
0
  proto_tree_add_item(tree, hf_ipmi_se_25_mask, tvb, 1, 1, ENC_LITTLE_ENDIAN);
2583
0
}
2584
2585
static void
2586
rs25(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2587
0
{
2588
0
  proto_tree_add_item(tree, hf_ipmi_se_25_hyst_pos, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2589
0
  proto_tree_add_item(tree, hf_ipmi_se_25_hyst_neg, tvb, 1, 1, ENC_LITTLE_ENDIAN);
2590
0
}
2591
2592
/* Common for Get/Set Thresholds */
2593
static void
2594
add_thresholds(tvbuff_t *tvb, int offs, proto_tree *tree, const char *desc)
2595
0
{
2596
0
  static int * const threshold_mask[] = { &hf_ipmi_se_XX_m_unr, &hf_ipmi_se_XX_m_uc, &hf_ipmi_se_XX_m_unc,
2597
0
    &hf_ipmi_se_XX_m_lnr, &hf_ipmi_se_XX_m_lc, &hf_ipmi_se_XX_m_lnc, NULL };
2598
2599
0
  proto_tree_add_bitmask_text(tree, tvb, offs, 1, desc, "None",
2600
0
      ett_ipmi_se_XX_mask, threshold_mask, ENC_LITTLE_ENDIAN, 0);
2601
0
  proto_tree_add_item(tree, hf_ipmi_se_XX_thr_lnc, tvb, offs + 1, 1, ENC_LITTLE_ENDIAN);
2602
0
  proto_tree_add_item(tree, hf_ipmi_se_XX_thr_lc, tvb, offs + 2, 1, ENC_LITTLE_ENDIAN);
2603
0
  proto_tree_add_item(tree, hf_ipmi_se_XX_thr_lnr, tvb, offs + 3, 1, ENC_LITTLE_ENDIAN);
2604
0
  proto_tree_add_item(tree, hf_ipmi_se_XX_thr_unc, tvb, offs + 4, 1, ENC_LITTLE_ENDIAN);
2605
0
  proto_tree_add_item(tree, hf_ipmi_se_XX_thr_uc, tvb, offs + 5, 1, ENC_LITTLE_ENDIAN);
2606
0
  proto_tree_add_item(tree, hf_ipmi_se_XX_thr_unr, tvb, offs + 6, 1, ENC_LITTLE_ENDIAN);
2607
0
}
2608
2609
/* Set Sensor Thresholds.
2610
 */
2611
static void
2612
rq26(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2613
0
{
2614
0
  proto_tree_add_item(tree, hf_ipmi_se_26_sensor, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2615
0
  add_thresholds(tvb, 1, tree, "Set thresholds: ");
2616
0
}
2617
2618
/* Get Sensor Thresholds.
2619
 */
2620
static void
2621
rq27(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2622
0
{
2623
0
  proto_tree_add_item(tree, hf_ipmi_se_27_sensor, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2624
0
}
2625
2626
static void
2627
rs27(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2628
0
{
2629
0
  add_thresholds(tvb, 0, tree, "Readable thresholds: ");
2630
0
}
2631
2632
/* Common for Get EE/Set EE/Rearm
2633
 */
2634
static void
2635
add_events(tvbuff_t *tvb, int offs, proto_tree *tree, const struct true_false_string *tfs,
2636
    const char *desc)
2637
0
{
2638
0
  static int * const bsel[4][8] = {
2639
0
    { &hf_ipmi_se_XX_b1_0, &hf_ipmi_se_XX_b1_1, &hf_ipmi_se_XX_b1_2, &hf_ipmi_se_XX_b1_3,
2640
0
      &hf_ipmi_se_XX_b1_4, &hf_ipmi_se_XX_b1_5, &hf_ipmi_se_XX_b1_6, &hf_ipmi_se_XX_b1_7 },
2641
0
    { &hf_ipmi_se_XX_b2_0, &hf_ipmi_se_XX_b2_1, &hf_ipmi_se_XX_b2_2, &hf_ipmi_se_XX_b2_3,
2642
0
      &hf_ipmi_se_XX_b2_4, &hf_ipmi_se_XX_b2_5, &hf_ipmi_se_XX_b2_6, NULL },
2643
0
    { &hf_ipmi_se_XX_b3_0, &hf_ipmi_se_XX_b3_1, &hf_ipmi_se_XX_b3_2, &hf_ipmi_se_XX_b3_3,
2644
0
      &hf_ipmi_se_XX_b3_4, &hf_ipmi_se_XX_b3_5, &hf_ipmi_se_XX_b3_6, &hf_ipmi_se_XX_b3_7 },
2645
0
    { &hf_ipmi_se_XX_b4_0, &hf_ipmi_se_XX_b4_1, &hf_ipmi_se_XX_b4_2, &hf_ipmi_se_XX_b4_3,
2646
0
      &hf_ipmi_se_XX_b4_4, &hf_ipmi_se_XX_b4_5, &hf_ipmi_se_XX_b4_6, NULL }
2647
0
  };
2648
0
  static int * const tsel[] = { &ett_ipmi_se_XX_b1, &ett_ipmi_se_XX_b2, &ett_ipmi_se_XX_b3, &ett_ipmi_se_XX_b4 };
2649
0
  proto_tree *s_tree;
2650
0
  int len = tvb_captured_length(tvb);
2651
0
  int i, j, val, msk;
2652
2653
0
  for (i = 0; (offs < len) && (i < 4); i++, offs++) {
2654
0
    val = tvb_get_uint8(tvb, offs);
2655
0
    s_tree = proto_tree_add_subtree_format(tree, tvb, offs, 1, *tsel[i], NULL, "%s (byte %d)", desc, i);
2656
0
    for (j = 7; j >= 0; j--) {
2657
0
      if (!bsel[i][j]) {
2658
0
        continue;
2659
0
      }
2660
0
      msk = 1 << j;
2661
0
      proto_tree_add_boolean_format_value(s_tree, *bsel[i][j], tvb, offs, 1,
2662
0
          val & msk, "%s", tfs_get_string(val & msk, tfs));
2663
0
    }
2664
0
  }
2665
0
}
2666
2667
2668
/* Set Sensor Event Enable.
2669
 */
2670
static void
2671
rq28(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2672
0
{
2673
0
  static int * const byte2[] = { &hf_ipmi_se_28_fl_evm, &hf_ipmi_se_28_fl_scan, &hf_ipmi_se_28_fl_action, NULL };
2674
0
  static const struct true_false_string tfs_lect = { "Select", "Do not select" };
2675
2676
0
  proto_tree_add_item(tree, hf_ipmi_se_28_sensor, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2677
0
  proto_tree_add_bitmask_text(tree, tvb, 1, 1, NULL, NULL, ett_ipmi_se_28_byte2, byte2, ENC_LITTLE_ENDIAN, 0);
2678
0
  add_events(tvb, 2, tree, &tfs_lect, "Selected events");
2679
0
}
2680
2681
/* Get Sensor Event Enable.
2682
 */
2683
static void
2684
rq29(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2685
0
{
2686
0
  proto_tree_add_item(tree, hf_ipmi_se_29_sensor, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2687
0
}
2688
2689
static void
2690
rs29(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2691
0
{
2692
0
  static int * const byte1[] = { &hf_ipmi_se_29_fl_evm, &hf_ipmi_se_29_fl_scan, NULL };
2693
2694
0
  proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL, ett_ipmi_se_29_byte1, byte1, ENC_LITTLE_ENDIAN, 0);
2695
0
  add_events(tvb, 1, tree, &tfs_29_enabled, "Enabled events");
2696
0
}
2697
2698
/* Re-arm Sensor Events.
2699
 */
2700
static void
2701
rq2a(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2702
0
{
2703
0
  static const struct true_false_string rearm_tfs = { "Re-arm", "Do not re-arm" };
2704
2705
0
  proto_tree_add_item(tree, hf_ipmi_se_2a_sensor, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2706
0
  proto_tree_add_item(tree, hf_ipmi_se_2a_fl_sel, tvb, 1, 1, ENC_LITTLE_ENDIAN);
2707
0
  add_events(tvb, 2, tree, &rearm_tfs, "Re-arm Events");
2708
0
}
2709
2710
/* Get Sensor Event Status.
2711
 */
2712
static void
2713
rq2b(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2714
0
{
2715
0
  proto_tree_add_item(tree, hf_ipmi_se_2b_sensor, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2716
0
}
2717
2718
static void
2719
rs2b(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2720
0
{
2721
0
  static int * const byte1[] = { &hf_ipmi_se_2b_fl_evm, &hf_ipmi_se_2b_fl_scan, &hf_ipmi_se_2b_fl_unavail, NULL };
2722
0
  static const struct true_false_string occur_tfs = { "Occurred", "Did not occur" };
2723
2724
0
  proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL, ett_ipmi_se_2b_byte1, byte1, ENC_LITTLE_ENDIAN, 0);
2725
0
  add_events(tvb, 1, tree, &occur_tfs, "Event Status");
2726
0
}
2727
2728
/* Get Sensor Reading.
2729
 */
2730
static void
2731
rq2d(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2732
0
{
2733
0
  proto_tree_add_item(tree, hf_ipmi_se_2d_sensor, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2734
0
}
2735
2736
static void
2737
rs2d(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2738
0
{
2739
  /* Reuse flags from Event Status message */
2740
0
  static int * const byte2[] = { &hf_ipmi_se_2b_fl_evm, &hf_ipmi_se_2b_fl_scan, &hf_ipmi_se_2b_fl_unavail, NULL };
2741
0
  static int * const bsel[2][8] = {
2742
0
    { &hf_ipmi_se_2d_b1_0, &hf_ipmi_se_2d_b1_1, &hf_ipmi_se_2d_b1_2, &hf_ipmi_se_2d_b1_3,
2743
0
      &hf_ipmi_se_2d_b1_4, &hf_ipmi_se_2d_b1_5, &hf_ipmi_se_2d_b1_6, &hf_ipmi_se_2d_b1_7 },
2744
0
    { &hf_ipmi_se_2d_b2_0, &hf_ipmi_se_2d_b2_1, &hf_ipmi_se_2d_b2_2, &hf_ipmi_se_2d_b2_3,
2745
0
      &hf_ipmi_se_2d_b2_4, &hf_ipmi_se_2d_b2_5, &hf_ipmi_se_2d_b2_6, NULL }
2746
0
  };
2747
0
  static int * const tsel[2] = { &ett_ipmi_se_2d_b1, &ett_ipmi_se_2d_b2 };
2748
0
  proto_tree *s_tree;
2749
0
  int i, j, len;
2750
2751
0
  proto_tree_add_item(tree, hf_ipmi_se_2d_reading, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2752
0
  proto_tree_add_bitmask_text(tree, tvb, 1, 1, NULL, NULL, ett_ipmi_se_2d_byte2, byte2, ENC_LITTLE_ENDIAN, 0);
2753
0
  len = tvb_captured_length(tvb);
2754
0
  for (i = 0; i < 2 && i < len - 2; i++) {
2755
0
    s_tree = proto_tree_add_subtree_format(tree, tvb, i + 2, 1, *tsel[i], NULL,
2756
0
        "Threshold comparisons/assertions (byte %d)", i);
2757
0
    for (j = 7; j >= 0; j--) {
2758
0
      if (bsel[i][j]) {
2759
0
        proto_tree_add_item(s_tree, *bsel[i][j], tvb, i + 2, 1, ENC_LITTLE_ENDIAN);
2760
0
      }
2761
0
    }
2762
0
  }
2763
0
}
2764
2765
/* Set Sensor Type.
2766
 */
2767
static void
2768
rq2e(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2769
0
{
2770
0
  uint8_t stype;
2771
0
  const struct sensor_info *si;
2772
2773
0
  stype = tvb_get_uint8(tvb, 1);
2774
0
  si = get_sensor_info(stype);
2775
2776
0
  proto_tree_add_item(tree, hf_ipmi_se_2e_sensor, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2777
0
  proto_tree_add_uint_format_value(tree, hf_ipmi_se_2e_stype, tvb, 1, 1,
2778
0
      stype, "%s (0x%02x)", si->desc, stype);
2779
2780
0
  proto_tree_add_item(tree, hf_ipmi_se_2e_evtype, tvb, 2, 1, ENC_LITTLE_ENDIAN);
2781
0
}
2782
2783
/* Get Sensor Type.
2784
 */
2785
static void
2786
rq2f(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2787
0
{
2788
0
  proto_tree_add_item(tree, hf_ipmi_se_2f_sensor, tvb, 0, 1, ENC_LITTLE_ENDIAN);
2789
0
}
2790
2791
static void
2792
rs2f(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
2793
0
{
2794
0
  uint8_t stype;
2795
0
  const struct sensor_info *si;
2796
2797
0
  stype = tvb_get_uint8(tvb, 0);
2798
0
  si = get_sensor_info(stype);
2799
2800
0
  proto_tree_add_uint_format_value(tree, hf_ipmi_se_2f_stype, tvb, 0, 1,
2801
0
      stype, "%s (0x%02x)", si->desc, stype);
2802
2803
0
  proto_tree_add_item(tree, hf_ipmi_se_2f_evtype, tvb, 1, 1, ENC_LITTLE_ENDIAN);
2804
0
}
2805
2806
static const value_string cc30[] = {
2807
  { 0x80, "Attempt to change not-settable reading/status bits" },
2808
  { 0x81, "Setting Event Data Bytes not supported" },
2809
  { 0, NULL }
2810
};
2811
2812
static const ipmi_cmd_t cmd_se[] = {
2813
  /* Event commands */
2814
  { 0x00, rq00, NULL, NULL, NULL, "Set Event Receiver", 0 },
2815
  { 0x01, NULL, rs01, NULL, NULL, "Get Event Receiver", 0 },
2816
  { 0x02, rq02, NULL, NULL, NULL, "Platform Event", 0 },
2817
2818
  /* PEF and Alerting Commands */
2819
  { 0x10, NULL, rs10, NULL, NULL, "Get PEF Capabilities", 0 },
2820
  { 0x11, rq11, rs11, NULL, NULL, "Arm PEF Postpone Timer", 0 },
2821
  { 0x12, rq12, NULL, cc12, NULL, "Set PEF Configuration Parameters", 0 },
2822
  { 0x13, rq13, rs13, cc13, NULL, "Get PEF Configuration Parameters", CMD_CALLRQ },
2823
  { 0x14, rq14, NULL, cc14, NULL, "Set Last Processed Event ID", 0 },
2824
  { 0x15, NULL, rs15, cc15, NULL, "Get Last Processed Event ID", 0 },
2825
  { 0x16, rq16, rs16, cc16, NULL, "Alert Immediate", CMD_CALLRQ },
2826
  { 0x17, rq17, NULL, NULL, NULL, "PET Acknowledge", 0 },
2827
2828
  /* Sensor Device Commands */
2829
  { 0x20, rq20, rs20, NULL, NULL, "Get Device SDR Info", CMD_CALLRQ },
2830
  { 0x21, rq21, rs21, cc21, NULL, "Get Device SDR", 0 },
2831
  { 0x22, NULL, rs22, NULL, NULL, "Reserve Device SDR Repository", 0 },
2832
  { 0x23, rq23, rs23, NULL, NULL, "Get Sensor Reading Factors", 0 },
2833
  { 0x24, rq24, NULL, NULL, NULL, "Set Sensor Hysteresis", 0 },
2834
  { 0x25, rq25, rs25, NULL, NULL, "Get Sensor Hysteresis", 0 },
2835
  { 0x26, rq26, NULL, NULL, NULL, "Set Sensor Threshold", 0 },
2836
  { 0x27, rq27, rs27, NULL, NULL, "Get Sensor Threshold", 0 },
2837
  { 0x28, rq28, NULL, NULL, NULL, "Set Sensor Event Enable", 0 },
2838
  { 0x29, rq29, rs29, NULL, NULL, "Get Sensor Event Enable", 0 },
2839
  { 0x2a, rq2a, NULL, NULL, NULL, "Re-arm Sensor Events", 0 },
2840
  { 0x2b, rq2b, rs2b, NULL, NULL, "Get Sensor Event Status", 0 },
2841
  { 0x2d, rq2d, rs2d, NULL, NULL, "Get Sensor Reading", 0 },
2842
  { 0x2e, rq2e, NULL, NULL, NULL, "Set Sensor Type", 0 },
2843
  { 0x2f, rq2f, rs2f, NULL, NULL, "Get Sensor Type", 0 },
2844
  { 0x30, IPMI_TBD,   cc30, NULL, "Set Sensor Reading and Event Status", 0 },
2845
};
2846
2847
void
2848
proto_register_ipmi_se(void)
2849
16
{
2850
16
  static hf_register_info hf[] = {
2851
16
    { &hf_ipmi_se_evt_rev,
2852
16
      { "Event Message Revision",
2853
16
        "ipmi.evt.evmrev", FT_UINT8, BASE_HEX, VALS(evt_evm_rev_vals), 0, NULL, HFILL }},
2854
16
    { &hf_ipmi_se_evt_sensor_type,
2855
16
      { "Sensor Type",
2856
16
        "ipmi.evt.sensor_type", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
2857
16
    { &hf_ipmi_se_evt_sensor_num,
2858
16
      { "Sensor #",
2859
16
        "ipmi.evt.sensor_num", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
2860
16
    { &hf_ipmi_se_evt_byte3,
2861
16
      { "Event Dir/Type",
2862
16
        "ipmi.evt.byte3", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
2863
16
    { &hf_ipmi_se_evt_dir,
2864
16
      { "Event Direction",
2865
16
        "ipmi.evt.evdir", FT_BOOLEAN, 8, TFS(&evt_evdir_tfs), 0x80, NULL, HFILL }},
2866
16
    { &hf_ipmi_se_evt_type,
2867
16
      { "Event/Reading type",
2868
16
        "ipmi.evt.evtype", FT_UINT8, BASE_HEX|BASE_RANGE_STRING, RVALS(evtype_rvals), 0x7f, NULL, HFILL }},
2869
16
    { &hf_ipmi_se_evt_data1,
2870
16
      { "Event Data 1",
2871
16
        "ipmi.evt.data1", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
2872
16
    { &hf_ipmi_se_evt_data1_b2,
2873
16
      { "Byte 2",
2874
16
        "ipmi.evt.data1.b2", FT_UINT8, BASE_HEX, NULL, 0xc0, NULL, HFILL }},
2875
16
    { &hf_ipmi_se_evt_data1_b3,
2876
16
      { "Byte 3",
2877
16
        "ipmi.evt.data1.b3", FT_UINT8, BASE_HEX, NULL, 0x30, NULL, HFILL }},
2878
16
    { &hf_ipmi_se_evt_data1_offs,
2879
16
      { "Offset",
2880
16
        "ipmi.evt.data1.offs", FT_UINT8, BASE_HEX, NULL, 0x0f, NULL, HFILL }},
2881
16
    { &hf_ipmi_se_evt_data2,
2882
16
      { "Event Data 2",
2883
16
        "ipmi.evt.data2", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
2884
16
    { &hf_ipmi_se_evt_data3,
2885
16
      { "Event Data 3",
2886
16
        "ipmi.evt.data3", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
2887
2888
16
    { &hf_ipmi_se_cp00_sip,
2889
16
      { "Set In Progress",
2890
16
        "ipmi.cp00.sip", FT_UINT8, BASE_HEX, VALS(cp00_sip_vals), 0x03, NULL, HFILL }},
2891
16
    { &hf_ipmi_se_cp01_alert_startup,
2892
16
      { "PEF Alert Startup Delay disable",
2893
16
        "ipmi.cp01.alert_startup", FT_BOOLEAN, 8, NULL, 0x08, NULL, HFILL }},
2894
16
    { &hf_ipmi_se_cp01_startup,
2895
16
      { "PEF Startup Delay disable",
2896
16
        "ipmi.cp01.startup", FT_BOOLEAN, 8, NULL, 0x04, NULL, HFILL }},
2897
16
    { &hf_ipmi_se_cp01_event_msg,
2898
16
      { "Enable Event Messages for PEF actions",
2899
16
        "ipmi.cp01.event_msg", FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL }},
2900
16
    { &hf_ipmi_se_cp01_pef,
2901
16
      { "Enable PEF",
2902
16
        "ipmi.cp01.pef", FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL }},
2903
16
    { &hf_ipmi_se_cp02_diag_intr,
2904
16
      { "Enable Diagnostic Interrupt",
2905
16
        "ipmi.cp02.diag_intr", FT_BOOLEAN, 8, NULL, 0x20, NULL, HFILL }},
2906
16
    { &hf_ipmi_se_cp02_oem_action,
2907
16
      { "Enable OEM action",
2908
16
        "ipmi.cp02.oem_action", FT_BOOLEAN, 8, NULL, 0x10, NULL, HFILL }},
2909
16
    { &hf_ipmi_se_cp02_pwr_cycle,
2910
16
      { "Enable Power Cycle action",
2911
16
        "ipmi.cp02.pwr_cycle", FT_BOOLEAN, 8, NULL, 0x08, NULL, HFILL }},
2912
16
    { &hf_ipmi_se_cp02_reset,
2913
16
      { "Enable Reset action",
2914
16
        "ipmi.cp02.reset", FT_BOOLEAN, 8, NULL, 0x04, NULL, HFILL }},
2915
16
    { &hf_ipmi_se_cp02_pwr_down,
2916
16
      { "Enable Power Down action",
2917
16
        "ipmi.cp02.pwr_down", FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL }},
2918
16
    { &hf_ipmi_se_cp02_alert,
2919
16
      { "Enable Alert action",
2920
16
        "ipmi.cp02.alert", FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL }},
2921
16
    { &hf_ipmi_se_cp03_startup,
2922
16
      { "PEF Startup delay",
2923
16
        "ipmi.cp03.startup", FT_UINT8, BASE_CUSTOM, CF_FUNC(ipmi_fmt_1s_1based), 0, NULL, HFILL }},
2924
16
    { &hf_ipmi_se_cp04_alert_startup,
2925
16
      { "PEF Alert Startup delay",
2926
16
        "ipmi.cp04.alert_startup", FT_UINT8, BASE_CUSTOM, CF_FUNC(ipmi_fmt_1s_1based), 0, NULL, HFILL }},
2927
16
    { &hf_ipmi_se_cp05_num_evfilters,
2928
16
      { "Number of Event Filters",
2929
16
        "ipmi.cp05.num_evfilters", FT_UINT8, BASE_DEC, NULL, 0x7f, NULL, HFILL }},
2930
16
    { &hf_ipmi_se_cp06_filter,
2931
16
      { "Filter number (set selector)",
2932
16
        "ipmi.cp06.filter", FT_UINT8, BASE_DEC, NULL, 0x7f, NULL, HFILL }},
2933
16
    { &hf_ipmi_se_cp06_data,
2934
16
      { "Filter data",
2935
16
        "ipmi.cp06.data", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
2936
16
    { &hf_ipmi_se_cp07_filter,
2937
16
      { "Filter number (set selector)",
2938
16
        "ipmi.cp07.filter", FT_UINT8, BASE_DEC, NULL, 0x7f, NULL, HFILL }},
2939
#if 0
2940
    { &hf_ipmi_se_cp07_data,
2941
      { "Filter data (byte 1)",
2942
        "ipmi.cp07.data", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
2943
#endif
2944
16
    { &hf_ipmi_se_cp08_policies,
2945
16
      { "Number of Alert Policy Entries",
2946
16
        "ipmi.cp08.policies", FT_UINT8, BASE_DEC, NULL, 0x7f, NULL, HFILL }},
2947
16
    { &hf_ipmi_se_cp09_entry,
2948
16
      { "Entry number (set selector)",
2949
16
        "ipmi.cp09.entry", FT_UINT8, BASE_DEC, NULL, 0x7f, NULL, HFILL }},
2950
16
    { &hf_ipmi_se_cp09_data,
2951
16
      { "Entry data",
2952
16
        "ipmi.cp09.data", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
2953
16
    { &hf_ipmi_se_cp10_useval,
2954
16
      { "Used to fill the GUID field in PET Trap",
2955
16
        "ipmi.cp10.useval", FT_BOOLEAN, 8, TFS(&cp10_use_tfs), 0x01, NULL, HFILL }},
2956
16
    { &hf_ipmi_se_cp10_guid,
2957
16
      { "GUID",
2958
16
        "ipmi.cp10.guid", FT_GUID, BASE_NONE, NULL, 0, NULL, HFILL }},
2959
16
    { &hf_ipmi_se_cp11_num_alertstr,
2960
16
      { "Number of Alert Strings",
2961
16
        "ipmi.cp11.num_alertstr", FT_UINT8, BASE_DEC, NULL, 0x7f, NULL, HFILL }},
2962
16
    { &hf_ipmi_se_cp12_byte1,
2963
16
      { "Alert String Selector",
2964
16
        "ipmi.cp12.byte1", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
2965
16
    { &hf_ipmi_se_cp12_alert_stringsel,
2966
16
      { "Alert String Selector (set selector)",
2967
16
        "ipmi.cp12.alert_stringsel", FT_UINT8, BASE_HEX|BASE_SPECIAL_VALS, VALS(unique_selects_volatile_string_parameters), 0x7f, NULL, HFILL }},
2968
16
    { &hf_ipmi_se_cp12_evfilter,
2969
16
      { "Filter Number",
2970
16
        "ipmi.cp12.evfilter", FT_UINT8, BASE_HEX, NULL, 0x7f, NULL, HFILL }},
2971
16
    { &hf_ipmi_se_cp12_alert_stringset,
2972
16
      { "Set number for string",
2973
16
        "ipmi.cp12.alert_stringset", FT_UINT8, BASE_HEX, NULL, 0x7f, NULL, HFILL }},
2974
16
    { &hf_ipmi_se_cp13_stringsel,
2975
16
      { "String selector (set selector)",
2976
16
        "ipmi.cp13.stringsel", FT_UINT8, BASE_HEX, NULL, 0x7f, NULL, HFILL }},
2977
16
    { &hf_ipmi_se_cp13_blocksel,
2978
16
      { "Block selector",
2979
16
        "ipmi.cp13.blocksel", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
2980
16
    { &hf_ipmi_se_cp13_string,
2981
16
      { "String data",
2982
16
        "ipmi.cp13.string", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
2983
16
    { &hf_ipmi_se_cp14_num_gct,
2984
16
      { "Number of Group Control Table entries",
2985
16
        "ipmi.cp14.num_gct", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
2986
16
    { &hf_ipmi_se_cp15_gctsel,
2987
16
      { "Group control table entry selector (set selector)",
2988
16
        "ipmi.cp15.gctsel", FT_UINT8, BASE_HEX, NULL, 0x7f, NULL, HFILL }},
2989
16
    { &hf_ipmi_se_cp15_force,
2990
16
      { "Request/Force",
2991
16
        "ipmi.cp15.force", FT_BOOLEAN, 8, TFS(&cp15_rq_frc_tfs), 0x20, NULL, HFILL }},
2992
16
    { &hf_ipmi_se_cp15_delayed,
2993
16
      { "Immediate/Delayed",
2994
16
        "ipmi.cp15.delayed", FT_BOOLEAN, 8, TFS(&cp15_imm_delay_tfs), 0x10, NULL, HFILL }},
2995
16
    { &hf_ipmi_se_cp15_channel,
2996
16
      { "Channel",
2997
16
        "ipmi.cp15.channel", FT_UINT8, BASE_CUSTOM, CF_FUNC(ipmi_fmt_channel), 0x0f, NULL, HFILL }},
2998
16
    { &hf_ipmi_se_cp15_group,
2999
16
      { "Group ID",
3000
16
        "ipmi.cp15.group_id", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3001
16
    { &hf_ipmi_se_cp15_member_check,
3002
16
      { "Member ID check disabled",
3003
16
        "ipmi.cp15.member_check", FT_BOOLEAN, 8, NULL, 0x10, NULL, HFILL }},
3004
16
    { &hf_ipmi_se_cp15_member_id,
3005
16
      { "Member ID",
3006
16
        "ipmi.cp15_member_id", FT_UINT8, BASE_DEC, NULL, 0x0f, NULL, HFILL }},
3007
16
    { &hf_ipmi_se_cp15_retries,
3008
16
      { "Retries",
3009
16
        "ipmi.cp15.retries", FT_UINT8, BASE_DEC, NULL, 0x70, NULL, HFILL }},
3010
16
    { &hf_ipmi_se_cp15_operation,
3011
16
      { "Operation",
3012
16
        "ipmi.cp15.operation", FT_UINT8, BASE_HEX, VALS(cp15_op_vals), 0x0f, NULL, HFILL }},
3013
3014
16
    { &hf_ipmi_se_00_addr,
3015
16
      { "Event Receiver slave address",
3016
16
        "ipmi.se00.addr", FT_UINT8, BASE_HEX|BASE_SPECIAL_VALS, VALS(unique_disable_message_generation), 0, NULL, HFILL }},
3017
16
    { &hf_ipmi_se_00_lun,
3018
16
      { "Event Receiver LUN",
3019
16
        "ipmi.se00.lun", FT_UINT8, BASE_HEX, NULL, 0x3, NULL, HFILL }},
3020
3021
16
    { &hf_ipmi_se_01_addr,
3022
16
      { "Event Receiver slave address",
3023
16
        "ipmi.se01.addr", FT_UINT8, BASE_HEX|BASE_SPECIAL_VALS, VALS(unique_disable_message_generation), 0, NULL, HFILL }},
3024
16
    { &hf_ipmi_se_01_lun,
3025
16
      { "Event Receiver LUN",
3026
16
        "ipmi.se01.lun", FT_UINT8, BASE_HEX, NULL, 0x3, NULL, HFILL }},
3027
3028
16
    { &hf_ipmi_se_10_pef_version,
3029
16
      { "PEF Version",
3030
16
        "ipmi.se10.pef_version", FT_UINT8, BASE_CUSTOM, CF_FUNC(ipmi_fmt_version), 0, NULL, HFILL }},
3031
16
    { &hf_ipmi_se_10_action_oem_filter,
3032
16
      { "OEM Event Record Filtering supported",
3033
16
        "ipmi.se10.action.oem_filter", FT_BOOLEAN, 8, NULL, 0x80, NULL, HFILL }},
3034
16
    { &hf_ipmi_se_10_action_diag_intr,
3035
16
      { "Diagnostic Interrupt",
3036
16
        "ipmi.se10.action.diag_intr", FT_BOOLEAN, 8, NULL, 0x20, NULL, HFILL }},
3037
16
    { &hf_ipmi_se_10_action_oem_action,
3038
16
      { "OEM Action",
3039
16
        "ipmi.se10.action.oem_action", FT_BOOLEAN, 8, NULL, 0x10, NULL, HFILL }},
3040
16
    { &hf_ipmi_se_10_action_pwr_cycle,
3041
16
      { "Power Cycle",
3042
16
        "ipmi.se10.action.pwr_cycle", FT_BOOLEAN, 8, NULL, 0x08, NULL, HFILL }},
3043
16
    { &hf_ipmi_se_10_action_reset,
3044
16
      { "Reset",
3045
16
        "ipmi.se10.action.reset", FT_BOOLEAN, 8, NULL, 0x04, NULL, HFILL }},
3046
16
    { &hf_ipmi_se_10_action_pwr_down,
3047
16
      { "Power Down",
3048
16
        "ipmi.se10.action.pwr_down", FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL }},
3049
16
    { &hf_ipmi_se_10_action_alert,
3050
16
      { "Alert",
3051
16
        "ipmi.se10.action.alert", FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL }},
3052
16
    { &hf_ipmi_se_10_entries,
3053
16
      { "Number of event filter table entries",
3054
16
        "ipmi.se10.entries", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3055
16
    { &hf_ipmi_se_10_evtype,
3056
16
      { "Event/Reading type",
3057
16
        "ipmi.se10.evtype", FT_UINT8, BASE_HEX|BASE_RANGE_STRING, RVALS(evtype_rvals), 0x7f, NULL, HFILL }},
3058
3059
16
    { &hf_ipmi_se_11_rq_timeout,
3060
16
      { "Timeout value",
3061
16
        "ipmi.se11.rq_timeout", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3062
16
    { &hf_ipmi_se_11_rs_timeout,
3063
16
      { "Timeout value",
3064
16
        "ipmi.se11.rs_timeout", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3065
3066
16
    { &hf_ipmi_se_12_byte1,
3067
16
      { "Parameter selector",
3068
16
        "ipmi.se12.byte1", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
3069
16
    { &hf_ipmi_se_12_param,
3070
16
      { "Parameter selector",
3071
16
        "ipmi.se12.param", FT_UINT8, BASE_HEX, NULL, 0x7f, NULL, HFILL }},
3072
16
    { &hf_ipmi_se_12_data,
3073
16
      { "Parameter data",
3074
16
        "ipmi.se12.data", FT_NONE, BASE_NONE, NULL, 0, NULL, HFILL }},
3075
3076
16
    { &hf_ipmi_se_13_byte1,
3077
16
      { "Parameter selector",
3078
16
        "ipmi.se13.byte1", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
3079
16
    { &hf_ipmi_se_13_getrev,
3080
16
      { "Get Parameter Revision only",
3081
16
        "ipmi.se13.getrev", FT_BOOLEAN, 8, NULL, 0x80, NULL, HFILL }},
3082
16
    { &hf_ipmi_se_13_param,
3083
16
      { "Parameter selector",
3084
16
        "ipmi.se13.param", FT_UINT8, BASE_HEX, NULL, 0x7f, NULL, HFILL }},
3085
16
    { &hf_ipmi_se_13_set,
3086
16
      { "Set Selector",
3087
16
        "ipmi.se13.set", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
3088
16
    { &hf_ipmi_se_13_block,
3089
16
      { "Block Selector",
3090
16
        "ipmi.se13.block", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
3091
16
    { &hf_ipmi_se_13_rev_present,
3092
16
      { "Present",
3093
16
        "ipmi.se13.rev.present", FT_UINT8, BASE_DEC, NULL, 0xf0, NULL, HFILL }},
3094
16
    { &hf_ipmi_se_13_rev_compat,
3095
16
      { "Oldest forward-compatible",
3096
16
        "ipmi.se13.rev.compat", FT_UINT8, BASE_DEC, NULL, 0x0f, NULL, HFILL }},
3097
16
    { &hf_ipmi_se_13_data,
3098
16
      { "Parameter data",
3099
16
        "ipmi.se13.data", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
3100
3101
16
    { &hf_ipmi_se_14_processed_by,
3102
16
      { "Set Record ID for last record processed by",
3103
16
        "ipmi.se14.processed_by", FT_BOOLEAN, 8, TFS(&tfs_14_processed), 0x01, NULL, HFILL }},
3104
16
    { &hf_ipmi_se_14_rid,
3105
16
      { "Record ID",
3106
16
        "ipmi.se14.rid", FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL }},
3107
3108
16
    { &hf_ipmi_se_15_tstamp,
3109
16
      { "Most recent addition timestamp",
3110
16
        "ipmi.se15.tstamp", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
3111
16
    { &hf_ipmi_se_15_lastrec,
3112
16
      { "Record ID for last record in SEL",
3113
16
        "ipmi.se15.lastrec", FT_UINT16, BASE_HEX|BASE_SPECIAL_VALS, VALS(unique_sel_is_empty), 0, NULL, HFILL }},
3114
16
    { &hf_ipmi_se_15_proc_sw,
3115
16
      { "Last SW Processed Event Record ID",
3116
16
        "ipmi.se15.proc_sw", FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL }},
3117
16
    { &hf_ipmi_se_15_proc_bmc,
3118
16
      { "Last BMC Processed Event Record ID",
3119
16
        "ipmi.se15.proc_bmc", FT_UINT16, BASE_HEX|BASE_SPECIAL_VALS, VALS(unique_event_processed_not_logged), 0, NULL, HFILL }},
3120
3121
16
    { &hf_ipmi_se_16_chan,
3122
16
      { "Channel",
3123
16
        "ipmi.se16.chan", FT_UINT8, BASE_CUSTOM, CF_FUNC(ipmi_fmt_channel), 0x0f, NULL, HFILL }},
3124
16
    { &hf_ipmi_se_16_op,
3125
16
      { "Operation",
3126
16
        "ipmi.se16.op", FT_UINT8, BASE_HEX, VALS(vals_16_op), 0xc0, NULL, HFILL }},
3127
16
    { &hf_ipmi_se_16_dst,
3128
16
      { "Destination",
3129
16
        "ipmi.se16.dst", FT_UINT8, BASE_HEX, NULL, 0x0f, NULL, HFILL }},
3130
16
    { &hf_ipmi_se_16_send_string,
3131
16
      { "Send Alert String",
3132
16
        "ipmi.se16.send_string", FT_BOOLEAN, 8, NULL, 0x80, NULL, HFILL }},
3133
16
    { &hf_ipmi_se_16_string_sel,
3134
16
      { "String selector",
3135
16
        "ipmi.se16.string_sel", FT_UINT8, BASE_HEX, NULL, 0x7f, NULL, HFILL }},
3136
16
    { &hf_ipmi_se_16_gen,
3137
16
      { "Generator ID",
3138
16
        "ipmi.se16.gen", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
3139
16
    { &hf_ipmi_se_16_status,
3140
16
      { "Alert Immediate Status",
3141
16
        "ipmi.se16.status", FT_UINT8, BASE_HEX, VALS(vals_16_status), 0, NULL, HFILL }},
3142
3143
16
    { &hf_ipmi_se_17_seq,
3144
16
      { "Sequence Number",
3145
16
        "ipmi.se17.seq", FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL }},
3146
16
    { &hf_ipmi_se_17_tstamp,
3147
16
      { "Local Timestamp",
3148
16
        "ipmi.se17.tstamp", FT_UINT32, BASE_DEC, NULL, 0, NULL, HFILL }},
3149
16
    { &hf_ipmi_se_17_evsrc,
3150
16
      { "Event Source Type",
3151
16
        "ipmi.se17.evsrc", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
3152
16
    { &hf_ipmi_se_17_sensor_dev,
3153
16
      { "Sensor Device",
3154
16
        "ipmi.se17.sensor_dev", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
3155
16
    { &hf_ipmi_se_17_sensor_num,
3156
16
      { "Sensor Number",
3157
16
        "ipmi.se17.sensor_num", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
3158
16
    { &hf_ipmi_se_17_evdata1,
3159
16
      { "Event Data 1",
3160
16
        "ipmi.se17.evdata1", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
3161
16
    { &hf_ipmi_se_17_evdata2,
3162
16
      { "Event Data 2",
3163
16
        "ipmi.se17.evdata2", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
3164
16
    { &hf_ipmi_se_17_evdata3,
3165
16
      { "Event Data 3",
3166
16
        "ipmi.se17.evdata3", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
3167
3168
16
    { &hf_ipmi_se_20_rq_op,
3169
16
      { "Operation",
3170
16
        "ipmi.se20.rq_op", FT_BOOLEAN, 8, TFS(&tfs_20_op), 0x01, NULL, HFILL }},
3171
16
    { &hf_ipmi_se_20_rs_num,
3172
16
      { "Number of sensors in device for LUN",
3173
16
        "ipmi.se20.rs_num", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3174
16
    { &hf_ipmi_se_20_rs_sdr,
3175
16
      { "Total Number of SDRs in the device",
3176
16
        "ipmi.se20.rs_sdr", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3177
16
    { &hf_ipmi_se_20_rs_population,
3178
16
      { "Sensor population",
3179
16
        "ipmi.se20.rs_population", FT_BOOLEAN, 8, TFS(&tfs_20_pop), 0x80, NULL, HFILL }},
3180
16
    { &hf_ipmi_se_20_rs_lun3,
3181
16
      { "LUN3 has sensors",
3182
16
        "ipmi.se20.rs_lun3", FT_BOOLEAN, 8, NULL, 0x08, NULL, HFILL }},
3183
16
    { &hf_ipmi_se_20_rs_lun2,
3184
16
      { "LUN2 has sensors",
3185
16
        "ipmi.se20.rs_lun2", FT_BOOLEAN, 8, NULL, 0x04, NULL, HFILL }},
3186
16
    { &hf_ipmi_se_20_rs_lun1,
3187
16
      { "LUN1 has sensors",
3188
16
        "ipmi.se20.rs_lun1", FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL }},
3189
16
    { &hf_ipmi_se_20_rs_lun0,
3190
16
      { "LUN0 has sensors",
3191
16
        "ipmi.se20.rs_lun0", FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL }},
3192
16
    { &hf_ipmi_se_20_rs_change,
3193
16
      { "Sensor Population Change Indicator",
3194
16
        "ipmi.se20.rs_change", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }},
3195
3196
16
    { &hf_ipmi_se_21_rid,
3197
16
      { "Reservation ID",
3198
16
        "ipmi.se21.rid", FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL }},
3199
16
    { &hf_ipmi_se_21_record,
3200
16
      { "Record ID",
3201
16
        "ipmi.se21.record", FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL }},
3202
16
    { &hf_ipmi_se_21_offset,
3203
16
      { "Offset into data",
3204
16
        "ipmi.se21.offset", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
3205
16
    { &hf_ipmi_se_21_len,
3206
16
      { "Bytes to read",
3207
16
        "ipmi.se21.len", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
3208
16
    { &hf_ipmi_se_21_next,
3209
16
      { "Next record ID",
3210
16
        "ipmi.se21.next", FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL }},
3211
16
    { &hf_ipmi_se_21_recdata,
3212
16
      { "Record data",
3213
16
        "ipmi.se21.recdata", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
3214
3215
16
    { &hf_ipmi_se_22_resid,
3216
16
      { "Reservation ID",
3217
16
        "ipmi.se22.resid", FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL }},
3218
3219
16
    { &hf_ipmi_se_23_rq_sensor,
3220
16
      { "Sensor Number",
3221
16
        "ipmi.se23.rq_sensor", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3222
16
    { &hf_ipmi_se_23_rq_reading,
3223
16
      { "Reading",
3224
16
        "ipmi.se23.rq_reading", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3225
16
    { &hf_ipmi_se_23_rs_next_reading,
3226
16
      { "Next reading",
3227
16
        "ipmi.se23.rs_next_reading", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3228
3229
16
    { &hf_ipmi_se_24_sensor,
3230
16
      { "Sensor Number",
3231
16
        "ipmi.se24.sensor", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3232
16
    { &hf_ipmi_se_24_mask,
3233
16
      { "Reserved for future 'hysteresis mask'",
3234
16
        "ipmi.se24.mask", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
3235
16
    { &hf_ipmi_se_24_hyst_pos,
3236
16
      { "Positive-going hysteresis",
3237
16
        "ipmi.se24.hyst_pos", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3238
16
    { &hf_ipmi_se_24_hyst_neg,
3239
16
      { "Negative-going hysteresis",
3240
16
        "ipmi.se24.hyst_neg", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3241
3242
16
    { &hf_ipmi_se_25_sensor,
3243
16
      { "Sensor Number",
3244
16
        "ipmi.se25.sensor", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3245
16
    { &hf_ipmi_se_25_mask,
3246
16
      { "Reserved for future 'hysteresis mask'",
3247
16
        "ipmi.se25.mask", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
3248
16
    { &hf_ipmi_se_25_hyst_pos,
3249
16
      { "Positive-going hysteresis",
3250
16
        "ipmi.se25.hyst_pos", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3251
16
    { &hf_ipmi_se_25_hyst_neg,
3252
16
      { "Negative-going hysteresis",
3253
16
        "ipmi.se25.hyst_neg", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3254
3255
16
    { &hf_ipmi_se_26_sensor,
3256
16
      { "Sensor Number",
3257
16
        "ipmi.seXX.sensor", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3258
16
    { &hf_ipmi_se_XX_m_unr,
3259
16
      { "Upper Non-Recoverable",
3260
16
        "ipmi.seXX.mask.unr", FT_BOOLEAN, 8, NULL, 0x20, NULL, HFILL }},
3261
16
    { &hf_ipmi_se_XX_m_uc,
3262
16
      { "Upper Critical",
3263
16
        "ipmi.seXX.mask.uc", FT_BOOLEAN, 8, NULL, 0x10, NULL, HFILL }},
3264
16
    { &hf_ipmi_se_XX_m_unc,
3265
16
      { "Upper Non-Critical",
3266
16
        "ipmi.seXX.mask.unc", FT_BOOLEAN, 8, NULL, 0x08, NULL, HFILL }},
3267
16
    { &hf_ipmi_se_XX_m_lnr,
3268
16
      { "Lower Non-Recoverable",
3269
16
        "ipmi.seXX.mask.lnr", FT_BOOLEAN, 8, NULL, 0x04, NULL, HFILL }},
3270
16
    { &hf_ipmi_se_XX_m_lc,
3271
16
      { "Lower Critical",
3272
16
        "ipmi.seXX.mask.lc", FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL }},
3273
16
    { &hf_ipmi_se_XX_m_lnc,
3274
16
      { "Lower Non-Critical",
3275
16
        "ipmi.seXX.mask.lnc", FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL }},
3276
16
    { &hf_ipmi_se_XX_thr_lnc,
3277
16
      { "Lower Non-Critical Threshold",
3278
16
        "ipmi.seXX.lnc", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3279
16
    { &hf_ipmi_se_XX_thr_lc,
3280
16
      { "Lower Critical Threshold",
3281
16
        "ipmi.seXX.lc", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3282
16
    { &hf_ipmi_se_XX_thr_lnr,
3283
16
      { "Lower Non-Recoverable Threshold",
3284
16
        "ipmi.seXX.lnr", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3285
16
    { &hf_ipmi_se_XX_thr_unc,
3286
16
      { "Upper Non-Critical Threshold",
3287
16
        "ipmi.seXX.unc", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3288
16
    { &hf_ipmi_se_XX_thr_uc,
3289
16
      { "Upper Critical Threshold",
3290
16
        "ipmi.seXX.uc", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3291
16
    { &hf_ipmi_se_XX_thr_unr,
3292
16
      { "Upper Non-Recoverable Threshold",
3293
16
        "ipmi.seXX.unr", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3294
3295
16
    { &hf_ipmi_se_27_sensor,
3296
16
      { "Sensor Number",
3297
16
        "ipmi.se27.sensor", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3298
3299
16
    { &hf_ipmi_se_XX_b1_7,
3300
16
      { "Assertion for UNC (going high) / state bit 7",
3301
16
        "ipmi.seXX.a_7", FT_BOOLEAN, 8, NULL, 0x80, NULL, HFILL }},
3302
16
    { &hf_ipmi_se_XX_b1_6,
3303
16
      { "Assertion for UNC (going low) / state bit 6",
3304
16
        "ipmi.seXX.a_6", FT_BOOLEAN, 8, NULL, 0x40, NULL, HFILL }},
3305
16
    { &hf_ipmi_se_XX_b1_5,
3306
16
      { "Assertion for LNR (going high) / state bit 5",
3307
16
        "ipmi.seXX.a_5", FT_BOOLEAN, 8, NULL, 0x20, NULL, HFILL }},
3308
16
    { &hf_ipmi_se_XX_b1_4,
3309
16
      { "Assertion for LNR (going low) / state bit 4",
3310
16
        "ipmi.seXX.a_4", FT_BOOLEAN, 8, NULL, 0x10, NULL, HFILL }},
3311
16
    { &hf_ipmi_se_XX_b1_3,
3312
16
      { "Assertion for LC (going high) / state bit 3",
3313
16
        "ipmi.seXX.a_3", FT_BOOLEAN, 8, NULL, 0x08, NULL, HFILL }},
3314
16
    { &hf_ipmi_se_XX_b1_2,
3315
16
      { "Assertion for LC (going low) / state bit 2",
3316
16
        "ipmi.seXX.a_2", FT_BOOLEAN, 8, NULL, 0x04, NULL, HFILL }},
3317
16
    { &hf_ipmi_se_XX_b1_1,
3318
16
      { "Assertion for LNC (going high) / state bit 1",
3319
16
        "ipmi.seXX.a_1", FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL }},
3320
16
    { &hf_ipmi_se_XX_b1_0,
3321
16
      { "Assertion for LNC (going low) / state bit 0",
3322
16
        "ipmi.seXX.a_0", FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL }},
3323
16
    { &hf_ipmi_se_XX_b2_6,
3324
16
      { "Reserved / Assertion for state bit 14",
3325
16
        "ipmi.seXX.a_14", FT_BOOLEAN, 8, NULL, 0x40, NULL, HFILL }},
3326
16
    { &hf_ipmi_se_XX_b2_5,
3327
16
      { "Reserved / Assertion for state bit 13",
3328
16
        "ipmi.seXX.a_13", FT_BOOLEAN, 8, NULL, 0x20, NULL, HFILL }},
3329
16
    { &hf_ipmi_se_XX_b2_4,
3330
16
      { "Reserved / Assertion for state bit 12",
3331
16
        "ipmi.seXX.a_12", FT_BOOLEAN, 8, NULL, 0x10, NULL, HFILL }},
3332
16
    { &hf_ipmi_se_XX_b2_3,
3333
16
      { "Assertion for UNR (going high) / state bit 11",
3334
16
        "ipmi.seXX.a_11", FT_BOOLEAN, 8, NULL, 0x08, NULL, HFILL }},
3335
16
    { &hf_ipmi_se_XX_b2_2,
3336
16
      { "Assertion for UNR (going low) / state bit 10",
3337
16
        "ipmi.seXX.a_10", FT_BOOLEAN, 8, NULL, 0x04, NULL, HFILL }},
3338
16
    { &hf_ipmi_se_XX_b2_1,
3339
16
      { "Assertion for UC (going high) / state bit 9",
3340
16
        "ipmi.seXX.a_9", FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL }},
3341
16
    { &hf_ipmi_se_XX_b2_0,
3342
16
      { "Assertion for UC (going low) / state bit 8",
3343
16
        "ipmi.seXX.a_8", FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL }},
3344
16
    { &hf_ipmi_se_XX_b3_7,
3345
16
      { "Deassertion for UNC (going high) / state bit 7",
3346
16
        "ipmi.seXX.d_7", FT_BOOLEAN, 8, NULL, 0x80, NULL, HFILL }},
3347
16
    { &hf_ipmi_se_XX_b3_6,
3348
16
      { "Deassertion for UNC (going low) / state bit 6",
3349
16
        "ipmi.seXX.d_6", FT_BOOLEAN, 8, NULL, 0x40, NULL, HFILL }},
3350
16
    { &hf_ipmi_se_XX_b3_5,
3351
16
      { "Deassertion for LNR (going high) / state bit 5",
3352
16
        "ipmi.seXX.d_5", FT_BOOLEAN, 8, NULL, 0x20, NULL, HFILL }},
3353
16
    { &hf_ipmi_se_XX_b3_4,
3354
16
      { "Deassertion for LNR (going low) / state bit 4",
3355
16
        "ipmi.seXX.d_4", FT_BOOLEAN, 8, NULL, 0x10, NULL, HFILL }},
3356
16
    { &hf_ipmi_se_XX_b3_3,
3357
16
      { "Deassertion for LC (going high) / state bit 3",
3358
16
        "ipmi.seXX.d_3", FT_BOOLEAN, 8, NULL, 0x08, NULL, HFILL }},
3359
16
    { &hf_ipmi_se_XX_b3_2,
3360
16
      { "Deassertion for LC (going low) / state bit 2",
3361
16
        "ipmi.seXX.d_2", FT_BOOLEAN, 8, NULL, 0x04, NULL, HFILL }},
3362
16
    { &hf_ipmi_se_XX_b3_1,
3363
16
      { "Deassertion for LNC (going high) / state bit 1",
3364
16
        "ipmi.seXX.d_1", FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL }},
3365
16
    { &hf_ipmi_se_XX_b3_0,
3366
16
      { "Deassertion for LNC (going low) / state bit 0",
3367
16
        "ipmi.seXX.d_0", FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL }},
3368
16
    { &hf_ipmi_se_XX_b4_6,
3369
16
      { "Reserved / Deassertion for state bit 14",
3370
16
        "ipmi.seXX.d_14", FT_BOOLEAN, 8, NULL, 0x40, NULL, HFILL }},
3371
16
    { &hf_ipmi_se_XX_b4_5,
3372
16
      { "Reserved / Deassertion for state bit 13",
3373
16
        "ipmi.seXX.d_13", FT_BOOLEAN, 8, NULL, 0x20, NULL, HFILL }},
3374
16
    { &hf_ipmi_se_XX_b4_4,
3375
16
      { "Reserved / Deassertion for state bit 12",
3376
16
        "ipmi.seXX.d_12", FT_BOOLEAN, 8, NULL, 0x10, NULL, HFILL }},
3377
16
    { &hf_ipmi_se_XX_b4_3,
3378
16
      { "Deassertion for UNR (going high) / state bit 11",
3379
16
        "ipmi.seXX.d_11", FT_BOOLEAN, 8, NULL, 0x08, NULL, HFILL }},
3380
16
    { &hf_ipmi_se_XX_b4_2,
3381
16
      { "Deassertion for UNR (going low) / state bit 10",
3382
16
        "ipmi.seXX.d_10", FT_BOOLEAN, 8, NULL, 0x04, NULL, HFILL }},
3383
16
    { &hf_ipmi_se_XX_b4_1,
3384
16
      { "Deassertion for UC (going high) / state bit 9",
3385
16
        "ipmi.seXX.d_9", FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL }},
3386
16
    { &hf_ipmi_se_XX_b4_0,
3387
16
      { "Deassertion for UC (going low) / state bit 8",
3388
16
        "ipmi.seXX.d_8", FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL }},
3389
3390
16
    { &hf_ipmi_se_28_sensor,
3391
16
      { "Sensor Number",
3392
16
        "ipmi.se28.sensor", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3393
16
    { &hf_ipmi_se_28_fl_evm,
3394
16
      { "Event Messages",
3395
16
        "ipmi.se28.fl_evm", FT_BOOLEAN, 8, TFS(&tfs_28_enable), 0x80, NULL, HFILL }},
3396
16
    { &hf_ipmi_se_28_fl_scan,
3397
16
      { "Scanning",
3398
16
        "ipmi.se28.fl_scan", FT_BOOLEAN, 8, TFS(&tfs_28_enable), 0x40, NULL, HFILL }},
3399
16
    { &hf_ipmi_se_28_fl_action,
3400
16
      { "Action",
3401
16
        "ipmi.se28.fl_action", FT_UINT8, BASE_HEX, VALS(vals_28_act), 0x30, NULL, HFILL }},
3402
3403
16
    { &hf_ipmi_se_29_sensor,
3404
16
      { "Sensor Number",
3405
16
        "ipmi.se29.sensor", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3406
16
    { &hf_ipmi_se_29_fl_evm,
3407
16
      { "Event Messages",
3408
16
        "ipmi.se29.fl_evm", FT_BOOLEAN, 8, TFS(&tfs_29_enabled), 0x80, NULL, HFILL }},
3409
16
    { &hf_ipmi_se_29_fl_scan,
3410
16
      { "Scanning",
3411
16
        "ipmi.se29.fl_scan", FT_BOOLEAN, 8, TFS(&tfs_29_enabled), 0x40, NULL, HFILL }},
3412
3413
16
    { &hf_ipmi_se_2a_sensor,
3414
16
      { "Sensor Number",
3415
16
        "ipmi.se2a.sensor", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3416
16
    { &hf_ipmi_se_2a_fl_sel,
3417
16
      { "Re-arm Events",
3418
16
        "ipmi.se2a.fl_sel", FT_BOOLEAN, 8, TFS(&tfs_2a_sel), 0x80, NULL, HFILL }},
3419
3420
16
    { &hf_ipmi_se_2b_sensor,
3421
16
      { "Sensor Number",
3422
16
        "ipmi.se2b.sensor", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3423
16
    { &hf_ipmi_se_2b_fl_evm,
3424
16
      { "Event Messages",
3425
16
        "ipmi.se2b.fl_evm", FT_BOOLEAN, 8, TFS(&tfs_2b_enabled), 0x80, NULL, HFILL }},
3426
16
    { &hf_ipmi_se_2b_fl_scan,
3427
16
      { "Sensor scanning",
3428
16
        "ipmi.se2b.fl_scan", FT_BOOLEAN, 8, TFS(&tfs_2b_enabled), 0x40, NULL, HFILL }},
3429
16
    { &hf_ipmi_se_2b_fl_unavail,
3430
16
      { "Reading/status unavailable",
3431
16
        "ipmi.se2b.fl_unavail", FT_BOOLEAN, 8, NULL, 0x20, NULL, HFILL }},
3432
3433
16
    { &hf_ipmi_se_2d_sensor,
3434
16
      { "Sensor Number",
3435
16
        "ipmi.se2d.sensor", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3436
16
    { &hf_ipmi_se_2d_reading,
3437
16
      { "Sensor Reading",
3438
16
        "ipmi.se2d.reading", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3439
16
    { &hf_ipmi_se_2d_b1_7,
3440
16
      { "Reserved / State 7 asserted",
3441
16
        "ipmi.se2d.b1_7", FT_BOOLEAN, 8, NULL, 0x80, NULL, HFILL }},
3442
16
    { &hf_ipmi_se_2d_b1_6,
3443
16
      { "Reserved / State 6 asserted",
3444
16
        "ipmi.se2d.b1_6", FT_BOOLEAN, 8, NULL, 0x40, NULL, HFILL }},
3445
16
    { &hf_ipmi_se_2d_b1_5,
3446
16
      { "At or above UNR threshold / State 5 asserted",
3447
16
        "ipmi.se2d.b1_5", FT_BOOLEAN, 8, NULL, 0x20, NULL, HFILL }},
3448
16
    { &hf_ipmi_se_2d_b1_4,
3449
16
      { "At or above UC threshold / State 4 asserted",
3450
16
        "ipmi.se2d.b1_4", FT_BOOLEAN, 8, NULL, 0x10, NULL, HFILL }},
3451
16
    { &hf_ipmi_se_2d_b1_3,
3452
16
      { "At or above UNC threshold / State 3 asserted",
3453
16
        "ipmi.se2d.b1_3", FT_BOOLEAN, 8, NULL, 0x08, NULL, HFILL }},
3454
16
    { &hf_ipmi_se_2d_b1_2,
3455
16
      { "At or below LNR threshold / State 2 asserted",
3456
16
        "ipmi.se2d.b1_2", FT_BOOLEAN, 8, NULL, 0x04, NULL, HFILL }},
3457
16
    { &hf_ipmi_se_2d_b1_1,
3458
16
      { "At or below LC threshold / State 1 asserted",
3459
16
        "ipmi.se2d.b1_1", FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL }},
3460
16
    { &hf_ipmi_se_2d_b1_0,
3461
16
      { "At or below LNC threshold / State 0 asserted",
3462
16
        "ipmi.se2d.b1_0", FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL }},
3463
16
    { &hf_ipmi_se_2d_b2_6,
3464
16
      { "Reserved / State 14 asserted",
3465
16
        "ipmi.se2d.b1_6", FT_BOOLEAN, 8, NULL, 0x40, NULL, HFILL }},
3466
16
    { &hf_ipmi_se_2d_b2_5,
3467
16
      { "Reserved / State 13 asserted",
3468
16
        "ipmi.se2d.b1_5", FT_BOOLEAN, 8, NULL, 0x20, NULL, HFILL }},
3469
16
    { &hf_ipmi_se_2d_b2_4,
3470
16
      { "Reserved / State 12 asserted",
3471
16
        "ipmi.se2d.b1_4", FT_BOOLEAN, 8, NULL, 0x10, NULL, HFILL }},
3472
16
    { &hf_ipmi_se_2d_b2_3,
3473
16
      { "Reserved / State 11 asserted",
3474
16
        "ipmi.se2d.b1_3", FT_BOOLEAN, 8, NULL, 0x08, NULL, HFILL }},
3475
16
    { &hf_ipmi_se_2d_b2_2,
3476
16
      { "Reserved / State 10 asserted",
3477
16
        "ipmi.se2d.b1_2", FT_BOOLEAN, 8, NULL, 0x04, NULL, HFILL }},
3478
16
    { &hf_ipmi_se_2d_b2_1,
3479
16
      { "Reserved / State 9 asserted",
3480
16
        "ipmi.se2d.b1_1", FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL }},
3481
16
    { &hf_ipmi_se_2d_b2_0,
3482
16
      { "Reserved / State 8 asserted",
3483
16
        "ipmi.se2d.b1_0", FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL }},
3484
3485
16
    { &hf_ipmi_se_2e_sensor,
3486
16
      { "Sensor number",
3487
16
        "ipmi.se2e.sensor", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3488
16
    { &hf_ipmi_se_2e_stype,
3489
16
      { "Sensor type",
3490
16
        "ipmi.se2e.stype", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
3491
16
    { &hf_ipmi_se_2e_evtype,
3492
16
      { "Event/Reading type",
3493
16
        "ipmi.se2e.evtype", FT_UINT8, BASE_HEX|BASE_RANGE_STRING, RVALS(evtype_rvals), 0x7f, NULL, HFILL }},
3494
3495
16
    { &hf_ipmi_se_2f_sensor,
3496
16
      { "Sensor number",
3497
16
        "ipmi.se2f.sensor", FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }},
3498
16
    { &hf_ipmi_se_2f_stype,
3499
16
      { "Sensor type",
3500
16
        "ipmi.se2f.stype", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
3501
16
    { &hf_ipmi_se_2f_evtype,
3502
16
      { "Event/Reading type",
3503
16
        "ipmi.se2f.evtype", FT_UINT8, BASE_HEX|BASE_RANGE_STRING, RVALS(evtype_rvals), 0x7f, NULL, HFILL }},
3504
3505
    /* Generated from convert_proto_tree_add_text.pl */
3506
16
    { &hf_ipmi_se_evt_trigger_reading, { "Trigger reading", "ipmi.evt.trigger_reading", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
3507
16
    { &hf_ipmi_se_evt_trigger_threshold, { "Trigger threshold", "ipmi.evt.trigger_threshold", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
3508
16
    { &hf_ipmi_se_pst_severity, { "Severity", "ipmi.pst.severity", FT_UINT8, BASE_HEX, VALS(etoff_07), 0xF0, NULL, HFILL }},
3509
16
    { &hf_ipmi_se_pst_previous_state, { "Previous state", "ipmi.pst.previous_state", FT_UINT8, BASE_HEX, NULL, 0x0F, NULL, HFILL }},
3510
16
    { &hf_ipmi_se_05_network_controller, { "Network controller #", "ipmi.se05.network_controller", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
3511
16
    { &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 }},
3512
16
    { &hf_ipmi_se_0c_memory_module, { "Memory module/device ID", "ipmi.se0c.memory_module", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
3513
16
    { &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 }},
3514
16
    { &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 }},
3515
16
    { &hf_ipmi_se_10_memory_module, { "Memory module/device ID", "ipmi.se10.memory_module", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
3516
16
    { &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 }},
3517
16
    { &hf_ipmi_se_10_event, { "Event", "ipmi.se10.event", FT_BOOLEAN, 8, TFS(&tfs_deassertion_assertion), 0x10, NULL, HFILL }},
3518
16
    { &hf_ipmi_se_10_event_offset, { "Event Offset", "ipmi.se10.event_offset", FT_UINT8, BASE_HEX, NULL, 0x0F, NULL, HFILL }},
3519
16
    { &hf_ipmi_se_10_sel_filled, { "SEL filled (%)", "ipmi.se10.sel_filled", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
3520
16
    { &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 }},
3521
16
    { &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 }},
3522
16
    { &hf_ipmi_se_12_diagnostic_interrupt, { "Diagnostic interrupt (NMI)", "ipmi.se12.diagnostic_interrupt", FT_BOOLEAN, 8, NULL, 0x20, NULL, HFILL }},
3523
16
    { &hf_ipmi_se_12_oem_action, { "OEM Action", "ipmi.se12.oem_action", FT_BOOLEAN, 8, NULL, 0x10, NULL, HFILL }},
3524
16
    { &hf_ipmi_se_12_power_cycle, { "Power Cycle", "ipmi.se12.power_cycle", FT_BOOLEAN, 8, NULL, 0x08, NULL, HFILL }},
3525
16
    { &hf_ipmi_se_12_reset, { "Reset", "ipmi.se12.reset", FT_BOOLEAN, 8, NULL, 0x04, NULL, HFILL }},
3526
16
    { &hf_ipmi_se_12_power_off, { "Power Off", "ipmi.se12.power_off", FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL }},
3527
16
    { &hf_ipmi_se_12_alert, { "Alert", "ipmi.se12.alert", FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL }},
3528
16
    { &hf_ipmi_se_12_event, { "Event", "ipmi.se12.event", FT_BOOLEAN, 8, TFS(&tfs_second_first_pair), 0x80, NULL, HFILL }},
3529
16
    { &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 }},
3530
16
    { &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 }},
3531
16
    { &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 }},
3532
16
    { &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 }},
3533
16
    { &hf_ipmi_se_1d_channel, { "Channel", "ipmi.se1d.channel", FT_UINT8, BASE_CUSTOM, CF_FUNC(ipmi_fmt_channel), 0x0, NULL, HFILL }},
3534
16
    { &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 }},
3535
16
    { &hf_ipmi_se_21_slot_connector, { "Slot/connector #", "ipmi.se21.slot_connector", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
3536
16
    { &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 }},
3537
16
    { &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 }},
3538
16
    { &hf_ipmi_se_28_sensor_number, { "Sensor number", "ipmi.se28.sensor_number", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
3539
16
    { &hf_ipmi_se_28_logical_fru_device, { "Logical FRU device", "ipmi.se28.logical_fru_device", FT_BOOLEAN, 8, NULL, 0x80, NULL, HFILL }},
3540
16
    { &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 }},
3541
16
    { &hf_ipmi_se_28_private_bus_id, { "Private Bus ID", "ipmi.se28.private_bus_id", FT_UINT8, BASE_HEX, NULL, 0x07, NULL, HFILL }},
3542
16
    { &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 }},
3543
16
    { &hf_ipmi_se_28_i2c_slave_address, { "I2C Slave Address", "ipmi.se28.i2c_slave_address", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
3544
16
    { &hf_ipmi_se_2a_user_id, { "User ID", "ipmi.se2a.user_id", FT_UINT8, BASE_DEC, NULL, 0x3F, NULL, HFILL }},
3545
16
    { &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 }},
3546
16
    { &hf_ipmi_se_2a_channel, { "Channel", "ipmi.se2a.channel", FT_UINT8, BASE_CUSTOM, CF_FUNC(ipmi_fmt_channel), 0x0F, NULL, HFILL }},
3547
16
    { &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 }},
3548
16
    { &hf_ipmi_se_2c_cause, { "Cause", "ipmi.se2c.cause", FT_UINT8, BASE_HEX, VALS(ssi_2c_2_cause_vals), 0xF0, NULL, HFILL }},
3549
16
    { &hf_ipmi_se_2c_previous_state, { "Previous state", "ipmi.se2c.previous_state", FT_UINT8, BASE_HEX, NULL, 0x0F, NULL, HFILL }},
3550
16
    { &hf_ipmi_se_f0_cause, { "Cause", "ipmi.sef0.cause", FT_UINT8, BASE_HEX, VALS(ssi_f0_2_cause_vals), 0xF0, NULL, HFILL }},
3551
16
    { &hf_ipmi_se_f0_previous_state, { "Previous state", "ipmi.sef0.previous_state", FT_UINT8, BASE_HEX, NULL, 0x0F, NULL, HFILL }},
3552
16
    { &hf_ipmi_se_f0_fru_id, { "FRU Id", "ipmi.sef0.fru_id", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
3553
16
    { &hf_ipmi_se_f1_channel, { "Channel", "ipmi.sef1.channel", FT_UINT8, BASE_CUSTOM, CF_FUNC(ipmi_fmt_channel), 0xF0, NULL, HFILL }},
3554
16
    { &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 }},
3555
16
    { &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 }},
3556
16
    { &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 }},
3557
16
    { &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 }},
3558
16
    { &hf_ipmi_se_f3_global_status, { "Global Status", "ipmi.sef3.global_status", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
3559
16
    { &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 }},
3560
16
    { &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 }},
3561
16
    { &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 }},
3562
16
    { &hf_ipmi_se_f3_role, { "Role", "ipmi.sef3.role", FT_BOOLEAN, 8, TFS(&tfs_primary_redundant), 0x01, NULL, HFILL }},
3563
16
    { &hf_ipmi_se_f3_channel_status, { "Channel Status", "ipmi.sef3.channel_status", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL }},
3564
16
    { &hf_ipmi_se_f3_pwr_on, { "PWR_ON", "ipmi.sef3.pwr_on", FT_BOOLEAN, 8, TFS(&tfs_asserted_not_asserted), 0x40, NULL, HFILL }},
3565
16
    { &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 }},
3566
16
    { &hf_ipmi_se_f3_channel_payload_power, { "Payload Power", "ipmi.sef3.payload_power", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x10, NULL, HFILL }},
3567
16
    { &hf_ipmi_se_f3_enable, { "ENABLE#", "ipmi.sef3.enable", FT_BOOLEAN, 8, TFS(&tfs_asserted_not_asserted), 0x08, NULL, HFILL }},
3568
16
    { &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 }},
3569
16
    { &hf_ipmi_se_f3_channel_management_power, { "Management Power", "ipmi.sef3.management_power", FT_BOOLEAN, 8, TFS(&tfs_enabled_disabled), 0x02, NULL, HFILL }},
3570
16
    { &hf_ipmi_se_f3_ps1, { "PS1#", "ipmi.sef3.ps1", FT_BOOLEAN, 8, TFS(&tfs_asserted_not_asserted), 0x01, NULL, HFILL }},
3571
16
    { &hf_ipmi_se_f3_power_channel_number, { "Power Channel number", "ipmi.sef3.power_channel_number", FT_UINT8, BASE_DEC, NULL, 0x0, NULL, HFILL }},
3572
16
    { &hf_ipmi_se_13_parameter, { "Parameter", "ipmi.se13.parameter", FT_UINT8, BASE_DEC, NULL, 0x7F, NULL, HFILL }},
3573
16
    { &hf_ipmi_se_23_m, { "M", "ipmi.se23.m", FT_UINT16, BASE_HEX, NULL, 0xFFC0, NULL, HFILL }},
3574
16
    { &hf_ipmi_se_23_tolerance, { "Tolerance", "ipmi.se23.tolerance", FT_UINT16, BASE_DEC, NULL, 0x003F, NULL, HFILL }},
3575
16
    { &hf_ipmi_se_23_b, { "B", "ipmi.se23.b", FT_UINT16, BASE_HEX, NULL, 0xFFC0, NULL, HFILL }},
3576
16
    { &hf_ipmi_se_23_accuracy, { "Accuracy", "ipmi.se23.accuracy", FT_UINT16, BASE_DEC, NULL, 0x3FF0, NULL, HFILL }},
3577
16
    { &hf_ipmi_se_23_accuracy_exponent, { "Accuracy exponent", "ipmi.se23.accuracy_exponent", FT_UINT8, BASE_DEC, NULL, 0x0C, NULL, HFILL }},
3578
16
    { &hf_ipmi_se_23_r_exponent, { "R exponent", "ipmi.se23.r_exponent", FT_UINT8, BASE_DEC, NULL, 0xF0, NULL, HFILL }},
3579
16
    { &hf_ipmi_se_23_b_exponent, { "B exponent", "ipmi.se23.b_exponent", FT_UINT8, BASE_DEC, NULL, 0x0F, NULL, HFILL }},
3580
3581
16
  };
3582
16
  static int *ett[] = {
3583
16
    &ett_ipmi_se_evt_byte3,
3584
16
    &ett_ipmi_se_evt_evd_byte1,
3585
16
    &ett_ipmi_se_evt_evd_byte2,
3586
16
    &ett_ipmi_se_evt_evd_byte3,
3587
16
    &ett_ipmi_se_cp06_byte1,
3588
16
    &ett_ipmi_se_cp07_byte1,
3589
16
    &ett_ipmi_se_cp09_byte1,
3590
16
    &ett_ipmi_se_cp10_byte1,
3591
16
    &ett_ipmi_se_cp12_byte1,
3592
16
    &ett_ipmi_se_cp12_byte2,
3593
16
    &ett_ipmi_se_cp12_byte3,
3594
16
    &ett_ipmi_se_cp13_byte1,
3595
16
    &ett_ipmi_se_cp15_byte1,
3596
16
    &ett_ipmi_se_cp15_byte2,
3597
16
    &ett_ipmi_se_cp15_member,
3598
16
    &ett_ipmi_se_cp15_byte11,
3599
16
    &ett_ipmi_se_00_byte2,
3600
16
    &ett_ipmi_se_01_byte2,
3601
16
    &ett_ipmi_se_10_action,
3602
16
    &ett_ipmi_se_12_byte1,
3603
16
    &ett_ipmi_se_13_byte1,
3604
16
    &ett_ipmi_se_13_rev,
3605
16
    &ett_ipmi_se_14_byte1,
3606
16
    &ett_ipmi_se_16_byte1,
3607
16
    &ett_ipmi_se_16_byte2,
3608
16
    &ett_ipmi_se_16_byte3,
3609
16
    &ett_ipmi_se_20_rq_byte1,
3610
16
    &ett_ipmi_se_20_rs_byte2,
3611
16
    &ett_ipmi_se_23_readingfactors,
3612
16
    &ett_ipmi_se_23_byte1,
3613
16
    &ett_ipmi_se_23_byte2,
3614
16
    &ett_ipmi_se_23_byte3,
3615
16
    &ett_ipmi_se_23_byte4,
3616
16
    &ett_ipmi_se_23_byte5,
3617
16
    &ett_ipmi_se_23_byte6,
3618
16
    &ett_ipmi_se_XX_mask,
3619
16
    &ett_ipmi_se_XX_b1,
3620
16
    &ett_ipmi_se_XX_b2,
3621
16
    &ett_ipmi_se_XX_b3,
3622
16
    &ett_ipmi_se_XX_b4,
3623
16
    &ett_ipmi_se_28_byte2,
3624
16
    &ett_ipmi_se_29_byte1,
3625
16
    &ett_ipmi_se_2a_byte2,
3626
16
    &ett_ipmi_se_2b_byte1,
3627
16
    &ett_ipmi_se_2d_byte2,
3628
16
    &ett_ipmi_se_2d_b1,
3629
16
    &ett_ipmi_se_2d_b2,
3630
16
  };
3631
3632
16
  static ei_register_info ei[] = {
3633
16
    { &ei_ipmi_se_13_request_param_rev, { "ipmi.se13.request_param_rev", PI_PROTOCOL, PI_NOTE, "Requested parameter revision; parameter data returned", EXPFILL }},
3634
16
    { &ei_ipmi_se_13_request_param_data, { "ipmi.se13.mrequest_param_data", PI_PROTOCOL, PI_NOTE, "Requested parameter data; only parameter version returned", EXPFILL }},
3635
16
  };
3636
3637
16
  expert_module_t* expert_ipmi_se;
3638
3639
16
  proto_register_field_array(proto_ipmi, hf, array_length(hf));
3640
16
  proto_register_subtree_array(ett, array_length(ett));
3641
16
  expert_ipmi_se = expert_register_protocol(proto_ipmi);
3642
16
  expert_register_field_array(expert_ipmi_se, ei, array_length(ei));
3643
16
  ipmi_register_netfn_cmdtab(IPMI_SE_REQ, IPMI_OEM_NONE, NULL, 0, NULL,
3644
16
      cmd_se, array_length(cmd_se));
3645
3646
3647
16
}
3648
3649
/*
3650
 * Editor modelines  -  https://www.wireshark.org/tools/modelines.html
3651
 *
3652
 * Local variables:
3653
 * c-basic-offset: 8
3654
 * tab-width: 8
3655
 * indent-tabs-mode: t
3656
 * End:
3657
 *
3658
 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
3659
 * :indentSize=8:tabSize=8:noTabs=false:
3660
 */