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);
92 m_faceTable.add(face);
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);
277 setUnsatisfyTimer(
const shared_ptr<pit::Entry>& pitEntry);
280 setStragglerTimer(
const shared_ptr<pit::Entry>& pitEntry,
bool isSatisfied,
284 cancelUnsatisfyAndStragglerTimer(
pit::Entry& pitEntry);
291 insertDeadNonceList(
pit::Entry& pitEntry,
bool isSatisfied,
300 template<
class Function>
302 dispatchToStrategy(
pit::Entry& pitEntry, Function trigger)
305 trigger(m_strategyChoice.findEffectiveStrategy(pitEntry));
312 unique_ptr<fw::UnsolicitedDataPolicy> m_unsolicitedDataPolicy;
318 Measurements m_measurements;
322 shared_ptr<Face> m_csFace;
324 ns3::Ptr<ns3::ndn::ContentStore> m_csFromNdnSim;
332 #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
Face * getFace(FaceId id) const
get existing Face
represents the Dead Nonce list
counters provided by Forwarder
implements the ContentStore
DeadNonceList & getDeadNonceList()
void addFace(shared_ptr< Face > face)
add new Face
determines how to process an unsolicited Data
#define VIRTUAL_WITH_TESTS
void startProcessInterest(Face &face, const Interest &interest)
start incoming Interest processing
const ForwarderCounters & getCounters() const
represents an Interest packet
stores a collection of producer region names
StrategyChoice & getStrategyChoice()
provides a lightweight signal / event system
represents a Network Nack
FaceTable & getFaceTable()
Copyright (c) 2011-2015 Regents of the University of California.
signal::Signal< Forwarder, pit::Entry > beforeExpirePendingInterest
trigger before PIT entry expires
void startProcessData(Face &face, const Data &data)
start incoming Data processing
represents a forwarding strategy
void setCsFromNdnSim(ns3::Ptr< ns3::ndn::ContentStore > cs)
NetworkRegionTable & getNetworkRegionTable()
Measurements & getMeasurements()
#define PROTECTED_WITH_TESTS_ELSE_PRIVATE
uint64_t FaceId
identifies a face
fw::UnsolicitedDataPolicy & getUnsolicitedDataPolicy() const
Represents a Data packet.
void setUnsolicitedDataPolicy(unique_ptr< fw::UnsolicitedDataPolicy > policy)
void startProcessNack(Face &face, const lp::Nack &nack)
start incoming Nack processing