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