Annotation of embedaddon/dnsmasq/src/ip6addr.h, revision 1.1
1.1 ! misho 1: /* dnsmasq is Copyright (c) 2000-2014 Simon Kelley
! 2:
! 3: This program is free software; you can redistribute it and/or modify
! 4: it under the terms of the GNU General Public License as published by
! 5: the Free Software Foundation; version 2 dated June, 1991, or
! 6: (at your option) version 3 dated 29 June, 2007.
! 7:
! 8: This program is distributed in the hope that it will be useful,
! 9: but WITHOUT ANY WARRANTY; without even the implied warranty of
! 10: MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
! 11: GNU General Public License for more details.
! 12:
! 13: You should have received a copy of the GNU General Public License
! 14: along with this program. If not, see <http://www.gnu.org/licenses/>.
! 15: */
! 16:
! 17:
! 18:
! 19: #define IN6_IS_ADDR_ULA(a) \
! 20: ((((__const uint32_t *) (a))[0] & htonl (0xff000000)) \
! 21: == htonl (0xfd000000))
! 22:
! 23: #define IN6_IS_ADDR_ULA_ZERO(a) \
! 24: (((__const uint32_t *) (a))[0] == htonl (0xfd000000) \
! 25: && ((__const uint32_t *) (a))[1] == 0 \
! 26: && ((__const uint32_t *) (a))[2] == 0 \
! 27: && ((__const uint32_t *) (a))[3] == 0)
! 28:
! 29: #define IN6_IS_ADDR_LINK_LOCAL_ZERO(a) \
! 30: (((__const uint32_t *) (a))[0] == htonl (0xfe800000) \
! 31: && ((__const uint32_t *) (a))[1] == 0 \
! 32: && ((__const uint32_t *) (a))[2] == 0 \
! 33: && ((__const uint32_t *) (a))[3] == 0)
! 34:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>