30 #include <ndn-cxx/util/concepts.hpp> 37 const unique_ptr<Entry> Fib::s_emptyEntry = make_unique<Entry>(Name());
46 : m_nameTree(nameTree)
53 Fib::findLongestPrefixMatchImpl(
const K& key)
const 65 return this->findLongestPrefixMatchImpl(prefix);
71 return this->findLongestPrefixMatchImpl(pitEntry);
77 return this->findLongestPrefixMatchImpl(measurementsEntry);
90 std::pair<Entry*, bool>
95 if (entry !=
nullptr) {
96 return {entry,
false};
107 BOOST_ASSERT(nte !=
nullptr);
111 m_nameTree.eraseIfEmpty(nte);
120 if (nte !=
nullptr) {
129 if (nte ==
nullptr) {
130 BOOST_ASSERT(&entry == s_emptyEntry.get());
137 Fib::eraseIfEmpty(
Entry& entry)
141 this->
erase(nte,
false);
149 this->eraseIfEmpty(entry);
156 this->eraseIfEmpty(entry);
160 Fib::getRange()
const Entry * findExactMatch(const Name &prefix)
performs an exact match lookup
void erase(const Name &prefix)
represents a Measurements entry
void removeNextHopByFace(Entry &entry, const Face &face)
removes the NextHop record for face for any endpointId
std::pair< Entry *, bool > insert(const Name &prefix)
find or insert a FIB entry
void removeNextHopByFace(const Face &face)
removes all NextHop records on face for any endpointId
NDN_CXX_ASSERT_FORWARD_ITERATOR(Fib::const_iterator)
boost::transformed_range< name_tree::GetTableEntry< Entry >, const name_tree::Range > Range
fib::Entry * getFibEntry() const
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...
void setFibEntry(unique_ptr< fib::Entry > fibEntry)
an entry in the name tree
boost::range_iterator< Range >::type const_iterator
void removeNextHop(const Face &face, uint64_t endpointId)
removes the NextHop record for face with the given endpointId
const Entry & findLongestPrefixMatch(const Name &prefix) const
performs a longest prefix match
a functor to get a table entry from a name tree entry
static bool nteHasFibEntry(const name_tree::Entry &nte)
void removeNextHop(Entry &entry, const Face &face, uint64_t endpointId)
removes the NextHop record for face with a given endpointId