summaryrefslogtreecommitdiff
path: root/src/routingTable.cpp
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2008-12-22 18:51:03 +0000
committerChristian Pointner <equinox@anytun.org>2008-12-22 18:51:03 +0000
commit1c16c9dd9fca28260793f8b89b5fe484e541715d (patch)
tree8d95f7780fb0436264695bd6f7034d8df1514224 /src/routingTable.cpp
parentcompiler waring fix (diff)
cleaned up routingTree structure
Diffstat (limited to 'src/routingTable.cpp')
-rw-r--r--src/routingTable.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/routingTable.cpp b/src/routingTable.cpp
index a1f8d67..608c420 100644
--- a/src/routingTable.cpp
+++ b/src/routingTable.cpp
@@ -33,7 +33,7 @@
#include "datatypes.h"
#include "routingTable.h"
-#include "routingTreeWalker.hpp"
+#include "routingTree.hpp"
RoutingTable* RoutingTable::inst = NULL;
Mutex RoutingTable::instMutex;
@@ -69,17 +69,17 @@ void RoutingTable::updateRouteTree(const NetworkPrefix & pref)
ipv4_bytes_type bytes(pref.to_bytes_v4());
if (length>32)
length=32;
- routingTreeWalker(bytes, node, length, mux);
+ RoutingTree::walk(bytes, node, length, mux);
} else if (type==ipv6) {
ipv6_bytes_type bytes(pref.to_bytes_v6());
if (length>128)
length=128;
- routingTreeWalker(bytes, node, length, mux);
+ RoutingTree::walk(bytes, node, length, mux);
} else if (type==ethernet) {
ethernet_bytes_type bytes(pref.to_bytes_ethernet());
if (length>48)
length=48;
- routingTreeWalker(bytes, node, length, mux);
+ RoutingTree::walk(bytes, node, length, mux);
} else {
throw std::runtime_error("illegal protocoll type");
}
@@ -121,15 +121,15 @@ u_int16_t RoutingTable::getRoute(const NetworkAddress & addr)
if (type==ipv4)
{
ipv4_bytes_type bytes(addr.to_bytes_v4());
- return routingTreeFinder(bytes, root_[type]);
+ return RoutingTree::find(bytes, root_[type]);
} else if (type==ipv6) {
ipv6_bytes_type bytes(addr.to_bytes_v6());
- return routingTreeFinder(bytes, root_[type]);
+ return RoutingTree::find(bytes, root_[type]);
} else if (type==ethernet) {
//TODO Our model wont fit to ethernet addresses well.
// maybe use hashmap or something like that instead
ethernet_bytes_type bytes(addr.to_bytes_ethernet());
- return routingTreeFinder(bytes, root_[type]);
+ return RoutingTree::find(bytes, root_[type]);
} else {
throw std::runtime_error("illegal protocoll type");
}