src: change initialization order
Send Hello Interest after route to neighbor is successfully registered
--> First Hello interval is eliminated
--> After Hello Nack, wait exponentially before processing it as a timeout
Register sync route for each neighbor after its Hello Data is validated
refs: #5009
Change-Id: Ice39a591f1e58e474b494d93c913fa45e10f24f2
diff --git a/src/nlsr.hpp b/src/nlsr.hpp
index 2124ceb..bc82d01 100644
--- a/src/nlsr.hpp
+++ b/src/nlsr.hpp
@@ -272,21 +272,24 @@
bool m_isDaemonProcess;
ndn::security::ValidatorConfig& m_validator;
std::vector<ndn::Name> m_strategySetOnRouters;
+ uint16_t m_numSyncPrefixRegistered = 0;
PUBLIC_WITH_TESTS_ELSE_PRIVATE:
Fib m_fib;
RoutingTable m_routingTable;
NamePrefixTable m_namePrefixTable;
Lsdb m_lsdb;
+ HelloProtocol m_helloProtocol;
private:
ndn::util::signal::ScopedConnection m_afterSegmentValidatedConnection;
ndn::util::signal::ScopedConnection m_onNewLsaConnection;
+ ndn::util::signal::ScopedConnection m_onPrefixRegistrationSuccess;
+ ndn::util::signal::ScopedConnection m_onHelloDataValidated;
PUBLIC_WITH_TESTS_ELSE_PRIVATE:
ndn::mgmt::Dispatcher m_dispatcher;
DatasetInterestHandler m_datasetHandler;
- HelloProtocol m_helloProtocol;
private:
/*! \brief Where NLSR stores certificates it claims to be