NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
strategy-choice-manager.hpp
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
26
#ifndef NFD_DAEMON_MGMT_STRATEGY_CHOICE_MANAGER_HPP
27
#define NFD_DAEMON_MGMT_STRATEGY_CHOICE_MANAGER_HPP
28
29
#include "
mgmt/manager-base.hpp
"
30
#include "
mgmt/strategy-choice-publisher.hpp
"
31
32
#include <ndn-cxx/management/nfd-control-parameters.hpp>
33
34
namespace
nfd
{
35
36
const
std::string
STRATEGY_CHOICE_PRIVILEGE
=
"strategy-choice"
;
37
38
class
StrategyChoice
;
39
40
class
StrategyChoiceManager
:
public
ManagerBase
41
{
42
public
:
43
StrategyChoiceManager
(
StrategyChoice
& strategyChoice,
44
shared_ptr<InternalFace> face,
45
ndn::KeyChain& keyChain);
46
47
virtual
48
~StrategyChoiceManager
();
49
50
void
51
onStrategyChoiceRequest
(
const
Interest
& request);
52
53
PUBLIC_WITH_TESTS_ELSE_PRIVATE
:
54
55
void
56
listStrategies(
const
Interest
& request);
57
58
void
59
onValidatedStrategyChoiceRequest(
const
shared_ptr<const Interest>& request);
60
61
void
62
setStrategy(
ControlParameters
& parameters,
63
ControlResponse
& response);
64
65
void
66
unsetStrategy(
ControlParameters
& parameters,
67
ControlResponse
& response);
68
69
private
:
70
71
StrategyChoice
& m_strategyChoice;
72
73
StrategyChoicePublisher
m_listPublisher;
74
75
static
const
Name
COMMAND_PREFIX;
// /localhost/nfd/strategy-choice
76
77
// number of components in an invalid, but not malformed, unsigned command.
78
// (/localhost/nfd/strategy-choice + verb + parameters) = 5
79
static
const
size_t
COMMAND_UNSIGNED_NCOMPS;
80
81
// number of components in a valid signed Interest.
82
// (see UNSIGNED_NCOMPS), 9 with signed Interest support.
83
static
const
size_t
COMMAND_SIGNED_NCOMPS;
84
85
static
const
Name
LIST_DATASET_PREFIX;
// /localhost/nfd/strategy-choice/list
86
87
};
88
89
}
// namespace nfd
90
91
#endif // NFD_DAEMON_MGMT_STRATEGY_CHOICE_MANAGER_HPP
nfd::ManagerBase
Definition:
manager-base.hpp:46
nfd::StrategyChoice
represents the Strategy Choice table
Definition:
strategy-choice.hpp:45
ndn::nfd::ControlParameters
represents parameters in a ControlCommand request or response
Definition:
nfd-control-parameters.hpp:75
nfd::StrategyChoiceManager
Definition:
strategy-choice-manager.hpp:40
manager-base.hpp
ndn::Interest
represents an Interest packet
Definition:
interest.hpp:45
ndn::nfd::ControlResponse
ndn::mgmt::ControlResponse ControlResponse
Definition:
nfd-control-response.hpp:30
nfd
Copyright (c) 2011-2015 Regents of the University of California.
Definition:
ndn-common.hpp:38
nfd::StrategyChoicePublisher
Definition:
strategy-choice-publisher.hpp:36
nfd::StrategyChoiceManager::onStrategyChoiceRequest
void onStrategyChoiceRequest(const Interest &request)
Definition:
strategy-choice-manager.cpp:65
ndn::Name
Name abstraction to represent an absolute name.
Definition:
name.hpp:46
nfd::StrategyChoiceManager::StrategyChoiceManager
StrategyChoiceManager(StrategyChoice &strategyChoice, shared_ptr< InternalFace > face, ndn::KeyChain &keyChain)
Definition:
strategy-choice-manager.cpp:48
nfd::StrategyChoiceManager::~StrategyChoiceManager
virtual ~StrategyChoiceManager()
Definition:
strategy-choice-manager.cpp:59
strategy-choice-publisher.hpp
PUBLIC_WITH_TESTS_ELSE_PRIVATE
#define PUBLIC_WITH_TESTS_ELSE_PRIVATE
Definition:
common.hpp:39
nfd::STRATEGY_CHOICE_PRIVILEGE
const std::string STRATEGY_CHOICE_PRIVILEGE
Definition:
strategy-choice-manager.hpp:36
ndnSIM
NFD
daemon
mgmt
strategy-choice-manager.hpp
Generated on Tue Feb 23 2016 22:18:44 for ndnSIM by
1.8.11