30 #include <ndn-cxx/util/concepts.hpp> 37 const unique_ptr<Entry> Fib::s_emptyEntry = make_unique<Entry>(Name());
46 : m_nameTree(nameTree)
52 Fib::findLongestPrefixMatchImpl(
const K& key)
const 64 return this->findLongestPrefixMatchImpl(prefix);
70 return this->findLongestPrefixMatchImpl(pitEntry);
76 return this->findLongestPrefixMatchImpl(measurementsEntry);
89 std::pair<Entry*, bool>
94 if (entry !=
nullptr) {
95 return {entry,
false};
106 BOOST_ASSERT(nte !=
nullptr);
110 m_nameTree.eraseIfEmpty(nte);
119 if (nte !=
nullptr) {
128 if (nte ==
nullptr) {
129 BOOST_ASSERT(&entry == s_emptyEntry.get());
136 Fib::eraseIfEmpty(
Entry& entry)
140 this->
erase(nte,
false);
148 this->eraseIfEmpty(entry);
155 this->eraseIfEmpty(entry);
159 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)
Remove all NextHop records for face.
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
uint64_t EndpointId
identifies an endpoint on the link
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...
void setFibEntry(unique_ptr< fib::Entry > fibEntry)
void removeNextHop(Entry &entry, const Face &face, EndpointId endpointId)
Remove the NextHop record for the given face and endpointId.
An entry in the name tree.
boost::range_iterator< Range >::type const_iterator
const Entry & findLongestPrefixMatch(const Name &prefix) const
Performs a longest prefix match.
void removeNextHop(const Face &face, EndpointId endpointId)
removes the NextHop record for face with the given endpointId
a functor to get a table entry from a name tree entry
static bool nteHasFibEntry(const name_tree::Entry &nte)