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