include: Add IN6_IS_ADDR_LINKLOCAL() and IN6_IS_ADDR_SITELOCAL().

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Huw Davies 2021-07-22 12:50:20 +01:00 committed by Alexandre Julliard
parent 8d9d7fc5d2
commit c3c20fdc0b
1 changed files with 10 additions and 0 deletions

View File

@ -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