From 3517e6ce378a832f78069dc7a20639e26c9c64af Mon Sep 17 00:00:00 2001 From: Abtin Keshavarzian Date: Thu, 2 May 2024 08:45:30 -0700 Subject: [PATCH] [routing-manager] remove unused method (#10142) --- src/core/border_router/routing_manager.cpp | 31 ---------------------- src/core/border_router/routing_manager.hpp | 31 +++++++++++----------- 2 files changed, 15 insertions(+), 47 deletions(-) diff --git a/src/core/border_router/routing_manager.cpp b/src/core/border_router/routing_manager.cpp index 9bcf5dad2..c64e289e1 100644 --- a/src/core/border_router/routing_manager.cpp +++ b/src/core/border_router/routing_manager.cpp @@ -1428,37 +1428,6 @@ void RoutingManager::DiscoveredPrefixTable::FreeEntries(LinkedList &aEntr } } -const RoutingManager::DiscoveredPrefixTable::Entry *RoutingManager::DiscoveredPrefixTable::FindFavoredEntryToPublish( - const Ip6::Prefix &aPrefix) const -{ - // Finds the favored entry matching a given `aPrefix` in the table - // to publish in the Network Data. We can have multiple entries - // in the table matching the same `aPrefix` from different - // routers and potentially with different preference values. We - // select the one with the highest preference as the favored - // entry to publish. - - const Entry *favoredEntry = nullptr; - - for (const Router &router : mRouters) - { - for (const Entry &entry : router.mEntries) - { - if (entry.GetPrefix() != aPrefix) - { - continue; - } - - if ((favoredEntry == nullptr) || (entry.GetPreference() > favoredEntry->GetPreference())) - { - favoredEntry = &entry; - } - } - } - - return favoredEntry; -} - void RoutingManager::DiscoveredPrefixTable::HandleEntryTimer(void) { RemoveExpiredEntries(); } void RoutingManager::DiscoveredPrefixTable::RemoveExpiredEntries(void) diff --git a/src/core/border_router/routing_manager.hpp b/src/core/border_router/routing_manager.hpp index 6401f8e74..37acf82a8 100644 --- a/src/core/border_router/routing_manager.hpp +++ b/src/core/border_router/routing_manager.hpp @@ -885,22 +885,21 @@ private: void SetInitTime(void) { mData32 = TimerMilli::GetNow().GetValue(); } }; - void ProcessRaHeader(const RouterAdvert::Header &aRaHeader, Router &aRouter); - void ProcessPrefixInfoOption(const PrefixInfoOption &aPio, Router &aRouter); - void ProcessRouteInfoOption(const RouteInfoOption &aRio, Router &aRouter); - void ProcessRaFlagsExtOption(const RaFlagsExtOption &aFlagsOption, Router &aRouter); - bool Contains(const Entry::Checker &aChecker) const; - void RemovePrefix(const Entry::Matcher &aMatcher); - void RemoveOrDeprecateEntriesFromInactiveRouters(void); - void RemoveRoutersWithNoEntriesOrFlags(void); - void FreeRouters(LinkedList &aRouters); - void FreeEntries(LinkedList &aEntries); - void UpdateNetworkDataOnChangeTo(Entry &aEntry); - const Entry *FindFavoredEntryToPublish(const Ip6::Prefix &aPrefix) const; - void RemoveExpiredEntries(void); - void SignalTableChanged(void); - void UpdateRouterOnRx(Router &aRouter); - void SendNeighborSolicitToRouter(const Router &aRouter); + void ProcessRaHeader(const RouterAdvert::Header &aRaHeader, Router &aRouter); + void ProcessPrefixInfoOption(const PrefixInfoOption &aPio, Router &aRouter); + void ProcessRouteInfoOption(const RouteInfoOption &aRio, Router &aRouter); + void ProcessRaFlagsExtOption(const RaFlagsExtOption &aFlagsOption, Router &aRouter); + bool Contains(const Entry::Checker &aChecker) const; + void RemovePrefix(const Entry::Matcher &aMatcher); + void RemoveOrDeprecateEntriesFromInactiveRouters(void); + void RemoveRoutersWithNoEntriesOrFlags(void); + void FreeRouters(LinkedList &aRouters); + void FreeEntries(LinkedList &aEntries); + void UpdateNetworkDataOnChangeTo(Entry &aEntry); + void RemoveExpiredEntries(void); + void SignalTableChanged(void); + void UpdateRouterOnRx(Router &aRouter); + void SendNeighborSolicitToRouter(const Router &aRouter); #if OPENTHREAD_CONFIG_BORDER_ROUTING_USE_HEAP_ENABLE Router *AllocateRouter(void) { return Router::Allocate(); } Entry *AllocateEntry(void) { return Entry::Allocate(); }