blob: 7b29d70114567f4906d9f32e01b10f63a4a8f971 [file] [log] [blame]
Tom Joseph50fb50a2016-12-06 17:51:06 +05301#pragma once
2
Tom Joseph50fb50a2016-12-06 17:51:06 +05303#include "comm_module.hpp"
Vernon Mauery9e801a22018-10-12 13:20:49 -07004#include "message_handler.hpp"
5
6#include <vector>
Tom Joseph50fb50a2016-12-06 17:51:06 +05307
8namespace command
9{
10
Tom Joseph3563f8f2017-05-08 15:42:54 +053011/**
Tom Joseph50fb50a2016-12-06 17:51:06 +053012 * @struct RAKP3request
13 *
14 * IPMI Payload for RAKP Message 3
15 */
16struct RAKP3request
17{
18 uint8_t messageTag;
19 uint8_t rmcpStatusCode;
20 uint16_t reserved;
21 uint32_t managedSystemSessionID;
Tom Joseph50fb50a2016-12-06 17:51:06 +053022} __attribute__((packed));
23
Tom Joseph3563f8f2017-05-08 15:42:54 +053024/**
Tom Joseph50fb50a2016-12-06 17:51:06 +053025 * @struct RAKP4response
26 *
27 * IPMI Payload for RAKP Message 4
28 */
29struct RAKP4response
30{
31 uint8_t messageTag;
32 uint8_t rmcpStatusCode;
33 uint16_t reserved;
34 uint32_t remoteConsoleSessionID;
35} __attribute__((packed));
36
Tom Joseph3563f8f2017-05-08 15:42:54 +053037/**
Tom Joseph50fb50a2016-12-06 17:51:06 +053038 * @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 Joseph18a45e92017-04-11 11:30:44 +053052std::vector<uint8_t> RAKP34(const std::vector<uint8_t>& inPayload,
Vernon Mauery41ff9b52021-06-11 11:37:40 -070053 std::shared_ptr<message::Handler>& handler);
Tom Joseph50fb50a2016-12-06 17:51:06 +053054
55} // namespace command