add rqSA ipmb request source address
Platform Event Message Command requires that if the message
comes in over IPMB, the generator ID is the rqSA of the message.
IPMB bridge is now responsible for passing this in via the options
map so it can be passed in the context to the command.
Change-Id: I52b7c9ef23896a4efcceeebf12559bbdf897d1c2
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
diff --git a/include/ipmid/message.hpp b/include/ipmid/message.hpp
index 030618f..7f1ad7e 100644
--- a/include/ipmid/message.hpp
+++ b/include/ipmid/message.hpp
@@ -36,9 +36,10 @@
Context() = default;
Context(NetFn netFn, Cmd cmd, int channel, int userId, Privilege priv,
- boost::asio::yield_context* yield = nullptr) :
+ int rqSA = 0, boost::asio::yield_context* yield = nullptr) :
netFn(netFn),
- cmd(cmd), channel(channel), userId(userId), priv(priv), yield(yield)
+ cmd(cmd), channel(channel), userId(userId), priv(priv), rqSA(rqSA),
+ yield(yield)
{
}
@@ -48,6 +49,9 @@
int channel = 0;
int userId = 0;
Privilege priv = Privilege::None;
+ // srcAddr is only set on IPMB requests because
+ // Platform Event Message needs it to determine the incoming format
+ int rqSA = 0;
// if non-null, use this to do blocking asynchronous asio calls
boost::asio::yield_context* yield = nullptr;
};