Tom Joseph | 50fb50a | 2016-12-06 17:51:06 +0530 | [diff] [blame] | 1 | #pragma once |
| 2 | |
Tom Joseph | 50fb50a | 2016-12-06 17:51:06 +0530 | [diff] [blame] | 3 | #include "comm_module.hpp" |
Vernon Mauery | 9e801a2 | 2018-10-12 13:20:49 -0700 | [diff] [blame] | 4 | #include "message_handler.hpp" |
| 5 | |
| 6 | #include <vector> |
Tom Joseph | 50fb50a | 2016-12-06 17:51:06 +0530 | [diff] [blame] | 7 | |
| 8 | namespace command |
| 9 | { |
| 10 | |
Tom Joseph | 3563f8f | 2017-05-08 15:42:54 +0530 | [diff] [blame] | 11 | /** |
Tom Joseph | 50fb50a | 2016-12-06 17:51:06 +0530 | [diff] [blame] | 12 | * @struct RAKP3request |
| 13 | * |
| 14 | * IPMI Payload for RAKP Message 3 |
| 15 | */ |
| 16 | struct RAKP3request |
| 17 | { |
| 18 | uint8_t messageTag; |
| 19 | uint8_t rmcpStatusCode; |
| 20 | uint16_t reserved; |
| 21 | uint32_t managedSystemSessionID; |
Tom Joseph | 50fb50a | 2016-12-06 17:51:06 +0530 | [diff] [blame] | 22 | } __attribute__((packed)); |
| 23 | |
Tom Joseph | 3563f8f | 2017-05-08 15:42:54 +0530 | [diff] [blame] | 24 | /** |
Tom Joseph | 50fb50a | 2016-12-06 17:51:06 +0530 | [diff] [blame] | 25 | * @struct RAKP4response |
| 26 | * |
| 27 | * IPMI Payload for RAKP Message 4 |
| 28 | */ |
| 29 | struct RAKP4response |
| 30 | { |
| 31 | uint8_t messageTag; |
| 32 | uint8_t rmcpStatusCode; |
| 33 | uint16_t reserved; |
| 34 | uint32_t remoteConsoleSessionID; |
| 35 | } __attribute__((packed)); |
| 36 | |
Tom Joseph | 3563f8f | 2017-05-08 15:42:54 +0530 | [diff] [blame] | 37 | /** |
Tom Joseph | 50fb50a | 2016-12-06 17:51:06 +0530 | [diff] [blame] | 38 | * @brief RAKP Message 3, RAKP Message 4 |
| 39 | * |
| 40 | * The session activation process is completed by the remote console and BMC |
| 41 | * exchanging messages that are signed according to the Authentication Algorithm |
| 42 | * that was negotiated, and the parameters that were passed in the earlier |
| 43 | * messages. RAKP Message 3 is the signed message from the remote console to the |
| 44 | * BMC. After receiving RAKP Message 3, the BMC returns RAKP Message 4 - a |
| 45 | * signed message from BMC to the remote console. |
| 46 | * |
| 47 | * @param[in] inPayload - Request Data for the command |
| 48 | * @param[in] handler - Reference to the Message Handler |
| 49 | * |
| 50 | * @return Response data for the command |
| 51 | */ |
Tom Joseph | 18a45e9 | 2017-04-11 11:30:44 +0530 | [diff] [blame] | 52 | std::vector<uint8_t> RAKP34(const std::vector<uint8_t>& inPayload, |
Vernon Mauery | 41ff9b5 | 2021-06-11 11:37:40 -0700 | [diff] [blame] | 53 | std::shared_ptr<message::Handler>& handler); |
Tom Joseph | 50fb50a | 2016-12-06 17:51:06 +0530 | [diff] [blame] | 54 | |
| 55 | } // namespace command |