net-ipmid: sol: Remove set/get sol conf command

Move set/get sol config parameter command from net-ipmid to
host-ipmid, these commands could be set by other interface,
not Lan only.
In ipmi-host, will be achieved in transporthandler.

Notice:
In host-ipmid, will get/set the dbus properties only, need sol
manager register the signal to update sol manager when properties
changed.

Tested: Build OK, for details will describe in ipmi-host commit
message.

Change-Id: Iae79aa02a483e983c212d8cd617685fc33c64c67
Signed-off-by: Jian Zhang <zhangjian.3032@bytedance.com>
diff --git a/command/sol_cmds.cpp b/command/sol_cmds.cpp
index c06e310..8203a6e 100644
--- a/command/sol_cmds.cpp
+++ b/command/sol_cmds.cpp
@@ -68,96 +68,6 @@
     msgHandler.sendUnsolicitedIPMIPayload(netfnTransport, solActivatingCmd,
                                           outPayload);
 }
-
-std::vector<uint8_t> getConfParams(const std::vector<uint8_t>& inPayload,
-                                   std::shared_ptr<message::Handler>& handler)
-{
-    std::vector<uint8_t> outPayload(sizeof(GetConfParamsResponse));
-    auto request =
-        reinterpret_cast<const GetConfParamsRequest*>(inPayload.data());
-    auto response = reinterpret_cast<GetConfParamsResponse*>(outPayload.data());
-    response->completionCode = IPMI_CC_OK;
-    response->paramRev = parameterRevision;
-
-    // Update latest property values from dbus to sol mananger
-    sol::Manager::get().updateSOLParameter(ipmi::convertCurrentChannelNum(
-        ipmi::currentChNum, getInterfaceIndex()));
-    if (request->getParamRev)
-    {
-        return outPayload;
-    }
-
-    switch (static_cast<Parameter>(request->paramSelector))
-    {
-        case Parameter::PROGRESS:
-        {
-            outPayload.push_back(sol::Manager::get().progress);
-            break;
-        }
-        case Parameter::ENABLE:
-        {
-            outPayload.push_back(sol::Manager::get().enable);
-            break;
-        }
-        case Parameter::AUTHENTICATION:
-        {
-            Auth value{0};
-
-            value.encrypt = sol::Manager::get().forceEncrypt;
-            value.auth = sol::Manager::get().forceAuth;
-            value.privilege =
-                static_cast<uint8_t>(sol::Manager::get().solMinPrivilege);
-            auto buffer = reinterpret_cast<const uint8_t*>(&value);
-
-            std::copy_n(buffer, sizeof(value), std::back_inserter(outPayload));
-            break;
-        }
-        case Parameter::ACCUMULATE:
-        {
-            Accumulate value{0};
-
-            value.interval = sol::Manager::get().accumulateInterval.count() /
-                             sol::accIntervalFactor;
-            value.threshold = sol::Manager::get().sendThreshold;
-            auto buffer = reinterpret_cast<const uint8_t*>(&value);
-
-            std::copy_n(buffer, sizeof(value), std::back_inserter(outPayload));
-            break;
-        }
-        case Parameter::RETRY:
-        {
-            Retry value{0};
-
-            value.count = sol::Manager::get().retryCount;
-            value.interval = sol::Manager::get().retryInterval.count() /
-                             sol::retryIntervalFactor;
-            auto buffer = reinterpret_cast<const uint8_t*>(&value);
-
-            std::copy_n(buffer, sizeof(value), std::back_inserter(outPayload));
-            break;
-        }
-        case Parameter::PORT:
-        {
-            auto port = endian::to_ipmi<uint16_t>(IPMI_STD_PORT);
-            auto buffer = reinterpret_cast<const uint8_t*>(&port);
-
-            std::copy_n(buffer, sizeof(port), std::back_inserter(outPayload));
-            break;
-        }
-        case Parameter::CHANNEL:
-        {
-            outPayload.push_back(sol::Manager::get().channel);
-            break;
-        }
-        case Parameter::NVBITRATE:
-        case Parameter::VBITRATE:
-        default:
-            response->completionCode = ipmiCCParamNotSupported;
-    }
-
-    return outPayload;
-}
-
 } // namespace command
 
 } // namespace sol
diff --git a/command/sol_cmds.hpp b/command/sol_cmds.hpp
index 3e05e0f..9aedfdd 100644
--- a/command/sol_cmds.hpp
+++ b/command/sol_cmds.hpp
@@ -62,174 +62,6 @@
  */
 void activating(uint8_t payloadInstance, uint32_t sessionID);
 
