NS-3 based Named Data Networking (NDN) simulator
ndnSIM: NDN, CCN, CCNx, content centric networks
API Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
ns3::ndn::Fib Class Referenceabstract

Class implementing FIB functionality. More...

#include <ndn-fib.h>

Inheritance diagram for ns3::ndn::Fib:
Collaboration diagram for ns3::ndn::Fib:

Public Member Functions

 Fib ()
 Default constructor.
 
virtual ~Fib ()
 Virtual destructor.
 
virtual Ptr< fib::EntryLongestPrefixMatch (const Interest &interest)=0
 Perform longest prefix match. More...
 
virtual Ptr< fib::EntryFind (const Name &prefix)=0
 Get FIB entry for the prefix (exact match) More...
 
virtual Ptr< fib::EntryAdd (const Name &prefix, Ptr< Face > face, int32_t metric)=0
 Add or update FIB entry. More...
 
virtual Ptr< fib::EntryAdd (const Ptr< const Name > &prefix, Ptr< Face > face, int32_t metric)=0
 Add or update FIB entry using smart pointer to prefix. More...
 
virtual void Remove (const Ptr< const Name > &prefix)=0
 Remove FIB entry. More...
 
virtual void InvalidateAll ()=0
 Invalidate all FIB entries.
 
virtual void RemoveFromAll (Ptr< Face > face)=0
 Remove all references to a face from FIB. More...
 
virtual void Print (std::ostream &os) const =0
 Print out entries in FIB.
 
virtual uint32_t GetSize () const =0
 Get number of entries in FIB.
 
virtual Ptr< const fib::EntryBegin () const =0
 Return first element of FIB (no order guaranteed)
 
virtual Ptr< fib::EntryBegin ()=0
 Return first element of FIB (no order guaranteed)
 
virtual Ptr< const fib::EntryEnd () const =0
 Return item next after last (no order guaranteed)
 
virtual Ptr< fib::EntryEnd ()=0
 Return item next after last (no order guaranteed)
 
virtual Ptr< const fib::EntryNext (Ptr< const fib::Entry >) const =0
 Advance the iterator.
 
virtual Ptr< fib::EntryNext (Ptr< fib::Entry >)=0
 Advance the iterator.
 

Static Public Member Functions

static TypeId GetTypeId ()
 Interface ID. More...
 
static Ptr< FibGetFib (Ptr< Object > node)
 Static call to cheat python bindings.
 

Detailed Description

Class implementing FIB functionality.

Doxygen introspection did not find any typical Config paths.
No Attributes are defined for this type.
No TraceSources are defined for this type.

Definition at line 44 of file ndn-fib.h.

Member Function Documentation

virtual Ptr<fib::Entry> ns3::ndn::Fib::Add ( const Name prefix,
Ptr< Face face,
int32_t  metric 
)
pure virtual

Add or update FIB entry.

If the entry exists, metric will be updated. Otherwise, new entry will be created

Parameters
namePrefix
faceForwarding face
metricRouting metric

Implemented in ns3::ndn::fib::FibImpl.

Referenced by ns3::ndn::StackHelper::AddRoute(), ns3::ndn::ApiFace::SetInterestFilter(), and ns3::ndn::Producer::StartApplication().

virtual Ptr<fib::Entry> ns3::ndn::Fib::Add ( const Ptr< const Name > &  prefix,
Ptr< Face face,
int32_t  metric 
)
pure virtual

Add or update FIB entry using smart pointer to prefix.

If the entry exists, metric will be updated. Otherwise, new entry will be created

Parameters
nameSmart pointer to prefix
faceForwarding face
metricRouting metric

Implemented in ns3::ndn::fib::FibImpl.

virtual Ptr<fib::Entry> ns3::ndn::Fib::Find ( const Name prefix)
pure virtual

Get FIB entry for the prefix (exact match)

Parameters
prefixName for FIB entry
Returns
If entry is found, a valid iterator (Ptr<fib::Entry>) will be returned. Otherwise End () (==0)

Implemented in ns3::ndn::fib::FibImpl.

TypeId ns3::ndn::Fib::GetTypeId ( void  )
static

Interface ID.

Returns
interface ID

Definition at line 30 of file ndn-fib.cc.

virtual Ptr<fib::Entry> ns3::ndn::Fib::LongestPrefixMatch ( const Interest interest)
pure virtual

Perform longest prefix match.

Todo:
Implement exclude filters
Parameters
interestInterest packet header
Returns
If entry found a valid iterator (Ptr<fib::Entry>) will be returned, otherwise End () (==0)

Implemented in ns3::ndn::fib::FibImpl.

virtual void ns3::ndn::Fib::Remove ( const Ptr< const Name > &  prefix)
pure virtual

Remove FIB entry.

! ATTENTION ! Use with caution. All PIT entries referencing the corresponding FIB entry will become invalid. So, simulation may crash.

Parameters
nameSmart pointer to prefix

Implemented in ns3::ndn::fib::FibImpl.

virtual void ns3::ndn::Fib::RemoveFromAll ( Ptr< Face face)
pure virtual

Remove all references to a face from FIB.

If for some enty that face was the only element, this FIB entry will be removed.

Implemented in ns3::ndn::fib::FibImpl.


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