blob: 2f008237e9b6ed38900e7a98eaec5b17eb2678de [file] [log] [blame]
Tom Joseph50fb50a2016-12-06 17:51:06 +05301#pragma once
2
3#include <vector>
4
5#include "message_handler.hpp"
6#include "comm_module.hpp"
7
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,
Tom Joseph50fb50a2016-12-06 17:51:06 +053053 const message::Handler& handler);
54
55} // namespace command