Patrick Williams | 37af733 | 2016-09-02 21:21:42 -0500 | [diff] [blame] | 1 | #include "host-ipmid/ipmid-api.h" |
Patrick Williams | 53a360e | 2016-08-12 22:01:02 -0500 | [diff] [blame] | 2 | #include "ipmid.hpp" |
Chris Austen | c2cd29d | 2016-02-05 20:02:29 -0600 | [diff] [blame] | 3 | #include <stdio.h> |
| 4 | #include <stdint.h> |
| 5 | |
| 6 | #define GRPEXT_GET_GROUP_CMD 0 |
| 7 | void register_netfn_groupext_functions() __attribute__((constructor)); |
| 8 | |
| 9 | ipmi_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 | |
| 25 | void register_netfn_groupext_functions() |
| 26 | { |
Tom | 0573237 | 2016-09-06 17:21:23 +0530 | [diff] [blame] | 27 | // <Group Extension Command> |
Chris Austen | c2cd29d | 2016-02-05 20:02:29 -0600 | [diff] [blame] | 28 | printf("Registering NetFn:[0x%X], Cmd:[0x%X]\n",NETFUN_GRPEXT, GRPEXT_GET_GROUP_CMD); |
Tom | 0573237 | 2016-09-06 17:21:23 +0530 | [diff] [blame] | 29 | ipmi_register_callback(NETFUN_GRPEXT, GRPEXT_GET_GROUP_CMD, NULL, ipmi_groupext, |
| 30 | PRIVILEGE_USER); |
Chris Austen | c2cd29d | 2016-02-05 20:02:29 -0600 | [diff] [blame] | 31 | |
| 32 | return; |
| 33 | } |