nlsrc: demarcate LS and HR routing table in dry run mode
refs: #4452
Change-Id: I522493e473810f90e4e982b35a58310154816cae
diff --git a/tools/nlsrc.cpp b/tools/nlsrc.cpp
index 56b1d77..f4e5965 100644
--- a/tools/nlsrc.cpp
+++ b/tools/nlsrc.cpp
@@ -406,9 +406,21 @@
Nlsrc::recordRtable(const nlsr::tlv::RoutingTableStatus& rts)
{
std::ostringstream os;
+
+ ndn::Name firstDes;
for (const auto& rt : rts.getRoutingtable()) {
+ if (firstDes.empty()) {
+ firstDes = rt.getDestination().getName();
+ os << rt << std::endl;
+ continue;
+ }
+
+ if (firstDes == rt.getDestination().getName()) {
+ os << "\n------Dry-run Hyperbolic Routing Tables:------- \n " << std::endl;
+ }
os << rt << std::endl;
}
+
m_rtString = os.str();
}