Patrick Venture | b51bf9c | 2018-09-10 15:53:14 -0700 | [diff] [blame] | 1 | #include <cstdio> |
Vernon Mauery | e08fbff | 2019-04-03 09:19:34 -0700 | [diff] [blame] | 2 | #include <ipmid/api.hpp> |
Patrick Venture | b51bf9c | 2018-09-10 15:53:14 -0700 | [diff] [blame] | 3 | |
Chris Austen | c2cd29d | 2016-02-05 20:02:29 -0600 | [diff] [blame] | 4 | #define GRPEXT_GET_GROUP_CMD 0 |
| 5 | void register_netfn_groupext_functions() __attribute__((constructor)); |
| 6 | |
Willy Tu | 11d6889 | 2022-01-20 10:37:34 -0800 | [diff] [blame] | 7 | ipmi_ret_t ipmi_groupext(ipmi_netfn_t, ipmi_cmd_t, ipmi_request_t, |
| 8 | ipmi_response_t response, ipmi_data_len_t data_len, |
| 9 | ipmi_context_t) |
Chris Austen | c2cd29d | 2016-02-05 20:02:29 -0600 | [diff] [blame] | 10 | { |
Patrick Venture | 0b02be9 | 2018-08-31 11:55:55 -0700 | [diff] [blame] | 11 | // Generic return from IPMI commands. |
Chris Austen | c2cd29d | 2016-02-05 20:02:29 -0600 | [diff] [blame] | 12 | ipmi_ret_t rc = IPMI_CC_OK; |
Patrick Venture | 0b02be9 | 2018-08-31 11:55:55 -0700 | [diff] [blame] | 13 | uint8_t* p = (uint8_t*)response; |
Chris Austen | c2cd29d | 2016-02-05 20:02:29 -0600 | [diff] [blame] | 14 | |
Patrick Venture | b51bf9c | 2018-09-10 15:53:14 -0700 | [diff] [blame] | 15 | std::printf("IPMI GROUP EXTENSIONS\n"); |
Chris Austen | c2cd29d | 2016-02-05 20:02:29 -0600 | [diff] [blame] | 16 | |
| 17 | *data_len = 1; |
| 18 | *p = 0; |
| 19 | |
| 20 | return rc; |
| 21 | } |
| 22 | |
| 23 | void register_netfn_groupext_functions() |
| 24 | { |
Tom | 0573237 | 2016-09-06 17:21:23 +0530 | [diff] [blame] | 25 | // <Group Extension Command> |
Patrick Venture | 0b02be9 | 2018-08-31 11:55:55 -0700 | [diff] [blame] | 26 | ipmi_register_callback(NETFUN_GRPEXT, GRPEXT_GET_GROUP_CMD, NULL, |
| 27 | ipmi_groupext, PRIVILEGE_USER); |
Chris Austen | c2cd29d | 2016-02-05 20:02:29 -0600 | [diff] [blame] | 28 | |
| 29 | return; |
| 30 | } |