summaryrefslogtreecommitdiff
path: root/src/routingTable.h
diff options
context:
space:
mode:
authorOthmar Gsenger <otti@anytun.org>2008-12-22 01:38:19 +0000
committerOthmar Gsenger <otti@anytun.org>2008-12-22 01:38:19 +0000
commitdd37bc54dae219e4d1975f014ec36c221ec4db20 (patch)
tree38e7f427b0ae736841f4193935e39aae500a16dd /src/routingTable.h
parentadded route option to anytun (diff)
new routing system
supports ipv4 and ipv6 routing with subnetting
Diffstat (limited to 'src/routingTable.h')
-rw-r--r--src/routingTable.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/routingTable.h b/src/routingTable.h
index e73deea..85de0fa 100644
--- a/src/routingTable.h
+++ b/src/routingTable.h
@@ -39,6 +39,8 @@
#include "datatypes.h"
#include "networkAddress.h"
#include "networkPrefix.h"
+#include "routingTreeNode.h"
+#include "boost/array.hpp"
typedef std::map<NetworkPrefix,u_int16_t> RoutingMap;
class RoutingTable
@@ -48,6 +50,7 @@ public:
RoutingTable();
~RoutingTable();
void addRoute(const NetworkPrefix & ,u_int16_t);
+ void updateRouteTree(const NetworkPrefix & pref);
void delRoute(const NetworkPrefix & );
u_int16_t getRoute(const NetworkAddress &);
bool empty(network_address_type_t type);
@@ -69,7 +72,8 @@ private:
};
RoutingTable(const RoutingTable &s);
void operator=(const RoutingTable &s);
- RoutingMap routes_[3];
+ boost::array<RoutingMap,3> routes_;
+ boost::array<RoutingTreeNode,3> root_;
Mutex mutex_;
};