39 const shared_ptr<pit::Entry>& pitEntry)
47 for (
const auto& nexthop : fibEntry.
getNextHops()) {
48 Face& outFace = nexthop.getFace();
66 NDN_THROW(std::invalid_argument(
"BestRouteStrategy does not accept parameters"));
69 NDN_THROW(std::invalid_argument(
70 "BestRouteStrategy does not support version " + to_string(*parsed.
version)));
78 static Name strategyName(
"/localhost/nfd/strategy/best-route/%FD%01");
bool canForwardToLegacy(const pit::Entry &pitEntry, const Face &face)
decide whether Interest can be forwarded to face
Main class of NFD's forwarding engine.
void setInstanceName(const Name &name)
Set strategy instance name.
void afterReceiveInterest(const FaceEndpoint &ingress, const Interest &interest, const shared_ptr< pit::Entry > &pitEntry) override
Trigger after Interest is received.
static Name makeInstanceName(const Name &input, const Name &strategyName)
Construct a strategy instance name.
BestRouteStrategy(Forwarder &forwarder, const Name &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.
static const Name & getStrategyName()
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...
generalization of a network interface
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
static ParsedInstanceName parseInstanceName(const Name &input)
Parse a strategy instance name.
BestRouteStrategyBase(Forwarder &forwarder)
NFD_REGISTER_STRATEGY(SelfLearningStrategy)
bool wouldViolateScope(const Face &inFace, const Interest &interest, const Face &outFace)
determine whether forwarding the Interest in pitEntry to outFace would violate scope ...
void rejectPendingInterest(const shared_ptr< pit::Entry > &pitEntry)
Schedule the PIT entry for immediate deletion.
Best Route strategy version 1.
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