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>
7 * Wireshark - Network traffic analyzer
8 * By Gerald Combs <gerald@wireshark.org>
9 * Copyright 1998 Gerald Combs
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version 2
14 * of the License, or (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
28 #include <epan/packet.h>
30 #include "packet-ipmi.h"
34 static gint ett_ipmi_chs_bo00_byte1
= -1;
35 static gint ett_ipmi_chs_bo02_byte1
= -1;
36 static gint ett_ipmi_chs_bo03_byte1
= -1;
37 static gint ett_ipmi_chs_bo04_byte2
= -1;
38 static gint ett_ipmi_chs_bo05_byte1
= -1;
39 static gint ett_ipmi_chs_bo05_byte2
= -1;
40 static gint ett_ipmi_chs_bo05_byte3
= -1;
41 static gint ett_ipmi_chs_bo05_byte4
= -1;
42 static gint ett_ipmi_chs_bo06_byte1
= -1;
44 static gint ett_ipmi_chs_00_capflags
= -1;
45 static gint ett_ipmi_chs_01_pwr_state
= -1;
46 static gint ett_ipmi_chs_01_last_event
= -1;
47 static gint ett_ipmi_chs_01_misc
= -1;
48 static gint ett_ipmi_chs_01_fpb
= -1;
49 static gint ett_ipmi_chs_02_byte1
= -1;
50 static gint ett_ipmi_chs_04_byte2
= -1;
51 static gint ett_ipmi_chs_05_flags
= -1;
52 static gint ett_ipmi_chs_06_byte1
= -1;
53 static gint ett_ipmi_chs_06_policy_support
= -1;
54 static gint ett_ipmi_chs_07_byte1
= -1;
55 static gint ett_ipmi_chs_08_byte1
= -1;
56 static gint ett_ipmi_chs_09_rq_byte1
= -1;
57 static gint ett_ipmi_chs_09_rs_byte1
= -1;
58 static gint ett_ipmi_chs_09_rs_byte2
= -1;
60 static gint hf_ipmi_chs_bo00_sip
= -1;
61 static gint hf_ipmi_chs_bo01_spsel
= -1;
62 static gint hf_ipmi_chs_bo02_request
= -1;
63 static gint hf_ipmi_chs_bo02_discovered
= -1;
64 static gint hf_ipmi_chs_bo03_pef
= -1;
65 static gint hf_ipmi_chs_bo03_cctrl_timeout
= -1;
66 static gint hf_ipmi_chs_bo03_wd_timeout
= -1;
67 static gint hf_ipmi_chs_bo03_softreset
= -1;
68 static gint hf_ipmi_chs_bo03_powerup
= -1;
69 static gint hf_ipmi_chs_bo04_write_mask
= -1;
70 static gint hf_ipmi_chs_bo04_bootinit_ack_oem
= -1;
71 static gint hf_ipmi_chs_bo04_bootinit_ack_sms
= -1;
72 static gint hf_ipmi_chs_bo04_bootinit_ack_os
= -1;
73 static gint hf_ipmi_chs_bo04_bootinit_ack_osloader
= -1;
74 static gint hf_ipmi_chs_bo04_bootinit_ack_bios
= -1;
75 static gint hf_ipmi_chs_bo05_bootflags_valid
= -1;
76 static gint hf_ipmi_chs_bo05_permanent
= -1;
77 static gint hf_ipmi_chs_bo05_boottype
= -1;
78 static gint hf_ipmi_chs_bo05_cmos_clear
= -1;
79 static gint hf_ipmi_chs_bo05_lock_kbd
= -1;
80 static gint hf_ipmi_chs_bo05_bootdev
= -1;
81 static gint hf_ipmi_chs_bo05_screen_blank
= -1;
82 static gint hf_ipmi_chs_bo05_lockout_reset
= -1;
83 static gint hf_ipmi_chs_bo05_lockout_poweroff
= -1;
84 static gint hf_ipmi_chs_bo05_bios_verbosity
= -1;
85 static gint hf_ipmi_chs_bo05_progress_traps
= -1;
86 static gint hf_ipmi_chs_bo05_pwd_bypass
= -1;
87 static gint hf_ipmi_chs_bo05_lock_sleep
= -1;
88 static gint hf_ipmi_chs_bo05_console_redirection
= -1;
89 static gint hf_ipmi_chs_bo05_bios_shared_override
= -1;
90 static gint hf_ipmi_chs_bo05_bios_muxctl_override
= -1;
91 static gint hf_ipmi_chs_bo05_byte5
= -1;
92 static gint hf_ipmi_chs_bo06_chan_num
= -1;
93 static gint hf_ipmi_chs_bo06_session_id
= -1;
94 static gint hf_ipmi_chs_bo06_bootinfo_timestamp
= -1;
95 static gint hf_ipmi_chs_bo07_block_selector
= -1;
96 static gint hf_ipmi_chs_bo07_block_data
= -1;
98 static gint hf_ipmi_chs_00_capflags_ppi
= -1;
99 static gint hf_ipmi_chs_00_capflags_di
= -1;
100 static gint hf_ipmi_chs_00_capflags_fpl
= -1;
101 static gint hf_ipmi_chs_00_capflags_is
= -1;
102 static gint hf_ipmi_chs_00_fru_dev_addr
= -1;
103 static gint hf_ipmi_chs_00_sdr_dev_addr
= -1;
104 static gint hf_ipmi_chs_00_sel_dev_addr
= -1;
105 static gint hf_ipmi_chs_00_sm_dev_addr
= -1;
106 static gint hf_ipmi_chs_00_bridge_dev_addr
= -1;
108 static gint hf_ipmi_chs_01_pwr_state_policy
= -1;
109 static gint hf_ipmi_chs_01_pwr_state_ctl_fault
= -1;
110 static gint hf_ipmi_chs_01_pwr_state_fault
= -1;
111 static gint hf_ipmi_chs_01_pwr_state_ilock
= -1;
112 static gint hf_ipmi_chs_01_pwr_state_overload
= -1;
113 static gint hf_ipmi_chs_01_pwr_state_powered
= -1;
114 static gint hf_ipmi_chs_01_last_event_via_ipmi
= -1;
115 static gint hf_ipmi_chs_01_last_event_down_by_fault
= -1;
116 static gint hf_ipmi_chs_01_last_event_interlock
= -1;
117 static gint hf_ipmi_chs_01_last_event_overload
= -1;
118 static gint hf_ipmi_chs_01_last_event_ac_failed
= -1;
119 static gint hf_ipmi_chs_01_misc_identsupp
= -1;
120 static gint hf_ipmi_chs_01_misc_identstate
= -1;
121 static gint hf_ipmi_chs_01_misc_fan
= -1;
122 static gint hf_ipmi_chs_01_misc_drive
= -1;
123 static gint hf_ipmi_chs_01_misc_fpl_active
= -1;
124 static gint hf_ipmi_chs_01_misc_intrusion
= -1;
125 static gint hf_ipmi_chs_01_fpb_standby_allowed
= -1;
126 static gint hf_ipmi_chs_01_fpb_diagintr_allowed
= -1;
127 static gint hf_ipmi_chs_01_fpb_reset_allowed
= -1;
128 static gint hf_ipmi_chs_01_fpb_poweroff_allowed
= -1;
129 static gint hf_ipmi_chs_01_fpb_standby_disabled
= -1;
130 static gint hf_ipmi_chs_01_fpb_diagintr_disabled
= -1;
131 static gint hf_ipmi_chs_01_fpb_reset_disabled
= -1;
132 static gint hf_ipmi_chs_01_fpb_poweroff_disabled
= -1;
134 static gint hf_ipmi_chs_02_cctrl
= -1;
136 static gint hf_ipmi_chs_04_ival
= -1;
137 static gint hf_ipmi_chs_04_perm_on
= -1;
139 static gint hf_ipmi_chs_05_flags_fpl
= -1;
140 static gint hf_ipmi_chs_05_flags_intrusion
= -1;
141 static gint hf_ipmi_chs_05_fru_dev_addr
= -1;
142 static gint hf_ipmi_chs_05_sdr_dev_addr
= -1;
143 static gint hf_ipmi_chs_05_sel_dev_addr
= -1;
144 static gint hf_ipmi_chs_05_sm_dev_addr
= -1;
145 static gint hf_ipmi_chs_05_bridge_dev_addr
= -1;
147 static gint hf_ipmi_chs_06_rq_policy
= -1;
148 static gint hf_ipmi_chs_06_rs_policy_support_powerup
= -1;
149 static gint hf_ipmi_chs_06_rs_policy_support_restore
= -1;
150 static gint hf_ipmi_chs_06_rs_policy_support_poweroff
= -1;
152 static gint hf_ipmi_chs_07_cause
= -1;
153 static gint hf_ipmi_chs_07_chan
= -1;
155 static gint hf_ipmi_chs_08_valid
= -1;
156 static gint hf_ipmi_chs_08_selector
= -1;
157 static gint hf_ipmi_chs_08_data
= -1;
159 static gint hf_ipmi_chs_09_rq_param_select
= -1;
160 static gint hf_ipmi_chs_09_rq_set_select
= -1;
161 static gint hf_ipmi_chs_09_rq_block_select
= -1;
162 static gint hf_ipmi_chs_09_rs_param_version
= -1;
163 static gint hf_ipmi_chs_09_rs_valid
= -1;
164 static gint hf_ipmi_chs_09_rs_param_select
= -1;
165 static gint hf_ipmi_chs_09_rs_param_data
= -1;
167 static gint hf_ipmi_chs_0f_minpercnt
= -1;
168 static gint hf_ipmi_chs_0f_counter
= -1;
170 static const struct true_false_string tfs_00_provided
= { "Provided", "Not Provided" };
172 static const value_string vals_01_pwr_policy
[] = {
173 { 0x00, "chassis stays powered off after AC returns" },
174 { 0x01, "after AC returns, power is restored to the state that was in effect when AC was lost" },
175 { 0x02, "chassis always powers up after AC returns" },
180 static const value_string vals_01_identstate
[] = {
182 { 0x01, "Temporary (timed) On" },
187 static const value_string vals_02_cctrl
[] = {
188 { 0x00, "Power down" },
189 { 0x01, "Power up" },
190 { 0x02, "Power cycle" },
191 { 0x03, "Hard reset" },
192 { 0x04, "Pulse Diagnostic Interrupt" },
193 { 0x05, "Initiate a soft-shutdown of OS via ACPI by emulating a fatal overtemperature" },
197 static const value_string vals_06_policy
[] = {
198 { 0x00, "Chassis always stays powered off after AC/mains is applied" },
199 { 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" },
200 { 0x02, "Chassis always powers up after AC/mains is applied or returns" },
201 { 0x03, "No change (just get policy support)" },
202 { 0x04, "Reserved" },
203 { 0x05, "Reserved" },
204 { 0x06, "Reserved" },
205 { 0x07, "Reserved" },
209 static const struct true_false_string tfs_06_supported
= { "Supported", "Not supported" };
211 static const value_string vals_07_cause
[] = {
213 { 0x01, "Chassis Control command" },
214 { 0x02, "Reset via pushbutton" },
215 { 0x03, "Power-up via pushbutton" },
216 { 0x04, "Watchdog expiration" },
218 { 0x06, "Automatic power-up on AC being applied due to 'always restore' power restore policy" },
219 { 0x07, "Automatic power-up on AC being applied due to 'restore previous power state' power restore policy" },
220 { 0x08, "Reset via PEF" },
221 { 0x09, "Power-cycle via PEF" },
222 { 0x0a, "Soft reset" },
223 { 0x0b, "Power-up via RTC wakeup" },
224 { 0x0c, "Reserved" },
225 { 0x0d, "Reserved" },
226 { 0x0e, "Reserved" },
227 { 0x0f, "Reserved" },
231 static const value_string bo00_sip_vals
[] = {
232 { 0x00, "Set complete" },
233 { 0x01, "Set in progress" },
234 { 0x02, "Commit write" },
235 { 0x03, "Reserved" },
239 static const struct true_false_string tfs_08_valid
= {
240 "Mark parameter invalid/locked",
241 "Mark parameter valid/unlocked"
244 static const struct true_false_string bo03_dontclear_tfs
= {
249 static const struct true_false_string bo04_bootinit_ack_tfs
= {
250 "has handled boot info",
251 "hasn't handled boot info"
254 static const struct true_false_string bo05_permanent_tfs
= {
255 "options requested to be persistent for all future boots",
256 "options apply to next boot only"
259 static const struct true_false_string bo05_boottype_tfs
= {
260 "Extensible Firmware Interface Boot (EFI)",
261 "'PC compatible' boot (legacy)"
264 static const value_string bo05_bootdev_vals
[] = {
265 { 0x00, "No override" },
266 { 0x01, "Force PXE" },
267 { 0x02, "Force boot from default Hard-drive" },
268 { 0x03, "Force boot from default Hard-drive, request Safe Mode" },
269 { 0x04, "Force boot from default Diagnostic Partition" },
270 { 0x05, "Force boot from default CD/DVD" },
271 { 0x06, "Force boot into BIOS Setup" },
272 { 0x07, "Reserved" },
273 { 0x08, "Reserved" },
274 { 0x09, "Reserved" },
275 { 0x0a, "Reserved" },
276 { 0x0b, "Reserved" },
277 { 0x0c, "Reserved" },
278 { 0x0d, "Reserved" },
279 { 0x0e, "Reserved" },
280 { 0x0f, "Force boot from floppy/primary removable media" },
284 static const value_string bo05_bios_verbosity_vals
[] = {
285 { 0x00, "System default" },
286 { 0x01, "Request quiet display" },
287 { 0x02, "Request verbose display" },
288 { 0x03, "Reserved" },
292 static const value_string bo05_console_redir_vals
[] = {
293 { 0x00, "Console redirection occurs per BIOS configuration setting" },
294 { 0x01, "Suppress (skip) console redirection" },
295 { 0x02, "Request console redirection be enabled" },
296 { 0x03, "Reserved" },
300 static const struct true_false_string bo05_bios_shared_tfs
= {
301 "Request BIOS to temporarily set the access mode for the channel specified in parameter #6 to 'Shared'",
302 "No request to BIOS to change present access mode setting"
305 static const value_string bo05_bios_muxctl_vals
[] = {
306 { 0x00, "BIOS uses recommended setting of the mux at the end of POST" },
307 { 0x01, "Requests BIOS to force mux to BMC at conclusion of POST/start of OS boot" },
308 { 0x02, "Requests BIOS to force mux to system at conclusion of POST/start of OSboot" },
309 { 0x03, "Reserved" },
310 { 0x04, "Reserved" },
311 { 0x05, "Reserved" },
312 { 0x06, "Reserved" },
313 { 0x07, "Reserved" },
317 static const struct true_false_string tfs_09_valid
= {
318 "Parameter marked invalid / locked",
319 "Parameter marked valid / unlocked"
322 /* Boot options - common for Get/Set Boot Options commands
325 bootopt_00(tvbuff_t
*tvb
, proto_tree
*tree
)
327 static const int *byte1
[] = { &hf_ipmi_chs_bo00_sip
, NULL
};
329 proto_tree_add_bitmask_text(tree
, tvb
, 0, 1, NULL
, NULL
, ett_ipmi_chs_bo00_byte1
, byte1
,
330 ENC_LITTLE_ENDIAN
, 0);
334 bootopt_01(tvbuff_t
*tvb
, proto_tree
*tree
)
336 proto_tree_add_item(tree
, hf_ipmi_chs_bo01_spsel
, tvb
, 0, 1, ENC_LITTLE_ENDIAN
);
340 bootopt_02(tvbuff_t
*tvb
, proto_tree
*tree
)
342 static const int *byte1
[] = { &hf_ipmi_chs_bo02_request
, &hf_ipmi_chs_bo02_discovered
, NULL
};
344 proto_tree_add_bitmask_text(tree
, tvb
, 0, 1, "Service partition scan: ",
345 "Not discovered", ett_ipmi_chs_bo02_byte1
, byte1
, ENC_LITTLE_ENDIAN
, 0);
349 bootopt_03(tvbuff_t
*tvb
, proto_tree
*tree
)
351 static const int *byte1
[] = { &hf_ipmi_chs_bo03_pef
, &hf_ipmi_chs_bo03_cctrl_timeout
,
352 &hf_ipmi_chs_bo03_wd_timeout
, &hf_ipmi_chs_bo03_softreset
, &hf_ipmi_chs_bo03_powerup
, NULL
};
354 proto_tree_add_bitmask_text(tree
, tvb
, 0, 1, "BMC boot flag valid, don't clear on: ",
355 "None", ett_ipmi_chs_bo03_byte1
, byte1
, ENC_LITTLE_ENDIAN
, BMT_NO_TFS
);
359 bootopt_04(tvbuff_t
*tvb
, proto_tree
*tree
)
361 static const int *byte2
[] = { &hf_ipmi_chs_bo04_bootinit_ack_oem
, &hf_ipmi_chs_bo04_bootinit_ack_sms
,
362 &hf_ipmi_chs_bo04_bootinit_ack_os
, &hf_ipmi_chs_bo04_bootinit_ack_osloader
,
363 &hf_ipmi_chs_bo04_bootinit_ack_bios
, NULL
};
365 proto_tree_add_item(tree
, hf_ipmi_chs_bo04_write_mask
, tvb
, 0, 1, ENC_LITTLE_ENDIAN
);
366 proto_tree_add_bitmask_text(tree
, tvb
, 1, 1, "Boot Initiator Acknowledge data: ",
367 "None", ett_ipmi_chs_bo04_byte2
, byte2
, ENC_LITTLE_ENDIAN
, BMT_NO_TFS
);
371 bootopt_05(tvbuff_t
*tvb
, proto_tree
*tree
)
373 static const int *byte1
[] = { &hf_ipmi_chs_bo05_bootflags_valid
,
374 &hf_ipmi_chs_bo05_permanent
, &hf_ipmi_chs_bo05_boottype
, NULL
};
375 static const int *byte2
[] = { &hf_ipmi_chs_bo05_cmos_clear
, &hf_ipmi_chs_bo05_lock_kbd
,
376 &hf_ipmi_chs_bo05_bootdev
, &hf_ipmi_chs_bo05_screen_blank
, &hf_ipmi_chs_bo05_lockout_reset
, NULL
};
377 static const int *byte3
[] = { &hf_ipmi_chs_bo05_lockout_poweroff
, &hf_ipmi_chs_bo05_bios_verbosity
,
378 &hf_ipmi_chs_bo05_progress_traps
, &hf_ipmi_chs_bo05_pwd_bypass
, &hf_ipmi_chs_bo05_lock_sleep
,
379 &hf_ipmi_chs_bo05_console_redirection
, NULL
};
380 static const int *byte4
[] = { &hf_ipmi_chs_bo05_bios_shared_override
,
381 &hf_ipmi_chs_bo05_bios_muxctl_override
, NULL
};
383 proto_tree_add_bitmask_text(tree
, tvb
, 0, 1, NULL
, NULL
, ett_ipmi_chs_bo05_byte1
,
384 byte1
, ENC_LITTLE_ENDIAN
, 0);
385 proto_tree_add_bitmask_text(tree
, tvb
, 1, 1, NULL
, NULL
, ett_ipmi_chs_bo05_byte2
,
386 byte2
, ENC_LITTLE_ENDIAN
, 0);
387 proto_tree_add_bitmask_text(tree
, tvb
, 2, 1, NULL
, NULL
, ett_ipmi_chs_bo05_byte3
,
388 byte3
, ENC_LITTLE_ENDIAN
, 0);
389 proto_tree_add_bitmask_text(tree
, tvb
, 3, 1, NULL
, NULL
, ett_ipmi_chs_bo05_byte4
,
390 byte4
, ENC_LITTLE_ENDIAN
, 0);
391 proto_tree_add_item(tree
, hf_ipmi_chs_bo05_byte5
, tvb
, 4, 1, ENC_LITTLE_ENDIAN
);
395 bootopt_06(tvbuff_t
*tvb
, proto_tree
*tree
)
397 static const int *byte1
[] = { &hf_ipmi_chs_bo06_chan_num
, NULL
};
399 proto_tree_add_bitmask_text(tree
, tvb
, 0, 1, NULL
, NULL
,
400 ett_ipmi_chs_bo06_byte1
, byte1
, ENC_LITTLE_ENDIAN
, 0);
401 proto_tree_add_item(tree
, hf_ipmi_chs_bo06_session_id
, tvb
, 1, 4, ENC_LITTLE_ENDIAN
);
402 ipmi_add_timestamp(tree
, hf_ipmi_chs_bo06_bootinfo_timestamp
, tvb
, 5);
406 bootopt_07(tvbuff_t
*tvb
, proto_tree
*tree
)
408 proto_tree_add_item(tree
, hf_ipmi_chs_bo07_block_selector
, tvb
, 0, 1, ENC_LITTLE_ENDIAN
);
409 proto_tree_add_item(tree
, hf_ipmi_chs_bo07_block_data
, tvb
, 1, tvb_length(tvb
) - 1, ENC_NA
);
414 void (*intrp
)(tvbuff_t
*tvb
, proto_tree
*tree
);
417 { bootopt_00
, "Set In Progress" },
418 { bootopt_01
, "Service Partition Selector" },
419 { bootopt_02
, "Service Partition Scan" },
420 { bootopt_03
, "BMC boot flag valid bit clearing" },
421 { bootopt_04
, "Boot info acknowledge" },
422 { bootopt_05
, "Boot flags" },
423 { bootopt_06
, "Boot initiator info" },
424 { bootopt_07
, "Boot initiator mailbox" }
428 /* Get Chassis Capabilities (response)
431 rs00(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
433 static const int *byte1
[] = { &hf_ipmi_chs_00_capflags_ppi
, &hf_ipmi_chs_00_capflags_di
,
434 &hf_ipmi_chs_00_capflags_fpl
, &hf_ipmi_chs_00_capflags_is
, NULL
};
436 proto_tree_add_bitmask_text(tree
, tvb
, 0, 1, "Capabilities: ", "None",
437 ett_ipmi_chs_00_capflags
, byte1
, ENC_LITTLE_ENDIAN
, BMT_NO_TFS
);
438 proto_tree_add_item(tree
, hf_ipmi_chs_00_fru_dev_addr
, tvb
, 1, 1, ENC_LITTLE_ENDIAN
);
439 proto_tree_add_item(tree
, hf_ipmi_chs_00_sdr_dev_addr
, tvb
, 2, 1, ENC_LITTLE_ENDIAN
);
440 proto_tree_add_item(tree
, hf_ipmi_chs_00_sel_dev_addr
, tvb
, 3, 1, ENC_LITTLE_ENDIAN
);
441 proto_tree_add_item(tree
, hf_ipmi_chs_00_sm_dev_addr
, tvb
, 4, 1, ENC_LITTLE_ENDIAN
);
443 if (tvb_length(tvb
) >= 5) {
444 proto_tree_add_item(tree
, hf_ipmi_chs_00_bridge_dev_addr
, tvb
, 5, 1, ENC_LITTLE_ENDIAN
);
448 /* Get Chassis Status.
451 rs01(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
453 static const int *byte1
[] = { &hf_ipmi_chs_01_pwr_state_policy
,
454 &hf_ipmi_chs_01_pwr_state_ctl_fault
, &hf_ipmi_chs_01_pwr_state_fault
,
455 &hf_ipmi_chs_01_pwr_state_ilock
, &hf_ipmi_chs_01_pwr_state_overload
,
456 &hf_ipmi_chs_01_pwr_state_powered
, NULL
};
457 static const int *byte2
[] = { &hf_ipmi_chs_01_last_event_via_ipmi
,
458 &hf_ipmi_chs_01_last_event_down_by_fault
, &hf_ipmi_chs_01_last_event_interlock
,
459 &hf_ipmi_chs_01_last_event_overload
, &hf_ipmi_chs_01_last_event_ac_failed
, NULL
};
460 static const int *byte3
[] = { &hf_ipmi_chs_01_misc_identsupp
, &hf_ipmi_chs_01_misc_identstate
,
461 &hf_ipmi_chs_01_misc_fan
, &hf_ipmi_chs_01_misc_drive
, &hf_ipmi_chs_01_misc_fpl_active
,
462 &hf_ipmi_chs_01_misc_intrusion
, NULL
};
463 static const int *byte4
[] = { &hf_ipmi_chs_01_fpb_standby_allowed
,
464 &hf_ipmi_chs_01_fpb_diagintr_allowed
, &hf_ipmi_chs_01_fpb_reset_allowed
,
465 &hf_ipmi_chs_01_fpb_poweroff_allowed
, &hf_ipmi_chs_01_fpb_standby_disabled
,
466 &hf_ipmi_chs_01_fpb_diagintr_disabled
, &hf_ipmi_chs_01_fpb_reset_disabled
,
467 &hf_ipmi_chs_01_fpb_poweroff_disabled
, NULL
};
469 proto_tree_add_bitmask_text(tree
, tvb
, 0, 1, "Current Power State: ", NULL
,
470 ett_ipmi_chs_01_pwr_state
, byte1
, ENC_LITTLE_ENDIAN
, 0);
471 proto_tree_add_bitmask_text(tree
, tvb
, 1, 1, "Last Power Event: ", NULL
,
472 ett_ipmi_chs_01_last_event
, byte2
, ENC_LITTLE_ENDIAN
, 0);
473 proto_tree_add_bitmask_text(tree
, tvb
, 2, 1, "Misc. State: ", NULL
,
474 ett_ipmi_chs_01_misc
, byte3
, ENC_LITTLE_ENDIAN
, 0);
475 if (tvb_length(tvb
) > 3) {
476 proto_tree_add_bitmask_text(tree
, tvb
, 3, 1, "Front panel buttons capabilities: ",
477 NULL
, ett_ipmi_chs_01_fpb
, byte4
, ENC_LITTLE_ENDIAN
, BMT_NO_TFS
);
484 rq02(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
486 static const int *byte1
[] = { &hf_ipmi_chs_02_cctrl
, NULL
};
488 proto_tree_add_bitmask_text(tree
, tvb
, 0, 1, NULL
, NULL
,
489 ett_ipmi_chs_02_byte1
, byte1
, ENC_LITTLE_ENDIAN
, 0);
495 rq04(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
497 static const int *byte2
[] = { &hf_ipmi_chs_04_perm_on
, NULL
};
499 if (tvb_length(tvb
) > 0) {
500 proto_tree_add_item(tree
, hf_ipmi_chs_04_ival
, tvb
, 0, 1, ENC_LITTLE_ENDIAN
);
503 if (tvb_length(tvb
) > 1) {
504 proto_tree_add_bitmask_text(tree
, tvb
, 1, 1, "Flags: ", "None",
505 ett_ipmi_chs_04_byte2
, byte2
, ENC_LITTLE_ENDIAN
, 0);
509 /* Set Chassis Capabilities.
512 rq05(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
514 static const int *byte1
[] = { &hf_ipmi_chs_05_flags_fpl
, &hf_ipmi_chs_05_flags_intrusion
, NULL
};
516 proto_tree_add_bitmask_text(tree
, tvb
, 0, 1, "Capabilities: ", "None",
517 ett_ipmi_chs_05_flags
, byte1
, ENC_LITTLE_ENDIAN
, 0);
518 proto_tree_add_item(tree
, hf_ipmi_chs_05_fru_dev_addr
, tvb
, 1, 1, ENC_LITTLE_ENDIAN
);
519 proto_tree_add_item(tree
, hf_ipmi_chs_05_sdr_dev_addr
, tvb
, 2, 1, ENC_LITTLE_ENDIAN
);
520 proto_tree_add_item(tree
, hf_ipmi_chs_05_sel_dev_addr
, tvb
, 3, 1, ENC_LITTLE_ENDIAN
);
521 proto_tree_add_item(tree
, hf_ipmi_chs_05_sm_dev_addr
, tvb
, 4, 1, ENC_LITTLE_ENDIAN
);
522 if (tvb_length(tvb
) > 5) {
523 /* Bridge device address is optional */
524 proto_tree_add_item(tree
, hf_ipmi_chs_05_bridge_dev_addr
, tvb
, 5, 1, ENC_LITTLE_ENDIAN
);
528 /* Set Power Restore Policy
531 rq06(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
533 static const int *byte1
[] = { &hf_ipmi_chs_06_rq_policy
, NULL
};
535 proto_tree_add_bitmask_text(tree
, tvb
, 0, 1, NULL
, NULL
,
536 ett_ipmi_chs_06_byte1
, byte1
, ENC_LITTLE_ENDIAN
, 0);
539 /* Get Power Restore Policy
542 rs06(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
544 static const int *byte1
[] = { &hf_ipmi_chs_06_rs_policy_support_powerup
,
545 &hf_ipmi_chs_06_rs_policy_support_restore
, &hf_ipmi_chs_06_rs_policy_support_poweroff
, NULL
};
547 proto_tree_add_bitmask_text(tree
, tvb
, 0, 1, "Power Restore Policy support: ", "None",
548 ett_ipmi_chs_06_policy_support
, byte1
, ENC_LITTLE_ENDIAN
, BMT_NO_TFS
);
551 /* Get System Restart Cause
554 rs07(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
556 static const int *byte1
[] = { &hf_ipmi_chs_07_cause
, NULL
};
558 proto_tree_add_bitmask_text(tree
, tvb
, 0, 1, NULL
, NULL
,
559 ett_ipmi_chs_07_byte1
, byte1
, ENC_LITTLE_ENDIAN
, 0);
560 proto_tree_add_item(tree
, hf_ipmi_chs_07_chan
, tvb
, 1, 1, ENC_LITTLE_ENDIAN
);
563 /* Set System Boot Options
566 rq08(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
574 pno
= tvb_get_guint8(tvb
, 0) & 0x7f;
575 if (pno
< array_length(boot_options
)) {
576 desc
= boot_options
[pno
].name
;
577 } else if (pno
>= 96 && pno
<= 127) {
583 ti
= proto_tree_add_text(tree
, tvb
, 0, 1,
584 "Boot option parameter selector: %s (0x%02x)",
586 s_tree
= proto_item_add_subtree(ti
, ett_ipmi_chs_08_byte1
);
587 proto_tree_add_item(s_tree
, hf_ipmi_chs_08_valid
, tvb
, 0, 1, ENC_LITTLE_ENDIAN
);
588 proto_tree_add_uint_format(s_tree
, hf_ipmi_chs_08_selector
, tvb
, 0, 1,
589 pno
, "%sBoot option parameter selector: %s (0x%02x)",
590 ipmi_dcd8(pno
, 0x7f), desc
, pno
);
592 /* Data is optional; no data means 'just set validity' */
593 if (tvb_length(tvb
) > 1) {
594 if (pno
< array_length(boot_options
)) {
595 sub
= tvb_new_subset(tvb
, 1, tvb_length(tvb
) - 1, tvb_length(tvb
) - 1);
596 boot_options
[pno
].intrp(sub
, tree
);
598 proto_tree_add_none_format(tree
, hf_ipmi_chs_08_data
, tvb
, 1,
599 tvb_length(tvb
) - 1, "Parameter data: %s", desc
);
604 static const value_string cc08
[] = {
605 { 0x80, "Parameter not supported" },
606 { 0x81, "Attempt to set the 'set in progress' value (in parameter #0) when not in the 'set complete' state" },
607 { 0x82, "Attempt to write read-only parameter" },
611 /* Get System Boot Options
614 rq09(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
621 pno
= tvb_get_guint8(tvb
, 0) & 0x7f;
622 if (pno
< array_length(boot_options
)) {
623 desc
= boot_options
[pno
].name
;
624 } else if (pno
>= 96 && pno
<= 127) {
631 ti
= proto_tree_add_text(tree
, tvb
, 0, 1,
632 "Boot option parameter selector: %s (0x%02x)",
634 s_tree
= proto_item_add_subtree(ti
, ett_ipmi_chs_09_rq_byte1
);
635 proto_tree_add_uint_format(s_tree
, hf_ipmi_chs_09_rq_param_select
, tvb
, 0, 1,
636 pno
, "%sBoot option parameter selector: %s (0x%02x)",
637 ipmi_dcd8(pno
, 0x7f), desc
, pno
);
639 proto_tree_add_item(tree
, hf_ipmi_chs_09_rq_set_select
, tvb
, 1, 1, ENC_LITTLE_ENDIAN
);
640 proto_tree_add_item(tree
, hf_ipmi_chs_09_rq_block_select
, tvb
, 2, 1, ENC_LITTLE_ENDIAN
);
644 rs09(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
646 static const int *byte1
[] = { &hf_ipmi_chs_09_rs_param_version
, NULL
};
653 pno
= tvb_get_guint8(tvb
, 1) & 0x7f;
654 if (pno
< array_length(boot_options
)) {
655 desc
= boot_options
[pno
].name
;
656 } else if (pno
>= 96 && pno
<= 127) {
662 proto_tree_add_bitmask_text(tree
, tvb
, 0, 1, NULL
, NULL
,
663 ett_ipmi_chs_09_rs_byte1
, byte1
, ENC_LITTLE_ENDIAN
, 0);
665 ti
= proto_tree_add_text(tree
, tvb
, 1, 1,
666 "Boot option parameter selector: %s (0x%02x)",
668 s_tree
= proto_item_add_subtree(ti
, ett_ipmi_chs_09_rs_byte2
);
669 proto_tree_add_item(s_tree
, hf_ipmi_chs_09_rs_valid
, tvb
, 1, 1, ENC_LITTLE_ENDIAN
);
670 proto_tree_add_uint_format(s_tree
, hf_ipmi_chs_09_rs_param_select
, tvb
, 1, 1,
671 pno
, "%sBoot option parameter selector: %s (0x%02x)",
672 ipmi_dcd8(pno
, 0x7f), desc
, pno
);
674 if (pno
< array_length(boot_options
)) {
675 sub
= tvb_new_subset(tvb
, 2, tvb_length(tvb
) - 2, tvb_length(tvb
) - 2);
676 boot_options
[pno
].intrp(sub
, tree
);
678 proto_tree_add_item(tree
, hf_ipmi_chs_09_rs_param_data
, tvb
, 2,
679 tvb_length(tvb
) - 2, ENC_NA
);
683 static const value_string cc09
[] = {
684 { 0x80, "Parameter not supported" },
691 rs0f(tvbuff_t
*tvb
, packet_info
*pinfo _U_
, proto_tree
*tree
)
693 proto_tree_add_item(tree
, hf_ipmi_chs_0f_minpercnt
, tvb
, 0, 1, ENC_LITTLE_ENDIAN
);
694 proto_tree_add_item(tree
, hf_ipmi_chs_0f_counter
, tvb
, 1, 4, ENC_LITTLE_ENDIAN
);
697 static ipmi_cmd_t cmd_chassis
[] = {
698 /* Chassis commands */
699 { 0x00, NULL
, rs00
, NULL
, NULL
, "Get Chassis Capabilities", 0 },
700 { 0x01, NULL
, rs01
, NULL
, NULL
, "Get Chassis Status", 0 },
701 { 0x02, rq02
, NULL
, NULL
, NULL
, "Chassis Control", 0 },
702 { 0x03, NULL
, NULL
, NULL
, NULL
, "Chassis Reset", 0 },
703 { 0x04, rq04
, NULL
, NULL
, NULL
, "Chassis Identify", 0 },
704 { 0x05, rq05
, NULL
, NULL
, NULL
, "Set Chassis Capabilities", 0 },
705 { 0x06, rq06
, rs06
, NULL
, NULL
, "Set Power Restore Policy", 0 },
706 { 0x07, NULL
, rs07
, NULL
, NULL
, "Get System Restart Cause", 0 },
707 { 0x08, rq08
, NULL
, cc08
, NULL
, "Set System Boot Options", 0 },
708 { 0x09, rq09
, rs09
, cc09
, NULL
, "Get System Boot Options", 0 },
709 { 0x0a, IPMI_TBD
, NULL
, NULL
, "Set Front Panel Buttons Enables", 0 },
710 { 0x0b, IPMI_TBD
, NULL
, NULL
, "Set Power Cycle Interval", 0 },
711 { 0x0f, NULL
, rs0f
, NULL
, NULL
, "Get POH Counter", 0 },
715 ipmi_register_chassis(gint proto_ipmi
)
717 static hf_register_info hf
[] = {
718 { &hf_ipmi_chs_bo00_sip
,
720 "ipmi.bootopt00.sip", FT_UINT8
, BASE_HEX
, bo00_sip_vals
, 0x03, NULL
, HFILL
}},
721 { &hf_ipmi_chs_bo01_spsel
,
722 { "Service Partition Selector",
723 "ipmi.bootopt01.spsel", FT_UINT8
, BASE_HEX
, NULL
, 0, NULL
, HFILL
}},
724 { &hf_ipmi_chs_bo02_request
,
725 { "Request BIOS to scan for specified service partition",
726 "ipmi.bootopt02.spscan.request", FT_BOOLEAN
, 8, NULL
, 0x02, NULL
, HFILL
}},
727 { &hf_ipmi_chs_bo02_discovered
,
728 { "Service Partition discovered",
729 "ipmi.bootopt02.spscan.discovered", FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
730 { &hf_ipmi_chs_bo03_pef
,
731 { "Reset/power cycle caused by PEF",
732 "ipmi.bootopt03.bmcboot.pef", FT_BOOLEAN
, 8, TFS(&bo03_dontclear_tfs
), 0x10, NULL
, HFILL
}},
733 { &hf_ipmi_chs_bo03_cctrl_timeout
,
734 { "Chassis Control command not received within 60s timeout",
735 "ipmi.bootopt03.bmcboot.cctrl_timeout", FT_BOOLEAN
, 8, TFS(&bo03_dontclear_tfs
), 0x08, NULL
, HFILL
}},
736 { &hf_ipmi_chs_bo03_wd_timeout
,
737 { "Reset/power cycle caused by watchdog timeout",
738 "ipmi.bootopt03.bmcboot.wd_timeout", FT_BOOLEAN
, 8, TFS(&bo03_dontclear_tfs
), 0x04, NULL
, HFILL
}},
739 { &hf_ipmi_chs_bo03_softreset
,
740 { "Pushbutton reset / soft reset",
741 "ipmi.bootopt03.bmcboot.softreset", FT_BOOLEAN
, 8, TFS(&bo03_dontclear_tfs
), 0x02, NULL
, HFILL
}},
742 { &hf_ipmi_chs_bo03_powerup
,
743 { "Power up via pushbutton or wake event",
744 "ipmi.bootopt03.bmcboot.powerup", FT_BOOLEAN
, 8, TFS(&bo03_dontclear_tfs
), 0x01, NULL
, HFILL
}},
745 { &hf_ipmi_chs_bo04_write_mask
,
747 "ipmi.bootopt04.write_mask", FT_UINT8
, BASE_HEX
, NULL
, 0, NULL
, HFILL
}},
748 { &hf_ipmi_chs_bo04_bootinit_ack_oem
,
750 "ipmi.bootopt04.bootinit_ack.oem", FT_BOOLEAN
, 8, TFS(&bo04_bootinit_ack_tfs
), 0x10, NULL
, HFILL
}},
751 { &hf_ipmi_chs_bo04_bootinit_ack_sms
,
753 "ipmi.bootopt04.bootinit_ack.sms", FT_BOOLEAN
, 8, TFS(&bo04_bootinit_ack_tfs
), 0x08, NULL
, HFILL
}},
754 { &hf_ipmi_chs_bo04_bootinit_ack_os
,
755 { "OS / Service Partition",
756 "ipmi.bootopt04.bootinit_ack.os", FT_BOOLEAN
, 8, TFS(&bo04_bootinit_ack_tfs
), 0x04, NULL
, HFILL
}},
757 { &hf_ipmi_chs_bo04_bootinit_ack_osloader
,
759 "ipmi.bootopt04.bootinit_ack.osloader", FT_BOOLEAN
, 8, TFS(&bo04_bootinit_ack_tfs
), 0x02, NULL
, HFILL
}},
760 { &hf_ipmi_chs_bo04_bootinit_ack_bios
,
762 "ipmi.bootopt04.bootinit_ack.bios", FT_BOOLEAN
, 8, TFS(&bo04_bootinit_ack_tfs
), 0x01, NULL
, HFILL
}},
763 { &hf_ipmi_chs_bo05_bootflags_valid
,
764 { "Boot flags valid",
765 "ipmi.bootopt05.boot_flags_valid", FT_BOOLEAN
, 8, NULL
, 0x80, NULL
, HFILL
}},
766 { &hf_ipmi_chs_bo05_permanent
,
768 "ipmi.bootopt05.permanent", FT_BOOLEAN
, 8, TFS(&bo05_permanent_tfs
), 0x40, NULL
, HFILL
}},
769 { &hf_ipmi_chs_bo05_boottype
,
771 "ipmi.bootopt05.boottype", FT_BOOLEAN
, 8, TFS(&bo05_boottype_tfs
), 0x20, NULL
, HFILL
}},
772 { &hf_ipmi_chs_bo05_cmos_clear
,
774 "ipmi.bootopt05.cmos_clear", FT_BOOLEAN
, 8, NULL
, 0x80, NULL
, HFILL
}},
775 { &hf_ipmi_chs_bo05_lock_kbd
,
777 "ipmi.bootopt05.lock_kbd", FT_BOOLEAN
, 8, NULL
, 0x40, NULL
, HFILL
}},
778 { &hf_ipmi_chs_bo05_bootdev
,
779 { "Boot Device Selector",
780 "ipmi.bootopt05.bootdev", FT_UINT8
, BASE_HEX
, bo05_bootdev_vals
, 0x3c, NULL
, HFILL
}},
781 { &hf_ipmi_chs_bo05_screen_blank
,
783 "ipmi.bootopt05.screen_blank", FT_BOOLEAN
, 8, NULL
, 0x02, NULL
, HFILL
}},
784 { &hf_ipmi_chs_bo05_lockout_reset
,
785 { "Lock out Reset buttons",
786 "ipmi.bootopt05.lockout_reset", FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
787 { &hf_ipmi_chs_bo05_lockout_poweroff
,
788 { "Lock out (power off / sleep request) via Power Button",
789 "ipmi.bootopt05.lockout_poweroff", FT_BOOLEAN
, 8, NULL
, 0x80, NULL
, HFILL
}},
790 { &hf_ipmi_chs_bo05_bios_verbosity
,
792 "ipmi.bootopt05.bios_verbosity", FT_UINT8
, BASE_HEX
, bo05_bios_verbosity_vals
, 0x60, NULL
, HFILL
}},
793 { &hf_ipmi_chs_bo05_progress_traps
,
794 { "Force Progress Event Traps",
795 "ipmi.bootopt05.progress_traps", FT_BOOLEAN
, 8, NULL
, 0x10, NULL
, HFILL
}},
796 { &hf_ipmi_chs_bo05_pwd_bypass
,
797 { "User password bypass",
798 "ipmi.bootopt05.pwd_bypass", FT_BOOLEAN
, 8, NULL
, 0x08, NULL
, HFILL
}},
799 { &hf_ipmi_chs_bo05_lock_sleep
,
800 { "Lock Out Sleep Button",
801 "ipmi.bootopt05.lock_sleep", FT_BOOLEAN
, 8, NULL
, 0x04, NULL
, HFILL
}},
802 { &hf_ipmi_chs_bo05_console_redirection
,
803 { "Console redirection",
804 "ipmi.bootopt05.console_redirection", FT_UINT8
, BASE_HEX
, bo05_console_redir_vals
, 0x03, NULL
, HFILL
}},
805 { &hf_ipmi_chs_bo05_bios_shared_override
,
806 { "BIOS Shared Mode Override",
807 "ipmi.bootopt05.bios_shared_override", FT_BOOLEAN
, 8, TFS(&bo05_bios_shared_tfs
), 0x08, NULL
, HFILL
}},
808 { &hf_ipmi_chs_bo05_bios_muxctl_override
,
809 { "BIOS Mux Control Override",
810 "ipmi.bootopt05.bios_muxctl_override", FT_UINT8
, BASE_HEX
, bo05_bios_muxctl_vals
, 0x07, NULL
, HFILL
}},
811 { &hf_ipmi_chs_bo05_byte5
,
812 { "Data 5 (reserved)",
813 "ipmi.bootopt05.byte5", FT_UINT8
, BASE_HEX
, NULL
, 0, NULL
, HFILL
}},
814 { &hf_ipmi_chs_bo06_chan_num
,
816 "ipmi.bootopt06.chan_num", FT_UINT8
, BASE_CUSTOM
, ipmi_fmt_channel
, 0x0f, NULL
, HFILL
}},
817 { &hf_ipmi_chs_bo06_session_id
,
819 "ipmi.bootopt06.session_id", FT_UINT32
, BASE_DEC
, NULL
, 0, NULL
, HFILL
}},
820 { &hf_ipmi_chs_bo06_bootinfo_timestamp
,
821 { "Boot Info Timestamp",
822 "impi.bootopt06.bootinfo_timestamp", FT_UINT32
, BASE_HEX
, NULL
, 0, NULL
, HFILL
}},
823 { &hf_ipmi_chs_bo07_block_selector
,
825 "ipmi.bootopt07.block_selector", FT_UINT8
, BASE_HEX
, NULL
, 0, NULL
, HFILL
}},
826 { &hf_ipmi_chs_bo07_block_data
,
828 "ipmi.bootopt07.block_data", FT_BYTES
, BASE_NONE
, NULL
, 0, NULL
, HFILL
}},
830 { &hf_ipmi_chs_00_capflags_ppi
,
832 "ipmi.ch00.cap.power_interlock", FT_BOOLEAN
, 8, TFS(&tfs_00_provided
), 0x08, NULL
, HFILL
}},
833 { &hf_ipmi_chs_00_capflags_di
,
834 { "Diagnostic Interrupt",
835 "ipmi.ch00.cap.diag_int", FT_BOOLEAN
, 8, TFS(&tfs_00_provided
), 0x04, NULL
, HFILL
}},
836 { &hf_ipmi_chs_00_capflags_fpl
,
837 { "Front Panel Lockout",
838 "ipmi.ch00.cap.fpl", FT_BOOLEAN
, 8, TFS(&tfs_00_provided
), 0x02, NULL
, HFILL
}},
839 { &hf_ipmi_chs_00_capflags_is
,
840 { "Intrusion sensor",
841 "ipmi.ch00.cap.intrusion", FT_BOOLEAN
, 8, TFS(&tfs_00_provided
), 0x01, NULL
, HFILL
}},
842 { &hf_ipmi_chs_00_fru_dev_addr
,
843 { "Chassis FRU Info Device Address",
844 "ipmi.ch00.fru_info", FT_UINT8
, BASE_HEX
, NULL
, 0, NULL
, HFILL
}},
845 { &hf_ipmi_chs_00_sdr_dev_addr
,
846 { "Chassis SDR Device Address",
847 "ipmi.ch00.sdr", FT_UINT8
, BASE_HEX
, NULL
, 0, NULL
, HFILL
}},
848 { &hf_ipmi_chs_00_sel_dev_addr
,
849 { "Chassis SEL Device Address",
850 "ipmi.ch00.sel", FT_UINT8
, BASE_HEX
, NULL
, 0, NULL
, HFILL
}},
851 { &hf_ipmi_chs_00_sm_dev_addr
,
852 { "Chassis System Management Device Address",
853 "ipmi.ch00.sm", FT_UINT8
, BASE_HEX
, NULL
, 0, NULL
, HFILL
}},
854 { &hf_ipmi_chs_00_bridge_dev_addr
,
855 { "Chassis Bridge Device Address",
856 "ipmi.ch00.bridge", FT_UINT8
, BASE_HEX
, NULL
, 0, NULL
, HFILL
}},
858 { &hf_ipmi_chs_01_pwr_state_policy
,
859 { "Power Restore Policy",
860 "ipmi.ch01.cur_pwr.policy", FT_UINT8
, BASE_HEX
, vals_01_pwr_policy
, 0x60, NULL
, HFILL
}},
861 { &hf_ipmi_chs_01_pwr_state_ctl_fault
,
862 { "Power Control Fault",
863 "ipmi.ch01.cur_pwr.ctl_fault", FT_BOOLEAN
, 8, NULL
, 0x10, NULL
, HFILL
}},
864 { &hf_ipmi_chs_01_pwr_state_fault
,
866 "ipmi.ch01.cur_pwr.fault", FT_BOOLEAN
, 8, NULL
, 0x08, NULL
, HFILL
}},
867 { &hf_ipmi_chs_01_pwr_state_ilock
,
869 "ipmi.ch01.cur_pwr.interlock", FT_BOOLEAN
, 8, NULL
, 0x04, NULL
, HFILL
}},
870 { &hf_ipmi_chs_01_pwr_state_overload
,
872 "ipmi.ch01.cur_pwr.overload", FT_BOOLEAN
, 8, NULL
, 0x02, NULL
, HFILL
}},
873 { &hf_ipmi_chs_01_pwr_state_powered
,
875 "ipmi.ch01.cur_pwr.powered", FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
876 { &hf_ipmi_chs_01_last_event_via_ipmi
,
877 { "Last `Power is on' state was entered via IPMI command",
878 "ipmi.ch01.last.on_via_ipmi", FT_BOOLEAN
, 8, NULL
, 0x10, NULL
, HFILL
}},
879 { &hf_ipmi_chs_01_last_event_down_by_fault
,
880 { "Last power down caused by power fault",
881 "ipmi.ch01.last.down_by_fault", FT_BOOLEAN
, 8, NULL
, 0x08, NULL
, HFILL
}},
882 { &hf_ipmi_chs_01_last_event_interlock
,
883 { "Last power down caused by a power interlock being activated",
884 "ipmi.ch01.last.interlock", FT_BOOLEAN
, 8, NULL
, 0x04, NULL
, HFILL
}},
885 { &hf_ipmi_chs_01_last_event_overload
,
886 { "Last power down caused by a power overload",
887 "ipmi.ch01.last.overload", FT_BOOLEAN
, 8, NULL
, 0x02, NULL
, HFILL
}},
888 { &hf_ipmi_chs_01_last_event_ac_failed
,
890 "ipmi.ch01.last.ac_failed", FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
891 { &hf_ipmi_chs_01_misc_identsupp
,
892 { "Chassis Identify command and state info supported",
893 "ipmi.ch01.identsupp", FT_BOOLEAN
, 8, NULL
, 0x40, NULL
, HFILL
}},
894 { &hf_ipmi_chs_01_misc_identstate
,
895 { "Chassis Identify state (if supported)",
896 "ipmi.ch01.identstate", FT_UINT8
, BASE_HEX
, vals_01_identstate
, 0x30, NULL
, HFILL
}},
897 { &hf_ipmi_chs_01_misc_fan
,
898 { "Cooling/fan fault detected",
899 "ipmi.ch01.misc.fan", FT_BOOLEAN
, 8, NULL
, 0x08, NULL
, HFILL
}},
900 { &hf_ipmi_chs_01_misc_drive
,
902 "ipmi.ch01.misc.drive", FT_BOOLEAN
, 8, NULL
, 0x04, NULL
, HFILL
}},
903 { &hf_ipmi_chs_01_misc_fpl_active
,
904 { "Front Panel Lockout active",
905 "ipmi.ch01.misc.fpl_active", FT_BOOLEAN
, 8, NULL
, 0x02, NULL
, HFILL
}},
906 { &hf_ipmi_chs_01_misc_intrusion
,
907 { "Chassis intrusion active",
908 "ipmi.ch01.misc.intrusion", FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
909 { &hf_ipmi_chs_01_fpb_standby_allowed
,
910 { "Standby disable allowed",
911 "ipmi.ch01.fpb.standby_allowed", FT_BOOLEAN
, 8, NULL
, 0x80, NULL
, HFILL
}},
912 { &hf_ipmi_chs_01_fpb_diagintr_allowed
,
913 { "Diagnostic interrupt disable allowed",
914 "ipmi.ch01.fpb.diagintr_allowed", FT_BOOLEAN
, 8, NULL
, 0x40, NULL
, HFILL
}},
915 { &hf_ipmi_chs_01_fpb_reset_allowed
,
916 { "Reset disable allowed",
917 "ipmi.ch01.fpb.reset_allowed", FT_BOOLEAN
, 8, NULL
, 0x20, NULL
, HFILL
}},
918 { &hf_ipmi_chs_01_fpb_poweroff_allowed
,
919 { "Poweroff disable allowed",
920 "ipmi.ch01.fpb.poweroff_allowed", FT_BOOLEAN
, 8, NULL
, 0x10, NULL
, HFILL
}},
921 { &hf_ipmi_chs_01_fpb_standby_disabled
,
922 { "Standby disabled",
923 "ipmi.ch01.fpb.standby_disabled", FT_BOOLEAN
, 8, NULL
, 0x08, NULL
, HFILL
}},
924 { &hf_ipmi_chs_01_fpb_diagintr_disabled
,
925 { "Diagnostic interrupt disabled",
926 "ipmi.ch01.fpb.diagintr_disabled", FT_BOOLEAN
, 8, NULL
, 0x04, NULL
, HFILL
}},
927 { &hf_ipmi_chs_01_fpb_reset_disabled
,
929 "ipmi.ch01.fpb.reset_disabled", FT_BOOLEAN
, 8, NULL
, 0x02, NULL
, HFILL
}},
930 { &hf_ipmi_chs_01_fpb_poweroff_disabled
,
931 { "Poweroff disabled",
932 "ipmi.ch01.fpb.poweroff_disabled", FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
934 { &hf_ipmi_chs_02_cctrl
,
936 "ipmi.ch02.chassis_control", FT_UINT8
, BASE_HEX
, vals_02_cctrl
, 0x0f, NULL
, HFILL
}},
938 { &hf_ipmi_chs_04_ival
,
939 { "Identify Interval in seconds",
940 "ipmi.ch04.interval", FT_UINT8
, BASE_CUSTOM
, ipmi_fmt_1s_1based
, 0, NULL
, HFILL
}},
941 { &hf_ipmi_chs_04_perm_on
,
942 { "Turn on Identify indefinitely",
943 "ipmi.ch04.perm_on", FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
945 { &hf_ipmi_chs_05_flags_fpl
,
946 { "Provides Front Panel Lockout",
947 "ipmi.ch05.flags.fpl", FT_BOOLEAN
, 8, NULL
, 0x02, NULL
, HFILL
}},
948 { &hf_ipmi_chs_05_flags_intrusion
,
949 { "Provides intrusion sensor",
950 "ipmi.ch05.flags.intrusion", FT_BOOLEAN
, 8, NULL
, 0x01, NULL
, HFILL
}},
951 { &hf_ipmi_chs_05_fru_dev_addr
,
952 { "Chassis FRU Info Device Address",
953 "ipmi.ch05.fru_info", FT_UINT8
, BASE_HEX
, NULL
, 0, NULL
, HFILL
}},
954 { &hf_ipmi_chs_05_sdr_dev_addr
,
955 { "Chassis SDR Device Address",
956 "ipmi.ch05.sdr", FT_UINT8
, BASE_HEX
, NULL
, 0, NULL
, HFILL
}},
957 { &hf_ipmi_chs_05_sel_dev_addr
,
958 { "Chassis SEL Device Address",
959 "ipmi.ch05.sel", FT_UINT8
, BASE_HEX
, NULL
, 0, NULL
, HFILL
}},
960 { &hf_ipmi_chs_05_sm_dev_addr
,
961 { "Chassis System Management Device Address",
962 "ipmi.ch05.sm", FT_UINT8
, BASE_HEX
, NULL
, 0, NULL
, HFILL
}},
963 { &hf_ipmi_chs_05_bridge_dev_addr
,
964 { "Chassis Bridge Device Address",
965 "ipmi.ch05.bridge", FT_UINT8
, BASE_HEX
, NULL
, 0, NULL
, HFILL
}},
967 { &hf_ipmi_chs_06_rq_policy
,
968 { "Power Restore Policy",
969 "ipmi.ch06.rq_policy", FT_UINT8
, BASE_HEX
, vals_06_policy
, 0x07, NULL
, HFILL
}},
970 { &hf_ipmi_chs_06_rs_policy_support_powerup
,
971 { "Always powering up",
972 "ipmi.ch06.rs_support.powerup", FT_BOOLEAN
, 8, TFS(&tfs_06_supported
), 0x04, NULL
, HFILL
}},
973 { &hf_ipmi_chs_06_rs_policy_support_restore
,
974 { "Restoring previous state",
975 "ipmi.ch06.rs_support.restore", FT_BOOLEAN
, 8, TFS(&tfs_06_supported
), 0x02, NULL
, HFILL
}},
976 { &hf_ipmi_chs_06_rs_policy_support_poweroff
,
977 { "Staying powered off",
978 "ipmi.ch06.rs_support.poweroff", FT_BOOLEAN
, 8, TFS(&tfs_06_supported
), 0x01, NULL
, HFILL
}},
980 { &hf_ipmi_chs_07_cause
,
982 "ipmi.ch07.cause", FT_UINT8
, BASE_HEX
, vals_07_cause
, 0x0f, NULL
, HFILL
}},
983 { &hf_ipmi_chs_07_chan
,
985 "ipmi.ch07.chan", FT_UINT8
, BASE_CUSTOM
, ipmi_fmt_channel
, 0, NULL
, HFILL
}},
987 { &hf_ipmi_chs_08_valid
,
989 "ipmi.ch08.valid", FT_BOOLEAN
, 8, TFS(&tfs_08_valid
), 0x80, NULL
, HFILL
}},
990 { &hf_ipmi_chs_08_selector
,
991 { "Boot option parameter selector",
992 "ipmi.ch08.selector", FT_UINT8
, BASE_HEX
, NULL
, 0x7f, NULL
, HFILL
}},
993 { &hf_ipmi_chs_08_data
,
994 { "Boot option parameter data",
995 "ipmi.ch08.data", FT_NONE
, BASE_NONE
, NULL
, 0, NULL
, HFILL
}},
997 { &hf_ipmi_chs_09_rq_param_select
,
998 { "Parameter selector",
999 "ipmi.ch09.rq_param_select", FT_UINT8
, BASE_HEX
, NULL
, 0x7f, NULL
, HFILL
}},
1000 { &hf_ipmi_chs_09_rq_set_select
,
1002 "ipmi.ch09.rq_set_select", FT_UINT8
, BASE_HEX
, NULL
, 0, NULL
, HFILL
}},
1003 { &hf_ipmi_chs_09_rq_block_select
,
1005 "ipmi.ch09.rq_block_select", FT_UINT8
, BASE_HEX
, NULL
, 0, NULL
, HFILL
}},
1006 { &hf_ipmi_chs_09_rs_param_version
,
1007 { "Parameter Version",
1008 "ipmi.ch09.rs_param_version", FT_UINT8
, BASE_HEX
, NULL
, 0x0f, NULL
, HFILL
}},
1009 { &hf_ipmi_chs_09_rs_valid
,
1010 { "Parameter Valid",
1011 "ipmi.ch09.rs_valid", FT_BOOLEAN
, 8, TFS(&tfs_09_valid
), 0x80, NULL
, HFILL
}},
1012 { &hf_ipmi_chs_09_rs_param_select
,
1013 { "Parameter Selector",
1014 "ipmi.ch09.rs_param_select", FT_UINT8
, BASE_HEX
, NULL
, 0x7f, NULL
, HFILL
}},
1015 { &hf_ipmi_chs_09_rs_param_data
,
1016 { "Configuration parameter data",
1017 "ipmi.ch09.rs_param_data", FT_BYTES
, BASE_NONE
, NULL
, 0, NULL
, HFILL
}},
1019 { &hf_ipmi_chs_0f_minpercnt
,
1020 { "Minutes per count",
1021 "ipmi.ch0f.minpercnt", FT_UINT8
, BASE_DEC
, NULL
, 0, NULL
, HFILL
}},
1022 { &hf_ipmi_chs_0f_counter
,
1023 { "Counter reading",
1024 "ipmi.ch0f.counter", FT_UINT32
, BASE_DEC
, NULL
, 0, NULL
, HFILL
}},
1027 static gint
*ett
[] = {
1028 &ett_ipmi_chs_bo00_byte1
,
1029 &ett_ipmi_chs_bo02_byte1
,
1030 &ett_ipmi_chs_bo03_byte1
,
1031 &ett_ipmi_chs_bo04_byte2
,
1032 &ett_ipmi_chs_bo05_byte1
,
1033 &ett_ipmi_chs_bo05_byte2
,
1034 &ett_ipmi_chs_bo05_byte3
,
1035 &ett_ipmi_chs_bo05_byte4
,
1036 &ett_ipmi_chs_bo06_byte1
,
1037 &ett_ipmi_chs_00_capflags
,
1038 &ett_ipmi_chs_01_pwr_state
,
1039 &ett_ipmi_chs_01_last_event
,
1040 &ett_ipmi_chs_01_misc
,
1041 &ett_ipmi_chs_01_fpb
,
1042 &ett_ipmi_chs_02_byte1
,
1043 &ett_ipmi_chs_04_byte2
,
1044 &ett_ipmi_chs_05_flags
,
1045 &ett_ipmi_chs_06_byte1
,
1046 &ett_ipmi_chs_06_policy_support
,
1047 &ett_ipmi_chs_07_byte1
,
1048 &ett_ipmi_chs_08_byte1
,
1049 &ett_ipmi_chs_09_rq_byte1
,
1050 &ett_ipmi_chs_09_rs_byte1
,
1051 &ett_ipmi_chs_09_rs_byte2
,
1054 proto_register_field_array(proto_ipmi
, hf
, array_length(hf
));
1055 proto_register_subtree_array(ett
, array_length(ett
));
1056 ipmi_register_netfn_cmdtab(IPMI_CHASSIS_REQ
, IPMI_OEM_NONE
, NULL
, 0, NULL
,
1057 cmd_chassis
, array_length(cmd_chassis
));