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 std::make_pair(entry,
false);
107 BOOST_ASSERT(nte !=
nullptr);
120 if (nte !=
nullptr) {
129 if (nte ==
nullptr) {
130 BOOST_ASSERT(&entry == s_emptyEntry.get());
143 this->
erase(nte,
false);
148 Fib::getRange()
const std::pair< Entry *, bool > insert(const Name &prefix)
find or insert a FIB entry
Entry * findExactMatch(const Name &prefix)
performs an exact match lookup
void erase(const Name &prefix)
generalization of a network interface
fib::Entry * getFibEntry() const
const Entry & findLongestPrefixMatch(const Name &prefix) const
performs a longest prefix match
Entry & lookup(const Name &name, size_t prefixLen)
find or insert an entry by name
Entry * findLongestPrefixMatch(const Name &name, const EntrySelector &entrySelector=AnyEntry()) const
longest prefix matching
represents a Measurements entry
void removeNextHop(const Face &face)
removes a NextHop record
NDN_CXX_ASSERT_FORWARD_ITERATOR(Fib::const_iterator)
Copyright (c) 2011-2015 Regents of the University of California.
Entry * getEntry(const EntryT &tableEntry) const
Represents an absolute name.
boost::range_iterator< Range >::type const_iterator
Range fullEnumerate(const EntrySelector &entrySelector=AnyEntry()) const
enumerate all entries
void removeNextHop(Entry &entry, const Face &face)
removes the NextHop record for face
size_t eraseIfEmpty(Entry *entry, bool canEraseAncestors=true)
delete the entry if it is empty
a common index structure for FIB, PIT, StrategyChoice, and Measurements
Entry * findExactMatch(const Name &name, size_t prefixLen=std::numeric_limits< size_t >::max()) const
exact match lookup
a functor to get a table entry from a name tree entry
static bool nteHasFibEntry(const name_tree::Entry &nte)
boost::transformed_range< name_tree::GetTableEntry< Entry >, const name_tree::Range > Range
void setFibEntry(unique_ptr< fib::Entry > fibEntry)
an entry in the name tree