#include <userver/utils/ip.hpp>
Base class for IPv4/IPv6 network.
Public Types | |
using | AddressType = Address |
Public Member Functions | |
NetworkBase (const AddressType &address, unsigned short prefix_length) | |
AddressType | GetAddress () const noexcept |
Get the address address of network. | |
unsigned char | GetPrefixLength () const noexcept |
Get prefix length of address network. | |
bool | ContainsAddress (const AddressType &address) const |
Returns true if the address is in network. | |
Static Public Attributes | |
static constexpr unsigned char | kMaximumPrefixLength = std::is_same_v<Address, AddressV4> ? 32 : 128 |
using utils::ip::NetworkBase< Address, typename >::AddressType = Address |
|
inline |
|
inlinenoexcept |
|
inlinenoexcept |
|
friend |
|
friend |