blob: a110a24a20877403861aea20739054bc3c7cecae [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
11/*
12 * @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
25/*
26 * @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
38/*
39 * @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