1 #pragma once
2 
3 #include "comm_module.hpp"
4 #include "message_handler.hpp"
5 
6 #include <vector>
7 
8 namespace command
9 {
10 
11 /**
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;
22 } __attribute__((packed));
23 
24 /**
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 
37 /**
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  */
52 std::vector<uint8_t> RAKP34(const std::vector<uint8_t>& inPayload,
53                             std::shared_ptr<message::Handler>& handler);
54 
55 } // namespace command
56