An IPv4 or IPv6 network ("10.0.0.0/8", "::1", "fd00::/8"). IPv4 addresses are stored IPv4-mapped, so one comparison handles both.
More...
#include <TrustedProxies.hpp>
|
| bool | contains (std::string_view ip) const |
| | True if ip (a literal address) is inside this network.
|
| |
|
| static std::optional< IpNetwork > | parse (std::string_view text) |
| | Parses an address or CIDR; std::nullopt if malformed.
|
| |
An IPv4 or IPv6 network ("10.0.0.0/8", "::1", "fd00::/8"). IPv4 addresses are stored IPv4-mapped, so one comparison handles both.
◆ contains()
| bool orbit::middleware::IpNetwork::contains |
( |
std::string_view |
ip | ) |
const |
True if ip (a literal address) is inside this network.
◆ parse()
| static std::optional< IpNetwork > orbit::middleware::IpNetwork::parse |
( |
std::string_view |
text | ) |
|
|
static |
Parses an address or CIDR; std::nullopt if malformed.
◆ address_
| std::array<uint8_t, 16> orbit::middleware::IpNetwork::address_ {} |
|
private |
◆ prefix_bits_
| int orbit::middleware::IpNetwork::prefix_bits_ = 128 |
|
private |
The documentation for this class was generated from the following file: