|
Ada 3.4.0
Fast spec-compliant URL parser
|
IP address serialization functions. More...
Functions | |
| void | find_longest_sequence_of_ipv6_pieces (const std::array< uint16_t, 8 > &address, size_t &compress, size_t &compress_length) noexcept |
| std::string | ipv6 (const std::array< uint16_t, 8 > &address) noexcept |
| std::string | ipv4 (uint64_t address) noexcept |
IP address serialization functions.
Contains utilities for serializing IPv4 and IPv6 addresses to strings.
|
noexcept |
Finds the longest consecutive sequence of zero pieces in an IPv6 address. Used for :: compression in IPv6 serialization.
| address | The 8 16-bit pieces of the IPv6 address. | |
| [out] | compress | Index of the start of the longest zero sequence. |
| [out] | compress_length | Length of the longest zero sequence. |
Definition at line 7 of file serializers.cpp.
Referenced by ipv6().
|
noexcept |
Serializes an IPv4 address to its dotted-decimal string representation.
| address | The 32-bit IPv4 address as an integer. |
Definition at line 66 of file serializers.cpp.
|
noexcept |
Serializes an IPv6 address to its string representation.
| address | The 8 16-bit pieces of the IPv6 address. |
Definition at line 25 of file serializers.cpp.
References find_longest_sequence_of_ipv6_pieces().