From 7fab61455e33e343d244882c2f39653a96e40699 Mon Sep 17 00:00:00 2001 From: Philippe Houdoin Date: Thu, 14 Oct 2010 17:26:59 +0000 Subject: [PATCH] Apply path by Roy Keene which add IN6_ARE_ADDR_EQUAL() macro specified in RFC 2292. Issue detected while porting Tcl. Thanks. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38969 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/posix/netinet6/in6.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/headers/posix/netinet6/in6.h b/headers/posix/netinet6/in6.h index 7c41a26e84..01eed25130 100644 --- a/headers/posix/netinet6/in6.h +++ b/headers/posix/netinet6/in6.h @@ -110,6 +110,10 @@ struct in6_pktinfo { (IN6_IS_ADDR_MULTICAST(a) && __IPV6_ADDR_MC_SCOPE(a) \ == __IPV6_ADDR_SCOPE_GLOBAL) +/* From RFC 2292 (Advanced Sockets API for IPv6) */ +#define IN6_ARE_ADDR_EQUAL(a, b) \ + (!memcmp((a)->s6_addr, (b)->s6_addr, sizeof(struct in6_addr))) + /* maximal length of the string representation of an IPv6 address */ #define INET6_ADDRSTRLEN 46