src: Replace Tokenizer with the methods of ndn::Name
Purpose of this commit is to replace Tokenizer in all places except conf-file-processor.*pp with the methods of ndn::Name. One static method in class NameHelper is added. Tokenizer will be removed finally when configuration file parsing commit is complete. Refs: 1533 Change-Id: I14a67655eb963c5cc5b045c3c9f7d516e405ff19
This commit is contained in:
1 parent
fdbddb114e
commit
31d1d4b331
40 files changed
+1211
-1362
No files matched your search
@@ -17,7 +17,6 @@ void
|
||||
RoutingTable::calculate(Nlsr& pnlsr)
|
||||
{
|
||||
//debugging purpose
|
||||
std::cout << pnlsr.getConfParameter() << std::endl;
|
||||
pnlsr.getNamePrefixTable().print();
|
||||
pnlsr.getLsdb().printAdjLsdb();
|
||||
pnlsr.getLsdb().printCorLsdb();
|
||||
@@ -26,7 +25,8 @@ RoutingTable::calculate(Nlsr& pnlsr)
|
||||
{
|
||||
pnlsr.setIsRoutingTableCalculating(1); //setting routing table calculation
|
||||
if (pnlsr.getLsdb().doesLsaExist(
|
||||
pnlsr.getConfParameter().getRouterPrefix() + "/" + "2", 2))
|
||||
pnlsr.getConfParameter().getRouterPrefix().toUri() + "/" + "adjacency",
|
||||
std::string("adjacency")))
|
||||
{
|
||||
if (pnlsr.getIsBuildAdjLsaSheduled() != 1)
|
||||
{
|
||||
@@ -50,7 +50,7 @@ RoutingTable::calculate(Nlsr& pnlsr)
|
||||
calculateHypDryRoutingTable(pnlsr);
|
||||
}
|
||||
//need to update NPT here
|
||||
pnlsr.getNamePrefixTable().updateWithNewRoute(pnlsr);
|
||||
pnlsr.getNamePrefixTable().updateWithNewRoute();
|
||||
//debugging purpose
|
||||
printRoutingTable();
|
||||
pnlsr.getNamePrefixTable().print();
|
||||
@@ -71,7 +71,7 @@ RoutingTable::calculate(Nlsr& pnlsr)
|
||||
clearDryRoutingTable(); // for dry run options
|
||||
// need to update NPT here
|
||||
std::cout << "Calling Update NPT With new Route" << std::endl;
|
||||
pnlsr.getNamePrefixTable().updateWithNewRoute(pnlsr);
|
||||
pnlsr.getNamePrefixTable().updateWithNewRoute();
|
||||
//debugging purpose
|
||||
printRoutingTable();
|
||||
pnlsr.getNamePrefixTable().print();
|
||||
@@ -131,14 +131,14 @@ RoutingTable::scheduleRoutingTableCalculation(Nlsr& pnlsr)
|
||||
}
|
||||
|
||||
static bool
|
||||
routingTableEntryCompare(RoutingTableEntry& rte, string& destRouter)
|
||||
routingTableEntryCompare(RoutingTableEntry& rte, ndn::Name& destRouter)
|
||||
{
|
||||
return rte.getDestination() == destRouter;
|
||||
}
|
||||
|
||||
// function related to manipulation of routing table
|
||||
void
|
||||
RoutingTable::addNextHop(string destRouter, NextHop& nh)
|
||||
RoutingTable::addNextHop(const ndn::Name& destRouter, NextHop& nh)
|
||||
{
|
||||
RoutingTableEntry* rteChk = findRoutingTableEntry(destRouter);
|
||||
if (rteChk == 0)
|
||||
@@ -154,7 +154,7 @@ RoutingTable::addNextHop(string destRouter, NextHop& nh)
|
||||
}
|
||||
|
||||
RoutingTableEntry*
|
||||
RoutingTable::findRoutingTableEntry(const string destRouter)
|
||||
RoutingTable::findRoutingTableEntry(const ndn::Name& destRouter)
|
||||
{
|
||||
std::list<RoutingTableEntry>::iterator it = std::find_if(m_rTable.begin(),
|
||||
m_rTable.end(),
|
||||
@@ -180,7 +180,7 @@ RoutingTable::printRoutingTable()
|
||||
|
||||
//function related to manipulation of dry routing table
|
||||
void
|
||||
RoutingTable::addNextHopToDryTable(string destRouter, NextHop& nh)
|
||||
RoutingTable::addNextHopToDryTable(const ndn::Name& destRouter, NextHop& nh)
|
||||
{
|
||||
std::list<RoutingTableEntry>::iterator it = std::find_if(m_dryTable.begin(),
|
||||
m_dryTable.end(),
|
||||
|
||||
Reference in new issue
Block a user