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);
122 m_nameTree.eraseIfEmpty(nte);
131 if (nte !=
nullptr) {
140 if (nte ==
nullptr) {
141 BOOST_ASSERT(&entry == s_emptyEntry.get());
154 this->
erase(nte,
false);
159 Fib::getRange()
const
Entry * findExactMatch(const Name &prefix)
performs an exact match lookup
void erase(const Name &prefix)
represents a Measurements entry
std::pair< Entry *, bool > insert(const Name &prefix)
inserts a FIB entry for prefix
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
void removeNextHop(Entry &entry, const Face &face)
removes the NextHop record for face
const Entry & findLongestPrefixMatch(const Name &prefix) const
performs a longest prefix match
void removeNextHop(const Face &face)
removes a NextHop record
a functor to get a table entry from a name tree entry
static bool nteHasFibEntry(const name_tree::Entry &nte)