William A. Kennington III | 194375f | 2018-12-14 02:14:33 -0800 | [diff] [blame] | 1 | #include <ipmid/api.h> |
Patrick Venture | 0b02be9 | 2018-08-31 11:55:55 -0700 | [diff] [blame] | 2 | |
Patrick Venture | b51bf9c | 2018-09-10 15:53:14 -0700 | [diff] [blame] | 3 | #include <cstdio> |
| 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 | |
Patrick Venture | b51bf9c | 2018-09-10 15:53:14 -0700 | [diff] [blame] | 16 | std::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 | } |