Vernon Mauery | e7329c7 | 2018-10-08 12:05:16 -0700 | [diff] [blame] | 1 | /** |
| 2 | * Copyright © 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 |
| 17 | |
| 18 | #include <ipmid/api.hpp> |
Vernon Mauery | 08a70aa | 2018-11-07 09:36:22 -0800 | [diff] [blame] | 19 | #include <ipmid/filter.hpp> |
Vernon Mauery | e7329c7 | 2018-10-08 12:05:16 -0700 | [diff] [blame] | 20 | #include <ipmid/handler.hpp> |
| 21 | |
| 22 | namespace ipmi |
| 23 | { |
| 24 | |
| 25 | namespace impl |
| 26 | { |
| 27 | |
| 28 | // IPMI command handler registration implementation |
| 29 | bool registerHandler(int prio, NetFn netFn, Cmd cmd, Privilege priv, |
| 30 | ::ipmi::HandlerBase::ptr handler); |
Vernon Mauery | f984a01 | 2018-10-08 12:05:18 -0700 | [diff] [blame] | 31 | bool registerGroupHandler(int prio, Group group, Cmd cmd, Privilege priv, |
| 32 | ::ipmi::HandlerBase::ptr handler); |
| 33 | bool registerOemHandler(int prio, Iana iana, Cmd cmd, Privilege priv, |
| 34 | ::ipmi::HandlerBase::ptr handler); |
| 35 | |
Vernon Mauery | 08a70aa | 2018-11-07 09:36:22 -0800 | [diff] [blame] | 36 | // IPMI command filter registration implementation |
| 37 | void registerFilter(int prio, ::ipmi::FilterBase::ptr filter); |
| 38 | |
Vernon Mauery | e7329c7 | 2018-10-08 12:05:16 -0700 | [diff] [blame] | 39 | } // namespace impl |
| 40 | |
| 41 | /** |
| 42 | * @brief main IPMI handler registration function |
| 43 | * |
| 44 | * This function should be used to register all new-style IPMI handler |
| 45 | * functions. This function just passes the callback to makeHandler, which |
| 46 | * creates a new wrapper object that will automatically extract the appropriate |
| 47 | * parameters for the callback function as well as pack up the response. |
| 48 | * |
| 49 | * @param prio - priority at which to register; see api.hpp |
| 50 | * @param netFn - the IPMI net function number to register |
| 51 | * @param cmd - the IPMI command number to register |
| 52 | * @param priv - the IPMI user privilige required for this command |
| 53 | * @param handler - the callback function that will handle this request |
| 54 | * |
| 55 | * @return bool - success of registering the handler |
| 56 | */ |
| 57 | template <typename Handler> |
| 58 | bool registerHandler(int prio, NetFn netFn, Cmd cmd, Privilege priv, |
| 59 | Handler&& handler) |
| 60 | { |
| 61 | auto h = ipmi::makeHandler(std::forward<Handler>(handler)); |
| 62 | return impl::registerHandler(prio, netFn, cmd, priv, h); |
| 63 | } |
| 64 | |
Vernon Mauery | f984a01 | 2018-10-08 12:05:18 -0700 | [diff] [blame] | 65 | /** |
| 66 | * @brief register a IPMI OEM group handler |
| 67 | * |
| 68 | * From IPMI 2.0 spec Network Function Codes Table (Row 2Ch): |
| 69 | * The first data byte position in requests and responses under this network |
| 70 | * function identifies the defining body that specifies command functionality. |
| 71 | * Software assumes that the command and completion code field positions will |
| 72 | * hold command and completion code values. |
| 73 | * |
| 74 | * The following values are used to identify the defining body: |
| 75 | * 00h PICMG - PCI Industrial Computer Manufacturer’s Group. (www.picmg.com) |
| 76 | * 01h DMTF Pre-OS Working Group ASF Specification (www.dmtf.org) |
| 77 | * 02h Server System Infrastructure (SSI) Forum (www.ssiforum.org) |
| 78 | * 03h VITA Standards Organization (VSO) (www.vita.com) |
| 79 | * DCh DCMI Specifications (www.intel.com/go/dcmi) |
| 80 | * all other Reserved |
| 81 | * |
| 82 | * When this network function is used, the ID for the defining body occupies |
| 83 | * the first data byte in a request, and the second data byte (following the |
| 84 | * completion code) in a response. |
| 85 | * |
| 86 | * @tparam Handler - implicitly specified callback function type |
| 87 | * @param prio - priority at which to register; see api.hpp |
| 88 | * @param netFn - the IPMI net function number to register |
| 89 | * @param cmd - the IPMI command number to register |
| 90 | * @param priv - the IPMI user privilige required for this command |
| 91 | * @param handler - the callback function that will handle this request |
| 92 | * |
| 93 | * @return bool - success of registering the handler |
| 94 | * |
| 95 | */ |
| 96 | template <typename Handler> |
| 97 | void registerGroupHandler(int prio, Group group, Cmd cmd, Privilege priv, |
| 98 | Handler&& handler) |
| 99 | { |
| 100 | auto h = ipmi::makeHandler(handler); |
| 101 | impl::registerGroupHandler(prio, group, cmd, priv, h); |
| 102 | } |
| 103 | |
| 104 | /** |
| 105 | * @brief register a IPMI OEM IANA handler |
| 106 | * |
| 107 | * From IPMI spec Network Function Codes Table (Row 2Eh): |
| 108 | * The first three data bytes of requests and responses under this network |
| 109 | * function explicitly identify the OEM or non-IPMI group that specifies the |
| 110 | * command functionality. While the OEM or non-IPMI group defines the |
| 111 | * functional semantics for the cmd and remaining data fields, the cmd field |
| 112 | * is required to hold the same value in requests and responses for a given |
| 113 | * operation in order to be supported under the IPMI message handling and |
| 114 | * transport mechanisms. |
| 115 | * |
| 116 | * When this network function is used, the IANA Enterprise Number for the |
| 117 | * defining body occupies the first three data bytes in a request, and the |
| 118 | * first three data bytes following the completion code position in a |
| 119 | * response. |
| 120 | * |
| 121 | * @tparam Handler - implicitly specified callback function type |
| 122 | * @param prio - priority at which to register; see api.hpp |
| 123 | * @param netFn - the IPMI net function number to register |
| 124 | * @param cmd - the IPMI command number to register |
| 125 | * @param priv - the IPMI user privilige required for this command |
| 126 | * @param handler - the callback function that will handle this request |
| 127 | * |
| 128 | * @return bool - success of registering the handler |
| 129 | * |
| 130 | */ |
| 131 | template <typename Handler> |
| 132 | void registerOemHandler(int prio, Iana iana, Cmd cmd, Privilege priv, |
| 133 | Handler&& handler) |
| 134 | { |
| 135 | auto h = ipmi::makeHandler(handler); |
| 136 | impl::registerOemHandler(prio, iana, cmd, priv, h); |
| 137 | } |
| 138 | |
Vernon Mauery | 08a70aa | 2018-11-07 09:36:22 -0800 | [diff] [blame] | 139 | /** |
| 140 | * @brief IPMI command filter registration function |
| 141 | * |
| 142 | * This function should be used to register IPMI command filter functions. |
| 143 | * This function just passes the callback to makeFilter, which creates a |
| 144 | * wrapper functor object that ultimately calls the callback. |
| 145 | * |
| 146 | * Filters are called with a ipmi::message::Request shared_ptr on all IPMI |
| 147 | * commands in priority order and each filter has the opportunity to reject the |
| 148 | * command (by returning an IPMI error competion code.) If all the filters |
| 149 | * return success, the actual IPMI command will be executed. Filters can reject |
| 150 | * the command for any reason, based on system state, the context, the command |
| 151 | * payload, etc. |
| 152 | * |
| 153 | * @param prio - priority at which to register; see api.hpp |
| 154 | * @param filter - the callback function that will handle this request |
| 155 | * |
| 156 | * @return bool - success of registering the handler |
| 157 | */ |
| 158 | template <typename Filter> |
| 159 | void registerFilter(int prio, Filter&& filter) |
| 160 | { |
| 161 | auto f = ipmi::makeFilter(std::forward<Filter>(filter)); |
| 162 | impl::registerFilter(prio, f); |
| 163 | } |
| 164 | |
| 165 | template <typename Filter> |
| 166 | void registerFilter(int prio, const Filter& filter) |
| 167 | { |
| 168 | auto f = ipmi::makeFilter(filter); |
| 169 | impl::registerFilter(prio, f); |
| 170 | } |
Vernon Mauery | e7329c7 | 2018-10-08 12:05:16 -0700 | [diff] [blame] | 171 | } // namespace ipmi |
| 172 | |
| 173 | #ifdef ALLOW_DEPRECATED_API |
| 174 | /** |
| 175 | * @brief legacy IPMI handler registration function |
| 176 | * |
| 177 | * This function should be used to register all legacy IPMI handler |
| 178 | * functions. This function just behaves just as the legacy registration |
| 179 | * mechanism did, silently replacing any existing handler with a new one. |
| 180 | * |
| 181 | * @param netFn - the IPMI net function number to register |
| 182 | * @param cmd - the IPMI command number to register |
| 183 | * @param context - ignored |
| 184 | * @param handler - the callback function that will handle this request |
| 185 | * @param priv - the IPMI user privilige required for this command |
| 186 | */ |
| 187 | // [[deprecated("Use ipmi::registerHandler() instead")]] |
| 188 | void ipmi_register_callback(ipmi_netfn_t netFn, ipmi_cmd_t cmd, |
| 189 | ipmi_context_t context, ipmid_callback_t handler, |
| 190 | ipmi_cmd_privilege_t priv); |
| 191 | |
| 192 | #endif /* ALLOW_DEPRECATED_API */ |
| 193 | |
| 194 | // IPMI 2.0 and DCMI 1.5 standard commands, namespaced by NetFn |
| 195 | // OEM and non-standard commands should be defined where they are used |
| 196 | namespace ipmi |
| 197 | { |
| 198 | namespace app |
| 199 | { |
| 200 | // 0x00 reserved |
| 201 | constexpr Cmd cmdGetDeviceId = 0x01; |
| 202 | constexpr Cmd cmdColdReset = 0x02; |
| 203 | constexpr Cmd cmdWarmReset = 0x03; |
| 204 | constexpr Cmd cmdGetSelfTestResults = 0x04; |
| 205 | constexpr Cmd cmdManufacturingTestOn = 0x05; |
| 206 | constexpr Cmd cmdSetAcpiPowerState = 0x06; |
| 207 | constexpr Cmd cmdGetAcpiPowerState = 0x07; |
| 208 | constexpr Cmd cmdGetDeviceGuid = 0x08; |
| 209 | constexpr Cmd cmdGetNetFnSupport = 0x09; |
| 210 | constexpr Cmd cmdGetCmdSupport = 0x0A; |
| 211 | constexpr Cmd cmdGetCmdSubFnSupport = 0x0B; |
| 212 | constexpr Cmd cmdGetConfigurableCmds = 0x0C; |
| 213 | constexpr Cmd cmdGetConfigurableCmdSubFns = 0x0D; |
| 214 | // 0x0E-0x21 unassigned |
| 215 | constexpr Cmd cmdResetWatchdogTimer = 0x22; |
| 216 | // 0x23 unassigned |
| 217 | constexpr Cmd cmdSetWatchdogTimer = 0x24; |
| 218 | constexpr Cmd cmdGetWatchdogTimer = 0x25; |
| 219 | // 0x26-0x2D unassigned |
| 220 | constexpr Cmd cmdSetBmcGlobalEnables = 0x2E; |
| 221 | constexpr Cmd cmdGetBmcGlobalEnables = 0x2F; |
| 222 | constexpr Cmd cmdClearMessageFlags = 0x30; |
| 223 | constexpr Cmd cmdGetMessageFlags = 0x31; |
| 224 | constexpr Cmd cmdEnableMessageChannelRcv = 0x32; |
| 225 | constexpr Cmd cmdGetMessage = 0x33; |
| 226 | constexpr Cmd cmdSendMessage = 0x34; |
| 227 | constexpr Cmd cmdReadEventMessageBuffer = 0x35; |
| 228 | constexpr Cmd cmdGetBtIfaceCapabilities = 0x36; |
| 229 | constexpr Cmd cmdGetSystemGuid = 0x37; |
| 230 | constexpr Cmd cmdGetChannelAuthCapabilities = 0x38; |
| 231 | constexpr Cmd cmdGetSessionChallenge = 0x39; |
| 232 | constexpr Cmd cmdActivateSession = 0x3A; |
| 233 | constexpr Cmd cmdSetSessionPrivilegeLevel = 0x3B; |
| 234 | constexpr Cmd cmdCloseSession = 0x3C; |
| 235 | constexpr Cmd cmdGetSessionInfo = 0x3D; |
| 236 | // 0x3E unassigned |
| 237 | constexpr Cmd cmdGetAuthCode = 0x3F; |
| 238 | constexpr Cmd cmdSetChannelAccess = 0x40; |
| 239 | constexpr Cmd cmdGetChannelAccess = 0x41; |
| 240 | constexpr Cmd cmdGetChannelInfoCommand = 0x42; |
| 241 | constexpr Cmd cmdSetUserAccessCommand = 0x43; |
| 242 | constexpr Cmd cmdGetUserAccessCommand = 0x44; |
| 243 | constexpr Cmd cmdSetUserName = 0x45; |
| 244 | constexpr Cmd cmdGetUserNameCommand = 0x46; |
| 245 | constexpr Cmd cmdSetUserPasswordCommand = 0x47; |
| 246 | constexpr Cmd cmdActivatePayload = 0x48; |
| 247 | constexpr Cmd cmdDeactivatePayload = 0x49; |
| 248 | constexpr Cmd cmdGetPayloadActivationStatus = 0x4A; |
| 249 | constexpr Cmd cmdGetPayloadInstanceInfo = 0x4B; |
| 250 | constexpr Cmd cmdSetUserPayloadAccess = 0x4C; |
| 251 | constexpr Cmd cmdGetUserPayloadAccess = 0x4D; |
| 252 | constexpr Cmd cmdGetChannelPayloadSupport = 0x4E; |
| 253 | constexpr Cmd cmdGetChannelPayloadVersion = 0x4F; |
| 254 | constexpr Cmd cmdGetChannelOemPayloadInfo = 0x50; |
| 255 | // 0x51 unassigned |
| 256 | constexpr Cmd cmdMasterWriteRead = 0x52; |
| 257 | // 0x53 unassigned |
| 258 | constexpr Cmd cmdGetChannelCipherSuites = 0x54; |
| 259 | constexpr Cmd cmdSuspendResumePayloadEnc = 0x55; |
| 260 | constexpr Cmd cmdSetChannelSecurityKeys = 0x56; |
| 261 | constexpr Cmd cmdGetSystemIfCapabilities = 0x57; |
| 262 | constexpr Cmd cmdSetSystemInfoParameters = 0x58; |
| 263 | constexpr Cmd cmdGetSystemInfoParameters = 0x59; |
| 264 | // 0x5A-0x5F unassigned |
| 265 | constexpr Cmd cmdSetCommandEnables = 0x60; |
| 266 | constexpr Cmd cmdGetCommandEnables = 0x61; |
| 267 | constexpr Cmd cmdSetCommandSubFnEnables = 0x62; |
| 268 | constexpr Cmd cmdGetCommandSubFnEnables = 0x63; |
| 269 | constexpr Cmd cmdGetOemNetFnIanaSupport = 0x64; |
| 270 | // 0x65-0xff unassigned |
| 271 | } // namespace app |
| 272 | |
| 273 | namespace chassis |
| 274 | { |
| 275 | constexpr Cmd cmdGetChassisCapabilities = 0x00; |
| 276 | constexpr Cmd cmdGetChassisStatus = 0x01; |
| 277 | constexpr Cmd cmdChassisControl = 0x02; |
| 278 | constexpr Cmd cmdChassisReset = 0x03; |
| 279 | constexpr Cmd cmdChassisIdentify = 0x04; |
| 280 | constexpr Cmd cmdSetChassisCapabilities = 0x05; |
| 281 | constexpr Cmd cmdSetPowerRestorePolicy = 0x06; |
| 282 | constexpr Cmd cmdGetSystemRestartCause = 0x07; |
| 283 | constexpr Cmd cmdSetSystemBootOptions = 0x08; |
| 284 | constexpr Cmd cmdGetSystemBootOptions = 0x09; |
| 285 | constexpr Cmd cmdSetFrontPanelButtonEnables = 0x0A; |
| 286 | constexpr Cmd cmdSetPowerCycleInterval = 0x0B; |
| 287 | // 0x0C-0x0E unassigned |
| 288 | constexpr Cmd cmdGetPohCounter = 0x0F; |
| 289 | // 0x10-0xFF unassigned |
| 290 | } // namespace chassis |
| 291 | |
| 292 | namespace sensor_event |
| 293 | { |
| 294 | constexpr Cmd cmdSetEventReceiver = 0x00; |
| 295 | constexpr Cmd cmdGetEventReceiver = 0x01; |
| 296 | constexpr Cmd cmdPlatformEvent = 0x02; |
| 297 | // 0x03-0x0F unassigned |
| 298 | constexpr Cmd cmdGetPefCapabilities = 0x10; |
| 299 | constexpr Cmd cmdArmPefPostponeTimer = 0x11; |
| 300 | constexpr Cmd cmdSetPefConfigurationParams = 0x12; |
| 301 | constexpr Cmd cmdGetPefConfigurationParams = 0x13; |
| 302 | constexpr Cmd cmdSetLastProcessedEventId = 0x14; |
| 303 | constexpr Cmd cmdGetLastProcessedEventId = 0x15; |
| 304 | constexpr Cmd cmdAlertImmediate = 0x16; |
| 305 | constexpr Cmd cmdPetAcknowledge = 0x17; |
| 306 | constexpr Cmd cmdGetDeviceSdrInfo = 0x20; |
| 307 | constexpr Cmd cmdGetDeviceSdr = 0x21; |
| 308 | constexpr Cmd cmdReserveDeviceSdrRepository = 0x22; |
| 309 | constexpr Cmd cmdGetSensorReadingFactors = 0x23; |
| 310 | constexpr Cmd cmdSetSensorHysteresis = 0x24; |
| 311 | constexpr Cmd cmdGetSensorHysteresis = 0x25; |
| 312 | constexpr Cmd cmdSetSensorThreshold = 0x26; |
| 313 | constexpr Cmd cmdGetSensorThreshold = 0x27; |
| 314 | constexpr Cmd cmdSetSensorEventEnable = 0x28; |
| 315 | constexpr Cmd cmdGetSensorEventEnable = 0x29; |
| 316 | constexpr Cmd cmdRearmSensorEvents = 0x2A; |
| 317 | constexpr Cmd cmdGetSensorEventStatus = 0x2B; |
| 318 | constexpr Cmd cmdGetSensorReading = 0x2D; |
| 319 | constexpr Cmd cmdSetSensorType = 0x2E; |
| 320 | constexpr Cmd cmdGetSensorType = 0x2F; |
| 321 | constexpr Cmd cmdSetSensorReadingAndEvtSts = 0x30; |
| 322 | // 0x31-0xFF unassigned |
| 323 | } // namespace sensor_event |
| 324 | |
| 325 | namespace storage |
| 326 | { |
| 327 | // 0x00-0x0F unassigned |
| 328 | constexpr Cmd cmdGetFruInventoryAreaInfo = 0x10; |
| 329 | constexpr Cmd cmdReadFruData = 0x11; |
| 330 | constexpr Cmd cmdWriteFruData = 0x12; |
| 331 | // 0x13-0x1F unassigned |
| 332 | constexpr Cmd cmdGetSdrRepositoryInfo = 0x20; |
| 333 | constexpr Cmd cmdGetSdrRepositoryAllocInfo = 0x21; |
| 334 | constexpr Cmd cmdReserveSdrRepository = 0x22; |
| 335 | constexpr Cmd cmdGetSdr = 0x23; |
| 336 | constexpr Cmd cmdAddSdr = 0x24; |
| 337 | constexpr Cmd cmdPartialAddSdr = 0x25; |
| 338 | constexpr Cmd cmdDeleteSdr = 0x26; |
| 339 | constexpr Cmd cmdClearSdrRepository = 0x27; |
| 340 | constexpr Cmd cmdGetSdrRepositoryTime = 0x28; |
| 341 | constexpr Cmd cmdSetSdrRepositoryTime = 0x29; |
| 342 | constexpr Cmd cmdEnterSdrRepoUpdateMode = 0x2A; |
| 343 | constexpr Cmd cmdExitSdrReposUpdateMode = 0x2B; |
| 344 | constexpr Cmd cmdRunInitializationAgent = 0x2C; |
| 345 | // 0x2D-0x3F unassigned |
| 346 | constexpr Cmd cmdGetSelInfo = 0x40; |
| 347 | constexpr Cmd cmdGetSelAllocationInfo = 0x41; |
| 348 | constexpr Cmd cmdReserveSel = 0x42; |
| 349 | constexpr Cmd cmdGetSelEntry = 0x43; |
| 350 | constexpr Cmd cmdAddSelEntry = 0x44; |
| 351 | constexpr Cmd cmdPartialAddSelEntry = 0x45; |
| 352 | constexpr Cmd cmdDeleteSelEntry = 0x46; |
| 353 | constexpr Cmd cmdClearSel = 0x47; |
| 354 | constexpr Cmd cmdGetSelTime = 0x48; |
| 355 | constexpr Cmd cmdSetSelTime = 0x49; |
| 356 | constexpr Cmd cmdGetAuxiliaryLogStatus = 0x5A; |
| 357 | constexpr Cmd cmdSetAuxiliaryLogStatus = 0x5B; |
| 358 | constexpr Cmd cmdGetSelTimeUtcOffset = 0x5C; |
| 359 | constexpr Cmd cmdSetSelTimeUtcOffset = 0x5D; |
| 360 | // 0x5E-0xFF unassigned |
| 361 | } // namespace storage |
| 362 | |
| 363 | namespace transport |
| 364 | { |
| 365 | constexpr Cmd cmdSetLanConfigParameters = 0x01; |
| 366 | constexpr Cmd cmdGetLanConfigParameters = 0x02; |
| 367 | constexpr Cmd cmdSuspendBmcArps = 0x03; |
| 368 | constexpr Cmd cmdGetIpUdpRmcpStatistics = 0x04; |
| 369 | constexpr Cmd cmdSetSerialModemConfig = 0x10; |
| 370 | constexpr Cmd cmdGetSerialModemConfig = 0x11; |
| 371 | constexpr Cmd cmdSetSerialModemMux = 0x12; |
| 372 | constexpr Cmd cmdGetTapResponseCodes = 0x13; |
| 373 | constexpr Cmd cmdSetPppUdpProxyTransmitData = 0x14; |
| 374 | constexpr Cmd cmdGetPppUdpProxyTransmitData = 0x15; |
| 375 | constexpr Cmd cmdSendPppUdpProxyPacket = 0x16; |
| 376 | constexpr Cmd cmdGetPppUdpProxyReceiveData = 0x17; |
| 377 | constexpr Cmd cmdSerialModemConnActive = 0x18; |
| 378 | constexpr Cmd cmdCallback = 0x19; |
| 379 | constexpr Cmd cmdSetUserCallbackOptions = 0x1A; |
| 380 | constexpr Cmd cmdGetUserCallbackOptions = 0x1B; |
| 381 | constexpr Cmd cmdSetSerialRoutingMux = 0x1C; |
| 382 | constexpr Cmd cmdSolActivating = 0x20; |
| 383 | constexpr Cmd cmdSetSolConfigParameters = 0x21; |
| 384 | constexpr Cmd cmdGetSolConfigParameters = 0x22; |
| 385 | constexpr Cmd cmdForwardedCommand = 0x30; |
| 386 | constexpr Cmd cmdSetForwardedCommands = 0x31; |
| 387 | constexpr Cmd cmdGetForwardedCommands = 0x32; |
| 388 | constexpr Cmd cmdEnableForwardedCommands = 0x33; |
| 389 | } // namespace transport |
| 390 | |
| 391 | namespace bridge |
| 392 | { |
| 393 | constexpr Cmd cmdGetBridgeState = 0x00; |
| 394 | constexpr Cmd cmdSetBridgeState = 0x01; |
| 395 | constexpr Cmd cmdGetIcmbAddress = 0x02; |
| 396 | constexpr Cmd cmdSetIcmbAddress = 0x03; |
| 397 | constexpr Cmd cmdSetBridgeProxyAddress = 0x04; |
| 398 | constexpr Cmd cmdGetBridgeStatistics = 0x05; |
| 399 | constexpr Cmd cmdGetIcmbCapabilities = 0x06; |
| 400 | constexpr Cmd cmdClearBridgeStatistics = 0x08; |
| 401 | constexpr Cmd cmdGetBridgeProxyAddress = 0x09; |
| 402 | constexpr Cmd cmdGetIcmbConnectorInfo = 0x0A; |
| 403 | constexpr Cmd cmdGetIcmbConnectionId = 0x0B; |
| 404 | constexpr Cmd cmdSendIcmbConnectionId = 0x0C; |
| 405 | constexpr Cmd cmdPrepareForDiscovery = 0x10; |
| 406 | constexpr Cmd cmdGetAddresses = 0x11; |
| 407 | constexpr Cmd cmdSetDiscovered = 0x12; |
| 408 | constexpr Cmd cmdGetChassisDeviceId = 0x13; |
| 409 | constexpr Cmd cmdSetChassisDeviceId = 0x14; |
| 410 | constexpr Cmd cmdBridgeRequest = 0x20; |
| 411 | constexpr Cmd cmdBridgeMessage = 0x21; |
| 412 | // 0x22-0x2F unassigned |
| 413 | constexpr Cmd cmdGetEventCount = 0x30; |
| 414 | constexpr Cmd cmdSetEventDestination = 0x31; |
| 415 | constexpr Cmd cmdSetEventReceptionState = 0x32; |
| 416 | constexpr Cmd cmdSendIcmbEventMessage = 0x33; |
| 417 | constexpr Cmd cmdGetEventDestination = 0x34; |
| 418 | constexpr Cmd cmdGetEventReceptionState = 0x35; |
| 419 | // 0xC0-0xFE OEM Commands |
| 420 | constexpr Cmd cmdErrorReport = 0xFF; |
| 421 | } // namespace bridge |
| 422 | |
| 423 | namespace dcmi |
| 424 | { |
| 425 | constexpr Cmd cmdGetDcmiCapabilitiesInfo = 0x01; |
| 426 | constexpr Cmd cmdGetPowerReading = 0x02; |
| 427 | constexpr Cmd cmdGetPowerLimit = 0x03; |
| 428 | constexpr Cmd cmdSetPowerLimit = 0x04; |
| 429 | constexpr Cmd cmdActDeactivatePwrLimit = 0x05; |
| 430 | constexpr Cmd cmdGetAssetTag = 0x06; |
| 431 | constexpr Cmd cmdGetDcmiSensorInfo = 0x07; |
| 432 | constexpr Cmd cmdSetAssetTag = 0x08; |
| 433 | constexpr Cmd cmdGetMgmtCntlrIdString = 0x09; |
| 434 | constexpr Cmd cmdSetMgmtCntlrIdString = 0x0A; |
| 435 | constexpr Cmd cmdSetThermalLimit = 0x0B; |
| 436 | constexpr Cmd cmdGetThermalLimit = 0x0C; |
| 437 | constexpr Cmd cmdGetTemperatureReadings = 0x10; |
| 438 | constexpr Cmd cmdSetDcmiConfigParameters = 0x12; |
| 439 | constexpr Cmd cmdGetDcmiConfigParameters = 0x13; |
| 440 | } // namespace dcmi |
| 441 | |
| 442 | } // namespace ipmi |