|
NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
|
API Documentation
|
Go to the documentation of this file.
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);
119 if (nte !=
nullptr) {
128 if (nte ==
nullptr) {
129 BOOST_ASSERT(&entry == s_emptyEntry.get());
138 NextHopList::iterator it;
140 std::tie(it, isNew) = entry.addOrUpdateNextHop(face, cost);
149 bool isRemoved = entry.removeNextHop(face);
156 this->
erase(nte,
false);
165 Fib::getRange()
const
An entry in the name tree.
const Entry & findLongestPrefixMatch(const Name &prefix) const
Performs a longest prefix match.
Entry * getEntry(const EntryT &tableEntry) const
void erase(const Name &prefix)
Range fullEnumerate(const EntrySelector &entrySelector=AnyEntry()) const
Enumerate all entries.
A common index structure for FIB, PIT, StrategyChoice, and Measurements.
boost::transformed_range< name_tree::GetTableEntry< Entry >, const name_tree::Range > Range
NDN_CXX_ASSERT_FORWARD_ITERATOR(Fib::const_iterator)
size_t eraseIfEmpty(Entry *entry, bool canEraseAncestors=true)
Delete the entry if it is empty.
void addOrUpdateNextHop(Entry &entry, Face &face, uint64_t cost)
Add a NextHop record.
std::pair< Entry *, bool > insert(const Name &prefix)
Find or insert a FIB entry.
Entry & lookup(const Name &name, size_t prefixLen)
Find or insert an entry by name.
@ NO_SUCH_NEXTHOP
the nexthop is not found
Entry * findExactMatch(const Name &name, size_t prefixLen=std::numeric_limits< size_t >::max()) const
Exact match lookup.
Represents an absolute name.
Copyright (c) 2011-2015 Regents of the University of California.
Entry * findExactMatch(const Name &prefix)
Performs an exact match lookup.
generalization of a network interface
@ NEXTHOP_REMOVED
the nexthop is removed and the fib entry stays
static bool nteHasFibEntry(const name_tree::Entry &nte)
void setFibEntry(unique_ptr< fib::Entry > fibEntry)
@ FIB_ENTRY_REMOVED
the nexthop is removed and the fib entry is removed
Represents a Measurements entry.
signal::Signal< Fib, Name, NextHop > afterNewNextHop
signals on Fib entry nexthop creation
RemoveNextHopResult removeNextHop(Entry &entry, const Face &face)
Remove the NextHop record for face from entry.
boost::range_iterator< Range >::type const_iterator
Entry * findLongestPrefixMatch(const Name &name, const EntrySelector &entrySelector=AnyEntry()) const
Longest prefix matching.
fib::Entry * getFibEntry() const
a functor to get a table entry from a name tree entry
const Name & getPrefix() const