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

main class of NFD More...

#include <forwarder.hpp>

Collaboration diagram for nfd::Forwarder:

Public Member Functions

 Forwarder ()
 
 ~Forwarder ()
 
const ForwarderCountersgetCounters () const
 
FaceTablegetFaceTable ()
 
FacegetFace (FaceId id) const
 get existing Face More...
 
void addFace (shared_ptr< Face > face)
 add new Face More...
 
fw::UnsolicitedDataPolicygetUnsolicitedDataPolicy () const
 
void setUnsolicitedDataPolicy (unique_ptr< fw::UnsolicitedDataPolicy > policy)
 
void startProcessInterest (Face &face, const Interest &interest)
 start incoming Interest processing More...
 
void startProcessData (Face &face, const Data &data)
 start incoming Data processing More...
 
void startProcessNack (Face &face, const lp::Nack &nack)
 start incoming Nack processing More...
 
NameTreegetNameTree ()
 
FibgetFib ()
 
PitgetPit ()
 
CsgetCs ()
 
MeasurementsgetMeasurements ()
 
StrategyChoicegetStrategyChoice ()
 
DeadNonceListgetDeadNonceList ()
 
NetworkRegionTablegetNetworkRegionTable ()
 
void setCsFromNdnSim (ns3::Ptr< ns3::ndn::ContentStore > cs)
 

Public Attributes

signal::Signal< Forwarder, pit::Entry, Face, DatabeforeSatisfyInterest
 trigger before PIT entry is satisfied More...
 
signal::Signal< Forwarder, pit::EntrybeforeExpirePendingInterest
 trigger before PIT entry expires More...
 

Friends

class fw::Strategy
 

Detailed Description

main class of NFD

Forwarder owns all faces and tables, and implements forwarding pipelines.

Definition at line 54 of file forwarder.hpp.

Constructor & Destructor Documentation

◆ Forwarder()

◆ ~Forwarder()

nfd::Forwarder::~Forwarder ( )
default

Referenced by Forwarder().

Member Function Documentation

◆ getCounters()

const ForwarderCounters& nfd::Forwarder::getCounters ( ) const
inline

Definition at line 63 of file forwarder.hpp.

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

◆ getFaceTable()

FaceTable& nfd::Forwarder::getFaceTable ( )
inline

Definition at line 70 of file forwarder.hpp.

Referenced by Forwarder(), and nfd::fw::Strategy::getFaceTable().

◆ getFace()

Face* nfd::Forwarder::getFace ( FaceId  id) const
inline

get existing Face

shortcut to .getFaceTable().get(face)

Definition at line 80 of file forwarder.hpp.

Referenced by nfd::fw::Strategy::getFace().

◆ addFace()

void nfd::Forwarder::addFace ( shared_ptr< Face face)
inline

add new Face

shortcut to .getFaceTable().add(face)

Definition at line 90 of file forwarder.hpp.

◆ getUnsolicitedDataPolicy()

fw::UnsolicitedDataPolicy& nfd::Forwarder::getUnsolicitedDataPolicy ( ) const
inline

Definition at line 96 of file forwarder.hpp.

◆ setUnsolicitedDataPolicy()

void nfd::Forwarder::setUnsolicitedDataPolicy ( unique_ptr< fw::UnsolicitedDataPolicy policy)
inline

Definition at line 102 of file forwarder.hpp.

Referenced by nfd::TablesConfigSection::ensureConfigured().

◆ startProcessInterest()

void nfd::Forwarder::startProcessInterest ( Face face,
const Interest interest 
)

start incoming Interest processing

Parameters
faceface on which Interest is received
interestthe incoming Interest, must be created with make_shared

Definition at line 73 of file forwarder.cpp.

References nfd::face::Face::getId(), ndn::Interest::getLink(), ndn::Interest::getName(), ndn::Interest::hasLink(), and NFD_LOG_DEBUG.

Referenced by Forwarder().

◆ startProcessData()

void nfd::Forwarder::startProcessData ( Face face,
const Data data 
)

start incoming Data processing

Parameters
faceface on which Data is received
datathe incoming Data, must be created with make_shared

Definition at line 92 of file forwarder.cpp.

Referenced by Forwarder().

◆ startProcessNack()

void nfd::Forwarder::startProcessNack ( Face face,
const lp::Nack nack 
)

start incoming Nack processing

