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

represents the Interest Table More...

#include <pit.hpp>

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

Classes

class  const_iterator
 

Public Member Functions

 Pit (NameTree &nameTree)
 
size_t size () const
 
shared_ptr< pit::Entryfind (const Interest &interest) const
 finds a PIT entry for Interest More...
 
std::pair< shared_ptr< pit::Entry >, bool > insert (const Interest &interest)
 inserts a PIT entry for Interest More...
 
pit::DataMatchResult findAllDataMatches (const Data &data) const
 performs a Data match More...
 
void erase (shared_ptr< pit::Entry > pitEntry)
 erases a PIT Entry More...
 
const_iterator begin () const
 returns an iterator pointing to the first PIT entry More...
 
const_iterator end () const
 returns an iterator referring to the past-the-end PIT entry More...
 

Detailed Description

represents the Interest Table

Definition at line 48 of file pit.hpp.

Constructor & Destructor Documentation

§ Pit()

nfd::Pit::Pit ( NameTree nameTree)
explicit

Member Function Documentation

§ size()

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

Definition at line 160 of file pit.hpp.

Referenced by nfd::ForwarderStatusManager::ForwarderStatusManager(), and nfd::Pit::const_iterator::operator++().

§ find()

shared_ptr< pit::Entry > nfd::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 166 of file pit.hpp.

Referenced by nfd::Forwarder::startProcessNack().

§ insert()

std::pair< shared_ptr< pit::Entry >, bool > nfd::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 172 of file pit.hpp.

Referenced by nfd::Forwarder::startProcessNack().

§ findAllDataMatches()

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

performs a Data match

Returns
an iterable of all PIT entries matching data

Definition at line 97 of file pit.cpp.

References nfd::NameTree::findAllMatches(), and ndn::Data::getName().

Referenced by nfd::Forwarder::startProcessNack().

§ erase()

void nfd::Pit::erase ( shared_ptr< pit::Entry pitEntry)

erases a PIT Entry

Definition at line 114 of file pit.cpp.

References nfd::NameTree::eraseEntryIfEmpty().

Referenced by nfd::Forwarder::startProcessNack().

§ begin()

Pit::const_iterator nfd::Pit::begin ( ) const

returns an iterator pointing to the first PIT entry

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

Definition at line 126 of file pit.cpp.

References nfd::NameTree::fullEnumerate().

§ end()

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

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

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

Definition at line 178 of file pit.hpp.


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