aboutgitcodebugslistschat
path: root/inany.h
diff options
context:
space:
mode:
Diffstat (limited to 'inany.h')
-rw-r--r--inany.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/inany.h b/inany.h
index be8b8da..84e82b0 100644
--- a/inany.h
+++ b/inany.h
@@ -32,6 +32,15 @@ static_assert(sizeof(union inany_addr) == sizeof(struct in6_addr),
static_assert(_Alignof(union inany_addr) == _Alignof(uint32_t),
"union inany_addr has unexpected alignment");
+#define inany_loopback6 (*(const union inany_addr *)(&in6addr_loopback))
+extern const union inany_addr inany_loopback4;
+
+#define inany_any6 (*(const union inany_addr *)(&in6addr_any))
+extern const union inany_addr inany_any4;
+
+#define in4addr_loopback (inany_loopback4.v4mapped.a4)
+#define in4addr_any (inany_any4.v4mapped.a4)
+
/** inany_v4 - Extract IPv4 address, if present, from IPv[46] address
* @addr: IPv4 or IPv6 address
*