epan/dissectors/pidl/ C99 drsuapi
[wireshark-sm.git] / epan / dissectors / packet-ipmi-app.c
blob08b222c16f10a544d942d26e9b2547091cf5553e
1 /* packet-ipmi-app.c
2 * Sub-dissectors for IPMI messages (netFn=Application)
3 * Copyright 2007-2008, Alexey Neyman, Pigeon Point Systems <avn@pigeonpoint.com>
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
9 * SPDX-License-Identifier: GPL-2.0-or-later
12 #include "config.h"
15 #include <epan/packet.h>
16 #include <epan/tfs.h>
17 #include <wsutil/array.h>
19 #include "packet-ipmi.h"
21 void proto_register_ipmi_app(void);
23 static int ett_ipmi_app_01_byte2;
24 static int ett_ipmi_app_01_byte3;
25 static int ett_ipmi_app_01_byte6;
27 static int ett_ipmi_app_04_byte2;
29 static int ett_ipmi_app_06_syspwr;
30 static int ett_ipmi_app_06_devpwr;
32 static int ett_ipmi_app_07_syspwr;
33 static int ett_ipmi_app_07_devpwr;
35 static int ett_ipmi_app_24_timer_use;
36 static int ett_ipmi_app_24_timer_action;
37 static int ett_ipmi_app_24_expiration_flags;
39 static int ett_ipmi_app_25_timer_use;
40 static int ett_ipmi_app_25_timer_action;
41 static int ett_ipmi_app_25_expiration_flags;
43 static int ett_ipmi_app_2e_byte1;
44 static int ett_ipmi_app_2f_byte1;
45 static int ett_ipmi_app_30_byte1;
46 static int ett_ipmi_app_31_byte1;
47 static int ett_ipmi_app_32_rq_byte1;
48 static int ett_ipmi_app_32_rq_byte2;
49 static int ett_ipmi_app_32_rs_byte1;
50 static int ett_ipmi_app_32_rs_byte2;
51 static int ett_ipmi_app_33_rs_byte1;
52 static int ett_ipmi_app_33_msg;
53 static int ett_ipmi_app_34_byte1;
54 static int ett_ipmi_app_34_msg;
56 static int ett_ipmi_app_38_rq_byte1;
57 static int ett_ipmi_app_38_rq_byte2;
58 static int ett_ipmi_app_38_rs_byte1;
59 static int ett_ipmi_app_38_rs_byte2;
60 static int ett_ipmi_app_38_rs_byte3;
61 static int ett_ipmi_app_38_rs_byte4;
63 static int ett_ipmi_app_39_byte1;
65 static int ett_ipmi_app_3a_rq_byte1;
66 static int ett_ipmi_app_3a_rq_byte2;
67 static int ett_ipmi_app_3a_rs_byte1;
68 static int ett_ipmi_app_3a_rs_byte10;
70 static int ett_ipmi_app_3b_rq_byte1;
71 static int ett_ipmi_app_3b_rs_byte1;
73 static int hf_ipmi_app_01_dev_id;
74 static int hf_ipmi_app_01_dev_prov_sdr;
75 static int hf_ipmi_app_01_dev_rev;
76 static int hf_ipmi_app_01_dev_avail;
77 static int hf_ipmi_app_01_fw_rev_maj;
78 static int hf_ipmi_app_01_fw_rev_min;
79 static int hf_ipmi_app_01_ipmi_version;
80 static int hf_ipmi_app_01_ipmi_ads_chassis;
81 static int hf_ipmi_app_01_ipmi_ads_bridge;
82 static int hf_ipmi_app_01_ipmi_ads_ipmb_ev_gen;
83 static int hf_ipmi_app_01_ipmi_ads_ipmb_ev_recv;
84 static int hf_ipmi_app_01_ipmi_ads_fru;
85 static int hf_ipmi_app_01_ipmi_ads_sel;
86 static int hf_ipmi_app_01_ipmi_ads_sdr;
87 static int hf_ipmi_app_01_ipmi_ads_sensor;
88 static int hf_ipmi_app_01_manufacturer;
89 static int hf_ipmi_app_01_product;
90 static int hf_ipmi_app_01_fw_aux;
92 static int hf_ipmi_app_04_result;
93 static int hf_ipmi_app_04_fail;
94 static int hf_ipmi_app_04_fail_sel;
95 static int hf_ipmi_app_04_fail_sdr;
96 static int hf_ipmi_app_04_fail_bmc_fru;
97 static int hf_ipmi_app_04_fail_ipmb_sig;
98 static int hf_ipmi_app_04_fail_sdr_empty;
99 static int hf_ipmi_app_04_fail_iua;
100 static int hf_ipmi_app_04_fail_bb_fw;
101 static int hf_ipmi_app_04_fail_oper_fw;
103 static int hf_ipmi_app_05_devspec;
105 static int hf_ipmi_app_06_syspwr_set;
106 static int hf_ipmi_app_06_syspwr_enum;
107 static int hf_ipmi_app_06_devpwr_set;
108 static int hf_ipmi_app_06_devpwr_enum;
110 static int hf_ipmi_app_07_syspwr_enum;
111 static int hf_ipmi_app_07_devpwr_enum;
113 static int hf_ipmi_app_08_guid;
115 static int hf_ipmi_app_24_timer_use_dont_log;
116 static int hf_ipmi_app_24_timer_use_dont_stop;
117 static int hf_ipmi_app_24_timer_use_timer_use;
118 static int hf_ipmi_app_24_timer_action_interrupt;
119 static int hf_ipmi_app_24_timer_action_timeout_action;
120 static int hf_ipmi_app_24_pretimeout;
121 static int hf_ipmi_app_24_expiration_flags_oem;
122 static int hf_ipmi_app_24_expiration_flags_smsos;
123 static int hf_ipmi_app_24_expiration_flags_osload;
124 static int hf_ipmi_app_24_expiration_flags_biospost;
125 static int hf_ipmi_app_24_expiration_flags_biosfrb2;
126 static int hf_ipmi_app_24_initial_countdown;
128 static int hf_ipmi_app_25_timer_use_dont_log;
129 static int hf_ipmi_app_25_timer_use_started;
130 static int hf_ipmi_app_25_timer_use_timer_use;
131 static int hf_ipmi_app_25_timer_action_interrupt;
132 static int hf_ipmi_app_25_timer_action_timeout_action;
133 static int hf_ipmi_app_25_pretimeout;
134 static int hf_ipmi_app_25_expiration_flags_oem;
135 static int hf_ipmi_app_25_expiration_flags_smsos;
136 static int hf_ipmi_app_25_expiration_flags_osload;
137 static int hf_ipmi_app_25_expiration_flags_biospost;
138 static int hf_ipmi_app_25_expiration_flags_biosfrb2;
139 static int hf_ipmi_app_25_initial_countdown;
140 static int hf_ipmi_app_25_present_countdown;
142 static int hf_ipmi_app_2e_byte1_oem2;
143 static int hf_ipmi_app_2e_byte1_oem1;
144 static int hf_ipmi_app_2e_byte1_oem0;
145 static int hf_ipmi_app_2e_byte1_sel;
146 static int hf_ipmi_app_2e_byte1_emb;
147 static int hf_ipmi_app_2e_byte1_emb_full_intr;
148 static int hf_ipmi_app_2e_byte1_rmq_intr;
150 static int hf_ipmi_app_2f_byte1_oem2;
151 static int hf_ipmi_app_2f_byte1_oem1;
152 static int hf_ipmi_app_2f_byte1_oem0;
153 static int hf_ipmi_app_2f_byte1_sel;
154 static int hf_ipmi_app_2f_byte1_emb;
155 static int hf_ipmi_app_2f_byte1_emb_full_intr;
156 static int hf_ipmi_app_2f_byte1_rmq_intr;
158 static int hf_ipmi_app_30_byte1_oem2;
159 static int hf_ipmi_app_30_byte1_oem1;
160 static int hf_ipmi_app_30_byte1_oem0;
161 static int hf_ipmi_app_30_byte1_wd_pretimeout;
162 static int hf_ipmi_app_30_byte1_emb;
163 static int hf_ipmi_app_30_byte1_rmq;
165 static int hf_ipmi_app_31_byte1_oem2;
166 static int hf_ipmi_app_31_byte1_oem1;
167 static int hf_ipmi_app_31_byte1_oem0;
168 static int hf_ipmi_app_31_byte1_wd_pretimeout;
169 static int hf_ipmi_app_31_byte1_emb;
170 static int hf_ipmi_app_31_byte1_rmq;
172 static int hf_ipmi_app_32_rq_chno;
173 static int hf_ipmi_app_32_rq_state;
174 static int hf_ipmi_app_32_rs_chno;
175 static int hf_ipmi_app_32_rs_state;
177 static int hf_ipmi_app_33_rs_chan;
178 static int hf_ipmi_app_33_rs_priv;
179 static int hf_ipmi_app_33_msg;
181 static int hf_ipmi_app_34_track;
182 static int hf_ipmi_app_34_encrypt;
183 static int hf_ipmi_app_34_auth;
184 static int hf_ipmi_app_34_chan;
185 static int hf_ipmi_app_34_msg;
187 static int hf_ipmi_app_38_rq_ipmi20;
188 static int hf_ipmi_app_38_rq_chan;
189 static int hf_ipmi_app_38_rq_priv;
190 static int hf_ipmi_app_38_rs_chan;
191 static int hf_ipmi_app_38_rs_ipmi20;
192 static int hf_ipmi_app_38_rs_auth_oem;
193 static int hf_ipmi_app_38_rs_auth_straight;
194 static int hf_ipmi_app_38_rs_auth_md5;
195 static int hf_ipmi_app_38_rs_auth_md2;
196 static int hf_ipmi_app_38_rs_auth_none;
197 static int hf_ipmi_app_38_rs_kg;
198 static int hf_ipmi_app_38_rs_permsg;
199 static int hf_ipmi_app_38_rs_userauth;
200 static int hf_ipmi_app_38_rs_user_nonnull;
201 static int hf_ipmi_app_38_rs_user_null;
202 static int hf_ipmi_app_38_rs_user_anon;
203 static int hf_ipmi_app_38_rs_ipmi20_conn;
204 static int hf_ipmi_app_38_rs_ipmi15_conn;
205 static int hf_ipmi_app_38_rs_oem_iana;
206 static int hf_ipmi_app_38_rs_oem_aux;
208 static int hf_ipmi_app_39_authtype;
209 static int hf_ipmi_app_39_user;
210 static int hf_ipmi_app_39_temp_session;
211 static int hf_ipmi_app_39_challenge;
213 static int hf_ipmi_app_3a_authtype;
214 static int hf_ipmi_app_3a_privlevel;
215 static int hf_ipmi_app_3a_authcode;
216 static int hf_ipmi_app_3a_outbound_seq;
217 static int hf_ipmi_app_3a_authtype_session;
218 static int hf_ipmi_app_3a_session_id;
219 static int hf_ipmi_app_3a_inbound_seq;
220 static int hf_ipmi_app_3a_maxpriv_session;
222 static int hf_ipmi_app_3b_req_priv;
223 static int hf_ipmi_app_3b_new_priv;
225 static int hf_ipmi_app_3c_session_id;
226 static int hf_ipmi_app_3c_session_handle;
228 static const struct true_false_string tfs_01_dev_avail = {
229 "Device firmware, SDR Repository update or self-initialization in progress",
230 "Normal operation"
233 static const value_string vals_04_result[] = {
234 { 0x55, "No error. All Self Tests Passed" },
235 { 0x56, "Self Test function not implemented in this controller" },
236 { 0x57, "Corrupted or inaccessible data or devices" },
237 { 0x58, "Fatal hardware error" },
238 { 0xff, "Reserved" },
239 { 0, NULL }
242 static const struct true_false_string tfs_04_fail_unknown = {
243 "Test failed",
244 "Unknown"
247 static const struct true_false_string tfs_06_pwr = {
248 "Set",
249 "Do not change"
252 static const value_string vals_06_syspwr[] = {
253 { 0x00, "Set S0 / G0" },
254 { 0x01, "Set S1" },
255 { 0x02, "Set S2" },
256 { 0x03, "Set S3" },
257 { 0x04, "Set S4" },
258 { 0x05, "Set S5 / G2" },
259 { 0x06, "Set S4/S5" },
260 { 0x07, "Set G3" },
261 { 0x08, "Sleeping" },
262 { 0x09, "G1 sleeping" },
263 { 0x0a, "Set override" },
264 { 0x20, "Set Legacy On" },
265 { 0x21, "Set Legacy Off" },
266 { 0x2a, "Set unknown" },
267 { 0x7f, "No change" },
268 { 0, NULL }
271 static const value_string vals_06_devpwr[] = {
272 { 0x00, "Set D0" },
273 { 0x01, "Set D1" },
274 { 0x02, "Set D2" },
275 { 0x03, "Set D3" },
276 { 0x2a, "Set unknown" },
277 { 0x7f, "No change" },
278 { 0, NULL }
281 static const value_string vals_07_syspwr[] = {
282 { 0x00, "S0 / G0" },
283 { 0x01, "S1" },
284 { 0x02, "S2" },
285 { 0x03, "S3" },
286 { 0x04, "S4" },
287 { 0x05, "S5 / G2" },
288 { 0x06, "S4/S5" },
289 { 0x07, "G3" },
290 { 0x08, "Sleeping" },
291 { 0x09, "G1 sleeping" },
292 { 0x0a, "Override" },
293 { 0x20, "Legacy On" },
294 { 0x21, "Legacy Off" },
295 { 0x2a, "unknown" },
296 { 0, NULL }
299 static const value_string vals_07_devpwr[] = {
300 { 0x00, "D0" },
301 { 0x01, "D1" },
302 { 0x02, "D2" },
303 { 0x03, "D3" },
304 { 0x2a, "unknown" },
305 { 0, NULL }
308 static const value_string vals_24_timer_use[] = {
309 { 0x00, "reserved" },
310 { 0x01, "BIOS FRB2" },
311 { 0x02, "BIOS/POST" },
312 { 0x03, "OS Load" },
313 { 0x04, "SMS/OS" },
314 { 0x05, "OEM" },
315 { 0x06, "reserved" },
316 { 0x07, "reserved" },
318 { 0, NULL }
321 static const value_string vals_24_timer_action_interrupt[] = {
322 { 0x00, "none" },
323 { 0x01, "SMI" },
324 { 0x02, "NMI / Diagnostic interrupt" },
325 { 0x03, "Messaging interrupt" },
326 { 0x04, "reserved" },
327 { 0x05, "reserved" },
328 { 0x06, "reserved" },
329 { 0x07, "reserved" },
331 { 0, NULL }
334 static const value_string vals_24_timer_action_timeout[] = {
335 { 0x00, "no action" },
336 { 0x01, "Hard Reset" },
337 { 0x02, "Power Down" },
338 { 0x03, "Power Cycle" },
339 { 0x04, "reserved" },
340 { 0x05, "reserved" },
341 { 0x06, "reserved" },
342 { 0x07, "reserved" },
344 { 0, NULL }
347 static const struct true_false_string tfs_24_exp_flags = {
348 "clear timer use expiration bit",
349 "leave alone"
352 static const struct true_false_string tfs_2e_enable = { "Enable", "Disable" };
353 static const struct true_false_string tfs_2f_enabled = { "Enabled", "Disabled" };
355 static const struct true_false_string tfs_30_clear = {
356 "clear",
357 "leave alone"
360 static const value_string vals_32_state[] = {
361 { 0x00, "Disable channel" },
362 { 0x01, "Enable channel" },
363 { 0x02, "Get channel enable/disable state" },
364 { 0x03, "Reserved" },
366 { 0, NULL }
369 static const struct true_false_string tfs_32_state = {
370 "Channel enabled",
371 "Channel disabled"
374 static const value_string vals_34_track[] = {
375 { 0x00, "No tracking" },
376 { 0x01, "Track Request" },
377 { 0x02, "Send Raw" },
378 { 0, NULL }
381 static const value_string vals_38_ipmi20[] = {
382 { 0x00, "Backward compatible with IPMI 1.5" },
383 { 0x01, "IPMI v2.0+ extended data" },
384 { 0, NULL }
387 static const value_string vals_XX_priv[] = {
388 { 0x00, "None / No change" },
389 { 0x01, "Callback" },
390 { 0x02, "User" },
391 { 0x03, "Operator" },
392 { 0x04, "Administrator" },
393 { 0x05, "OEM Proprietary" },
394 { 0, NULL }
397 static const struct true_false_string tfs_38_supp = { "Supported", "Not supported" };
398 static const struct true_false_string tfs_38_kg = { "Set to non-zero", "Set to default (0)" };
400 static const value_string vals_XX_auth[] = {
401 { 0x00, "None" },
402 { 0x01, "MD2" },
403 { 0x02, "MD5" },
404 { 0x04, "straight password" },
405 { 0x05, "OEM" },
406 { 0, NULL }
410 /* Get Device ID.
412 static void
413 rs01(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
415 static int * const byte2[] = { &hf_ipmi_app_01_dev_prov_sdr, &hf_ipmi_app_01_dev_rev, NULL };
416 static int * const byte3[] = { &hf_ipmi_app_01_dev_avail, &hf_ipmi_app_01_fw_rev_maj, NULL };
417 static int * const byte6[] = { &hf_ipmi_app_01_ipmi_ads_chassis, &hf_ipmi_app_01_ipmi_ads_bridge,
418 &hf_ipmi_app_01_ipmi_ads_ipmb_ev_gen, &hf_ipmi_app_01_ipmi_ads_ipmb_ev_recv,
419 &hf_ipmi_app_01_ipmi_ads_fru, &hf_ipmi_app_01_ipmi_ads_sel, &hf_ipmi_app_01_ipmi_ads_sdr,
420 &hf_ipmi_app_01_ipmi_ads_sensor, NULL };
421 size_t len;
423 len = tvb_captured_length(tvb);
425 proto_tree_add_item(tree, hf_ipmi_app_01_dev_id, tvb, 0, 1, ENC_LITTLE_ENDIAN);
426 proto_tree_add_bitmask_text(tree, tvb, 1, 1, NULL, NULL, ett_ipmi_app_01_byte2, byte2, ENC_LITTLE_ENDIAN, 0);
427 proto_tree_add_bitmask_text(tree, tvb, 2, 1, NULL, NULL, ett_ipmi_app_01_byte3, byte3, ENC_LITTLE_ENDIAN, 0);
428 proto_tree_add_item(tree, hf_ipmi_app_01_fw_rev_min, tvb, 3, 1, ENC_LITTLE_ENDIAN);
430 proto_tree_add_item(tree, hf_ipmi_app_01_ipmi_version, tvb, 4, 1, ENC_LITTLE_ENDIAN);
432 proto_tree_add_bitmask_text(tree, tvb, 5, 1, "Additional device support: ", "None",
433 ett_ipmi_app_01_byte6, byte6, ENC_LITTLE_ENDIAN, 0);
434 proto_tree_add_item(tree, hf_ipmi_app_01_manufacturer, tvb, 6, 3, ENC_LITTLE_ENDIAN);
435 proto_tree_add_item(tree, hf_ipmi_app_01_product, tvb, 9, 2, ENC_LITTLE_ENDIAN);
436 if (len > 11) {
437 /* IPMI states that Aux Revision should be displayed in MSB order */
438 proto_tree_add_item(tree, hf_ipmi_app_01_fw_aux, tvb, 11, 4, ENC_NA);
442 /* Get Self Test Results.
444 static void
445 rs04(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
447 static int * const byte2[] = { &hf_ipmi_app_04_fail_sel, &hf_ipmi_app_04_fail_sdr,
448 &hf_ipmi_app_04_fail_bmc_fru, &hf_ipmi_app_04_fail_ipmb_sig, &hf_ipmi_app_04_fail_sdr_empty,
449 &hf_ipmi_app_04_fail_iua, &hf_ipmi_app_04_fail_bb_fw, &hf_ipmi_app_04_fail_oper_fw, NULL };
450 int res, fail;
452 res = tvb_get_uint8(tvb, 0);
453 fail = tvb_get_uint8(tvb, 1);
455 proto_tree_add_uint_format_value(tree, hf_ipmi_app_04_result, tvb, 0, 1,
456 res, "%s (0x%02x)",
457 val_to_str_const(res, vals_04_result, "Device-specific internal failure"),
458 res);
460 if (res == 0x55 || res == 0x56 || res == 0xff) {
461 proto_tree_add_uint_format_value(tree, hf_ipmi_app_04_fail, tvb, 1, 1,
462 fail, "0x%02x (must be 0x00)",
463 fail);
464 return;
467 if (res != 0x57) {
468 proto_tree_add_uint_format_value(tree, hf_ipmi_app_04_fail, tvb, 1, 1,
469 fail, "0x%02x (device-specific)",
470 fail);
471 return;
474 proto_tree_add_bitmask(tree, tvb, 1, hf_ipmi_app_04_fail, ett_ipmi_app_04_byte2, byte2, ENC_LITTLE_ENDIAN);
477 /* Manufacturing Test On.
479 static void
480 rq05(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
482 proto_tree_add_item(tree, hf_ipmi_app_05_devspec, tvb, 0, -1, ENC_NA);
485 /* Set ACPI Power State.
487 static void
488 rq06(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
490 static int * const byte1[] = { &hf_ipmi_app_06_syspwr_set, &hf_ipmi_app_06_syspwr_enum, NULL };
491 static int * const byte2[] = { &hf_ipmi_app_06_devpwr_set, &hf_ipmi_app_06_devpwr_enum, NULL };
493 proto_tree_add_bitmask_text(tree, tvb, 0, 1, "ACPI System Power State: ", NULL,
494 ett_ipmi_app_06_syspwr, byte1, ENC_LITTLE_ENDIAN, 0);
495 proto_tree_add_bitmask_text(tree, tvb, 1, 1, "ACPI Device Power State: ", NULL,
496 ett_ipmi_app_06_devpwr, byte2, ENC_LITTLE_ENDIAN, 0);
499 /* Get ACPI Power State.
501 static void
502 rs07(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
504 static int * const byte1[] = { &hf_ipmi_app_07_syspwr_enum, NULL };
505 static int * const byte2[] = { &hf_ipmi_app_07_devpwr_enum, NULL };
507 proto_tree_add_bitmask_text(tree, tvb, 0, 1, "ACPI System Power State: ", NULL,
508 ett_ipmi_app_07_syspwr, byte1, ENC_LITTLE_ENDIAN, 0);
509 proto_tree_add_bitmask_text(tree, tvb, 1, 1, "ACPI Device Power State: ", NULL,
510 ett_ipmi_app_07_devpwr, byte2, ENC_LITTLE_ENDIAN, 0);
513 /* Get Device GUID.
515 static void
516 rs08(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
518 ipmi_add_guid(tree, hf_ipmi_app_08_guid, tvb, 0);
521 /* Reset Watchdog Timer.
523 static const value_string cc22[] = {
524 { 0x80, "Attempt to start un-initialized watchdog" },
525 { 0, NULL }
528 /* Set Watchdog Timer.
530 static void
531 rq24(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
533 static int * const byte1[] = { &hf_ipmi_app_24_timer_use_dont_log,
534 &hf_ipmi_app_24_timer_use_dont_stop, &hf_ipmi_app_24_timer_use_timer_use, NULL };
535 static int * const byte2[] = { &hf_ipmi_app_24_timer_action_interrupt,
536 &hf_ipmi_app_24_timer_action_timeout_action, NULL };
537 static int * const byte4[] = { &hf_ipmi_app_24_expiration_flags_oem,
538 &hf_ipmi_app_24_expiration_flags_smsos, &hf_ipmi_app_24_expiration_flags_osload,
539 &hf_ipmi_app_24_expiration_flags_biospost, &hf_ipmi_app_24_expiration_flags_biosfrb2, NULL };
541 proto_tree_add_bitmask_text(tree, tvb, 0, 1, "Timer Use: ", NULL, ett_ipmi_app_24_timer_use,
542 byte1, ENC_LITTLE_ENDIAN, 0);
543 proto_tree_add_bitmask_text(tree, tvb, 1, 1, NULL, NULL, ett_ipmi_app_24_timer_action,
544 byte2, ENC_LITTLE_ENDIAN, 0);
545 proto_tree_add_item(tree, hf_ipmi_app_24_pretimeout, tvb, 2, 1, ENC_LITTLE_ENDIAN);
546 proto_tree_add_bitmask_text(tree, tvb, 3, 1, "Timer Use Expiration flags clear: ", "None",
547 ett_ipmi_app_24_expiration_flags, byte4, ENC_LITTLE_ENDIAN, BMT_NO_TFS);
548 proto_tree_add_item(tree, hf_ipmi_app_24_initial_countdown, tvb, 4, 2, ENC_LITTLE_ENDIAN);
551 /* Get Watchdog Timer.
553 static void
554 rs25(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
556 static int * const byte1[] = { &hf_ipmi_app_25_timer_use_dont_log,
557 &hf_ipmi_app_25_timer_use_started, &hf_ipmi_app_25_timer_use_timer_use, NULL };
558 static int * const byte2[] = { &hf_ipmi_app_25_timer_action_interrupt,
559 &hf_ipmi_app_25_timer_action_timeout_action, NULL };
560 static int * const byte4[] = { &hf_ipmi_app_25_expiration_flags_oem, &hf_ipmi_app_25_expiration_flags_smsos,
561 &hf_ipmi_app_25_expiration_flags_osload, &hf_ipmi_app_25_expiration_flags_biospost,
562 &hf_ipmi_app_25_expiration_flags_biosfrb2, NULL };
564 proto_tree_add_bitmask_text(tree, tvb, 0, 1, "Timer Use: ", NULL, ett_ipmi_app_25_timer_use,
565 byte1, ENC_LITTLE_ENDIAN, 0);
566 proto_tree_add_bitmask_text(tree, tvb, 1, 1, NULL, NULL, ett_ipmi_app_25_timer_action,
567 byte2, ENC_LITTLE_ENDIAN, 0);
568 proto_tree_add_item(tree, hf_ipmi_app_25_pretimeout, tvb, 2, 1, ENC_LITTLE_ENDIAN);
569 proto_tree_add_bitmask_text(tree, tvb, 3, 1, "Timer Use Expiration flags: ", "None",
570 ett_ipmi_app_25_expiration_flags, byte4, ENC_LITTLE_ENDIAN, BMT_NO_TFS);
571 proto_tree_add_item(tree, hf_ipmi_app_25_initial_countdown, tvb, 4, 2, ENC_LITTLE_ENDIAN);
572 proto_tree_add_item(tree, hf_ipmi_app_25_present_countdown, tvb, 6, 2, ENC_LITTLE_ENDIAN);
575 /* Set BMC Global Enables.
577 static void
578 rq2e(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
580 static int * const byte1[] = { &hf_ipmi_app_2e_byte1_oem2, &hf_ipmi_app_2e_byte1_oem1,
581 &hf_ipmi_app_2e_byte1_oem0, &hf_ipmi_app_2e_byte1_sel, &hf_ipmi_app_2e_byte1_emb,
582 &hf_ipmi_app_2e_byte1_emb_full_intr, &hf_ipmi_app_2e_byte1_rmq_intr, NULL };
584 proto_tree_add_bitmask_text(tree, tvb, 0, 1, "Enables: ", "None", ett_ipmi_app_2e_byte1,
585 byte1, ENC_LITTLE_ENDIAN, BMT_NO_TFS);
588 /* Get BMC Global Enables.
590 static void
591 rs2f(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
593 static int * const byte1[] = { &hf_ipmi_app_2f_byte1_oem2, &hf_ipmi_app_2f_byte1_oem1,
594 &hf_ipmi_app_2f_byte1_oem0, &hf_ipmi_app_2f_byte1_sel, &hf_ipmi_app_2f_byte1_emb,
595 &hf_ipmi_app_2f_byte1_emb_full_intr, &hf_ipmi_app_2f_byte1_rmq_intr, NULL };
597 proto_tree_add_bitmask_text(tree, tvb, 0, 1, "Enables: ", "None", ett_ipmi_app_2f_byte1,
598 byte1, ENC_LITTLE_ENDIAN, BMT_NO_TFS);
601 /* Clear Message Flags.
603 static void
604 rq30(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
606 static int * const byte1[] = { &hf_ipmi_app_30_byte1_oem2, &hf_ipmi_app_30_byte1_oem1,
607 &hf_ipmi_app_30_byte1_oem0, &hf_ipmi_app_30_byte1_wd_pretimeout,
608 &hf_ipmi_app_30_byte1_emb, &hf_ipmi_app_30_byte1_rmq, NULL };
610 proto_tree_add_bitmask_text(tree, tvb, 0, 1, "Clear Message Flags: ", "None",
611 ett_ipmi_app_30_byte1, byte1, ENC_LITTLE_ENDIAN, BMT_NO_TFS);
614 /* Get Message Flags.
616 static void
617 rs31(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
619 static int * const byte1[] = { &hf_ipmi_app_31_byte1_oem2, &hf_ipmi_app_31_byte1_oem1,
620 &hf_ipmi_app_31_byte1_oem0, &hf_ipmi_app_31_byte1_wd_pretimeout,
621 &hf_ipmi_app_31_byte1_emb, &hf_ipmi_app_31_byte1_rmq, NULL };
623 proto_tree_add_bitmask_text(tree, tvb, 0, 1, "Flags: ", "None",
624 ett_ipmi_app_31_byte1, byte1, ENC_LITTLE_ENDIAN, BMT_NO_TFS);
627 /* Enable Message Channel Receive.
629 static void
630 rq32(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
632 static int * const byte1[] = { &hf_ipmi_app_32_rq_chno, NULL };
633 static int * const byte2[] = { &hf_ipmi_app_32_rq_state, NULL };
635 proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL, ett_ipmi_app_32_rq_byte1,
636 byte1, ENC_LITTLE_ENDIAN, 0);
637 proto_tree_add_bitmask_text(tree, tvb, 1, 1, NULL, NULL, ett_ipmi_app_32_rq_byte2,
638 byte2, ENC_LITTLE_ENDIAN, 0);
641 static void
642 rs32(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
644 static int * const byte1[] = { &hf_ipmi_app_32_rs_chno, NULL };
645 static int * const byte2[] = { &hf_ipmi_app_32_rs_state, NULL };
647 proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL, ett_ipmi_app_32_rs_byte1,
648 byte1, ENC_LITTLE_ENDIAN, 0);
649 proto_tree_add_bitmask_text(tree, tvb, 1, 1, NULL, NULL, ett_ipmi_app_32_rs_byte2,
650 byte2, ENC_LITTLE_ENDIAN, 0);
653 /* Get Message
655 static const value_string cc33[] = {
656 { 0x80, "Data not available (queue/buffer empty)" },
657 { 0, NULL }
660 static void
661 rs33(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
663 static int * const byte1[] = { &hf_ipmi_app_33_rs_chan,
664 &hf_ipmi_app_33_rs_priv, NULL };
665 tvbuff_t *next;
666 ipmi_dissect_arg_t arg;
668 proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL, ett_ipmi_app_33_rs_byte1,
669 byte1, ENC_LITTLE_ENDIAN, 0);
671 next = tvb_new_subset_remaining(tvb, 1);
673 arg.context = IPMI_E_GETMSG;
674 arg.channel = tvb_get_uint8(tvb, 0) & 0xF;
675 arg.flags = 0;
677 do_dissect_ipmb(next, pinfo, tree,
678 hf_ipmi_app_33_msg, ett_ipmi_app_33_msg, &arg);
683 /* Send Message
685 static void
686 rq34(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
688 static int * const byte1[] = { &hf_ipmi_app_34_track, &hf_ipmi_app_34_encrypt,
689 &hf_ipmi_app_34_auth, &hf_ipmi_app_34_chan, NULL };
690 tvbuff_t *next;
691 ipmi_dissect_arg_t arg;
693 proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL,
694 ett_ipmi_app_34_byte1, byte1, ENC_LITTLE_ENDIAN, 0);
696 next = tvb_new_subset_remaining(tvb, 1);
698 arg.context = IPMI_E_SENDMSG_RQ;
699 arg.channel = tvb_get_uint8(tvb, 0) & 0xF;
700 arg.flags = 0;
702 do_dissect_ipmb(next, pinfo, tree,
703 hf_ipmi_app_34_msg, ett_ipmi_app_34_msg, &arg);
706 static void
707 rs34(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
709 if (tvb_captured_length(tvb)) {
710 ipmi_dissect_arg_t arg;
712 arg.context = IPMI_E_SENDMSG_RS;
713 arg.channel = 0;
714 arg.flags = 0;
716 do_dissect_ipmb(tvb, pinfo, tree,
717 hf_ipmi_app_34_msg, ett_ipmi_app_34_msg, &arg);
721 static const value_string cc34[] = {
722 { 0x80, "Invalid Session Handle" },
723 { 0x81, "Lost Arbitration" },
724 { 0x82, "Bus Error" },
725 { 0x83, "NAK on Write" },
726 { 0, NULL }
729 /* Read Event Message Buffer
731 static const value_string cc35[] = {
732 { 0x80, "Data not available (queue/buffer empty)" },
733 { 0, NULL }
736 /* Get Channel Authentication Capabilities
738 static void
739 rq38(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
741 static int * const byte1[] = { &hf_ipmi_app_38_rq_ipmi20, &hf_ipmi_app_38_rq_chan, NULL };
742 static int * const byte2[] = { &hf_ipmi_app_38_rq_priv, NULL };
744 proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL, ett_ipmi_app_38_rq_byte1, byte1, ENC_LITTLE_ENDIAN, 0);
745 proto_tree_add_bitmask_text(tree, tvb, 1, 1, NULL, NULL, ett_ipmi_app_38_rq_byte2, byte2, ENC_LITTLE_ENDIAN, 0);
748 static void
749 rs38(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
751 static int * const byte1[] = { &hf_ipmi_app_38_rs_chan, NULL };
752 static int * const byte2[] = { &hf_ipmi_app_38_rs_ipmi20, &hf_ipmi_app_38_rs_auth_oem,
753 &hf_ipmi_app_38_rs_auth_straight, &hf_ipmi_app_38_rs_auth_md5, &hf_ipmi_app_38_rs_auth_md2,
754 &hf_ipmi_app_38_rs_auth_none, NULL };
755 static int * const byte3[] = { &hf_ipmi_app_38_rs_kg, &hf_ipmi_app_38_rs_permsg, &hf_ipmi_app_38_rs_userauth,
756 &hf_ipmi_app_38_rs_user_nonnull, &hf_ipmi_app_38_rs_user_null, &hf_ipmi_app_38_rs_user_anon, NULL };
757 static int * const byte4[] = { &hf_ipmi_app_38_rs_ipmi20_conn, &hf_ipmi_app_38_rs_ipmi15_conn, NULL };
759 proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL, ett_ipmi_app_38_rs_byte1, byte1, ENC_LITTLE_ENDIAN, 0);
760 proto_tree_add_bitmask_text(tree, tvb, 1, 1, NULL, NULL, ett_ipmi_app_38_rs_byte2, byte2, ENC_LITTLE_ENDIAN, BMT_NO_FALSE);
761 proto_tree_add_bitmask_text(tree, tvb, 2, 1, NULL, NULL, ett_ipmi_app_38_rs_byte3, byte3, ENC_LITTLE_ENDIAN, BMT_NO_FALSE);
762 proto_tree_add_bitmask_text(tree, tvb, 3, 1, "Supported connections: ", "None",
763 ett_ipmi_app_38_rs_byte4, byte4, ENC_LITTLE_ENDIAN, 0);
764 proto_tree_add_item(tree, hf_ipmi_app_38_rs_oem_iana, tvb, 4, 3, ENC_LITTLE_ENDIAN);
765 proto_tree_add_item(tree, hf_ipmi_app_38_rs_oem_aux, tvb, 7, 1, ENC_LITTLE_ENDIAN);
768 /* Get Session Challenge
770 static void
771 rq39(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
773 static int * const byte1[] = { &hf_ipmi_app_39_authtype, NULL };
775 proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL,
776 ett_ipmi_app_39_byte1, byte1, ENC_LITTLE_ENDIAN, 0);
777 proto_tree_add_item(tree, hf_ipmi_app_39_user, tvb, 1, 16, ENC_ASCII);
780 static void
781 rs39(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
783 proto_tree_add_item(tree, hf_ipmi_app_39_temp_session, tvb, 0, 4, ENC_LITTLE_ENDIAN);
784 proto_tree_add_item(tree, hf_ipmi_app_39_challenge, tvb, 4, 16, ENC_NA);
787 static const value_string cc39[] = {
788 { 0x81, "Invalid user name" },
789 { 0x82, "Null user name (User 1) not enabled" },
790 { 0, NULL }
793 /* Activate Session
795 static void
796 rq3a(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
798 static int * const byte1[] = { &hf_ipmi_app_3a_authtype, NULL };
799 static int * const byte2[] = { &hf_ipmi_app_3a_privlevel, NULL };
801 proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL,
802 ett_ipmi_app_3a_rq_byte1, byte1, ENC_LITTLE_ENDIAN, 0);
803 proto_tree_add_bitmask_text(tree, tvb, 1, 1, NULL, NULL,
804 ett_ipmi_app_3a_rq_byte2, byte2, ENC_LITTLE_ENDIAN, 0);
805 proto_tree_add_item(tree, hf_ipmi_app_3a_authcode, tvb, 2, 16, ENC_NA);
806 proto_tree_add_item(tree, hf_ipmi_app_3a_outbound_seq, tvb, 18, 4, ENC_LITTLE_ENDIAN);
809 static void
810 rs3a(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
812 static int * const byte1[] = { &hf_ipmi_app_3a_authtype_session, NULL };
813 static int * const byte10[] = { &hf_ipmi_app_3a_maxpriv_session, NULL };
815 proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL,
816 ett_ipmi_app_3a_rs_byte1, byte1, ENC_LITTLE_ENDIAN, 0);
817 proto_tree_add_item(tree, hf_ipmi_app_3a_session_id, tvb, 1, 4, ENC_LITTLE_ENDIAN);
818 proto_tree_add_item(tree, hf_ipmi_app_3a_inbound_seq, tvb, 5, 4, ENC_LITTLE_ENDIAN);
819 proto_tree_add_bitmask_text(tree, tvb, 9, 1, NULL, NULL,
820 ett_ipmi_app_3a_rs_byte10, byte10, ENC_LITTLE_ENDIAN, 0);
823 static const value_string cc3a[] = {
824 { 0x81, "No session slot available" },
825 { 0x82, "No slot available for given user" },
826 { 0x83, "No slot available to support user due to maximum privilege capability" },
827 { 0x84, "Session sequence number out-of-range" },
828 { 0x85, "Invalid session ID in request" },
829 { 0x86, "Requested maximum privilege level exceeds user and/or channel privilege limit" },
830 { 0, NULL }
833 /* Set Session Privilege Level
835 static void
836 rq3b(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
838 static int * const byte1[] = { &hf_ipmi_app_3b_req_priv, NULL };
840 proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL,
841 ett_ipmi_app_3b_rq_byte1, byte1, ENC_LITTLE_ENDIAN, 0);
844 static void
845 rs3b(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
847 static int * const byte1[] = { &hf_ipmi_app_3b_new_priv, NULL };
849 proto_tree_add_bitmask_text(tree, tvb, 0, 1, NULL, NULL,
850 ett_ipmi_app_3b_rs_byte1, byte1, ENC_LITTLE_ENDIAN, 0);
853 static const value_string cc3b[] = {
854 { 0x80, "Requested level not available for this user" },
855 { 0x81, "Requested level exceeds Channel and/or User Privilege Limit" },
856 { 0x82, "Cannot disable User Level authentication" },
857 { 0, NULL }
860 /* Close Session
862 static void
863 rq3c(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree)
865 proto_tree_add_item(tree, hf_ipmi_app_3c_session_id, tvb, 0, 4, ENC_LITTLE_ENDIAN);
866 if (tvb_captured_length(tvb) > 4) {
867 proto_tree_add_item(tree, hf_ipmi_app_3c_session_handle, tvb, 4, 1, ENC_LITTLE_ENDIAN);
871 static const value_string cc3c[] = {
872 { 0x87, "Invalid Session ID in request" },
873 { 0x88, "Invalid Session Handle in request" },
874 { 0, NULL }
877 static const value_string cc40[] = {
878 { 0x82, "Set not supported on selected channel" },
879 { 0x83, "Access mode not supported" },
880 { 0, NULL }
883 static const value_string cc41[] = {
884 { 0x82, "Command not supported for selected channel" },
885 { 0, NULL }
888 static const value_string cc47[] = {
889 { 0x80, "Password test failed: password data does not match stored value" },
890 { 0x81, "Password test failed: wrong password size was used" },
891 { 0, NULL }
894 static const value_string cc48[] = {
895 { 0x80, "Payload already active on another session" },
896 { 0x81, "Payload type is disabled" },
897 { 0x82, "Payload activation limit reached" },
898 { 0x83, "Cannot activate payload with encryption" },
899 { 0x84, "Cannot activate payload without encryption" },
900 { 0, NULL }
903 static const value_string cc49[] = {
904 { 0x80, "Payload already deactivated" },
905 { 0x81, "Payload type is disabled" },
906 { 0, NULL }
909 static const value_string cc4f[] = {
910 { 0x80, "Payload type not available on given channel" },
911 { 0, NULL }
914 static const value_string cc50[] = {
915 { 0x80, "OEM Payload IANA and/or Payload ID not supported" },
916 { 0, NULL }
919 static const value_string cc52[] = {
920 { 0x81, "Lost Arbitration" },
921 { 0x82, "Bus Error" },
922 { 0x83, "NAK on Write" },
923 { 0x84, "Truncated Read" },
924 { 0, NULL }
927 static const value_string cc55[] = {
928 { 0x80, "Operation not supported for given payload type" },
929 { 0x81, "Operation not allowed under present configuration" },
930 { 0x82, "Encryption not available for session that payload type is active under" },
931 { 0x83, "Payload instance is not presently active" },
932 { 0, NULL }
935 static const value_string cc56[] = {
936 { 0x80, "Cannot perform set/confirm, key is locked" },
937 { 0x81, "Insufficient key bytes" },
938 { 0x82, "Too many key bytes" },
939 { 0x83, "Key value does not meet criteria for specified type" },
940 { 0x84, "KR is not used" },
941 { 0, NULL }
944 static const value_string cc58[] = {
945 { 0x80, "Parameter not supported" },
946 { 0x81, "Attempt to set the set-in-progress when not in set-complete state" },
947 { 0x82, "Attempt to write read-only parameter" },
948 { 0, NULL }
951 static const value_string cc59[] = {
952 { 0x80, "Parameter not supported" },
953 { 0, NULL }
956 static const value_string cc60[] = {
957 { 0x80, "Attempt to enable unsupported/unconfigurable command" },
958 { 0, NULL }
961 static const value_string cc62[] = {
962 { 0x80, "Attempt to enable unsupported/unconfigurable sub-function" },
963 { 0, NULL }
966 static const ipmi_cmd_t cmd_app[] = {
967 /* IPM Device Global Commands */
968 { 0x01, NULL, rs01, NULL, NULL, "Get Device ID", 0 },
969 { 0x02, NULL, NULL, NULL, NULL, "Cold Reset", 0 },
970 { 0x03, NULL, NULL, NULL, NULL, "Warm Reset", 0 },
971 { 0x04, NULL, rs04, NULL, NULL, "Get Self Test Results", 0 },
972 { 0x05, rq05, NULL, NULL, NULL, "Manufacturing Test On", 0 },
973 { 0x06, rq06, NULL, NULL, NULL, "Set ACPI Power State", 0 },
974 { 0x07, NULL, rs07, NULL, NULL, "Get ACPI Power State", 0 },
975 { 0x08, NULL, rs08, NULL, NULL, "Get Device GUID", 0 },
976 { 0x09, IPMI_TBD, NULL, NULL, "Get NetFn Support", 0 },
977 { 0x0a, IPMI_TBD, NULL, NULL, "Get Command Support", 0 },
978 { 0x0b, IPMI_TBD, NULL, NULL, "Get Command Sub-function Support", 0 },
979 { 0x0c, IPMI_TBD, NULL, NULL, "Get Configurable Commands", 0 },
980 { 0x0d, IPMI_TBD, NULL, NULL, "Get Configurable Command Sub-functions", 0 },
982 /* BMC Watchdog Timer Commands */
983 { 0x22, NULL, NULL, cc22, NULL, "Reset Watchdog Timer", 0 },
984 { 0x24, rq24, NULL, NULL, NULL, "Set Watchdog Timer", 0 },
985 { 0x25, NULL, rs25, NULL, NULL, "Get Watchdog Timer", 0 },
987 /* BMC Device and Messaging Commands */
988 { 0x2e, rq2e, NULL, NULL, NULL, "Set BMC Global Enables", 0 },
989 { 0x2f, NULL, rs2f, NULL, NULL, "Get BMC Global Enables", 0 },
990 { 0x30, rq30, NULL, NULL, NULL, "Clear Message Flags", 0 },
991 { 0x31, NULL, rs31, NULL, NULL, "Get Message Flags", 0 },
992 { 0x32, rq32, rs32, NULL, NULL, "Enable Message Channel Receive", 0 },
993 { 0x33, NULL, rs33, cc33, NULL, "Get Message", CMD_CALLRQ },
994 { 0x34, rq34, rs34, cc34, NULL, "Send Message", CMD_CALLRQ },
995 { 0x35, IPMI_TBD, cc35, NULL, "Read Event Message Buffer", 0 },
996 { 0x36, IPMI_TBD, NULL, NULL, "Get BT Interface Capabilities", 0 },
997 { 0x37, IPMI_TBD, NULL, NULL, "Get System GUID", 0 },
998 { 0x38, rq38, rs38, NULL, NULL, "Get Channel Authentication Capabilities", 0 },
999 { 0x39, rq39, rs39, cc39, NULL, "Get Session Challenge", 0 },
1000 { 0x3a, rq3a, rs3a, cc3a, NULL, "Activate Session", 0 },
1001 { 0x3b, rq3b, rs3b, cc3b, NULL, "Set Session Privilege Level", 0 },
1002 { 0x3c, rq3c, NULL, cc3c, NULL, "Close Session", 0 },
1003 { 0x3d, IPMI_TBD, NULL, NULL, "Get Session Info", 0 },
1004 { 0x3f, IPMI_TBD, NULL, NULL, "Get AuthCode", 0 },
1005 { 0x40, IPMI_TBD, cc40, NULL, "Set Channel Access", 0 },
1006 { 0x41, IPMI_TBD, cc41, NULL, "Get Channel Access", 0 },
1007 { 0x42, IPMI_TBD, NULL, NULL, "Get Channel Info", 0 },
1008 { 0x43, IPMI_TBD, NULL, NULL, "Set User Access", 0 },
1009 { 0x44, IPMI_TBD, NULL, NULL, "Get User Access", 0 },
1010 { 0x45, IPMI_TBD, NULL, NULL, "Set User Name", 0 },
1011 { 0x46, IPMI_TBD, NULL, NULL, "Get User Name", 0 },
1012 { 0x47, IPMI_TBD, cc47, NULL, "Set User Password", 0 },
1013 { 0x48, IPMI_TBD, cc48, NULL, "Activate Payload", 0 },
1014 { 0x49, IPMI_TBD, cc49, NULL, "Deactivate Payload", 0 },
1015 { 0x4a, IPMI_TBD, NULL, NULL, "Get Payload Activation Status", 0 },
1016 { 0x4b, IPMI_TBD, NULL, NULL, "Get Payload Instance Info", 0 },
1017 { 0x4c, IPMI_TBD, NULL, NULL, "Set User Payload Access", 0 },
1018 { 0x4d, IPMI_TBD, NULL, NULL, "Get User Payload Access", 0 },
1019 { 0x4e, IPMI_TBD, NULL, NULL, "Get Channel Payload Support", 0 },
1020 { 0x4f, IPMI_TBD, cc4f, NULL, "Get Channel Payload Version", 0 },
1021 { 0x50, IPMI_TBD, cc50, NULL, "Get Channel OEM Payload Info", 0 },
1022 { 0x52, IPMI_TBD, cc52, NULL, "Master Write-Read", 0 },
1023 { 0x54, IPMI_TBD, NULL, NULL, "Get Channel Cipher Suites", 0 },
1024 { 0x55, IPMI_TBD, cc55, NULL, "Suspend/Resume Payload Encryption", 0 },
1025 { 0x56, IPMI_TBD, cc56, NULL, "Set Channel Security Keys", 0 },
1026 { 0x57, IPMI_TBD, NULL, NULL, "Get System Interface Capabilities", 0 },
1027 { 0x58, IPMI_TBD, cc58, NULL, "Set System Info Parameters", 0 },
1028 { 0x59, IPMI_TBD, cc59, NULL, "Get System Info Parameters", 0 },
1030 /* Device "Global" commands, continued */
1031 { 0x60, IPMI_TBD, cc60, NULL, "Set Command Enables", 0 },
1032 { 0x61, IPMI_TBD, NULL, NULL, "Get Command Enables", 0 },
1033 { 0x62, IPMI_TBD, cc62, NULL, "Set Command Sub-function Enables", 0 },
1034 { 0x63, IPMI_TBD, NULL, NULL, "Get Command Sub-function Enables", 0 },
1035 { 0x64, IPMI_TBD, NULL, NULL, "Get OEM NetFn IANA Support", 0 },
1038 void
1039 proto_register_ipmi_app(void)
1041 static hf_register_info hf[] = {
1042 { &hf_ipmi_app_01_dev_id,
1043 { "Device ID",
1044 "ipmi.app00.dev.id", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
1045 { &hf_ipmi_app_01_dev_prov_sdr,
1046 { "Device provides Device SDRs",
1047 "ipmi.app00.dev.provides_dev_sdr", FT_BOOLEAN, 8, NULL, 0x80, NULL, HFILL }},
1048 { &hf_ipmi_app_01_dev_rev,
1049 { "Device Revision (binary encoded)",
1050 "ipmi.app00.dev.rev", FT_UINT8, BASE_HEX, NULL, 0x0f, NULL, HFILL }},
1051 { &hf_ipmi_app_01_dev_avail,
1052 { "Device availability",
1053 "ipmi.app01.dev.avail", FT_BOOLEAN, 8, TFS(&tfs_01_dev_avail), 0x80, NULL, HFILL }},
1054 { &hf_ipmi_app_01_fw_rev_maj,
1055 { "Major Firmware Revision (binary encoded)",
1056 "ipmi.app01.fw.major", FT_UINT8, BASE_HEX, NULL, 0x7f, NULL, HFILL }},
1057 { &hf_ipmi_app_01_fw_rev_min,
1058 { "Minor Firmware Revision (BCD encoded)",
1059 "ipmi.app01.fw.minor", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
1060 { &hf_ipmi_app_01_ipmi_version,
1061 { "IPMI version",
1062 "ipmi.app01.ipmi.version", FT_UINT8, BASE_CUSTOM, CF_FUNC(ipmi_fmt_version), 0, NULL, HFILL }},
1063 { &hf_ipmi_app_01_ipmi_ads_chassis,
1064 { "Chassis",
1065 "ipmi.app01.ads.chassis", FT_BOOLEAN, 8, NULL, 0x80, NULL, HFILL }},
1066 { &hf_ipmi_app_01_ipmi_ads_bridge,
1067 { "Bridge",
1068 "ipmi.app01.ads.bridge", FT_BOOLEAN, 8, NULL, 0x40, NULL, HFILL }},
1069 { &hf_ipmi_app_01_ipmi_ads_ipmb_ev_gen,
1070 { "Event Generator",
1071 "ipmi.app01.ads.ipmb_ev_gen", FT_BOOLEAN, 8, NULL, 0x20, NULL, HFILL }},
1072 { &hf_ipmi_app_01_ipmi_ads_ipmb_ev_recv,
1073 { "Event Receiver",
1074 "ipmi.app01.ads.ipmb_ev_recv", FT_BOOLEAN, 8, NULL, 0x10, NULL, HFILL }},
1075 { &hf_ipmi_app_01_ipmi_ads_fru,
1076 { "FRU Inventory",
1077 "ipmi.app01.ads.fru", FT_BOOLEAN, 8, NULL, 0x08, NULL, HFILL }},
1078 { &hf_ipmi_app_01_ipmi_ads_sel,
1079 { "SEL",
1080 "ipmi.app01.ads.sel", FT_BOOLEAN, 8, NULL, 0x04, NULL, HFILL }},
1081 { &hf_ipmi_app_01_ipmi_ads_sdr,
1082 { "SDR Repository",
1083 "ipmi.app01.ads.sdr", FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL }},
1084 { &hf_ipmi_app_01_ipmi_ads_sensor,
1085 { "Sensor",
1086 "ipmi.app01.ads.sensor", FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL }},
1087 { &hf_ipmi_app_01_manufacturer,
1088 { "Manufacturer ID",
1089 "ipmi.app01.manufacturer", FT_UINT24, BASE_DEC, NULL, 0, NULL, HFILL }},
1090 { &hf_ipmi_app_01_product,
1091 { "Product ID",
1092 "ipmi.app01.product", FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL }},
1093 { &hf_ipmi_app_01_fw_aux,
1094 { "Auxiliary Firmware Revision Information",
1095 "ipmi.app01.fw.aux", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
1097 { &hf_ipmi_app_04_result,
1098 { "Self test result",
1099 "ipmi.app04.self_test_result", FT_UINT8, BASE_HEX, VALS(vals_04_result), 0, NULL, HFILL }},
1100 { &hf_ipmi_app_04_fail,
1101 { "Self-test error bitfield",
1102 "ipmi.app04.fail", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
1103 { &hf_ipmi_app_04_fail_sel,
1104 { "Cannot access SEL device",
1105 "ipmi.app04.fail.sel", FT_BOOLEAN, 8, TFS(&tfs_04_fail_unknown), 0x80, NULL, HFILL }},
1106 { &hf_ipmi_app_04_fail_sdr,
1107 { "Cannot access SDR Repository",
1108 "ipmi.app04.fail.sdr", FT_BOOLEAN, 8, TFS(&tfs_04_fail_unknown), 0x40, NULL, HFILL }},
1109 { &hf_ipmi_app_04_fail_bmc_fru,
1110 { "Cannot access BMC FRU device",
1111 "ipmi.app04.fail.bmc_fru", FT_BOOLEAN, 8, TFS(&tfs_04_fail_unknown), 0x20, NULL, HFILL }},
1112 { &hf_ipmi_app_04_fail_ipmb_sig,
1113 { "IPMB signal lines do not respond",
1114 "ipmi.app04.fail.ipmb_sig", FT_BOOLEAN, 8, TFS(&tfs_04_fail_unknown), 0x10, NULL, HFILL }},
1115 { &hf_ipmi_app_04_fail_sdr_empty,
1116 { "SDR Repository is empty",
1117 "ipmi.app04.fail.sdr_empty", FT_BOOLEAN, 8, TFS(&tfs_04_fail_unknown), 0x08, NULL, HFILL }},
1118 { &hf_ipmi_app_04_fail_iua,
1119 { "Internal Use Area of BMC FRU corrupted",
1120 "ipmi.app04.fail.iua", FT_BOOLEAN, 8, TFS(&tfs_04_fail_unknown), 0x04, NULL, HFILL }},
1121 { &hf_ipmi_app_04_fail_bb_fw,
1122 { "Controller update boot block firmware corrupted",
1123 "ipmi.app04.fail.bb_fw", FT_BOOLEAN, 8, TFS(&tfs_04_fail_unknown), 0x02, NULL, HFILL }},
1124 { &hf_ipmi_app_04_fail_oper_fw,
1125 { "Controller operational firmware corrupted",
1126 "ipmi.app04.fail.oper_fw", FT_BOOLEAN, 8, TFS(&tfs_04_fail_unknown), 0x01, NULL, HFILL }},
1128 { &hf_ipmi_app_05_devspec,
1129 { "Device-specific parameters",
1130 "ipmi.app05.devspec", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
1132 { &hf_ipmi_app_06_syspwr_set,
1133 { "System Power State",
1134 "ipmi.app06.syspwr.set", FT_BOOLEAN, 8, TFS(&tfs_06_pwr), 0x80, NULL, HFILL }},
1135 { &hf_ipmi_app_06_syspwr_enum,
1136 { "System Power State enumeration",
1137 "ipmi.app06.syspwr.enum", FT_UINT8, BASE_HEX, VALS(vals_06_syspwr), 0x7f, NULL, HFILL }},
1138 { &hf_ipmi_app_06_devpwr_set,
1139 { "Device Power State",
1140 "ipmi.app06.devpwr.set", FT_BOOLEAN, 8, TFS(&tfs_06_pwr), 0x80, NULL, HFILL }},
1141 { &hf_ipmi_app_06_devpwr_enum,
1142 { "Device Power State enumeration",
1143 "ipmi.app06.devpwr.enum", FT_UINT8, BASE_HEX, VALS(vals_06_devpwr), 0x7f, NULL, HFILL }},
1145 { &hf_ipmi_app_07_syspwr_enum,
1146 { "ACPI System Power State",
1147 "ipmi.app07.syspwr", FT_UINT8, BASE_HEX, VALS(vals_07_syspwr), 0x7f, NULL, HFILL }},
1148 { &hf_ipmi_app_07_devpwr_enum,
1149 { "ACPI Device Power State",
1150 "ipmi.app07.devpwr", FT_UINT8, BASE_HEX, VALS(vals_07_devpwr), 0x7f, NULL, HFILL }},
1152 { &hf_ipmi_app_08_guid,
1153 { "GUID",
1154 "ipmi.app08.guid", FT_GUID, BASE_NONE, NULL, 0, NULL, HFILL }},
1156 { &hf_ipmi_app_24_timer_use_dont_log,
1157 { "Don't log",
1158 "ipmi.app24.timer_use.dont_log", FT_BOOLEAN, 8, NULL, 0x80, NULL, HFILL }},
1159 { &hf_ipmi_app_24_timer_use_dont_stop,
1160 { "Don't stop timer on Set Watchdog command",
1161 "ipmi.app24.timer_use.dont_stop", FT_BOOLEAN, 8, NULL, 0x40, NULL, HFILL }},
1162 { &hf_ipmi_app_24_timer_use_timer_use,
1163 { "Timer use",
1164 "ipmi.app24.timer_use.timer_use", FT_UINT8, BASE_HEX, VALS(vals_24_timer_use), 0x07, NULL, HFILL }},
1165 { &hf_ipmi_app_24_timer_action_interrupt,
1166 { "Pre-timeout interrupt",
1167 "ipmi.app24.timer_action.interrupt", FT_UINT8, BASE_HEX, VALS(vals_24_timer_action_interrupt), 0x70, NULL, HFILL }},
1168 { &hf_ipmi_app_24_timer_action_timeout_action,
1169 { "Timeout action",
1170 "ipmi.app24.timer_action.timeout", FT_UINT8, BASE_HEX, VALS(vals_24_timer_action_timeout), 0x07, NULL, HFILL }},
1171 { &hf_ipmi_app_24_pretimeout,
1172 { "Pre-timeout interval",
1173 "ipmi.app24.pretimeout", FT_UINT8, BASE_CUSTOM, CF_FUNC(ipmi_fmt_1s_1based), 0, NULL, HFILL }},
1174 { &hf_ipmi_app_24_expiration_flags_oem,
1175 { "OEM",
1176 "ipmi.app24.exp_flags.oem", FT_BOOLEAN, 8, TFS(&tfs_24_exp_flags), 0x20, NULL, HFILL }},
1177 { &hf_ipmi_app_24_expiration_flags_smsos,
1178 { "SMS/OS",
1179 "ipmi.app24.exp_flags.sms_os", FT_BOOLEAN, 8, TFS(&tfs_24_exp_flags), 0x10, NULL, HFILL }},
1180 { &hf_ipmi_app_24_expiration_flags_osload,
1181 { "OS Load",
1182 "ipmi.app24.exp_flags.osload", FT_BOOLEAN, 8, TFS(&tfs_24_exp_flags), 0x08, NULL, HFILL }},
1183 { &hf_ipmi_app_24_expiration_flags_biospost,
1184 { "BIOS/POST",
1185 "ipmi.app24.exp_flags.biospost", FT_BOOLEAN, 8, TFS(&tfs_24_exp_flags), 0x04, NULL, HFILL }},
1186 { &hf_ipmi_app_24_expiration_flags_biosfrb2,
1187 { "BIOS FRB2",
1188 "ipmi.app24.exp_flags.biosfrb2", FT_BOOLEAN, 8, TFS(&tfs_24_exp_flags), 0x02, NULL, HFILL }},
1189 { &hf_ipmi_app_24_initial_countdown,
1190 { "Initial countdown value (100ms/count)",
1191 "ipmi.app24.initial_countdown", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
1193 { &hf_ipmi_app_25_timer_use_dont_log,
1194 { "Don't log",
1195 "ipmi.app25.timer_use.dont_log", FT_BOOLEAN, 8, NULL, 0x80, NULL, HFILL }},
1196 { &hf_ipmi_app_25_timer_use_started,
1197 { "Started",
1198 "ipmi.app25.timer_use.started", FT_BOOLEAN, 8, NULL, 0x40, NULL, HFILL }},
1199 { &hf_ipmi_app_25_timer_use_timer_use,
1200 { "Timer user",
1201 "ipmi.app25.timer_use.timer_use", FT_UINT8, BASE_HEX, VALS(vals_24_timer_use), 0x07, NULL, HFILL }},
1202 { &hf_ipmi_app_25_timer_action_interrupt,
1203 { "Pre-timeout interrupt",
1204 "ipmi.app25.timer_action.interrupt", FT_UINT8, BASE_HEX, VALS(vals_24_timer_action_interrupt), 0x70, NULL, HFILL }},
1205 { &hf_ipmi_app_25_timer_action_timeout_action,
1206 { "Timeout action",
1207 "ipmi.app25.timer_action.timeout", FT_UINT8, BASE_HEX, VALS(vals_24_timer_action_timeout), 0x07, NULL, HFILL }},
1208 { &hf_ipmi_app_25_pretimeout,
1209 { "Pre-timeout interval",
1210 "ipmi.app25.pretimeout", FT_UINT8, BASE_CUSTOM, CF_FUNC(ipmi_fmt_1s_1based), 0, NULL, HFILL }},
1211 { &hf_ipmi_app_25_expiration_flags_oem,
1212 { "OEM",
1213 "ipmi.app25.exp_flags.oem", FT_BOOLEAN, 8, TFS(&tfs_24_exp_flags), 0x20, NULL, HFILL }},
1214 { &hf_ipmi_app_25_expiration_flags_smsos,
1215 { "SMS/OS",
1216 "ipmi.app25.exp_flags.sms_os", FT_BOOLEAN, 8, TFS(&tfs_24_exp_flags), 0x10, NULL, HFILL }},
1217 { &hf_ipmi_app_25_expiration_flags_osload,
1218 { "OS Load",
1219 "ipmi.app25.exp_flags.osload", FT_BOOLEAN, 8, TFS(&tfs_24_exp_flags), 0x08, NULL, HFILL }},
1220 { &hf_ipmi_app_25_expiration_flags_biospost,
1221 { "BIOS/POST",
1222 "ipmi.app25.exp_flags.biospost", FT_BOOLEAN, 8, TFS(&tfs_24_exp_flags), 0x04, NULL, HFILL }},
1223 { &hf_ipmi_app_25_expiration_flags_biosfrb2,
1224 { "BIOS FRB2",
1225 "ipmi.app25.exp_flags.biosfrb2", FT_BOOLEAN, 8, TFS(&tfs_24_exp_flags), 0x02, NULL, HFILL }},
1226 { &hf_ipmi_app_25_initial_countdown,
1227 { "Initial countdown value (100ms/count)",
1228 "ipmi.app25.initial_countdown", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
1229 { &hf_ipmi_app_25_present_countdown,
1230 { "Present countdown value (100ms/count)",
1231 "ipmi.app25.present_countdown", FT_UINT16, BASE_DEC, NULL, 0, NULL, HFILL }},
1233 { &hf_ipmi_app_2e_byte1_oem2,
1234 { "OEM 2",
1235 "ipmi.app2e.bmc_global_enables.oem2", FT_BOOLEAN, 8, TFS(&tfs_2e_enable), 0x80, NULL, HFILL }},
1236 { &hf_ipmi_app_2e_byte1_oem1,
1237 { "OEM 1",
1238 "ipmi.app2e.bmc_global_enables.oem1", FT_BOOLEAN, 8, TFS(&tfs_2e_enable), 0x40, NULL, HFILL }},
1239 { &hf_ipmi_app_2e_byte1_oem0,
1240 { "OEM 0",
1241 "ipmi.app2e.bmc_global_enables.oem0", FT_BOOLEAN, 8, TFS(&tfs_2e_enable), 0x20, NULL, HFILL }},
1242 { &hf_ipmi_app_2e_byte1_sel,
1243 { "System Event Logging",
1244 "ipmi.app2e.bmc_global_enables.sel", FT_BOOLEAN, 8, TFS(&tfs_2e_enable), 0x08, NULL, HFILL }},
1245 { &hf_ipmi_app_2e_byte1_emb,
1246 { "Event Message Buffer",
1247 "ipmi.app2e.bmc_global_enables.emb", FT_BOOLEAN, 8, TFS(&tfs_2e_enable), 0x04, NULL, HFILL }},
1248 { &hf_ipmi_app_2e_byte1_emb_full_intr,
1249 { "Event Message Buffer Full Interrupt",
1250 "ipmi.app2e.bmc_global_enables.emb_full_intr", FT_BOOLEAN, 8, TFS(&tfs_2e_enable), 0x02, NULL, HFILL }},
1251 { &hf_ipmi_app_2e_byte1_rmq_intr,
1252 { "Receive Message Queue Interrupt",
1253 "ipmi.app2e.bmc_global_enables.rmq_intr", FT_BOOLEAN, 8, TFS(&tfs_2e_enable), 0x01, NULL, HFILL }},
1255 { &hf_ipmi_app_2f_byte1_oem2,
1256 { "OEM 2",
1257 "ipmi.app2f.bmc_global_enables.oem2", FT_BOOLEAN, 8, TFS(&tfs_2f_enabled), 0x80, NULL, HFILL }},
1258 { &hf_ipmi_app_2f_byte1_oem1,
1259 { "OEM 1",
1260 "ipmi.app2f.bmc_global_enables.oem1", FT_BOOLEAN, 8, TFS(&tfs_2f_enabled), 0x40, NULL, HFILL }},
1261 { &hf_ipmi_app_2f_byte1_oem0,
1262 { "OEM 0",
1263 "ipmi.app2f.bmc_global_enables.oem0", FT_BOOLEAN, 8, TFS(&tfs_2f_enabled), 0x20, NULL, HFILL }},
1264 { &hf_ipmi_app_2f_byte1_sel,
1265 { "System Event Logging",
1266 "ipmi.app2f.bmc_global_enables.sel", FT_BOOLEAN, 8, TFS(&tfs_2f_enabled), 0x08, NULL, HFILL }},
1267 { &hf_ipmi_app_2f_byte1_emb,
1268 { "Event Message Buffer",
1269 "ipmi.app2f.bmc_global_enables.emb", FT_BOOLEAN, 8, TFS(&tfs_2f_enabled), 0x04, NULL, HFILL }},
1270 { &hf_ipmi_app_2f_byte1_emb_full_intr,
1271 { "Event Message Buffer Full Interrupt",
1272 "ipmi.app2f.bmc_global_enables.emb_full_intr", FT_BOOLEAN, 8, TFS(&tfs_2f_enabled), 0x02, NULL, HFILL }},
1273 { &hf_ipmi_app_2f_byte1_rmq_intr,
1274 { "Receive Message Queue Interrupt",
1275 "ipmi.app2f.bmc_global_enables.rmq_intr", FT_BOOLEAN, 8, TFS(&tfs_2f_enabled), 0x01, NULL, HFILL }},
1277 { &hf_ipmi_app_30_byte1_oem2,
1278 { "OEM 2",
1279 "ipmi.app30.byte1.oem2", FT_BOOLEAN, 8, TFS(&tfs_30_clear), 0x80, NULL, HFILL }},
1280 { &hf_ipmi_app_30_byte1_oem1,
1281 { "OEM 1",
1282 "ipmi.app30.byte1.oem1", FT_BOOLEAN, 8, TFS(&tfs_30_clear), 0x40, NULL, HFILL }},
1283 { &hf_ipmi_app_30_byte1_oem0,
1284 { "OEM 0",
1285 "ipmi.app30.byte1.oem0", FT_BOOLEAN, 8, TFS(&tfs_30_clear), 0x20, NULL, HFILL }},
1286 { &hf_ipmi_app_30_byte1_wd_pretimeout,
1287 { "Watchdog pre-timeout interrupt flag",
1288 "ipmi.app30.byte1.wd_pretimeout", FT_BOOLEAN, 8, TFS(&tfs_30_clear), 0x08, NULL, HFILL }},
1289 { &hf_ipmi_app_30_byte1_emb,
1290 { "Event Message Buffer",
1291 "ipmi.app30.byte1.emb", FT_BOOLEAN, 8, TFS(&tfs_30_clear), 0x02, NULL, HFILL }},
1292 { &hf_ipmi_app_30_byte1_rmq,
1293 { "Receive Message Queue",
1294 "ipmi.app30.byte1.rmq", FT_BOOLEAN, 8, TFS(&tfs_30_clear), 0x01, NULL, HFILL }},
1296 { &hf_ipmi_app_31_byte1_oem2,
1297 { "OEM 2 data available",
1298 "ipmi.app31.byte1.oem2", FT_BOOLEAN, 8, NULL, 0x80, NULL, HFILL }},
1299 { &hf_ipmi_app_31_byte1_oem1,
1300 { "OEM 1 data available",
1301 "ipmi.app31.byte1.oem1", FT_BOOLEAN, 8, NULL, 0x40, NULL, HFILL }},
1302 { &hf_ipmi_app_31_byte1_oem0,
1303 { "OEM 0 data available",
1304 "ipmi.app31.byte1.oem0", FT_BOOLEAN, 8, NULL, 0x20, NULL, HFILL }},
1305 { &hf_ipmi_app_31_byte1_wd_pretimeout,
1306 { "Watchdog pre-timeout interrupt occurred",
1307 "ipmi.app31.byte1.wd_pretimeout", FT_BOOLEAN, 8, NULL, 0x08, NULL, HFILL }},
1308 { &hf_ipmi_app_31_byte1_emb,
1309 { "Event Message Buffer Full",
1310 "ipmi.app31.byte1.emb", FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL }},
1311 { &hf_ipmi_app_31_byte1_rmq,
1312 { "Receive Message Available",
1313 "ipmi.app31.byte1.rmq", FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL }},
1315 { &hf_ipmi_app_32_rq_chno,
1316 { "Channel",
1317 "ipmi.app32.rq_chno", FT_UINT8, BASE_CUSTOM, CF_FUNC(ipmi_fmt_channel), 0x0f, NULL, HFILL }},
1318 { &hf_ipmi_app_32_rq_state,
1319 { "Channel State",
1320 "ipmi.app32.rq_state", FT_UINT8, BASE_HEX, VALS(vals_32_state), 0x03, NULL, HFILL }},
1321 { &hf_ipmi_app_32_rs_chno,
1322 { "Channel",
1323 "ipmi.app32.rs_chno", FT_UINT8, BASE_CUSTOM, CF_FUNC(ipmi_fmt_channel), 0x0f, NULL, HFILL }},
1324 { &hf_ipmi_app_32_rs_state,
1325 { "Channel State",
1326 "ipmi.app32.rs_state", FT_BOOLEAN, 8, TFS(&tfs_32_state), 0x01, NULL, HFILL }},
1328 { &hf_ipmi_app_33_rs_chan,
1329 { "Channel",
1330 "ipmi.app33.chan", FT_UINT8, BASE_CUSTOM, CF_FUNC(ipmi_fmt_channel), 0x0f, NULL, HFILL }},
1331 { &hf_ipmi_app_33_rs_priv,
1332 { "Inferred privilege level",
1333 "ipmi.app33.priv", FT_UINT8, BASE_HEX, VALS(vals_XX_priv), 0xf0, NULL, HFILL }},
1334 { &hf_ipmi_app_33_msg,
1335 { "Message data",
1336 "ipmi.app33.msg", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
1338 { &hf_ipmi_app_34_track,
1339 { "Tracking",
1340 "ipmi.app34.track", FT_UINT8, BASE_HEX, VALS(vals_34_track), 0xc0, NULL, HFILL }},
1341 { &hf_ipmi_app_34_encrypt,
1342 { "Encryption required",
1343 "ipmi.app34.encrypt", FT_BOOLEAN, 8, NULL, 0x20, NULL, HFILL }},
1344 { &hf_ipmi_app_34_auth,
1345 { "Authentication required",
1346 "ipmi.app34.auth", FT_BOOLEAN, 8, NULL, 0x10, NULL, HFILL }},
1347 { &hf_ipmi_app_34_chan,
1348 { "Channel",
1349 "ipmi.app34.chan", FT_UINT8, BASE_CUSTOM, CF_FUNC(ipmi_fmt_channel), 0x0f, NULL, HFILL }},
1350 { &hf_ipmi_app_34_msg,
1351 { "Embedded message",
1352 "ipmi.app34.msg", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
1354 { &hf_ipmi_app_38_rq_ipmi20,
1355 { "Version compatibility",
1356 "ipmi.app38.rq_ipmi20", FT_UINT8, BASE_DEC, VALS(vals_38_ipmi20), 0x80, NULL, HFILL }},
1357 { &hf_ipmi_app_38_rq_chan,
1358 { "Channel",
1359 "ipmi.app38.rq_chan", FT_UINT8, BASE_CUSTOM, CF_FUNC(ipmi_fmt_channel), 0x0f, NULL, HFILL }},
1360 { &hf_ipmi_app_38_rq_priv,
1361 { "Requested privilege level",
1362 "ipmi.app38.rq_priv", FT_UINT8, BASE_HEX, VALS(vals_XX_priv), 0x0f, NULL, HFILL }},
1363 { &hf_ipmi_app_38_rs_chan,
1364 { "Channel",
1365 "ipmi.app38.rs_chan", FT_UINT8, BASE_CUSTOM, CF_FUNC(ipmi_fmt_channel), 0x0f, NULL, HFILL }},
1366 { &hf_ipmi_app_38_rs_ipmi20,
1367 { "Version compatibility",
1368 "ipmi.app38.rs_ipmi20", FT_UINT8, BASE_DEC, VALS(vals_38_ipmi20), 0x80, NULL, HFILL }},
1369 { &hf_ipmi_app_38_rs_auth_oem,
1370 { "OEM Proprietary authentication",
1371 "ipmi.app38.rs_auth_oem", FT_BOOLEAN, 8, TFS(&tfs_38_supp), 0x20, NULL, HFILL }},
1372 { &hf_ipmi_app_38_rs_auth_straight,
1373 { "Straight password/key",
1374 "ipmi.app38.rs_auth_straight", FT_BOOLEAN, 8, TFS(&tfs_38_supp), 0x10, NULL, HFILL }},
1375 { &hf_ipmi_app_38_rs_auth_md5,
1376 { "MD5",
1377 "ipmi.app38.rs_auth_md5", FT_BOOLEAN, 8, TFS(&tfs_38_supp), 0x04, NULL, HFILL }},
1378 { &hf_ipmi_app_38_rs_auth_md2,
1379 { "MD2",
1380 "ipmi.app38.rs_auth_md2", FT_BOOLEAN, 8, TFS(&tfs_38_supp), 0x02, NULL, HFILL }},
1381 { &hf_ipmi_app_38_rs_auth_none,
1382 { "No auth",
1383 "ipmi.app38.rs_auth_none", FT_BOOLEAN, 8, TFS(&tfs_38_supp), 0x01, NULL, HFILL }},
1384 { &hf_ipmi_app_38_rs_kg,
1385 { "KG",
1386 "ipmi.app38.rs_kg_status", FT_BOOLEAN, 8, TFS(&tfs_38_kg), 0x20, NULL, HFILL }},
1387 { &hf_ipmi_app_38_rs_permsg,
1388 { "Per-message Authentication disabled",
1389 "ipmi.app38.rs_permsg", FT_BOOLEAN, 8, NULL, 0x10, NULL, HFILL }},
1390 { &hf_ipmi_app_38_rs_userauth,
1391 { "User-level Authentication disabled",
1392 "ipmi.app38.rs_userauth", FT_BOOLEAN, 8, NULL, 0x08, NULL, HFILL }},
1393 { &hf_ipmi_app_38_rs_user_nonnull,
1394 { "Non-null usernames enabled",
1395 "ipmi.app38.rs_user_nonnull", FT_BOOLEAN, 8, NULL, 0x04, NULL, HFILL }},
1396 { &hf_ipmi_app_38_rs_user_null,
1397 { "Null usernames enabled",
1398 "ipmi.app38.rs_user_null", FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL }},
1399 { &hf_ipmi_app_38_rs_user_anon,
1400 { "Anonymous login enabled",
1401 "ipmi.app38.rs_user_anon", FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL }},
1402 { &hf_ipmi_app_38_rs_ipmi20_conn,
1403 { "IPMI v2.0",
1404 "ipmi.app38.rs_ipmi20_conn", FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL }},
1405 { &hf_ipmi_app_38_rs_ipmi15_conn,
1406 { "IPMI v1.5",
1407 "ipmi.app38.rs_ipmi15_conn", FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL }},
1408 { &hf_ipmi_app_38_rs_oem_iana,
1409 { "OEM ID",
1410 "ipmi.app38.rs_oem_iana", FT_UINT24, BASE_DEC, NULL, 0, NULL, HFILL }},
1411 { &hf_ipmi_app_38_rs_oem_aux,
1412 { "OEM Auxiliary data",
1413 "ipmi.app38.rs_oem_aux", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
1415 { &hf_ipmi_app_39_authtype,
1416 { "Authentication Type",
1417 "ipmi.app39.authtype", FT_UINT8, BASE_HEX, VALS(vals_XX_auth), 0x0f, NULL, HFILL }},
1418 { &hf_ipmi_app_39_user,
1419 { "User Name",
1420 "ipmi.app39.user", FT_STRING, BASE_NONE, NULL, 0, NULL, HFILL }},
1421 { &hf_ipmi_app_39_temp_session,
1422 { "Temporary Session ID",
1423 "ipmi.app39.temp_session", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }},
1424 { &hf_ipmi_app_39_challenge,
1425 { "Challenge",
1426 "ipmi.app39.challenge", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
1428 { &hf_ipmi_app_3a_authtype,
1429 { "Authentication Type",
1430 "ipmi.app3a.authtype", FT_UINT8, BASE_HEX, VALS(vals_XX_auth), 0x0f, NULL, HFILL }},
1431 { &hf_ipmi_app_3a_privlevel,
1432 { "Requested Maximum Privilege Level",
1433 "ipmi.app3a.privlevel", FT_UINT8, BASE_HEX, VALS(vals_XX_priv), 0x0f, NULL, HFILL }},
1434 { &hf_ipmi_app_3a_authcode,
1435 { "Challenge string/Auth Code",
1436 "ipmi.app3a.authcode", FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }},
1437 { &hf_ipmi_app_3a_outbound_seq,
1438 { "Initial Outbound Sequence Number",
1439 "ipmi.app3a.outbound_seq", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }},
1440 { &hf_ipmi_app_3a_authtype_session,
1441 { "Authentication Type for session",
1442 "ipmi.app3a.authtype_session", FT_UINT8, BASE_HEX, VALS(vals_XX_auth), 0x0f, NULL, HFILL }},
1443 { &hf_ipmi_app_3a_session_id,
1444 { "Session ID",
1445 "ipmi.app3a.session_id", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }},
1446 { &hf_ipmi_app_3a_inbound_seq,
1447 { "Initial Inbound Sequence Number",
1448 "ipmi.app3a.inbound_seq", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }},
1449 { &hf_ipmi_app_3a_maxpriv_session,
1450 { "Maximum Privilege Level for session",
1451 "ipmi.app3a.maxpriv_session", FT_UINT8, BASE_HEX, VALS(vals_XX_priv), 0x0f, NULL, HFILL }},
1453 { &hf_ipmi_app_3b_req_priv,
1454 { "Requested Privilege Level",
1455 "ipmi.app3b.req_priv", FT_UINT8, BASE_HEX, VALS(vals_XX_priv), 0x0f, NULL, HFILL }},
1456 { &hf_ipmi_app_3b_new_priv,
1457 { "New Privilege Level",
1458 "ipmi.app3b.new_priv", FT_UINT8, BASE_HEX, VALS(vals_XX_priv), 0x0f, NULL, HFILL }},
1460 { &hf_ipmi_app_3c_session_id,
1461 { "Session ID",
1462 "ipmi.app3c.session_id", FT_UINT32, BASE_HEX, NULL, 0, NULL, HFILL }},
1463 { &hf_ipmi_app_3c_session_handle,
1464 { "Session handle",
1465 "ipmi.app3c.session_handle", FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }},
1467 static int *ett[] = {
1468 &ett_ipmi_app_01_byte2,
1469 &ett_ipmi_app_01_byte3,
1470 &ett_ipmi_app_01_byte6,
1471 &ett_ipmi_app_04_byte2,
1472 &ett_ipmi_app_06_syspwr,
1473 &ett_ipmi_app_06_devpwr,
1474 &ett_ipmi_app_07_syspwr,
1475 &ett_ipmi_app_07_devpwr,
1476 &ett_ipmi_app_24_timer_use,
1477 &ett_ipmi_app_24_timer_action,
1478 &ett_ipmi_app_24_expiration_flags,
1479 &ett_ipmi_app_25_timer_use,
1480 &ett_ipmi_app_25_timer_action,
1481 &ett_ipmi_app_25_expiration_flags,
1482 &ett_ipmi_app_2e_byte1,
1483 &ett_ipmi_app_2f_byte1,
1484 &ett_ipmi_app_30_byte1,
1485 &ett_ipmi_app_31_byte1,
1486 &ett_ipmi_app_32_rq_byte1,
1487 &ett_ipmi_app_32_rq_byte2,
1488 &ett_ipmi_app_32_rs_byte1,
1489 &ett_ipmi_app_32_rs_byte2,
1490 &ett_ipmi_app_33_rs_byte1,
1491 &ett_ipmi_app_33_msg,
1492 &ett_ipmi_app_34_byte1,
1493 &ett_ipmi_app_34_msg,
1494 &ett_ipmi_app_38_rq_byte1,
1495 &ett_ipmi_app_38_rq_byte2,
1496 &ett_ipmi_app_38_rs_byte1,
1497 &ett_ipmi_app_38_rs_byte2,
1498 &ett_ipmi_app_38_rs_byte3,
1499 &ett_ipmi_app_38_rs_byte4,
1500 &ett_ipmi_app_39_byte1,
1501 &ett_ipmi_app_3a_rq_byte1,
1502 &ett_ipmi_app_3a_rq_byte2,
1503 &ett_ipmi_app_3a_rs_byte1,
1504 &ett_ipmi_app_3a_rs_byte10,
1505 &ett_ipmi_app_3b_rq_byte1,
1506 &ett_ipmi_app_3b_rs_byte1,
1509 proto_register_field_array(proto_ipmi, hf, array_length(hf));
1510 proto_register_subtree_array(ett, array_length(ett));
1511 ipmi_register_netfn_cmdtab(IPMI_APP_REQ, IPMI_OEM_NONE, NULL, 0, NULL,
1512 cmd_app, array_length(cmd_app));
1516 * Editor modelines - https://www.wireshark.org/tools/modelines.html
1518 * Local variables:
1519 * c-basic-offset: 8
1520 * tab-width: 8
1521 * indent-tabs-mode: t
1522 * End:
1524 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
1525 * :indentSize=8:tabSize=8:noTabs=false: