net/ToString: move UnmapV4() to class IPv6Address

This commit is contained in:
Max Kellermann
2019-07-03 21:39:34 +02:00
parent 08552f3938
commit 77b5b4158c
5 changed files with 40 additions and 24 deletions

View File

@@ -43,6 +43,7 @@
template<typename T> struct ConstBuffer;
struct StringView;
class IPv4Address;
/**
* An OO wrapper for struct sockaddr.
@@ -128,6 +129,12 @@ public:
gcc_pure
bool IsV4Mapped() const noexcept;
/**
* Convert "::ffff:127.0.0.1" to "127.0.0.1".
*/
gcc_pure
IPv4Address UnmapV4() const noexcept;
/**
* Extract the port number. Returns 0 if not applicable.
*/