Patrick Williams | 53a360e | 2016-08-12 22:01:02 -0500 | [diff] [blame] | 1 | #include "ipmid.hpp" |
Patrick Venture | 0b02be9 | 2018-08-31 11:55:55 -0700 | [diff] [blame] | 2 | |
Chris Austen | c2cd29d | 2016-02-05 20:02:29 -0600 | [diff] [blame] | 3 | #include <stdint.h> |
Patrick Venture | 0b02be9 | 2018-08-31 11:55:55 -0700 | [diff] [blame] | 4 | #include <stdio.h> |
| 5 | |
| 6 | #include "host-ipmid/ipmid-api.h" |
Chris Austen | c2cd29d | 2016-02-05 20:02:29 -0600 | [diff] [blame] | 7 | |
| 8 | #define GRPEXT_GET_GROUP_CMD 0 |
| 9 | void register_netfn_groupext_functions() __attribute__((constructor)); |
| 10 | |
| 11 | ipmi_ret_t ipmi_groupext(ipmi_netfn_t netfn, ipmi_cmd_t cmd, |
Patrick Venture | 0b02be9 | 2018-08-31 11:55:55 -0700 | [diff] [blame] | 12 | ipmi_request_t request, ipmi_response_t response, |
| 13 | ipmi_data_len_t data_len, ipmi_context_t context) |
Chris Austen | c2cd29d | 2016-02-05 20:02:29 -0600 | [diff] [blame] | 14 | { |
Patrick Venture | 0b02be9 | 2018-08-31 11:55:55 -0700 | [diff] [blame] | 15 | // Generic return from IPMI commands. |
Chris Austen | c2cd29d | 2016-02-05 20:02:29 -0600 | [diff] [blame] | 16 | ipmi_ret_t rc = IPMI_CC_OK; |
Patrick Venture | 0b02be9 | 2018-08-31 11:55:55 -0700 | [diff] [blame] | 17 | uint8_t* p = (uint8_t*)response; |
Chris Austen | c2cd29d | 2016-02-05 20:02:29 -0600 | [diff] [blame] | 18 | |
Gunnar Mills | 8991dd6 | 2017-10-25 17:11:29 -0500 | [diff] [blame] | 19 | printf("IPMI GROUP EXTENSIONS\n"); |
Chris Austen | c2cd29d | 2016-02-05 20:02:29 -0600 | [diff] [blame] | 20 | |
| 21 | *data_len = 1; |
| 22 | *p = 0; |
| 23 | |
| 24 | return rc; |
| 25 | } |
| 26 | |
| 27 | void register_netfn_groupext_functions() |
| 28 | { |
Tom | 0573237 | 2016-09-06 17:21:23 +0530 | [diff] [blame] | 29 | // <Group Extension Command> |
Patrick Venture | 0b02be9 | 2018-08-31 11:55:55 -0700 | [diff] [blame] | 30 | ipmi_register_callback(NETFUN_GRPEXT, GRPEXT_GET_GROUP_CMD, NULL, |
| 31 | ipmi_groupext, PRIVILEGE_USER); |
Chris Austen | c2cd29d | 2016-02-05 20:02:29 -0600 | [diff] [blame] | 32 | |
| 33 | return; |
| 34 | } |