diff options
author | nectar <nectar@FreeBSD.org> | 2002-02-04 19:15:33 +0000 |
---|---|---|
committer | nectar <nectar@FreeBSD.org> | 2002-02-04 19:15:33 +0000 |
commit | 9f6ebcdbe691bee2d74a815107f1ce09badf20cd (patch) | |
tree | f89c9aca0024504bcda4e1e2828e09819d386f6b /contrib/bind/port | |
parent | 959a27bce7717b8e33fcc704a2213f0fb0af5dbc (diff) | |
download | FreeBSD-src-9f6ebcdbe691bee2d74a815107f1ce09badf20cd.zip FreeBSD-src-9f6ebcdbe691bee2d74a815107f1ce09badf20cd.tar.gz |
Resolve conflicts after import of ISC BIND 8.3.1-REL.
Diffstat (limited to 'contrib/bind/port')
-rw-r--r-- | contrib/bind/port/freebsd/include/port_after.h | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/contrib/bind/port/freebsd/include/port_after.h b/contrib/bind/port/freebsd/include/port_after.h index 7af0dd9..04c0441 100644 --- a/contrib/bind/port/freebsd/include/port_after.h +++ b/contrib/bind/port/freebsd/include/port_after.h @@ -33,6 +33,10 @@ #if (!defined(BSD)) || (BSD < 199306) #include <sys/bitypes.h> #endif +#include <netinet/in.h> +#ifdef __KAME__ +#define HAS_INET6_STRUCTS +#endif #include <sys/time.h> /* @@ -75,9 +79,97 @@ struct sockaddr_in6 { struct in6_addr sin6_addr; /* IPv6 address */ u_int32_t sin6_scope_id; /* set of interfaces for a scope */ }; + +#ifndef IN6ADDR_ANY_INIT +#define IN6ADDR_ANY_INIT {{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}} +#endif +#ifndef IN6ADDR_LOOPBACK_INIT +#define IN6ADDR_LOOPBACK_INIT {{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}} +#endif #endif /* HAS_INET6_STRUCTS */ + +#if defined(NEED_SOCKADDR_STORAGE) || !defined(HAS_INET6_STRUCTS) +#define __SS_MAXSIZE 128 +#define __SS_ALLIGSIZE (sizeof (long)) + +struct sockaddr_storage { +#ifdef HAVE_SA_LEN + u_int8_t ss_len; /* address length */ + u_int8_t ss_family; /* address family */ + char __ss_pad1[__SS_ALLIGSIZE - 2 * sizeof(u_int8_t)]; + long __ss_align; + char __ss_pad2[__SS_MAXSIZE - 2 * __SS_ALLIGSIZE]; +#else + u_int16_t ss_family; /* address family */ + char __ss_pad1[__SS_ALLIGSIZE - sizeof(u_int16_t)]; + long __ss_align; + char __ss_pad2[__SS_MAXSIZE - 2 * __SS_ALLIGSIZE]; +#endif +}; +#endif + + +#if !defined(HAS_INET6_STRUCTS) || defined(NEED_IN6ADDR_ANY) +#define in6addr_any isc_in6addr_any +extern const struct in6_addr in6addr_any; +#endif + +#ifndef IN6_ARE_ADDR_EQUAL +#define IN6_ARE_ADDR_EQUAL(a,b) \ + (memcmp(&(a)->s6_addr[0], &(b)->s6_addr[0], sizeof(struct in6_addr)) == 0) +#endif + +#ifndef IN6_IS_ADDR_UNSPECIFIED +#define IN6_IS_ADDR_UNSPECIFIED(a) \ + IN6_ARE_ADDR_EQUAL(a, &in6addr_any) +#endif + +#ifndef IN6_IS_ADDR_SITELOCAL +#define IN6_IS_ADDR_SITELOCAL(a) \ + (((a)->s6_addr[0] == 0xfe) && (((a)->s6_addr[1] & 0xc0) == 0xc0)) +#endif + +#ifndef IN6_IS_ADDR_MULTICAST +#define IN6_IS_ADDR_MULTICAST(a) ((a)->s6_addr[0] == 0xff) +#endif + +#ifndef __IPV6_ADDR_MC_SCOPE +#define __IPV6_ADDR_MC_SCOPE(a) ((a)->s6_addr[1] & 0x0f) +#endif + +#ifndef __IPV6_ADDR_SCOPE_SITELOCAL +#define __IPV6_ADDR_SCOPE_SITELOCAL 0x05 +#endif + +#ifndef __IPV6_ADDR_SCOPE_ORGLOCAL +#define __IPV6_ADDR_SCOPE_ORGLOCAL 0x08 +#endif + +#ifndef IN6_IS_ADDR_MC_SITELOCAL +#define IN6_IS_ADDR_MC_SITELOCAL(a) \ + (IN6_IS_ADDR_MULTICAST(a) && \ + (__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_SITELOCAL)) +#endif + +#ifndef IN6_IS_ADDR_MC_ORGLOCAL +#define IN6_IS_ADDR_MC_ORGLOCAL(a) \ + (IN6_IS_ADDR_MULTICAST(a) && \ + (__IPV6_ADDR_MC_SCOPE(a) == __IPV6_ADDR_SCOPE_ORGLOCAL)) +#endif + +#ifndef INET6_ADDRSTRLEN +#define INET6_ADDRSTRLEN 46 +#endif + #ifndef ISC_FACILITY #define ISC_FACILITY LOG_DAEMON #endif +#define UNUSED(x) (x) = (x) +#define DE_CONST(konst, var) \ + do { \ + union { const void *k; void *v; } _u; \ + _u.k = konst; \ + var = _u.v; \ + } while (0) #endif /* ! PORT_AFTER_H */ |