summaryrefslogtreecommitdiffstats
path: root/app/channel.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'app/channel.hpp')
-rw-r--r--app/channel.hpp58
1 files changed, 19 insertions, 39 deletions
diff --git a/app/channel.hpp b/app/channel.hpp
index 7004ddd..8e5accb 100644
--- a/app/channel.hpp
+++ b/app/channel.hpp
@@ -1,6 +1,6 @@
#include "nlohmann/json.hpp"
-#include <ipmid/api.h>
+#include <ipmid/api.hpp>
/** @brief The set channel access IPMI command.
*
@@ -53,31 +53,31 @@ ipmi_ret_t ipmi_app_channel_info(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
ipmi_data_len_t data_len,
ipmi_context_t context);
-/** @brief Implementation of get channel cipher suites command
+/** @brief this command is used to look up what authentication, integrity,
+ * confidentiality algorithms are supported.
*
- * @param[in] netfn - Net Function
- * @param[in] cmd - Command
- * @param[in] request - Request pointer
- * @param[in,out] response - Response pointer
- * @param[in,out] data_len - Data Length
- * @param[in] context - Context
+ * @ param ctx - context pointer
+ * @ param channelNumber - channel number
+ * @ param payloadType - payload type
+ * @ param listIndex - list index
+ * @ param algoSelectBit - list algorithms
*
- * @return IPMI_CC_OK on success, non-zero otherwise.
- */
-ipmi_ret_t getChannelCipherSuites(ipmi_netfn_t netfn, ipmi_cmd_t cmd,
- ipmi_request_t request,
- ipmi_response_t response,
- ipmi_data_len_t data_len,
- ipmi_context_t context);
+ * @returns ipmi completion code plus response data
+ * - rspChannel - channel number for authentication algorithm.
+ * - rspRecords - cipher suite records.
+ **/
+ipmi::RspType<uint8_t, // Channel Number
+ std::vector<uint8_t> // Cipher Records
+ >
+ getChannelCipherSuites(ipmi::Context::ptr ctx, uint4_t channelNumber,
+ uint4_t reserved1, uint8_t payloadType,
+ uint6_t listIndex, uint1_t reserved2,
+ uint1_t algoSelectBit);
namespace cipher
{
-static constexpr auto defaultChannelNumber = 1;
-static constexpr auto listTypeMask = 0x80;
static constexpr auto listCipherSuite = 0x80;
-static constexpr auto listIndexMask = 0x3F;
-static constexpr auto respSize = 16;
using Json = nlohmann::json;
static constexpr auto configFile = "/usr/share/ipmi-providers/cipher_list.json";
@@ -92,23 +92,3 @@ static constexpr auto conf = "confidentiality";
static constexpr auto confTag = 0x80;
} // namespace cipher
-
-/** @struct GetChannelCipherRequest
- *
- * IPMI payload for Get Channel Cipher Suites command request
- */
-struct GetChannelCipherRequest
-{
- uint8_t channelNumber; //!< Channel Number
- uint8_t payloadType; //!< Payload type number
- uint8_t listIndex; //!< List Index
-} __attribute__((packed));
-
-/** @struct GetChannelCipherRespHeader
- *
- * IPMI payload for Get Channel Cipher Suites command response header
- */
-struct GetChannelCipherRespHeader
-{
- uint8_t channelNumber; //!< Channel Number
-} __attribute__((packed));
OpenPOWER on IntegriCloud