-/** @enum Parameter
- *
- *  SOL parameters are volatile, they are initialized by the SOL manager.
- *  They can be read using Get SOL configuration parameters command and updated
- *  using Set SOL configuration parameters command.
- */
-enum class Parameter
-{
-    PROGRESS,       //!< Set In Progress.
-    ENABLE,         //!< SOL Enable.
-    AUTHENTICATION, //!< SOL Authentication.
-    ACCUMULATE,     //!< Character Accumulate Interval & Send Threshold.
-    RETRY,          //!< SOL Retry.
-    NVBITRATE,      //!< SOL non-volatile bit rate.
-    VBITRATE,       //!< SOL volatile bit rate.
-    CHANNEL,        //!< SOL payload channel.
-    PORT,           //!< SOL payload port.
-};
-
-constexpr uint8_t progressMask = 0x03;
-constexpr uint8_t enableMask = 0x01;
-
-/** @struct Auth
- *
- *  SOL authentication parameter.
- */
-struct Auth
-{
-#if BYTE_ORDER == LITTLE_ENDIAN
-    uint8_t privilege : 4; //!< SOL privilege level.
-    uint8_t reserved : 2;  //!< Reserved.
-    uint8_t auth : 1;      //!< Force SOL payload Authentication.
-    uint8_t encrypt : 1;   //!< Force SOL payload encryption.
-#endif
-
-#if BYTE_ORDER == BIG_ENDIAN
-    uint8_t encrypt : 1;   //!< Force SOL payload encryption.
-    uint8_t auth : 1;      //!< Force SOL payload Authentication.
-    uint8_t reserved : 2;  //!< Reserved.
-    uint8_t privilege : 4; //!< SOL privilege level.
-#endif
-} __attribute__((packed));
-
-/** @struct Accumulate
- *
- *  Character accumulate interval & Character send threshold.
- */
-struct Accumulate
-{
-    uint8_t interval;  //!< Character accumulate interval.
-    uint8_t threshold; //!< Character send threshold.
-} __attribute__((packed));
-
-constexpr uint8_t retryCountMask = 0x07;
-
-/** @struct Retry
- *
- *  SOL retry count and interval.
- */
-struct Retry
-{
-#if BYTE_ORDER == LITTLE_ENDIAN
-    uint8_t count : 3;    //!< SOL retry count.
-    uint8_t reserved : 5; //!< Reserved.
-#endif
-
-#if BYTE_ORDER == BIG_ENDIAN
-    uint8_t reserved : 5; //!< Reserved.
-    uint8_t count : 3;    //!< SOL retry count.
-#endif
-
-    uint8_t interval; //!< SOL retry interval.
-} __attribute__((packed));
-
-constexpr uint8_t ipmiCCParamNotSupported = 0x80;
-constexpr uint8_t ipmiCCInvalidSetInProgress = 0x81;
-constexpr uint8_t ipmiCCWriteReadParameter = 0x82;
-constexpr uint8_t ipmiCCReadWriteParameter = 0x83;
-constexpr uint8_t parameterRevision = 0x11;
-
-/** @struct SetConfParamsRequest
- *
- *  IPMI payload for Set SOL configuration parameters command request.
- */
-struct SetConfParamsRequest
-{
-#if BYTE_ORDER == LITTLE_ENDIAN
-    uint8_t channelNumber : 4; //!< Channel number.
-    uint8_t reserved : 4;      //!< Reserved.
-#endif
-
-#if BYTE_ORDER == BIG_ENDIAN
-    uint8_t reserved : 4;      //!< Reserved.
-    uint8_t channelNumber : 4; //!< Channel number.
-#endif
-
-    uint8_t paramSelector; //!< Parameter selector.
-    union
-    {
-        uint8_t value;         //!< Represents one byte SOL parameters.
-        struct Accumulate acc; //!< Character accumulate values.
-        struct Retry retry;    //!< Retry values.
-        struct Auth auth;      //!< Authentication parameters.
-    };
-} __attribute__((packed));
-
-/** @struct SetConfParamsResponse
- *
- *  IPMI payload for Set SOL configuration parameters command response.
- */
-struct SetConfParamsResponse
-{
-    uint8_t completionCode; //!< Completion code.
-} __attribute__((packed));
-
-/** @brief Set SOL configuration parameters command.
- *
- *  @param[in] inPayload - Request data for the command.
- *  @param[in] handler - Reference to the message handler.
- *
- *  @return Response data for the command.
- */
-std::vector<uint8_t> setConfParams(const std::vector<uint8_t>& inPayload,
-                                   std::shared_ptr<message::Handler>& handler);
-
-/** @struct GetConfParamsRequest
- *
- *  IPMI payload for Get SOL configuration parameters command request.
- */
-struct GetConfParamsRequest
-{
-#if BYTE_ORDER == LITTLE_ENDIAN
-    uint8_t channelNum : 4;  //!< Channel number.
-    uint8_t reserved : 3;    //!< Reserved.
-    uint8_t getParamRev : 1; //!< Get parameter or Get parameter revision
-#endif
-
-#if BYTE_ORDER == BIG_ENDIAN
-    uint8_t getParamRev : 1; //!< Get parameter or Get parameter revision
-    uint8_t reserved : 3;    //!< Reserved.
-    uint8_t channelNum : 4;  //!< Channel number.
-#endif
-
-    uint8_t paramSelector; //!< Parameter selector.
-    uint8_t setSelector;   //!< Set selector.
-    uint8_t blockSelector; //!< Block selector.
-} __attribute__((packed));
-
-/** @struct GetConfParamsResponse
- *
- *  IPMI payload for Get SOL configuration parameters command response.
- */
-struct GetConfParamsResponse
-{
-    uint8_t completionCode; //!< Completion code.
-    uint8_t paramRev;       //!< Parameter revision.
-} __attribute__((packed));
-
-/** @brief Get SOL configuration parameters command.
- *
- *  @param[in] inPayload - Request data for the command.
- *  @param[in] handler - Reference to the message handler.
- *
- *  @return Response data for the command.
- */
-std::vector<uint8_t> getConfParams(const std::vector<uint8_t>& inPayload,
-                                   std::shared_ptr<message::Handler>& handler);
-
 } // namespace command
 
 } // namespace sol
diff --git a/sol_module.cpp b/sol_module.cpp
index d9a9a7c..21196d8 100644
--- a/sol_module.cpp
+++ b/sol_module.cpp
@@ -41,12 +41,6 @@
          &getPayloadInfo,
          session::Privilege::USER,
          false},
-        // Get SOL Configuration Parameters
-        {{(static_cast<uint32_t>(message::PayloadType::IPMI) << 16) |
-          static_cast<uint16_t>(::command::NetFns::TRANSPORT) | 0x22},
-         &getConfParams,
-         session::Privilege::USER,
-         false},
     };
 
     for (const auto& iter : commands)