NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.0: NDN, CCN, CCNx, content centric networks
API Documentation
nfd.hpp
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
26 #ifndef NFD_DAEMON_NFD_HPP
27 #define NFD_DAEMON_NFD_HPP
28 
29 #include "common.hpp"
30 #include "core/config-file.hpp"
31 #include "core/scheduler.hpp"
32 
33 #include <ndn-cxx/security/key-chain.hpp>
34 #include <ndn-cxx/util/network-monitor.hpp>
35 
36 namespace ndn {
37 class Face;
38 namespace mgmt {
39 class Dispatcher;
40 } // namespace mgmt
41 } // namespace ndn
42 
43 namespace nfd {
44 
45 class Forwarder;
46 class FibManager;
47 class FaceManager;
49 class ForwarderStatusManager;
50 class CommandValidator;
51 
52 namespace face {
53 class Face;
54 } // namespace face
55 
60 class Nfd : noncopyable
61 {
62 public:
66  Nfd(const std::string& configFile, ndn::KeyChain& keyChain);
67 
75  Nfd(const ConfigSection& config, ndn::KeyChain& keyChain);
76 
80  ~Nfd();
81 
86  void
87  initialize();
88 
92  void
93  reloadConfigFile();
94 
95 private:
96  void
97  initializeLogging();
98 
99  void
100  initializeManagement();
101 
102  void
103  reloadConfigFileFaceSection();
104 
105 private:
106  std::string m_configFile;
107  ConfigSection m_configSection;
108 
109  unique_ptr<Forwarder> m_forwarder;
110 
111  ndn::KeyChain& m_keyChain;
112  shared_ptr<face::Face> m_internalFace;
113  shared_ptr<ndn::Face> m_internalClientFace;
114  unique_ptr<CommandValidator> m_validator;
115 
116  unique_ptr<ndn::mgmt::Dispatcher> m_dispatcher;
117  unique_ptr<FibManager> m_fibManager;
118  unique_ptr<FaceManager> m_faceManager;
119  unique_ptr<StrategyChoiceManager> m_strategyChoiceManager;
120  unique_ptr<ForwarderStatusManager> m_forwarderStatusManager;
121 
122  unique_ptr<ndn::util::NetworkMonitor> m_networkMonitor;
123  scheduler::ScopedEventId m_reloadConfigEvent;
124 };
125 
126 } // namespace nfd
127 
128 #endif // NFD_DAEMON_NFD_HPP
Copyright (c) 2011-2015 Regents of the University of California.
represents a dispatcher on server side of NFD Management protocol
Definition: dispatcher.hpp:129
The packet signing interface.
Definition: key-chain.hpp:48
FibManager
Definition: fib-manager.cpp:31
Class representing NFD instance This class can be used to initialize all components of NFD...
Definition: nfd.hpp:60
Copyright (c) 2011-2015 Regents of the University of California.
Definition: ndn-common.hpp:40
Nfd
Definition: nfd.cpp:47
Abstraction to communicate with local or remote NDN forwarder.
Definition: face.hpp:119
cancels an event automatically upon destruction
Definition: scheduler.hpp:57
boost::property_tree::ptree ConfigSection
Forwarder
Definition: forwarder.cpp:38