blob: 483e0649c318c74ede16ac60371d05fc12a1f2b8 [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
Willy Tu11d68892022-01-20 10:37:34 -08007ipmi_ret_t ipmi_groupext(ipmi_netfn_t, ipmi_cmd_t, ipmi_request_t,
8 ipmi_response_t response, ipmi_data_len_t data_len,
9 ipmi_context_t)
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}