summaryrefslogtreecommitdiffstats
path: root/src/include/ipxe/in.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/ipxe/in.h')
-rw-r--r--src/include/ipxe/in.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/include/ipxe/in.h b/src/include/ipxe/in.h
index 0ebf441c2..3044d6316 100644
--- a/src/include/ipxe/in.h
+++ b/src/include/ipxe/in.h
@@ -69,8 +69,12 @@ struct in6_addr {
( ( *( ( const uint16_t * ) (addr) ) & htons ( 0xffc0 ) ) == \
htons ( 0xfe80 ) )
-#define IN6_IS_ADDR_NONGLOBAL( addr ) \
- ( IN6_IS_ADDR_LINKLOCAL (addr) || IN6_IS_ADDR_MULTICAST (addr) )
+#define IN6_IS_ADDR_SITELOCAL( addr ) \
+ ( ( *( ( const uint16_t * ) (addr) ) & htons ( 0xffc0 ) ) == \
+ htons ( 0xfec0 ) )
+
+#define IN6_IS_ADDR_ULA( addr ) \
+ ( ( *( ( const uint8_t * ) (addr) ) & 0xfe ) == 0xfc )
/**
* IPv4 socket address