forked from openbmc/phosphor-host-ipmid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
groupext.cpp
31 lines (24 loc) · 853 Bytes
/
groupext.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include "host-ipmid/ipmid-api.h"
#include "ipmid.hpp"
#include <stdio.h>
#include <stdint.h>
#define GRPEXT_GET_GROUP_CMD 0
void register_netfn_groupext_functions() __attribute__((constructor));
ipmi_ret_t ipmi_groupext(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
ipmi_request_t request, ipmi_response_t response,
ipmi_data_len_t data_len, ipmi_context_t context)
{
// Generic return from IPMI commands.
ipmi_ret_t rc = IPMI_CC_OK;
uint8_t *p = (uint8_t*) response;
printf("IPMI GROUP EXTENTIONS\n");
*data_len = 1;
*p = 0;
return rc;
}
void register_netfn_groupext_functions()
{
printf("Registering NetFn:[0x%X], Cmd:[0x%X]\n",NETFUN_GRPEXT, GRPEXT_GET_GROUP_CMD);
ipmi_register_callback(NETFUN_GRPEXT, GRPEXT_GET_GROUP_CMD, NULL, ipmi_groupext);
return;
}