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>
59 class Error :
public std::runtime_error
62 using std::runtime_error::runtime_error;
81 registerStrategyForCerts(
const ndn::Name& originRouter);
89 addDispatcherTopPrefix(
const ndn::Name& topPrefix);
107 onFaceDatasetFetchTimeout(uint32_t code,
108 const std::string& reason,
109 uint32_t nRetriesSoFar);
122 processFaceDataset(
const std::vector<ndn::nfd::FaceStatus>& faces);
135 registerAdjacencyPrefixes(
const Adjacent& adj, ndn::time::milliseconds timeout);
140 registerPrefix(
const ndn::Name& prefix);
145 onFaceEventNotification(
const ndn::nfd::FaceEventNotification& faceEventNotification);
148 scheduleDatasetFetch();
158 enableIncomingFaceIdIndication();
165 ndn::Scheduler m_scheduler;
169 std::vector<ndn::Name> m_strategySetOnRouters;
179 ndn::signal::ScopedConnection m_onNewLsaConnection;
180 ndn::signal::ScopedConnection m_onPrefixRegistrationSuccess;
181 ndn::signal::ScopedConnection m_onInitialHelloDataValidated;
184 ndn::mgmt::Dispatcher m_dispatcher;
192 ndn::nfd::Controller m_controller;
193 ndn::nfd::Controller m_faceDatasetController;
202 ndn::nfd::FaceMonitor m_faceMonitor;
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