26 #ifndef NFD_DAEMON_RIB_SERVICE_HPP
27 #define NFD_DAEMON_RIB_SERVICE_HPP
34 #include <ndn-cxx/face.hpp>
35 #include <ndn-cxx/mgmt/dispatcher.hpp>
36 #include <ndn-cxx/mgmt/nfd/controller.hpp>
37 #include <ndn-cxx/security/key-chain.hpp>
38 #include <ndn-cxx/transport/transport.hpp>
39 #include <ndn-cxx/util/scheduler.hpp>
61 Service(
const std::string& configFile, ndn::KeyChain& keyChain);
92 template<
typename ConfigParseFunc>
93 Service(ndn::KeyChain& keyChain, shared_ptr<ndn::Transport> localNfdTransport,
94 const ConfigParseFunc& configParse);
97 processConfig(
const ConfigSection& section,
bool isDryRun,
const std::string& filename);
100 checkConfig(
const ConfigSection& section,
const std::string& filename);
103 applyConfig(
const ConfigSection& section,
const std::string& filename);
106 static inline Service* s_instance =
nullptr;
108 ndn::KeyChain& m_keyChain;
110 ndn::nfd::Controller m_nfdController;
114 unique_ptr<Readvertise> m_readvertiseNlsr;
115 unique_ptr<Readvertise> m_readvertisePropagation;
116 ndn::mgmt::Dispatcher m_dispatcher;
Implements the RIB Management of NFD Management Protocol.
Computes FibUpdates based on updates to the RIB and sends them to NFD.
Represents the Routing Information Base.
Initializes and executes the NFD-RIB service thread.
Service(const std::string &configFile, ndn::KeyChain &keyChain)
Create NFD-RIB service.
static Service & get()
Get a reference to the only instance of this class.
RibManager & getRibManager() noexcept
boost::property_tree::ptree ConfigSection
A configuration file section.