NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: 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-records and out-records for face. More...
const_iterator begin () const
const_iterator end () const

Detailed Description

Represents the Interest Table.

Definition at line 47 of file pit.hpp.

Member Typedef Documentation

◆ const_iterator

Definition at line 102 of file pit.hpp.

Constructor & Destructor Documentation

◆ Pit()

nfd::pit::Pit::Pit ( NameTree nameTree)

Definition at line 37 of file pit.cpp.

Member Function Documentation

◆ size()

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

Definition at line 56 of file pit.hpp.

◆ find()

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

Finds a PIT entry for interest.

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

Definition at line 66 of file pit.hpp.

◆ insert()

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

Inserts a PIT entry for interest.

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

Definition at line 77 of file pit.hpp.

◆ findAllDataMatches()

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

Performs a Data match.

an iterable of all PIT entries matching data

Definition at line 86 of file pit.cpp.

References nfd::name_tree::NameTree::findAllMatches(), ndn::Data::getName(), nfd::name_tree::Entry::getPitEntries(), and nfd::pit::nteHasPitEntries().

◆ erase()

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

Deletes an entry.

Definition at line 91 of file pit.hpp.

◆ deleteInOutRecords()

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

Deletes in-records and out-records for face.

Definition at line 115 of file pit.cpp.

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

Referenced by nfd::cleanupOnFaceRemoval().

◆ begin()

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

Definition at line 126 of file pit.cpp.

References nfd::name_tree::NameTree::fullEnumerate(), and nfd::pit::nteHasPitEntries().

◆ end()

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

Definition at line 116 of file pit.hpp.

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