NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
nfd::Fib Class Reference

represents the FIB More...

#include <fib.hpp>

Inheritance diagram for nfd::Fib:
Collaboration diagram for nfd::Fib:

Classes

class  const_iterator
 

Public Member Functions

 Fib (NameTree &nameTree)
 
 ~Fib ()
 
size_t size () const
 
shared_ptr< fib::EntryfindLongestPrefixMatch (const Name &prefix) const
 performs a longest prefix match More...
 
shared_ptr< fib::EntryfindLongestPrefixMatch (const pit::Entry &pitEntry) const
 performs a longest prefix match More...
 
shared_ptr< fib::EntryfindLongestPrefixMatch (const measurements::Entry &measurementsEntry) const
 performs a longest prefix match More...
 
shared_ptr< fib::EntryfindExactMatch (const Name &prefix) const
 
std::pair< shared_ptr< fib::Entry >, bool > insert (const Name &prefix)
 inserts a FIB entry for prefix If an entry for exact same prefix exists, that entry is returned. More...
 
void erase (const Name &prefix)
 
void erase (const fib::Entry &entry)
 
void removeNextHopFromAllEntries (shared_ptr< Face > face)
 removes the NextHop record for face in all entrites More...
 
const_iterator begin () const
 returns an iterator pointing to the first FIB entry More...
 
const_iterator end () const
 returns an iterator referring to the past-the-end FIB entry More...
 

Detailed Description

represents the FIB

Definition at line 44 of file fib.hpp.

Constructor & Destructor Documentation

§ Fib()

nfd::Fib::Fib ( NameTree nameTree)
explicit

Definition at line 49 of file fib.cpp.

§ ~Fib()

nfd::Fib::~Fib ( )

Definition at line 55 of file fib.cpp.

Member Function Documentation

§ size()

size_t nfd::Fib::size ( ) const
inline

Definition at line 166 of file fib.hpp.

Referenced by nfd::ForwarderStatusManager::ForwarderStatusManager().

§ findLongestPrefixMatch() [1/3]

shared_ptr< fib::Entry > nfd::Fib::findLongestPrefixMatch ( const Name prefix) const

performs a longest prefix match

Definition at line 66 of file fib.cpp.

References nfd::NameTree::findLongestPrefixMatch(), and nfd::predicate_NameTreeEntry_hasFibEntry().

Referenced by findLongestPrefixMatch(), and nfd::Forwarder::startProcessNack().

§ findLongestPrefixMatch() [2/3]

shared_ptr< fib::Entry > nfd::Fib::findLongestPrefixMatch ( const pit::Entry pitEntry) const

performs a longest prefix match

Definition at line 91 of file fib.cpp.

References findLongestPrefixMatch(), and nfd::NameTree::findLongestPrefixMatch().

§ findLongestPrefixMatch() [3/3]

shared_ptr< fib::Entry > nfd::Fib::findLongestPrefixMatch ( const measurements::Entry measurementsEntry) const

performs a longest prefix match

Definition at line 99 of file fib.cpp.

References findLongestPrefixMatch(), and nfd::NameTree::get().

§ findExactMatch()

shared_ptr< fib::Entry > nfd::Fib::findExactMatch ( const Name prefix) const

Definition at line 109 of file fib.cpp.

References nfd::NameTree::findExactMatch().

Referenced by nfd::FibManager::FibManager().

§ insert()

std::pair< shared_ptr< fib::Entry >, bool > nfd::Fib::insert ( const Name prefix)

inserts a FIB entry for prefix If an entry for exact same prefix exists, that entry is returned.

Returns
{ the entry, and true for new entry, false for existing entry }

Definition at line 118 of file fib.cpp.

References erase(), nfd::NameTree::eraseEntryIfEmpty(), and nfd::NameTree::lookup().

Referenced by nfd::FibManager::FibManager().

§ erase() [1/2]

void nfd::Fib::erase ( const Name prefix)

§ erase() [2/2]

void nfd::Fib::erase ( const fib::Entry entry)

Definition at line 148 of file fib.cpp.

References erase(), and nfd::NameTree::get().

§ removeNextHopFromAllEntries()

void nfd::Fib::removeNextHopFromAllEntries ( shared_ptr< Face >  face)

removes the NextHop record for face in all entrites

This is usually invoked when face goes away. Removing the last NextHop in a FIB entry will erase the FIB entry.

Todo:
change parameter type to Face&

Definition at line 157 of file fib.cpp.

References erase(), nfd::NameTree::fullEnumerate(), and nfd::predicate_NameTreeEntry_hasFibEntry().

Referenced by nfd::FaceTable::addReserved().

§ begin()

Fib::const_iterator nfd::Fib::begin ( ) const

returns an iterator pointing to the first FIB entry

Note
Iteration order is implementation-specific and is undefined
The returned iterator may get invalidated if FIB or another NameTree-based table is modified

Definition at line 178 of file fib.cpp.

References nfd::NameTree::fullEnumerate(), and nfd::predicate_NameTreeEntry_hasFibEntry().

§ end()

Fib::const_iterator nfd::Fib::end ( ) const
inline

returns an iterator referring to the past-the-end FIB entry

Note
The returned iterator may get invalidated if FIB or another NameTree-based table is modified

Definition at line 172 of file fib.hpp.


The documentation for this class was generated from the following files: