summaryrefslogtreecommitdiff
path: root/src/networkPrefix.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/networkPrefix.cpp')
-rw-r--r--src/networkPrefix.cpp22
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()