blob: 5b71dde0c078da6b696ca5d849193defac63d363 [file] [log] [blame]
Patrick Ventureb51bf9c2018-09-10 15:53:14 -07001#include <cstdio>
Vernon Mauerye08fbff2019-04-03 09:19:34 -07002#include <ipmid/api.hpp>
Patrick Ventureb51bf9c2018-09-10 15:53:14 -07003
Chris Austenc2cd29d2016-02-05 20:02:29 -06004#define GRPEXT_GET_GROUP_CMD 0
5void register_netfn_groupext_functions() __attribute__((constructor));
6
7ipmi_ret_t ipmi_groupext(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
Patrick Venture0b02be92018-08-31 11:55:55 -07008 ipmi_request_t request, ipmi_response_t response,
9 ipmi_data_len_t data_len, ipmi_context_t context)
Chris Austenc2cd29d2016-02-05 20:02:29 -060010{
Patrick Venture0b02be92018-08-31 11:55:55 -070011 // Generic return from IPMI commands.
Chris Austenc2cd29d2016-02-05 20:02:29 -060012 ipmi_ret_t rc = IPMI_CC_OK;
Patrick Venture0b02be92018-08-31 11:55:55 -070013 uint8_t* p = (uint8_t*)response;
Chris Austenc2cd29d2016-02-05 20:02:29 -060014
Patrick Ventureb51bf9c2018-09-10 15:53:14 -070015 std::printf("IPMI GROUP EXTENSIONS\n");
Chris Austenc2cd29d2016-02-05 20:02:29 -060016
17 *data_len = 1;
18 *p = 0;
19
20 return rc;
21}
22
23void register_netfn_groupext_functions()
24{
Tom05732372016-09-06 17:21:23 +053025 // <Group Extension Command>
Patrick Venture0b02be92018-08-31 11:55:55 -070026 ipmi_register_callback(NETFUN_GRPEXT, GRPEXT_GET_GROUP_CMD, NULL,
27 ipmi_groupext, PRIVILEGE_USER);
Chris Austenc2cd29d2016-02-05 20:02:29 -060028
29 return;
30}