40 #include <ndn-cxx/face.hpp>
41 #include <ndn-cxx/encoding/nfd-constants.hpp>
42 #include <ndn-cxx/mgmt/dispatcher.hpp>
43 #include <ndn-cxx/mgmt/nfd/face-event-notification.hpp>
44 #include <ndn-cxx/mgmt/nfd/face-monitor.hpp>
45 #include <ndn-cxx/mgmt/nfd/face-status.hpp>
46 #include <ndn-cxx/mgmt/nfd/control-parameters.hpp>
47 #include <ndn-cxx/mgmt/nfd/control-response.hpp>
48 #include <ndn-cxx/security/key-chain.hpp>
49 #include <ndn-cxx/util/scheduler.hpp>
51 #include <boost/asio/signal_set.hpp>
60 class Error :
public std::runtime_error
63 using std::runtime_error::runtime_error;
82 registerStrategyForCerts(
const ndn::Name& originRouter);
90 addDispatcherTopPrefix(
const ndn::Name& topPrefix);
108 onFaceDatasetFetchTimeout(uint32_t code,
109 const std::string& reason,
110 uint32_t nRetriesSoFar);
123 processFaceDataset(
const std::vector<ndn::nfd::FaceStatus>& faces);
136 registerAdjacencyPrefixes(
const Adjacent& adj, ndn::time::milliseconds timeout);
141 registerPrefix(
const ndn::Name& prefix);
146 onFaceEventNotification(
const ndn::nfd::FaceEventNotification& faceEventNotification);
149 scheduleDatasetFetch();
159 enableIncomingFaceIdIndication();
162 terminate(
const boost::system::error_code& error,
int signalNo);
169 ndn::Scheduler m_scheduler;
173 std::vector<ndn::Name> m_strategySetOnRouters;
183 ndn::signal::ScopedConnection m_onNewLsaConnection;
184 ndn::signal::ScopedConnection m_onPrefixRegistrationSuccess;
185 ndn::signal::ScopedConnection m_onInitialHelloDataValidated;
188 ndn::mgmt::Dispatcher m_dispatcher;
192 ndn::nfd::Controller m_controller;
193 ndn::nfd::Controller m_faceDatasetController;
202 ndn::nfd::FaceMonitor m_faceMonitor;
203 boost::asio::signal_set m_terminateSignals;
A neighbor reachable over a Face.
A class to house all the configuration parameters for NLSR.
Class to publish all dataset.
Maps names to lists of next hops, and exports this information to NFD.
Nlsr(ndn::Face &face, ndn::KeyChain &keyChain, ConfParameter &confParam)
static const ndn::Name LOCALHOST_PREFIX
std::function< void(const std::vector< ndn::nfd::FaceStatus > &)> FetchDatasetCallback
std::function< void(uint32_t, const std::string &)> FetchDatasetTimeoutCallback
a class designed to handle statistical signals in nlsr
Copyright (c) 2014-2020, The University of Memphis, Regents of the University of California.
#define PUBLIC_WITH_TESTS_ELSE_PRIVATE