/src/wireshark/epan/dissectors/packet-ipmi-vita.c
Line | Count | Source (jump to first uncovered line) |
1 | | /* packet-ipmi-vita.c |
2 | | * Sub-dissectors for IPMI messages (netFn=Group, defining body = VSO) |
3 | | * Copyright 2014, Dmitry Bazhenov, Pigeon Point Systems <dima_b@pigeonpoint.com> |
4 | | * |
5 | | * Wireshark - Network traffic analyzer |
6 | | * By Gerald Combs <gerald@wireshark.org> |
7 | | * Copyright 1998 Gerald Combs |
8 | | * |
9 | | * SPDX-License-Identifier: GPL-2.0-or-later |
10 | | */ |
11 | | |
12 | | #include "config.h" |
13 | | |
14 | | #include <epan/packet.h> |
15 | | #include <epan/tfs.h> |
16 | | #include <wsutil/array.h> |
17 | | #include "packet-ipmi.h" |
18 | | |
19 | | void proto_register_ipmi_vita(void); |
20 | | |
21 | | /* Tree type identifiers. |
22 | | */ |
23 | | static int ett_vita_ipmc; |
24 | | static int ett_vita_ipmb; |
25 | | static int ett_vita_vso; |
26 | | static int ett_vita_led_caps; |
27 | | static int ett_vita_led_color; |
28 | | static int ett_vita_led_flags; |
29 | | static int ett_vita_led_states; |
30 | | static int ett_vita_ipmb_state; |
31 | | static int ett_vita_fru_policy_bits; |
32 | | static int ett_vita_fan_properties; |
33 | | static int ett_vita_fru_control_caps; |
34 | | static int ett_vita_chassis_addr_type; |
35 | | static int ett_vita_chassis_addr; |
36 | | static int ett_vita_persistent_control_state; |
37 | | static int ett_vita_persistent_control_caps; |
38 | | |
39 | | /* Field identifiers. |
40 | | */ |
41 | | static int hf_vita_reserved; |
42 | | static int hf_vita_fruid; |
43 | | static int hf_vita_addr_key_type; |
44 | | static int hf_vita_addr_key; |
45 | | static int hf_vita_hw_addr; |
46 | | static int hf_vita_ipmb_addr; |
47 | | static int hf_vita_site_type; |
48 | | static int hf_vita_site_num; |
49 | | static int hf_vita_ipmbl_addr; |
50 | | |
51 | | static int hf_vita_chassis_identifier; |
52 | | static int hf_vita_chassis_identifier_type; |
53 | | static int hf_vita_chassis_identifier_length; |
54 | | static int hf_vita_ipmc; |
55 | | static int hf_vita_tier; |
56 | | static int hf_vita_layer; |
57 | | static int hf_vita_ipmb; |
58 | | static int hf_vita_ipmb_itfs; |
59 | | static int hf_vita_ipmb_freq; |
60 | | static int hf_vita_vso; |
61 | | static int hf_vita_vso_std; |
62 | | static int hf_vita_rev; |
63 | | static int hf_vita_max_fruid; |
64 | | static int hf_vita_ipmc_fruid; |
65 | | static int hf_vita_fru_control; |
66 | | |
67 | | static int hf_vita_led_count; |
68 | | static int hf_vita_led_id; |
69 | | static int hf_vita_led_caps; |
70 | | static int hf_vita_led_cap_blue; |
71 | | static int hf_vita_led_cap_red; |
72 | | static int hf_vita_led_cap_green; |
73 | | static int hf_vita_led_cap_amber; |
74 | | static int hf_vita_led_cap_orange; |
75 | | static int hf_vita_led_cap_white; |
76 | | static int hf_vita_led_def_loc_color; |
77 | | static int hf_vita_led_def_ovr_color; |
78 | | static int hf_vita_led_color; |
79 | | static int hf_vita_led_flags; |
80 | | static int hf_vita_led_flag_pwr; |
81 | | static int hf_vita_led_flag_hw_restrict; |
82 | | static int hf_vita_led_states; |
83 | | static int hf_vita_led_loc_func; |
84 | | static int hf_vita_led_loc_duration; |
85 | | static int hf_vita_led_loc_color; |
86 | | static int hf_vita_led_ovr_func; |
87 | | static int hf_vita_led_ovr_duration; |
88 | | static int hf_vita_led_ovr_color; |
89 | | static int hf_vita_led_lamp_test_duration; |
90 | | static int hf_vita_led_state_local; |
91 | | static int hf_vita_led_state_override; |
92 | | static int hf_vita_led_state_lamp_test; |
93 | | static int hf_vita_led_state_hw_restrict; |
94 | | |
95 | | static int hf_vita_ipmba_state; |
96 | | static int hf_vita_ipmbb_state; |
97 | | static int hf_vita_ipmb_state; |
98 | | static int hf_vita_ipmb_link_id; |
99 | | |
100 | | static int hf_vita_fru_policy_mask_bits; |
101 | | static int hf_vita_fru_policy_set_bits; |
102 | | static int hf_vita_fru_policy_bits; |
103 | | static int hf_vita_fru_activation_locked; |
104 | | static int hf_vita_fru_deactivation_locked; |
105 | | static int hf_vita_fru_commanded_deactivation_ignored; |
106 | | static int hf_vita_fru_default_activation_locked; |
107 | | |
108 | | static int hf_vita_fru_activation; |
109 | | |
110 | | static int hf_vita_record_id; |
111 | | |
112 | | static int hf_vita_fan_min_level; |
113 | | static int hf_vita_fan_max_level; |
114 | | static int hf_vita_fan_norm_level; |
115 | | static int hf_vita_fan_properties; |
116 | | static int hf_vita_fan_prop_local_control; |
117 | | static int hf_vita_fan_override_level; |
118 | | static int hf_vita_fan_local_level; |
119 | | static int hf_vita_fan_local_control; |
120 | | |
121 | | static int hf_vita_ipmb_link_key_type; |
122 | | static int hf_vita_ipmb_link_key_value; |
123 | | static int hf_vita_ipmb_link_number; |
124 | | static int hf_vita_ipmb_sensor_number; |
125 | | |
126 | | static int hf_vita_active_chmc_ipmb_addr; |
127 | | static int hf_vita_backup_chmc_ipmb_addr; |
128 | | |
129 | | static int hf_vita_fan_number; |
130 | | static int hf_vita_fan_policy; |
131 | | static int hf_vita_fan_policy_timeout; |
132 | | static int hf_vita_fan_coverage; |
133 | | |
134 | | static int hf_vita_fru_control_caps; |
135 | | static int hf_vita_fru_control_cap_cold; |
136 | | static int hf_vita_fru_control_cap_warm; |
137 | | static int hf_vita_fru_control_cap_grace; |
138 | | static int hf_vita_fru_control_cap_diag; |
139 | | static int hf_vita_fru_control_cap_pwr; |
140 | | |
141 | | static int hf_vita_fru_lock_operation; |
142 | | static int hf_vita_fru_lock_id; |
143 | | static int hf_vita_fru_lock_timestamp; |
144 | | |
145 | | static int hf_vita_fru_write_offset; |
146 | | static int hf_vita_fru_write_data; |
147 | | static int hf_vita_fru_write_count; |
148 | | |
149 | | static int hf_vita_chassis_addr_number; |
150 | | static int hf_vita_chassis_addr_timestamp; |
151 | | static int hf_vita_chassis_addr_count; |
152 | | static int hf_vita_chassis_max_unavail; |
153 | | static int hf_vita_chassis_addr_type; |
154 | | static int hf_vita_chassis_addr; |
155 | | static int hf_vita_chassis_addr_chmc; |
156 | | static int hf_vita_chassis_addr_format; |
157 | | static int hf_vita_ipv4_addr; |
158 | | static int hf_vita_rmcp_port; |
159 | | |
160 | | static int hf_vita_persistent_control_state; |
161 | | static int hf_vita_persistent_control_cold; |
162 | | static int hf_vita_persistent_control_warm; |
163 | | static int hf_vita_persistent_control_mask; |
164 | | static int hf_vita_persistent_control_set; |
165 | | static int hf_vita_persistent_control_caps; |
166 | | static int hf_vita_persistent_control_cap_cold; |
167 | | static int hf_vita_persistent_control_cap_warm; |
168 | | |
169 | | static int hf_vita_fru_state_sensor_num; |
170 | | static int hf_vita_fru_health_sensor_num; |
171 | | static int hf_vita_fru_voltage_sensor_num; |
172 | | static int hf_vita_fru_temp_sensor_num; |
173 | | static int hf_vita_payload_test_results_sensor_num; |
174 | | static int hf_vita_payload_test_status_sensor_num; |
175 | | |
176 | | /* String values. |
177 | | */ |
178 | | static const value_string str_vita_ipmc_tiers[] = { |
179 | | { 0x00, "Tier-1" }, |
180 | | { 0x01, "Tier-2" }, |
181 | | { 0x02, "Reserved" }, |
182 | | { 0x03, "Reserved" }, |
183 | | { 0, NULL } |
184 | | }; |
185 | | |
186 | | static const value_string str_vita_ipmc_layers[] = { |
187 | | { 0x00, "IPMC" }, |
188 | | { 0x01, "Chassis Manager" }, |
189 | | { 0x02, "System Manager" }, |
190 | | { 0x03, "Reserved" }, |
191 | | { 0, NULL } |
192 | | }; |
193 | | |
194 | | static const value_string str_vita_ipmb_itfs[] = { |
195 | | { 0x00, "1 IPMB interface" }, |
196 | | { 0x01, "2 IPMB interfaces" }, |
197 | | { 0x02, "Reserved" }, |
198 | | { 0x03, "Reserved" }, |
199 | | { 0, NULL } |
200 | | }; |
201 | | |
202 | | static const value_string str_vita_ipmb_freq[] = { |
203 | | { 0x00, "100KHz" }, |
204 | | { 0x01, "400KHz" }, |
205 | | { 0x02, "Reserved" }, |
206 | | { 0x03, "Reserved" }, |
207 | | { 0, NULL } |
208 | | }; |
209 | | |
210 | | static const value_string str_vita_vso_std[] = { |
211 | | { 0x00, "VITA 46.11" }, |
212 | | { 0, NULL } |
213 | | }; |
214 | | |
215 | | static const value_string str_vita_addr_key_types[] = { |
216 | | { 0x00, "Hardware Address" }, |
217 | | { 0x01, "IPMB Address" }, |
218 | | { 0x02, "Reserved" }, |
219 | | { 0x03, "Physical Address" }, |
220 | | { 0, NULL } |
221 | | }; |
222 | | |
223 | | static const value_string str_vita_site_types[] = { |
224 | | { 0x00, "Front Loading VPX Plug-In Module" }, |
225 | | { 0x01, "Power Entry Module" }, |
226 | | { 0x02, "Chassis FRU Information Module" }, |
227 | | { 0x03, "Dedicated ChMC" }, |
228 | | { 0x04, "Fan Tray" }, |
229 | | { 0x05, "Fan Tray Filter" }, |
230 | | { 0x06, "Alarm Panel" }, |
231 | | { 0x07, "XMC" }, |
232 | | { 0x08, "Reserved" }, |
233 | | { 0x09, "VPX Rear Transition Module" }, |
234 | | { 0x0A, "Reserved" }, |
235 | | { 0x0B, "Reserved" }, |
236 | | { 0x0C, "Power Supply" }, |
237 | | { 0x0D, "Reserved" }, |
238 | | { 0x0E, "Reserved" }, |
239 | | { 0x0F, "FMC" }, |
240 | | { 0xC0, "OEM" }, |
241 | | { 0xC1, "OEM" }, |
242 | | { 0xC2, "OEM" }, |
243 | | { 0xC3, "OEM" }, |
244 | | { 0xC4, "OEM" }, |
245 | | { 0xC5, "OEM" }, |
246 | | { 0xC6, "OEM" }, |
247 | | { 0xC7, "OEM" }, |
248 | | { 0xC8, "OEM" }, |
249 | | { 0xC9, "OEM" }, |
250 | | { 0xCA, "OEM" }, |
251 | | { 0xCB, "OEM" }, |
252 | | { 0xCC, "OEM" }, |
253 | | { 0xCD, "OEM" }, |
254 | | { 0xCE, "OEM" }, |
255 | | { 0xCF, "OEM" }, |
256 | | { 0, NULL } |
257 | | }; |
258 | | |
259 | | static value_string_ext str_vita_site_types_ext = VALUE_STRING_EXT_INIT(str_vita_site_types); |
260 | | |
261 | | static const value_string str_vita_fru_controls[] = { |
262 | | { 0x00, "Cold Reset" }, |
263 | | { 0x01, "Warm Reset" }, |
264 | | { 0x02, "Graceful Reboot" }, |
265 | | { 0x03, "Diagnostic Interrupt" }, |
266 | | { 0, NULL } |
267 | | }; |
268 | | |
269 | | static const value_string str_vita_led_colors[] = { |
270 | | { 0x00, "Reserved (Control not supported)" }, |
271 | | { 0x01, "BLUE" }, |
272 | | { 0x02, "RED" }, |
273 | | { 0x03, "GREEN" }, |
274 | | { 0x04, "AMBER" }, |
275 | | { 0x05, "ORANGE" }, |
276 | | { 0x06, "WHITE" }, |
277 | | { 0x0E, "Do not change" }, |
278 | | { 0x0F, "Use default" }, |
279 | | { 0, NULL } |
280 | | }; |
281 | | |
282 | | static const range_string str_vita_led_func[] = { |
283 | | { 0x00, 0x00, "LED off" }, |
284 | | { 0x01, 0xFA, "LED BLINKING (off duration)" }, |
285 | | { 0xFB, 0xFB, "LAMP TEST" }, |
286 | | { 0xFC, 0xFC, "LED restored to Local Control state" }, |
287 | | { 0xFF, 0xFF, "LED on" }, |
288 | | { 0, 0, NULL } |
289 | | }; |
290 | | |
291 | | static const range_string str_vita_ipmb_state[] = { |
292 | | { 0x0, 0xFE, "System IPMB state" }, |
293 | | { 0xFF, 0xFF, "Do not change current state" }, |
294 | | { 0, 0, NULL } |
295 | | }; |
296 | | |
297 | | static const true_false_string str_vita_ipmb_override = { |
298 | | "Local Control State", |
299 | | "Override state - Isolate(disable)" |
300 | | }; |
301 | | |
302 | | static const range_string str_vita_ipmb_link_id[] = { |
303 | | { 0x00, 0x00, "Select all System IPMB Links" }, |
304 | | { 0x01, 0x5F, "System IPMB Link Number" }, |
305 | | { 0x60, 0x7F, "Reserved" }, |
306 | | { 0, 0, NULL } |
307 | | }; |
308 | | |
309 | | static const value_string str_vita_fru_activation[] = { |
310 | | { 0x00, "Deactivate FRU" }, |
311 | | { 0x01, "Activate FRU" }, |
312 | | { 0, NULL } |
313 | | }; |
314 | | |
315 | | static const value_string str_vita_fan_levels[] = { |
316 | | { 0xFE, "Shut Down" }, |
317 | | { 0xFF, "Local Control" }, |
318 | | { 0, NULL } |
319 | | }; |
320 | | |
321 | | static const value_string str_vita_fan_local_control[] = { |
322 | | { 0x00, "Disabled" }, |
323 | | { 0x01, "Enabled" }, |
324 | | { 0, NULL } |
325 | | }; |
326 | | |
327 | | static const value_string str_vita_ipmb_link_key_types[] = { |
328 | | { 0x00, "Key is IPMB Link Number" }, |
329 | | { 0x01, "Key is IPMB Sensor Number" }, |
330 | | { 0, NULL } |
331 | | }; |
332 | | |
333 | | static const value_string str_vita_fan_policies[] = { |
334 | | { 0x00, "Disable" }, |
335 | | { 0x01, "Enable" }, |
336 | | { 0xFF, "Indeterminate" }, |
337 | | { 0, NULL } |
338 | | }; |
339 | | |
340 | | static const value_string str_vita_fan_policy_timeouts[] = { |
341 | | { 0xFF, "Infinite" }, |
342 | | { 0, NULL } |
343 | | }; |
344 | | |
345 | | static const value_string str_vita_fan_coverages[] = { |
346 | | { 0x00, "Not Covered" }, |
347 | | { 0x01, "Covered" }, |
348 | | { 0, NULL } |
349 | | }; |
350 | | |
351 | | static const value_string str_vita_fru_lock_operations[] = { |
352 | | { 0x00, "Get Last Commit Timestamp" }, |
353 | | { 0x01, "Lock" }, |
354 | | { 0x02, "Unlock and Discard" }, |
355 | | { 0x03, "Unlock and Commit " }, |
356 | | { 0, NULL } |
357 | | }; |
358 | | |
359 | | static const range_string str_vita_chassis_addr_formats[] = { |
360 | | { 0x00, 0x00, "IPv4 Address" }, |
361 | | { 0x01, 0x5F, "Reserved" }, |
362 | | { 0x60, 0x7F, "OEM" }, |
363 | | { 0, 0, NULL } |
364 | | }; |
365 | | |
366 | | |
367 | | static const value_string cc1F[] = { |
368 | | { 0x80, "Invalid FRU Information" }, |
369 | | { 0x81, "Lock Failed" }, |
370 | | { 0, NULL } |
371 | | }; |
372 | | |
373 | | static const value_string cc20[] = { |
374 | | { 0x80, "Invalid Lock ID" }, |
375 | | { 0, NULL } |
376 | | }; |
377 | | |
378 | | |
379 | | /* Array of sub-tree identifiers (needed for registration). |
380 | | */ |
381 | | static int * const ett_ipmi_vita[] = { |
382 | | &ett_vita_ipmc, |
383 | | &ett_vita_ipmb, |
384 | | &ett_vita_vso, |
385 | | &ett_vita_led_caps, |
386 | | &ett_vita_led_color, |
387 | | &ett_vita_led_flags, |
388 | | &ett_vita_led_states, |
389 | | &ett_vita_ipmb_state, |
390 | | &ett_vita_fru_policy_bits, |
391 | | &ett_vita_fan_properties, |
392 | | &ett_vita_fru_control_caps, |
393 | | &ett_vita_chassis_addr_type, |
394 | | &ett_vita_chassis_addr, |
395 | | &ett_vita_persistent_control_state, |
396 | | &ett_vita_persistent_control_caps |
397 | | }; |
398 | | |
399 | | static int * const bits_vita_led_color[] = { |
400 | | &hf_vita_led_color, |
401 | | NULL |
402 | | }; |
403 | | |
404 | | static int * const bits_vita_fru_policy_bits[] = { |
405 | | &hf_vita_fru_activation_locked, |
406 | | &hf_vita_fru_deactivation_locked, |
407 | | &hf_vita_fru_commanded_deactivation_ignored, |
408 | | &hf_vita_fru_default_activation_locked, |
409 | | NULL |
410 | | }; |
411 | | |
412 | | static int * const bits_vita_persistent_control_state[] = { |
413 | | &hf_vita_persistent_control_cold, |
414 | | &hf_vita_persistent_control_warm, |
415 | | NULL |
416 | | }; |
417 | | |
418 | | /* Array of field descriptors. |
419 | | */ |
420 | | static hf_register_info hf_ipmi_vita[] = { |
421 | | { &hf_vita_ipmc, |
422 | | { "IPMC Identifier", "ipmi.vita.ipmc", |
423 | | FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }}, |
424 | | { &hf_vita_tier, |
425 | | { "Tier Functionality", "ipmi.vita.ipmc.tier", |
426 | | FT_UINT8, BASE_HEX, VALS(str_vita_ipmc_tiers), 0x3, NULL, HFILL }}, |
427 | | { &hf_vita_layer, |
428 | | { "Layer Functionality", "ipmi.vita.ipmc.layer", |
429 | | FT_UINT8, BASE_HEX, VALS(str_vita_ipmc_layers), 0x30, NULL, HFILL }}, |
430 | | { &hf_vita_ipmb, |
431 | | { "IPMB Capabilities", "ipmi.vita.ipmb", |
432 | | FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }}, |
433 | | { &hf_vita_ipmb_itfs, |
434 | | { "Number of supported interfaces", "ipmi.vita.ipmc.itfs", |
435 | | FT_UINT8, BASE_HEX, VALS(str_vita_ipmb_itfs), 0x3, NULL, HFILL }}, |
436 | | { &hf_vita_ipmb_freq, |
437 | | { "Maximum operating frequency", "ipmi.vita.ipmc.freq", |
438 | | FT_UINT8, BASE_HEX, VALS(str_vita_ipmb_freq), 0x30, NULL, HFILL }}, |
439 | | { &hf_vita_vso, |
440 | | { "VSO Standard", "ipmi.vita.vso", |
441 | | FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }}, |
442 | | { &hf_vita_vso_std, |
443 | | { "VSO Standard", "ipmi.vita.vso.std", |
444 | | FT_UINT8, BASE_HEX, VALS(str_vita_vso_std), 0x3, NULL, HFILL }}, |
445 | | { &hf_vita_rev, |
446 | | { "VSO Specification Revision", "ipmi.vita.vso.rev", |
447 | | FT_UINT8, BASE_CUSTOM, CF_FUNC(ipmi_fmt_version), 0, NULL, HFILL }}, |
448 | | { &hf_vita_max_fruid, |
449 | | { "Max FRU Device ID", "ipmi.vita.max.fruid", |
450 | | FT_UINT8, BASE_DEC_HEX, NULL, 0, NULL, HFILL }}, |
451 | | { &hf_vita_ipmc_fruid, |
452 | | { "FRU Device ID for IPMC", "ipmi.vita.ipmc.fruid", |
453 | | FT_UINT8, BASE_DEC_HEX, NULL, 0, NULL, HFILL }}, |
454 | | { &hf_vita_fruid, |
455 | | { "FRU Device ID", "ipmi.vita.fruid", |
456 | | FT_UINT8, BASE_DEC_HEX, NULL, 0, NULL, HFILL }}, |
457 | | { &hf_vita_addr_key_type, |
458 | | { "Address Key Type", "ipmi.vita.key.type", |
459 | | FT_UINT8, BASE_HEX, VALS(str_vita_addr_key_types), 0, NULL, HFILL }}, |
460 | | { &hf_vita_addr_key, |
461 | | { "Address Key", "ipmi.vita.key", |
462 | | FT_UINT8, BASE_HEX_DEC, NULL, 0, NULL, HFILL }}, |
463 | | { &hf_vita_site_type, |
464 | | { "Site Type", "ipmi.vita.site.type", |
465 | | FT_UINT8, BASE_HEX|BASE_EXT_STRING, &str_vita_site_types_ext, 0, NULL, HFILL }}, |
466 | | { &hf_vita_hw_addr, |
467 | | { "Hardware Address", "ipmi.vita.hwaddr", |
468 | | FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }}, |
469 | | { &hf_vita_ipmb_addr, |
470 | | { "IPMB Address", "ipmi.vita.ipmb.addr", |
471 | | FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }}, |
472 | | { &hf_vita_site_num, |
473 | | { "Site Number", "ipmi.vita.site.num", |
474 | | FT_UINT8, BASE_DEC_HEX, NULL, 0, NULL, HFILL }}, |
475 | | { &hf_vita_ipmbl_addr, |
476 | | { "Address on IPMI Channel 7", "ipmi.vita.ipmbl.addr", |
477 | | FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }}, |
478 | | { &hf_vita_chassis_identifier, |
479 | | { "Chassis Identifier", |
480 | | "ipmi.vita.chassis_identifier", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }}, |
481 | | { &hf_vita_chassis_identifier_type, |
482 | | { "Type", |
483 | | "ipmi.vita.chassis_identifier_type", FT_UINT8, BASE_DEC, NULL, 0xc0, NULL, HFILL }}, |
484 | | { &hf_vita_chassis_identifier_length, |
485 | | { "Length", |
486 | | "ipmi.vita.chassis_identifier_length", FT_UINT8, BASE_DEC, NULL, 0x3f, NULL, HFILL }}, |
487 | | { &hf_vita_reserved, |
488 | | { "Reserved", "ipmi.vita.reserved", |
489 | | FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }}, |
490 | | { &hf_vita_fru_control, |
491 | | { "FRU Control", "ipmi.vita.fru.control", |
492 | | FT_UINT8, BASE_DEC, VALS(str_vita_fru_controls), 0, NULL, HFILL }}, |
493 | | { &hf_vita_led_count, |
494 | | { "LED Count", "ipmi.vita.led.count", |
495 | | FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }}, |
496 | | { &hf_vita_led_id, |
497 | | { "LED ID", "ipmi.vita.led.id", |
498 | | FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }}, |
499 | | { &hf_vita_led_caps, |
500 | | { "LED Color Capabilities", "ipmi.vita.led.caps", |
501 | | FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }}, |
502 | | { &hf_vita_led_cap_blue, |
503 | | { "LED supports BLUE", "ipmi.vita.led.cap.blue", |
504 | | FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL }}, |
505 | | { &hf_vita_led_cap_red, |
506 | | { "LED supports RED", "ipmi.vita.led.cap.red", |
507 | | FT_BOOLEAN, 8, NULL, 0x04, NULL, HFILL }}, |
508 | | { &hf_vita_led_cap_green, |
509 | | { "LED supports GREEN", "ipmi.vita.led.cap.green", |
510 | | FT_BOOLEAN, 8, NULL, 0x08, NULL, HFILL }}, |
511 | | { &hf_vita_led_cap_amber, |
512 | | { "LED supports AMBER", "ipmi.vita.led.cap.amber", |
513 | | FT_BOOLEAN, 8, NULL, 0x10, NULL, HFILL }}, |
514 | | { &hf_vita_led_cap_orange, |
515 | | { "LED supports ORANGE", "ipmi.vita.led.cap.orange", |
516 | | FT_BOOLEAN, 8, NULL, 0x20, NULL, HFILL }}, |
517 | | { &hf_vita_led_cap_white, |
518 | | { "LED supports WHITE", "ipmi.vita.led.cap.white", |
519 | | FT_BOOLEAN, 8, NULL, 0x40, NULL, HFILL }}, |
520 | | { &hf_vita_led_def_loc_color, |
521 | | { "Default LED Color in Local Control State", "ipmi.vita.led.def.loc.color", |
522 | | FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }}, |
523 | | { &hf_vita_led_def_ovr_color, |
524 | | { "Default LED Color in Override State", "ipmi.vita.led.def.ovr.color", |
525 | | FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }}, |
526 | | { &hf_vita_led_flags, |
527 | | { "LED Flags", "ipmi.vita.led.flags", |
528 | | FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }}, |
529 | | { &hf_vita_led_flag_pwr, |
530 | | { "LED is powered from Payload power", "ipmi.vita.led.flag.pwr", |
531 | | FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL }}, |
532 | | { &hf_vita_led_flag_hw_restrict, |
533 | | { "LED has other hardware restrictions", "ipmi.vita.led.flag.hw.restrict", |
534 | | FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL }}, |
535 | | { &hf_vita_led_color, |
536 | | { "LED Color Value", "ipmi.vita.led.color", |
537 | | FT_UINT8, BASE_HEX, VALS(str_vita_led_colors), 0x0F, NULL, HFILL }}, |
538 | | { &hf_vita_led_ovr_func, |
539 | | { "Override State LED Function", "ipmi.vita.led.ovr.func", |
540 | | FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(str_vita_led_func), 0, NULL, HFILL }}, |
541 | | { &hf_vita_led_ovr_duration, |
542 | | { "Override State On-Duration", "ipmi.vita.led.ovr.duration", |
543 | | FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }}, |
544 | | { &hf_vita_led_ovr_color, |
545 | | { "Override State Color", "ipmi.vita.led.ovr.color", |
546 | | FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }}, |
547 | | { &hf_vita_led_lamp_test_duration, |
548 | | { "Lamp Test Duration", "ipmi.vita.led.lamp.duration", |
549 | | FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }}, |
550 | | { &hf_vita_led_loc_func, |
551 | | { "Local Control LED Function", "ipmi.vita.led.loc.func", |
552 | | FT_UINT8, BASE_DEC|BASE_RANGE_STRING, RVALS(str_vita_led_func), 0, NULL, HFILL }}, |
553 | | { &hf_vita_led_loc_duration, |
554 | | { "Local Control On-Duration", "ipmi.vita.led.loc.duration", |
555 | | FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }}, |
556 | | { &hf_vita_led_loc_color, |
557 | | { "Local Control Color", "ipmi.vita.led.loc.color", |
558 | | FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }}, |
559 | | { &hf_vita_led_states, |
560 | | { "LED States", "ipmi.vita.led.states", |
561 | | FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }}, |
562 | | { &hf_vita_led_state_local, |
563 | | { "Local Control State", "ipmi.vita.led.state.loc", |
564 | | FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL }}, |
565 | | { &hf_vita_led_state_override, |
566 | | { "Override State", "ipmi.vita.led.state.ovr", |
567 | | FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL }}, |
568 | | { &hf_vita_led_state_lamp_test, |
569 | | { "Lamp Test", "ipmi.vita.led.state.lamp", |
570 | | FT_BOOLEAN, 8, NULL, 0x04, NULL, HFILL }}, |
571 | | { &hf_vita_led_state_hw_restrict, |
572 | | { "Hardware Restriction", "ipmi.vita.led.state.hw", |
573 | | FT_BOOLEAN, 8, NULL, 0x08, NULL, HFILL }}, |
574 | | { &hf_vita_ipmba_state, |
575 | | { "IPMB-A State", "ipmi.vita.ipmba.state", |
576 | | FT_UINT8, BASE_HEX|BASE_RANGE_STRING, RVALS(str_vita_ipmb_state), 0, NULL, HFILL }}, |
577 | | { &hf_vita_ipmbb_state, |
578 | | { "IPMB-B State", "ipmi.vita.ipmbb.state", |
579 | | FT_UINT8, BASE_HEX|BASE_RANGE_STRING, RVALS(str_vita_ipmb_state), 0, NULL, HFILL }}, |
580 | | { &hf_vita_ipmb_state, |
581 | | { "IPMB State", "ipmi.vita.ipmb.ovr", |
582 | | FT_BOOLEAN, 8, TFS(&str_vita_ipmb_override), 0x01, NULL, HFILL }}, |
583 | | { &hf_vita_ipmb_link_id, |
584 | | { "IPMB Link ID", "ipmi.vita.ipmb.link.id", |
585 | | FT_UINT8, BASE_DEC_HEX|BASE_RANGE_STRING, RVALS(str_vita_ipmb_link_id), 0xFE, NULL, HFILL }}, |
586 | | { &hf_vita_fru_policy_mask_bits, |
587 | | { "FRU Activation Policy Mask Bits", "ipmi.vita.fru.policy.mask", |
588 | | FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }}, |
589 | | { &hf_vita_fru_policy_set_bits, |
590 | | { "FRU Activation Policy Set Bits", "ipmi.vita.fru.policy.set", |
591 | | FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }}, |
592 | | { &hf_vita_fru_policy_bits, |
593 | | { "FRU Activation Policies", "ipmi.vita.fru.policy.bits", |
594 | | FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }}, |
595 | | { &hf_vita_fru_activation_locked, |
596 | | { "Activation Locked", "ipmi.vita.fru.policy.al", |
597 | | FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL }}, |
598 | | { &hf_vita_fru_deactivation_locked, |
599 | | { "Deactivation Locked", "ipmi.vita.fru.policy.dl", |
600 | | FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL }}, |
601 | | { &hf_vita_fru_commanded_deactivation_ignored, |
602 | | { "Commanded Deactivation Ignored", "ipmi.vita.fru.policy.cdi", |
603 | | FT_BOOLEAN, 8, NULL, 0x04, NULL, HFILL }}, |
604 | | { &hf_vita_fru_default_activation_locked, |
605 | | { "Default Activation Locked", "ipmi.vita.fru.policy.dal", |
606 | | FT_BOOLEAN, 8, NULL, 0x08, NULL, HFILL }}, |
607 | | { &hf_vita_fru_activation, |
608 | | { "FRU Activation/Deactivation", "ipmi.vita.fru.activation", |
609 | | FT_UINT8, BASE_DEC, VALS(str_vita_fru_activation), 0, NULL, HFILL }}, |
610 | | { &hf_vita_record_id, |
611 | | { "Record ID", "ipmi.vita.record.id", |
612 | | FT_UINT16, BASE_DEC_HEX, NULL, 0, NULL, HFILL }}, |
613 | | { &hf_vita_fan_min_level, |
614 | | { "Minimum Speed Level", "ipmi.vita.fan.min", |
615 | | FT_UINT8, BASE_DEC_HEX, NULL, 0, NULL, HFILL }}, |
616 | | { &hf_vita_fan_max_level, |
617 | | { "Maximum Speed Level", "ipmi.vita.fan.max", |
618 | | FT_UINT8, BASE_DEC_HEX, NULL, 0, NULL, HFILL }}, |
619 | | { &hf_vita_fan_norm_level, |
620 | | { "Normal Operating Level", "ipmi.vita.fan.norm", |
621 | | FT_UINT8, BASE_DEC_HEX, NULL, 0, NULL, HFILL }}, |
622 | | { &hf_vita_fan_properties, |
623 | | { "Fan Tray Properties", "ipmi.vita.fan.props", |
624 | | FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }}, |
625 | | { &hf_vita_fan_prop_local_control, |
626 | | { "Local Control Supported", "ipmi.vita.fan.prop.lc", |
627 | | FT_BOOLEAN, 8, NULL, 0x80, NULL, HFILL }}, |
628 | | { &hf_vita_fan_override_level, |
629 | | { "Override Fan Level", "ipmi.vita.fan.ovr", |
630 | | FT_UINT8, BASE_HEX, VALS(str_vita_fan_levels), 0, NULL, HFILL }}, |
631 | | { &hf_vita_fan_local_level, |
632 | | { "Local Control Fan Level", "ipmi.vita.fan.loc", |
633 | | FT_UINT8, BASE_HEX, VALS(str_vita_fan_levels), 0, NULL, HFILL }}, |
634 | | { &hf_vita_fan_local_control, |
635 | | { "Local Control Enable State", "ipmi.vita.fan.lc", |
636 | | FT_UINT8, BASE_DEC, VALS(str_vita_fan_local_control), 0, NULL, HFILL }}, |
637 | | { &hf_vita_ipmb_link_key_type, |
638 | | { "IPMB Link Info Key Type", "ipmi.vita.ipmb.link.key.type", |
639 | | FT_UINT8, BASE_DEC, VALS(str_vita_ipmb_link_key_types), 0, NULL, HFILL }}, |
640 | | { &hf_vita_ipmb_link_key_value, |
641 | | { "IPMB Link Info Key", "ipmi.vita.ipmb.link.key.value", |
642 | | FT_UINT8, BASE_DEC_HEX, NULL, 0, NULL, HFILL }}, |
643 | | { &hf_vita_ipmb_link_number, |
644 | | { "IPMB Link Number", "ipmi.vita.ipmb.link.number", |
645 | | FT_UINT8, BASE_DEC_HEX, NULL, 0, NULL, HFILL }}, |
646 | | { &hf_vita_ipmb_sensor_number, |
647 | | { "IPMB Sensor Number", "ipmi.vita.ipmb.sensor.number", |
648 | | FT_UINT8, BASE_DEC_HEX, NULL, 0, NULL, HFILL }}, |
649 | | { &hf_vita_active_chmc_ipmb_addr, |
650 | | { "Active Chassis Manager IPMB Address", "ipmi.vita.active.chmc.ipmb.addr", |
651 | | FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }}, |
652 | | { &hf_vita_backup_chmc_ipmb_addr, |
653 | | { "Backup Chassis Manager IPMB Address", "ipmi.vita.backup.chmc.ipmb.addr", |
654 | | FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }}, |
655 | | { &hf_vita_fan_number, |
656 | | { "Fan Tray Site Number", "ipmi.vita.fan.num", |
657 | | FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL }}, |
658 | | { &hf_vita_fan_policy, |
659 | | { "Fan Enable State", "ipmi.vita.fan.policy", |
660 | | FT_UINT8, BASE_DEC, VALS(str_vita_fan_policies), 0, NULL, HFILL }}, |
661 | | { &hf_vita_fan_policy_timeout, |
662 | | { "Fan Policy Timeout", "ipmi.vita.fan.policy.timeout", |
663 | | FT_UINT8, BASE_DEC, VALS(str_vita_fan_policy_timeouts), 0, NULL, HFILL }}, |
664 | | { &hf_vita_fan_coverage, |
665 | | { "Coverage", "ipmi.vita.fan.coverage", |
666 | | FT_UINT8, BASE_DEC, VALS(str_vita_fan_coverages), 0, NULL, HFILL }}, |
667 | | { &hf_vita_fru_control_caps, |
668 | | { "FRU Control Capabilities Mask", "ipmi.vita.fru.control.caps", |
669 | | FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }}, |
670 | | { &hf_vita_fru_control_cap_cold, |
671 | | { "Capable of issuing a cold reset", "ipmi.vita.fru.control.cap.cold", |
672 | | FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL }}, |
673 | | { &hf_vita_fru_control_cap_warm, |
674 | | { "Capable of issuing a warm reset", "ipmi.vita.fru.control.cap.warm", |
675 | | FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL }}, |
676 | | { &hf_vita_fru_control_cap_grace, |
677 | | { "Capable of issuing a graceful reboot", "ipmi.vita.fru.control.cap.grace", |
678 | | FT_BOOLEAN, 8, NULL, 0x04, NULL, HFILL }}, |
679 | | { &hf_vita_fru_control_cap_diag, |
680 | | { "Capable of issuing a diagnostic interrupt", "ipmi.vita.fru.control.cap.diag", |
681 | | FT_BOOLEAN, 8, NULL, 0x08, NULL, HFILL }}, |
682 | | { &hf_vita_fru_control_cap_pwr, |
683 | | { "Capable of controlling payload power", "ipmi.vita.fru.control.cap.pwr", |
684 | | FT_BOOLEAN, 8, NULL, 0x10, NULL, HFILL }}, |
685 | | { &hf_vita_fru_lock_operation, |
686 | | { "FRU Inventory Device Lock Operation", "ipmi.vita.fru.lock.op", |
687 | | FT_UINT8, BASE_DEC, VALS(str_vita_fru_lock_operations), 0, NULL, HFILL }}, |
688 | | { &hf_vita_fru_lock_id, |
689 | | { "FRU Inventory Device Lock ID", "ipmi.vita.fru.lock.id", |
690 | | FT_UINT16, BASE_HEX_DEC, NULL, 0, NULL, HFILL }}, |
691 | | { &hf_vita_fru_lock_timestamp, |
692 | | { "FRU Inventory Device Last Commit Timestamp", "ipmi.vita.fru.lock.stamp", |
693 | | FT_UINT32, BASE_HEX_DEC, NULL, 0, NULL, HFILL }}, |
694 | | { &hf_vita_fru_write_offset, |
695 | | { "FRU Inventory offset to write", "ipmi.vita.fru.write.offset", |
696 | | FT_UINT16, BASE_DEC_HEX, NULL, 0, NULL, HFILL }}, |
697 | | { &hf_vita_fru_write_data, |
698 | | { "Data to write", "ipmi.vita.fru.write.data", |
699 | | FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, |
700 | | { &hf_vita_fru_write_count, |
701 | | { "Written byte count", "ipmi.vita.fru.write.count", |
702 | | FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }}, |
703 | | { &hf_vita_chassis_addr_number, |
704 | | { "Address Number", "ipmi.vita.chassis.addr.num", |
705 | | FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }}, |
706 | | { &hf_vita_chassis_addr_timestamp, |
707 | | { "Chassis IP Address Last Change Timestamp", "ipmi.vita.chassis.stamp", |
708 | | FT_UINT32, BASE_HEX_DEC, NULL, 0, NULL, HFILL }}, |
709 | | { &hf_vita_chassis_addr_count, |
710 | | { "Address Count", "ipmi.vita.chassis.addr.count", |
711 | | FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }}, |
712 | | { &hf_vita_chassis_max_unavail, |
713 | | { "Maximum Unavailable Time", "ipmi.vita.chassis.max.unavail", |
714 | | FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }}, |
715 | | { &hf_vita_chassis_addr_type, |
716 | | { "Address Type", "ipmi.vita.chassis.addr.type", |
717 | | FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }}, |
718 | | { &hf_vita_chassis_addr, |
719 | | { "Address", "ipmi.vita.chassis.addr", |
720 | | FT_BYTES, BASE_NONE, NULL, 0, NULL, HFILL }}, |
721 | | { &hf_vita_chassis_addr_chmc, |
722 | | { "Chassis Manager IP Address", "ipmi.vita.chassis.addr.chmc", |
723 | | FT_BOOLEAN, 8, NULL, 0x80, NULL, HFILL }}, |
724 | | { &hf_vita_chassis_addr_format, |
725 | | { "Address Type", "ipmi.vita.chassis.addr.format", |
726 | | FT_UINT8, BASE_HEX|BASE_RANGE_STRING, RVALS(str_vita_chassis_addr_formats), 0x7F, NULL, HFILL }}, |
727 | | { &hf_vita_ipv4_addr, |
728 | | { "IPv4 Address", "ipmi.vita.ipv4.addr", |
729 | | FT_IPv4, BASE_NONE, NULL, 0, NULL, HFILL }}, |
730 | | { &hf_vita_rmcp_port, |
731 | | { "RMCP Port", "ipmi.vita.rmcp.port", |
732 | | FT_UINT16, BASE_HEX_DEC, NULL, 0, NULL, HFILL }}, |
733 | | { &hf_vita_persistent_control_state, |
734 | | { "FRU Persistent Control Current State", "ipmi.vita.pers.state", |
735 | | FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }}, |
736 | | { &hf_vita_persistent_control_cold, |
737 | | { "Persistent Cold Reset State", "ipmi.vita.pers.state.cold", |
738 | | FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL }}, |
739 | | { &hf_vita_persistent_control_warm, |
740 | | { "Persistent Warm Reset State", "ipmi.vita.pers.state.warm", |
741 | | FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL }}, |
742 | | { &hf_vita_persistent_control_mask, |
743 | | { "FRU Persistent Control Selection Mask", "ipmi.vita.pers.mask", |
744 | | FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }}, |
745 | | { &hf_vita_persistent_control_set, |
746 | | { "FRU Persistent Control Selection", "ipmi.vita.pers.set", |
747 | | FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }}, |
748 | | { &hf_vita_persistent_control_caps, |
749 | | { "FRU Persistent Control Capabilities Mask", "ipmi.vita.pers.caps", |
750 | | FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }}, |
751 | | { &hf_vita_persistent_control_cap_cold, |
752 | | { "Capable of asserting a persistent cold reset", "ipmi.vita.pers.cap.cold", |
753 | | FT_BOOLEAN, 8, NULL, 0x01, NULL, HFILL }}, |
754 | | { &hf_vita_persistent_control_cap_warm, |
755 | | { "Capable of asserting a persistent warm reset", "ipmi.vita.pers.cap.warm", |
756 | | FT_BOOLEAN, 8, NULL, 0x02, NULL, HFILL }}, |
757 | | { &hf_vita_fru_state_sensor_num, |
758 | | { "FRU State Sensor Number", "ipmi.vita.sensor.fru.state", |
759 | | FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }}, |
760 | | { &hf_vita_fru_health_sensor_num, |
761 | | { "FRU Health Sensor Number", "ipmi.vita.sensor.fru.health", |
762 | | FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }}, |
763 | | { &hf_vita_fru_voltage_sensor_num, |
764 | | { "FRU Voltage Sensor Number", "ipmi.vita.sensor.fru.voltage", |
765 | | FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }}, |
766 | | { &hf_vita_fru_temp_sensor_num, |
767 | | { "FRU Temperature Sensor Number", "ipmi.vita.sensor.fru.temp", |
768 | | FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }}, |
769 | | { &hf_vita_payload_test_results_sensor_num, |
770 | | { "Payload Test Results Sensor Number", "ipmi.vita.sensor.payload.test.res", |
771 | | FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }}, |
772 | | { &hf_vita_payload_test_status_sensor_num, |
773 | | { "Payload Test Status Sensor Number", "ipmi.vita.sensor.payload.test.status", |
774 | | FT_UINT8, BASE_HEX, NULL, 0, NULL, HFILL }} |
775 | | }; |
776 | | |
777 | | /* Get VSO Capabilities (response). |
778 | | */ |
779 | | static void |
780 | | cmd00_rs(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) |
781 | 0 | { |
782 | 0 | static int * const bits_vita_ipmc[] = { |
783 | 0 | &hf_vita_tier, &hf_vita_layer, NULL |
784 | 0 | }; |
785 | 0 | static int * const bits_vita_ipmb[] = { |
786 | 0 | &hf_vita_ipmb_itfs, &hf_vita_ipmb_freq, NULL |
787 | 0 | }; |
788 | 0 | static int * const bits_vita_vso[] = { |
789 | 0 | &hf_vita_vso_std, NULL |
790 | 0 | }; |
791 | |
|
792 | 0 | proto_tree_add_bitmask(tree, tvb, 0, hf_vita_ipmc, |
793 | 0 | ett_vita_ipmc, bits_vita_ipmc, ENC_LITTLE_ENDIAN); |
794 | 0 | proto_tree_add_bitmask(tree, tvb, 1, hf_vita_ipmb, |
795 | 0 | ett_vita_ipmb, bits_vita_ipmb, ENC_LITTLE_ENDIAN); |
796 | 0 | proto_tree_add_bitmask(tree, tvb, 2, hf_vita_vso, |
797 | 0 | ett_vita_vso, bits_vita_vso, ENC_LITTLE_ENDIAN); |
798 | 0 | proto_tree_add_item(tree, hf_vita_rev, tvb, 3, 1, ENC_LITTLE_ENDIAN); |
799 | 0 | proto_tree_add_item(tree, hf_vita_max_fruid, tvb, 4, 1, ENC_LITTLE_ENDIAN); |
800 | 0 | proto_tree_add_item(tree, hf_vita_ipmc_fruid, tvb, 5, 1, ENC_LITTLE_ENDIAN); |
801 | 0 | } |
802 | | |
803 | | /* Get Chassis Address Table Info (request). |
804 | | */ |
805 | | static void |
806 | | cmd01_rq(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) |
807 | 0 | { |
808 | 0 | unsigned len = tvb_captured_length(tvb); |
809 | |
|
810 | 0 | if (len > 0) { |
811 | 0 | proto_tree_add_item(tree, hf_vita_fruid, tvb, 0, 1, ENC_LITTLE_ENDIAN); |
812 | 0 | } |
813 | 0 | if (len > 1) { |
814 | 0 | proto_tree_add_item(tree, hf_vita_addr_key_type, tvb, 1, 1, ENC_LITTLE_ENDIAN); |
815 | 0 | } |
816 | 0 | if (len > 2) { |
817 | 0 | proto_tree_add_item(tree, hf_vita_addr_key, tvb, 2, 1, ENC_LITTLE_ENDIAN); |
818 | 0 | } |
819 | 0 | if (len > 3) { |
820 | 0 | proto_tree_add_item(tree, hf_vita_site_type, tvb, 3, 1, ENC_LITTLE_ENDIAN); |
821 | 0 | } |
822 | 0 | } |
823 | | |
824 | | /* Get Chassis Address Table Info (response). |
825 | | */ |
826 | | static void |
827 | | cmd01_rs(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) |
828 | 0 | { |
829 | 0 | proto_tree_add_item(tree, hf_vita_hw_addr, tvb, 0, 1, ENC_LITTLE_ENDIAN); |
830 | 0 | proto_tree_add_item(tree, hf_vita_ipmb_addr, tvb, 1, 1, ENC_LITTLE_ENDIAN); |
831 | 0 | proto_tree_add_item(tree, hf_vita_reserved, tvb, 2, 1, ENC_LITTLE_ENDIAN); |
832 | 0 | proto_tree_add_item(tree, hf_vita_fruid, tvb, 3, 1, ENC_LITTLE_ENDIAN); |
833 | 0 | proto_tree_add_item(tree, hf_vita_site_num, tvb, 4, 1, ENC_LITTLE_ENDIAN); |
834 | 0 | proto_tree_add_item(tree, hf_vita_site_type, tvb, 5, 1, ENC_LITTLE_ENDIAN); |
835 | 0 | if (tvb_captured_length(tvb) > 7) { |
836 | 0 | proto_tree_add_item(tree, hf_vita_reserved, tvb, 6, 1, ENC_LITTLE_ENDIAN); |
837 | 0 | proto_tree_add_item(tree, hf_vita_ipmbl_addr, tvb, 7, 1, ENC_LITTLE_ENDIAN); |
838 | 0 | } |
839 | 0 | } |
840 | | |
841 | | /* Get Chassis Identifier (response), Set Chassis Identifier (request) |
842 | | */ |
843 | | static void |
844 | | cmd02_rs(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) |
845 | 0 | { |
846 | 0 | ipmi_add_typelen(pinfo, tree, hf_vita_chassis_identifier, hf_vita_chassis_identifier_type, hf_vita_chassis_identifier_length, tvb, 0, true); |
847 | 0 | } |
848 | | |
849 | | /* FRU Control (request) |
850 | | */ |
851 | | static void |
852 | | cmd04_rq(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) |
853 | 0 | { |
854 | 0 | proto_tree_add_item(tree, hf_vita_fruid, tvb, 0, 1, ENC_LITTLE_ENDIAN); |
855 | 0 | proto_tree_add_item(tree, hf_vita_fru_control, tvb, 1, 1, ENC_LITTLE_ENDIAN); |
856 | 0 | } |
857 | | |
858 | | /* Get FRU LED Properties (request) |
859 | | */ |
860 | | static void |
861 | | cmd05_rq(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) |
862 | 0 | { |
863 | 0 | proto_tree_add_item(tree, hf_vita_fruid, tvb, 0, 1, ENC_LITTLE_ENDIAN); |
864 | 0 | } |
865 | | |
866 | | /* Get FRU LED Properties (response) |
867 | | */ |
868 | | static void |
869 | | cmd05_rs(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) |
870 | 0 | { |
871 | 0 | proto_tree_add_item(tree, hf_vita_reserved, tvb, 0, 1, ENC_LITTLE_ENDIAN); |
872 | 0 | proto_tree_add_item(tree, hf_vita_led_count, tvb, 1, 1, ENC_LITTLE_ENDIAN); |
873 | 0 | } |
874 | | |
875 | | /* Get LED Color Capabilities (request) |
876 | | */ |
877 | | static void |
878 | | cmd06_rq(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) |
879 | 0 | { |
880 | 0 | proto_tree_add_item(tree, hf_vita_fruid, tvb, 0, 1, ENC_LITTLE_ENDIAN); |
881 | 0 | proto_tree_add_item(tree, hf_vita_led_id, tvb, 1, 1, ENC_LITTLE_ENDIAN); |
882 | 0 | } |
883 | | |
884 | | /* Get LED Color Capabilities (response) |
885 | | */ |
886 | | static void |
887 | | cmd06_rs(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) |
888 | 0 | { |
889 | 0 | static int * const bits_vita_led_caps[] = { |
890 | 0 | &hf_vita_led_cap_white, &hf_vita_led_cap_orange, |
891 | 0 | &hf_vita_led_cap_amber, &hf_vita_led_cap_green, |
892 | 0 | &hf_vita_led_cap_red, &hf_vita_led_cap_blue, |
893 | 0 | NULL |
894 | 0 | }; |
895 | 0 | static int * const bits_vita_led_flags[] = { |
896 | 0 | &hf_vita_led_flag_pwr, |
897 | 0 | &hf_vita_led_flag_hw_restrict, |
898 | 0 | NULL |
899 | 0 | }; |
900 | |
|
901 | 0 | proto_tree_add_bitmask(tree, tvb, 0, hf_vita_led_caps, |
902 | 0 | ett_vita_led_caps, bits_vita_led_caps, ENC_LITTLE_ENDIAN); |
903 | 0 | proto_tree_add_bitmask(tree, tvb, 1, hf_vita_led_def_loc_color, |
904 | 0 | ett_vita_led_color, bits_vita_led_color, ENC_LITTLE_ENDIAN); |
905 | 0 | proto_tree_add_bitmask(tree, tvb, 2, hf_vita_led_def_ovr_color, |
906 | 0 | ett_vita_led_color, bits_vita_led_color, ENC_LITTLE_ENDIAN); |
907 | 0 | proto_tree_add_bitmask(tree, tvb, 3, hf_vita_led_flags, |
908 | 0 | ett_vita_led_flags, bits_vita_led_flags, ENC_LITTLE_ENDIAN); |
909 | 0 | } |
910 | | |
911 | | /* Set FRU LED State (request) |
912 | | */ |
913 | | static void |
914 | | cmd07_rq(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) |
915 | 0 | { |
916 | 0 | proto_tree_add_item(tree, hf_vita_fruid, tvb, 0, 1, ENC_LITTLE_ENDIAN); |
917 | 0 | proto_tree_add_item(tree, hf_vita_led_id, tvb, 1, 1, ENC_LITTLE_ENDIAN); |
918 | 0 | proto_tree_add_item(tree, hf_vita_led_ovr_func, tvb, 2, 1, ENC_LITTLE_ENDIAN); |
919 | 0 | proto_tree_add_item(tree, hf_vita_led_ovr_duration, tvb, 3, 1, ENC_LITTLE_ENDIAN); |
920 | 0 | proto_tree_add_bitmask(tree, tvb, 4, hf_vita_led_ovr_color, |
921 | 0 | ett_vita_led_color, bits_vita_led_color, ENC_LITTLE_ENDIAN); |
922 | 0 | } |
923 | | |
924 | | /* Get FRU LED State (response) |
925 | | */ |
926 | | static void |
927 | | cmd08_rs(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) |
928 | 0 | { |
929 | 0 | static int * const bits_vita_led_states[] = { |
930 | 0 | &hf_vita_led_state_local, |
931 | 0 | &hf_vita_led_state_override, |
932 | 0 | &hf_vita_led_state_lamp_test, |
933 | 0 | &hf_vita_led_state_hw_restrict, |
934 | 0 | NULL |
935 | 0 | }; |
936 | 0 | proto_tree_add_bitmask(tree, tvb, 0, hf_vita_led_states, |
937 | 0 | ett_vita_led_states, bits_vita_led_states, ENC_LITTLE_ENDIAN); |
938 | 0 | proto_tree_add_item(tree, hf_vita_led_loc_func, tvb, 1, 1, ENC_LITTLE_ENDIAN); |
939 | 0 | proto_tree_add_item(tree, hf_vita_led_loc_duration, tvb, 2, 1, ENC_LITTLE_ENDIAN); |
940 | 0 | proto_tree_add_bitmask(tree, tvb, 3, hf_vita_led_loc_color, |
941 | 0 | ett_vita_led_color, bits_vita_led_color, ENC_LITTLE_ENDIAN); |
942 | 0 | if (tvb_captured_length(tvb) > 4) { |
943 | 0 | proto_tree_add_item(tree, hf_vita_led_ovr_func, tvb, 4, 1, ENC_LITTLE_ENDIAN); |
944 | 0 | proto_tree_add_item(tree, hf_vita_led_ovr_duration, tvb, 5, 1, ENC_LITTLE_ENDIAN); |
945 | 0 | proto_tree_add_bitmask(tree, tvb, 6, hf_vita_led_ovr_color, |
946 | 0 | ett_vita_led_color, bits_vita_led_color, ENC_LITTLE_ENDIAN); |
947 | 0 | } |
948 | 0 | if (tvb_captured_length(tvb) > 7) { |
949 | 0 | proto_tree_add_item(tree, hf_vita_led_lamp_test_duration, tvb, 7, 1, ENC_LITTLE_ENDIAN); |
950 | 0 | } |
951 | 0 | } |
952 | | |
953 | | /* Set IPMB State (request) |
954 | | */ |
955 | | static void |
956 | | cmd09_rq(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) |
957 | 0 | { |
958 | 0 | static int * const bits_vita_ipmb_state[] = { |
959 | 0 | &hf_vita_ipmb_state, |
960 | 0 | &hf_vita_ipmb_link_id, |
961 | 0 | NULL |
962 | 0 | }; |
963 | 0 | proto_tree_add_bitmask(tree, tvb, 0, hf_vita_ipmba_state, |
964 | 0 | ett_vita_ipmb_state, bits_vita_ipmb_state, ENC_LITTLE_ENDIAN); |
965 | 0 | proto_tree_add_bitmask(tree, tvb, 1, hf_vita_ipmbb_state, |
966 | 0 | ett_vita_ipmb_state, bits_vita_ipmb_state, ENC_LITTLE_ENDIAN); |
967 | 0 | } |
968 | | |
969 | | /* Set FRU State Policy Bits (request) |
970 | | */ |
971 | | static void |
972 | | cmd0A_rq(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) |
973 | 0 | { |
974 | 0 | proto_tree_add_item(tree, hf_vita_fruid, tvb, 0, 1, ENC_LITTLE_ENDIAN); |
975 | 0 | proto_tree_add_bitmask(tree, tvb, 1, hf_vita_fru_policy_mask_bits, |
976 | 0 | ett_vita_fru_policy_bits, bits_vita_fru_policy_bits, |
977 | 0 | ENC_LITTLE_ENDIAN); |
978 | 0 | proto_tree_add_bitmask(tree, tvb, 2, hf_vita_fru_policy_set_bits, |
979 | 0 | ett_vita_fru_policy_bits, bits_vita_fru_policy_bits, |
980 | 0 | ENC_LITTLE_ENDIAN); |
981 | 0 | } |
982 | | |
983 | | /* Get FRU State Policy Bits (response) |
984 | | */ |
985 | | static void |
986 | | cmd0B_rs(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) |
987 | 0 | { |
988 | 0 | proto_tree_add_bitmask(tree, tvb, 0, hf_vita_fru_policy_bits, |
989 | 0 | ett_vita_fru_policy_bits, bits_vita_fru_policy_bits, |
990 | 0 | ENC_LITTLE_ENDIAN); |
991 | 0 | } |
992 | | |
993 | | /* Set FRU Activation (request) |
994 | | */ |
995 | | static void |
996 | | cmd0C_rq(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) |
997 | 0 | { |
998 | 0 | proto_tree_add_item(tree, hf_vita_fruid, tvb, 0, 1, ENC_LITTLE_ENDIAN); |
999 | 0 | proto_tree_add_item(tree, hf_vita_fru_activation, tvb, 1, 1, ENC_LITTLE_ENDIAN); |
1000 | 0 | } |
1001 | | |
1002 | | /* Get FRU Device Locator Record ID (response) |
1003 | | */ |
1004 | | static void |
1005 | | cmd0D_rs(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) |
1006 | 0 | { |
1007 | 0 | proto_tree_add_item(tree, hf_vita_record_id, tvb, 0, 2, ENC_LITTLE_ENDIAN); |
1008 | 0 | } |
1009 | | |
1010 | | /* Get FAN Speed Properties (response) |
1011 | | */ |
1012 | | static void |
1013 | | cmd14_rs(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) |
1014 | 0 | { |
1015 | 0 | static int * const bits_vita_fan_properties[] = { |
1016 | 0 | &hf_vita_fan_prop_local_control, |
1017 | 0 | NULL |
1018 | 0 | }; |
1019 | 0 | proto_tree_add_item(tree, hf_vita_fan_min_level, tvb, 0, 1, ENC_LITTLE_ENDIAN); |
1020 | 0 | proto_tree_add_item(tree, hf_vita_fan_max_level, tvb, 1, 1, ENC_LITTLE_ENDIAN); |
1021 | 0 | proto_tree_add_item(tree, hf_vita_fan_norm_level, tvb, 2, 1, ENC_LITTLE_ENDIAN); |
1022 | 0 | proto_tree_add_bitmask(tree, tvb, 3, hf_vita_fan_properties, |
1023 | 0 | ett_vita_fan_properties, bits_vita_fan_properties, ENC_LITTLE_ENDIAN); |
1024 | 0 | } |
1025 | | |
1026 | | /* Set FAN Level (request) |
1027 | | */ |
1028 | | static void |
1029 | | cmd15_rq(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) |
1030 | 0 | { |
1031 | 0 | proto_tree_add_item(tree, hf_vita_fruid, tvb, 0, 1, ENC_LITTLE_ENDIAN); |
1032 | 0 | proto_tree_add_item(tree, hf_vita_fan_override_level, tvb, 1, 1, ENC_LITTLE_ENDIAN); |
1033 | 0 | if (tvb_captured_length(tvb) > 2) { |
1034 | 0 | proto_tree_add_item(tree, hf_vita_fan_local_control, tvb, 2, 1, ENC_LITTLE_ENDIAN); |
1035 | 0 | } |
1036 | 0 | } |
1037 | | |
1038 | | /* Get FAN Level (response) |
1039 | | */ |
1040 | | static void |
1041 | | cmd16_rs(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) |
1042 | 0 | { |
1043 | 0 | proto_tree_add_item(tree, hf_vita_fan_override_level, tvb, 0, 1, ENC_LITTLE_ENDIAN); |
1044 | 0 | if (tvb_captured_length(tvb) > 1) { |
1045 | 0 | proto_tree_add_item(tree, hf_vita_fan_local_level, tvb, 1, 1, ENC_LITTLE_ENDIAN); |
1046 | 0 | } |
1047 | 0 | if (tvb_captured_length(tvb) > 2) { |
1048 | 0 | proto_tree_add_item(tree, hf_vita_fan_local_control, tvb, 2, 1, ENC_LITTLE_ENDIAN); |
1049 | 0 | } |
1050 | 0 | } |
1051 | | |
1052 | | /* Get IPMB Link Info (request) |
1053 | | */ |
1054 | | static void |
1055 | | cmd18_rq(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) |
1056 | 0 | { |
1057 | 0 | proto_tree_add_item(tree, hf_vita_ipmb_link_key_type, tvb, 0, 1, ENC_LITTLE_ENDIAN); |
1058 | 0 | proto_tree_add_item(tree, hf_vita_ipmb_link_key_value, tvb, 1, 1, ENC_LITTLE_ENDIAN); |
1059 | 0 | } |
1060 | | |
1061 | | /* Get IPMB Link Info (response) |
1062 | | */ |
1063 | | static void |
1064 | | cmd18_rs(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) |
1065 | 0 | { |
1066 | 0 | proto_tree_add_item(tree, hf_vita_ipmb_link_number, tvb, 0, 1, ENC_LITTLE_ENDIAN); |
1067 | 0 | proto_tree_add_item(tree, hf_vita_ipmb_sensor_number, tvb, 1, 1, ENC_LITTLE_ENDIAN); |
1068 | 0 | } |
1069 | | |
1070 | | /* Get Chassis Manager IPMB Address (response) |
1071 | | */ |
1072 | | static void |
1073 | | cmd1B_rs(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) |
1074 | 0 | { |
1075 | 0 | proto_tree_add_item(tree, hf_vita_active_chmc_ipmb_addr, tvb, 0, 1, ENC_LITTLE_ENDIAN); |
1076 | 0 | proto_tree_add_item(tree, hf_vita_backup_chmc_ipmb_addr, tvb, 1, 1, ENC_LITTLE_ENDIAN); |
1077 | 0 | } |
1078 | | |
1079 | | /* Set FAN Policy (request) |
1080 | | */ |
1081 | | static void |
1082 | | cmd1C_rq(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) |
1083 | 0 | { |
1084 | 0 | proto_tree_add_item(tree, hf_vita_fan_number, tvb, 0, 1, ENC_LITTLE_ENDIAN); |
1085 | 0 | proto_tree_add_item(tree, hf_vita_fan_policy, tvb, 1, 1, ENC_LITTLE_ENDIAN); |
1086 | 0 | if (tvb_captured_length(tvb) > 2) { |
1087 | 0 | proto_tree_add_item(tree, hf_vita_fan_policy_timeout, tvb, 2, 1, ENC_LITTLE_ENDIAN); |
1088 | 0 | } |
1089 | 0 | if (tvb_captured_length(tvb) > 3) { |
1090 | 0 | proto_tree_add_item(tree, hf_vita_site_num, tvb, 3, 1, ENC_LITTLE_ENDIAN); |
1091 | 0 | proto_tree_add_item(tree, hf_vita_site_type, tvb, 4, 1, ENC_LITTLE_ENDIAN); |
1092 | 0 | } |
1093 | 0 | } |
1094 | | |
1095 | | /* Get FAN Policy (request) |
1096 | | */ |
1097 | | static void |
1098 | | cmd1D_rq(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) |
1099 | 0 | { |
1100 | 0 | proto_tree_add_item(tree, hf_vita_fan_number, tvb, 0, 1, ENC_LITTLE_ENDIAN); |
1101 | 0 | if (tvb_captured_length(tvb) > 1) { |
1102 | 0 | proto_tree_add_item(tree, hf_vita_site_num, tvb, 1, 1, ENC_LITTLE_ENDIAN); |
1103 | 0 | proto_tree_add_item(tree, hf_vita_site_type, tvb, 2, 1, ENC_LITTLE_ENDIAN); |
1104 | 0 | } |
1105 | 0 | } |
1106 | | |
1107 | | /* Get FAN Policy (response) |
1108 | | */ |
1109 | | static void |
1110 | | cmd1D_rs(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) |
1111 | 0 | { |
1112 | 0 | proto_tree_add_item(tree, hf_vita_fan_policy, tvb, 0, 1, ENC_LITTLE_ENDIAN); |
1113 | 0 | if (tvb_captured_length(tvb) > 1) { |
1114 | 0 | proto_tree_add_item(tree, hf_vita_fan_coverage, tvb, 1, 1, ENC_LITTLE_ENDIAN); |
1115 | 0 | } |
1116 | 0 | } |
1117 | | |
1118 | | /* FRU Control Capabilities (response) |
1119 | | */ |
1120 | | static void |
1121 | | cmd1E_rs(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) |
1122 | 0 | { |
1123 | 0 | static int * const bits_vita_fru_control_caps[] = { |
1124 | 0 | &hf_vita_fru_control_cap_cold, |
1125 | 0 | &hf_vita_fru_control_cap_warm, |
1126 | 0 | &hf_vita_fru_control_cap_grace, |
1127 | 0 | &hf_vita_fru_control_cap_diag, |
1128 | 0 | &hf_vita_fru_control_cap_pwr, |
1129 | 0 | NULL |
1130 | 0 | }; |
1131 | 0 | proto_tree_add_bitmask(tree, tvb, 0, hf_vita_fru_control_caps, |
1132 | 0 | ett_vita_fru_control_caps, bits_vita_fru_control_caps, ENC_LITTLE_ENDIAN); |
1133 | 0 | } |
1134 | | |
1135 | | /* FRU Inventory Device Lock Control (request) |
1136 | | */ |
1137 | | static void |
1138 | | cmd1F_rq(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) |
1139 | 0 | { |
1140 | 0 | proto_tree_add_item(tree, hf_vita_fruid, tvb, 0, 1, ENC_LITTLE_ENDIAN); |
1141 | 0 | proto_tree_add_item(tree, hf_vita_fru_lock_operation, tvb, 1, 1, ENC_LITTLE_ENDIAN); |
1142 | 0 | proto_tree_add_item(tree, hf_vita_fru_lock_id, tvb, 2, 2, ENC_LITTLE_ENDIAN); |
1143 | 0 | } |
1144 | | |
1145 | | /* FRU Inventory Device Lock Control (response) |
1146 | | */ |
1147 | | static void |
1148 | | cmd1F_rs(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) |
1149 | 0 | { |
1150 | 0 | proto_tree_add_item(tree, hf_vita_fru_lock_id, tvb, 0, 2, ENC_LITTLE_ENDIAN); |
1151 | 0 | proto_tree_add_item(tree, hf_vita_fru_lock_timestamp, tvb, 2, 4, ENC_LITTLE_ENDIAN); |
1152 | 0 | } |
1153 | | |
1154 | | /* FRU Inventory Device Write (request) |
1155 | | */ |
1156 | | static void |
1157 | | cmd20_rq(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) |
1158 | 0 | { |
1159 | 0 | proto_tree_add_item(tree, hf_vita_fruid, tvb, 0, 1, ENC_LITTLE_ENDIAN); |
1160 | 0 | proto_tree_add_item(tree, hf_vita_fru_lock_id, tvb, 1, 2, ENC_LITTLE_ENDIAN); |
1161 | 0 | proto_tree_add_item(tree, hf_vita_fru_write_offset, tvb, 3, 2, ENC_LITTLE_ENDIAN); |
1162 | 0 | proto_tree_add_item(tree, hf_vita_fru_write_data, tvb, 5, |
1163 | 0 | tvb_captured_length(tvb) - 5, ENC_NA); |
1164 | 0 | } |
1165 | | |
1166 | | /* FRU Inventory Device Write (response) |
1167 | | */ |
1168 | | static void |
1169 | | cmd20_rs(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) |
1170 | 0 | { |
1171 | 0 | proto_tree_add_item(tree, hf_vita_fru_write_count, tvb, 0, 1, ENC_LITTLE_ENDIAN); |
1172 | 0 | } |
1173 | | |
1174 | | /* Get Chassis Manager IP Address (request) |
1175 | | */ |
1176 | | static void |
1177 | | cmd21_rq(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) |
1178 | 0 | { |
1179 | 0 | proto_tree_add_item(tree, hf_vita_chassis_addr_number, tvb, 0, 1, ENC_LITTLE_ENDIAN); |
1180 | 0 | } |
1181 | | |
1182 | | /* Get Chassis Manager IP Address (response) |
1183 | | */ |
1184 | | static void |
1185 | | cmd21_rs(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) |
1186 | 0 | { |
1187 | 0 | proto_item * item; |
1188 | 0 | static int * const bits_vita_chassis_addr_type[] = { |
1189 | 0 | &hf_vita_chassis_addr_chmc, |
1190 | 0 | &hf_vita_chassis_addr_format, |
1191 | 0 | NULL |
1192 | 0 | }; |
1193 | 0 | proto_tree_add_item(tree, hf_vita_chassis_addr_timestamp, tvb, 0, 4, ENC_LITTLE_ENDIAN); |
1194 | 0 | proto_tree_add_item(tree, hf_vita_chassis_addr_count, tvb, 4, 1, ENC_LITTLE_ENDIAN); |
1195 | 0 | proto_tree_add_item(tree, hf_vita_site_type, tvb, 5, 1, ENC_LITTLE_ENDIAN); |
1196 | 0 | proto_tree_add_item(tree, hf_vita_site_num, tvb, 6, 1, ENC_LITTLE_ENDIAN); |
1197 | 0 | proto_tree_add_item(tree, hf_vita_chassis_max_unavail, tvb, 7, 1, ENC_LITTLE_ENDIAN); |
1198 | 0 | proto_tree_add_bitmask(tree, tvb, 8, hf_vita_chassis_addr_type, |
1199 | 0 | ett_vita_chassis_addr_type, bits_vita_chassis_addr_type, |
1200 | 0 | ENC_LITTLE_ENDIAN); |
1201 | 0 | item = proto_tree_add_item(tree, hf_vita_chassis_addr, tvb, 8, -1, ENC_NA); |
1202 | |
|
1203 | 0 | if (!(tvb_get_uint8(tvb, 8) & 0x7f)) { |
1204 | 0 | proto_tree * sub = proto_item_add_subtree(item, ett_vita_chassis_addr); |
1205 | 0 | proto_tree_add_item(sub, hf_vita_ipv4_addr, tvb, 9, 4, ENC_BIG_ENDIAN); |
1206 | 0 | proto_tree_add_item(sub, hf_vita_rmcp_port, tvb, 13, 2, ENC_BIG_ENDIAN); |
1207 | 0 | } |
1208 | 0 | } |
1209 | | |
1210 | | /* Get FRU Persistent Control (response) |
1211 | | */ |
1212 | | static void |
1213 | | cmd41_rs(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) |
1214 | 0 | { |
1215 | 0 | proto_tree_add_bitmask(tree, tvb, 0, hf_vita_persistent_control_state, |
1216 | 0 | ett_vita_persistent_control_state, |
1217 | 0 | bits_vita_persistent_control_state, |
1218 | 0 | ENC_LITTLE_ENDIAN); |
1219 | 0 | } |
1220 | | |
1221 | | /* Set FRU Persistent Control (request) |
1222 | | */ |
1223 | | static void |
1224 | | cmd42_rq(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) |
1225 | 0 | { |
1226 | 0 | proto_tree_add_item(tree, hf_vita_fruid, tvb, 0, 1, ENC_LITTLE_ENDIAN); |
1227 | 0 | proto_tree_add_bitmask(tree, tvb, 1, hf_vita_persistent_control_mask, |
1228 | 0 | ett_vita_persistent_control_state, |
1229 | 0 | bits_vita_persistent_control_state, |
1230 | 0 | ENC_LITTLE_ENDIAN); |
1231 | 0 | proto_tree_add_bitmask(tree, tvb, 2, hf_vita_persistent_control_set, |
1232 | 0 | ett_vita_persistent_control_state, |
1233 | 0 | bits_vita_persistent_control_state, |
1234 | 0 | ENC_LITTLE_ENDIAN); |
1235 | 0 | } |
1236 | | |
1237 | | /* FRU Persistent Control capabilities (response) |
1238 | | */ |
1239 | | static void |
1240 | | cmd43_rs(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) |
1241 | 0 | { |
1242 | 0 | static int * const bits_vita_persistent_control_caps[] = { |
1243 | 0 | &hf_vita_persistent_control_cap_cold, |
1244 | 0 | &hf_vita_persistent_control_cap_warm, |
1245 | 0 | NULL |
1246 | 0 | }; |
1247 | 0 | proto_tree_add_bitmask(tree, tvb, 0, hf_vita_persistent_control_caps, |
1248 | 0 | ett_vita_persistent_control_caps, |
1249 | 0 | bits_vita_persistent_control_caps, |
1250 | 0 | ENC_LITTLE_ENDIAN); |
1251 | 0 | } |
1252 | | |
1253 | | /* Get Mandatory Sensor Numbers (response) |
1254 | | */ |
1255 | | static void |
1256 | | cmd44_rs(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree) |
1257 | 0 | { |
1258 | 0 | proto_tree_add_item(tree, hf_vita_fru_state_sensor_num, tvb, 0, 1, ENC_LITTLE_ENDIAN); |
1259 | 0 | proto_tree_add_item(tree, hf_vita_fru_health_sensor_num, tvb, 1, 1, ENC_LITTLE_ENDIAN); |
1260 | 0 | proto_tree_add_item(tree, hf_vita_fru_voltage_sensor_num, tvb, 2, 1, ENC_LITTLE_ENDIAN); |
1261 | 0 | proto_tree_add_item(tree, hf_vita_fru_temp_sensor_num, tvb, 3, 1, ENC_LITTLE_ENDIAN); |
1262 | 0 | proto_tree_add_item(tree, hf_vita_payload_test_results_sensor_num, tvb, 4, 1, ENC_LITTLE_ENDIAN); |
1263 | 0 | proto_tree_add_item(tree, hf_vita_payload_test_status_sensor_num, tvb, 5, 1, ENC_LITTLE_ENDIAN); |
1264 | 0 | } |
1265 | | |
1266 | | /* Array of VITA 46.11 command descriptors. |
1267 | | */ |
1268 | | static const ipmi_cmd_t cmd_vita[] = { |
1269 | | { 0x00, NULL, cmd00_rs, NULL, NULL, "[VITA] Get VSO Capabilities", 0 }, |
1270 | | { 0x01, cmd01_rq, cmd01_rs, NULL, NULL, "[VITA] Get Chassis Address Table Info", 0 }, |
1271 | | { 0x02, NULL, cmd02_rs, NULL, NULL, "[VITA] Get Chassis Identifier", 0 }, |
1272 | | { 0x03, cmd02_rs, NULL, NULL, NULL, "[VITA] Set Chassis Identifier", 0 }, |
1273 | | { 0x04, cmd04_rq, NULL, NULL, NULL, "[VITA] FRU Control", 0 }, |
1274 | | { 0x05, cmd05_rq, cmd05_rs, NULL, NULL, "[VITA] Get FRU LED Properties", 0 }, |
1275 | | { 0x06, cmd06_rq, cmd06_rs, NULL, NULL, "[VITA] Get LED Color Capabilities", 0 }, |
1276 | | { 0x07, cmd07_rq, NULL, NULL, NULL, "[VITA] Set FRU LED State", 0 }, |
1277 | | { 0x08, cmd06_rq, cmd08_rs, NULL, NULL, "[VITA] Get FRU LED State", 0 }, |
1278 | | { 0x09, cmd09_rq, NULL, NULL, NULL, "[VITA] Set IPMB State", 0 }, |
1279 | | { 0x0A, cmd0A_rq, NULL, NULL, NULL, "[VITA] Set FRU State Policy Bits", 0 }, |
1280 | | { 0x0B, cmd05_rq, cmd0B_rs, NULL, NULL, "[VITA] Get FRU State Policy Bits", 0 }, |
1281 | | { 0x0C, cmd0C_rq, NULL, NULL, NULL, "[VITA] Set FRU Activation", 0 }, |
1282 | | { 0x0D, cmd05_rq, cmd0D_rs, NULL, NULL, "[VITA] Get Device Locator Record ID", 0 }, |
1283 | | { 0x14, cmd05_rq, cmd14_rs, NULL, NULL, "[VITA] Get Fan Speed Properties", 0 }, |
1284 | | { 0x15, cmd15_rq, NULL, NULL, NULL, "[VITA] Set Fan Level", 0 }, |
1285 | | { 0x16, cmd05_rq, cmd16_rs, NULL, NULL, "[VITA] Get Fan Level", 0 }, |
1286 | | { 0x18, cmd18_rq, cmd18_rs, NULL, NULL, "[VITA] Get IPMB Link Info", 0 }, |
1287 | | { 0x1B, NULL, cmd1B_rs, NULL, NULL, "[VITA] Get Chassis Manager IPMB Address", 0 }, |
1288 | | { 0x1C, cmd1C_rq, NULL, NULL, NULL, "[VITA] Set Fan Policy", 0 }, |
1289 | | { 0x1D, cmd1D_rq, cmd1D_rs, NULL, NULL, "[VITA] Get Fan Policy", 0 }, |
1290 | | { 0x1E, cmd05_rq, cmd1E_rs, NULL, NULL, "[VITA] FRU Control Capabilities", 0 }, |
1291 | | { 0x1F, cmd1F_rq, cmd1F_rs, cc1F, NULL, "[VITA] FRU Inventory Device Lock Control", 0 }, |
1292 | | { 0x20, cmd20_rq, cmd20_rs, cc20, NULL, "[VITA] FRU Inventory Device Write", 0 }, |
1293 | | { 0x21, cmd21_rq, cmd21_rs, NULL, NULL, "[VITA] Get Chassis Manager IP Address", 0 }, |
1294 | | { 0x40, cmd01_rq, cmd01_rs, NULL, NULL, "[VITA] Get FRU Address Info", 0 }, |
1295 | | { 0x41, cmd05_rq, cmd41_rs, NULL, NULL, "[VITA] Get FRU Persistent Control", 0 }, |
1296 | | { 0x42, cmd42_rq, NULL, NULL, NULL, "[VITA] Set FRU Persistent Control", 0 }, |
1297 | | { 0x43, cmd05_rq, cmd43_rs, NULL, NULL, "[VITA] FRU Persistent Control Capabilities", 0 }, |
1298 | | { 0x44, cmd05_rq, cmd44_rs, NULL, NULL, "[VITA] Get Mandatory Sensor Numbers", 0 } |
1299 | | }; |
1300 | | |
1301 | | /* VITA 46.11 command set registrator |
1302 | | */ |
1303 | | void |
1304 | | proto_register_ipmi_vita(void) |
1305 | 14 | { |
1306 | 14 | static const uint8_t sig_vita[1] = { 3 }; |
1307 | | |
1308 | 14 | proto_register_field_array(proto_ipmi, hf_ipmi_vita, |
1309 | 14 | array_length(hf_ipmi_vita)); |
1310 | 14 | proto_register_subtree_array(ett_ipmi_vita, |
1311 | 14 | array_length(ett_ipmi_vita)); |
1312 | 14 | ipmi_register_netfn_cmdtab(IPMI_GROUP_REQ, IPMI_OEM_NONE, |
1313 | 14 | sig_vita, 1, "VITA", cmd_vita, array_length(cmd_vita)); |
1314 | 14 | } |
1315 | | |
1316 | | |
1317 | | /* |
1318 | | * Editor modelines - https://www.wireshark.org/tools/modelines.html |
1319 | | * |
1320 | | * Local variables: |
1321 | | * c-basic-offset: 8 |
1322 | | * tab-width: 8 |
1323 | | * indent-tabs-mode: t |
1324 | | * End: |
1325 | | * |
1326 | | * vi: set shiftwidth=8 tabstop=8 noexpandtab: |
1327 | | * :indentSize=8:tabSize=8:noTabs=false: |
1328 | | */ |