26 #ifndef NFD_DAEMON_FW_FORWARDER_HPP 27 #define NFD_DAEMON_FW_FORWARDER_HPP 41 #include "ns3/ndnSIM/model/cs/ndn-content-store.hpp" 82 addFace(shared_ptr<Face>
face);
90 startProcessInterest(Face& face,
const Interest& interest);
97 startProcessData(Face& face,
const Data& data);
104 startProcessNack(Face& face,
const lp::Nack& nack);
128 getNetworkRegionTable();
132 setCsFromNdnSim(ns3::Ptr<ns3::ndn::ContentStore> cs);
149 onIncomingInterest(Face& inFace,
const Interest& interest);
154 onInterestLoop(Face& inFace,
const Interest& interest);
159 onContentStoreMiss(
const Face& inFace, shared_ptr<pit::Entry> pitEntry,
const Interest& interest);
164 onContentStoreHit(
const Face& inFace, shared_ptr<pit::Entry> pitEntry,
170 onOutgoingInterest(shared_ptr<pit::Entry> pitEntry, Face& outFace,
171 bool wantNewNonce =
false);
176 onInterestReject(shared_ptr<pit::Entry> pitEntry);
181 onInterestUnsatisfied(shared_ptr<pit::Entry> pitEntry);
188 onInterestFinalize(shared_ptr<pit::Entry> pitEntry,
bool isSatisfied,
189 const time::milliseconds& dataFreshnessPeriod = time::milliseconds(-1));
194 onIncomingData(Face& inFace,
const Data& data);
199 onDataUnsolicited(Face& inFace,
const Data& data);
204 onOutgoingData(
const Data& data, Face& outFace);
209 onIncomingNack(Face& inFace,
const lp::Nack& nack);
214 onOutgoingNack(shared_ptr<pit::Entry> pitEntry,
const Face& outFace,
const lp::NackHeader& nack);
218 setUnsatisfyTimer(shared_ptr<pit::Entry> pitEntry);
221 setStragglerTimer(shared_ptr<pit::Entry> pitEntry,
bool isSatisfied,
222 const time::milliseconds& dataFreshnessPeriod = time::milliseconds(-1));
225 cancelUnsatisfyAndStragglerTimer(shared_ptr<pit::Entry> pitEntry);
232 insertDeadNonceList(
pit::Entry& pitEntry,
bool isSatisfied,
233 const time::milliseconds& dataFreshnessPeriod,
239 dispatchToStrategy(shared_ptr<pit::Entry> pitEntry,
function<
void(
fw::Strategy*)> trigger);
241 template<
class Function>
243 dispatchToStrategy(shared_ptr<pit::Entry> pitEntry, Function trigger);
260 shared_ptr<Face> m_csFace;
262 ns3::Ptr<ns3::ndn::ContentStore> m_csFromNdnSim;
264 static const Name LOCALHOST_NAME;
282 inline shared_ptr<Face>
285 return m_faceTable.get(
id);
291 m_faceTable.add(face);
321 return m_measurements;
327 return m_strategyChoice;
333 return m_deadNonceList;
339 return m_networkRegionTable;
350 Forwarder::dispatchToStrategy(shared_ptr<pit::Entry> pitEntry,
function<
void(
fw::Strategy*)> trigger)
352 template<
class Function>
354 Forwarder::dispatchToStrategy(shared_ptr<pit::Entry> pitEntry, Function trigger)
357 fw::Strategy& strategy = m_strategyChoice.findEffectiveStrategy(*pitEntry);
363 #endif // NFD_DAEMON_FW_FORWARDER_HPP signal::Signal< Forwarder, pit::Entry, Face, Data > beforeSatisfyInterest
trigger before PIT entry is satisfied
represents the Dead Nonce list
represents the Strategy Choice table
counters provided by Forwarder
StrategyChoice & getStrategyChoice()
Copyright (c) 2014-2016, Regents of the University of California, Arizona Board of Regents...
FaceTable & getFaceTable()
void addFace(shared_ptr< Face > face)
add new Face
DeadNonceList & getDeadNonceList()
represents an Interest packet
stores a collection of producer region names
#define PROTECTED_WITH_TESTS_ELSE_PRIVATE
represents the Measurements table
provides a lightweight signal / event system
represents the Interest Table
represents a Network Nack
Copyright (c) 2011-2015 Regents of the University of California.
signal::Signal< Forwarder, pit::Entry > beforeExpirePendingInterest
trigger before PIT entry expires
#define VIRTUAL_WITH_TESTS
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...
Measurements & getMeasurements()
Name abstraction to represent an absolute name.
shared_ptr< Face > getFace(FaceId id) const
get existing Face
represents the ContentStore
represents a forwarding strategy
void setCsFromNdnSim(ns3::Ptr< ns3::ndn::ContentStore > cs)
NetworkRegionTable & getNetworkRegionTable()
const ForwarderCounters & getCounters() const
#define PUBLIC_WITH_TESTS_ELSE_PRIVATE
uint64_t FaceId
identifies a face