forked from nuttx/nuttx-update
netinet/in.h: add IN6_IS_ADDR_GLOBAL macro
Signed-off-by: meijian <meijian@xiaomi.com>
This commit is contained in:
parent
5ff98f65a8
commit
d86d902392
1 changed files with 6 additions and 0 deletions
|
@ -215,6 +215,12 @@
|
||||||
(a)->s6_addr32[2] == 0 && \
|
(a)->s6_addr32[2] == 0 && \
|
||||||
(a)->s6_addr32[3] == 0)
|
(a)->s6_addr32[3] == 0)
|
||||||
|
|
||||||
|
#define IN6_IS_ADDR_GLOBAL(a) \
|
||||||
|
(!IN6_IS_ADDR_MULTICAST(a) && \
|
||||||
|
!IN6_IS_ADDR_LINKLOCAL(a) && \
|
||||||
|
!IN6_IS_ADDR_LOOPBACK(a) && \
|
||||||
|
!IN6_IS_ADDR_UNSPECIFIED(a))
|
||||||
|
|
||||||
#define IN6_IS_ADDR_V4COMPAT(a) \
|
#define IN6_IS_ADDR_V4COMPAT(a) \
|
||||||
((a)->s6_addr32[0] == 0 && \
|
((a)->s6_addr32[0] == 0 && \
|
||||||
(a)->s6_addr32[1] == 0 && \
|
(a)->s6_addr32[1] == 0 && \
|
||||||
|
|
Loading…
Reference in a new issue