diff options
author | Othmar Gsenger <otti@anytun.org> | 2008-12-10 21:50:07 +0000 |
---|---|---|
committer | Othmar Gsenger <otti@anytun.org> | 2008-12-10 21:50:07 +0000 |
commit | 41c37e400a66590ed7eb92f5041f6da1496b8552 (patch) | |
tree | f122a4282e0d61901cf3148d70443be7c287313e /src/networkPrefix.cpp | |
parent | removed anytun.ncb (diff) |
rewrote network addressess to base on boost::asio
Diffstat (limited to 'src/networkPrefix.cpp')
-rw-r--r-- | src/networkPrefix.cpp | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/src/networkPrefix.cpp b/src/networkPrefix.cpp index cc0e57e..7ba47ea 100644 --- a/src/networkPrefix.cpp +++ b/src/networkPrefix.cpp @@ -50,28 +50,6 @@ NetworkPrefix::NetworkPrefix(const NetworkPrefix & src): NetworkAddress(src),len void NetworkPrefix::setNetworkPrefixLength(uint8_t length ) { length_ = length; - if (network_address_type_==ipv4) - { - in_addr v4addr; - v4addr.s_addr=0xFFFFFFFF; - *this &= (NetworkAddress(v4addr)<<(32-length)); - } else if (network_address_type_==ipv6) { - in6_addr v6addr; - for(int i=0;i<4;i++) -#if defined(__GNUC__) && defined(__linux__) - ipv6_address_.s6_addr32[i]=0xFFFFFFFF; -#elif defined(__GNUC__) && defined(__OpenBSD__) - ipv6_address_.__u6_addr.__u6_addr32[i]=0xFFFFFFFF; -#else - #error Target not supported -#endif - - *this &= (NetworkAddress(v6addr)<<(128-length)); - } else if (network_address_type_==ethernet) { - //TODO - } else { - //TODO - } } uint8_t NetworkPrefix::getNetworkPrefixLength() |