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/conf-parameter.hpp b/src/conf-parameter.hpp
index 6b63937..df541a5 100644
--- a/src/conf-parameter.hpp
+++ b/src/conf-parameter.hpp
@@ -56,15 +56,9 @@
};
enum {
- ADJ_LSA_BUILD_INTERVAL_MIN = 0,
- ADJ_LSA_BUILD_INTERVAL_DEFAULT = 5,
- ADJ_LSA_BUILD_INTERVAL_MAX = 5
-};
-
-enum {
- FIRST_HELLO_INTERVAL_MIN = 0,
- FIRST_HELLO_INTERVAL_DEFAULT = 10,
- FIRST_HELLO_INTERVAL_MAX = 10
+ ADJ_LSA_BUILD_INTERVAL_MIN = 5,
+ ADJ_LSA_BUILD_INTERVAL_DEFAULT = 10,
+ ADJ_LSA_BUILD_INTERVAL_MAX = 30
};
enum {
@@ -94,7 +88,7 @@
enum {
HELLO_TIMEOUT_MIN = 1,
- HELLO_TIMEOUT_DEFAULT = 3,
+ HELLO_TIMEOUT_DEFAULT = 1,
HELLO_TIMEOUT_MAX = 15
};
@@ -180,11 +174,15 @@
}
void
- buildRouterPrefix()
+ buildRouterAndSyncUserPrefix()
{
m_routerPrefix = m_network;
m_routerPrefix.append(m_siteName);
m_routerPrefix.append(m_routerName);
+
+ m_syncUserPrefix = m_lsaPrefix;
+ m_syncUserPrefix.append(m_siteName);
+ m_syncUserPrefix.append(m_routerName);
}
const ndn::Name&
@@ -194,6 +192,12 @@
}
const ndn::Name&
+ getSyncUserPrefix() const
+ {
+ return m_syncUserPrefix;
+ }
+
+ const ndn::Name&
getSyncPrefix() const
{
return m_syncPrefix;
@@ -256,18 +260,6 @@
}
void
- setFirstHelloInterval(uint32_t interval)
- {
- m_firstHelloInterval = interval;
- }
-
- uint32_t
- getFirstHelloInterval() const
- {
- return m_firstHelloInterval;
- }
-
- void
setRoutingCalcInterval(uint32_t interval)
{
m_routingCalcInterval = interval;
@@ -481,7 +473,7 @@
ndn::Name m_network;
ndn::Name m_routerPrefix;
- ndn::Name m_lsaRouterPrefix;
+ ndn::Name m_syncUserPrefix;
ndn::Name m_syncPrefix;
ndn::Name m_lsaPrefix;
@@ -489,7 +481,6 @@
uint32_t m_lsaRefreshTime;
uint32_t m_adjLsaBuildInterval;
- uint32_t m_firstHelloInterval;
uint32_t m_routingCalcInterval;
uint32_t m_faceDatasetFetchTries;