blob: 89284550529d035a68f5b2b608e6cfaf2dc3c708 [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
Gunnar Mills57d9c502018-09-14 14:42:34 -050021using Ifaces = sdbusplus::server::object::object<
22 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 */
89 EthernetInterface(sdbusplus::bus::bus& 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
Gunnar Mills57d9c502018-09-14 14:42:34 -0500202 /** @brief sets the DNS/nameservers.
203 * @param[in] value - vector of DNS servers.
204 */
205 ServerList nameservers(ServerList value) override;
Ratan Gupta6dec390f2017-08-20 15:28:12 +0530206
Manojkiran Edaacd6dd52019-10-15 15:00:51 +0530207 /** @brief sets the Static DNS/nameservers.
208 * @param[in] value - vector of DNS servers.
209 */
210
211 ServerList staticNameServers(ServerList value) override;
212
Gunnar Mills57d9c502018-09-14 14:42:34 -0500213 /** @brief create Vlan interface.
214 * @param[in] id- VLAN identifier.
215 */
William A. Kennington IIIf4b4ff82019-04-09 19:06:52 -0700216 ObjectPath createVLAN(VlanId id);
Ratan Gupta5978dd12017-07-25 13:47:13 +0530217
Gunnar Mills57d9c502018-09-14 14:42:34 -0500218 /** @brief load the vlan info from the system
219 * and creates the ip address dbus objects.
220 * @param[in] vlanID- VLAN identifier.
221 */
222 void loadVLAN(VlanId vlanID);
Ratan Gupta92bc2fe2017-07-26 22:40:21 +0530223
Gunnar Mills57d9c502018-09-14 14:42:34 -0500224 /** @brief write the network conf file with the in-memory objects.
225 */
226 void writeConfigurationFile();
Ratan Gupta2b106532017-07-25 16:05:02 +0530227
Gunnar Mills57d9c502018-09-14 14:42:34 -0500228 /** @brief delete all dbus objects.
229 */
230 void deleteAll();
Ratan Guptae9c9b812017-09-22 17:15:37 +0530231
Ravi Tejaa5a09442020-07-17 00:57:33 -0500232 /** @brief set the default v4 gateway of the interface.
233 * @param[in] gateway - default v4 gateway of the interface.
234 */
235 std::string defaultGateway(std::string gateway) override;
236
237 /** @brief set the default v6 gateway of the interface.
238 * @param[in] gateway - default v6 gateway of the interface.
239 */
240 std::string defaultGateway6(std::string gateway) override;
241
Patrick Williams6aef7692021-05-01 06:39:41 -0500242 using EthernetInterfaceIntf::dhcpEnabled;
Gunnar Mills57d9c502018-09-14 14:42:34 -0500243 using EthernetInterfaceIntf::interfaceName;
Johnathan Manteyfaa72e52020-01-08 10:38:58 -0800244 using EthernetInterfaceIntf::linkUp;
Tejas Patil2c0fc562021-08-03 19:13:46 +0530245 using EthernetInterfaceIntf::mtu;
Patrick Williams6aef7692021-05-01 06:39:41 -0500246 using EthernetInterfaceIntf::nicEnabled;
247 using MacAddressIntf::macAddress;
Ratan Gupta5978dd12017-07-25 13:47:13 +0530248
Ravi Tejaa5a09442020-07-17 00:57:33 -0500249 using EthernetInterfaceIntf::defaultGateway;
250 using EthernetInterfaceIntf::defaultGateway6;
Gunnar Mills57d9c502018-09-14 14:42:34 -0500251 /** @brief Absolute path of the resolv conf file */
252 static constexpr auto resolvConfFile = "/etc/resolv.conf";
Ratan Gupta6dec390f2017-08-20 15:28:12 +0530253
Gunnar Mills57d9c502018-09-14 14:42:34 -0500254 protected:
255 /** @brief get the info of the ethernet interface.
256 * @return tuple having the link speed,autonegotiation,duplexmode .
257 */
258 InterfaceInfo getInterfaceInfo() const;
Ratan Gupta8c834932017-04-14 16:30:24 +0530259
Gunnar Mills57d9c502018-09-14 14:42:34 -0500260 /* @brief delete the vlan interface from system.
261 * @param[in] interface - vlan Interface.
262 */
263 void deleteVLANFromSystem(const std::string& interface);
Ratan Guptae9c9b812017-09-22 17:15:37 +0530264
Gunnar Mills57d9c502018-09-14 14:42:34 -0500265 /** @brief get the mac address of the interface.
266 * @param[in] interfaceName - Network interface name.
267 * @return macaddress on success
268 */
Ratan Gupta8c834932017-04-14 16:30:24 +0530269
Gunnar Mills57d9c502018-09-14 14:42:34 -0500270 std::string getMACAddress(const std::string& interfaceName) const;
Ratan Gupta8c834932017-04-14 16:30:24 +0530271
Gunnar Mills57d9c502018-09-14 14:42:34 -0500272 /** @brief construct the ip address dbus object path.
273 * @param[in] addressType - Type of ip address.
Patrick Williams6aef7692021-05-01 06:39:41 -0500274 * @param[in] ipAddress - IP address.
Gunnar Mills57d9c502018-09-14 14:42:34 -0500275 * @param[in] prefixLength - Length of prefix.
276 * @param[in] gateway - Gateway address.
Lei YU34027572021-08-11 15:23:52 +0800277 * @param[in] origin - The origin entry of the IP::Address
Ratan Gupta65e5abe2017-05-23 13:20:44 +0530278
Gunnar Mills57d9c502018-09-14 14:42:34 -0500279 * @return path of the address object.
280 */
Ratan Gupta82549cc2017-04-21 08:45:23 +0530281
Gunnar Mills57d9c502018-09-14 14:42:34 -0500282 std::string generateObjectPath(IP::Protocol addressType,
Patrick Williams6aef7692021-05-01 06:39:41 -0500283 const std::string& ipAddress,
Gunnar Mills57d9c502018-09-14 14:42:34 -0500284 uint8_t prefixLength,
Lei YU34027572021-08-11 15:23:52 +0800285 const std::string& gateway,
286 IP::AddressOrigin origin) const;
Ratan Gupta82549cc2017-04-21 08:45:23 +0530287
William A. Kennington III08505792019-01-30 16:00:04 -0800288 std::string
Patrick Williams6aef7692021-05-01 06:39:41 -0500289 generateStaticNeighborObjectPath(const std::string& ipAddress,
290 const std::string& macAddress) const;
William A. Kennington III08505792019-01-30 16:00:04 -0800291
Patrick Williams6aef7692021-05-01 06:39:41 -0500292 /** @brief generates the id by doing hash of ipAddress,
Gunnar Mills57d9c502018-09-14 14:42:34 -0500293 * prefixlength and the gateway.
Patrick Williams6aef7692021-05-01 06:39:41 -0500294 * @param[in] ipAddress - IP address.
Gunnar Mills57d9c502018-09-14 14:42:34 -0500295 * @param[in] prefixLength - Length of prefix.
296 * @param[in] gateway - Gateway address.
Lei YU34027572021-08-11 15:23:52 +0800297 * @param[in] origin - The string of the address origin
Gunnar Mills57d9c502018-09-14 14:42:34 -0500298 * @return hash string.
299 */
Ratan Gupta82549cc2017-04-21 08:45:23 +0530300
Patrick Williams6aef7692021-05-01 06:39:41 -0500301 static std::string generateId(const std::string& ipAddress,
Gunnar Mills57d9c502018-09-14 14:42:34 -0500302 uint8_t prefixLength,
Lei YU34027572021-08-11 15:23:52 +0800303 const std::string& gateway,
304 const std::string& origin);
Ratan Gupta82549cc2017-04-21 08:45:23 +0530305
Patrick Williams6aef7692021-05-01 06:39:41 -0500306 /** @brief generates the id by doing hash of ipAddress
William A. Kennington III08505792019-01-30 16:00:04 -0800307 * and the mac address.
Patrick Williams6aef7692021-05-01 06:39:41 -0500308 * @param[in] ipAddress - IP address.
309 * @param[in] macAddress - Gateway address.
William A. Kennington III08505792019-01-30 16:00:04 -0800310 * @return hash string.
311 */
Patrick Williams6aef7692021-05-01 06:39:41 -0500312 static std::string generateNeighborId(const std::string& ipAddress,
313 const std::string& macAddress);
William A. Kennington III08505792019-01-30 16:00:04 -0800314
Gunnar Mills57d9c502018-09-14 14:42:34 -0500315 /** @brief write the dhcp section **/
316 void writeDHCPSection(std::fstream& stream);
Ratan Gupta2b106532017-07-25 16:05:02 +0530317
Gunnar Mills57d9c502018-09-14 14:42:34 -0500318 /** @brief get the NTP server list from the network conf
319 *
320 */
321 ServerList getNTPServersFromConf();
Ratan Gupta497c0c92017-08-22 19:15:59 +0530322
Gunnar Mills57d9c502018-09-14 14:42:34 -0500323 /** @brief get the name server details from the network conf
324 *
325 */
Manojkiran Edaacd6dd52019-10-15 15:00:51 +0530326 virtual ServerList getNameServerFromResolvd();
327 ServerList getstaticNameServerFromConf();
Ratan Gupta6dec390f2017-08-20 15:28:12 +0530328
Gunnar Mills57d9c502018-09-14 14:42:34 -0500329 /** @brief Persistent sdbusplus DBus bus connection. */
330 sdbusplus::bus::bus& bus;
Ratan Gupta82549cc2017-04-21 08:45:23 +0530331
Gunnar Mills57d9c502018-09-14 14:42:34 -0500332 /** @brief Network Manager object. */
333 Manager& manager;
Ratan Gupta4f1c18b2017-05-25 12:59:35 +0530334
Gunnar Mills57d9c502018-09-14 14:42:34 -0500335 /** @brief Persistent map of IPAddress dbus objects and their names */
336 AddressMap addrs;
Ratan Gupta82549cc2017-04-21 08:45:23 +0530337
William A. Kennington III08505792019-01-30 16:00:04 -0800338 /** @brief Persistent map of Neighbor dbus objects and their names */
339 NeighborMap staticNeighbors;
340
Gunnar Mills57d9c502018-09-14 14:42:34 -0500341 /** @brief Persistent map of VLAN interface dbus objects and their names */
342 VlanInterfaceMap vlanInterfaces;
Ratan Gupta5978dd12017-07-25 13:47:13 +0530343
Gunnar Mills57d9c502018-09-14 14:42:34 -0500344 /** @brief Dbus object path */
345 std::string objPath;
Ratan Gupta47722dc2017-05-26 18:32:23 +0530346
Gunnar Mills57d9c502018-09-14 14:42:34 -0500347 friend class TestEthernetInterface;
Johnathan Mantey817012a2020-01-30 15:07:39 -0800348
349 private:
350 /** @brief Determines if DHCP is active for the IP::Protocol supplied.
351 * @param[in] protocol - Either IPv4 or IPv6
Johnathan Mantey817012a2020-01-30 15:07:39 -0800352 * @returns true/false value if DHCP is active for the input protocol
353 */
William A. Kennington III24957b92021-12-03 13:59:19 -0800354 bool dhcpIsEnabled(IP::Protocol protocol);
Johnathan Mantey817012a2020-01-30 15:07:39 -0800355
Johnathan Mantey817012a2020-01-30 15:07:39 -0800356 /** @brief Determines if the address is manually assigned
357 * @param[in] origin - The origin entry of the IP::Address
358 * @returns true/false value if the address is static
359 */
360 bool originIsManuallyAssigned(IP::AddressOrigin origin);
William A. Kennington III26275a32021-07-13 20:32:42 -0700361
362 /** @brief Determines if the NIC is enabled in systemd
363 * @returns true/false value if the NIC is enabled
364 */
365 bool queryNicEnabled() const;
Ratan Gupta8c834932017-04-14 16:30:24 +0530366};
367
368} // namespace network
369} // namespace phosphor