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