1 #include <ipmid/api.hpp>
2
3 #include <cstdio>
4
5 #define GRPEXT_GET_GROUP_CMD 0
6 void register_netfn_groupext_functions() __attribute__((constructor));
7
ipmi_groupext(ipmi_netfn_t,ipmi_cmd_t,ipmi_request_t,ipmi_response_t response,ipmi_data_len_t data_len,ipmi_context_t)8 ipmi_ret_t ipmi_groupext(ipmi_netfn_t, ipmi_cmd_t, ipmi_request_t,
9 ipmi_response_t response, ipmi_data_len_t data_len,
10 ipmi_context_t)
11 {
12 // Generic return from IPMI commands.
13 ipmi_ret_t rc = IPMI_CC_OK;
14 uint8_t* p = (uint8_t*)response;
15
16 std::printf("IPMI GROUP EXTENSIONS\n");
17
18 *data_len = 1;
19 *p = 0;
20
21 return rc;
22 }
23
register_netfn_groupext_functions()24 void register_netfn_groupext_functions()
25 {
26 // <Group Extension Command>
27 ipmi_register_callback(NETFUN_GRPEXT, GRPEXT_GET_GROUP_CMD, NULL,
28 ipmi_groupext, PRIVILEGE_USER);
29
30 return;
31 }
32