diff options
author | Othmar Gsenger <otti@anytun.org> | 2008-12-21 15:03:59 +0000 |
---|---|---|
committer | Othmar Gsenger <otti@anytun.org> | 2008-12-21 15:03:59 +0000 |
commit | 9cd4786758a3e46c32c4536ff51bb2b81811507f (patch) | |
tree | 6ad8743850abd2e110558eecc7d46bcf6d25a619 /src/anytun-showtables.cpp | |
parent | include 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/anytun-showtables.cpp')
-rw-r--r-- | src/anytun-showtables.cpp | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/src/anytun-showtables.cpp b/src/anytun-showtables.cpp index 6e197b1..d3e8569 100644 --- a/src/anytun-showtables.cpp +++ b/src/anytun-showtables.cpp @@ -65,15 +65,21 @@ void output(ConnectionList &cl) std::cout << std::endl; //std::cout << "Connection: Keyderivation-Type: " << conn.kd_.printType() << std::endl; cl.clear(); - } - else if( !gRoutingTable.empty() ) - { - RoutingMap::iterator it = gRoutingTable.getBeginUnlocked(); - NetworkPrefix pref( it->first ); - std::cout << "Route: " << pref.toString() << "/" << pref.getNetworkPrefixLength() << " -> "; - mux_t mux = it->second; - std::cout << mux << std::endl; - gRoutingTable.clear(); + } else { + network_address_type_t types[] = {ipv4,ipv6,ethernet}; + for (int types_idx=0; types_idx<3; types_idx++) + { + network_address_type_t type = types[types_idx]; + if( !gRoutingTable.empty(type) ) + { + RoutingMap::iterator it = gRoutingTable.getBeginUnlocked(type); + NetworkPrefix pref( it->first ); + std::cout << "Route: " << pref.toString() << "/" << pref.getNetworkPrefixLength() << " -> "; + mux_t mux = it->second; + std::cout << mux << std::endl; + gRoutingTable.clear(type); + } + } } } |