26 #ifndef NFD_DAEMON_FW_STRATEGY_HPP
27 #define NFD_DAEMON_FW_STRATEGY_HPP
38 class Strategy :
public enable_shared_from_this<Strategy>, noncopyable
81 const shared_ptr<pit::Entry>& pitEntry) = 0;
95 const Face& inFace,
const Data& data);
128 const shared_ptr<pit::Entry>& pitEntry);
139 bool wantNewNonce =
false)
141 m_forwarder.onOutgoingInterest(pitEntry, outFace, wantNewNonce);
153 m_forwarder.onInterestReject(pitEntry);
164 sendNack(
const shared_ptr<pit::Entry>& pitEntry,
const Face& outFace,
165 const lp::NackHeader& header)
167 m_forwarder.onOutgoingNack(pitEntry, outFace, header);
178 sendNacks(
const shared_ptr<pit::Entry>& pitEntry,
const lp::NackHeader& header,
179 std::initializer_list<const Face*> exceptFaces = std::initializer_list<const Face*>());
187 MeasurementsAccessor&
190 return m_measurements;
196 return m_forwarder.
getFace(
id);
218 MeasurementsAccessor m_measurements;
224 #endif // NFD_DAEMON_FW_STRATEGY_HPP
Strategy(Forwarder &forwarder, const Name &name)
construct a strategy instance
void sendNacks(const shared_ptr< pit::Entry > &pitEntry, const lp::NackHeader &header, std::initializer_list< const Face * > exceptFaces=std::initializer_list< const Face * >())
send Nack to every face that has an in-record, except those in exceptFaces
const FaceTable & getFaceTable() const
virtual void afterReceiveInterest(const Face &inFace, const Interest &interest, const shared_ptr< pit::Entry > &pitEntry)=0
trigger after Interest is received
void sendNack(const shared_ptr< pit::Entry > &pitEntry, const Face &outFace, const lp::NackHeader &header)
send Nack to outFace
virtual void beforeSatisfyInterest(const shared_ptr< pit::Entry > &pitEntry, const Face &inFace, const Data &data)
trigger before PIT entry is satisfied
MeasurementsAccessor & getMeasurements()
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...
signal::Signal< FaceTable, Face & > & afterAddFace
virtual void afterReceiveNack(const Face &inFace, const lp::Nack &nack, const shared_ptr< pit::Entry > &pitEntry)
trigger after Nack is received
const Name & getName() const
FaceTable & getFaceTable()
represents a forwarding strategy
#define VIRTUAL_WITH_TESTS
Copyright (c) 2014-2016, Regents of the University of California, Arizona Board of Regents...
signal::Signal< FaceTable, Face & > & beforeRemoveFace
virtual void beforeExpirePendingInterest(const shared_ptr< pit::Entry > &pitEntry)
trigger before PIT entry expires
uint64_t FaceId
identifies a face
void sendInterest(const shared_ptr< pit::Entry > &pitEntry, Face &outFace, bool wantNewNonce=false)
send Interest to outFace
Face * getFace(FaceId id) const
void rejectPendingInterest(const shared_ptr< pit::Entry > &pitEntry)
decide that a pending Interest cannot be forwarded
const fib::Entry & lookupFib(const pit::Entry &pitEntry) const
performs a FIB lookup, considering Link object if present
Face * getFace(FaceId id) const
get existing Face