xref: /openbmc/phosphor-host-ipmid/include/ipmid/api-types.hpp (revision 0a3f40b92c44bb196e355f845c6aafd1d2dce5fe)
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  */
17 #pragma once
18 #include <ipmid/iana.hpp>
19 
20 #include <cstdint>
21 #include <optional>
22 #include <tuple>
23 
24 namespace ipmi
25 {
26 
27 using Iana = oem::Number;
28 
29 using Group = uint8_t;
30 constexpr Group groupPICMG = 0x00;
31 constexpr Group groupDMTG = 0x01;
32 constexpr Group groupSSI = 0x02;
33 constexpr Group groupVSO = 0x03;
34 #ifdef ARM_SBMR_SUPPORT
35 constexpr Group groupSBMR = 0xAE;
36 #endif
37 constexpr Group groupDCMI = 0xDC;
38 
39 /*
40  * Set the priority as the lowest number that is necessary so
41  * it is possible that others can override it if desired.
42  * This may be linked to what level of integration the handler
43  * is being created at.
44  */
45 constexpr int prioOpenBmcBase = 10;
46 constexpr int prioOemBase = 20;
47 constexpr int prioOdmBase = 30;
48 constexpr int prioCustomBase = 40;
49 constexpr int prioMax = 50;
50 
51 /*
52  * Channel IDs pulled from the IPMI 2.0 specification
53  */
54 constexpr int channelPrimaryIpmb = 0x00;
55 // 0x01-0x0B Implementation specific
56 // Implementation specific channel numbers are specified
57 // by a configuration file external to ipmid
58 // 0x0C-0x0D reserved
59 constexpr int channelCurrentIface = 0x0E; // 'Present I/F'
60 constexpr int channelSystemIface = 0x0F;
61 
62 /*
63  * Specifies the minimum privilege level required to execute the command
64  * This means the command can be executed at a given privilege level or higher
65  * privilege level. Those commands which can be executed via system interface
66  * only should use SYSTEM_INTERFACE
67  */
68 enum class Privilege : uint8_t
69 {
70     None = 0x00,
71     Callback,
72     User,
73     Operator,
74     Admin,
75     Oem,
76 };
77 
78 // IPMI Net Function number as specified by IPMI V2.0 spec.
79 using NetFn = uint8_t;
80 
81 // IPMI Command for a Net Function number as specified by IPMI V2.0 spec.
82 using Cmd = uint8_t;
83 
84 // ipmi function return the status code
85 using Cc = uint8_t;
86 
87 // IPMI 2.0 and DCMI 1.5 standard commands, namespaced by NetFn
88 // OEM and non-standard commands should be defined where they are used
89 namespace app
90 {
91 // 0x00 reserved
92 constexpr Cmd cmdGetDeviceId = 0x01;
93 constexpr Cmd cmdColdReset = 0x02;
94 constexpr Cmd cmdWarmReset = 0x03;
95 constexpr Cmd cmdGetSelfTestResults = 0x04;
96 constexpr Cmd cmdManufacturingTestOn = 0x05;
97 constexpr Cmd cmdSetAcpiPowerState = 0x06;
98 constexpr Cmd cmdGetAcpiPowerState = 0x07;
99 constexpr Cmd cmdGetDeviceGuid = 0x08;
100 constexpr Cmd cmdGetNetFnSupport = 0x09;
101 constexpr Cmd cmdGetCmdSupport = 0x0A;
102 constexpr Cmd cmdGetCmdSubFnSupport = 0x0B;
103 constexpr Cmd cmdGetConfigurableCmds = 0x0C;
104 constexpr Cmd cmdGetConfigurableCmdSubFns = 0x0D;
105 // 0x0E-0x21 unassigned
106 constexpr Cmd cmdResetWatchdogTimer = 0x22;
107 // 0x23 unassigned
108 constexpr Cmd cmdSetWatchdogTimer = 0x24;
109 constexpr Cmd cmdGetWatchdogTimer = 0x25;
110 // 0x26-0x2D unassigned
111 constexpr Cmd cmdSetBmcGlobalEnables = 0x2E;
112 constexpr Cmd cmdGetBmcGlobalEnables = 0x2F;
113 constexpr Cmd cmdClearMessageFlags = 0x30;
114 constexpr Cmd cmdGetMessageFlags = 0x31;
115 constexpr Cmd cmdEnableMessageChannelRcv = 0x32;
116 constexpr Cmd cmdGetMessage = 0x33;
117 constexpr Cmd cmdSendMessage = 0x34;
118 constexpr Cmd cmdReadEventMessageBuffer = 0x35;
119 constexpr Cmd cmdGetBtIfaceCapabilities = 0x36;
120 constexpr Cmd cmdGetSystemGuid = 0x37;
121 constexpr Cmd cmdGetChannelAuthCapabilities = 0x38;
122 constexpr Cmd cmdGetSessionChallenge = 0x39;
123 constexpr Cmd cmdActivateSession = 0x3A;
124 constexpr Cmd cmdSetSessionPrivilegeLevel = 0x3B;
125 constexpr Cmd cmdCloseSession = 0x3C;
126 constexpr Cmd cmdGetSessionInfo = 0x3D;
127 // 0x3E unassigned
128 constexpr Cmd cmdGetAuthCode = 0x3F;
129 constexpr Cmd cmdSetChannelAccess = 0x40;
130 constexpr Cmd cmdGetChannelAccess = 0x41;
131 constexpr Cmd cmdGetChannelInfoCommand = 0x42;
132 constexpr Cmd cmdSetUserAccessCommand = 0x43;
133 constexpr Cmd cmdGetUserAccessCommand = 0x44;
134 constexpr Cmd cmdSetUserName = 0x45;
135 constexpr Cmd cmdGetUserNameCommand = 0x46;
136 constexpr Cmd cmdSetUserPasswordCommand = 0x47;
137 constexpr Cmd cmdActivatePayload = 0x48;
138 constexpr Cmd cmdDeactivatePayload = 0x49;
139 constexpr Cmd cmdGetPayloadActivationStatus = 0x4A;
140 constexpr Cmd cmdGetPayloadInstanceInfo = 0x4B;
141 constexpr Cmd cmdSetUserPayloadAccess = 0x4C;
142 constexpr Cmd cmdGetUserPayloadAccess = 0x4D;
143 constexpr Cmd cmdGetChannelPayloadSupport = 0x4E;
144 constexpr Cmd cmdGetChannelPayloadVersion = 0x4F;
145 constexpr Cmd cmdGetChannelOemPayloadInfo = 0x50;
146 // 0x51 unassigned
147 constexpr Cmd cmdMasterWriteRead = 0x52;
148 // 0x53 unassigned
149 constexpr Cmd cmdGetChannelCipherSuites = 0x54;
150 constexpr Cmd cmdSuspendResumePayloadEnc = 0x55;
151 constexpr Cmd cmdSetChannelSecurityKeys = 0x56;
152 constexpr Cmd cmdGetSystemIfCapabilities = 0x57;
153 constexpr Cmd cmdSetSystemInfoParameters = 0x58;
154 constexpr Cmd cmdGetSystemInfoParameters = 0x59;
155 // 0x5A-0x5F unassigned
156 constexpr Cmd cmdSetCommandEnables = 0x60;
157 constexpr Cmd cmdGetCommandEnables = 0x61;
158 constexpr Cmd cmdSetCommandSubFnEnables = 0x62;
159 constexpr Cmd cmdGetCommandSubFnEnables = 0x63;
160 constexpr Cmd cmdGetOemNetFnIanaSupport = 0x64;
161 // 0x65-0xff unassigned
162 } // namespace app
163 
164 namespace chassis
165 {
166 constexpr Cmd cmdGetChassisCapabilities = 0x00;
167 constexpr Cmd cmdGetChassisStatus = 0x01;
168 constexpr Cmd cmdChassisControl = 0x02;
169 constexpr Cmd cmdChassisReset = 0x03;
170 constexpr Cmd cmdChassisIdentify = 0x04;
171 constexpr Cmd cmdSetChassisCapabilities = 0x05;
172 constexpr Cmd cmdSetPowerRestorePolicy = 0x06;
173 constexpr Cmd cmdGetSystemRestartCause = 0x07;
174 constexpr Cmd cmdSetSystemBootOptions = 0x08;
175 constexpr Cmd cmdGetSystemBootOptions = 0x09;
176 constexpr Cmd cmdSetFrontPanelButtonEnables = 0x0A;
177 constexpr Cmd cmdSetPowerCycleInterval = 0x0B;
178 // 0x0C-0x0E unassigned
179 constexpr Cmd cmdGetPohCounter = 0x0F;
180 // 0x10-0xFF unassigned
181 } // namespace chassis
182 
183 namespace sensor_event
184 {
185 constexpr Cmd cmdSetEventReceiver = 0x00;
186 constexpr Cmd cmdGetEventReceiver = 0x01;
187 constexpr Cmd cmdPlatformEvent = 0x02;
188 // 0x03-0x0F unassigned
189 constexpr Cmd cmdGetPefCapabilities = 0x10;
190 constexpr Cmd cmdArmPefPostponeTimer = 0x11;
191 constexpr Cmd cmdSetPefConfigurationParams = 0x12;
192 constexpr Cmd cmdGetPefConfigurationParams = 0x13;
193 constexpr Cmd cmdSetLastProcessedEventId = 0x14;
194 constexpr Cmd cmdGetLastProcessedEventId = 0x15;
195 constexpr Cmd cmdAlertImmediate = 0x16;
196 constexpr Cmd cmdPetAcknowledge = 0x17;
197 constexpr Cmd cmdGetDeviceSdrInfo = 0x20;
198 constexpr Cmd cmdGetDeviceSdr = 0x21;
199 constexpr Cmd cmdReserveDeviceSdrRepository = 0x22;
200 constexpr Cmd cmdGetSensorReadingFactors = 0x23;
201 constexpr Cmd cmdSetSensorHysteresis = 0x24;
202 constexpr Cmd cmdGetSensorHysteresis = 0x25;
203 constexpr Cmd cmdSetSensorThreshold = 0x26;
204 constexpr Cmd cmdGetSensorThreshold = 0x27;
205 constexpr Cmd cmdSetSensorEventEnable = 0x28;
206 constexpr Cmd cmdGetSensorEventEnable = 0x29;
207 constexpr Cmd cmdRearmSensorEvents = 0x2A;
208 constexpr Cmd cmdGetSensorEventStatus = 0x2B;
209 constexpr Cmd cmdGetSensorReading = 0x2D;
210 constexpr Cmd cmdSetSensorType = 0x2E;
211 constexpr Cmd cmdGetSensorType = 0x2F;
212 constexpr Cmd cmdSetSensorReadingAndEvtSts = 0x30;
213 // 0x31-0xFF unassigned
214 } // namespace sensor_event
215 
216 namespace storage
217 {
218 // 0x00-0x0F unassigned
219 constexpr Cmd cmdGetFruInventoryAreaInfo = 0x10;
220 constexpr Cmd cmdReadFruData = 0x11;
221 constexpr Cmd cmdWriteFruData = 0x12;
222 // 0x13-0x1F unassigned
223 constexpr Cmd cmdGetSdrRepositoryInfo = 0x20;
224 constexpr Cmd cmdGetSdrRepositoryAllocInfo = 0x21;
225 constexpr Cmd cmdReserveSdrRepository = 0x22;
226 constexpr Cmd cmdGetSdr = 0x23;
227 constexpr Cmd cmdAddSdr = 0x24;
228 constexpr Cmd cmdPartialAddSdr = 0x25;
229 constexpr Cmd cmdDeleteSdr = 0x26;
230 constexpr Cmd cmdClearSdrRepository = 0x27;
231 constexpr Cmd cmdGetSdrRepositoryTime = 0x28;
232 constexpr Cmd cmdSetSdrRepositoryTime = 0x29;
233 constexpr Cmd cmdEnterSdrRepoUpdateMode = 0x2A;
234 constexpr Cmd cmdExitSdrReposUpdateMode = 0x2B;
235 constexpr Cmd cmdRunInitializationAgent = 0x2C;
236 // 0x2D-0x3F unassigned
237 constexpr Cmd cmdGetSelInfo = 0x40;
238 constexpr Cmd cmdGetSelAllocationInfo = 0x41;
239 constexpr Cmd cmdReserveSel = 0x42;
240 constexpr Cmd cmdGetSelEntry = 0x43;
241 constexpr Cmd cmdAddSelEntry = 0x44;
242 constexpr Cmd cmdPartialAddSelEntry = 0x45;
243 constexpr Cmd cmdDeleteSelEntry = 0x46;
244 constexpr Cmd cmdClearSel = 0x47;
245 constexpr Cmd cmdGetSelTime = 0x48;
246 constexpr Cmd cmdSetSelTime = 0x49;
247 constexpr Cmd cmdGetAuxiliaryLogStatus = 0x5A;
248 constexpr Cmd cmdSetAuxiliaryLogStatus = 0x5B;
249 constexpr Cmd cmdGetSelTimeUtcOffset = 0x5C;
250 constexpr Cmd cmdSetSelTimeUtcOffset = 0x5D;
251 // 0x5E-0xFF unassigned
252 } // namespace storage
253 
254 namespace transport
255 {
256 constexpr Cmd cmdSetLanConfigParameters = 0x01;
257 constexpr Cmd cmdGetLanConfigParameters = 0x02;
258 constexpr Cmd cmdSuspendBmcArps = 0x03;
259 constexpr Cmd cmdGetIpUdpRmcpStatistics = 0x04;
260 constexpr Cmd cmdSetSerialModemConfig = 0x10;
261 constexpr Cmd cmdGetSerialModemConfig = 0x11;
262 constexpr Cmd cmdSetSerialModemMux = 0x12;
263 constexpr Cmd cmdGetTapResponseCodes = 0x13;
264 constexpr Cmd cmdSetPppUdpProxyTransmitData = 0x14;
265 constexpr Cmd cmdGetPppUdpProxyTransmitData = 0x15;
266 constexpr Cmd cmdSendPppUdpProxyPacket = 0x16;
267 constexpr Cmd cmdGetPppUdpProxyReceiveData = 0x17;
268 constexpr Cmd cmdSerialModemConnActive = 0x18;
269 constexpr Cmd cmdCallback = 0x19;
270 constexpr Cmd cmdSetUserCallbackOptions = 0x1A;
271 constexpr Cmd cmdGetUserCallbackOptions = 0x1B;
272 constexpr Cmd cmdSetSerialRoutingMux = 0x1C;
273 constexpr Cmd cmdSolActivating = 0x20;
274 constexpr Cmd cmdSetSolConfigParameters = 0x21;
275 constexpr Cmd cmdGetSolConfigParameters = 0x22;
276 constexpr Cmd cmdForwardedCommand = 0x30;
277 constexpr Cmd cmdSetForwardedCommands = 0x31;
278 constexpr Cmd cmdGetForwardedCommands = 0x32;
279 constexpr Cmd cmdEnableForwardedCommands = 0x33;
280 } // namespace transport
281 
282 namespace bridge
283 {
284 constexpr Cmd cmdGetBridgeState = 0x00;
285 constexpr Cmd cmdSetBridgeState = 0x01;
286 constexpr Cmd cmdGetIcmbAddress = 0x02;
287 constexpr Cmd cmdSetIcmbAddress = 0x03;
288 constexpr Cmd cmdSetBridgeProxyAddress = 0x04;
289 constexpr Cmd cmdGetBridgeStatistics = 0x05;
290 constexpr Cmd cmdGetIcmbCapabilities = 0x06;
291 constexpr Cmd cmdClearBridgeStatistics = 0x08;
292 constexpr Cmd cmdGetBridgeProxyAddress = 0x09;
293 constexpr Cmd cmdGetIcmbConnectorInfo = 0x0A;
294 constexpr Cmd cmdGetIcmbConnectionId = 0x0B;
295 constexpr Cmd cmdSendIcmbConnectionId = 0x0C;
296 constexpr Cmd cmdPrepareForDiscovery = 0x10;
297 constexpr Cmd cmdGetAddresses = 0x11;
298 constexpr Cmd cmdSetDiscovered = 0x12;
299 constexpr Cmd cmdGetChassisDeviceId = 0x13;
300 constexpr Cmd cmdSetChassisDeviceId = 0x14;
301 constexpr Cmd cmdBridgeRequest = 0x20;
302 constexpr Cmd cmdBridgeMessage = 0x21;
303 // 0x22-0x2F unassigned
304 constexpr Cmd cmdGetEventCount = 0x30;
305 constexpr Cmd cmdSetEventDestination = 0x31;
306 constexpr Cmd cmdSetEventReceptionState = 0x32;
307 constexpr Cmd cmdSendIcmbEventMessage = 0x33;
308 constexpr Cmd cmdGetEventDestination = 0x34;
309 constexpr Cmd cmdGetEventReceptionState = 0x35;
310 // 0xC0-0xFE OEM Commands
311 constexpr Cmd cmdErrorReport = 0xFF;
312 } // namespace bridge
313 
314 namespace dcmi
315 {
316 constexpr Cmd cmdGetDcmiCapabilitiesInfo = 0x01;
317 constexpr Cmd cmdGetPowerReading = 0x02;
318 constexpr Cmd cmdGetPowerLimit = 0x03;
319 constexpr Cmd cmdSetPowerLimit = 0x04;
320 constexpr Cmd cmdActDeactivatePwrLimit = 0x05;
321 constexpr Cmd cmdGetAssetTag = 0x06;
322 constexpr Cmd cmdGetDcmiSensorInfo = 0x07;
323 constexpr Cmd cmdSetAssetTag = 0x08;
324 constexpr Cmd cmdGetMgmtCntlrIdString = 0x09;
325 constexpr Cmd cmdSetMgmtCntlrIdString = 0x0A;
326 constexpr Cmd cmdSetThermalLimit = 0x0B;
327 constexpr Cmd cmdGetThermalLimit = 0x0C;
328 constexpr Cmd cmdGetTemperatureReadings = 0x10;
329 constexpr Cmd cmdSetDcmiConfigParameters = 0x12;
330 constexpr Cmd cmdGetDcmiConfigParameters = 0x13;
331 } // namespace dcmi
332 
333 #ifdef ARM_SBMR_SUPPORT
334 namespace sbmr
335 {
336 constexpr Cmd cmdSendBootProgressCode = 0x02;
337 constexpr Cmd cmdGetBootProgressCode = 0x03;
338 } // namespace sbmr
339 #endif
340 
341 // These are the command network functions, the response
342 // network functions are the function + 1. So to determine
343 // the proper network function which issued the command
344 // associated with a response, subtract 1.
345 // Note: these will be left shifted when combined with the LUN
346 constexpr NetFn netFnChassis = 0x00;
347 constexpr NetFn netFnBridge = 0x02;
348 constexpr NetFn netFnSensor = 0x04;
349 constexpr NetFn netFnApp = 0x06;
350 constexpr NetFn netFnFirmware = 0x08;
351 constexpr NetFn netFnStorage = 0x0A;
352 constexpr NetFn netFnTransport = 0x0C;
353 // reserved 0Eh..28h
354 constexpr NetFn netFnGroup = 0x2C;
355 constexpr NetFn netFnOem = 0x2E;
356 constexpr NetFn netFnOemOne = 0x30;
357 constexpr NetFn netFnOemTwo = 0x32;
358 constexpr NetFn netFnOemThree = 0x34;
359 constexpr NetFn netFnOemFour = 0x36;
360 constexpr NetFn netFnOemFive = 0x38;
361 constexpr NetFn netFnOemSix = 0x3A;
362 constexpr NetFn netFnOemSeven = 0x3C;
363 constexpr NetFn netFnOemEight = 0x3E;
364 
365 // IPMI commands for net functions. Callbacks using this should be careful to
366 // parse arguments to the sub-functions and can take advantage of the built-in
367 // message handling mechanism to create custom routing
368 constexpr Cmd cmdWildcard = 0xFF;
369 
370 // IPMI standard completion codes specified by the IPMI V2.0 spec.
371 //
372 // This might have been an enum class, but that would make it hard for
373 // OEM- and command-specific completion codes to be added elsewhere.
374 //
375 // Custom completion codes can be defined in individual modules for
376 // command specific errors in the 0x80-0xBE range
377 //
378 // Alternately, OEM completion codes are in the 0x01-0x7E range
379 constexpr Cc ccSuccess = 0x00;
380 constexpr Cc ccBusy = 0xC0;
381 constexpr Cc ccInvalidCommand = 0xC1;
382 constexpr Cc ccInvalidCommandOnLun = 0xC2;
383 constexpr Cc ccTimeout = 0xC3;
384 constexpr Cc ccOutOfSpace = 0xC4;
385 constexpr Cc ccInvalidReservationId = 0xC5;
386 constexpr Cc ccReqDataTruncated = 0xC6;
387 constexpr Cc ccReqDataLenInvalid = 0xC7;
388 constexpr Cc ccReqDataLenExceeded = 0xC8;
389 constexpr Cc ccParmOutOfRange = 0xC9;
390 constexpr Cc ccRetBytesUnavailable = 0xCA;
391 constexpr Cc ccSensorInvalid = 0xCB;
392 constexpr Cc ccInvalidFieldRequest = 0xCC;
393 constexpr Cc ccIllegalCommand = 0xCD;
394 constexpr Cc ccResponseError = 0xCE;
395 constexpr Cc ccDuplicateRequest = 0xCF;
396 constexpr Cc ccCmdFailSdrMode = 0xD0;
397 constexpr Cc ccCmdFailFwUpdMode = 0xD1;
398 constexpr Cc ccCmdFailInitAgent = 0xD2;
399 constexpr Cc ccDestinationUnavailable = 0xD3;
400 constexpr Cc ccInsufficientPrivilege = 0xD4;
401 constexpr Cc ccCommandNotAvailable = 0xD5;
402 constexpr Cc ccCommandDisabled = 0xD6;
403 constexpr Cc ccUnspecifiedError = 0xFF;
404 
405 /* ipmi often has two return types:
406  * 1. Failure: CC is non-zero; no trailing data
407  * 2. Success: CC is zero; trailing data (usually a fixed type)
408  *
409  * using ipmi::response(cc, ...), it will automatically always pack
410  * the correct type for the response without having to explicitly type out all
411  * the parameters that the function would return.
412  *
413  * To enable this feature, you just define the ipmi function as returning an
414  * ipmi::RspType which has the optional trailing data built in, with your types
415  * defined as parameters.
416  */
417 
418 template <typename... RetTypes>
419 using RspType = std::tuple<ipmi::Cc, std::optional<std::tuple<RetTypes...>>>;
420 
421 /**
422  * @brief helper function to create an IPMI response tuple
423  *
424  * IPMI handlers all return a tuple with two parts: a completion code and an
425  * optional tuple containing the rest of the data to return. This helper
426  * function makes it easier by constructing that out of an arbitrary number of
427  * arguments.
428  *
429  * @param cc - the completion code for the response
430  * @param args... - the optional list of values to return
431  *
432  * @return a standard IPMI return type (as described above)
433  */
434 template <typename... Args>
response(ipmi::Cc cc,Args &&...args)435 static inline auto response(ipmi::Cc cc, Args&&... args)
436 {
437     return std::make_tuple(cc, std::make_optional(std::make_tuple(args...)));
438 }
response(ipmi::Cc cc)439 static inline auto response(ipmi::Cc cc)
440 {
441     return std::make_tuple(cc, std::nullopt);
442 }
443 
444 /**
445  * @brief helper function to create an IPMI success response tuple
446  *
447  * IPMI handlers all return a tuple with two parts: a completion code and an
448  * optional tuple containing the rest of the data to return. This helper
449  * function makes it easier by constructing that out of an arbitrary number of
450  * arguments. Because it is a success response, this automatically packs
451  * the completion code, without needing to explicitly pass it in.
452  *
453  * @param args... - the optional list of values to return
454  *
455  * @return a standard IPMI return type (as described above)
456  */
457 template <typename... Args>
responseSuccess(Args &&...args)458 static inline auto responseSuccess(Args&&... args)
459 {
460     return response(ipmi::ccSuccess, args...);
461 }
responseSuccess()462 static inline auto responseSuccess()
463 {
464     return response(ipmi::ccSuccess);
465 }
466 
467 /* helper functions for the various standard error response types */
responseBusy()468 static inline auto responseBusy()
469 {
470     return response(ccBusy);
471 }
responseInvalidCommand()472 static inline auto responseInvalidCommand()
473 {
474     return response(ccInvalidCommand);
475 }
responseInvalidCommandOnLun()476 static inline auto responseInvalidCommandOnLun()
477 {
478     return response(ccInvalidCommandOnLun);
479 }
responseTimeout()480 static inline auto responseTimeout()
481 {
482     return response(ccTimeout);
483 }
responseOutOfSpace()484 static inline auto responseOutOfSpace()
485 {
486     return response(ccOutOfSpace);
487 }
responseInvalidReservationId()488 static inline auto responseInvalidReservationId()
489 {
490     return response(ccInvalidReservationId);
491 }
responseReqDataTruncated()492 static inline auto responseReqDataTruncated()
493 {
494     return response(ccReqDataTruncated);
495 }
responseReqDataLenInvalid()496 static inline auto responseReqDataLenInvalid()
497 {
498     return response(ccReqDataLenInvalid);
499 }
responseReqDataLenExceeded()500 static inline auto responseReqDataLenExceeded()
501 {
502     return response(ccReqDataLenExceeded);
503 }
responseParmOutOfRange()504 static inline auto responseParmOutOfRange()
505 {
506     return response(ccParmOutOfRange);
507 }
responseRetBytesUnavailable()508 static inline auto responseRetBytesUnavailable()
509 {
510     return response(ccRetBytesUnavailable);
511 }
responseSensorInvalid()512 static inline auto responseSensorInvalid()
513 {
514     return response(ccSensorInvalid);
515 }
responseInvalidFieldRequest()516 static inline auto responseInvalidFieldRequest()
517 {
518     return response(ccInvalidFieldRequest);
519 }
responseIllegalCommand()520 static inline auto responseIllegalCommand()
521 {
522     return response(ccIllegalCommand);
523 }
responseResponseError()524 static inline auto responseResponseError()
525 {
526     return response(ccResponseError);
527 }
responseDuplicateRequest()528 static inline auto responseDuplicateRequest()
529 {
530     return response(ccDuplicateRequest);
531 }
responseCmdFailSdrMode()532 static inline auto responseCmdFailSdrMode()
533 {
534     return response(ccCmdFailSdrMode);
535 }
responseCmdFailFwUpdMode()536 static inline auto responseCmdFailFwUpdMode()
537 {
538     return response(ccCmdFailFwUpdMode);
539 }
responseCmdFailInitAgent()540 static inline auto responseCmdFailInitAgent()
541 {
542     return response(ccCmdFailInitAgent);
543 }
responseDestinationUnavailable()544 static inline auto responseDestinationUnavailable()
545 {
546     return response(ccDestinationUnavailable);
547 }
responseInsufficientPrivilege()548 static inline auto responseInsufficientPrivilege()
549 {
550     return response(ccInsufficientPrivilege);
551 }
responseCommandNotAvailable()552 static inline auto responseCommandNotAvailable()
553 {
554     return response(ccCommandNotAvailable);
555 }
responseCommandDisabled()556 static inline auto responseCommandDisabled()
557 {
558     return response(ccCommandDisabled);
559 }
responseUnspecifiedError()560 static inline auto responseUnspecifiedError()
561 {
562     return response(ccUnspecifiedError);
563 }
564 
565 } // namespace ipmi
566