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);
114 this->onIncomingInterest(face, interest);
124 this->onIncomingData(face, data);
134 this->onIncomingNack(face, nack);
164 return m_measurements;
170 return m_strategyChoice;
176 return m_deadNonceList;
182 return m_networkRegionTable;
189 onIncomingInterest(Face& inFace,
const Interest& interest);
194 onInterestLoop(Face& inFace,
const Interest& interest);
199 onContentStoreMiss(
const Face& inFace,
const shared_ptr<pit::Entry>& pitEntry,
const Interest& interest);
204 onContentStoreHit(
const Face& inFace,
const shared_ptr<pit::Entry>& pitEntry,
205 const Interest& interest,
const Data& data);
210 onOutgoingInterest(
const shared_ptr<pit::Entry>& pitEntry, Face& outFace,
const Interest& interest);
215 onInterestReject(
const shared_ptr<pit::Entry>& pitEntry);
220 onInterestUnsatisfied(
const shared_ptr<pit::Entry>& pitEntry);
227 onInterestFinalize(
const shared_ptr<pit::Entry>& pitEntry,
bool isSatisfied,
228 ndn::optional<time::milliseconds> dataFreshnessPeriod = ndn::nullopt);
233 onIncomingData(Face& inFace,
const Data& data);
238 onDataUnsolicited(Face& inFace,
const Data& data);
243 onOutgoingData(
const Data& data, Face& outFace);
248 onIncomingNack(Face& inFace,
const lp::Nack& nack);
253 onOutgoingNack(
const shared_ptr<pit::Entry>& pitEntry,
const Face& outFace,
const lp::NackHeader& nack);
257 setUnsatisfyTimer(
const shared_ptr<pit::Entry>& pitEntry);
260 setStragglerTimer(
const shared_ptr<pit::Entry>& pitEntry,
bool isSatisfied,
261 ndn::optional<time::milliseconds> dataFreshnessPeriod = ndn::nullopt);
264 cancelUnsatisfyAndStragglerTimer(
pit::Entry& pitEntry);
271 insertDeadNonceList(
pit::Entry& pitEntry,
bool isSatisfied,
272 ndn::optional<time::milliseconds> dataFreshnessPeriod, Face* upstream);
280 template<
class Function>
282 dispatchToStrategy(
pit::Entry& pitEntry, Function trigger)
285 trigger(m_strategyChoice.findEffectiveStrategy(pitEntry));
292 unique_ptr<fw::UnsolicitedDataPolicy> m_unsolicitedDataPolicy;
298 Measurements m_measurements;
299 StrategyChoice m_strategyChoice;
309 #endif // NFD_DAEMON_FW_FORWARDER_HPP
implements the ContentStore
StrategyChoice & getStrategyChoice()
#define PROTECTED_WITH_TESTS_ELSE_PRIVATE
DeadNonceList & getDeadNonceList()
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
#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