summaryrefslogtreecommitdiff
path: root/src/routingTable.h
diff options
context:
space:
mode:
authorOthmar Gsenger <otti@anytun.org>2008-12-21 15:03:59 +0000
committerOthmar Gsenger <otti@anytun.org>2008-12-21 15:03:59 +0000
commit9cd4786758a3e46c32c4536ff51bb2b81811507f (patch)
tree6ad8743850abd2e110558eecc7d46bcf6d25a619 /src/routingTable.h
parentinclude path fixed for windows TunDevice (diff)
added ipv6 routing support
routing still only works if all routes have the same netmask
Diffstat (limited to 'src/routingTable.h')
-rw-r--r--src/routingTable.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/routingTable.h b/src/routingTable.h
index eee8836..e73deea 100644
--- a/src/routingTable.h
+++ b/src/routingTable.h
@@ -37,7 +37,6 @@
#include "threadUtils.hpp"
#include "datatypes.h"
-//#include "routingTableEntry.h"
#include "networkAddress.h"
#include "networkPrefix.h"
typedef std::map<NetworkPrefix,u_int16_t> RoutingMap;
@@ -51,13 +50,13 @@ public:
void addRoute(const NetworkPrefix & ,u_int16_t);
void delRoute(const NetworkPrefix & );
u_int16_t getRoute(const NetworkAddress &);
- bool empty();
- void clear();
+ bool empty(network_address_type_t type);
+ void clear(network_address_type_t type);
Mutex& getMutex();
u_int16_t* getOrNewRoutingTEUnlocked(const NetworkPrefix & addr);
- u_int16_t getCountUnlocked();
- RoutingMap::iterator getBeginUnlocked();
- RoutingMap::iterator getEndUnlocked();
+ u_int16_t getCountUnlocked(network_address_type_t type);
+ RoutingMap::iterator getBeginUnlocked(network_address_type_t type);
+ RoutingMap::iterator getEndUnlocked(network_address_type_t type);
private:
static Mutex instMutex;
@@ -70,7 +69,7 @@ private:
};
RoutingTable(const RoutingTable &s);
void operator=(const RoutingTable &s);
- RoutingMap routes_;
+ RoutingMap routes_[3];
Mutex mutex_;
};