35 m_nexthopList.
clear();
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();
48 auto iterator = std::find(m_rteList.begin(), m_rteList.end(), entryPtr);
50 if (iterator != m_rteList.end()) {
51 (*iterator)->decrementUseCount();
54 m_rteList.erase(iterator);
60 return entryPtr->getUseCount();
66 auto iterator = std::find(m_rteList.begin(), m_rteList.end(), entryPtr);
69 if (iterator == m_rteList.end()) {
71 entryPtr->incrementUseCount();
72 m_rteList.push_back(entryPtr);
96 for (
const auto& entryPtr : entry.
getRteList()) {
97 os <<
" Destination: " << entryPtr->getDestination() <<
"\n";
98 os << entryPtr->getNexthopList();
uint64_t removeRoutingTableEntry(std::shared_ptr< RoutingTablePoolEntry > rtpePtr)
Removes a routing entry from this NPT entry.
const std::list< std::shared_ptr< RoutingTablePoolEntry > > & getRteList() const
void generateNhlfromRteList()
Collect all next-hops that are advertised by this entry's routing entries.
void addRoutingTableEntry(std::shared_ptr< RoutingTablePoolEntry > rtpePtr)
Adds a routing entry to this NPT entry.
const ndn::Name & getNamePrefix() const
void addNextHop(const NextHop &nh)
Adds a next hop to the list.
Copyright (c) 2014-2018, The University of Memphis, Regents of the University of California.
#define INIT_LOGGER(name)
#define NLSR_LOG_ERROR(x)
Copyright (c) 2014-2020, The University of Memphis, Regents of the University of California.
std::ostream & operator<<(std::ostream &os, const Adjacent &adjacent)
bool operator==(const NamePrefixTableEntry &lhs, const NamePrefixTableEntry &rhs)