30 #include <boost/concept/assert.hpp> 31 #include <boost/concept_check.hpp> 32 #include <type_traits> 37 const unique_ptr<Entry> Fib::s_emptyEntry = make_unique<Entry>(
Name());
40 BOOST_CONCEPT_ASSERT((boost::ForwardIterator<Fib::const_iterator>));
43 #ifdef HAVE_IS_DEFAULT_CONSTRUCTIBLE 44 static_assert(std::is_default_constructible<Fib::const_iterator>::value,
45 "Fib::const_iterator must be default-constructible");
47 BOOST_CONCEPT_ASSERT((boost::DefaultConstructible<Fib::const_iterator>));
48 #endif // HAVE_IS_DEFAULT_CONSTRUCTIBLE 57 : m_nameTree(nameTree)
64 Fib::findLongestPrefixMatchImpl(
const K& key)
const 76 return this->findLongestPrefixMatchImpl(prefix);
82 return this->findLongestPrefixMatchImpl(pitEntry);
88 return this->findLongestPrefixMatchImpl(measurementsEntry);
101 std::pair<Entry*, bool>
106 if (entry !=
nullptr) {
107 return std::make_pair(entry,
false);
118 BOOST_ASSERT(nte !=
nullptr);
131 if (nte !=
nullptr) {
140 if (nte ==
nullptr) {
141 BOOST_ASSERT(&entry == s_emptyEntry.get());
154 this->
erase(nte,
false);
159 Fib::getRange()
const std::pair< Entry *, bool > insert(const Name &prefix)
inserts a FIB entry for prefix
Entry * findExactMatch(const Name &prefix)
performs an exact match lookup
void erase(const Name &prefix)
generalization of a network interface
Entry * findExactMatch(const Name &name) const
exact match lookup
fib::Entry * getFibEntry() const
const Entry & findLongestPrefixMatch(const Name &prefix) const
performs a longest prefix match
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
Copyright (c) 2011-2015 Regents of the University of California.
Entry & lookup(const Name &name)
find or insert an entry with specified name
Name abstraction to represent an absolute name.
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 * getEntry(const ENTRY &tableEntry) const
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