35 m_nexthopList.
reset();
36 for (
auto iterator = m_rteList.begin(); iterator != m_rteList.end(); ++iterator) {
37 for (
auto nhItr = (*iterator)->getNexthopList().getNextHops().begin();
38 nhItr != (*iterator)->getNexthopList().getNextHops().end();
49 auto iterator = std::find(m_rteList.begin(), m_rteList.end(), entryPtr);
51 if (iterator != m_rteList.end()) {
52 (*iterator)->decrementUseCount();
55 m_rteList.erase(iterator);
61 return entryPtr->getUseCount();
68 auto iterator = std::find(m_rteList.begin(), m_rteList.end(), entryPtr);
71 if (iterator == m_rteList.end()) {
73 entryPtr->incrementUseCount();
74 m_rteList.push_back(entryPtr);
85 for (
auto it = m_rteList.begin(); it != m_rteList.end(); ++it) {
88 (*it)->getNexthopList().writeLog();
110 for (
const std::shared_ptr<RoutingTablePoolEntry> entryPtr : entry.
getRteList()) {
111 os <<
"Destination: " << entryPtr->getDestination() <<
"\n";
const ndn::Name & getNamePrefix() const
void addRoutingTableEntry(std::shared_ptr< RoutingTablePoolEntry > rtpePtr)
Adds a routing entry to this NPT entry.
std::ostream & operator<<(std::ostream &os, const Adjacent &adjacent)
bool operator==(const NamePrefixTableEntry &lhs, const NamePrefixTableEntry &rhs)
const std::list< std::shared_ptr< RoutingTablePoolEntry > > & getRteList() const
#define NLSR_LOG_DEBUG(x)
Copyright (c) 2014-2017, The University of Memphis, Regents of the University of California.
#define INIT_LOGGER(name)
Copyright (c) 2014-2017, The University of Memphis, Regents of the University of California.
uint64_t removeRoutingTableEntry(std::shared_ptr< RoutingTablePoolEntry > rtpePtr)
Removes a routing entry from this NPT entry.
#define NLSR_LOG_ERROR(x)
Copyright (c) 2014-2017, The University of Memphis, Regents of the University of California, Arizona Board of Regents.
void addNextHop(const NextHop &nh)
Adds a next hop to the list.
void generateNhlfromRteList()
Collect all next-hops that are advertised by this entry's routing entries.