config_parser: Reduce number of file reads

This changes focuses on reducing the number of Parser() constructions to
limit the number of duplicate file reads.

Change-Id: I05df943844c70dc6aa729ab744d2d405cbfe2c76
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/src/util.hpp b/src/util.hpp
index 43c231f..c4e1b60 100644
--- a/src/util.hpp
+++ b/src/util.hpp
@@ -9,6 +9,7 @@
 #include <unistd.h>
 
 #include <cstring>
+#include <filesystem>
 #include <optional>
 #include <sdbusplus/bus.hpp>
 #include <string>
@@ -123,12 +124,15 @@
  */
 std::optional<std::string> interfaceToUbootEthAddr(const char* intf);
 
-/** @brief read the DHCP value from the configuration file
- *  @param[in] confDir - Network configuration directory.
- *  @param[in] intf - Interface name.
+/** @brief read the IPv6AcceptRA value from the configuration file
+ *  @param[in] config - The parsed configuration.
  */
-EthernetInterfaceIntf::DHCPConf getDHCPValue(const std::string& confDir,
-                                             const std::string& intf);
+bool getIPv6AcceptRA(const config::Parser& config);
+
+/** @brief read the DHCP value from the configuration file
+ *  @param[in] config - The parsed configuration.
+ */
+EthernetInterfaceIntf::DHCPConf getDHCPValue(const config::Parser& config);
 
 namespace internal
 {