summaryrefslogtreecommitdiff
path: root/routingTable.cpp
diff options
context:
space:
mode:
authorOthmar Gsenger <otti@anytun.org>2008-02-28 17:09:06 +0000
committerOthmar Gsenger <otti@anytun.org>2008-02-28 17:09:06 +0000
commit62c4bf0fd2b504798c120284958105681f9e20f6 (patch)
treee04cbc56baf28864313da2a26eb4cb43b43fe920 /routingTable.cpp
parentreduced routing sync overhead (diff)
further routing fixes
Diffstat (limited to 'routingTable.cpp')
-rw-r--r--routingTable.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/routingTable.cpp b/routingTable.cpp
index a2b5f56..d51d718 100644
--- a/routingTable.cpp
+++ b/routingTable.cpp
@@ -102,6 +102,24 @@ u_int16_t& RoutingTable::getOrNewRoutingTEUnlocked(const NetworkAddress & addr)
return it->second;
}
+uint16_t RoutingTable::getCountUnlocked()
+{
+ RoutingMap::iterator it = routes_.begin();
+ uint16_t routes=0;
+ for (;it!=routes_.end();++it)
+ routes++;
+ return routes;
+}
+
+RoutingMap::iterator RoutingTable::getBeginUnlocked()
+{
+ return routes_.begin();
+}
+
+RoutingMap::iterator RoutingTable::getEndUnlocked()
+{
+ return routes_.end();
+}
void RoutingTable::clear()
{