26 #ifndef NFD_DAEMON_FW_FORWARDER_HPP
27 #define NFD_DAEMON_FW_FORWARDER_HPP
80 return m_faceTable.
get(
id);
90 m_faceTable.
add(face);
96 return *m_unsolicitedDataPolicy;
102 BOOST_ASSERT(policy !=
nullptr);
103 m_unsolicitedDataPolicy = std::move(policy);
155 return m_measurements;
161 return m_strategyChoice;
167 return m_deadNonceList;
173 return m_networkRegionTable;
180 onIncomingInterest(Face& inFace,
const Interest& interest);
185 onInterestLoop(Face& inFace,
const Interest& interest);
190 onContentStoreMiss(
const Face& inFace,
const shared_ptr<pit::Entry>& pitEntry,
const Interest& interest);
195 onContentStoreHit(
const Face& inFace,
const shared_ptr<pit::Entry>& pitEntry,
196 const Interest& interest,
const Data& data);
201 onOutgoingInterest(
const shared_ptr<pit::Entry>& pitEntry, Face& outFace,
const Interest& interest);
206 onInterestReject(
const shared_ptr<pit::Entry>& pitEntry);
211 onInterestUnsatisfied(
const shared_ptr<pit::Entry>& pitEntry);
218 onInterestFinalize(
const shared_ptr<pit::Entry>& pitEntry,
bool isSatisfied,
219 time::milliseconds dataFreshnessPeriod = time::milliseconds(-1));
224 onIncomingData(Face& inFace,
const Data& data);
229 onDataUnsolicited(Face& inFace,
const Data& data);
234 onOutgoingData(
const Data& data, Face& outFace);
239 onIncomingNack(Face& inFace,
const lp::Nack& nack);
244 onOutgoingNack(
const shared_ptr<pit::Entry>& pitEntry,
const Face& outFace,
const lp::NackHeader& nack);
248 setUnsatisfyTimer(
const shared_ptr<pit::Entry>& pitEntry);
251 setStragglerTimer(
const shared_ptr<pit::Entry>& pitEntry,
bool isSatisfied,
252 time::milliseconds dataFreshnessPeriod = time::milliseconds(-1));
255 cancelUnsatisfyAndStragglerTimer(
pit::Entry& pitEntry);
262 insertDeadNonceList(
pit::Entry& pitEntry,
bool isSatisfied,
263 time::milliseconds dataFreshnessPeriod, Face* upstream);
271 template<
class Function>
273 dispatchToStrategy(
pit::Entry& pitEntry, Function trigger)
276 trigger(m_strategyChoice.findEffectiveStrategy(pitEntry));
280 ForwarderCounters m_counters;
282 FaceTable m_faceTable;
283 unique_ptr<fw::UnsolicitedDataPolicy> m_unsolicitedDataPolicy;
289 Measurements m_measurements;
290 StrategyChoice m_strategyChoice;
291 DeadNonceList m_deadNonceList;
292 NetworkRegionTable m_networkRegionTable;
300 #endif // NFD_DAEMON_FW_FORWARDER_HPP
Copyright (c) 2014-2016, Regents of the University of California, Arizona Board of Regents...
StrategyChoice & getStrategyChoice()
Face * get(FaceId id) const
get face by FaceId
#define PROTECTED_WITH_TESTS_ELSE_PRIVATE
DeadNonceList & getDeadNonceList()
void add(shared_ptr< Face > face)
add a face
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...
stores a collection of producer region names
void startProcessInterest(Face &face, const Interest &interest)
start incoming Interest processing
represents the Dead Nonce list
void setUnsolicitedDataPolicy(unique_ptr< fw::UnsolicitedDataPolicy > policy)
determines how to process an unsolicited Data
FaceTable & getFaceTable()
void addFace(shared_ptr< Face > face)
add new Face
counters provided by Forwarder
represents a forwarding strategy
#define VIRTUAL_WITH_TESTS
Copyright (c) 2014-2016, Regents of the University of California, Arizona Board of Regents...
#define PUBLIC_WITH_TESTS_ELSE_PRIVATE
const ForwarderCounters & getCounters() const
fw::UnsolicitedDataPolicy & getUnsolicitedDataPolicy() const
uint64_t FaceId
identifies a face
void startProcessData(Face &face, const Data &data)
start incoming Data processing
Measurements & getMeasurements()
NetworkRegionTable & getNetworkRegionTable()
Face * getFace(FaceId id) const
get existing Face
void startProcessNack(Face &face, const lp::Nack &nack)
start incoming Nack processing