summaryrefslogtreecommitdiffstats
path: root/user_channel/channel_layer.cpp
diff options
context:
space:
mode:
authorAyushi Smriti <smriti.ayushi@intel.com>2019-04-12 18:51:31 +0000
committerVernon Mauery <vernon.mauery@linux.intel.com>2019-06-14 16:59:29 +0000
commit6fd812d17402f1c8db242ea8b454fe896711ba71 (patch)
treed5ed665cddebe2d9842cdce5142d274cd799c78b /user_channel/channel_layer.cpp
parentf6092898e6058af10e2a1545ac5bf35a62b3ec90 (diff)
downloadphosphor-host-ipmid-6fd812d17402f1c8db242ea8b454fe896711ba71.tar.gz
phosphor-host-ipmid-6fd812d17402f1c8db242ea8b454fe896711ba71.zip
Add get channel payload version command
Implement get channel payload version command (IPMI specification section 24.9). As per the specification, this command is basically a hard-coded value that says we are using IPMI 2.0. Tested: ipmitool raw 6 0x4F 3 1 // Command 10 // Response Change-Id: Id16723e7257361814b98f3c14d759f2919ad4c03 Signed-off-by: Ayushi Smriti <smriti.ayushi@intel.com> Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com> Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
Diffstat (limited to 'user_channel/channel_layer.cpp')
-rw-r--r--user_channel/channel_layer.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/user_channel/channel_layer.cpp b/user_channel/channel_layer.cpp
index da9c613..122b3ea 100644
--- a/user_channel/channel_layer.cpp
+++ b/user_channel/channel_layer.cpp
@@ -146,4 +146,15 @@ uint8_t getChannelByName(const std::string& chName)
{
return getChannelConfigObject().getChannelByName(chName);
}
+
+bool isValidPayloadType(const PayloadType payloadType)
+{
+ return (
+ payloadType == PayloadType::IPMI || payloadType == PayloadType::SOL ||
+ payloadType == PayloadType::OPEN_SESSION_REQUEST ||
+ payloadType == PayloadType::OPEN_SESSION_RESPONSE ||
+ payloadType == PayloadType::RAKP1 ||
+ payloadType == PayloadType::RAKP2 ||
+ payloadType == PayloadType::RAKP3 || payloadType == PayloadType::RAKP4);
+}
} // namespace ipmi
OpenPOWER on IntegriCloud