#include <netaddress.h>
Definition at line 452 of file netaddress.h.
◆ CSubNet() [1/4]
◆ CSubNet() [2/4]
CSubNet::CSubNet |
( |
const CNetAddr & |
addr, |
|
|
uint8_t |
mask |
|
) |
| |
Construct from a given network start and number of bits (CIDR mask).
- Parameters
-
[in] | addr | Network start. Must be IPv4 or IPv6, otherwise an invalid subnet is created. |
[in] | mask | CIDR mask, must be in [0, 32] for IPv4 addresses and in [0, 128] for IPv6 addresses. Otherwise an invalid subnet is created. |
Definition at line 997 of file netaddress.cpp.
◆ CSubNet() [3/4]
Construct from a given network start and mask.
- Parameters
-
[in] | addr | Network start. Must be IPv4 or IPv6, otherwise an invalid subnet is created. |
[in] | mask | Network mask, must be of the same type as addr and not contain 0-bits followed by 1-bits. Otherwise an invalid subnet is created. |
Definition at line 1038 of file netaddress.cpp.
◆ CSubNet() [4/4]
CSubNet::CSubNet |
( |
const CNetAddr & |
addr | ) |
|
|
explicit |
Construct a single-host subnet.
- Parameters
-
[in] | addr | The sole address to be contained in the subnet, can also be non-IPv[46]. |
Definition at line 1069 of file netaddress.cpp.
◆ IsValid()
bool CSubNet::IsValid |
( |
| ) |
const |
◆ Match()
bool CSubNet::Match |
( |
const CNetAddr & |
addr | ) |
const |
- Returns
- True if this subnet is valid, the specified address is valid, and the specified address belongs in this subnet.
Definition at line 1096 of file netaddress.cpp.
◆ SanityCheck()
bool CSubNet::SanityCheck |
( |
| ) |
const |
|
protected |
◆ SERIALIZE_METHODS()
CSubNet::SERIALIZE_METHODS |
( |
CSubNet |
, |
|
|
obj |
|
|
) |
| |
|
inline |
◆ ToString()
std::string CSubNet::ToString |
( |
| ) |
const |
◆ operator!=
◆ operator<
◆ operator==
◆ netmask
uint8_t CSubNet::netmask[16] |
|
protected |
Netmask, in network byte order.
Definition at line 458 of file netaddress.h.
◆ network
◆ valid
Is this value valid? (only used to signal parse errors)
Definition at line 460 of file netaddress.h.
The documentation for this class was generated from the following files: