NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: NDN, CCN, CCNx, content centric networks
API Documentation
client-control-strategy.cpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
27 #include "core/logger.hpp"
28 
29 namespace nfd {
30 namespace fw {
31 
32 NFD_LOG_INIT("ClientControlStrategy");
33 
34 const Name ClientControlStrategy::STRATEGY_NAME("ndn:/localhost/nfd/strategy/client-control/%FD%02");
36 
38  : BestRouteStrategy(forwarder, name)
39 {
40 }
41 
42 void
44  const shared_ptr<pit::Entry>& pitEntry)
45 {
46  if (m_isFirstUse) {
47  NFD_LOG_WARN("NextHopFaceId field is honored universally and "
48  "it's unnecessary to set client-control strategy.");
49  m_isFirstUse = false;
50  }
51 
52  this->BestRouteStrategy::afterReceiveInterest(inFace, interest, pitEntry);
53 }
54 
55 } // namespace fw
56 } // namespace nfd
ClientControlStrategy(Forwarder &forwarder, const Name &name=STRATEGY_NAME)
generalization of a network interface
Definition: face.hpp:67
identical to BestRouteStrategy v1, for backwards compatibility
main class of NFD
Definition: forwarder.hpp:54
represents an Interest packet
Definition: interest.hpp:42
Copyright (c) 2011-2015 Regents of the University of California.
Definition: ndn-common.hpp:40
Best Route strategy version 1.
NFD_REGISTER_STRATEGY(AccessStrategy)
virtual void afterReceiveInterest(const Face &inFace, const Interest &interest, const shared_ptr< pit::Entry > &pitEntry) override
trigger after Interest is received
Name abstraction to represent an absolute name.
Definition: name.hpp:46
#define NFD_LOG_WARN(expression)
Definition: logger.hpp:58
#define NFD_LOG_INIT(name)
Definition: logger.hpp:34
virtual void afterReceiveInterest(const Face &inFace, const Interest &interest, const shared_ptr< pit::Entry > &pitEntry) override
trigger after Interest is received