summaryrefslogtreecommitdiffstats
path: root/user_channel/channel_mgmt.hpp
diff options
context:
space:
mode:
authorRichard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>2018-12-08 17:27:11 +0530
committerRichard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>2018-12-19 01:11:55 +0000
commita39208e0b5cf9b9cab8568f8049ef19b7c8dc100 (patch)
treef69ae7615586d1a052b0103d1eccbfba22a015dc /user_channel/channel_mgmt.hpp
parent6e1ba9effa687791170858cf10aa1c26c0742b75 (diff)
downloadphosphor-host-ipmid-a39208e0b5cf9b9cab8568f8049ef19b7c8dc100.tar.gz
phosphor-host-ipmid-a39208e0b5cf9b9cab8568f8049ef19b7c8dc100.zip
Add self channel number conversion function
Support for self channel number conversion added. This will be used by IPMI commands like GetUserAccess, GetChannelInfo etc. to query the details for the channel in which the command is requested. Self channel number 0xE will be converted to proper channel number by this function Unit-Test: Performed that commands received through ipmid channel are marked as channel 0xF and through netipmid as 0x1, when channel number 0xE is used Change-Id: I53820558faf4439d9909d52e4e98d71c38e714b4 Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
Diffstat (limited to 'user_channel/channel_mgmt.hpp')
-rw-r--r--user_channel/channel_mgmt.hpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/user_channel/channel_mgmt.hpp b/user_channel/channel_mgmt.hpp
index 8cdb9c7..d696075 100644
--- a/user_channel/channel_mgmt.hpp
+++ b/user_channel/channel_mgmt.hpp
@@ -195,6 +195,14 @@ class ChannelConfig
*/
CommandPrivilege convertToPrivLimitIndex(const std::string& value);
+ /** @brief function to convert channel number to channel index
+ *
+ * @param[in] chNum - channel number
+ *
+ * @return channel index
+ */
+ uint8_t convertToChannelIndexNumber(const uint8_t chNum);
+
/** @brief function to write persistent channel configuration to config file
*
* @return 0 for success, -errno for failure.
@@ -380,14 +388,6 @@ class ChannelConfig
*/
EChannelProtocolType convertToProtocolTypeIndex(const std::string& value);
- /** @brief function to convert channel number to channel index
- *
- * @param[in] chNum - channel number
- *
- * @return channel index
- */
- uint8_t convertToChannelIndexNumber(const uint8_t chNum);
-
/** @brief function to convert channel name to network interface name
*
* @param[in] value - channel interface name - ipmi centric
OpenPOWER on IntegriCloud