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; -*- */
26
#include "
client-control-strategy.hpp
"
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
37
ClientControlStrategy::ClientControlStrategy
(
Forwarder
& forwarder,
const
Name
&
name
)
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
nfd::fw::ClientControlStrategy::ClientControlStrategy
ClientControlStrategy(Forwarder &forwarder, const Name &name=STRATEGY_NAME)
Definition:
client-control-strategy.cpp:37
nfd::face::Face
generalization of a network interface
Definition:
face.hpp:67
nfd::fw::ClientControlStrategy
identical to BestRouteStrategy v1, for backwards compatibility
Definition:
client-control-strategy.hpp:37
nfd::Forwarder
main class of NFD
Definition:
forwarder.hpp:54
ndn::Interest
represents an Interest packet
Definition:
interest.hpp:42
nfd
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-common.hpp:40
nfd::fw::BestRouteStrategy
Best Route strategy version 1.
Definition:
best-route-strategy.hpp:45
nfd::fw::NFD_REGISTER_STRATEGY
NFD_REGISTER_STRATEGY(AccessStrategy)
nfd::fw::ClientControlStrategy::afterReceiveInterest
virtual void afterReceiveInterest(const Face &inFace, const Interest &interest, const shared_ptr< pit::Entry > &pitEntry) override
trigger after Interest is received
Definition:
client-control-strategy.cpp:43
ndn::Name
Name abstraction to represent an absolute name.
Definition:
name.hpp:46
NFD_LOG_WARN
#define NFD_LOG_WARN(expression)
Definition:
logger.hpp:58
nfd::fw::ClientControlStrategy::STRATEGY_NAME
static const Name STRATEGY_NAME
Definition:
client-control-strategy.hpp:48
client-control-strategy.hpp
NFD_LOG_INIT
#define NFD_LOG_INIT(name)
Definition:
logger.hpp:34
ndn::name
Definition:
name-component.cpp:36
nfd::fw::BestRouteStrategy::afterReceiveInterest
virtual void afterReceiveInterest(const Face &inFace, const Interest &interest, const shared_ptr< pit::Entry > &pitEntry) override
trigger after Interest is received
Definition:
best-route-strategy.cpp:41
logger.hpp
ndnSIM
NFD
daemon
fw
client-control-strategy.cpp
Generated on Wed Jan 11 2017 18:17:15 for ndnSIM by
1.8.13