summaryrefslogtreecommitdiffstats
path: root/command/rakp34.hpp
blob: e3d82ff67012bd58dec52e8a488607790c7a652f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#pragma once

#include <vector>

#include "message_handler.hpp"
#include "comm_module.hpp"

namespace command
{

/*
 * @struct RAKP3request
 *
 * IPMI Payload for RAKP Message 3
 */
struct RAKP3request
{
    uint8_t messageTag;
    uint8_t rmcpStatusCode;
    uint16_t reserved;
    uint32_t managedSystemSessionID;
    uint8_t keyExchangeAuthCode[20];
} __attribute__((packed));

/*
 * @struct RAKP4response
 *
 * IPMI Payload for RAKP Message 4
 */
struct RAKP4response
{
    uint8_t messageTag;
    uint8_t rmcpStatusCode;
    uint16_t reserved;
    uint32_t remoteConsoleSessionID;
} __attribute__((packed));

/*
 * @brief RAKP Message 3, RAKP Message 4
 *
 * The session activation process is completed by the remote console and BMC
 * exchanging messages that are signed according to the Authentication Algorithm
 * that was negotiated, and the parameters that were passed in the earlier
 * messages. RAKP Message 3 is the signed message from the remote console to the
 * BMC. After receiving RAKP Message 3, the BMC returns RAKP Message 4 - a
 * signed message from BMC to the remote console.
 *
 * @param[in] inPayload - Request Data for the command
 * @param[in] handler - Reference to the Message Handler
 *
 * @return Response data for the command
 */
std::vector<uint8_t> RAKP34(std::vector<uint8_t>& inPayload,
                            const message::Handler& handler);

} // namespace command
OpenPOWER on IntegriCloud