IPv6 network.
More...
#include <IPRange.h>
IPv6 network.
Definition at line 786 of file IPRange.h.
◆ IP6Net() [1/2]
Construct from addr and mask.
- Parameters
-
| addr | An address in the network. |
| mask | The mask for the network. |
The network is based on the mask, and the resulting network address is chosen such that the network will contain addr. For a given addr and mask there is only one network that satisifies these criteria.
Definition at line 2164 of file IPRange.h.
◆ IP6Net() [2/2]
Construct from text.
- Parameters
-
The format must be "addr/mask" where "addr" is a valid address and mask is either a single number for the mask width (CIDR) or a mask in address notation.
Definition at line 810 of file IPRange.h.
◆ as_range()
| IP6Range swoc::IP6Net::as_range |
( |
| ) |
const |
|
inline |
- Returns
- A range that exactly covers the network.
Definition at line 2187 of file IPRange.h.
◆ assign()
Assign an addr and mask to this.
- Parameters
-
| addr | Network addres. |
| mask | Network mask. |
- Returns
- this.
Definition at line 2202 of file IPRange.h.
◆ clear()
Reset network to invalid state.
Definition at line 844 of file IPRange.h.
◆ empty()
| bool swoc::IP6Net::empty |
( |
| ) |
const |
|
inline |
- Returns
true if the network contains no addresses (is invalid).
Definition at line 2172 of file IPRange.h.
◆ load()
Parse network as text.
- Parameters
-
| text | String describing the network in CIDR format. |
- Returns
true if a valid string, false if not.
Definition at line 874 of file swoc_ip.cc.
◆ mask()
| IPMask const & swoc::IP6Net::mask |
( |
| ) |
const |
|
inline |
- Returns
- The mask for the network.
Definition at line 2167 of file IPRange.h.
◆ max()
| IP6Addr swoc::IP6Net::max |
( |
| ) |
const |
|
inline |
- Returns
- Largest address in the network.
Definition at line 2182 of file IPRange.h.
◆ min()
| IP6Addr swoc::IP6Net::min |
( |
| ) |
const |
|
inline |
- Returns
- Network address - smallest address in the network.
Definition at line 2177 of file IPRange.h.
◆ operator!=()
| bool swoc::IP6Net::operator!= |
( |
self_type const & | that | ) |
const |
|
inline |
◆ operator==()
| bool swoc::IP6Net::operator== |
( |
self_type const & | that | ) |
const |
|
inline |
◆ _addr
Network address (also lower_node).
Definition at line 856 of file IPRange.h.
◆ _mask
The documentation for this class was generated from the following files: