Huw Davies : include: Add IN6_IS_ADDR_LINKLOCAL() and IN6_IS_ADDR_SITELOCAL().
Alexandre Julliard
julliard at winehq.org
Thu Jul 22 16:28:20 CDT 2021
Module: wine
Branch: master
Commit: c3c20fdc0b2d937edbd958dfd939a571dc27167e
URL: https://source.winehq.org/git/wine.git/?a=commit;h=c3c20fdc0b2d937edbd958dfd939a571dc27167e
Author: Huw Davies <huw at codeweavers.com>
Date: Thu Jul 22 12:50:20 2021 +0100
include: Add IN6_IS_ADDR_LINKLOCAL() and IN6_IS_ADDR_SITELOCAL().
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
include/ws2ipdef.h | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/include/ws2ipdef.h b/include/ws2ipdef.h
index fc465804962..2f9d4f663ad 100644
--- a/include/ws2ipdef.h
+++ b/include/ws2ipdef.h
@@ -323,6 +323,16 @@ static inline BOOLEAN WS(IN6_IS_ADDR_UNSPECIFIED) ( const IN6_ADDR *a )
(a->s6_words[7] == 0));
}
+static inline BOOLEAN WS(IN6_IS_ADDR_LINKLOCAL) ( const IN6_ADDR *a )
+{
+ return ((a->s6_bytes[0] == 0xfe) && ((a->s6_bytes[1] & 0xc0) == 0x80));
+}
+
+static inline BOOLEAN WS(IN6_IS_ADDR_SITELOCAL) ( const IN6_ADDR *a )
+{
+ return ((a->s6_bytes[0] == 0xfe) && ((a->s6_bytes[1] & 0xc0) == 0xc0));
+}
+
#ifdef __cplusplus
}
#endif
More information about the wine-cvs
mailing list