blob: 6891d75287c1a3993d5ac5211237dfa4c95edeb1 [file] [log] [blame]
Patrick Williams37af7332016-09-02 21:21:42 -05001#include "host-ipmid/ipmid-api.h"
Patrick Williams53a360e2016-08-12 22:01:02 -05002#include "ipmid.hpp"
Chris Austenc2cd29d2016-02-05 20:02:29 -06003#include <stdio.h>
4#include <stdint.h>
5
6#define GRPEXT_GET_GROUP_CMD 0
7void register_netfn_groupext_functions() __attribute__((constructor));
8
9ipmi_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
25void register_netfn_groupext_functions()
26{
Tom05732372016-09-06 17:21:23 +053027 // <Group Extension Command>
Chris Austenc2cd29d2016-02-05 20:02:29 -060028 printf("Registering NetFn:[0x%X], Cmd:[0x%X]\n",NETFUN_GRPEXT, GRPEXT_GET_GROUP_CMD);
Tom05732372016-09-06 17:21:23 +053029 ipmi_register_callback(NETFUN_GRPEXT, GRPEXT_GET_GROUP_CMD, NULL, ipmi_groupext,
30 PRIVILEGE_USER);
Chris Austenc2cd29d2016-02-05 20:02:29 -060031
32 return;
33}