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");
35 NFD_REGISTER_STRATEGY(ClientControlStrategy);
36 
38  : BestRouteStrategy(forwarder, name)
39 {
40 }
41 
42 void
43 ClientControlStrategy::afterReceiveInterest(const Face& inFace, const Interest& interest,
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
#define NFD_REGISTER_STRATEGY(StrategyType)
registers a built-in strategy
ClientControlStrategy(Forwarder &forwarder, const Name &name=STRATEGY_NAME)
main class of NFD
Definition: forwarder.hpp:52
#define NFD_LOG_WARN(expression)
Definition: logger.hpp:163
Copyright (c) 2014-2015, Regents of the University of California, Arizona Board of Regents...
Definition: algorithm.hpp:32
virtual void afterReceiveInterest(const Face &inFace, const Interest &interest, const shared_ptr< pit::Entry > &pitEntry) override
trigger after Interest is received
virtual void afterReceiveInterest(const Face &inFace, const Interest &interest, const shared_ptr< pit::Entry > &pitEntry) override
trigger after Interest is received
#define NFD_LOG_INIT(name)
Definition: logger.hpp:122
Best Route strategy version 1.