22 #ifndef NLSR_NAME_PREFIX_TABLE_HPP
23 #define NLSR_NAME_PREFIX_TABLE_HPP
33 #include <unordered_map>
41 std::unordered_map<ndn::Name, std::shared_ptr<RoutingTablePoolEntry>>;
42 using NptEntryList = std::list<std::shared_ptr<NamePrefixTableEntry>>;
59 const std::list<ndn::Name>& namesToAdd,
60 const std::list<ndn::Name>& namesToRemove);
76 addEntry(
const ndn::Name& name,
const ndn::Name& destRouter);
90 removeEntry(
const ndn::Name& name,
const ndn::Name& destRouter);
112 std::shared_ptr<RoutingTablePoolEntry>
141 const ndn::Name& m_ownRouterName;
144 ndn::signal::Connection m_afterRoutingChangeConnection;
145 ndn::signal::Connection m_afterLsdbModified;
151 return m_table.begin();
157 return m_table.end();
Maps names to lists of next hops, and exports this information to NFD.
ndn::signal::Signal< Lsdb, std::shared_ptr< Lsa >, LsdbUpdate, std::list< ndn::Name >, std::list< ndn::Name > > AfterLsdbModified
std::shared_ptr< RoutingTablePoolEntry > addRtpeToPool(RoutingTablePoolEntry &rtpe)
Adds a pool entry to the pool.
void removeEntry(const ndn::Name &name, const ndn::Name &destRouter)
Removes a destination from a name prefix table entry.
NptEntryList::const_iterator const_iterator
void updateWithNewRoute(const std::list< RoutingTableEntry > &entries)
Updates all routing information in the NPT.
std::list< std::shared_ptr< NamePrefixTableEntry > > NptEntryList
std::unordered_map< ndn::Name, std::shared_ptr< RoutingTablePoolEntry > > RoutingTableEntryPool
NamePrefixTable(const ndn::Name &ownRouterName, Fib &fib, RoutingTable &routingTable, AfterRoutingChange &afterRoutingChangeSignal, Lsdb::AfterLsdbModified &afterLsdbModifiedSignal)
void updateFromLsdb(std::shared_ptr< Lsa > lsa, LsdbUpdate updateType, const std::list< ndn::Name > &namesToAdd, const std::list< ndn::Name > &namesToRemove)
Add, update, or remove Names according to the Lsdb update.
const_iterator end() const
void addEntry(const ndn::Name &name, const ndn::Name &destRouter)
Adds a destination to the specified name prefix.
void deleteRtpeFromPool(std::shared_ptr< RoutingTablePoolEntry > rtpePtr)
Removes a pool entry from the pool.
const_iterator begin() const
Copyright (c) 2014-2020, The University of Memphis, Regents of the University of California.
std::ostream & operator<<(std::ostream &os, const Adjacent &adjacent)
ndn::signal::Signal< RoutingTable, std::list< RoutingTableEntry > > AfterRoutingChange
#define PUBLIC_WITH_TESTS_ELSE_PRIVATE