26 #ifndef NFD_DAEMON_FW_FORWARDER_HPP 27 #define NFD_DAEMON_FW_FORWARDER_HPP 40 #include "ns3/ndnSIM/model/cs/ndn-content-store.hpp" 81 addFace(shared_ptr<Face> face);
88 onData(
Face& face,
const Data& data);
113 setCsFromNdnSim(ns3::Ptr<ns3::ndn::ContentStore> cs);
130 onIncomingInterest(
Face& inFace,
const Interest& interest);
135 onContentStoreMiss(
const Face& inFace, shared_ptr<pit::Entry> pitEntry,
const Interest& interest);
140 onContentStoreHit(
const Face& inFace, shared_ptr<pit::Entry> pitEntry,
147 shared_ptr<pit::Entry> pitEntry);
152 onOutgoingInterest(shared_ptr<pit::Entry> pitEntry,
Face& outFace,
153 bool wantNewNonce =
false);
158 onInterestReject(shared_ptr<pit::Entry> pitEntry);
163 onInterestUnsatisfied(shared_ptr<pit::Entry> pitEntry);
170 onInterestFinalize(shared_ptr<pit::Entry> pitEntry,
bool isSatisfied,
171 const time::milliseconds& dataFreshnessPeriod = time::milliseconds(-1));
176 onIncomingData(
Face& inFace,
const Data& data);
181 onDataUnsolicited(
Face& inFace,
const Data& data);
186 onOutgoingData(
const Data& data,
Face& outFace);
190 setUnsatisfyTimer(shared_ptr<pit::Entry> pitEntry);
193 setStragglerTimer(shared_ptr<pit::Entry> pitEntry,
bool isSatisfied,
194 const time::milliseconds& dataFreshnessPeriod = time::milliseconds(-1));
197 cancelUnsatisfyAndStragglerTimer(shared_ptr<pit::Entry> pitEntry);
204 insertDeadNonceList(
pit::Entry& pitEntry,
bool isSatisfied,
205 const time::milliseconds& dataFreshnessPeriod,
211 dispatchToStrategy(shared_ptr<pit::Entry> pitEntry,
function<
void(
fw::Strategy*)> trigger);
213 template<
class Function>
215 dispatchToStrategy(shared_ptr<pit::Entry> pitEntry, Function trigger);
231 shared_ptr<NullFace> m_csFace;
233 ns3::Ptr<ns3::ndn::ContentStore> m_csFromNdnSim;
235 static const Name LOCALHOST_NAME;
253 inline shared_ptr<Face>
256 return m_faceTable.get(
id);
262 m_faceTable.add(face);
268 this->onIncomingInterest(face, interest);
274 this->onIncomingData(face, data);
304 return m_measurements;
310 return m_strategyChoice;
316 return m_deadNonceList;
327 Forwarder::dispatchToStrategy(shared_ptr<pit::Entry> pitEntry,
function<
void(
fw::Strategy*)> trigger)
329 template<
class Function>
331 Forwarder::dispatchToStrategy(shared_ptr<pit::Entry> pitEntry, Function trigger)
334 fw::Strategy& strategy = m_strategyChoice.findEffectiveStrategy(*pitEntry);
340 #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
contains counters on forwarder
StrategyChoice & getStrategyChoice()
Copyright (c) 2014-2015, 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
#define PROTECTED_WITH_TESTS_ELSE_PRIVATE
represents the Measurements table
provides a lightweight signal / event system
represents the Interest Table
const ForwarderCounters & getCounters() const
Copyright (c) 2011-2015 Regents of the University of California.
void onData(Face &face, const Data &data)
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 a forwarding strategy
void setCsFromNdnSim(ns3::Ptr< ns3::ndn::ContentStore > cs)
void onInterest(Face &face, const Interest &interest)
#define PUBLIC_WITH_TESTS_ELSE_PRIVATE