1 #pragma once
2 
3 #include <cstdint>
4 
5 // IPMI commands for Storage net functions.
6 enum ipmi_netfn_storage_cmds
7 {
8     // Get capability bits
9     IPMI_CMD_GET_FRU_INV_AREA_INFO = 0x10,
10     IPMI_CMD_GET_REPOSITORY_INFO = 0x20,
11     IPMI_CMD_READ_FRU_DATA = 0x11,
12     IPMI_CMD_RESERVE_SDR = 0x22,
13     IPMI_CMD_GET_SDR = 0x23,
14     IPMI_CMD_GET_SEL_INFO = 0x40,
15     IPMI_CMD_RESERVE_SEL = 0x42,
16     IPMI_CMD_GET_SEL_ENTRY = 0x43,
17     IPMI_CMD_ADD_SEL = 0x44,
18     IPMI_CMD_DELETE_SEL = 0x46,
19     IPMI_CMD_CLEAR_SEL = 0x47,
20     IPMI_CMD_GET_SEL_TIME = 0x48,
21     IPMI_CMD_SET_SEL_TIME = 0x49,
22 
23 };
24 
25 /**
26  * @struct Read FRU Data command request data
27  */
28 struct ReadFruDataRequest
29 {
30     uint8_t fruID;    ///< FRU Device ID. FFh = reserved
31     uint8_t offsetLS; ///< FRU Inventory Offset to read, LS Byte
32     uint8_t offsetMS; ///< FRU Inventory Offset ro read, MS Byte
33     uint8_t count;    ///< Count to read
34 } __attribute__((packed));
35 
36 /**
37  * @struct Read FRU Data command response data
38  */
39 struct ReadFruDataResponse
40 {
41     uint8_t count;  ///< Response data Count.
42     uint8_t data[]; ///< Response data.
43 } __attribute__((packed));
44