blob: 43656cdf8aa22dd079f70ba3166c94e48ea4d81f [file] [log] [blame]
Patrick Williams53a360e2016-08-12 22:01:02 -05001#include "ipmid.hpp"
Patrick Venture0b02be92018-08-31 11:55:55 -07002
Patrick Venture46470a32018-09-07 19:26:25 -07003#include <host-ipmid/ipmid-api.h>
Patrick Venture0b02be92018-08-31 11:55:55 -07004
Patrick Ventureb51bf9c2018-09-10 15:53:14 -07005#include <cstdio>
6
Chris Austenc2cd29d2016-02-05 20:02:29 -06007#define GRPEXT_GET_GROUP_CMD 0
8void register_netfn_groupext_functions() __attribute__((constructor));
9
10ipmi_ret_t ipmi_groupext(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
Patrick Venture0b02be92018-08-31 11:55:55 -070011 ipmi_request_t request, ipmi_response_t response,
12 ipmi_data_len_t data_len, ipmi_context_t context)
Chris Austenc2cd29d2016-02-05 20:02:29 -060013{
Patrick Venture0b02be92018-08-31 11:55:55 -070014 // Generic return from IPMI commands.
Chris Austenc2cd29d2016-02-05 20:02:29 -060015 ipmi_ret_t rc = IPMI_CC_OK;
Patrick Venture0b02be92018-08-31 11:55:55 -070016 uint8_t* p = (uint8_t*)response;
Chris Austenc2cd29d2016-02-05 20:02:29 -060017
Patrick Ventureb51bf9c2018-09-10 15:53:14 -070018 std::printf("IPMI GROUP EXTENSIONS\n");
Chris Austenc2cd29d2016-02-05 20:02:29 -060019
20 *data_len = 1;
21 *p = 0;
22
23 return rc;
24}
25
26void register_netfn_groupext_functions()
27{
Tom05732372016-09-06 17:21:23 +053028 // <Group Extension Command>
Patrick Venture0b02be92018-08-31 11:55:55 -070029 ipmi_register_callback(NETFUN_GRPEXT, GRPEXT_GET_GROUP_CMD, NULL,
30 ipmi_groupext, PRIVILEGE_USER);
Chris Austenc2cd29d2016-02-05 20:02:29 -060031
32 return;
33}