blob: deaf2e9412dac48eaeadd75a91cd8e41dca5b1f6 [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;
22 uint8_t keyExchangeAuthCode[20];
23} __attribute__((packed));
24
Tom Joseph3563f8f2017-05-08 15:42:54 +053025/**
Tom Joseph50fb50a2016-12-06 17:51:06 +053026 * @struct RAKP4response
27 *
28 * IPMI Payload for RAKP Message 4
29 */
30struct RAKP4response
31{
32 uint8_t messageTag;
33 uint8_t rmcpStatusCode;
34 uint16_t reserved;
35 uint32_t remoteConsoleSessionID;
36} __attribute__((packed));
37
Tom Joseph3563f8f2017-05-08 15:42:54 +053038/**
Tom Joseph50fb50a2016-12-06 17:51:06 +053039 * @brief RAKP Message 3, RAKP Message 4
40 *
41 * The session activation process is completed by the remote console and BMC
42 * exchanging messages that are signed according to the Authentication Algorithm
43 * that was negotiated, and the parameters that were passed in the earlier
44 * messages. RAKP Message 3 is the signed message from the remote console to the
45 * BMC. After receiving RAKP Message 3, the BMC returns RAKP Message 4 - a
46 * signed message from BMC to the remote console.
47 *
48 * @param[in] inPayload - Request Data for the command
49 * @param[in] handler - Reference to the Message Handler
50 *
51 * @return Response data for the command
52 */
Tom Joseph18a45e92017-04-11 11:30:44 +053053std::vector<uint8_t> RAKP34(const std::vector<uint8_t>& inPayload,
Tom Joseph50fb50a2016-12-06 17:51:06 +053054 const message::Handler& handler);
55
56} // namespace command