1 /* packet-ipmi-chassis.c
2 * Sub-dissectors for IPMI messages (netFn=Chassis)
3 * Copyright 2007-2008, Alexey Neyman, Pigeon Point Systems <avn@pigeonpoint.com>
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
9 * SPDX-License-Identifier: GPL-2.0-or-later
14 #include <epan/packet.h>
16 #include <wsutil/array.h>
18 #include "packet-ipmi.h"
20 void proto_register_ipmi_chassis(void);
24 static int ett_ipmi_chs_bo00_byte1
;
25 static int ett_ipmi_chs_bo02_byte1
;
26 static int ett_ipmi_chs_bo03_byte1
;
27 static int ett_ipmi_chs_bo04_byte2
;
28 static int ett_ipmi_chs_bo05_byte1
;
29 static int ett_ipmi_chs_bo05_byte2
;
30 static int ett_ipmi_chs_bo05_byte3
;
31 static int ett_ipmi_chs_bo05_byte4
;
32 static int ett_ipmi_chs_bo06_byte1
;
34 static int ett_ipmi_chs_00_capflags
;
35 static int ett_ipmi_chs_01_pwr_state
;
36 static int ett_ipmi_chs_01_last_event
;
37 static int ett_ipmi_chs_01_misc
;
38 static int ett_ipmi_chs_01_fpb
;
39 static int ett_ipmi_chs_02_byte1
;
40 static int ett_ipmi_chs_04_byte2
;
41 static int ett_ipmi_chs_05_flags
;
42 static int ett_ipmi_chs_06_byte1
;
43 static int ett_ipmi_chs_06_policy_support
;
44 static int ett_ipmi_chs_07_byte1
;
45 static int ett_ipmi_chs_08_byte1
;
46 static int ett_ipmi_chs_09_rq_byte1
;
47 static int ett_ipmi_chs_09_rs_byte1
;
48 static int ett_ipmi_chs_09_rs_byte2
;
50 static int hf_ipmi_chs_bo00_sip
;
51 static int hf_ipmi_chs_bo01_spsel
;
52 static int hf_ipmi_chs_bo02_request
;
53 static int hf_ipmi_chs_bo02_discovered
;
54 static int hf_ipmi_chs_bo03_pef
;
55 static int hf_ipmi_chs_bo03_cctrl_timeout
;
56 static int hf_ipmi_chs_bo03_wd_timeout
;
57 static int hf_ipmi_chs_bo03_softreset
;
58 static int hf_ipmi_chs_bo03_powerup
;
59 static int hf_ipmi_chs_bo04_write_mask
;
60 static int hf_ipmi_chs_bo04_bootinit_ack_oem
;
61 static int hf_ipmi_chs_bo04_bootinit_ack_sms
;
62 static int hf_ipmi_chs_bo04_bootinit_ack_os
;
63 static int hf_ipmi_chs_bo04_bootinit_ack_osloader
;
64 static int hf_ipmi_chs_bo04_bootinit_ack_bios
;
65 static int hf_ipmi_chs_bo05_bootflags_valid
;
66 static int hf_ipmi_chs_bo05_permanent
;
67 static int hf_ipmi_chs_bo05_boottype
;
68 static int hf_ipmi_chs_bo05_cmos_clear
;
69 static int hf_ipmi_chs_bo05_lock_kbd
;
70 static int hf_ipmi_chs_bo05_bootdev
;
71 static int hf_ipmi_chs_bo05_screen_blank
;
72 static int hf_ipmi_chs_bo05_lockout_reset
;
73 static int hf_ipmi_chs_bo05_lockout_poweroff
;
74 static int hf_ipmi_chs_bo05_bios_verbosity
;
75 static int hf_ipmi_chs_bo05_progress_traps
;
76 static int hf_ipmi_chs_bo05_pwd_bypass
;
77 static int hf_ipmi_chs_bo05_lock_sleep
;
78 static int hf_ipmi_chs_bo05_console_redirection
;
79 static int hf_ipmi_chs_bo05_bios_shared_override
;
80 static int hf_ipmi_chs_bo05_bios_muxctl_override
;
81 static int hf_ipmi_chs_bo05_byte5
;
82 static int hf_ipmi_chs_bo06_chan_num
;
83 static int hf_ipmi_chs_bo06_session_id
;
84 static int hf_ipmi_chs_bo06_bootinfo_timestamp
;
85 static int hf_ipmi_chs_bo07_block_selector
;
86 static int hf_ipmi_chs_bo07_block_data
;
88 static int hf_ipmi_chs_00_capflags_ppi
;
89 static int hf_ipmi_chs_00_capflags_di
;
90 static int hf_ipmi_chs_00_capflags_fpl
;
91 static int hf_ipmi_chs_00_capflags_is
;
92 static int hf_ipmi_chs_00_fru_dev_addr
;
93 static int hf_ipmi_chs_00_sdr_dev_addr
;
94 static int hf_ipmi_chs_00_sel_dev_addr
;
95 static int hf_ipmi_chs_00_sm_dev_addr
;
96 static int hf_ipmi_chs_00_bridge_dev_addr
;
98 static int hf_ipmi_chs_01_pwr_state_policy
;
99 static int hf_ipmi_chs_01_pwr_state_ctl_fault
;
100 static int hf_ipmi_chs_01_pwr_state_fault
;
101 static int hf_ipmi_chs_01_pwr_state_ilock
;
102 static int hf_ipmi_chs_01_pwr_state_overload
;
103 static int hf_ipmi_chs_01_pwr_state_powered
;
104 static int hf_ipmi_chs_01_last_event_via_ipmi
;
105 static int hf_ipmi_chs_01_last_event_down_by_fault
;
106 static int hf_ipmi_chs_01_last_event_interlock
;
107 static int hf_ipmi_chs_01_last_event_overload
;
108 static int hf_ipmi_chs_01_last_event_ac_failed
;
109 static int hf_ipmi_chs_01_misc_identsupp
;
110 static int hf_ipmi_chs_01_misc_identstate
;
111 static int hf_ipmi_chs_01_misc_fan
;
112 static int hf_ipmi_chs_01_misc_drive
;
113 static int hf_ipmi_chs_01_misc_fpl_active
;
114 static int hf_ipmi_chs_01_misc_intrusion
;
115 static int hf_ipmi_chs_01_fpb_standby_allowed
;
116 static int hf_ipmi_chs_01_fpb_diagintr_allowed
;
117 static int hf_ipmi_chs_01_fpb_reset_allowed
;
118 static int hf_ipmi_chs_01_fpb_poweroff_allowed
;
119 static int hf_ipmi_chs_01_fpb_standby_disabled
;
120 static int hf_ipmi_chs_01_fpb_diagintr_disabled
;
121 static int hf_ipmi_chs_01_fpb_reset_disabled
;
122 static int hf_ipmi_chs_01_fpb_poweroff_disabled
;
124 static int hf_ipmi_chs_02_cctrl
;
126 static int hf_ipmi_chs_04_ival
;
127 static int hf_ipmi_chs_04_perm_on
;
129 static int hf_ipmi_chs_05_flags_fpl
;
130 static int hf_ipmi_chs_05_flags_intrusion
;
131 static int hf_ipmi_chs_05_fru_dev_addr
;
132 static int hf_ipmi_chs_05_sdr_dev_addr
;
133 static int hf_ipmi_chs_05_sel_dev_addr
;
134 static int hf_ipmi_chs_05_sm_dev_addr
;
135 static int hf_ipmi_chs_05_bridge_dev_addr
;
137 static int hf_ipmi_chs_06_rq_policy
;
138 static int hf_ipmi_chs_06_rs_policy_support_powerup
;
139 static int hf_ipmi_chs_06_rs_policy_support_restore
;
140 static int hf_ipmi_chs_06_rs_policy_support_poweroff
;
142 static int hf_ipmi_chs_07_cause
;
143 static int hf_ipmi_chs_07_chan
;
145 static int hf_ipmi_chs_08_valid
;
146 static int hf_ipmi_chs_08_selector
;
147 static int hf_ipmi_chs_08_data
;
149 static int hf_ipmi_chs_09_rq_param_select
;
150 static int hf_ipmi_chs_09_rq_set_select
;
151 static int hf_ipmi_chs_09_rq_block_select
;
152 static int hf_ipmi_chs_09_rs_param_version
;
153 static int hf_ipmi_chs_09_rs_valid
;
154 static int hf_ipmi_chs_09_rs_param_select
;
155 static int hf_ipmi_chs_09_rs_param_data
;
157 static int hf_ipmi_chs_0f_minpercnt
;
158 static int hf_ipmi_chs_0f_counter
;
160 static const struct true_false_string tfs_00_provided
= { "Provided", "Not Provided" };
162 static const value_string vals_01_pwr_policy
[] = {
163 { 0x00, "chassis stays powered off after AC returns" },
164 { 0x01, "after AC returns, power is restored to the state that was in effect when AC was lost" },
165 { 0x02, "chassis always powers up after AC returns" },
170 static const value_string vals_01_identstate
[] = {
172 { 0x01, "Temporary (timed) On" },
177 static const value_string vals_02_cctrl
[] = {
178 { 0x00, "Power down" },
179 { 0x01, "Power up" },
180 { 0x02, "Power cycle" },
181 { 0x03, "Hard reset" },
182 { 0x04, "Pulse Diagnostic Interrupt" },
183 { 0x05, "Initiate a soft-shutdown of OS via ACPI by emulating a fatal overtemperature" },
187 static const value_string vals_06_policy
[] = {
188 { 0x00, "Chassis always stays powered off after AC/mains is applied" },
189 { 0x01, "After AC/mains is applied or returns, power is restored to the state that was in effect when AC/mains was removed or lost" },
190 { 0x02, "Chassis always powers up after AC/mains is applied or returns" },
191 { 0x03, "No change (just get policy support)" },
192 { 0x04, "Reserved" },
193 { 0x05, "Reserved" },
194 { 0x06, "Reserved" },
195 { 0x07, "Reserved" },
199 static const struct true_false_string tfs_06_supported
= { "Supported", "Not supported" };
201 static const value_string vals_07_cause
[] = {
203 { 0x01, "Chassis Control command" },
204 { 0x02, "Reset via pushbutton" },
205 { 0x03, "Power-up via pushbutton" },
206 { 0x04, "Watchdog expiration" },
208 { 0x06, "Automatic power-up on AC being applied due to 'always restore' power restore policy" },
209 { 0x07, "Automatic power-up on AC being applied due to 'restore previous power state' power restore policy" },
210 { 0x08, "Reset via PEF" },
211 { 0x09, "Power-cycle via PEF" },
212 { 0x0a, "Soft reset" },
213 { 0x0b, "Power-up via RTC wakeup" },
214 { 0x0c, "Reserved" },
215 { 0x0d, "Reserved" },
216 { 0x0e, "Reserved" },
217 { 0x0f, "Reserved" },
221 static const value_string bo00_sip_vals
[] = {
222 { 0x00, "Set complete" },
223 { 0x01, "Set in progress" },
224 { 0x02, "Commit write" },
225 { 0x03, "Reserved" },
229 static const struct true_false_string tfs_08_valid
= {
230 "Mark parameter invalid/locked",
231 "Mark parameter valid/unlocked"
234 static const struct true_false_string bo03_dontclear_tfs
= {
239 static const struct true_false_string bo04_bootinit_ack_tfs
= {
240 "has handled boot info",
241 "hasn't handled boot info"
244 static const struct true_false_string bo05_permanent_tfs
= {
245 "options requested to be persistent for all future boots",
246 "options apply to next boot only"
249 static const struct true_false_string bo05_boottype_tfs
= {
250 "Extensible Firmware Interface Boot (EFI)",
251 "'PC compatible' boot (legacy)"
254 static const value_string bo05_bootdev_vals
[] = {
255 { 0x00, "No override" },
256 { 0x01, "Force PXE" },
257 { 0x02, "Force boot from default Hard-drive" },
258 { 0x03, "Force boot from default Hard-drive, request Safe Mode" },
259 { 0x04, "Force boot from default Diagnostic Partition" },
260 { 0x05, "Force boot from default CD/DVD" },
261 { 0x06, "Force boot into BIOS Setup" },
262 { 0x07, "Reserved" },
263 { 0x08, "Reserved" },
264 { 0x09, "Reserved" },
265 { 0x0a, "Reserved" },
266 { 0x0b, "Reserved" },
267 { 0x0c, "Reserved" },
268 { 0x0d, "Reserved" },
269 { 0x0e, "Reserved" },
270 { 0x0f, "Force boot from floppy/primary removable media" },
274 static const value_string bo05_bios_verbosity_vals
[] = {
275 { 0x00, "System default" },
276 { 0x01, "Request quiet display" },
277 { 0x02, "Request verbose display" },
278 { 0x03, "Reserved" },
282 static const value_string bo05_console_redir_vals
[] = {
283 { 0x00, "Console redirection occurs per BIOS configuration setting" },
284 { 0x01, "Suppress (skip) console redirection" },
285 { 0x02, "Request console redirection be enabled" },
286 { 0x03, "Reserved" },
290 static const struct true_false_string bo05_bios_shared_tfs
= {
291 "Request BIOS to temporarily set the access mode for the channel specified in parameter #6 to 'Shared'",
292 "No request to BIOS to change present access mode setting"
295 static const value_string bo05_bios_muxctl_vals
[] = {
296 { 0x00, "BIOS uses recommended setting of the mux at the end of POST" },
297 { 0x01, "Requests BIOS to force mux to BMC at conclusion of POST/start of OS boot" },
298 { 0x02, "Requests BIOS to force mux to system at conclusion of POST/start of OSboot" },
299 { 0x03, "Reserved" },
300 { 0x04, "Reserved" },
301 { 0x05, "Reserved" },
302 { 0x06, "Reserved" },
303 { 0x07, "Reserved" },
307 static const struct true_false_string tfs_09_valid
= {
308 "Parameter marked invalid / locked",
309 "Parameter marked valid / unlocked"
312 /* Boot options - common for Get/Set Boot Options commands
315 bootopt_00(packet_info
*pinfo _U_
, tvbuff_t
*tvb
, proto_tree
*tree
)
317 static int * const byte1
[] = { &hf_ipmi_chs_bo00_sip
, NULL
};
319 proto_tree_add_bitmask_text(tree
, tvb
, 0, 1, NULL
, NULL
, ett_ipmi_chs_bo00_byte1
, byte1
,
320 ENC_LITTLE_ENDIAN
, 0);
324 bootopt_01(packet_info
*pinfo _U_
, tvbuff_t
*tvb
, proto_tree
*tree
)
326 proto_tree_add_item(tree
, hf_ipmi_chs_bo01_spsel
, tvb
, 0, 1, ENC_LITTLE_ENDIAN
);
330 bootopt_02(packet_info
*pinfo _U_
, tvbuff_t
*tvb
, proto_tree
*tree
)
332 static int * const byte1
[] = { &hf_ipmi_chs_bo02_request
, &hf_ipmi_chs_bo02_discovered
, NULL
};
334 proto_tree_add_bitmask_text(tree
, tvb
, 0, 1, "Service partition scan: ",
335 "Not discovered", ett_ipmi_chs_bo02_byte1
, byte1
, ENC_LITTLE_ENDIAN
, 0);
339 bootopt_03(packet_info
*pinfo _U_
, tvbuff_t
*tvb
, proto_tree
*tree
)
341 static int * const byte1
[] = { &hf_ipmi_chs_bo03_pef
, &hf_ipmi_chs_bo03_cctrl_timeout
,
342 &hf_ipmi_chs_bo03_wd_timeout
, &hf_ipmi_chs_bo03_softreset
, &hf_ipmi_chs_bo03_powerup
, NULL
};
344 proto_tree_add_bitmask_text(tree
, tvb
, 0, 1, "BMC boot flag valid, don't clear on: ",
345 "None", ett_ipmi_chs_bo03_byte1
, byte1
, ENC_LITTLE_ENDIAN
, BMT_NO_TFS
);
349 bootopt_04(packet_info
*pinfo _U_
, tvbuff_t
*tvb
, proto_tree
*tree
)
351 static int * const byte2
[] = { &hf_ipmi_chs_bo04_bootinit_ack_oem
, &hf_ipmi_chs_bo04_bootinit_ack_sms
,
352 &hf_ipmi_chs_bo04_bootinit_ack_os
, &hf_ipmi_chs_bo04_bootinit_ack_osloader
,
353 &hf_ipmi_chs_bo04_bootinit_ack_bios
, NULL
};
355 proto_tree_add_item(tree
, hf_ipmi_chs_bo04_write_mask
, tvb
, 0, 1, ENC_LITTLE_ENDIAN
);
356 proto_tree_add_bitmask_text(tree
, tvb
, 1, 1, "Boot Initiator Acknowledge data: ",
357 "None", ett_ipmi_chs_bo04_byte2
, byte2
, ENC_LITTLE_ENDIAN
, BMT_NO_TFS
);
361 bootopt_05(packet_info
*pinfo _U_
, tvbuff_t
*tvb
, proto_tree
*tree
)
363 static int * const byte1
[] = { &hf_ipmi_chs_bo05_bootflags_valid
,
364 &hf_ipmi_chs_bo05_permanent
, &hf_ipmi_chs_bo05_boottype
, NULL
};
365 static int * const byte2
[] = { &hf_ipmi_chs_bo05_cmos_clear
, &hf_ipmi_chs_bo05_lock_kbd
,
366 &hf_ipmi_chs_bo05_bootdev
, &hf_ipmi_chs_bo05_screen_blank
, &hf_ipmi_chs_bo05_lockout_reset
, NULL
};
367 static int * const byte3
[] = { &hf_ipmi_chs_bo05_lockout_poweroff
, &hf_ipmi_chs_bo05_bios_verbosity
,
368 &hf_ipmi_chs_bo05_progress_traps
, &hf_ipmi_chs_bo05_pwd_bypass
, &hf_ipmi_chs_bo05_lock_sleep
,
369 &hf_ipmi_chs_bo05_console_redirection
, NULL
};
370 static int * const byte4
[] = { &hf_ipmi_chs_bo05_bios_shared_override
,
371 &hf_ipmi_chs_bo05_bios_muxctl_override
, NULL
};
373 proto_tree_add_bitmask_text(tree
, tvb
, 0, 1, NULL
, NULL
, ett_ipmi_chs_bo05_byte1
,
374 byte1
, ENC_LITTLE_ENDIAN
, 0);
375 proto_tree_add_bitmask_text(tree
, tvb
, 1, 1, NULL
, NULL
, ett_ipmi_chs_bo05_byte2
,
376 byte2
, ENC_LITTLE_ENDIAN
, 0);
377 proto_tree_add_bitmask_text(tree
, tvb
, 2, 1, NULL
, NULL
, ett_ipmi_chs_bo05_byte3
,
378 byte3
, ENC_LITTLE_ENDIAN
, 0);
379 proto_tree_add_bitmask_text(tree
, tvb
, 3, 1, NULL
, NULL
, ett_ipmi_chs_bo05_byte4
,
380 byte4
, ENC_LITTLE_ENDIAN
, 0);
381 proto_tree_add_item(tree
, hf_ipmi_chs_bo05_byte5
, tvb
, 4, 1, ENC_LITTLE_ENDIAN
);
385 bootopt_06(packet_info
*pinfo
, tvbuff_t
*tvb
, proto_tree
*tree
)
387 static int * const byte1
[] = { &hf_ipmi_chs_bo06_chan_num
, NULL
};
389 proto_tree_add_bitmask_text(tree
, tvb
, 0, 1, NULL
, NULL
,
390 ett_ipmi_chs_bo06_byte1
, byte1
, ENC_LITTLE_ENDIAN
, 0);
391 proto_tree_add_item(tree
, hf_ipmi_chs_bo06_session_id
, tvb
, 1, 4, ENC_LITTLE_ENDIAN
);
392 ipmi_add_timestamp(pinfo
, tree
, hf_ipmi_chs_bo06_bootinfo_timestamp
, tvb
, 5);
396 bootopt_07(packet_info
*pinfo _U_
, tvbuff_t
*tvb
, proto_tree
*tree
)
398 proto_tree_add_item(tree
, hf_ipmi_chs_bo07_block_selector
, tvb
, 0, 1, ENC_LITTLE_ENDIAN
);
399 proto_tree_add_item(tree
, hf_ipmi_chs_bo07_block_data
, tvb
, 1, -1, ENC_NA
);
404 void (*intrp
)(packet_info
*pinfo
, tvbuff_t
*tvb
, proto_tree
*tree
);
407 { bootopt_00
, "Set In Progress" },
408 { bootopt_01
, "Service Partition Selector" },
409 { bootopt_02
, "Service Partition Scan" },
410 { bootopt_03
, "BMC boot flag valid bit clearing" },
411 { bootopt_04
, "Boot info acknowledge" },
412 { bootopt_05
, "Boot flags" },
413 { bootopt_06
, "Boot initiator info" },
414 { bootopt_07
, "Boot initiator mailbox" }
418 /* Get Chassis Capabilities (response)
421 rs00(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
423 static int * const byte1
[] = { &hf_ipmi_chs_00_capflags_ppi
, &hf_ipmi_chs_00_capflags_di
,
424 &hf_ipmi_chs_00_capflags_fpl
, &hf_ipmi_chs_00_capflags_is
, NULL
};
426 proto_tree_add_bitmask_text(tree
, tvb
, 0, 1, "Capabilities: ", "None",
427 ett_ipmi_chs_00_capflags
, byte1
, ENC_LITTLE_ENDIAN
, BMT_NO_TFS
);
428 proto_tree_add_item(tree
, hf_ipmi_chs_00_fru_dev_addr
, tvb
, 1, 1, ENC_LITTLE_ENDIAN
);
429 proto_tree_add_item(tree
, hf_ipmi_chs_00_sdr_dev_addr
, tvb
, 2, 1, ENC_LITTLE_ENDIAN
);
430 proto_tree_add_item(tree
, hf_ipmi_chs_00_sel_dev_addr
, tvb
, 3, 1, ENC_LITTLE_ENDIAN
);
431 proto_tree_add_item(tree
, hf_ipmi_chs_00_sm_dev_addr
, tvb
, 4, 1, ENC_LITTLE_ENDIAN
);
433 if (tvb_captured_length(tvb
) >= 5) {
434 proto_tree_add_item(tree
, hf_ipmi_chs_00_bridge_dev_addr
, tvb
, 5, 1, ENC_LITTLE_ENDIAN
);
438 /* Get Chassis Status.
441 rs01(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
443 static int * const byte1
[] = { &hf_ipmi_chs_01_pwr_state_policy
,
444 &hf_ipmi_chs_01_pwr_state_ctl_fault
, &hf_ipmi_chs_01_pwr_state_fault
,
445 &hf_ipmi_chs_01_pwr_state_ilock
, &hf_ipmi_chs_01_pwr_state_overload
,
446 &hf_ipmi_chs_01_pwr_state_powered
, NULL
};
447 static int * const byte2
[] = { &hf_ipmi_chs_01_last_event_via_ipmi
,
448 &hf_ipmi_chs_01_last_event_down_by_fault
, &hf_ipmi_chs_01_last_event_interlock
,
449 &hf_ipmi_chs_01_last_event_overload
, &hf_ipmi_chs_01_last_event_ac_failed
, NULL
};
450 static int * const byte3
[] = { &hf_ipmi_chs_01_misc_identsupp
, &hf_ipmi_chs_01_misc_identstate
,
451 &hf_ipmi_chs_01_misc_fan
, &hf_ipmi_chs_01_misc_drive
, &hf_ipmi_chs_01_misc_fpl_active
,
452 &hf_ipmi_chs_01_misc_intrusion
, NULL
};
453 static int * const byte4
[] = { &hf_ipmi_chs_01_fpb_standby_allowed
,
454 &hf_ipmi_chs_01_fpb_diagintr_allowed
, &hf_ipmi_chs_01_fpb_reset_allowed
,
455 &hf_ipmi_chs_01_fpb_poweroff_allowed
, &hf_ipmi_chs_01_fpb_standby_disabled
,
456 &hf_ipmi_chs_01_fpb_diagintr_disabled
, &hf_ipmi_chs_01_fpb_reset_disabled
,
457 &hf_ipmi_chs_01_fpb_poweroff_disabled
, NULL
};
459 proto_tree_add_bitmask_text(tree
, tvb
, 0, 1, "Current Power State: ", NULL
,
460 ett_ipmi_chs_01_pwr_state
, byte1
, ENC_LITTLE_ENDIAN
, 0);
461 proto_tree_add_bitmask_text(tree
, tvb
, 1, 1, "Last Power Event: ", NULL
,
462 ett_ipmi_chs_01_last_event
, byte2
, ENC_LITTLE_ENDIAN
, 0);
463 proto_tree_add_bitmask_text(tree
, tvb
, 2, 1, "Misc. State: ", NULL
,
464 ett_ipmi_chs_01_misc
, byte3
, ENC_LITTLE_ENDIAN
, 0);
465 if (tvb_captured_length(tvb
) > 3) {
466 proto_tree_add_bitmask_text(tree
, tvb
, 3, 1, "Front panel buttons capabilities: ",
467 NULL
, ett_ipmi_chs_01_fpb
, byte4
, ENC_LITTLE_ENDIAN
, BMT_NO_TFS
);
474 rq02(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
476 static int * const byte1
[] = { &hf_ipmi_chs_02_cctrl
, NULL
};
478 proto_tree_add_bitmask_text(tree
, tvb
, 0, 1, NULL
, NULL
,
479 ett_ipmi_chs_02_byte1
, byte1
, ENC_LITTLE_ENDIAN
, 0);
485 rq04(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
487 static int * const byte2
[] = { &hf_ipmi_chs_04_perm_on
, NULL
};
489 if (tvb_captured_length(tvb
) > 0) {
490 proto_tree_add_item(tree
, hf_ipmi_chs_04_ival
, tvb
, 0, 1, ENC_LITTLE_ENDIAN
);
493 if (tvb_captured_length(tvb
) > 1) {
494 proto_tree_add_bitmask_text(tree
, tvb
, 1, 1, "Flags: ", "None",
495 ett_ipmi_chs_04_byte2
, byte2
, ENC_LITTLE_ENDIAN
, 0);
499 /* Set Chassis Capabilities.
502 rq05(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
504 static int * const byte1
[] = { &hf_ipmi_chs_05_flags_fpl
, &hf_ipmi_chs_05_flags_intrusion
, NULL
};
506 proto_tree_add_bitmask_text(tree
, tvb
, 0, 1, "Capabilities: ", "None",
507 ett_ipmi_chs_05_flags
, byte1
, ENC_LITTLE_ENDIAN
, 0);
508 proto_tree_add_item(tree
, hf_ipmi_chs_05_fru_dev_addr
, tvb
, 1, 1, ENC_LITTLE_ENDIAN
);
509 proto_tree_add_item(tree
, hf_ipmi_chs_05_sdr_dev_addr
, tvb
, 2, 1, ENC_LITTLE_ENDIAN
);
510 proto_tree_add_item(tree
, hf_ipmi_chs_05_sel_dev_addr
, tvb
, 3, 1, ENC_LITTLE_ENDIAN
);
511 proto_tree_add_item(tree
, hf_ipmi_chs_05_sm_dev_addr
, tvb
, 4, 1, ENC_LITTLE_ENDIAN
);
512 if (tvb_captured_length(tvb
) > 5) {
513 /* Bridge device address is optional */
514 proto_tree_add_item(tree
, hf_ipmi_chs_05_bridge_dev_addr
, tvb
, 5, 1, ENC_LITTLE_ENDIAN
);
518 /* Set Power Restore Policy
521 rq06(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
523 static int * const byte1
[] = { &hf_ipmi_chs_06_rq_policy
, NULL
};
525 proto_tree_add_bitmask_text(tree
, tvb
, 0, 1, NULL
, NULL
,
526 ett_ipmi_chs_06_byte1
, byte1
, ENC_LITTLE_ENDIAN
, 0);
529 /* Get Power Restore Policy
532 rs06(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
534 static int * const byte1
[] = { &hf_ipmi_chs_06_rs_policy_support_powerup
,
535 &hf_ipmi_chs_06_rs_policy_support_restore
, &hf_ipmi_chs_06_rs_policy_support_poweroff
, NULL
};
537 proto_tree_add_bitmask_text(tree
, tvb
, 0, 1, "Power Restore Policy support: ", "None",
538 ett_ipmi_chs_06_policy_support
, byte1
, ENC_LITTLE_ENDIAN
, BMT_NO_TFS
);
541 /* Get System Restart Cause
544 rs07(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
546 static int * const byte1
[] = { &hf_ipmi_chs_07_cause
, NULL
};
548 proto_tree_add_bitmask_text(tree
, tvb
, 0, 1, NULL
, NULL
,
549 ett_ipmi_chs_07_byte1
, byte1
, ENC_LITTLE_ENDIAN
, 0);
550 proto_tree_add_item(tree
, hf_ipmi_chs_07_chan
, tvb
, 1, 1, ENC_LITTLE_ENDIAN
);
553 /* Set System Boot Options
556 rq08(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
)
563 pno
= tvb_get_uint8(tvb
, 0) & 0x7f;
564 if (pno
< array_length(boot_options
)) {
565 desc
= boot_options
[pno
].name
;
566 } else if (pno
>= 96 && pno
<= 127) {
572 s_tree
= proto_tree_add_subtree_format(tree
, tvb
, 0, 1,
573 ett_ipmi_chs_08_byte1
, NULL
, "Boot option parameter selector: %s (0x%02x)",
575 proto_tree_add_item(s_tree
, hf_ipmi_chs_08_valid
, tvb
, 0, 1, ENC_LITTLE_ENDIAN
);
576 proto_tree_add_uint_format_value(s_tree
, hf_ipmi_chs_08_selector
, tvb
, 0, 1,
577 pno
, "Boot option parameter selector: %s (0x%02x)",
580 /* Data is optional; no data means 'just set validity' */
581 if (tvb_captured_length(tvb
) > 1) {
582 if (pno
< array_length(boot_options
)) {
583 sub
= tvb_new_subset_remaining(tvb
, 1);
584 boot_options
[pno
].intrp(pinfo
, sub
, tree
);
586 proto_tree_add_none_format(tree
, hf_ipmi_chs_08_data
, tvb
, 1,
587 -1, "Parameter data: %s", desc
);
592 static const value_string cc08
[] = {
593 { 0x80, "Parameter not supported" },
594 { 0x81, "Attempt to set the 'set in progress' value (in parameter #0) when not in the 'set complete' state" },
595 { 0x82, "Attempt to write read-only parameter" },
599 /* Get System Boot Options
602 rq09(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
608 pno
= tvb_get_uint8(tvb
, 0) & 0x7f;
609 if (pno
< array_length(boot_options
)) {
610 desc
= boot_options
[pno
].name
;
611 } else if (pno
>= 96 && pno
<= 127) {
618 s_tree
= proto_tree_add_subtree_format(tree
, tvb
, 0, 1,
619 ett_ipmi_chs_09_rq_byte1
, NULL
, "Boot option parameter selector: %s (0x%02x)",
621 proto_tree_add_uint_format_value(s_tree
, hf_ipmi_chs_09_rq_param_select
, tvb
, 0, 1,
622 pno
, "Boot option parameter selector: %s (0x%02x)",
625 proto_tree_add_item(tree
, hf_ipmi_chs_09_rq_set_select
, tvb
, 1, 1, ENC_LITTLE_ENDIAN
);
626 proto_tree_add_item(tree
, hf_ipmi_chs_09_rq_block_select
, tvb
, 2, 1, ENC_LITTLE_ENDIAN
);
630 rs09(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
)
632 static int * const byte1
[] = { &hf_ipmi_chs_09_rs_param_version
, NULL
};
638 pno
= tvb_get_uint8(tvb
, 1) & 0x7f;
639 if (pno
< array_length(boot_options
)) {
640 desc
= boot_options
[pno
].name
;
641 } else if (pno
>= 96 && pno
<= 127) {
647 proto_tree_add_bitmask_text(tree
, tvb
, 0, 1, NULL
, NULL
,
648 ett_ipmi_chs_09_rs_byte1
, byte1
, ENC_LITTLE_ENDIAN
, 0);
650 s_tree
= proto_tree_add_subtree_format(tree
, tvb
, 1, 1,
651 ett_ipmi_chs_09_rs_byte2
, NULL
, "Boot option parameter selector: %s (0x%02x)",
653 proto_tree_add_item(s_tree
, hf_ipmi_chs_09_rs_valid
, tvb
, 1, 1, ENC_LITTLE_ENDIAN
);
654 proto_tree_add_uint_format_value(s_tree
, hf_ipmi_chs_09_rs_param_select
, tvb
, 1, 1,
655 pno
, "Boot option parameter selector: %s (0x%02x)",
658 if (pno
< array_length(boot_options
)) {
659 sub
= tvb_new_subset_remaining(tvb
, 2);
660 boot_options
[pno
].intrp(pinfo
, sub
, tree
);
662 proto_tree_add_item(tree
, hf_ipmi_chs_09_rs_param_data
, tvb
, 2, -1, ENC_NA
);
666 static const value_string cc09
[] = {
667 { 0x80, "Parameter not supported" },
674 rs0f(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
676 proto_tree_add_item(tree
, hf_ipmi_chs_0f_minpercnt
, tvb
, 0, 1, ENC_LITTLE_ENDIAN
);
677 proto_tree_add_item(tree
, hf_ipmi_chs_0f_counter
, tvb
, 1, 4, ENC_LITTLE_ENDIAN
);
680 static const ipmi_cmd_t cmd_chassis
[] = {
681 /* Chassis commands */
682 { 0x00, NULL
, rs00
, NULL
, NULL
, "Get Chassis Capabilities", 0 },
683 { 0x01, NULL
, rs01
, NULL
, NULL
, "Get Chassis Status", 0 },
684 { 0x02, rq02
, NULL
, NULL
, NULL
, "Chassis Control", 0 },
685 { 0x03, NULL
, NULL
, NULL
, NULL
, "Chassis Reset", 0 },
686 { 0x04, rq04
, NULL
, NULL
, NULL
, "Chassis Identify", 0 },
687 { 0x05, rq05
, NULL
, NULL
, NULL
, "Set Chassis Capabilities", 0 },
688 { 0x06, rq06
, rs06
, NULL
, NULL
, "Set Power Restore Policy", 0 },
689 { 0x07, NULL
, rs07
, NULL
, NULL
, "Get System Restart Cause", 0 },
690 { 0x08, rq08
, NULL
, cc08
, NULL
, "Set System Boot Options", 0 },
691 { 0x09, rq09
, rs09
, cc09
, NULL
, "Get System Boot Options", 0 },
692 { 0x0a, IPMI_TBD
, NULL
, NULL
, "Set Front Panel Buttons Enables", 0 },
693 { 0x0b, IPMI_TBD
, NULL
, NULL
, "Set Power Cycle Interval", 0 },
694 { 0x0f, NULL
, rs0f
, NULL
, NULL
, "Get POH Counter", 0 },
698 proto_register_ipmi_chassis(void)
700 static hf_register_info hf
[] = {
701 { &hf_ipmi_chs_bo00_sip
,
703 "ipmi.bootopt00.sip", FT_UINT8
, BASE_HEX
, VALS(bo00_sip_vals
), 0x03, NULL
, HFILL
}},
704 { &hf_ipmi_chs_bo01_spsel
,
705 { "Service Partition Selector",
706 "ipmi.bootopt01.spsel", FT_UINT8
, BASE_HEX
, NULL
, 0, NULL
, HFILL
}},
707 { &hf_ipmi_chs_bo02_request
,
708 { "Request BIOS to scan for specified service partition",
709 "ipmi.bootopt02.spscan.request", FT_BOOLEAN
, 8, NULL
, 0x02, NULL
, HFILL
}},
710 { &hf_ipmi_chs_bo02_discovered
,
711 { "Service Partition discovered",
712 "ipmi.bootopt02.spscan.discovered", FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
713 { &hf_ipmi_chs_bo03_pef
,
714 { "Reset/power cycle caused by PEF",
715 "ipmi.bootopt03.bmcboot.pef", FT_BOOLEAN
, 8, TFS(&bo03_dontclear_tfs
), 0x10, NULL
, HFILL
}},
716 { &hf_ipmi_chs_bo03_cctrl_timeout
,
717 { "Chassis Control command not received within 60s timeout",
718 "ipmi.bootopt03.bmcboot.cctrl_timeout", FT_BOOLEAN
, 8, TFS(&bo03_dontclear_tfs
), 0x08, NULL
, HFILL
}},
719 { &hf_ipmi_chs_bo03_wd_timeout
,
720 { "Reset/power cycle caused by watchdog timeout",
721 "ipmi.bootopt03.bmcboot.wd_timeout", FT_BOOLEAN
, 8, TFS(&bo03_dontclear_tfs
), 0x04, NULL
, HFILL
}},
722 { &hf_ipmi_chs_bo03_softreset
,
723 { "Pushbutton reset / soft reset",
724 "ipmi.bootopt03.bmcboot.softreset", FT_BOOLEAN
, 8, TFS(&bo03_dontclear_tfs
), 0x02, NULL
, HFILL
}},
725 { &hf_ipmi_chs_bo03_powerup
,
726 { "Power up via pushbutton or wake event",
727 "ipmi.bootopt03.bmcboot.powerup", FT_BOOLEAN
, 8, TFS(&bo03_dontclear_tfs
), 0x01, NULL
, HFILL
}},
728 { &hf_ipmi_chs_bo04_write_mask
,
730 "ipmi.bootopt04.write_mask", FT_UINT8
, BASE_HEX
, NULL
, 0, NULL
, HFILL
}},
731 { &hf_ipmi_chs_bo04_bootinit_ack_oem
,
733 "ipmi.bootopt04.bootinit_ack.oem", FT_BOOLEAN
, 8, TFS(&bo04_bootinit_ack_tfs
), 0x10, NULL
, HFILL
}},
734 { &hf_ipmi_chs_bo04_bootinit_ack_sms
,
736 "ipmi.bootopt04.bootinit_ack.sms", FT_BOOLEAN
, 8, TFS(&bo04_bootinit_ack_tfs
), 0x08, NULL
, HFILL
}},
737 { &hf_ipmi_chs_bo04_bootinit_ack_os
,
738 { "OS / Service Partition",
739 "ipmi.bootopt04.bootinit_ack.os", FT_BOOLEAN
, 8, TFS(&bo04_bootinit_ack_tfs
), 0x04, NULL
, HFILL
}},
740 { &hf_ipmi_chs_bo04_bootinit_ack_osloader
,
742 "ipmi.bootopt04.bootinit_ack.osloader", FT_BOOLEAN
, 8, TFS(&bo04_bootinit_ack_tfs
), 0x02, NULL
, HFILL
}},
743 { &hf_ipmi_chs_bo04_bootinit_ack_bios
,
745 "ipmi.bootopt04.bootinit_ack.bios", FT_BOOLEAN
, 8, TFS(&bo04_bootinit_ack_tfs
), 0x01, NULL
, HFILL
}},
746 { &hf_ipmi_chs_bo05_bootflags_valid
,
747 { "Boot flags valid",
748 "ipmi.bootopt05.boot_flags_valid", FT_BOOLEAN
, 8, NULL
, 0x80, NULL
, HFILL
}},
749 { &hf_ipmi_chs_bo05_permanent
,
751 "ipmi.bootopt05.permanent", FT_BOOLEAN
, 8, TFS(&bo05_permanent_tfs
), 0x40, NULL
, HFILL
}},
752 { &hf_ipmi_chs_bo05_boottype
,
754 "ipmi.bootopt05.boottype", FT_BOOLEAN
, 8, TFS(&bo05_boottype_tfs
), 0x20, NULL
, HFILL
}},
755 { &hf_ipmi_chs_bo05_cmos_clear
,
757 "ipmi.bootopt05.cmos_clear", FT_BOOLEAN
, 8, NULL
, 0x80, NULL
, HFILL
}},
758 { &hf_ipmi_chs_bo05_lock_kbd
,
760 "ipmi.bootopt05.lock_kbd", FT_BOOLEAN
, 8, NULL
, 0x40, NULL
, HFILL
}},
761 { &hf_ipmi_chs_bo05_bootdev
,
762 { "Boot Device Selector",
763 "ipmi.bootopt05.bootdev", FT_UINT8
, BASE_HEX
, VALS(bo05_bootdev_vals
), 0x3c, NULL
, HFILL
}},
764 { &hf_ipmi_chs_bo05_screen_blank
,
766 "ipmi.bootopt05.screen_blank", FT_BOOLEAN
, 8, NULL
, 0x02, NULL
, HFILL
}},
767 { &hf_ipmi_chs_bo05_lockout_reset
,
768 { "Lock out Reset buttons",
769 "ipmi.bootopt05.lockout_reset", FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
770 { &hf_ipmi_chs_bo05_lockout_poweroff
,
771 { "Lock out (power off / sleep request) via Power Button",
772 "ipmi.bootopt05.lockout_poweroff", FT_BOOLEAN
, 8, NULL
, 0x80, NULL
, HFILL
}},
773 { &hf_ipmi_chs_bo05_bios_verbosity
,
775 "ipmi.bootopt05.bios_verbosity", FT_UINT8
, BASE_HEX
, VALS(bo05_bios_verbosity_vals
), 0x60, NULL
, HFILL
}},
776 { &hf_ipmi_chs_bo05_progress_traps
,
777 { "Force Progress Event Traps",
778 "ipmi.bootopt05.progress_traps", FT_BOOLEAN
, 8, NULL
, 0x10, NULL
, HFILL
}},
779 { &hf_ipmi_chs_bo05_pwd_bypass
,
780 { "User password bypass",
781 "ipmi.bootopt05.pwd_bypass", FT_BOOLEAN
, 8, NULL
, 0x08, NULL
, HFILL
}},
782 { &hf_ipmi_chs_bo05_lock_sleep
,
783 { "Lock Out Sleep Button",
784 "ipmi.bootopt05.lock_sleep", FT_BOOLEAN
, 8, NULL
, 0x04, NULL
, HFILL
}},
785 { &hf_ipmi_chs_bo05_console_redirection
,
786 { "Console redirection",
787 "ipmi.bootopt05.console_redirection", FT_UINT8
, BASE_HEX
, VALS(bo05_console_redir_vals
), 0x03, NULL
, HFILL
}},
788 { &hf_ipmi_chs_bo05_bios_shared_override
,
789 { "BIOS Shared Mode Override",
790 "ipmi.bootopt05.bios_shared_override", FT_BOOLEAN
, 8, TFS(&bo05_bios_shared_tfs
), 0x08, NULL
, HFILL
}},
791 { &hf_ipmi_chs_bo05_bios_muxctl_override
,
792 { "BIOS Mux Control Override",
793 "ipmi.bootopt05.bios_muxctl_override", FT_UINT8
, BASE_HEX
, VALS(bo05_bios_muxctl_vals
), 0x07, NULL
, HFILL
}},
794 { &hf_ipmi_chs_bo05_byte5
,
795 { "Data 5 (reserved)",
796 "ipmi.bootopt05.byte5", FT_UINT8
, BASE_HEX
, NULL
, 0, NULL
, HFILL
}},
797 { &hf_ipmi_chs_bo06_chan_num
,
799 "ipmi.bootopt06.chan_num", FT_UINT8
, BASE_CUSTOM
, CF_FUNC(ipmi_fmt_channel
), 0x0f, NULL
, HFILL
}},
800 { &hf_ipmi_chs_bo06_session_id
,
802 "ipmi.bootopt06.session_id", FT_UINT32
, BASE_DEC
, NULL
, 0, NULL
, HFILL
}},
803 { &hf_ipmi_chs_bo06_bootinfo_timestamp
,
804 { "Boot Info Timestamp",
805 "impi.bootopt06.bootinfo_timestamp", FT_UINT32
, BASE_HEX
, NULL
, 0, NULL
, HFILL
}},
806 { &hf_ipmi_chs_bo07_block_selector
,
808 "ipmi.bootopt07.block_selector", FT_UINT8
, BASE_HEX
, NULL
, 0, NULL
, HFILL
}},
809 { &hf_ipmi_chs_bo07_block_data
,
811 "ipmi.bootopt07.block_data", FT_BYTES
, BASE_NONE
, NULL
, 0, NULL
, HFILL
}},
813 { &hf_ipmi_chs_00_capflags_ppi
,
815 "ipmi.ch00.cap.power_interlock", FT_BOOLEAN
, 8, TFS(&tfs_00_provided
), 0x08, NULL
, HFILL
}},
816 { &hf_ipmi_chs_00_capflags_di
,
817 { "Diagnostic Interrupt",
818 "ipmi.ch00.cap.diag_int", FT_BOOLEAN
, 8, TFS(&tfs_00_provided
), 0x04, NULL
, HFILL
}},
819 { &hf_ipmi_chs_00_capflags_fpl
,
820 { "Front Panel Lockout",
821 "ipmi.ch00.cap.fpl", FT_BOOLEAN
, 8, TFS(&tfs_00_provided
), 0x02, NULL
, HFILL
}},
822 { &hf_ipmi_chs_00_capflags_is
,
823 { "Intrusion sensor",
824 "ipmi.ch00.cap.intrusion", FT_BOOLEAN
, 8, TFS(&tfs_00_provided
), 0x01, NULL
, HFILL
}},
825 { &hf_ipmi_chs_00_fru_dev_addr
,
826 { "Chassis FRU Info Device Address",
827 "ipmi.ch00.fru_info", FT_UINT8
, BASE_HEX
, NULL
, 0, NULL
, HFILL
}},
828 { &hf_ipmi_chs_00_sdr_dev_addr
,
829 { "Chassis SDR Device Address",
830 "ipmi.ch00.sdr", FT_UINT8
, BASE_HEX
, NULL
, 0, NULL
, HFILL
}},
831 { &hf_ipmi_chs_00_sel_dev_addr
,
832 { "Chassis SEL Device Address",
833 "ipmi.ch00.sel", FT_UINT8
, BASE_HEX
, NULL
, 0, NULL
, HFILL
}},
834 { &hf_ipmi_chs_00_sm_dev_addr
,
835 { "Chassis System Management Device Address",
836 "ipmi.ch00.sm", FT_UINT8
, BASE_HEX
, NULL
, 0, NULL
, HFILL
}},
837 { &hf_ipmi_chs_00_bridge_dev_addr
,
838 { "Chassis Bridge Device Address",
839 "ipmi.ch00.bridge", FT_UINT8
, BASE_HEX
, NULL
, 0, NULL
, HFILL
}},
841 { &hf_ipmi_chs_01_pwr_state_policy
,
842 { "Power Restore Policy",
843 "ipmi.ch01.cur_pwr.policy", FT_UINT8
, BASE_HEX
, VALS(vals_01_pwr_policy
), 0x60, NULL
, HFILL
}},
844 { &hf_ipmi_chs_01_pwr_state_ctl_fault
,
845 { "Power Control Fault",
846 "ipmi.ch01.cur_pwr.ctl_fault", FT_BOOLEAN
, 8, NULL
, 0x10, NULL
, HFILL
}},
847 { &hf_ipmi_chs_01_pwr_state_fault
,
849 "ipmi.ch01.cur_pwr.fault", FT_BOOLEAN
, 8, NULL
, 0x08, NULL
, HFILL
}},
850 { &hf_ipmi_chs_01_pwr_state_ilock
,
852 "ipmi.ch01.cur_pwr.interlock", FT_BOOLEAN
, 8, NULL
, 0x04, NULL
, HFILL
}},
853 { &hf_ipmi_chs_01_pwr_state_overload
,
855 "ipmi.ch01.cur_pwr.overload", FT_BOOLEAN
, 8, NULL
, 0x02, NULL
, HFILL
}},
856 { &hf_ipmi_chs_01_pwr_state_powered
,
858 "ipmi.ch01.cur_pwr.powered", FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
859 { &hf_ipmi_chs_01_last_event_via_ipmi
,
860 { "Last `Power is on' state was entered via IPMI command",
861 "ipmi.ch01.last.on_via_ipmi", FT_BOOLEAN
, 8, NULL
, 0x10, NULL
, HFILL
}},
862 { &hf_ipmi_chs_01_last_event_down_by_fault
,
863 { "Last power down caused by power fault",
864 "ipmi.ch01.last.down_by_fault", FT_BOOLEAN
, 8, NULL
, 0x08, NULL
, HFILL
}},
865 { &hf_ipmi_chs_01_last_event_interlock
,
866 { "Last power down caused by a power interlock being activated",
867 "ipmi.ch01.last.interlock", FT_BOOLEAN
, 8, NULL
, 0x04, NULL
, HFILL
}},
868 { &hf_ipmi_chs_01_last_event_overload
,
869 { "Last power down caused by a power overload",
870 "ipmi.ch01.last.overload", FT_BOOLEAN
, 8, NULL
, 0x02, NULL
, HFILL
}},
871 { &hf_ipmi_chs_01_last_event_ac_failed
,
873 "ipmi.ch01.last.ac_failed", FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
874 { &hf_ipmi_chs_01_misc_identsupp
,
875 { "Chassis Identify command and state info supported",
876 "ipmi.ch01.identsupp", FT_BOOLEAN
, 8, NULL
, 0x40, NULL
, HFILL
}},
877 { &hf_ipmi_chs_01_misc_identstate
,
878 { "Chassis Identify state (if supported)",
879 "ipmi.ch01.identstate", FT_UINT8
, BASE_HEX
, VALS(vals_01_identstate
), 0x30, NULL
, HFILL
}},
880 { &hf_ipmi_chs_01_misc_fan
,
881 { "Cooling/fan fault detected",
882 "ipmi.ch01.misc.fan", FT_BOOLEAN
, 8, NULL
, 0x08, NULL
, HFILL
}},
883 { &hf_ipmi_chs_01_misc_drive
,
885 "ipmi.ch01.misc.drive", FT_BOOLEAN
, 8, NULL
, 0x04, NULL
, HFILL
}},
886 { &hf_ipmi_chs_01_misc_fpl_active
,
887 { "Front Panel Lockout active",
888 "ipmi.ch01.misc.fpl_active", FT_BOOLEAN
, 8, NULL
, 0x02, NULL
, HFILL
}},
889 { &hf_ipmi_chs_01_misc_intrusion
,
890 { "Chassis intrusion active",
891 "ipmi.ch01.misc.intrusion", FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
892 { &hf_ipmi_chs_01_fpb_standby_allowed
,
893 { "Standby disable allowed",
894 "ipmi.ch01.fpb.standby_allowed", FT_BOOLEAN
, 8, NULL
, 0x80, NULL
, HFILL
}},
895 { &hf_ipmi_chs_01_fpb_diagintr_allowed
,
896 { "Diagnostic interrupt disable allowed",
897 "ipmi.ch01.fpb.diagintr_allowed", FT_BOOLEAN
, 8, NULL
, 0x40, NULL
, HFILL
}},
898 { &hf_ipmi_chs_01_fpb_reset_allowed
,
899 { "Reset disable allowed",
900 "ipmi.ch01.fpb.reset_allowed", FT_BOOLEAN
, 8, NULL
, 0x20, NULL
, HFILL
}},
901 { &hf_ipmi_chs_01_fpb_poweroff_allowed
,
902 { "Poweroff disable allowed",
903 "ipmi.ch01.fpb.poweroff_allowed", FT_BOOLEAN
, 8, NULL
, 0x10, NULL
, HFILL
}},
904 { &hf_ipmi_chs_01_fpb_standby_disabled
,
905 { "Standby disabled",
906 "ipmi.ch01.fpb.standby_disabled", FT_BOOLEAN
, 8, NULL
, 0x08, NULL
, HFILL
}},
907 { &hf_ipmi_chs_01_fpb_diagintr_disabled
,
908 { "Diagnostic interrupt disabled",
909 "ipmi.ch01.fpb.diagintr_disabled", FT_BOOLEAN
, 8, NULL
, 0x04, NULL
, HFILL
}},
910 { &hf_ipmi_chs_01_fpb_reset_disabled
,
912 "ipmi.ch01.fpb.reset_disabled", FT_BOOLEAN
, 8, NULL
, 0x02, NULL
, HFILL
}},
913 { &hf_ipmi_chs_01_fpb_poweroff_disabled
,
914 { "Poweroff disabled",
915 "ipmi.ch01.fpb.poweroff_disabled", FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
917 { &hf_ipmi_chs_02_cctrl
,
919 "ipmi.ch02.chassis_control", FT_UINT8
, BASE_HEX
, VALS(vals_02_cctrl
), 0x0f, NULL
, HFILL
}},
921 { &hf_ipmi_chs_04_ival
,
922 { "Identify Interval in seconds",
923 "ipmi.ch04.interval", FT_UINT8
, BASE_CUSTOM
, CF_FUNC(ipmi_fmt_1s_1based
), 0, NULL
, HFILL
}},
924 { &hf_ipmi_chs_04_perm_on
,
925 { "Turn on Identify indefinitely",
926 "ipmi.ch04.perm_on", FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
928 { &hf_ipmi_chs_05_flags_fpl
,
929 { "Provides Front Panel Lockout",
930 "ipmi.ch05.flags.fpl", FT_BOOLEAN
, 8, NULL
, 0x02, NULL
, HFILL
}},
931 { &hf_ipmi_chs_05_flags_intrusion
,
932 { "Provides intrusion sensor",
933 "ipmi.ch05.flags.intrusion", FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
934 { &hf_ipmi_chs_05_fru_dev_addr
,
935 { "Chassis FRU Info Device Address",
936 "ipmi.ch05.fru_info", FT_UINT8
, BASE_HEX
, NULL
, 0, NULL
, HFILL
}},
937 { &hf_ipmi_chs_05_sdr_dev_addr
,
938 { "Chassis SDR Device Address",
939 "ipmi.ch05.sdr", FT_UINT8
, BASE_HEX
, NULL
, 0, NULL
, HFILL
}},
940 { &hf_ipmi_chs_05_sel_dev_addr
,
941 { "Chassis SEL Device Address",
942 "ipmi.ch05.sel", FT_UINT8
, BASE_HEX
, NULL
, 0, NULL
, HFILL
}},
943 { &hf_ipmi_chs_05_sm_dev_addr
,
944 { "Chassis System Management Device Address",
945 "ipmi.ch05.sm", FT_UINT8
, BASE_HEX
, NULL
, 0, NULL
, HFILL
}},
946 { &hf_ipmi_chs_05_bridge_dev_addr
,
947 { "Chassis Bridge Device Address",
948 "ipmi.ch05.bridge", FT_UINT8
, BASE_HEX
, NULL
, 0, NULL
, HFILL
}},
950 { &hf_ipmi_chs_06_rq_policy
,
951 { "Power Restore Policy",
952 "ipmi.ch06.rq_policy", FT_UINT8
, BASE_HEX
, VALS(vals_06_policy
), 0x07, NULL
, HFILL
}},
953 { &hf_ipmi_chs_06_rs_policy_support_powerup
,
954 { "Always powering up",
955 "ipmi.ch06.rs_support.powerup", FT_BOOLEAN
, 8, TFS(&tfs_06_supported
), 0x04, NULL
, HFILL
}},
956 { &hf_ipmi_chs_06_rs_policy_support_restore
,
957 { "Restoring previous state",
958 "ipmi.ch06.rs_support.restore", FT_BOOLEAN
, 8, TFS(&tfs_06_supported
), 0x02, NULL
, HFILL
}},
959 { &hf_ipmi_chs_06_rs_policy_support_poweroff
,
960 { "Staying powered off",
961 "ipmi.ch06.rs_support.poweroff", FT_BOOLEAN
, 8, TFS(&tfs_06_supported
), 0x01, NULL
, HFILL
}},
963 { &hf_ipmi_chs_07_cause
,
965 "ipmi.ch07.cause", FT_UINT8
, BASE_HEX
, VALS(vals_07_cause
), 0x0f, NULL
, HFILL
}},
966 { &hf_ipmi_chs_07_chan
,
968 "ipmi.ch07.chan", FT_UINT8
, BASE_CUSTOM
, CF_FUNC(ipmi_fmt_channel
), 0, NULL
, HFILL
}},
970 { &hf_ipmi_chs_08_valid
,
972 "ipmi.ch08.valid", FT_BOOLEAN
, 8, TFS(&tfs_08_valid
), 0x80, NULL
, HFILL
}},
973 { &hf_ipmi_chs_08_selector
,
974 { "Boot option parameter selector",
975 "ipmi.ch08.selector", FT_UINT8
, BASE_HEX
, NULL
, 0x7f, NULL
, HFILL
}},
976 { &hf_ipmi_chs_08_data
,
977 { "Boot option parameter data",
978 "ipmi.ch08.data", FT_NONE
, BASE_NONE
, NULL
, 0, NULL
, HFILL
}},
980 { &hf_ipmi_chs_09_rq_param_select
,
981 { "Parameter selector",
982 "ipmi.ch09.rq_param_select", FT_UINT8
, BASE_HEX
, NULL
, 0x7f, NULL
, HFILL
}},
983 { &hf_ipmi_chs_09_rq_set_select
,
985 "ipmi.ch09.rq_set_select", FT_UINT8
, BASE_HEX
, NULL
, 0, NULL
, HFILL
}},
986 { &hf_ipmi_chs_09_rq_block_select
,
988 "ipmi.ch09.rq_block_select", FT_UINT8
, BASE_HEX
, NULL
, 0, NULL
, HFILL
}},
989 { &hf_ipmi_chs_09_rs_param_version
,
990 { "Parameter Version",
991 "ipmi.ch09.rs_param_version", FT_UINT8
, BASE_HEX
, NULL
, 0x0f, NULL
, HFILL
}},
992 { &hf_ipmi_chs_09_rs_valid
,
994 "ipmi.ch09.rs_valid", FT_BOOLEAN
, 8, TFS(&tfs_09_valid
), 0x80, NULL
, HFILL
}},
995 { &hf_ipmi_chs_09_rs_param_select
,
996 { "Parameter Selector",
997 "ipmi.ch09.rs_param_select", FT_UINT8
, BASE_HEX
, NULL
, 0x7f, NULL
, HFILL
}},
998 { &hf_ipmi_chs_09_rs_param_data
,
999 { "Configuration parameter data",
1000 "ipmi.ch09.rs_param_data", FT_BYTES
, BASE_NONE
, NULL
, 0, NULL
, HFILL
}},
1002 { &hf_ipmi_chs_0f_minpercnt
,
1003 { "Minutes per count",
1004 "ipmi.ch0f.minpercnt", FT_UINT8
, BASE_DEC
, NULL
, 0, NULL
, HFILL
}},
1005 { &hf_ipmi_chs_0f_counter
,
1006 { "Counter reading",
1007 "ipmi.ch0f.counter", FT_UINT32
, BASE_DEC
, NULL
, 0, NULL
, HFILL
}},
1010 static int *ett
[] = {
1011 &ett_ipmi_chs_bo00_byte1
,
1012 &ett_ipmi_chs_bo02_byte1
,
1013 &ett_ipmi_chs_bo03_byte1
,
1014 &ett_ipmi_chs_bo04_byte2
,
1015 &ett_ipmi_chs_bo05_byte1
,
1016 &ett_ipmi_chs_bo05_byte2
,
1017 &ett_ipmi_chs_bo05_byte3
,
1018 &ett_ipmi_chs_bo05_byte4
,
1019 &ett_ipmi_chs_bo06_byte1
,
1020 &ett_ipmi_chs_00_capflags
,
1021 &ett_ipmi_chs_01_pwr_state
,
1022 &ett_ipmi_chs_01_last_event
,
1023 &ett_ipmi_chs_01_misc
,
1024 &ett_ipmi_chs_01_fpb
,
1025 &ett_ipmi_chs_02_byte1
,
1026 &ett_ipmi_chs_04_byte2
,
1027 &ett_ipmi_chs_05_flags
,
1028 &ett_ipmi_chs_06_byte1
,
1029 &ett_ipmi_chs_06_policy_support
,
1030 &ett_ipmi_chs_07_byte1
,
1031 &ett_ipmi_chs_08_byte1
,
1032 &ett_ipmi_chs_09_rq_byte1
,
1033 &ett_ipmi_chs_09_rs_byte1
,
1034 &ett_ipmi_chs_09_rs_byte2
,
1037 proto_register_field_array(proto_ipmi
, hf
, array_length(hf
));
1038 proto_register_subtree_array(ett
, array_length(ett
));
1039 ipmi_register_netfn_cmdtab(IPMI_CHASSIS_REQ
, IPMI_OEM_NONE
, NULL
, 0, NULL
,
1040 cmd_chassis
, array_length(cmd_chassis
));
1045 * Editor modelines - https://www.wireshark.org/tools/modelines.html
1050 * indent-tabs-mode: t
1053 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
1054 * :indentSize=8:tabSize=8:noTabs=false: