util.hpp (c2e5e0e91ad4e765d286fbf3b93ad56a0b1ac43f) util.hpp (a520a39d1155cc5852fa6929aa9c772802505457)
1#pragma once
2
3#include "config.h"
4
5#include "ethernet_interface.hpp"
6#include "types.hpp"
7
8#include <netinet/ether.h>
9#include <unistd.h>
10
11#include <cstring>
1#pragma once
2
3#include "config.h"
4
5#include "ethernet_interface.hpp"
6#include "types.hpp"
7
8#include <netinet/ether.h>
9#include <unistd.h>
10
11#include <cstring>
12#include <filesystem>
12#include <optional>
13#include <sdbusplus/bus.hpp>
14#include <string>
15#include <string_view>
16#include <xyz/openbmc_project/Network/EthernetInterface/server.hpp>
17
18namespace phosphor
19{

--- 98 unchanged lines hidden (view full) ---

118/** @brief Converts the interface name into a u-boot environment
119 * variable that would hold its ethernet address.
120 *
121 * @param[in] intf - interface name
122 * @return The name of th environment key
123 */
124std::optional<std::string> interfaceToUbootEthAddr(const char* intf);
125
13#include <optional>
14#include <sdbusplus/bus.hpp>
15#include <string>
16#include <string_view>
17#include <xyz/openbmc_project/Network/EthernetInterface/server.hpp>
18
19namespace phosphor
20{

--- 98 unchanged lines hidden (view full) ---

119/** @brief Converts the interface name into a u-boot environment
120 * variable that would hold its ethernet address.
121 *
122 * @param[in] intf - interface name
123 * @return The name of th environment key
124 */
125std::optional<std::string> interfaceToUbootEthAddr(const char* intf);
126
127/** @brief read the IPv6AcceptRA value from the configuration file
128 * @param[in] config - The parsed configuration.
129 */
130bool getIPv6AcceptRA(const config::Parser& config);
131
126/** @brief read the DHCP value from the configuration file
132/** @brief read the DHCP value from the configuration file
127 * @param[in] confDir - Network configuration directory.
128 * @param[in] intf - Interface name.
133 * @param[in] config - The parsed configuration.
129 */
134 */
130EthernetInterfaceIntf::DHCPConf getDHCPValue(const std::string& confDir,
131 const std::string& intf);
135EthernetInterfaceIntf::DHCPConf getDHCPValue(const config::Parser& config);
132
133namespace internal
134{
135
136/* @brief runs the given command in child process.
137 * @param[in] path - path of the binary file which needs to be execeuted.
138 * @param[in] args - arguments of the command.
139 */

--- 30 unchanged lines hidden ---
136
137namespace internal
138{
139
140/* @brief runs the given command in child process.
141 * @param[in] path - path of the binary file which needs to be execeuted.
142 * @param[in] args - arguments of the command.
143 */

--- 30 unchanged lines hidden ---