src: use /localhop component in LSA prefix

refs: #3899

Change-Id: Ibbb42adf3cc34e4a09e267bd73ffb248aad715d5
This commit is contained in:
Ashlesh Gawande committed 2017-01-21 16:23:34 -08:00
1 parent d1f4f33cfd
commit 6077ea910c
3 files changed
+4 -3

No files matched your search

+1 -1
View File
@@ -72,7 +72,7 @@ public:
throw Error("Cannot parse update name because expected components are missing");
}
ndn::Name networkName = m_name.getSubName(0, nlsrPosition);
ndn::Name networkName = m_name.getSubName(1, nlsrPosition-1);
ndn::Name routerName = m_name.getSubName(lsaPosition + 1);
ndn::Name originRouter = networkName;
+2 -1
View File
@@ -125,7 +125,8 @@ public:
m_chronosyncPrefix.append("NLSR");
m_chronosyncPrefix.append("sync");
m_lsaPrefix = m_network;
m_lsaPrefix.append("localhop");
m_lsaPrefix.append(m_network);
m_lsaPrefix.append("NLSR");
m_lsaPrefix.append("LSA");
}
+1 -1
View File
@@ -223,7 +223,7 @@ BOOST_AUTO_TEST_CASE(LinkState)
BOOST_CHECK_EQUAL(conf.getRouterName(), "/cs/pollux/");
BOOST_CHECK_EQUAL(conf.getRouterPrefix(), "/ndn/memphis.edu/cs/pollux/");
BOOST_CHECK_EQUAL(conf.getChronosyncPrefix(), "/localhop/NLSR/sync");
BOOST_CHECK_EQUAL(conf.getLsaPrefix(), "/ndn/NLSR/LSA");
BOOST_CHECK_EQUAL(conf.getLsaPrefix(), "/localhop/ndn/NLSR/LSA");
BOOST_CHECK_EQUAL(conf.getLsaRefreshTime(), 1800);
BOOST_CHECK_EQUAL(conf.getLsaInterestLifetime(), ndn::time::seconds(3));
BOOST_CHECK_EQUAL(conf.getRouterDeadInterval(), 86400);