blob: 751c74a18b4b285002de551cfb973bfcc58e919e [file] [log] [blame]
Ratan Gupta8c834932017-04-14 16:30:24 +05301#pragma once
2
Ratan Gupta82549cc2017-04-21 08:45:23 +05303#include "types.hpp"
Ratan Gupta8804feb2017-05-25 10:49:57 +05304#include "util.hpp"
Ratan Gupta82549cc2017-04-21 08:45:23 +05305#include "xyz/openbmc_project/Network/IP/Create/server.hpp"
William A. Kennington III08505792019-01-30 16:00:04 -08006#include "xyz/openbmc_project/Network/Neighbor/CreateStatic/server.hpp"
Ratan Gupta8c834932017-04-14 16:30:24 +05307
Manojkiran Edaa879baa2020-06-13 14:39:08 +05308#include <filesystem>
Ratan Gupta8c834932017-04-14 16:30:24 +05309#include <sdbusplus/bus.hpp>
10#include <sdbusplus/server/object.hpp>
Ratan Gupta8c834932017-04-14 16:30:24 +053011#include <string>
Patrick Venture189d44e2018-07-09 12:30:59 -070012#include <xyz/openbmc_project/Collection/DeleteAll/server.hpp>
13#include <xyz/openbmc_project/Network/EthernetInterface/server.hpp>
14#include <xyz/openbmc_project/Network/MACAddress/server.hpp>
Ratan Gupta8c834932017-04-14 16:30:24 +053015
16namespace phosphor
17{
18namespace network
19{
Ratan Gupta8c834932017-04-14 16:30:24 +053020
Patrick Williamsc38b0712022-07-22 19:26:54 -050021using Ifaces = sdbusplus::server::object_t<
Gunnar Mills57d9c502018-09-14 14:42:34 -050022 sdbusplus::xyz::openbmc_project::Network::server::EthernetInterface,
23 sdbusplus::xyz::openbmc_project::Network::server::MACAddress,
24 sdbusplus::xyz::openbmc_project::Network::IP::server::Create,
William A. Kennington III08505792019-01-30 16:00:04 -080025 sdbusplus::xyz::openbmc_project::Network::Neighbor::server::CreateStatic,
Gunnar Mills57d9c502018-09-14 14:42:34 -050026 sdbusplus::xyz::openbmc_project::Collection::server::DeleteAll>;
Ratan Gupta8c834932017-04-14 16:30:24 +053027
Ratan Gupta82549cc2017-04-21 08:45:23 +053028using IP = sdbusplus::xyz::openbmc_project::Network::server::IP;
Ratan Gupta87c13982017-06-15 09:27:27 +053029
30using EthernetInterfaceIntf =
31 sdbusplus::xyz::openbmc_project::Network::server::EthernetInterface;
Ratan Guptabd303b12017-08-18 17:10:07 +053032using MacAddressIntf =
33 sdbusplus::xyz::openbmc_project::Network::server::MACAddress;
Ratan Gupta87c13982017-06-15 09:27:27 +053034
Ratan Gupta497c0c92017-08-22 19:15:59 +053035using ServerList = std::vector<std::string>;
raviteja-bce379562019-03-28 05:59:36 -050036using ObjectPath = sdbusplus::message::object_path;
Ratan Gupta497c0c92017-08-22 19:15:59 +053037
Manojkiran Edaa879baa2020-06-13 14:39:08 +053038namespace fs = std::filesystem;
Ratan Gupta5978dd12017-07-25 13:47:13 +053039
Ratan Gupta4f1c18b2017-05-25 12:59:35 +053040class Manager; // forward declaration of network manager.
Ratan Gupta8c834932017-04-14 16:30:24 +053041
Ratan Gupta47722dc2017-05-26 18:32:23 +053042class TestEthernetInterface;
43
Ratan Gupta5978dd12017-07-25 13:47:13 +053044class VlanInterface;
45
46class IPAddress;
47
William A. Kennington III08505792019-01-30 16:00:04 -080048class Neighbor;
49
Ratan Gupta8c834932017-04-14 16:30:24 +053050using LinkSpeed = uint16_t;
51using DuplexMode = uint8_t;
52using Autoneg = uint8_t;
Johnathan Manteyfaa72e52020-01-08 10:38:58 -080053using LinkUp = bool;
Johnathan Manteyd0679f92019-10-29 16:20:28 -070054using NICEnabled = bool;
Tejas Patil2c0fc562021-08-03 19:13:46 +053055using MTU = size_t;
Ratan Gupta5978dd12017-07-25 13:47:13 +053056using VlanId = uint32_t;
57using InterfaceName = std::string;
Johnathan Manteyd0679f92019-10-29 16:20:28 -070058using InterfaceInfo =
Tejas Patil2c0fc562021-08-03 19:13:46 +053059 std::tuple<LinkSpeed, DuplexMode, Autoneg, LinkUp, NICEnabled, MTU>;
Ratan Gupta29b0e432017-05-25 12:51:40 +053060using AddressMap = std::map<std::string, std::shared_ptr<IPAddress>>;
William A. Kennington III08505792019-01-30 16:00:04 -080061using NeighborMap = std::map<std::string, std::shared_ptr<Neighbor>>;
Gunnar Mills57d9c502018-09-14 14:42:34 -050062using VlanInterfaceMap =
63 std::map<InterfaceName, std::unique_ptr<VlanInterface>>;
Ratan Gupta8c834932017-04-14 16:30:24 +053064
65/** @class EthernetInterface
66 * @brief OpenBMC Ethernet Interface implementation.
67 * @details A concrete implementation for the
68 * xyz.openbmc_project.Network.EthernetInterface DBus API.
69 */
Ratan Gupta82549cc2017-04-21 08:45:23 +053070class EthernetInterface : public Ifaces
Ratan Gupta8c834932017-04-14 16:30:24 +053071{
Gunnar Mills57d9c502018-09-14 14:42:34 -050072 public:
73 EthernetInterface() = delete;
74 EthernetInterface(const EthernetInterface&) = delete;
75 EthernetInterface& operator=(const EthernetInterface&) = delete;
76 EthernetInterface(EthernetInterface&&) = delete;
77 EthernetInterface& operator=(EthernetInterface&&) = delete;
78 virtual ~EthernetInterface() = default;
Ratan Gupta8c834932017-04-14 16:30:24 +053079
Gunnar Mills57d9c502018-09-14 14:42:34 -050080 /** @brief Constructor to put object onto bus at a dbus path.
81 * @param[in] bus - Bus to attach to.
82 * @param[in] objPath - Path to attach at.
83 * @param[in] dhcpEnabled - is dhcp enabled(true/false).
84 * @param[in] parent - parent object.
85 * @param[in] emitSignal - true if the object added signal needs to be
86 * send.
William A. Kennington III26275a32021-07-13 20:32:42 -070087 * @param[in] enabled - Override the lookup of nicEnabled
Gunnar Mills57d9c502018-09-14 14:42:34 -050088 */
Patrick Williamsc38b0712022-07-22 19:26:54 -050089 EthernetInterface(sdbusplus::bus_t& bus, const std::string& objPath,
Johnathan Mantey817012a2020-01-30 15:07:39 -080090 DHCPConf dhcpEnabled, Manager& parent,
William A. Kennington III26275a32021-07-13 20:32:42 -070091 bool emitSignal = true,
92 std::optional<bool> enabled = std::nullopt);
Ratan Gupta82549cc2017-04-21 08:45:23 +053093
Manojkiran Edaacd6dd52019-10-15 15:00:51 +053094 /** @brief Function used to load the nameservers.
95 */
96 virtual void loadNameServers();
97
Patrick Williams6aef7692021-05-01 06:39:41 -050098 /** @brief Function to create ipAddress dbus object.
Gunnar Mills57d9c502018-09-14 14:42:34 -050099 * @param[in] addressType - Type of ip address.
Patrick Williams6aef7692021-05-01 06:39:41 -0500100 * @param[in] ipAddress- IP address.
Gunnar Mills57d9c502018-09-14 14:42:34 -0500101 * @param[in] prefixLength - Length of prefix.
102 * @param[in] gateway - Gateway ip address.
103 */
Ratan Gupta82549cc2017-04-21 08:45:23 +0530104
Patrick Williams6aef7692021-05-01 06:39:41 -0500105 ObjectPath ip(IP::Protocol addressType, std::string ipAddress,
raviteja-bce379562019-03-28 05:59:36 -0500106 uint8_t prefixLength, std::string gateway) override;
Ratan Gupta8c834932017-04-14 16:30:24 +0530107
William A. Kennington III08505792019-01-30 16:00:04 -0800108 /** @brief Function to create static neighbor dbus object.
109 * @param[in] ipAddress - IP address.
110 * @param[in] macAddress - Low level MAC address.
111 */
Patrick Williams6aef7692021-05-01 06:39:41 -0500112 ObjectPath neighbor(std::string ipAddress, std::string macAddress) override;
William A. Kennington III08505792019-01-30 16:00:04 -0800113
Patrick Williams6aef7692021-05-01 06:39:41 -0500114 /* @brief delete the dbus object of the given ipAddress.
115 * @param[in] ipAddress - IP address.
Gunnar Mills57d9c502018-09-14 14:42:34 -0500116 */
Patrick Williams6aef7692021-05-01 06:39:41 -0500117 void deleteObject(const std::string& ipAddress);
Ratan Gupta8c834932017-04-14 16:30:24 +0530118
Patrick Williams6aef7692021-05-01 06:39:41 -0500119 /* @brief delete the dbus object of the given ipAddress.
120 * @param[in] ipAddress - IP address.
William A. Kennington III08505792019-01-30 16:00:04 -0800121 */
122 void deleteStaticNeighborObject(const std::string& ipAddress);
123
Gunnar Mills57d9c502018-09-14 14:42:34 -0500124 /* @brief delete the vlan dbus object of the given interface.
125 * Also deletes the device file and the network file.
126 * @param[in] interface - VLAN Interface.
127 */
128 void deleteVLANObject(const std::string& interface);
Ratan Guptabc886292017-07-25 18:29:57 +0530129
Gunnar Mills57d9c502018-09-14 14:42:34 -0500130 /* @brief creates the dbus object(IPaddres) given in the address list.
131 * @param[in] addrs - address list for which dbus objects needs
132 * to create.
133 */
134 void createIPAddressObjects();
Ratan Gupta29b0e432017-05-25 12:51:40 +0530135
William A. Kennington III08505792019-01-30 16:00:04 -0800136 /* @brief creates the dbus object(Neighbor) given in the neighbor list.
137 */
138 void createStaticNeighborObjects();
139
William A. Kennington IIId7946a72019-04-19 14:24:09 -0700140 /* @brief Gets the index of the interface on the system
141 */
142 unsigned ifIndex() const;
143
Gunnar Mills57d9c502018-09-14 14:42:34 -0500144 /* @brief Gets all the ip addresses.
Patrick Williams6aef7692021-05-01 06:39:41 -0500145 * @returns the list of ipAddress.
Gunnar Mills57d9c502018-09-14 14:42:34 -0500146 */
147 const AddressMap& getAddresses() const
148 {
149 return addrs;
150 }
Ratan Gupta8c834932017-04-14 16:30:24 +0530151
William A. Kennington III08505792019-01-30 16:00:04 -0800152 /* @brief Gets all the static neighbor entries.
153 * @returns Static neighbor map.
154 */
155 const NeighborMap& getStaticNeighbors() const
156 {
157 return staticNeighbors;
158 }
159
Gunnar Mills57d9c502018-09-14 14:42:34 -0500160 /** Set value of DHCPEnabled */
Patrick Williams6aef7692021-05-01 06:39:41 -0500161 DHCPConf dhcpEnabled(DHCPConf value) override;
Johnathan Mantey817012a2020-01-30 15:07:39 -0800162
163 /** @brief Selectively disables DHCP
164 * @param[in] protocol - The IPv4 or IPv6 protocol to return to static
165 * addressing mode
166 */
167 void disableDHCP(IP::Protocol protocol);
Ratan Gupta87c13982017-06-15 09:27:27 +0530168
Johnathan Manteyfaa72e52020-01-08 10:38:58 -0800169 /** Retrieve Link State */
170 bool linkUp() const override;
171
Tejas Patil2c0fc562021-08-03 19:13:46 +0530172 /** Retrieve MTU Size */
173 size_t mtu() const override;
174
175 /** Set size of MTU */
176 size_t mtu(size_t value) override;
177
Johnathan Manteyd0679f92019-10-29 16:20:28 -0700178 /** Set value of NICEnabled */
Patrick Williams6aef7692021-05-01 06:39:41 -0500179 bool nicEnabled(bool value) override;
Johnathan Manteyd0679f92019-10-29 16:20:28 -0700180
Gunnar Mills57d9c502018-09-14 14:42:34 -0500181 /** @brief sets the MAC address.
182 * @param[in] value - MAC address which needs to be set on the system.
183 * @returns macAddress of the interface or throws an error.
184 */
Patrick Williams6aef7692021-05-01 06:39:41 -0500185 std::string macAddress(std::string value) override;
Ratan Guptabd303b12017-08-18 17:10:07 +0530186
Johnathan Mantey5b023f52019-06-24 16:06:37 -0700187 /** @brief get the IPv6AcceptRA flag from the network configuration file
188 *
189 */
190 bool getIPv6AcceptRAFromConf();
191
192 /** @brief check conf file for Router Advertisements
193 *
194 */
Patrick Williams6aef7692021-05-01 06:39:41 -0500195 bool ipv6AcceptRA(bool value) override;
Johnathan Mantey5b023f52019-06-24 16:06:37 -0700196
Gunnar Mills57d9c502018-09-14 14:42:34 -0500197 /** @brief sets the NTP servers.
198 * @param[in] value - vector of NTP servers.
199 */
Patrick Williams6aef7692021-05-01 06:39:41 -0500200 ServerList ntpServers(ServerList value) override;
Ratan Gupta497c0c92017-08-22 19:15:59 +0530201
Manojkiran Edaacd6dd52019-10-15 15:00:51 +0530202 /** @brief sets the Static DNS/nameservers.
203 * @param[in] value - vector of DNS servers.
204 */
205
206 ServerList staticNameServers(ServerList value) override;
207
Gunnar Mills57d9c502018-09-14 14:42:34 -0500208 /** @brief create Vlan interface.
209 * @param[in] id- VLAN identifier.
210 */
William A. Kennington IIIf4b4ff82019-04-09 19:06:52 -0700211 ObjectPath createVLAN(VlanId id);
Ratan Gupta5978dd12017-07-25 13:47:13 +0530212
Gunnar Mills57d9c502018-09-14 14:42:34 -0500213 /** @brief load the vlan info from the system
214 * and creates the ip address dbus objects.
215 * @param[in] vlanID- VLAN identifier.
216 */
217 void loadVLAN(VlanId vlanID);
Ratan Gupta92bc2fe2017-07-26 22:40:21 +0530218
Gunnar Mills57d9c502018-09-14 14:42:34 -0500219 /** @brief write the network conf file with the in-memory objects.
220 */
221 void writeConfigurationFile();
Ratan Gupta2b106532017-07-25 16:05:02 +0530222
Gunnar Mills57d9c502018-09-14 14:42:34 -0500223 /** @brief delete all dbus objects.
224 */
225 void deleteAll();
Ratan Guptae9c9b812017-09-22 17:15:37 +0530226
Ravi Tejaa5a09442020-07-17 00:57:33 -0500227 /** @brief set the default v4 gateway of the interface.
228 * @param[in] gateway - default v4 gateway of the interface.
229 */
230 std::string defaultGateway(std::string gateway) override;
231
232 /** @brief set the default v6 gateway of the interface.
233 * @param[in] gateway - default v6 gateway of the interface.
234 */
235 std::string defaultGateway6(std::string gateway) override;
236
Patrick Williams6aef7692021-05-01 06:39:41 -0500237 using EthernetInterfaceIntf::dhcpEnabled;
Gunnar Mills57d9c502018-09-14 14:42:34 -0500238 using EthernetInterfaceIntf::interfaceName;
Johnathan Manteyfaa72e52020-01-08 10:38:58 -0800239 using EthernetInterfaceIntf::linkUp;
Tejas Patil2c0fc562021-08-03 19:13:46 +0530240 using EthernetInterfaceIntf::mtu;
Patrick Williams6aef7692021-05-01 06:39:41 -0500241 using EthernetInterfaceIntf::nicEnabled;
242 using MacAddressIntf::macAddress;
Ratan Gupta5978dd12017-07-25 13:47:13 +0530243
Ravi Tejaa5a09442020-07-17 00:57:33 -0500244 using EthernetInterfaceIntf::defaultGateway;
245 using EthernetInterfaceIntf::defaultGateway6;
Gunnar Mills57d9c502018-09-14 14:42:34 -0500246 /** @brief Absolute path of the resolv conf file */
247 static constexpr auto resolvConfFile = "/etc/resolv.conf";
Ratan Gupta6dec3902017-08-20 15:28:12 +0530248
Gunnar Mills57d9c502018-09-14 14:42:34 -0500249 protected:
250 /** @brief get the info of the ethernet interface.
251 * @return tuple having the link speed,autonegotiation,duplexmode .
252 */
253 InterfaceInfo getInterfaceInfo() const;
Ratan Gupta8c834932017-04-14 16:30:24 +0530254
Gunnar Mills57d9c502018-09-14 14:42:34 -0500255 /* @brief delete the vlan interface from system.
256 * @param[in] interface - vlan Interface.
257 */
258 void deleteVLANFromSystem(const std::string& interface);
Ratan Guptae9c9b812017-09-22 17:15:37 +0530259
Gunnar Mills57d9c502018-09-14 14:42:34 -0500260 /** @brief get the mac address of the interface.
261 * @param[in] interfaceName - Network interface name.
262 * @return macaddress on success
263 */
Ratan Gupta8c834932017-04-14 16:30:24 +0530264
Gunnar Mills57d9c502018-09-14 14:42:34 -0500265 std::string getMACAddress(const std::string& interfaceName) const;
Ratan Gupta8c834932017-04-14 16:30:24 +0530266
Gunnar Mills57d9c502018-09-14 14:42:34 -0500267 /** @brief construct the ip address dbus object path.
268 * @param[in] addressType - Type of ip address.
Patrick Williams6aef7692021-05-01 06:39:41 -0500269 * @param[in] ipAddress - IP address.
Gunnar Mills57d9c502018-09-14 14:42:34 -0500270 * @param[in] prefixLength - Length of prefix.
271 * @param[in] gateway - Gateway address.
Lei YU34027572021-08-11 15:23:52 +0800272 * @param[in] origin - The origin entry of the IP::Address
Ratan Gupta65e5abe2017-05-23 13:20:44 +0530273
Gunnar Mills57d9c502018-09-14 14:42:34 -0500274 * @return path of the address object.
275 */
Ratan Gupta82549cc2017-04-21 08:45:23 +0530276
Gunnar Mills57d9c502018-09-14 14:42:34 -0500277 std::string generateObjectPath(IP::Protocol addressType,
Patrick Williams6aef7692021-05-01 06:39:41 -0500278 const std::string& ipAddress,
Gunnar Mills57d9c502018-09-14 14:42:34 -0500279 uint8_t prefixLength,
Lei YU34027572021-08-11 15:23:52 +0800280 const std::string& gateway,
281 IP::AddressOrigin origin) const;
Ratan Gupta82549cc2017-04-21 08:45:23 +0530282
William A. Kennington III08505792019-01-30 16:00:04 -0800283 std::string
Patrick Williams6aef7692021-05-01 06:39:41 -0500284 generateStaticNeighborObjectPath(const std::string& ipAddress,
285 const std::string& macAddress) const;
William A. Kennington III08505792019-01-30 16:00:04 -0800286
Patrick Williams6aef7692021-05-01 06:39:41 -0500287 /** @brief generates the id by doing hash of ipAddress,
Gunnar Mills57d9c502018-09-14 14:42:34 -0500288 * prefixlength and the gateway.
Patrick Williams6aef7692021-05-01 06:39:41 -0500289 * @param[in] ipAddress - IP address.
Gunnar Mills57d9c502018-09-14 14:42:34 -0500290 * @param[in] prefixLength - Length of prefix.
291 * @param[in] gateway - Gateway address.
Lei YU34027572021-08-11 15:23:52 +0800292 * @param[in] origin - The string of the address origin
Gunnar Mills57d9c502018-09-14 14:42:34 -0500293 * @return hash string.
294 */
Ratan Gupta82549cc2017-04-21 08:45:23 +0530295
Patrick Williams6aef7692021-05-01 06:39:41 -0500296 static std::string generateId(const std::string& ipAddress,
Gunnar Mills57d9c502018-09-14 14:42:34 -0500297 uint8_t prefixLength,
Lei YU34027572021-08-11 15:23:52 +0800298 const std::string& gateway,
299 const std::string& origin);
Ratan Gupta82549cc2017-04-21 08:45:23 +0530300
Patrick Williams6aef7692021-05-01 06:39:41 -0500301 /** @brief generates the id by doing hash of ipAddress
William A. Kennington III08505792019-01-30 16:00:04 -0800302 * and the mac address.
Patrick Williams6aef7692021-05-01 06:39:41 -0500303 * @param[in] ipAddress - IP address.
304 * @param[in] macAddress - Gateway address.
William A. Kennington III08505792019-01-30 16:00:04 -0800305 * @return hash string.
306 */
Patrick Williams6aef7692021-05-01 06:39:41 -0500307 static std::string generateNeighborId(const std::string& ipAddress,
308 const std::string& macAddress);
William A. Kennington III08505792019-01-30 16:00:04 -0800309
Gunnar Mills57d9c502018-09-14 14:42:34 -0500310 /** @brief write the dhcp section **/
311 void writeDHCPSection(std::fstream& stream);
Ratan Gupta2b106532017-07-25 16:05:02 +0530312
Gunnar Mills57d9c502018-09-14 14:42:34 -0500313 /** @brief get the NTP server list from the network conf
314 *
315 */
316 ServerList getNTPServersFromConf();
Ratan Gupta497c0c92017-08-22 19:15:59 +0530317
Gunnar Mills57d9c502018-09-14 14:42:34 -0500318 /** @brief get the name server details from the network conf
319 *
320 */
Manojkiran Edaacd6dd52019-10-15 15:00:51 +0530321 virtual ServerList getNameServerFromResolvd();
322 ServerList getstaticNameServerFromConf();
Ratan Gupta6dec3902017-08-20 15:28:12 +0530323
Gunnar Mills57d9c502018-09-14 14:42:34 -0500324 /** @brief Persistent sdbusplus DBus bus connection. */
Patrick Williamsc38b0712022-07-22 19:26:54 -0500325 sdbusplus::bus_t& bus;
Ratan Gupta82549cc2017-04-21 08:45:23 +0530326
Gunnar Mills57d9c502018-09-14 14:42:34 -0500327 /** @brief Network Manager object. */
328 Manager& manager;
Ratan Gupta4f1c18b2017-05-25 12:59:35 +0530329
Gunnar Mills57d9c502018-09-14 14:42:34 -0500330 /** @brief Persistent map of IPAddress dbus objects and their names */
331 AddressMap addrs;
Ratan Gupta82549cc2017-04-21 08:45:23 +0530332
William A. Kennington III08505792019-01-30 16:00:04 -0800333 /** @brief Persistent map of Neighbor dbus objects and their names */
334 NeighborMap staticNeighbors;
335
Gunnar Mills57d9c502018-09-14 14:42:34 -0500336 /** @brief Persistent map of VLAN interface dbus objects and their names */
337 VlanInterfaceMap vlanInterfaces;
Ratan Gupta5978dd12017-07-25 13:47:13 +0530338
Gunnar Mills57d9c502018-09-14 14:42:34 -0500339 /** @brief Dbus object path */
340 std::string objPath;
Ratan Gupta47722dc2017-05-26 18:32:23 +0530341
Gunnar Mills57d9c502018-09-14 14:42:34 -0500342 friend class TestEthernetInterface;
Johnathan Mantey817012a2020-01-30 15:07:39 -0800343
344 private:
345 /** @brief Determines if DHCP is active for the IP::Protocol supplied.
346 * @param[in] protocol - Either IPv4 or IPv6
Johnathan Mantey817012a2020-01-30 15:07:39 -0800347 * @returns true/false value if DHCP is active for the input protocol
348 */
William A. Kennington III24957b92021-12-03 13:59:19 -0800349 bool dhcpIsEnabled(IP::Protocol protocol);
Johnathan Mantey817012a2020-01-30 15:07:39 -0800350
Johnathan Mantey817012a2020-01-30 15:07:39 -0800351 /** @brief Determines if the address is manually assigned
352 * @param[in] origin - The origin entry of the IP::Address
353 * @returns true/false value if the address is static
354 */
355 bool originIsManuallyAssigned(IP::AddressOrigin origin);
William A. Kennington III26275a32021-07-13 20:32:42 -0700356
357 /** @brief Determines if the NIC is enabled in systemd
358 * @returns true/false value if the NIC is enabled
359 */
360 bool queryNicEnabled() const;
Ratan Gupta8c834932017-04-14 16:30:24 +0530361};
362
363} // namespace network
364} // namespace phosphor