42 , m_retxSuppression(RETX_SUPPRESSION_INITIAL,
48 NDN_THROW(std::invalid_argument(
"MulticastStrategy does not accept parameters"));
52 "MulticastStrategy does not support version " +
to_string(*parsed.
version)));
60 static const auto strategyName =
Name(
"/localhost/nfd/strategy/multicast").appendVersion(4);
66 const shared_ptr<pit::Entry>& pitEntry)
71 for (
const auto& nexthop : nexthops) {
72 Face& outFace = nexthop.getFace();
77 NFD_LOG_DEBUG(interest <<
" from=" << ingress <<
" to=" << outFace.getId() <<
" suppressed");
85 NFD_LOG_DEBUG(interest <<
" from=" << ingress <<
" pitEntry-to=" << outFace.getId());
86 auto* sentOutRecord = this->
sendInterest(interest, outFace, pitEntry);
95 const shared_ptr<pit::Entry>& pitEntry)
99 auto nextHopFaceId = nextHop.
getFace().getId();
100 auto& interest = pitEntry->getInterest();
103 for (
const auto& r : pitEntry->getInRecords()) {
104 auto& inFace = r.getFace();
107 NFD_LOG_DEBUG(interest <<
" from=" << inFace.getId() <<
" pitEntry-to=" << nextHopFaceId);
Interest is retransmission and should be forwarded.
static ParsedInstanceName parseInstanceName(const Name &input)
Parse a strategy instance name.
void afterNewNextHop(const fib::NextHop &nextHop, const shared_ptr< pit::Entry > &pitEntry) override
Trigger after a new nexthop is added.
void afterReceiveInterest(const Interest &interest, const FaceEndpoint &ingress, const shared_ptr< pit::Entry > &pitEntry) override
Trigger after an Interest is received.
#define NFD_LOG_INIT(name)
std::string to_string(const T &val)
MulticastStrategy(Forwarder &forwarder, const Name &name=getStrategyName())
Represents a face-endpoint pair in the forwarder.
PartialName parameters
parameter components
Main class of NFD's forwarding engine.
RetxSuppressionResult decidePerUpstream(pit::Entry &pitEntry, Face &outFace)
determines whether Interest is a retransmission per upstream and if so, whether it shall be forwarded...
Interest is retransmission and should be suppressed.
void setInstanceName(const Name &name)
Set strategy instance name.
Represents an Interest packet.
Represents a collection of nexthops.
static const Name & getStrategyName()
Copyright (c) 2011-2015 Regents of the University of California.
void incrementIntervalForOutRecord(pit::OutRecord &outRecord)
Increment the suppression interval for out record.
NFD_REGISTER_STRATEGY(AccessStrategy)
Represents an absolute name.
Represents a forwarding strategy.
A forwarding strategy that forwards Interests to all FIB nexthops.
optional< uint64_t > version
whether strategyName contains a version component
This file contains common algorithms used by forwarding strategies.
const fib::Entry & lookupFib(const pit::Entry &pitEntry) const
Performs a FIB lookup, considering Link object if present.
bool isNextHopEligible(const Face &inFace, const Interest &interest, const fib::NextHop &nexthop, const shared_ptr< pit::Entry > &pitEntry, bool wantUnused, time::steady_clock::time_point now)
static Name makeInstanceName(const Name &input, const Name &strategyName)
Construct a strategy instance name.
const NextHopList & getNextHops() const
NFD_VIRTUAL_WITH_TESTS pit::OutRecord * sendInterest(const Interest &interest, Face &egress, const shared_ptr< pit::Entry > &pitEntry)
Send an Interest packet.
a retransmission suppression decision algorithm that suppresses retransmissions using exponential bac...
Represents a nexthop record in a FIB entry.
boost::chrono::milliseconds milliseconds