ISC_PLATFORM_HAVEIF_LADDRCONF
ISC_PLATFORM_HAVEIF_LADDRREQ
ISC_PLATFORM_HAVESOCKADDRSTORAGE
-ISC_PLATFORM_HAVEIN6PKTINFO
BIND9_CO_RULE
LIBTOOL_ALLOW_UNDEFINED
LIBTOOL_MODE_UNINSTALL
struct sockaddr_in6 sin6;
struct in6_addr in6;
+ struct in6_pktinfo in6_pi;
in6 = in6addr_any;
in6 = in6addr_loopback;
sin6.sin6_scope_id = 0;
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for in6_pktinfo" >&5
-$as_echo_n "checking for in6_pktinfo... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- #include <sys/types.h>
- #include <sys/socket.h>
- #include <netinet/in.h>
-
-int
-main ()
-{
-
- struct in6_pktinfo xyzzy; return (0);
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- ISC_PLATFORM_HAVEIN6PKTINFO="#define ISC_PLATFORM_HAVEIN6PKTINFO 1"
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no -- disabling runtime ipv6 support" >&5
-$as_echo "no -- disabling runtime ipv6 support" >&6; }
- ISC_PLATFORM_HAVEIN6PKTINFO="#undef ISC_PLATFORM_HAVEIN6PKTINFO"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_storage" >&5
$as_echo_n "checking for struct sockaddr_storage... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct if_laddrreq" >&5
$as_echo_n "checking for struct if_laddrreq... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
[[
struct sockaddr_in6 sin6;
struct in6_addr in6;
+ struct in6_pktinfo in6_pi;
in6 = in6addr_any;
in6 = in6addr_loopback;
sin6.sin6_scope_id = 0;
[AC_MSG_RESULT([yes])],
[AC_MSG_FAILURE([IPv6 support is mandatory])])
-AC_MSG_CHECKING([for in6_pktinfo])
-AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[
- #include <sys/types.h>
- #include <sys/socket.h>
- #include <netinet/in.h>
- ]],
- [[
- struct in6_pktinfo xyzzy; return (0);
- ]])],
- [AC_MSG_RESULT(yes)
- ISC_PLATFORM_HAVEIN6PKTINFO="#define ISC_PLATFORM_HAVEIN6PKTINFO 1"],
- [AC_MSG_RESULT(no -- disabling runtime ipv6 support)
- ISC_PLATFORM_HAVEIN6PKTINFO="#undef ISC_PLATFORM_HAVEIN6PKTINFO"])
-
AC_MSG_CHECKING(for struct sockaddr_storage)
AC_TRY_COMPILE([
#include <sys/types.h>
[AC_MSG_RESULT(no)
ISC_PLATFORM_HAVESOCKADDRSTORAGE="#undef ISC_PLATFORM_HAVESOCKADDRSTORAGE"])
-AC_SUBST(ISC_PLATFORM_HAVEIN6PKTINFO)
AC_SUBST(ISC_PLATFORM_HAVESOCKADDRSTORAGE)
AC_MSG_CHECKING([for struct if_laddrreq])
*/
@ISC_PLATFORM_HAVESALEN@
-/*! \brief
- * If this system has in6_pktinfo, ISC_PLATFORM_HAVEIN6PKTINFO will be
- * defined.
- */
-@ISC_PLATFORM_HAVEIN6PKTINFO@
-
/*! \brief
* If this system needs inet_ntop(), ISC_PLATFORM_NEEDNTOP will be defined.
*/
#define INADDR_LOOPBACK 0x7f000001UL
#endif
-#ifndef ISC_PLATFORM_HAVEIN6PKTINFO
-/*% IPv6 packet info */
-struct in6_pktinfo {
- struct in6_addr ipi6_addr; /*%< src/dst IPv6 address */
- unsigned int ipi6_ifindex; /*%< send/recv interface index */
-};
-#endif
-
-
#ifndef ISC_PLATFORM_HAVESOCKADDRSTORAGE
#define _SS_MAXSIZE 128
#define _SS_ALIGNSIZE (sizeof (uint64_t))
#endif /* HAVE_SYSCTLBYNAME */
static isc_once_t once_ipv6only = ISC_ONCE_INIT;
-
-#if defined(ISC_PLATFORM_HAVEIN6PKTINFO)
static isc_once_t once_ipv6pktinfo = ISC_ONCE_INIT;
-#endif
#ifndef ISC_CMSG_IP_TOS
#ifdef __APPLE__
}
}
-#ifdef ISC_PLATFORM_HAVEIN6PKTINFO
if (domain == PF_INET6) {
struct sockaddr_in6 sin6;
unsigned int len;
}
}
}
-#endif
(void)close(s);
static void
initialize_action(void) {
ipv4_result = try_proto(PF_INET);
-#ifdef ISC_PLATFORM_HAVEIN6PKTINFO
ipv6_result = try_proto(PF_INET6);
-#endif
#ifdef ISC_PLATFORM_HAVESYSUNH
unix_result = try_proto(PF_UNIX);
#endif
try_ipv6only) == ISC_R_SUCCESS);
}
-#ifdef ISC_PLATFORM_HAVEIN6PKTINFO
static void
try_ipv6pktinfo(void) {
int s, on;
RUNTIME_CHECK(isc_once_do(&once_ipv6pktinfo,
try_ipv6pktinfo) == ISC_R_SUCCESS);
}
-#endif /* ISC_PLATFORM_HAVEIN6PKTINFO */
isc_result_t
isc_net_probe_ipv6only(void) {
isc_result_t
isc_net_probe_ipv6pktinfo(void) {
-#ifdef ISC_PLATFORM_HAVEIN6PKTINFO
initialize_ipv6pktinfo();
-#endif
return (ipv6pktinfo_result);
}
* to collect the destination address and interface so the client can
* set them on outgoing packets.
*/
-#ifdef ISC_PLATFORM_HAVEIN6PKTINFO
#ifndef USE_CMSG
#define USE_CMSG 1
#endif
-#endif
/*%
* NetBSD and FreeBSD can timestamp packets. XXXMLG Should we have
* multiplied by 2, everything should fit. Those sizes are not
* large enough to cause any concern.
*/
-#if defined(USE_CMSG) && defined(ISC_PLATFORM_HAVEIN6PKTINFO)
+#if defined(USE_CMSG)
#define CMSG_SP_IN6PKT 40
#else
#define CMSG_SP_IN6PKT 0
#ifdef ISC_NET_BSD44MSGHDR
#ifdef USE_CMSG
struct cmsghdr *cmsgp;
-#ifdef ISC_PLATFORM_HAVEIN6PKTINFO
struct in6_pktinfo *pktinfop;
-#endif
#ifdef SO_TIMESTAMP
void *timevalp;
#endif
#ifdef SO_TIMESTAMP
timevalp = NULL;
#endif
-#ifdef ISC_PLATFORM_HAVEIN6PKTINFO
pktinfop = NULL;
-#endif
cmsgp = CMSG_FIRSTHDR(msg);
while (cmsgp != NULL) {
isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_PROCESSCMSG,
"processing cmsg %p", cmsgp);
-#ifdef ISC_PLATFORM_HAVEIN6PKTINFO
if (cmsgp->cmsg_level == IPPROTO_IPV6
&& cmsgp->cmsg_type == IPV6_PKTINFO) {
dev->attributes |= ISC_SOCKEVENTATTR_MULTICAST;
goto next;
}
-#endif
#ifdef SO_TIMESTAMP
if (cmsgp->cmsg_level == SOL_SOCKET
msg->msg_flags = 0;
#if defined(USE_CMSG)
-#if defined(ISC_PLATFORM_HAVEIN6PKTINFO)
if ((sock->type == isc_sockettype_udp) &&
((dev->attributes & ISC_SOCKEVENTATTR_PKTINFO) != 0))
{
pktinfop = (struct in6_pktinfo *)CMSG_DATA(cmsgp);
memmove(pktinfop, &dev->pktinfo, sizeof(struct in6_pktinfo));
}
-#endif
#if defined(IPV6_USE_MIN_MTU)
if ((sock->type == isc_sockettype_udp) &&
}
#endif /* SO_TIMESTAMP */
-#ifdef ISC_PLATFORM_HAVEIN6PKTINFO
#ifdef IPV6_RECVPKTINFO
/* RFC 3542 */
if ((sock->pf == AF_INET6)
strbuf);
}
#endif /* IPV6_RECVPKTINFO */
-#endif /* ISC_PLATFORM_HAVEIN6PKTINFO */
#if defined(IPV6_MTU_DISCOVER) && defined(IPV6_PMTUDISC_DONT)
/*
* Turn off Path MTU discovery on IPv6/UDP sockets.
#define INADDR_LOOPBACK 0x7f000001UL
#endif
-#ifndef ISC_PLATFORM_HAVEIN6PKTINFO
-struct in6_pktinfo {
- struct in6_addr ipi6_addr; /* src/dst IPv6 address */
- unsigned int ipi6_ifindex; /* send/recv interface index */
-};
-#endif
-
#if _MSC_VER < 1300
#define in6addr_any isc_in6addr_any
#define in6addr_loopback isc_in6addr_loopback
#define PATH_MAX _MAX_PATH
#endif
-#if _MSC_VER > 1200
-#define ISC_PLATFORM_HAVEIN6PKTINFO
-#endif
#define ISC_PLATFORM_NEEDPORTT
#undef MSG_TRUNC
#define ISC_PLATFORM_NEEDNTOP
initialize_action(void) {
InitSockets();
ipv4_result = try_proto(PF_INET);
-#ifdef ISC_PLATFORM_HAVEIN6PKTINFO
ipv6_result = try_proto(PF_INET6);
-#endif
}
static void