37 const time::milliseconds MulticastStrategy::RETX_SUPPRESSION_INITIAL(10);
38 const time::milliseconds MulticastStrategy::RETX_SUPPRESSION_MAX(250);
43 , m_retxSuppression(RETX_SUPPRESSION_INITIAL,
49 NDN_THROW(std::invalid_argument(
"MulticastStrategy does not accept parameters"));
52 NDN_THROW(std::invalid_argument(
53 "MulticastStrategy does not support version " + to_string(*parsed.
version)));
61 static Name strategyName(
"/localhost/nfd/strategy/multicast/%FD%03");
67 const shared_ptr<pit::Entry>& pitEntry)
72 for (
const auto& nexthop : nexthops) {
73 Face& outFace = nexthop.getFace();
78 NFD_LOG_DEBUG(interest <<
" from=" << ingress <<
" to=" << outFace.
getId() <<
" suppressed");
87 bool wasSent = this->
sendInterest(pitEntry, outFace, interest) !=
nullptr;
94 NFD_LOG_DEBUG(interest <<
" from=" << ingress <<
" noNextHop (removing pitEntry)");
96 lp::NackHeader nackHeader;
97 nackHeader.setReason(lp::NackReason::NO_ROUTE);
106 const shared_ptr<pit::Entry>& pitEntry)
Main class of NFD's forwarding engine.
Interest is retransmission and should be forwarded.
void setInstanceName(const Name &name)
Set strategy instance name.
bool sendNack(const shared_ptr< pit::Entry > &pitEntry, Face &egress, const lp::NackHeader &header)
Send a Nack packet.
void incrementIntervalForOutRecord(pit::OutRecord &outRecord)
Increment the suppression interval for out record.
Interest is retransmission and should be suppressed.
static Name makeInstanceName(const Name &input, const Name &strategyName)
Construct a strategy instance name.
RetxSuppressionResult decidePerUpstream(pit::Entry &pitEntry, Face &outFace)
determines whether Interest is a retransmission per upstream and if so, whether it shall be forwarded...
static const Name & getStrategyName()
const fib::Entry & lookupFib(const pit::Entry &pitEntry) const
Performs a FIB lookup, considering Link object if present.
Represents a face-endpoint pair in the forwarder.
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...
bool isNextHopEligible(const Face &inFace, const Interest &interest, const fib::NextHop &nexthop, const shared_ptr< pit::Entry > &pitEntry, bool wantUnused, time::steady_clock::TimePoint now)
determines whether a NextHop is eligible i.e.
a retransmission suppression decision algorithm that suppresses retransmissions using exponential bac...
MulticastStrategy(Forwarder &forwarder, const Name &name=getStrategyName())
void afterReceiveInterest(const FaceEndpoint &ingress, const Interest &interest, const shared_ptr< pit::Entry > &pitEntry) override
Trigger after Interest is received.
generalization of a network interface
Represents a collection of nexthops.
PartialName parameters
parameter components
bool hasPendingOutRecords(const pit::Entry &pitEntry)
determine whether pitEntry has any pending out-records
Represents a forwarding strategy.
This file contains common algorithms used by forwarding strategies.
const NextHopList & getNextHops() const
#define NFD_LOG_INIT(name)
static ParsedInstanceName parseInstanceName(const Name &input)
Parse a strategy instance name.
void afterReceiveNack(const FaceEndpoint &ingress, const lp::Nack &nack, const shared_ptr< pit::Entry > &pitEntry) override
Trigger after Nack is received.
void processNack(const Face &inFace, const lp::Nack &nack, const shared_ptr< pit::Entry > &pitEntry)
NFD_REGISTER_STRATEGY(SelfLearningStrategy)
void rejectPendingInterest(const shared_ptr< pit::Entry > &pitEntry)
Schedule the PIT entry for immediate deletion.
pit::OutRecord * sendInterest(const shared_ptr< pit::Entry > &pitEntry, Face &egress, const Interest &interest)
Send an Interest packet.
optional< uint64_t > version
whether strategyName contains a version component