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