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

represents the Interest Table More...

#include <pit.hpp>

Inheritance diagram for nfd::pit::Pit:
Collaboration diagram for nfd::pit::Pit:

Public Types

typedef Iterator const_iterator
 

Public Member Functions

 Pit (NameTree &nameTree)
 
size_t size () const
 
shared_ptr< Entryfind (const Interest &interest) const
 finds a PIT entry for Interest More...
 
std::pair< shared_ptr< Entry >, bool > insert (const Interest &interest)
 inserts a PIT entry for Interest More...
 
DataMatchResult findAllDataMatches (const Data &data) const
 performs a Data match More...
 
void erase (Entry *entry)
 deletes an entry More...
 
void deleteInOutRecords (Entry *entry, const Face &face)
 deletes in-record and out-record for face More...
 
const_iterator begin () const
 
const_iterator end () const
 

Detailed Description

represents the Interest Table

Definition at line 46 of file pit.hpp.

Member Typedef Documentation

Definition at line 101 of file pit.hpp.

Constructor & Destructor Documentation

Member Function Documentation

size_t nfd::pit::Pit::size ( ) const
inline
Returns
number of entries

Definition at line 55 of file pit.hpp.

shared_ptr<Entry> nfd::pit::Pit::find ( const Interest interest) const
inline

finds a PIT entry for Interest

Parameters
interestthe Interest
Returns
an existing entry with same Name and Selectors; otherwise nullptr

Definition at line 65 of file pit.hpp.

std::pair<shared_ptr<Entry>, bool> nfd::pit::Pit::insert ( const Interest interest)
inline

inserts a PIT entry for Interest

Parameters
interestthe Interest; must be created with make_shared
Returns
a new or existing entry with same Name and Selectors, and true for new entry, false for existing entry

Definition at line 76 of file pit.hpp.

References findAllDataMatches().

DataMatchResult nfd::pit::Pit::findAllDataMatches ( const Data data) const

performs a Data match

Returns
an iterable of all PIT entries matching data

Definition at line 88 of file pit.cpp.

References erase(), nfd::name_tree::Entry::erasePitEntry(), ndn::Data::getName(), and nfd::pit::nteHasPitEntries().

Referenced by insert().

void nfd::pit::Pit::erase ( Entry entry)
inline

deletes an entry

Definition at line 90 of file pit.hpp.

References deleteInOutRecords(), and Face.

Referenced by end(), and findAllDataMatches().

void nfd::pit::Pit::deleteInOutRecords ( Entry entry,
const Face face 
)

deletes in-record and out-record for face

Definition at line 117 of file pit.cpp.

References nfd::pit::Entry::deleteInRecord(), and nfd::pit::Entry::deleteOutRecord().

Referenced by erase().

Pit::const_iterator nfd::pit::Pit::begin ( ) const
Returns
an iterator to the beginning
Note
Iteration order is implementation-defined.
Warning
Undefined behavior may occur if a FIB/PIT/Measurements/StrategyChoice entry is inserted or erased during enumeration.

Definition at line 128 of file pit.cpp.

References nfd::pit::nteHasPitEntries().

const_iterator nfd::pit::Pit::end ( ) const
inline
Returns
an iterator to the end
See also
begin()

Definition at line 115 of file pit.hpp.

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


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