blob: 657f13b9572bd1f734c3fa1043979c639346d075 [file] [log] [blame]
Lei YU6505e9d2020-09-21 17:34:32 +08001#include "inspur_oem.hpp"
2
3#include <ipmid/api.h>
4
5namespace ipmi
6{
7
8static void registerOEMFunctions() __attribute__((constructor));
9
10ipmi_ret_t ipmiOemInspurAssetInfo(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
11 ipmi_request_t request,
12 ipmi_response_t response,
13 ipmi_data_len_t data_len,
14 ipmi_context_t context)
15{
16 // TODO: handle the oem command
17 fprintf(stderr,
18 "netfn 0x%02x, cmd 0x%02x, request %p, response %p, data_len %p, "
19 "context %p\n",
20 netfn, cmd, request, response, static_cast<void*>(data_len),
21 context);
22 return {};
23}
24
25void registerOEMFunctions(void)
26{
27 ipmi_register_callback(NETFN_OEM_INSPUR, CMD_OEM_ASSET_INFO, nullptr,
28 ipmiOemInspurAssetInfo, SYSTEM_INTERFACE);
29}
30
31} // namespace ipmi