diff options
author | Ratan Gupta <ratagupt@in.ibm.com> | 2017-06-15 09:27:27 +0530 |
---|---|---|
committer | Ratan Gupta <ratagupt@in.ibm.com> | 2017-06-29 22:48:09 +0530 |
commit | 87c139834ecebf78b403c0db20b36598c2c1db64 (patch) | |
tree | dc783776b1cde406c9affa806f7c0d6bc601122d /ethernet_interface.hpp | |
parent | 3681a503d79f9db5e81fa440af054817e728a4b4 (diff) | |
download | phosphor-networkd-87c139834ecebf78b403c0db20b36598c2c1db64.tar.gz phosphor-networkd-87c139834ecebf78b403c0db20b36598c2c1db64.zip |
Refresh the interface objects if DHCP mode changes
Create the ipaddress objects for the ethernet interface
whose DHCP is enabled.
Resolves openbmc/openbmc#1295
Change-Id: Id5ad35f1d51f2bf80c4e2b573e7bd38489370411
Signed-off-by: Ratan Gupta <ratagupt@in.ibm.com>
Diffstat (limited to 'ethernet_interface.hpp')
-rw-r--r-- | ethernet_interface.hpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/ethernet_interface.hpp b/ethernet_interface.hpp index 313a0b9..805c2ac 100644 --- a/ethernet_interface.hpp +++ b/ethernet_interface.hpp @@ -23,6 +23,10 @@ using Ifaces = sdbusplus::xyz::openbmc_project::Network::IP::server::Create>; using IP = sdbusplus::xyz::openbmc_project::Network::server::IP; + +using EthernetInterfaceIntf = + sdbusplus::xyz::openbmc_project::Network::server::EthernetInterface; + class Manager; // forward declaration of network manager. class TestEthernetInterface; @@ -76,17 +80,22 @@ class EthernetInterface : public Ifaces */ void deleteObject(const std::string& ipaddress); - /* @brief creates the dbus object given in the address list. + /* @brief creates the dbus object(IPaddres) given in the address list. * @param[in] addrs - address list for which dbus objects needs * to create. */ - void setAddressList(const AddrList& addrs); + void createIPAddressObjects(); /* @brief Gets all the ip addresses. * @returns the list of ipaddress. */ const AddressMap& getAddresses() const { return addrs; } + /** Set value of DHCPEnabled */ + bool dHCPEnabled(bool value) override; + + using EthernetInterfaceIntf::dHCPEnabled; + private: /** @brief get the info of the ethernet interface. |