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);
121 startProcessData(
Face& face,
const Data& data);
157 return m_measurements;
163 return m_strategyChoice;
169 return m_deadNonceList;
175 return m_networkRegionTable;
200 onIncomingInterest(
Face& inFace,
const Interest& interest);
210 onContentStoreMiss(
const Face& inFace,
const shared_ptr<pit::Entry>& pitEntry,
const Interest& interest);
215 onContentStoreHit(
const Face& inFace,
const shared_ptr<pit::Entry>& pitEntry,
221 onOutgoingInterest(
const shared_ptr<pit::Entry>& pitEntry,
Face& outFace,
const Interest& interest);
226 onInterestReject(
const shared_ptr<pit::Entry>& pitEntry);
231 onInterestUnsatisfied(
const shared_ptr<pit::Entry>& pitEntry);
238 onInterestFinalize(
const shared_ptr<pit::Entry>& pitEntry,
bool isSatisfied,
239 time::milliseconds dataFreshnessPeriod = time::milliseconds(-1));
244 onIncomingData(
Face& inFace,
const Data& data);
249 onDataUnsolicited(
Face& inFace,
const Data& data);
254 onOutgoingData(
const Data& data,
Face& outFace);
264 onOutgoingNack(
const shared_ptr<pit::Entry>& pitEntry,
const Face& outFace,
const lp::NackHeader& nack);
268 setUnsatisfyTimer(
const shared_ptr<pit::Entry>& pitEntry);
271 setStragglerTimer(
const shared_ptr<pit::Entry>& pitEntry,
bool isSatisfied,
272 time::milliseconds dataFreshnessPeriod = time::milliseconds(-1));
275 cancelUnsatisfyAndStragglerTimer(
pit::Entry& pitEntry);
282 insertDeadNonceList(
pit::Entry& pitEntry,
bool isSatisfied,
283 time::milliseconds dataFreshnessPeriod,
Face* upstream);
291 template<
class Function>
293 dispatchToStrategy(
pit::Entry& pitEntry, Function trigger)
296 trigger(m_strategyChoice.findEffectiveStrategy(pitEntry));
303 unique_ptr<fw::UnsolicitedDataPolicy> m_unsolicitedDataPolicy;
313 shared_ptr<Face> m_csFace;
315 ns3::Ptr<ns3::ndn::ContentStore> m_csFromNdnSim;
323 #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
const ForwarderCounters & getCounters() const
represents the Dead Nonce list
counters provided by Forwarder
generalization of a network interface
Copyright (c) 2014-2016, Regents of the University of California, Arizona Board of Regents...
DeadNonceList & getDeadNonceList()
void addFace(shared_ptr< Face > face)
add new Face
determines how to process an unsolicited Data
#define VIRTUAL_WITH_TESTS
Copyright (c) 2014-2016, Regents of the University of California, Arizona Board of Regents...
represents an Interest packet
stores a collection of producer region names
StrategyChoice & getStrategyChoice()
provides a lightweight signal / event system
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)
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
void setUnsolicitedDataPolicy(unique_ptr< fw::UnsolicitedDataPolicy > policy)
Face * getFace(FaceId id) const
get existing Face