routing_table: Remove unused Entry class
The Entry class is no longer used.
Tested:
Build pass.
Change-Id: Id111aeb6f53fde6a67d564ff0716aebf0b6f7fa3
Signed-off-by: Jiaqing Zhao <jiaqing.zhao@intel.com>
diff --git a/src/routing_table.cpp b/src/routing_table.cpp
index 0206743..bae3926 100644
--- a/src/routing_table.cpp
+++ b/src/routing_table.cpp
@@ -99,16 +99,6 @@
defaultGateway6[ifNameStr] = gatewayStr;
}
}
- Entry route(dstStr, gatewayStr, ifName);
- // if there is already existing route for this network
- // then ignore the next one as it would not be used by the
- // routing policy
- // So don't update the route entry for the network for which
- // there is already a route exist.
- if (routeList.find(dstStr) == routeList.end())
- {
- routeList.emplace(std::make_pair(dstStr, std::move(route)));
- }
}
} // namespace route
diff --git a/src/routing_table.hpp b/src/routing_table.hpp
index efe054d..45b6ec1 100644
--- a/src/routing_table.hpp
+++ b/src/routing_table.hpp
@@ -11,33 +11,6 @@
{
namespace route
{
-constexpr auto BUFSIZE = 4096;
-
-struct Entry
-{
- // destination network
- std::string destination;
- // gateway for this network.
- std::string gateway;
- // interface for this route
- std::string interface;
- Entry(const std::string& dest, const std::string& gtw,
- const std::string& intf) :
- destination(dest),
- gateway(gtw), interface(intf)
- {
- }
-
- bool operator==(const Entry& rhs)
- {
- return this->destination == rhs.destination &&
- this->gateway == rhs.gateway && this->interface == rhs.interface;
- }
-};
-
-// Map of network address and the route entry
-using Map = std::map<std::string, struct Entry>;
-
class Table
{
public:
@@ -74,7 +47,6 @@
std::map<std::string, std::string> defaultGateway; // default gateway list
std::map<std::string, std::string> defaultGateway6; // default gateway list
- Map routeList; // List of routes
};
} // namespace route