FIB manipaulation done
diff --git a/nlsr_rt.cpp b/nlsr_rt.cpp
index 2487db5..ae7fc88 100644
--- a/nlsr_rt.cpp
+++ b/nlsr_rt.cpp
@@ -7,12 +7,15 @@
#include "nlsr_map.hpp"
#include "nlsr_rtc.hpp"
#include "nlsr_rte.hpp"
+#include "nlsr_npt.hpp"
using namespace std;
void
RoutingTable::calculate(nlsr& pnlsr)
{
+ //debugging purpose
+ pnlsr.getNpt().printNpt();
if ( pnlsr.getIsRoutingTableCalculating() == 0 )
{
@@ -44,6 +47,12 @@
}
//need to update NPT here
+ pnlsr.getNpt().updateNptWithNewRoute(pnlsr);
+ //debugging purpose
+ printRoutingTable();
+ pnlsr.getNpt().printNpt();
+ pnlsr.getFib().printFib();
+ //debugging purpose end
}
else
{
@@ -58,9 +67,14 @@
clearRoutingTable();
clearDryRoutingTable(); // for dry run options
// need to update NPT here
+ pnlsr.getNpt().updateNptWithNewRoute(pnlsr);
+ //debugging purpose
+ printRoutingTable();
+ pnlsr.getNpt().printNpt();
+ pnlsr.getFib().printFib();
+ //debugging purpose end
}
- printRoutingTable();
pnlsr.setIsRouteCalculationScheduled(0); //clear scheduled flag
pnlsr.setIsRoutingTableCalculating(0); //unsetting routing table calculation
@@ -71,6 +85,7 @@
ndn::bind(&RoutingTable::calculate,this,boost::ref(pnlsr)));
pnlsr.setIsRouteCalculationScheduled(1);
}
+
}