AppaRao Puli | 071f3f2 | 2018-05-24 16:45:30 +0530 | [diff] [blame] | 1 | /* |
| 2 | // Copyright (c) 2018 Intel Corporation |
| 3 | // |
| 4 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | // you may not use this file except in compliance with the License. |
| 6 | // You may obtain a copy of the License at |
| 7 | // |
| 8 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | // |
| 10 | // Unless required by applicable law or agreed to in writing, software |
| 11 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | // See the License for the specific language governing permissions and |
| 14 | // limitations under the License. |
| 15 | */ |
| 16 | #pragma once |
Sumanth Bhat | e4e633e | 2019-05-14 12:13:57 +0000 | [diff] [blame] | 17 | #include <array> |
NITIN SHARMA | b541a5a | 2019-07-18 12:46:59 +0000 | [diff] [blame] | 18 | #include <ipmid/api.hpp> |
AppaRao Puli | 071f3f2 | 2018-05-24 16:45:30 +0530 | [diff] [blame] | 19 | #include <string> |
| 20 | |
| 21 | namespace ipmi |
| 22 | { |
| 23 | |
| 24 | static constexpr uint8_t maxIpmiChannels = 16; |
Richard Marian Thomaiyar | a39208e | 2018-12-08 17:27:11 +0530 | [diff] [blame] | 25 | static constexpr uint8_t currentChNum = 0xE; |
Vernon Mauery | 735ee95 | 2019-02-15 13:38:52 -0800 | [diff] [blame] | 26 | static constexpr uint8_t invalidChannel = 0xff; |
AppaRao Puli | 071f3f2 | 2018-05-24 16:45:30 +0530 | [diff] [blame] | 27 | |
Richard Marian Thomaiyar | 6e1ba9e | 2018-11-29 06:29:21 +0530 | [diff] [blame] | 28 | /** |
Sumanth Bhat | e4e633e | 2019-05-14 12:13:57 +0000 | [diff] [blame] | 29 | * @array of privilege levels |
| 30 | */ |
| 31 | extern const std::array<std::string, PRIVILEGE_OEM + 1> privList; |
| 32 | |
| 33 | /** |
Richard Marian Thomaiyar | 6e1ba9e | 2018-11-29 06:29:21 +0530 | [diff] [blame] | 34 | * @enum IPMI return codes specific to channel (refer spec se 22.22 response |
| 35 | * data) |
| 36 | */ |
NITIN SHARMA | b541a5a | 2019-07-18 12:46:59 +0000 | [diff] [blame] | 37 | constexpr Cc ccActionNotSupportedForChannel = 0x82; |
| 38 | constexpr Cc ccAccessModeNotSupportedForChannel = 0x83; |
AppaRao Puli | 071f3f2 | 2018-05-24 16:45:30 +0530 | [diff] [blame] | 39 | |
Richard Marian Thomaiyar | 6e1ba9e | 2018-11-29 06:29:21 +0530 | [diff] [blame] | 40 | /** |
| 41 | * @enum Channel Protocol Type (refer spec sec 6.4) |
| 42 | */ |
AppaRao Puli | 071f3f2 | 2018-05-24 16:45:30 +0530 | [diff] [blame] | 43 | enum class EChannelProtocolType : uint8_t |
| 44 | { |
| 45 | na = 0x00, |
| 46 | ipmbV10 = 0x01, |
| 47 | icmbV11 = 0x02, |
| 48 | reserved = 0x03, |
| 49 | ipmiSmbus = 0x04, |
| 50 | kcs = 0x05, |
| 51 | smic = 0x06, |
| 52 | bt10 = 0x07, |
| 53 | bt15 = 0x08, |
| 54 | tMode = 0x09, |
| 55 | oem = 0x1C, |
| 56 | }; |
| 57 | |
Richard Marian Thomaiyar | 6e1ba9e | 2018-11-29 06:29:21 +0530 | [diff] [blame] | 58 | /** |
| 59 | * @enum Channel Medium Type (refer spec sec 6.5) |
| 60 | */ |
AppaRao Puli | 071f3f2 | 2018-05-24 16:45:30 +0530 | [diff] [blame] | 61 | enum class EChannelMediumType : uint8_t |
| 62 | { |
| 63 | reserved = 0x00, |
| 64 | ipmb = 0x01, |
| 65 | icmbV10 = 0x02, |
| 66 | icmbV09 = 0x03, |
| 67 | lan8032 = 0x04, |
| 68 | serial = 0x05, |
| 69 | otherLan = 0x06, |
| 70 | pciSmbus = 0x07, |
| 71 | smbusV11 = 0x08, |
| 72 | smbusV20 = 0x09, |
| 73 | usbV1x = 0x0A, |
| 74 | usbV2x = 0x0B, |
| 75 | systemInterface = 0x0C, |
| 76 | oem = 0x60, |
| 77 | unknown = 0x82, |
| 78 | }; |
| 79 | |
Richard Marian Thomaiyar | 6e1ba9e | 2018-11-29 06:29:21 +0530 | [diff] [blame] | 80 | /** |
| 81 | * @enum Channel Session Type (refer spec sec 22.24 - |
| 82 | * response data byte 5) |
| 83 | */ |
AppaRao Puli | 071f3f2 | 2018-05-24 16:45:30 +0530 | [diff] [blame] | 84 | enum class EChannelSessSupported : uint8_t |
| 85 | { |
| 86 | none = 0, |
| 87 | single = 1, |
| 88 | multi = 2, |
| 89 | any = 3, |
| 90 | }; |
| 91 | |
Richard Marian Thomaiyar | 6e1ba9e | 2018-11-29 06:29:21 +0530 | [diff] [blame] | 92 | /** |
| 93 | * @enum Channel Access Mode (refer spec sec 6.6) |
| 94 | */ |
AppaRao Puli | 071f3f2 | 2018-05-24 16:45:30 +0530 | [diff] [blame] | 95 | enum class EChannelAccessMode : uint8_t |
| 96 | { |
| 97 | disabled = 0, |
| 98 | preboot = 1, |
| 99 | alwaysAvail = 2, |
| 100 | shared = 3, |
| 101 | }; |
| 102 | |
Richard Marian Thomaiyar | 6e1ba9e | 2018-11-29 06:29:21 +0530 | [diff] [blame] | 103 | /** |
| 104 | * @enum Authentication Types (refer spec sec 13.6 - IPMI |
| 105 | * Session Header) |
| 106 | */ |
AppaRao Puli | 071f3f2 | 2018-05-24 16:45:30 +0530 | [diff] [blame] | 107 | enum class EAuthType : uint8_t |
| 108 | { |
| 109 | none = (1 << 0x0), |
| 110 | md2 = (1 << 0x1), |
| 111 | md5 = (1 << 0x2), |
| 112 | reserved = (1 << 0x3), |
| 113 | straightPasswd = (1 << 0x4), |
| 114 | oem = (1 << 0x5), |
| 115 | }; |
| 116 | |
Saravanan Palanisamy | b5a0f16 | 2019-03-04 18:34:44 +0530 | [diff] [blame] | 117 | // TODO: Remove duplicate 'PayloadType' definition from netipmid's message.hpp |
| 118 | // to phosphor-ipmi-host/include |
| 119 | /** |
| 120 | * @enum Payload Types (refer spec sec 13.27.3) |
| 121 | */ |
| 122 | enum class PayloadType : uint8_t |
| 123 | { |
| 124 | IPMI = 0x00, |
| 125 | SOL = 0x01, |
| 126 | OPEN_SESSION_REQUEST = 0x10, |
| 127 | OPEN_SESSION_RESPONSE = 0x11, |
| 128 | RAKP1 = 0x12, |
| 129 | RAKP2 = 0x13, |
| 130 | RAKP3 = 0x14, |
| 131 | RAKP4 = 0x15, |
| 132 | INVALID = 0xFF, |
| 133 | }; |
| 134 | |
Richard Marian Thomaiyar | 6e1ba9e | 2018-11-29 06:29:21 +0530 | [diff] [blame] | 135 | /** |
| 136 | * @enum Access mode for channel access set/get (refer spec |
| 137 | * sec 22.22 - request byte 2[7:6]) |
| 138 | */ |
AppaRao Puli | 071f3f2 | 2018-05-24 16:45:30 +0530 | [diff] [blame] | 139 | typedef enum |
| 140 | { |
| 141 | doNotSet = 0x00, |
| 142 | nvData = 0x01, |
| 143 | activeData = 0x02, |
| 144 | reserved = 0x03, |
| 145 | } EChannelActionType; |
| 146 | |
Richard Marian Thomaiyar | 6e1ba9e | 2018-11-29 06:29:21 +0530 | [diff] [blame] | 147 | /** |
| 148 | * @enum Access set flag to determine changes that has to be updated |
| 149 | * in channel access data configuration. |
| 150 | */ |
AppaRao Puli | 071f3f2 | 2018-05-24 16:45:30 +0530 | [diff] [blame] | 151 | enum AccessSetFlag |
| 152 | { |
| 153 | setAccessMode = (1 << 0), |
| 154 | setUserAuthEnabled = (1 << 1), |
| 155 | setMsgAuthEnabled = (1 << 2), |
| 156 | setAlertingEnabled = (1 << 3), |
| 157 | setPrivLimit = (1 << 4), |
| 158 | }; |
| 159 | |
Richard Marian Thomaiyar | 6e1ba9e | 2018-11-29 06:29:21 +0530 | [diff] [blame] | 160 | /** @struct ChannelAccess |
| 161 | * |
| 162 | * Structure to store channel access related information, defined in IPMI |
| 163 | * specification and used in Get / Set channel access (refer spec sec 22.22 |
| 164 | * & 22.23) |
| 165 | */ |
AppaRao Puli | 071f3f2 | 2018-05-24 16:45:30 +0530 | [diff] [blame] | 166 | struct ChannelAccess |
| 167 | { |
| 168 | uint8_t accessMode; |
| 169 | bool userAuthDisabled; |
| 170 | bool perMsgAuthDisabled; |
| 171 | bool alertingDisabled; |
| 172 | uint8_t privLimit; |
| 173 | }; |
| 174 | |
Richard Marian Thomaiyar | 6e1ba9e | 2018-11-29 06:29:21 +0530 | [diff] [blame] | 175 | /** @struct ChannelInfo |
| 176 | * |
| 177 | * Structure to store data about channel information, which identifies each |
| 178 | * channel type and information as defined in IPMI specification. (refer spec |
| 179 | * sec 22.22 & 22.23) |
| 180 | */ |
AppaRao Puli | 071f3f2 | 2018-05-24 16:45:30 +0530 | [diff] [blame] | 181 | struct ChannelInfo |
| 182 | { |
| 183 | uint8_t mediumType; |
| 184 | uint8_t protocolType; |
| 185 | uint8_t sessionSupported; |
| 186 | bool isIpmi; // Is session IPMI |
| 187 | // This is used in Get LAN Configuration parameter. |
| 188 | // This holds the supported AuthTypes for a given channel. |
| 189 | uint8_t authTypeSupported; |
| 190 | }; |
| 191 | |
| 192 | /** @brief determines valid channel |
| 193 | * |
| 194 | * @param[in] chNum- channel number |
| 195 | * |
| 196 | * @return true if valid, false otherwise |
| 197 | */ |
Richard Marian Thomaiyar | a45cb34 | 2018-12-03 15:08:59 +0530 | [diff] [blame] | 198 | bool isValidChannel(const uint8_t chNum); |
AppaRao Puli | 071f3f2 | 2018-05-24 16:45:30 +0530 | [diff] [blame] | 199 | |
| 200 | /** @brief determines whether channel device exist |
| 201 | * |
| 202 | * @param[in] chNum - channel number |
| 203 | * |
| 204 | * @return true if valid, false otherwise |
| 205 | */ |
Richard Marian Thomaiyar | a45cb34 | 2018-12-03 15:08:59 +0530 | [diff] [blame] | 206 | bool doesDeviceExist(const uint8_t chNum); |
AppaRao Puli | 071f3f2 | 2018-05-24 16:45:30 +0530 | [diff] [blame] | 207 | |
| 208 | /** @brief determines whether privilege limit is valid |
| 209 | * |
| 210 | * @param[in] privLimit - Privilege limit |
| 211 | * |
| 212 | * @return true if valid, false otherwise |
| 213 | */ |
Richard Marian Thomaiyar | a45cb34 | 2018-12-03 15:08:59 +0530 | [diff] [blame] | 214 | bool isValidPrivLimit(const uint8_t privLimit); |
AppaRao Puli | 071f3f2 | 2018-05-24 16:45:30 +0530 | [diff] [blame] | 215 | |
| 216 | /** @brief determines whether access mode is valid |
| 217 | * |
| 218 | * @param[in] accessMode - Access mode |
| 219 | * |
| 220 | * @return true if valid, false otherwise |
| 221 | */ |
Richard Marian Thomaiyar | a45cb34 | 2018-12-03 15:08:59 +0530 | [diff] [blame] | 222 | bool isValidAccessMode(const uint8_t accessMode); |
AppaRao Puli | 071f3f2 | 2018-05-24 16:45:30 +0530 | [diff] [blame] | 223 | |
| 224 | /** @brief determines valid authentication type based on channel number |
| 225 | * |
| 226 | * @param[in] chNum - channel number |
| 227 | * @param[in] authType - authentication type |
| 228 | * |
| 229 | * @return true if valid, false otherwise |
| 230 | */ |
Richard Marian Thomaiyar | a45cb34 | 2018-12-03 15:08:59 +0530 | [diff] [blame] | 231 | bool isValidAuthType(const uint8_t chNum, const EAuthType& authType); |
AppaRao Puli | 071f3f2 | 2018-05-24 16:45:30 +0530 | [diff] [blame] | 232 | |
| 233 | /** @brief determines supported session type of a channel |
| 234 | * |
| 235 | * @param[in] chNum - channel number |
| 236 | * |
| 237 | * @return EChannelSessSupported - supported session type |
| 238 | */ |
Richard Marian Thomaiyar | a45cb34 | 2018-12-03 15:08:59 +0530 | [diff] [blame] | 239 | EChannelSessSupported getChannelSessionSupport(const uint8_t chNum); |
AppaRao Puli | 071f3f2 | 2018-05-24 16:45:30 +0530 | [diff] [blame] | 240 | |
| 241 | /** @brief determines number of active sessions on a channel |
| 242 | * |
| 243 | * @param[in] chNum - channel number |
| 244 | * |
| 245 | * @return numer of active sessions |
| 246 | */ |
Richard Marian Thomaiyar | a45cb34 | 2018-12-03 15:08:59 +0530 | [diff] [blame] | 247 | int getChannelActiveSessions(const uint8_t chNum); |
AppaRao Puli | 071f3f2 | 2018-05-24 16:45:30 +0530 | [diff] [blame] | 248 | |
Vernon Mauery | 5831712 | 2018-11-28 11:02:43 -0800 | [diff] [blame] | 249 | /** @brief determines maximum transfer size for a channel |
| 250 | * |
| 251 | * @param[in] chNum - channel number |
| 252 | * |
| 253 | * @return maximum bytes that can be transferred on this channel |
| 254 | */ |
| 255 | size_t getChannelMaxTransferSize(uint8_t chNum); |
| 256 | |
AppaRao Puli | 071f3f2 | 2018-05-24 16:45:30 +0530 | [diff] [blame] | 257 | /** @brief initializes channel management |
| 258 | * |
NITIN SHARMA | b541a5a | 2019-07-18 12:46:59 +0000 | [diff] [blame] | 259 | * @return ccSuccess for success, others for failure. |
AppaRao Puli | 071f3f2 | 2018-05-24 16:45:30 +0530 | [diff] [blame] | 260 | */ |
NITIN SHARMA | b541a5a | 2019-07-18 12:46:59 +0000 | [diff] [blame] | 261 | Cc ipmiChannelInit(); |
AppaRao Puli | 071f3f2 | 2018-05-24 16:45:30 +0530 | [diff] [blame] | 262 | |
| 263 | /** @brief provides channel info details |
| 264 | * |
| 265 | * @param[in] chNum - channel number |
| 266 | * @param[out] chInfo - channel info details |
| 267 | * |
NITIN SHARMA | b541a5a | 2019-07-18 12:46:59 +0000 | [diff] [blame] | 268 | * @return ccSuccess for success, others for failure. |
AppaRao Puli | 071f3f2 | 2018-05-24 16:45:30 +0530 | [diff] [blame] | 269 | */ |
NITIN SHARMA | b541a5a | 2019-07-18 12:46:59 +0000 | [diff] [blame] | 270 | Cc getChannelInfo(const uint8_t chNum, ChannelInfo& chInfo); |
AppaRao Puli | 071f3f2 | 2018-05-24 16:45:30 +0530 | [diff] [blame] | 271 | |
| 272 | /** @brief provides channel access data |
| 273 | * |
| 274 | * @param[in] chNum - channel number |
| 275 | * @param[out] chAccessData -channel access data |
| 276 | * |
NITIN SHARMA | b541a5a | 2019-07-18 12:46:59 +0000 | [diff] [blame] | 277 | * @return ccSuccess for success, others for failure. |
AppaRao Puli | 071f3f2 | 2018-05-24 16:45:30 +0530 | [diff] [blame] | 278 | */ |
NITIN SHARMA | b541a5a | 2019-07-18 12:46:59 +0000 | [diff] [blame] | 279 | Cc getChannelAccessData(const uint8_t chNum, ChannelAccess& chAccessData); |
AppaRao Puli | 071f3f2 | 2018-05-24 16:45:30 +0530 | [diff] [blame] | 280 | |
Richard Marian Thomaiyar | a39208e | 2018-12-08 17:27:11 +0530 | [diff] [blame] | 281 | /** @brief provides function to convert current channel number (0xE) |
| 282 | * |
| 283 | * @param[in] chNum - channel number as requested in commands. |
Vernon Mauery | 5ed3959 | 2019-05-14 09:16:53 -0700 | [diff] [blame] | 284 | * @param[in] devChannel - channel number as provided by device (not 0xE) |
Richard Marian Thomaiyar | 30b0112 | 2019-04-03 15:46:03 +0530 | [diff] [blame] | 285 | * |
| 286 | * @return same channel number or proper channel number for current channel |
| 287 | * number (0xE). |
| 288 | */ |
Vernon Mauery | 5ed3959 | 2019-05-14 09:16:53 -0700 | [diff] [blame] | 289 | static inline uint8_t convertCurrentChannelNum(const uint8_t chNum, |
| 290 | const uint8_t devChannel) |
Richard Marian Thomaiyar | 30b0112 | 2019-04-03 15:46:03 +0530 | [diff] [blame] | 291 | { |
| 292 | if (chNum == currentChNum) |
| 293 | { |
Vernon Mauery | 5ed3959 | 2019-05-14 09:16:53 -0700 | [diff] [blame] | 294 | return devChannel; |
Richard Marian Thomaiyar | 30b0112 | 2019-04-03 15:46:03 +0530 | [diff] [blame] | 295 | } |
| 296 | return chNum; |
| 297 | } |
| 298 | |
AppaRao Puli | 071f3f2 | 2018-05-24 16:45:30 +0530 | [diff] [blame] | 299 | /** @brief to set channel access data |
| 300 | * |
| 301 | * @param[in] chNum - channel number |
| 302 | * @param[in] chAccessData - channel access data |
| 303 | * @param[in] setFlag - flag to indicate updatable fields |
| 304 | * |
NITIN SHARMA | b541a5a | 2019-07-18 12:46:59 +0000 | [diff] [blame] | 305 | * @return ccSuccess for success, others for failure. |
AppaRao Puli | 071f3f2 | 2018-05-24 16:45:30 +0530 | [diff] [blame] | 306 | */ |
NITIN SHARMA | b541a5a | 2019-07-18 12:46:59 +0000 | [diff] [blame] | 307 | Cc setChannelAccessData(const uint8_t chNum, const ChannelAccess& chAccessData, |
| 308 | const uint8_t setFlag); |
AppaRao Puli | 071f3f2 | 2018-05-24 16:45:30 +0530 | [diff] [blame] | 309 | |
| 310 | /** @brief to get channel access data persistent data |
| 311 | * |
| 312 | * @param[in] chNum - channel number |
| 313 | * @param[out] chAccessData - channel access data |
| 314 | * |
NITIN SHARMA | b541a5a | 2019-07-18 12:46:59 +0000 | [diff] [blame] | 315 | * @return ccSuccess for success, others for failure. |
AppaRao Puli | 071f3f2 | 2018-05-24 16:45:30 +0530 | [diff] [blame] | 316 | */ |
NITIN SHARMA | b541a5a | 2019-07-18 12:46:59 +0000 | [diff] [blame] | 317 | Cc getChannelAccessPersistData(const uint8_t chNum, |
| 318 | ChannelAccess& chAccessData); |
AppaRao Puli | 071f3f2 | 2018-05-24 16:45:30 +0530 | [diff] [blame] | 319 | |
| 320 | /** @brief to set channel access data persistent data |
| 321 | * |
| 322 | * @param[in] chNum - channel number |
| 323 | * @param[in] chAccessData - channel access data |
| 324 | * @param[in] setFlag - flag to indicate updatable fields |
| 325 | * |
NITIN SHARMA | b541a5a | 2019-07-18 12:46:59 +0000 | [diff] [blame] | 326 | * @return ccSuccess for success, others for failure. |
AppaRao Puli | 071f3f2 | 2018-05-24 16:45:30 +0530 | [diff] [blame] | 327 | */ |
NITIN SHARMA | b541a5a | 2019-07-18 12:46:59 +0000 | [diff] [blame] | 328 | Cc setChannelAccessPersistData(const uint8_t chNum, |
| 329 | const ChannelAccess& chAccessData, |
| 330 | const uint8_t setFlag); |
AppaRao Puli | 071f3f2 | 2018-05-24 16:45:30 +0530 | [diff] [blame] | 331 | |
| 332 | /** @brief provides supported authentication type for the channel |
| 333 | * |
| 334 | * @param[in] chNum - channel number |
| 335 | * @param[out] authTypeSupported - supported authentication type |
| 336 | * |
NITIN SHARMA | b541a5a | 2019-07-18 12:46:59 +0000 | [diff] [blame] | 337 | * @return ccSuccess for success, others for failure. |
AppaRao Puli | 071f3f2 | 2018-05-24 16:45:30 +0530 | [diff] [blame] | 338 | */ |
NITIN SHARMA | b541a5a | 2019-07-18 12:46:59 +0000 | [diff] [blame] | 339 | Cc getChannelAuthTypeSupported(const uint8_t chNum, uint8_t& authTypeSupported); |
AppaRao Puli | 071f3f2 | 2018-05-24 16:45:30 +0530 | [diff] [blame] | 340 | |
| 341 | /** @brief provides enabled authentication type for the channel |
| 342 | * |
| 343 | * @param[in] chNum - channel number |
| 344 | * @param[in] priv - privilege |
| 345 | * @param[out] authType - enabled authentication type |
| 346 | * |
NITIN SHARMA | b541a5a | 2019-07-18 12:46:59 +0000 | [diff] [blame] | 347 | * @return ccSuccess for success, others for failure. |
AppaRao Puli | 071f3f2 | 2018-05-24 16:45:30 +0530 | [diff] [blame] | 348 | */ |
NITIN SHARMA | b541a5a | 2019-07-18 12:46:59 +0000 | [diff] [blame] | 349 | Cc getChannelEnabledAuthType(const uint8_t chNum, const uint8_t priv, |
| 350 | EAuthType& authType); |
AppaRao Puli | 071f3f2 | 2018-05-24 16:45:30 +0530 | [diff] [blame] | 351 | |
Johnathan Mantey | 74a2102 | 2018-12-13 13:17:56 -0800 | [diff] [blame] | 352 | /** @brief Retrieves the LAN channel name from the IPMI channel number |
| 353 | * |
| 354 | * @param[in] chNum - IPMI channel number |
| 355 | * |
| 356 | * @return the LAN channel name (i.e. eth0) |
| 357 | */ |
Richard Marian Thomaiyar | 55768e3 | 2019-03-02 22:54:37 +0530 | [diff] [blame] | 358 | std::string getChannelName(const uint8_t chNum); |
Johnathan Mantey | 74a2102 | 2018-12-13 13:17:56 -0800 | [diff] [blame] | 359 | |
Vernon Mauery | 735ee95 | 2019-02-15 13:38:52 -0800 | [diff] [blame] | 360 | /** @brief Retrieves the LAN channel number from the IPMI channel name |
| 361 | * |
| 362 | * @param[in] chName - IPMI channel name (i.e. eth0) |
| 363 | * |
| 364 | * @return the LAN channel number |
| 365 | */ |
| 366 | uint8_t getChannelByName(const std::string& chName); |
| 367 | |
Ayushi Smriti | 6fd812d | 2019-04-12 18:51:31 +0000 | [diff] [blame] | 368 | /** @brief determines whether payload type is valid |
| 369 | * |
| 370 | * @param[in] payload type - Payload Type |
| 371 | * |
| 372 | * @return true if valid, false otherwise |
| 373 | */ |
| 374 | bool isValidPayloadType(const PayloadType payloadType); |
| 375 | |
AppaRao Puli | 071f3f2 | 2018-05-24 16:45:30 +0530 | [diff] [blame] | 376 | } // namespace ipmi |