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

Main class of NFD's forwarding engine. More...

#include <forwarder.hpp>

Collaboration diagram for nfd::Forwarder:

Public Member Functions

 Forwarder (FaceTable &faceTable)
 
NFD_VIRTUAL_WITH_TESTS ~Forwarder ()
 
const ForwarderCountersgetCounters () const
 
fw::UnsolicitedDataPolicygetUnsolicitedDataPolicy () const
 
void setUnsolicitedDataPolicy (unique_ptr< fw::UnsolicitedDataPolicy > policy)
 
NameTreegetNameTree ()
 
FibgetFib ()
 
PitgetPit ()
 
CsgetCs ()
 
MeasurementsgetMeasurements ()
 
StrategyChoicegetStrategyChoice ()
 
DeadNonceListgetDeadNonceList ()
 
NetworkRegionTablegetNetworkRegionTable ()
 
void setConfigFile (ConfigFile &configFile)
 register handler for forwarder section of NFD configuration file More...
 
NFD_VIRTUAL_WITH_TESTS void onInterestLoop (const Interest &interest, const FaceEndpoint &ingress)
 Interest loop pipeline. More...
 
NFD_VIRTUAL_WITH_TESTS void onContentStoreMiss (const Interest &interest, const FaceEndpoint &ingress, const shared_ptr< pit::Entry > &pitEntry)
 Content Store miss pipeline. More...
 
NFD_VIRTUAL_WITH_TESTS void onContentStoreHit (const Interest &interest, const FaceEndpoint &ingress, const shared_ptr< pit::Entry > &pitEntry, const Data &data)
 Content Store hit pipeline. More...
 
NFD_VIRTUAL_WITH_TESTS pit::OutRecordonOutgoingInterest (const Interest &interest, Face &egress, const shared_ptr< pit::Entry > &pitEntry)
 outgoing Interest pipeline More...
 
NFD_VIRTUAL_WITH_TESTS void onInterestFinalize (const shared_ptr< pit::Entry > &pitEntry)
 Interest finalize pipeline. More...
 
NFD_VIRTUAL_WITH_TESTS void onIncomingData (const Data &data, const FaceEndpoint &ingress)
 incoming Data pipeline More...
 
NFD_VIRTUAL_WITH_TESTS void onDataUnsolicited (const Data &data, const FaceEndpoint &ingress)
 Data unsolicited pipeline. More...
 
NFD_VIRTUAL_WITH_TESTS bool onOutgoingData (const Data &data, Face &egress)
 outgoing Data pipeline More...
 
NFD_VIRTUAL_WITH_TESTS void onIncomingNack (const lp::Nack &nack, const FaceEndpoint &ingress)
 incoming Nack pipeline More...
 
NFD_VIRTUAL_WITH_TESTS bool onOutgoingNack (const lp::NackHeader &nack, Face &egress, const shared_ptr< pit::Entry > &pitEntry)
 outgoing Nack pipeline More...
 
NFD_VIRTUAL_WITH_TESTS void onDroppedInterest (const Interest &interest, Face &egress)
 
NFD_VIRTUAL_WITH_TESTS void onNewNextHop (const Name &prefix, const fib::NextHop &nextHop)
 

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...
 
signal::Signal< Forwarder, Interest, DataafterCsHit
 Signals when the incoming interest pipeline gets a hit from the content store. More...
 
signal::Signal< Forwarder, InterestafterCsMiss
 Signals when the incoming interest pipeline gets a miss from the content store. More...
 
NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE __pad0__: NFD_VIRTUAL_WITH_TESTS void onIncomingInterest(const Interest& interest
 
NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE const FaceEndpointingress
 

Friends

class fw::Strategy
 

Detailed Description

Main class of NFD's forwarding engine.

The Forwarder class owns all tables and implements the forwarding pipelines.

Definition at line 53 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().

◆ getUnsolicitedDataPolicy()

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

Definition at line 69 of file forwarder.hpp.

◆ setUnsolicitedDataPolicy()

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

◆ getNameTree()

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

◆ getFib()

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

◆ getPit()

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

Definition at line 94 of file forwarder.hpp.

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

◆ getCs()

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

◆ getMeasurements()

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

Definition at line 106 of file forwarder.hpp.

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

◆ getStrategyChoice()

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

Definition at line 112 of file forwarder.hpp.

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

◆ getDeadNonceList()

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

Definition at line 118 of file forwarder.hpp.

◆ getNetworkRegionTable()

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

◆ setConfigFile()

void nfd::Forwarder::setConfigFile ( ConfigFile configFile)

register handler for forwarder section of NFD configuration file

Definition at line 621 of file forwarder.cpp.

References nfd::ConfigFile::addSectionHandler(), nfd::CFG_FORWARDER, and NDN_THROW.

◆ onInterestLoop()

void nfd::Forwarder::onInterestLoop ( const Interest interest,
const FaceEndpoint ingress 
)

Interest loop pipeline.

Definition at line 171 of file forwarder.cpp.

References nfd::FaceEndpoint::face, ndn::Interest::getName(), ndn::nfd::LINK_TYPE_POINT_TO_POINT, and NFD_LOG_DEBUG.

Referenced by Forwarder().

◆ onContentStoreMiss()

◆ onContentStoreHit()

◆ onOutgoingInterest()

pit::OutRecord * nfd::Forwarder::onOutgoingInterest ( const Interest interest,
Face egress,
const shared_ptr< pit::Entry > &  pitEntry 
)

outgoing Interest pipeline

Returns
A pointer to the out-record created or nullptr if the Interest was dropped

Definition at line 260 of file forwarder.cpp.

References ndn::nfd::FACE_SCOPE_NON_LOCAL, ndn::Interest::getHopLimit(), NFD_LOG_DEBUG, and nfd::ForwarderCounters::nOutInterests.

Referenced by onContentStoreMiss(), and nfd::fw::Strategy::sendInterest().

◆ onInterestFinalize()

void nfd::Forwarder::onInterestFinalize ( const shared_ptr< pit::Entry > &  pitEntry)

◆ onIncomingData()

◆ onDataUnsolicited()

void nfd::Forwarder::onDataUnsolicited ( const Data data,
const FaceEndpoint ingress 
)

◆ onOutgoingData()

bool nfd::Forwarder::onOutgoingData ( const Data data,
Face egress 
)

outgoing Data pipeline

Returns
Whether the Data was transmitted (true) or dropped (false)

Definition at line 419 of file forwarder.cpp.

References ndn::nfd::FACE_SCOPE_NON_LOCAL, ndn::Data::getName(), nfd::face::INVALID_FACEID, ndn::Name::isPrefixOf(), nfd::scope_prefix::LOCALHOST, NFD_LOG_DEBUG, NFD_LOG_WARN, and nfd::ForwarderCounters::nOutData.

Referenced by onIncomingData(), and nfd::fw::Strategy::sendData().

◆ onIncomingNack()

void nfd::Forwarder::onIncomingNack ( const lp::Nack nack,
const FaceEndpoint ingress 
)

◆ onOutgoingNack()

bool nfd::Forwarder::onOutgoingNack ( const lp::NackHeader nack,
Face egress,
const shared_ptr< pit::Entry > &  pitEntry 
)

outgoing Nack pipeline

Returns
Whether the Nack was transmitted (true) or dropped (false)

Definition at line 503 of file forwarder.cpp.

References ndn::lp::NackHeader::getReason(), nfd::face::INVALID_FACEID, ndn::nfd::LINK_TYPE_POINT_TO_POINT, NFD_LOG_DEBUG, NFD_LOG_WARN, nfd::ForwarderCounters::nOutNacks, and ndn::lp::Nack::setHeader().

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

◆ onDroppedInterest()

void nfd::Forwarder::onDroppedInterest ( const Interest interest,
Face egress 
)

◆ onNewNextHop()

Friends And Related Function Documentation

◆ fw::Strategy

friend class fw::Strategy
friend

Definition at line 274 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 138 of file forwarder.hpp.

Referenced by onContentStoreHit(), and onIncomingData().

◆ beforeExpirePendingInterest

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

trigger before PIT entry expires

See also
Strategy::beforeExpirePendingInterest

Definition at line 143 of file forwarder.hpp.

Referenced by onInterestFinalize().

◆ afterCsHit

signal::Signal<Forwarder, Interest, Data> nfd::Forwarder::afterCsHit

Signals when the incoming interest pipeline gets a hit from the content store.

Definition at line 147 of file forwarder.hpp.

Referenced by onContentStoreHit().

◆ afterCsMiss

signal::Signal<Forwarder, Interest> nfd::Forwarder::afterCsMiss

Signals when the incoming interest pipeline gets a miss from the content store.

Definition at line 151 of file forwarder.hpp.

Referenced by onContentStoreMiss().

◆ __pad0__

NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE nfd::Forwarder::__pad0__

Definition at line 159 of file forwarder.hpp.

◆ ingress

NFD_PUBLIC_WITH_TESTS_ELSE_PRIVATE const FaceEndpoint& nfd::Forwarder::ingress

Definition at line 159 of file forwarder.hpp.

Referenced by Forwarder().


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