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