summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRatan Gupta <ratagupt@in.ibm.com>2017-07-11 17:47:57 +0530
committerRatan Gupta <ratagupt@in.ibm.com>2017-07-25 19:45:28 +0530
commitd16f88c94426cd497b5423c1bfcecac5649cc814 (patch)
treeeccf2aa5db9647a1ceec391ebeb4051b55736d3f
parent935bc33584dddfc093f3183b57034a7f94e75fb1 (diff)
downloadphosphor-networkd-d16f88c94426cd497b5423c1bfcecac5649cc814.tar.gz
phosphor-networkd-d16f88c94426cd497b5423c1bfcecac5649cc814.zip
Create DHCP configuration DBUS object
Network Manager creates the DHCP configuration object. Change-Id: I0119aa4a4b688adec7f7160ff1706aa87cc2bd1f Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
-rw-r--r--network_manager.cpp4
-rw-r--r--network_manager.hpp7
2 files changed, 9 insertions, 2 deletions
diff --git a/network_manager.cpp b/network_manager.cpp
index 1612f6d..011e978 100644
--- a/network_manager.cpp
+++ b/network_manager.cpp
@@ -76,6 +76,10 @@ void Manager::createChildObjects()
objPath /= "config";
systemConf = std::make_unique<phosphor::network::SystemConfiguration>(
bus, objPath.string(), *this);
+ // create the dhcp conf object.
+ objPath /= "dhcp";
+ dhcpConf = std::make_unique<phosphor::network::dhcp::Configuration>(
+ bus, objPath.string(), *this);
}
diff --git a/network_manager.hpp b/network_manager.hpp
index 1854364..762b3e1 100644
--- a/network_manager.hpp
+++ b/network_manager.hpp
@@ -2,9 +2,9 @@
#include "ethernet_interface.hpp"
#include "system_configuration.hpp"
-#include "xyz/openbmc_project/Network/VLAN/Create/server.hpp"
+#include "dhcp_configuration.hpp"
+#include <xyz/openbmc_project/Network/VLAN/Create/server.hpp>
#include <xyz/openbmc_project/Common/FactoryReset/server.hpp>
-
#include <sdbusplus/bus.hpp>
#include <list>
@@ -95,6 +95,9 @@ class Manager : public details::VLANCreateIface
/** @brief pointer to system conf object. */
std::unique_ptr<SystemConfiguration> systemConf = nullptr;
+ /** @brief pointer to dhcp conf object. */
+ std::unique_ptr<dhcp::Configuration> dhcpConf = nullptr;
+
/** @brief Network Configuration directory. */
fs::path confDir;
OpenPOWER on IntegriCloud