Add RMCP Ping support
Added support of RMCP Ping/Pong request and response
(ASF messages).
Tested: Tested using rmcpping tool to send RMCP ping.
Resolves openbmc/phosphor-net-ipmid#15
Signed-off-by: Kirill Pakhomov <k.pakhomov@yadro.com>
Change-Id: Ie5199e6af69860d9406bdd516952b62c3d05793f
diff --git a/message_handler.hpp b/message_handler.hpp
index 533ed6a..2eb4737 100644
--- a/message_handler.hpp
+++ b/message_handler.hpp
@@ -93,6 +93,12 @@
bool receive();
/**
+ * @brief Get Session data from the IPMI packet
+ *
+ */
+ void updSessionData(std::shared_ptr<Message>& inMessage);
+
+ /**
* @brief Process the incoming IPMI message
*
* The incoming message payload is handled and the command handler for
@@ -110,6 +116,21 @@
*/
void send(std::shared_ptr<Message> outMessage);
+#ifdef RMCP_PING
+ /** @brief Send the outgoing ASF message
+ *
+ * The outgoing ASF message contains only ASF message header
+ * which is flattened and sent out on the socket
+ */
+ void sendASF();
+#endif // RMCP_PING
+
+ /** @brief Write the packet to the socket
+ *
+ * @param[in] packet - Outgoing packet
+ */
+ void writeData(const std::vector<uint8_t>& packet);
+
/** @brief Socket channel for communicating with the remote client.*/
std::shared_ptr<udpsocket::Channel> channel;