blob: 010a2450052372836226be2c2f68bd40986bb3f4 [file] [log] [blame]
Tom Joseph64b3dec2017-04-03 01:53:44 +05301#pragma once
2
3#include <vector>
4#include "message_handler.hpp"
5
6namespace sol
7{
8
9namespace command
10{
11
12/** @brief SOL Payload Handler
13 *
14 * This command is used for activating and deactivating a payload type under a
15 * given IPMI session. The UDP Port number for SOL is the same as the port that
16 * was used to establish the IPMI session.
17 *
18 * @param[in] inPayload - Request data for the command.
19 * @param[in] handler - Reference to the message handler.
20 *
21 * @return Response data for the command.
22 */
23std::vector<uint8_t> payloadHandler(std::vector<uint8_t>& inPayload,
24 const message::Handler& handler);
Tom Josephe14ac962017-04-03 01:56:04 +053025
26constexpr uint8_t netfnTransport = 0x0C;
27constexpr uint8_t solActivatingCmd = 0x20;
28
29/** @struct ActivatingRequest
30 *
31 * IPMI payload for SOL Activating command.
32 */
33struct ActivatingRequest
34{
35#if BYTE_ORDER == LITTLE_ENDIAN
36 uint8_t sessionState : 4; //!< SOL session state.
37 uint8_t reserved : 4; //!< Reserved.
38#endif
39
40#if BYTE_ORDER == BIG_ENDIAN
41 uint8_t reserved : 4; //!< Reserved.
42 uint8_t sessionState : 4; //!< SOL session state.
43#endif
44
45 uint8_t payloadInstance; //!< Payload instance.
46 uint8_t majorVersion; //!< SOL format major version
47 uint8_t minorVersion; //!< SOL format minor version
48} __attribute__((packed));
49
50/** @brief SOL Activating Command.
51 *
52 * This command provides a mechanism for the BMC to notify a remote application
53 * that a SOL payload is activating on another channel.The request message is a
54 * message that is asynchronously generated by the BMC. The BMC will not wait
55 * for a response from the remote console before dropping the serial connection
56 * to proceed with SOL, therefore the remote console does not need to respond
57 * to this command.
58 *
59 * @param[in] payloadInstance - SOL payload instance.
60 * @param[in] sessionID - IPMI session ID.
61 */
62void activating(uint8_t payloadInstance, uint32_t sessionID);
63
Tom Joseph64b3dec2017-04-03 01:53:44 +053064} // namespace command
65
66} // namespace sol