network_manager: Keep interface info around
This will allow us to rebuild objects if needed and doesn't take much
more memory to store.
Change-Id: Ifcc8b2b62472167e9cebbead4b6f9c6565c06f0f
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/src/network_manager.hpp b/src/network_manager.hpp
index a1b4699..049a000 100644
--- a/src/network_manager.hpp
+++ b/src/network_manager.hpp
@@ -147,7 +147,7 @@
std::filesystem::path confDir;
/** @brief Map of interface info for undiscovered interfaces */
- struct UndiscoveredInfo
+ struct AllIntfInfo
{
InterfaceInfo intf;
std::optional<in_addr> defgw4 = std::nullopt;
@@ -155,7 +155,7 @@
std::unordered_map<IfAddr, AddressInfo> addrs = {};
std::unordered_map<InAddrAny, NeighborInfo> staticNeighs = {};
};
- std::unordered_map<unsigned, UndiscoveredInfo> undiscoveredIntfInfo;
+ std::unordered_map<unsigned, AllIntfInfo> intfInfo;
std::unordered_set<unsigned> ignoredIntf;
/** @brief Map of enabled interfaces */
@@ -169,7 +169,7 @@
void handleAdminState(std::string_view state, unsigned ifidx);
/** @brief Creates the interface in the maps */
- void createInterface(const UndiscoveredInfo& info, bool enabled);
+ void createInterface(const AllIntfInfo& info, bool enabled);
};
} // namespace network