26 #ifndef NFD_DAEMON_FW_FORWARDER_HPP 27 #define NFD_DAEMON_FW_FORWARDER_HPP 42 #include "ns3/ndnSIM/model/cs/ndn-content-store.hpp" 82 return m_faceTable.
get(
id);
98 return *m_unsolicitedDataPolicy;
104 BOOST_ASSERT(policy !=
nullptr);
105 m_unsolicitedDataPolicy = std::move(policy);
116 this->onIncomingInterest(
face, interest);
126 this->onIncomingData(
face, data);
136 this->onIncomingNack(
face, nack);
166 return m_measurements;
172 return m_strategyChoice;
178 return m_deadNonceList;
184 return m_networkRegionTable;
209 onIncomingInterest(
Face& inFace,
const Interest& interest);
219 onContentStoreMiss(
const Face& inFace,
const shared_ptr<pit::Entry>& pitEntry,
const Interest& interest);
224 onContentStoreHit(
const Face& inFace,
const shared_ptr<pit::Entry>& pitEntry,
230 onOutgoingInterest(
const shared_ptr<pit::Entry>& pitEntry,
Face& outFace,
const Interest& interest);
235 onInterestReject(
const shared_ptr<pit::Entry>& pitEntry);
240 onInterestUnsatisfied(
const shared_ptr<pit::Entry>& pitEntry);
247 onInterestFinalize(
const shared_ptr<pit::Entry>& pitEntry,
bool isSatisfied,
253 onIncomingData(
Face& inFace,
const Data& data);
258 onDataUnsolicited(
Face& inFace,
const Data& data);
263 onOutgoingData(
const Data& data,
Face& outFace);
273 onOutgoingNack(
const shared_ptr<pit::Entry>& pitEntry,
const Face& outFace,
const lp::NackHeader& nack);
276 onDroppedInterest(
Face& outFace,
const Interest& interest);
280 setUnsatisfyTimer(
const shared_ptr<pit::Entry>& pitEntry);
283 setStragglerTimer(
const shared_ptr<pit::Entry>& pitEntry,
bool isSatisfied,
287 cancelUnsatisfyAndStragglerTimer(
pit::Entry& pitEntry);
294 insertDeadNonceList(
pit::Entry& pitEntry,
bool isSatisfied,
303 template<
class Function>
305 dispatchToStrategy(
pit::Entry& pitEntry, Function trigger)
315 unique_ptr<fw::UnsolicitedDataPolicy> m_unsolicitedDataPolicy;
325 shared_ptr<Face> m_csFace;
327 ns3::Ptr<ns3::ndn::ContentStore> m_csFromNdnSim;
335 #endif // NFD_DAEMON_FW_FORWARDER_HPP
#define PUBLIC_WITH_TESTS_ELSE_PRIVATE
signal::Signal< Forwarder, pit::Entry, Face, Data > beforeSatisfyInterest
trigger before PIT entry is satisfied
constexpr nullopt_t nullopt
const ForwarderCounters & getCounters() const
represents the Dead Nonce list
counters provided by Forwarder
generalization of a network interface
implements the ContentStore
DeadNonceList & getDeadNonceList()
void addFace(shared_ptr< Face > face)
add new Face
determines how to process an unsolicited Data
void add(shared_ptr< Face > face)
add a face
#define VIRTUAL_WITH_TESTS
void startProcessInterest(Face &face, const Interest &interest)
start incoming Interest processing
represents an Interest packet
stores a collection of producer region names
StrategyChoice & getStrategyChoice()
provides a lightweight signal / event system
Face * get(FaceId id) const
get face by FaceId
represents a Network Nack
represents the Interest Table
FaceTable & getFaceTable()
Copyright (c) 2011-2015 Regents of the University of California.
signal::Signal< Forwarder, pit::Entry > beforeExpirePendingInterest
trigger before PIT entry expires
represents the Forwarding Information Base (FIB)
void startProcessData(Face &face, const Data &data)
start incoming Data processing
fw::Strategy & findEffectiveStrategy(const Name &prefix) const
get effective strategy for prefix
represents the Measurements table
represents the ContentStore
fw::UnsolicitedDataPolicy & getUnsolicitedDataPolicy() const
represents a forwarding strategy
a common index structure for FIB, PIT, StrategyChoice, and Measurements
void setCsFromNdnSim(ns3::Ptr< ns3::ndn::ContentStore > cs)
represents the Strategy Choice table
NetworkRegionTable & getNetworkRegionTable()
Measurements & getMeasurements()
#define PROTECTED_WITH_TESTS_ELSE_PRIVATE
uint64_t FaceId
identifies a face
Represents a Data packet.
void setUnsolicitedDataPolicy(unique_ptr< fw::UnsolicitedDataPolicy > policy)
void startProcessNack(Face &face, const lp::Nack &nack)
start incoming Nack processing
Face * getFace(FaceId id) const
get existing Face