|
idfxx 1.0.0
Modern C++23 components for ESP-IDF
|
IPv4 address value type. More...
Public Member Functions | |
| constexpr | ip4_addr () noexcept=default |
| Constructs a zero-initialized IPv4 address (0.0.0.0). | |
| constexpr | ip4_addr (uint32_t addr) noexcept |
| Constructs an IPv4 address from a raw network-byte-order value. | |
| constexpr | ip4_addr (uint8_t a, uint8_t b, uint8_t c, uint8_t d) noexcept |
| Constructs an IPv4 address from individual octets. | |
| constexpr uint32_t | addr () const noexcept |
| Returns the raw address value in network byte order. | |
| constexpr bool | is_any () const noexcept |
| Tests whether this is a zero (unset) address. | |
| constexpr bool | operator== (const ip4_addr &) const noexcept=default |
| Compares two IPv4 addresses for equality. | |
Static Public Member Functions | |
| static std::optional< ip4_addr > | parse (std::string_view s) noexcept |
| Parses an IPv4 address from dotted-decimal notation. | |
IPv4 address value type.
Stores an IPv4 address in network byte order. Provides construction from individual octets and conversion to string representation.
|
constexprdefaultnoexcept |
Constructs a zero-initialized IPv4 address (0.0.0.0).
Compares two IPv4 addresses for equality.
Parses an IPv4 address from dotted-decimal notation.
Accepts addresses in the form "a.b.c.d" where each octet is a decimal value from 0 to 255 with no leading zeros.
| s | The string to parse (e.g. "192.168.1.1"). |