|
NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
|
API Documentation
|
Go to the documentation of this file.
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"));
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 int nEligibleNextHops = 0;
74 bool isSuppressed =
false;
76 for (
const auto& nexthop : nexthops) {
77 Face& outFace = nexthop.getFace();
82 NFD_LOG_DEBUG(interest <<
" from=" << ingress <<
" to=" << outFace.
getId() <<
" suppressed");
101 if (nEligibleNextHops == 0 && !isSuppressed) {
102 NFD_LOG_DEBUG(interest <<
" from=" << ingress <<
" noNextHop");
105 nackHeader.
setReason(lp::NackReason::NO_ROUTE);
106 this->
sendNack(pitEntry, ingress, nackHeader);
114 const shared_ptr<pit::Entry>& pitEntry)
void incrementIntervalForOutRecord(pit::OutRecord &outRecord)
Increment the suppression interval for out record.
void sendInterest(const shared_ptr< pit::Entry > &pitEntry, const FaceEndpoint &egress, const Interest &interest)
send Interest to egress
@ LINK_TYPE_AD_HOC
link is ad hoc
NFD_REGISTER_STRATEGY(AccessStrategy)
a retransmission suppression decision algorithm that suppresses retransmissions using exponential bac...
Represents an absolute name.
Copyright (c) 2011-2015 Regents of the University of California.
generalization of a network interface
void setInstanceName(const Name &name)
set strategy instance name
MulticastStrategy(Forwarder &forwarder, const Name &name=getStrategyName())
void sendNack(const shared_ptr< pit::Entry > &pitEntry, const FaceEndpoint &egress, const lp::NackHeader &header)
send Nack to egress
const NextHopList & getNextHops() const
Represents a face-endpoint pair in the forwarder.
bool wouldViolateScope(const Face &inFace, const Interest &interest, const Face &outFace)
determine whether forwarding the Interest in pitEntry to outFace would violate scope
const fib::Entry & lookupFib(const pit::Entry &pitEntry) const
performs a FIB lookup, considering Link object if present
void afterReceiveNack(const FaceEndpoint &ingress, const lp::Nack &nack, const shared_ptr< pit::Entry > &pitEntry) override
trigger after Nack is received
Represents an Interest packet.
static ParsedInstanceName parseInstanceName(const Name &input)
parse a strategy instance name
void rejectPendingInterest(const shared_ptr< pit::Entry > &pitEntry)
schedule the PIT entry for immediate deletion
std::vector< NextHop > NextHopList
static const Name & getStrategyName()
represents a forwarding strategy
@ FORWARD
Interest is retransmission and should be forwarded.
Main class of NFD's forwarding engine.
void processNack(const Face &inFace, const lp::Nack &nack, const shared_ptr< pit::Entry > &pitEntry)
represents a Network Nack
std::string to_string(const T &val)
static Name makeInstanceName(const Name &input, const Name &strategyName)
construct a strategy instance name
a forwarding strategy that forwards Interest to all FIB nexthops
ndn::nfd::LinkType getLinkType() const
optional< uint64_t > version
whether strategyName contains a version component
PartialName parameters
parameter components
@ SUPPRESS
Interest is retransmission and should be suppressed.
void afterReceiveInterest(const FaceEndpoint &ingress, const Interest &interest, const shared_ptr< pit::Entry > &pitEntry) override
trigger after Interest is received
RetxSuppressionResult decidePerUpstream(pit::Entry &pitEntry, Face &outFace)
determines whether Interest is a retransmission per upstream and if so, whether it shall be forwarded...
#define NFD_LOG_INIT(name)