NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.3: 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 "core/config-file.hpp"
30 #include "core/scheduler.hpp"
31 
32 #include <ndn-cxx/security/key-chain.hpp>
33 #include <ndn-cxx/util/network-monitor.hpp>
34 
35 namespace ndn {
36 class Face;
37 namespace mgmt {
38 class Dispatcher;
39 } // namespace mgmt
40 } // namespace ndn
41 
42 namespace nfd {
43 
44 class Forwarder;
46 class FibManager;
47 class FaceManager;
49 class ForwarderStatusManager;
50 
51 namespace face {
52 class Face;
53 } // namespace face
54 
59 class Nfd : noncopyable
60 {
61 public:
65  Nfd(const std::string& configFile, ndn::KeyChain& keyChain);
66 
74  Nfd(const ConfigSection& config, ndn::KeyChain& keyChain);
75 
79  ~Nfd();
80 
85  void
86  initialize();
87 
91  void
92  reloadConfigFile();
93 
94 private:
95  void
96  initializeLogging();
97 
98  void
99  initializeManagement();
100 
101  void
102  reloadConfigFileFaceSection();
103 
104 private:
105  std::string m_configFile;
106  ConfigSection m_configSection;
107 
108  unique_ptr<Forwarder> m_forwarder;
109 
110  ndn::KeyChain& m_keyChain;
111  shared_ptr<face::Face> m_internalFace;
112  shared_ptr<ndn::Face> m_internalClientFace;
113  unique_ptr<ndn::mgmt::Dispatcher> m_dispatcher;
114  shared_ptr<CommandAuthenticator> m_authenticator;
115  unique_ptr<ForwarderStatusManager> m_forwarderStatusManager;
116  unique_ptr<FaceManager> m_faceManager;
117  unique_ptr<FibManager> m_fibManager;
118  unique_ptr<StrategyChoiceManager> m_strategyChoiceManager;
119 
120  unique_ptr<ndn::util::NetworkMonitor> m_networkMonitor;
121  scheduler::ScopedEventId m_reloadConfigEvent;
122 };
123 
124 } // namespace nfd
125 
126 #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:47
FibManager
Definition: fib-manager.cpp:33
Class representing NFD instance This class can be used to initialize all components of NFD...
Definition: nfd.hpp:59
Copyright (c) 2011-2015 Regents of the University of California.
Definition: ndn-common.hpp:40
Nfd
Definition: nfd.cpp:44
Provide a communication channel with local or remote NDN forwarder.
Definition: face.hpp:125
cancels an event automatically upon destruction
Definition: scheduler.hpp:57
boost::property_tree::ptree ConfigSection
Forwarder
Definition: forwarder.cpp:37