Configure DHCP4 and DHCP6 parameters independently

At present, DHCP parameters like DNSEnabled, NTPEnabled etc. are
shared between DHCPv4 and DHCPv6 in the network configuration.

Hence any update on the ipv4 parameters impacts the ipv6 and get
applied to both the interfaces.

This change is to enable the possibility to configure DHCP attributes
independently, by having different dbus objects for dhcp4 and dhcp6
and moving the dhcp configuration from network level to ethernet
interface.

tested by:

Used the busctl command to set and get the parameter values
individually for both DHCPv4 and DHCPv6.
Verified the network configuration file is updated accordingly

Tree Structure:
busctl tree xyz.openbmc_project.Network
`-/xyz
  `-/xyz/openbmc_project
    `-/xyz/openbmc_project/network
      |-/xyz/openbmc_project/network/config
      |-/xyz/openbmc_project/network/eth0
      | |-/xyz/openbmc_project/network/eth0/dhcp4
      | `-/xyz/openbmc_project/network/eth0/dhcp6
      `-/xyz/openbmc_project/network/eth1
        |-/xyz/openbmc_project/network/eth1/dhcp4
        `-/xyz/openbmc_project/network/eth1/dhcp6

Change-Id: If7dbbf596bdaf866ea459d631e716153f54302ec
Signed-off-by: Jishnu CM <jishnunambiarcm@duck.com>
diff --git a/src/dhcp_configuration.hpp b/src/dhcp_configuration.hpp
index 964b7d5..95aa203 100644
--- a/src/dhcp_configuration.hpp
+++ b/src/dhcp_configuration.hpp
@@ -1,4 +1,6 @@
 #pragma once
+#include "util.hpp"
+
 #include <sdbusplus/bus.hpp>
 #include <sdbusplus/server/object.hpp>
 #include <stdplus/pinned.hpp>
@@ -10,7 +12,7 @@
 namespace network
 {
 
-class Manager; // forward declaration of network manager.
+class EthernetInterface;
 
 namespace dhcp
 {
@@ -32,9 +34,10 @@
      *  @param[in] bus - Bus to attach to.
      *  @param[in] objPath - Path to attach at.
      *  @param[in] parent - Parent object.
+     *  @param[in] type - Network type.
      */
     Configuration(sdbusplus::bus_t& bus, stdplus::const_zstring objPath,
-                  stdplus::PinnedRef<Manager> parent);
+                  stdplus::PinnedRef<EthernetInterface> parent, DHCPType type);
 
     /** @brief If true then DNS servers received from the DHCP server
      *         will be used and take precedence over any statically
@@ -66,7 +69,7 @@
      */
     bool sendHostNameEnabled(bool value) override;
 
-    /* @brief Network Manager needed the below function to know the
+    /* @brief Ethernet Interface needed the below function to know the
      *        value of the properties (ntpEnabled,dnsEnabled,hostnameEnabled
               sendHostNameEnabled).
      *
@@ -77,8 +80,9 @@
     using ConfigIntf::sendHostNameEnabled;
 
   private:
-    /** @brief Network Manager object. */
-    stdplus::PinnedRef<Manager> manager;
+    /** @brief Ethernet Interface object. */
+    stdplus::PinnedRef<EthernetInterface> parent;
+    DHCPType type;
 };
 
 } // namespace dhcp