X-Git-Url: https://git.syn-net.org/debian/?a=blobdiff_plain;f=src%2FnetworkPrefix.cpp;h=85b687d9711d481cf26197222d22627c7fa8c06f;hb=bd02a5f6be4815d46524d613f727199ca756c971;hp=045b2515a7f0ada623adf24fc067e689f24898ef;hpb=058ae090a970436caec3b3059e9e18b310dd6b0d;p=anytun.git diff --git a/src/networkPrefix.cpp b/src/networkPrefix.cpp index 045b251..85b687d 100644 --- a/src/networkPrefix.cpp +++ b/src/networkPrefix.cpp @@ -11,14 +11,15 @@ * tunneling and relaying of packets of any protocol. * * - * Copyright (C) 2007-2008 Othmar Gsenger, Erwin Nindl, + * Copyright (C) 2007-2009 Othmar Gsenger, Erwin Nindl, * Christian Pointner * * This file is part of Anytun. * * Anytun is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 3 as - * published by the Free Software Foundation. + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. * * Anytun is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -39,31 +40,33 @@ NetworkPrefix::NetworkPrefix(): NetworkAddress(),length_(0) { } -NetworkPrefix::NetworkPrefix(const NetworkAddress & src,u_int8_t length): NetworkAddress(src),length_(length) +NetworkPrefix::NetworkPrefix(const NetworkAddress& src,uint8_t length): NetworkAddress(src),length_(length) { } -NetworkPrefix::NetworkPrefix(const NetworkPrefix & src): NetworkAddress(src),length_(src.length_) +NetworkPrefix::NetworkPrefix(const NetworkPrefix& src): NetworkAddress(src),length_(src.length_) { } -void NetworkPrefix::setNetworkPrefixLength(u_int8_t length ) +void NetworkPrefix::setNetworkPrefixLength(uint8_t length) { - length_ = length; + length_ = length; } -u_int8_t NetworkPrefix::getNetworkPrefixLength() const +uint8_t NetworkPrefix::getNetworkPrefixLength() const { - return length_; + return length_; } -bool NetworkPrefix::operator<(const NetworkPrefix &right) const +bool NetworkPrefix::operator<(const NetworkPrefix& right) const { - if (network_address_type_!=right.network_address_type_) - return false; - if (right.length_!=length_) - return (length_(*this)(right); + if(network_address_type_!=right.network_address_type_) { + return false; + } + if(right.length_!=length_) { + return (length_(*this)(right); }