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