Parameters
faceface on which Nack is received
nackthe incoming Nack, must be created with make_shared

Definition at line 101 of file forwarder.cpp.

References nfd::fw::Strategy::afterReceiveInterest(), nfd::fw::Strategy::afterReceiveNack(), nfd::fw::Strategy::beforeExpirePendingInterest(), beforeExpirePendingInterest, nfd::fw::Strategy::beforeSatisfyInterest(), beforeSatisfyInterest, nfd::fw::CACHE, nfd::fw::DUPLICATE_NONCE_NONE, nfd::pit::Pit::erase(), ndn::nfd::FACE_SCOPE_NON_LOCAL, nfd::face::FACEID_CONTENT_STORE, nfd::pit::Pit::find(), nfd::cs::Cs::find(), nfd::pit::Pit::findAllDataMatches(), nfd::fw::findDuplicateNonce(), nfd::FaceTable::get(), ndn::Data::getFreshnessPeriod(), nfd::face::Face::getId(), ndn::lp::Nack::getInterest(), ndn::Interest::getLink(), nfd::face::Face::getLinkType(), ndn::Data::getName(), ndn::Interest::getName(), ndn::Interest::getNonce(), ndn::lp::NackHeader::getReason(), ndn::lp::Nack::getReason(), nfd::face::Face::getScope(), ndn::TagHost::getTag(), nfd::DeadNonceList::has(), ndn::Interest::hasLink(), nfd::fw::hasPendingOutRecords(), nfd::cs::Cs::insert(), nfd::pit::Pit::insert(), nfd::face::INVALID_FACEID, ndn::Name::isPrefixOf(), ndn::nfd::LINK_TYPE_MULTI_ACCESS, nfd::scope_prefix::LOCALHOST, NFD_LOG_DEBUG, NFD_LOG_ERROR, NFD_LOG_WARN, nfd::ForwarderCounters::nInData, nfd::ForwarderCounters::nInInterests, nfd::ForwarderCounters::nInNacks, nfd::ForwarderCounters::nOutData, nfd::ForwarderCounters::nOutInterests, nfd::ForwarderCounters::nOutNacks, ndn::time::steady_clock::now(), nfd::face::Face::sendData(), nfd::face::Face::sendInterest(), nfd::face::Face::sendNack(), ndn::lp::Nack::setHeader(), and ndn::TagHost::setTag().

Referenced by Forwarder().

◆ getNameTree()

NameTree& nfd::Forwarder::getNameTree ( )
inline

Definition at line 131 of file forwarder.hpp.

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

◆ getFib()

Fib& nfd::Forwarder::getFib ( )
inline

◆ getPit()

Pit& nfd::Forwarder::getPit ( )
inline

Definition at line 143 of file forwarder.hpp.

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

◆ getCs()

Cs& nfd::Forwarder::getCs ( )
inline

◆ getMeasurements()

Measurements& nfd::Forwarder::getMeasurements ( )
inline

Definition at line 155 of file forwarder.hpp.

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

◆ getStrategyChoice()

StrategyChoice& nfd::Forwarder::getStrategyChoice ( )
inline

◆ getDeadNonceList()

DeadNonceList& nfd::Forwarder::getDeadNonceList ( )
inline

Definition at line 167 of file forwarder.hpp.

◆ getNetworkRegionTable()

NetworkRegionTable& nfd::Forwarder::getNetworkRegionTable ( )
inline

◆ setCsFromNdnSim()

void nfd::Forwarder::setCsFromNdnSim ( ns3::Ptr< ns3::ndn::ContentStore cs)
inline

Definition at line 180 of file forwarder.hpp.

Friends And Related Function Documentation

◆ fw::Strategy

friend class fw::Strategy
friend

Definition at line 318 of file forwarder.hpp.

Member Data Documentation

◆ beforeSatisfyInterest

signal::Signal<Forwarder, pit::Entry, Face, Data> nfd::Forwarder::beforeSatisfyInterest

trigger before PIT entry is satisfied

See also
Strategy::beforeSatisfyInterest

Definition at line 189 of file forwarder.hpp.

Referenced by startProcessNack().

◆ beforeExpirePendingInterest

signal::Signal<Forwarder, pit::Entry> nfd::Forwarder::beforeExpirePendingInterest

trigger before PIT entry expires

See also
Strategy::beforeExpirePendingInterest

Definition at line 194 of file forwarder.hpp.

Referenced by startProcessNack().


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