mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-01-26 09:35:23 +00:00
patch #7912 by Grant Erickson: Add a macro for introspecting the IPv6 loopback address.
This commit is contained in:
parent
94eff945b4
commit
8b63a89267
@ -170,6 +170,10 @@ Little-endian version, stored in network order (no htonl). */
|
|||||||
((ip6addr)->addr[2] == 0) && \
|
((ip6addr)->addr[2] == 0) && \
|
||||||
((ip6addr)->addr[3] == 0)))
|
((ip6addr)->addr[3] == 0)))
|
||||||
|
|
||||||
|
#define ip6_addr_isloopback(ip6addr) (((ip6addr)->addr[0] == 0UL) && \
|
||||||
|
((ip6addr)->addr[1] == 0UL) && \
|
||||||
|
((ip6addr)->addr[2] == 0UL) && \
|
||||||
|
((ip6addr)->addr[3] == PP_HTONL(0x00000001UL)))
|
||||||
|
|
||||||
#define ip6_addr_isglobal(ip6addr) (((ip6addr)->addr[0] & PP_HTONL(0xe0000000UL)) == PP_HTONL(0x20000000UL))
|
#define ip6_addr_isglobal(ip6addr) (((ip6addr)->addr[0] & PP_HTONL(0xe0000000UL)) == PP_HTONL(0x20000000UL))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user