IPMI channel to NIC device mapping modified within JSON config file

The IPMI to NIC channel mapping was done using a hard coded scheme.
The scheme used generic channel names which were then mapped to
specific device names.  The hard coded generic to specific naming
convention is removed, and the JSON file contains the device name
directly.

Change-Id: Ibc6821cae5a26f2666467aba5346d364053f2582
Signed-off-by: Johnathan Mantey <johnathanx.mantey@intel.com>
diff --git a/user_channel/channel_mgmt.hpp b/user_channel/channel_mgmt.hpp
index 89e069e..cb0ea33 100644
--- a/user_channel/channel_mgmt.hpp
+++ b/user_channel/channel_mgmt.hpp
@@ -232,6 +232,14 @@
      */
     int writeChannelVolatileData();
 
+    /** @brief function to get channel name from channel number
+     *
+     *  @param[in] chNum - channel number index
+     *
+     *  @return network channel interface name
+     */
+    std::string getChannelName(const int chNum);
+
   private:
     uint32_t signalFlag = 0;
     std::unique_ptr<boost::interprocess::named_recursive_mutex> channelMutex{
@@ -390,13 +398,14 @@
      */
     EChannelProtocolType convertToProtocolTypeIndex(const std::string& value);
 
-    /** @brief function to convert channel name to network interface name
+    /** @brief function to convert channel name to the IPMI channel number.
      *
-     *  @param[in] value - channel interface name - ipmi centric
+     *  @param[in] chName - the channel name defined in the JSON input file
+     *  (i.e. LAN1)
      *
-     *  @return network channel interface name
+     *  @return IPMI channel number
      */
-    std::string convertToNetInterface(const std::string& value);
+    int convertToChannelNumberFromChannelName(const std::string& chName);
 
     /** @brief function to handle Channel access property update through the
      * D-Bus handler.
@@ -415,6 +424,14 @@
      *  @return time the file was last modified
      */
     std::time_t getUpdatedFileTime(const std::string& fileName);
+
+    /** @brief function to convert the DBus path to a network channel name
+     *
+     *  @param[in] path - The DBus path to the device
+     *
+     *  @return network channel name (i.e. eth0)
+     */
+    std::string getChannelNameFromPath(const std::string& path);
 };
 
 } // namespace ipmi