|
LibSWOC++ 1.5.14
Solid Wall of C++
|
#include <IPRange.h>

Classes | |
| class | NetSource |
Public Member Functions | |
| IPRange ()=default | |
| Default constructor - construct invalid range. | |
| IPRange (IPAddr const &min, IPAddr const &max) | |
| IPRange (IP4Addr const &min, IP4Addr const &max) | |
| IPRange (IP6Addr const &min, IP6Addr const &max) | |
| IPRange (IPAddr const &addr) | |
| IPRange (IP4Addr addr) | |
| IPRange (IP6Addr const &addr) | |
| IPRange (IP4Range const &range) | |
| Construct from an IPv4 range. | |
| IPRange (IP6Range const &range) | |
| Construct from an IPv6 range. | |
| IPRange (IPRangeView const &view) | |
| Construct from view. | |
| IPRange (string_view const &text) | |
| self_type & | assign (IP4Addr const &min, IP4Addr const &max) |
| self_type & | assign (IP6Addr const &min, IP6Addr const &max) |
| self_type & | operator= (IPRangeView const &rv) |
| Assign from view. | |
| bool | operator== (self_type const &that) const |
| Equality. | |
| bool | operator!= (self_type const &that) const |
| Inequality. | |
| bool | is_ip4 () const |
| bool | is_ip6 () const |
| bool | is (sa_family_t family) const |
| bool | load (std::string_view const &text) |
| bool | contains (IPAddr const &addr) const |
| bool | contains (IP6Addr const &addr) const |
| bool | contains (IP4Addr const &addr) const |
| IPAddr | min () const |
| IPAddr | max () const |
| bool | empty () const |
| self_type & | clear () |
| Make the range empty / invalid. | |
| IP4Range const & | ip4 () const |
| IP6Range const & | ip6 () const |
| sa_family_t | family () const |
| IPMask | network_mask () const |
| NetSource | networks () const |
Protected Attributes | ||
| union { | ||
| std::monostate _nil | ||
| Make constructor easier to implement. More... | ||
| IP4Range _ip4 | ||
| IPv4 range. More... | ||
| IP6Range _ip6 | ||
| IPv6 range. More... | ||
| } | monostate | |
| sa_family_t | _family {AF_UNSPEC} | |
| Family of _range. | ||
Range of IP addresses. Although this can hold IPv4 or IPv6, any specific instance is one or the other, this can never contain a range of different address families.
Construct an inclusive range.
| min | Minimum range value. |
| max | Maximum range value. |
Definition at line 1102 of file swoc_ip.cc.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| bool swoc::IPRange::empty | ( | ) | const |
true if there are no addresses in the range. Definition at line 1152 of file swoc_ip.cc.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| bool swoc::IPRange::load | ( | std::string_view const & | text | ) |
Load the range from text.
| text | Range specifier in text format. |
true if text was successfully parsed, false if not.A successful parse means this was loaded with the specified range. If not the range is marked as invalid.
Definition at line 1111 of file swoc_ip.cc.
| IPAddr swoc::IPRange::max | ( | ) | const |
Definition at line 1139 of file swoc_ip.cc.
| IPAddr swoc::IPRange::min | ( | ) | const |
Definition at line 1126 of file swoc_ip.cc.
| IPMask swoc::IPRange::network_mask | ( | ) | const |
Compute the mask for this as a network.
Definition at line 1165 of file swoc_ip.cc.
|
inline |
Generate a list of networks covering this range.
The returned object can be used as an iterator, or as a container to iterating over the unique minimal set of networks that cover this range.
|
inline |
|
inline |
| bool swoc::IPRange::operator== | ( | self_type const & | that | ) | const |
Equality.
Definition at line 1178 of file swoc_ip.cc.
|
protected |
| std::monostate swoc::IPRange::_nil |
| union { ... } swoc::IPRange::monostate |
Range container.