From 57633fbcb3c9b91c7c906e43b9479084c6d76f16 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 19 Feb 2019 12:51:24 +0100 Subject: net/AllocatedSocketAddress: add methods IsV6Any(), IsV4Mapped() --- src/net/AllocatedSocketAddress.hxx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/net/AllocatedSocketAddress.hxx b/src/net/AllocatedSocketAddress.hxx index 62a9ffba6..f662f89ad 100644 --- a/src/net/AllocatedSocketAddress.hxx +++ b/src/net/AllocatedSocketAddress.hxx @@ -163,6 +163,14 @@ public: #endif #ifdef HAVE_TCP + bool IsV6Any() const noexcept { + return ((SocketAddress)*this).IsV6Any(); + } + + bool IsV4Mapped() const noexcept { + return ((SocketAddress)*this).IsV4Mapped(); + } + /** * Extract the port number. Returns 0 if not applicable. */ -- cgit v1.2.3