#include <netaddress.h>
Definition at line 452 of file netaddress.h.
| 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 992 of file netaddress.cpp.
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 1033 of file netaddress.cpp.
| 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 1064 of file netaddress.cpp.
| bool CSubNet::IsValid |
( |
| ) |
const |
| 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 1091 of file netaddress.cpp.
| bool CSubNet::SanityCheck |
( |
| ) |
const |
|
protected |
| CSubNet::SERIALIZE_METHODS |
( |
CSubNet |
, |
|
|
obj |
|
|
) |
| |
|
inline |
| std::string CSubNet::ToString |
( |
| ) |
const |
| uint8_t CSubNet::netmask[16] |
|
protected |
Netmask, in network byte order.
Definition at line 458 of file netaddress.h.
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: