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);
140 m_forwarder.onOutgoingInterest(pitEntry, outFace, interest);
153 bool wantNewNonce =
false));
164 m_forwarder.onInterestReject(pitEntry);
178 m_forwarder.onOutgoingNack(pitEntry, outFace, header);
190 std::initializer_list<const Face*> exceptFaces = std::initializer_list<const Face*>());
201 return m_measurements;
207 return m_forwarder.
getFace(
id);
235 #endif // NFD_DAEMON_FW_STRATEGY_HPP signal::Signal< FaceTable, Face & > & afterAddFace
generalization of a network interface
void sendNack(const shared_ptr< pit::Entry > &pitEntry, const Face &outFace, const lp::NackHeader &header)
send Nack to outFace
Face * getFace(FaceId id) const
#define VIRTUAL_WITH_TESTS
Copyright (c) 2014-2016, Regents of the University of California, Arizona Board of Regents...
virtual void beforeExpirePendingInterest(const shared_ptr< pit::Entry > &pitEntry)
trigger before PIT entry expires
represents an Interest packet
const Name & getName() const
provides a lightweight signal / event system
represents a Network Nack
virtual void afterReceiveNack(const Face &inFace, const lp::Nack &nack, const shared_ptr< pit::Entry > &pitEntry)
trigger after Nack is received
FaceTable & getFaceTable()
Copyright (c) 2011-2015 Regents of the University of California.
MeasurementsAccessor & getMeasurements()
void rejectPendingInterest(const shared_ptr< pit::Entry > &pitEntry)
decide that a pending Interest cannot be forwarded
virtual void beforeSatisfyInterest(const shared_ptr< pit::Entry > &pitEntry, const Face &inFace, const Data &data)
trigger before PIT entry is satisfied
Strategy(Forwarder &forwarder, const Name &name)
construct a strategy instance
DEPRECATED(void sendInterest(const shared_ptr< pit::Entry > &pitEntry, Face &outFace, bool wantNewNonce=false))
send Interest to outFace
Name abstraction to represent an absolute name.
signal::Signal< FaceTable, Face & > & beforeRemoveFace
represents a forwarding strategy
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
allows Strategy to access portion of Measurements table under its namespace
const fib::Entry & lookupFib(const pit::Entry &pitEntry) const
performs a FIB lookup, considering Link object if present
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
uint64_t FaceId
identifies a face
void sendInterest(const shared_ptr< pit::Entry > &pitEntry, Face &outFace, const Interest &interest)
send Interest to outFace
Face * getFace(FaceId id) const
get existing Face