[routing-manager] remove unused method (#10142)

This commit is contained in:
Abtin Keshavarzian
2024-05-02 08:45:30 -07:00
committed by GitHub
parent 2b65a63ef3
commit 3517e6ce37
2 changed files with 15 additions and 47 deletions
@@ -1428,37 +1428,6 @@ void RoutingManager::DiscoveredPrefixTable::FreeEntries(LinkedList<Entry> &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)
+15 -16
View File
@@ -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<Router> &aRouters);
void FreeEntries(LinkedList<Entry> &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<Router> &aRouters);
void FreeEntries(LinkedList<Entry> &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(); }