ISC_PLATFORM_HAVEIF_LADDRCONF
ISC_PLATFORM_HAVEIF_LADDRREQ
ISC_PLATFORM_HAVESCOPEID
-ISC_IPV6_C
-ISC_ISCIPV6_O
-ISC_IPV6_O
-ISC_IPV6_H
ISC_PLATFORM_HAVESOCKADDRSTORAGE
ISC_PLATFORM_HAVEIN6PKTINFO
ISC_PLATFORM_NEEDIN6ADDRLOOPBACK
ISC_PLATFORM_NEEDIN6ADDRANY
ISC_PLATFORM_HAVEINADDR6
-ISC_PLATFORM_HAVEIPV6
BIND9_CO_RULE
LIBTOOL_ALLOW_UNDEFINED
LIBTOOL_MODE_UNINSTALL
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+
int
main ()
{
-struct sockaddr_in6 sin6; return (0);
+
+ struct sockaddr_in6 sin6; return (0);
+
;
return 0;
}
if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- found_ipv6=yes
else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- found_ipv6=no
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "IPv6 support is mandatory
+See \`config.log' for more details" "$LINENO" 5; }
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
;;
esac
-#
-# Now delve deeper into the suitability of the IPv6 support.
-#
-case "$found_ipv6" in
- yes)
- ISC_PLATFORM_HAVEIPV6="#define ISC_PLATFORM_HAVEIPV6 1"
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for in6_addr" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for in6_addr" >&5
$as_echo_n "checking for in6_addr... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
int
main ()
{
-struct in6_addr in6; return (0);
+
+ struct in6_addr in6; return (0);
+
;
return 0;
}
if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- ISC_PLATFORM_HAVEINADDR6="#undef ISC_PLATFORM_HAVEINADDR6"
- isc_in_addr6_hack=""
+ ISC_PLATFORM_HAVEINADDR6="#undef ISC_PLATFORM_HAVEINADDR6"
+ isc_in_addr6_hack=""
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
- ISC_PLATFORM_HAVEINADDR6="#define ISC_PLATFORM_HAVEINADDR6 1"
- isc_in_addr6_hack="#define in6_addr in_addr6"
+ ISC_PLATFORM_HAVEINADDR6="#define ISC_PLATFORM_HAVEINADDR6 1"
+ isc_in_addr6_hack="#define in6_addr in_addr6"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for in6addr_any" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for in6addr_any" >&5
$as_echo_n "checking for in6addr_any... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-$isc_in_addr6_hack
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ $isc_in_addr6_hack
int
main ()
{
-struct in6_addr in6; in6 = in6addr_any; return (in6.s6_addr[0]);
+
+ struct in6_addr in6; in6 = in6addr_any; return (in6.s6_addr[0]);
+
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- ISC_PLATFORM_NEEDIN6ADDRANY="#undef ISC_PLATFORM_NEEDIN6ADDRANY"
+ ISC_PLATFORM_NEEDIN6ADDRANY="#undef ISC_PLATFORM_NEEDIN6ADDRANY"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
- ISC_PLATFORM_NEEDIN6ADDRANY="#define ISC_PLATFORM_NEEDIN6ADDRANY 1"
+ ISC_PLATFORM_NEEDIN6ADDRANY="#define ISC_PLATFORM_NEEDIN6ADDRANY 1"
fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for in6addr_loopback" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for in6addr_loopback" >&5
$as_echo_n "checking for in6addr_loopback... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-$isc_in_addr6_hack
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ $isc_in_addr6_hack
int
main ()
{
-struct in6_addr in6; in6 = in6addr_loopback; return (in6.s6_addr[0]);
+
+ struct in6_addr in6; in6 = in6addr_loopback; return (in6.s6_addr[0]);
+
;
return 0;
}
_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
+if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- ISC_PLATFORM_NEEDIN6ADDRLOOPBACK="#undef ISC_PLATFORM_NEEDIN6ADDRLOOPBACK"
+ ISC_PLATFORM_NEEDIN6ADDRLOOPBACK="#undef ISC_PLATFORM_NEEDIN6ADDRLOOPBACK"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
- ISC_PLATFORM_NEEDIN6ADDRLOOPBACK="#define ISC_PLATFORM_NEEDIN6ADDRLOOPBACK 1"
+ ISC_PLATFORM_NEEDIN6ADDRLOOPBACK="#define ISC_PLATFORM_NEEDIN6ADDRLOOPBACK 1"
fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sin6_scope_id in struct sockaddr_in6" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sin6_scope_id in struct sockaddr_in6" >&5
$as_echo_n "checking for sin6_scope_id in struct sockaddr_in6... " >&6; }
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
int
main ()
{
-struct sockaddr_in6 xyzzy; xyzzy.sin6_scope_id = 0; return (0);
+
+ struct sockaddr_in6 xyzzy; xyzzy.sin6_scope_id = 0; return (0);
+
;
return 0;
}
if ac_fn_c_try_compile "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
- ISC_PLATFORM_HAVESCOPEID="#define ISC_PLATFORM_HAVESCOPEID 1"
+ ISC_PLATFORM_HAVESCOPEID="#define ISC_PLATFORM_HAVESCOPEID 1"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
- ISC_PLATFORM_HAVESCOPEID="#undef ISC_PLATFORM_HAVESCOPEID"
+ ISC_PLATFORM_HAVESCOPEID="#undef ISC_PLATFORM_HAVESCOPEID"
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 "$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
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
int
main ()
{
-struct in6_pktinfo xyzzy; return (0);
+
+ struct in6_pktinfo xyzzy; return (0);
+
;
return 0;
}
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"
+ 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"
+ ISC_PLATFORM_HAVEIN6PKTINFO="#undef ISC_PLATFORM_HAVEIN6PKTINFO"
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- ;;
- no)
- ISC_PLATFORM_HAVEIPV6="#undef ISC_PLATFORM_HAVEIPV6"
- ISC_PLATFORM_NEEDIN6ADDRANY="#undef ISC_PLATFORM_NEEDIN6ADDRANY"
- ISC_PLATFORM_HAVEIN6PKTINFO="#undef ISC_PLATFORM_HAVEIN6PKTINFO"
- ISC_PLATFORM_HAVESCOPEID="#define ISC_PLATFORM_HAVESCOPEID 1"
- ISC_IPV6_H="ipv6.h"
- ISC_IPV6_O="ipv6.$O"
- ISC_ISCIPV6_O="unix/ipv6.$O"
- ISC_IPV6_C="ipv6.c"
- ;;
-esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_storage" >&5
$as_echo_n "checking for struct sockaddr_storage... " >&6; }
-
-
-
-
-
{ $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
# We do the IPv6 compilation checking after libtool so that we can put
# the right suffix on the files.
#
-AC_MSG_CHECKING(for IPv6 structures)
-AC_TRY_COMPILE([
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>],
-[struct sockaddr_in6 sin6; return (0);],
- [AC_MSG_RESULT(yes)
- found_ipv6=yes],
- [AC_MSG_RESULT(no)
- found_ipv6=no])
+AC_MSG_CHECKING([for IPv6 structures])
+AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ ]],
+ [[
+ struct sockaddr_in6 sin6; return (0);
+ ]])],
+ [AC_MSG_RESULT([yes])],
+ [AC_MSG_FAILURE([IPv6 support is mandatory])])
#
# See whether IPv6 support is provided via a Kame add-on.
;;
esac
-#
-# Now delve deeper into the suitability of the IPv6 support.
-#
-case "$found_ipv6" in
- yes)
- ISC_PLATFORM_HAVEIPV6="#define ISC_PLATFORM_HAVEIPV6 1"
-
- AC_MSG_CHECKING(for in6_addr)
- AC_TRY_COMPILE([
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-],
-[struct in6_addr in6; return (0);],
- [AC_MSG_RESULT(yes)
- ISC_PLATFORM_HAVEINADDR6="#undef ISC_PLATFORM_HAVEINADDR6"
- isc_in_addr6_hack=""],
- [AC_MSG_RESULT(no)
- ISC_PLATFORM_HAVEINADDR6="#define ISC_PLATFORM_HAVEINADDR6 1"
- isc_in_addr6_hack="#define in6_addr in_addr6"])
-
- AC_MSG_CHECKING(for in6addr_any)
- AC_TRY_LINK([
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-$isc_in_addr6_hack
-],
- [struct in6_addr in6; in6 = in6addr_any; return (in6.s6_addr[0]);],
- [AC_MSG_RESULT(yes)
- ISC_PLATFORM_NEEDIN6ADDRANY="#undef ISC_PLATFORM_NEEDIN6ADDRANY"],
- [AC_MSG_RESULT(no)
- ISC_PLATFORM_NEEDIN6ADDRANY="#define ISC_PLATFORM_NEEDIN6ADDRANY 1"])
-
- AC_MSG_CHECKING(for in6addr_loopback)
- AC_TRY_LINK([
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-$isc_in_addr6_hack
-],
- [struct in6_addr in6; in6 = in6addr_loopback; return (in6.s6_addr[0]);],
- [AC_MSG_RESULT(yes)
- ISC_PLATFORM_NEEDIN6ADDRLOOPBACK="#undef ISC_PLATFORM_NEEDIN6ADDRLOOPBACK"],
- [AC_MSG_RESULT(no)
- ISC_PLATFORM_NEEDIN6ADDRLOOPBACK="#define ISC_PLATFORM_NEEDIN6ADDRLOOPBACK 1"])
-
- AC_MSG_CHECKING(for sin6_scope_id in struct sockaddr_in6)
- AC_TRY_COMPILE([
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-],
- [struct sockaddr_in6 xyzzy; xyzzy.sin6_scope_id = 0; return (0);],
- [AC_MSG_RESULT(yes)
- ISC_PLATFORM_HAVESCOPEID="#define ISC_PLATFORM_HAVESCOPEID 1"],
- [AC_MSG_RESULT(no)
- ISC_PLATFORM_HAVESCOPEID="#undef ISC_PLATFORM_HAVESCOPEID"])
-
- AC_MSG_CHECKING(for in6_pktinfo)
- AC_TRY_COMPILE([
-#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"])
- ;;
- no)
- ISC_PLATFORM_HAVEIPV6="#undef ISC_PLATFORM_HAVEIPV6"
- ISC_PLATFORM_NEEDIN6ADDRANY="#undef ISC_PLATFORM_NEEDIN6ADDRANY"
- ISC_PLATFORM_HAVEIN6PKTINFO="#undef ISC_PLATFORM_HAVEIN6PKTINFO"
- ISC_PLATFORM_HAVESCOPEID="#define ISC_PLATFORM_HAVESCOPEID 1"
- ISC_IPV6_H="ipv6.h"
- ISC_IPV6_O="ipv6.$O"
- ISC_ISCIPV6_O="unix/ipv6.$O"
- ISC_IPV6_C="ipv6.c"
- ;;
-esac
+AC_MSG_CHECKING([for in6_addr])
+AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ ]],
+ [[
+ struct in6_addr in6; return (0);
+ ]])],
+ [AC_MSG_RESULT([yes])
+ ISC_PLATFORM_HAVEINADDR6="#undef ISC_PLATFORM_HAVEINADDR6"
+ isc_in_addr6_hack=""],
+ [AC_MSG_RESULT([no])
+ ISC_PLATFORM_HAVEINADDR6="#define ISC_PLATFORM_HAVEINADDR6 1"
+ isc_in_addr6_hack="#define in6_addr in_addr6"])
+
+AC_MSG_CHECKING([for in6addr_any])
+AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ $isc_in_addr6_hack
+ ]],
+ [[
+ struct in6_addr in6; in6 = in6addr_any; return (in6.s6_addr[0]);
+ ]])],
+ [AC_MSG_RESULT([yes])
+ ISC_PLATFORM_NEEDIN6ADDRANY="#undef ISC_PLATFORM_NEEDIN6ADDRANY"],
+ [AC_MSG_RESULT([no])
+ ISC_PLATFORM_NEEDIN6ADDRANY="#define ISC_PLATFORM_NEEDIN6ADDRANY 1"])
+
+AC_MSG_CHECKING([for in6addr_loopback])
+AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ $isc_in_addr6_hack
+ ]],
+ [[
+ struct in6_addr in6; in6 = in6addr_loopback; return (in6.s6_addr[0]);
+ ]])],
+ [AC_MSG_RESULT(yes)
+ ISC_PLATFORM_NEEDIN6ADDRLOOPBACK="#undef ISC_PLATFORM_NEEDIN6ADDRLOOPBACK"],
+ [AC_MSG_RESULT(no)
+ ISC_PLATFORM_NEEDIN6ADDRLOOPBACK="#define ISC_PLATFORM_NEEDIN6ADDRLOOPBACK 1"])
+
+AC_MSG_CHECKING([for sin6_scope_id in struct sockaddr_in6])
+AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ ]],
+ [[
+ struct sockaddr_in6 xyzzy; xyzzy.sin6_scope_id = 0; return (0);
+ ]])],
+ [AC_MSG_RESULT([yes])
+ ISC_PLATFORM_HAVESCOPEID="#define ISC_PLATFORM_HAVESCOPEID 1"],
+ [AC_MSG_RESULT([no])
+ ISC_PLATFORM_HAVESCOPEID="#undef ISC_PLATFORM_HAVESCOPEID"])
+
+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([
[AC_MSG_RESULT(no)
ISC_PLATFORM_HAVESOCKADDRSTORAGE="#undef ISC_PLATFORM_HAVESOCKADDRSTORAGE"])
-AC_SUBST(ISC_PLATFORM_HAVEIPV6)
AC_SUBST(ISC_PLATFORM_HAVEINADDR6)
AC_SUBST(ISC_PLATFORM_NEEDIN6ADDRANY)
AC_SUBST(ISC_PLATFORM_NEEDIN6ADDRLOOPBACK)
AC_SUBST(ISC_PLATFORM_HAVEIN6PKTINFO)
AC_SUBST(ISC_PLATFORM_HAVESOCKADDRSTORAGE)
-AC_SUBST(ISC_IPV6_H)
-AC_SUBST(ISC_IPV6_O)
-AC_SUBST(ISC_ISCIPV6_O)
-AC_SUBST(ISC_IPV6_C)
AC_SUBST(ISC_PLATFORM_HAVESCOPEID)
AC_MSG_CHECKING([for struct if_laddrreq])
CWARNINGS =
# Alphabetically
-UNIXOBJS = @ISC_ISCIPV6_O@ unix/pk11_api.@O@ \
+UNIXOBJS = unix/pk11_api.@O@ \
unix/app.@O@ unix/dir.@O@ unix/errno.@O@ \
unix/errno2result.@O@ unix/file.@O@ unix/fsaccess.@O@ \
unix/interfaceiter.@O@ unix/keyboard.@O@ unix/meminfo.@O@ \
+++ /dev/null
-/*
- * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * See the COPYRIGHT file distributed with this work for additional
- * information regarding copyright ownership.
- */
-
-#ifndef ISC_IPV6_H
-#define ISC_IPV6_H 1
-
-/*****
- ***** Module Info
- *****/
-
-/*! \file isc/ipv6.h
- * \brief IPv6 definitions for systems which do not support IPv6.
- *
- * \li MP:
- * No impact.
- *
- * \li Reliability:
- * No anticipated impact.
- *
- * \li Resources:
- * N/A.
- *
- * \li Security:
- * No anticipated impact.
- *
- * \li Standards:
- * RFC2553.
- */
-
-/***
- *** Imports.
- ***/
-
-#include <inttypes.h>
-#include <isc/platform.h>
-
-/***
- *** Types.
- ***/
-
-struct in6_addr {
- union {
- uint8_t _S6_u8[16];
- uint16_t _S6_u16[8];
- uint32_t _S6_u32[4];
- } _S6_un;
-};
-#define s6_addr _S6_un._S6_u8
-#define s6_addr8 _S6_un._S6_u8
-#define s6_addr16 _S6_un._S6_u16
-#define s6_addr32 _S6_un._S6_u32
-
-#define IN6ADDR_ANY_INIT {{{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }}}
-#define IN6ADDR_LOOPBACK_INIT {{{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 }}}
-
-LIBISC_EXTERNAL_DATA extern const struct in6_addr in6addr_any;
-LIBISC_EXTERNAL_DATA extern const struct in6_addr in6addr_loopback;
-
-struct sockaddr_in6 {
-#ifdef ISC_PLATFORM_HAVESALEN
- uint8_t sin6_len;
- uint8_t sin6_family;
-#else
- uint16_t sin6_family;
-#endif
- uint16_t sin6_port;
- uint32_t sin6_flowinfo;
- struct in6_addr sin6_addr;
- uint32_t sin6_scope_id;
-};
-
-#ifdef ISC_PLATFORM_HAVESALEN
-#define SIN6_LEN 1
-#endif
-
-/*%
- * Unspecified
- */
-#define IN6_IS_ADDR_UNSPECIFIED(a) \
- (((a)->s6_addr32[0] == 0) && \
- ((a)->s6_addr32[1] == 0) && \
- ((a)->s6_addr32[2] == 0) && \
- ((a)->s6_addr32[3] == 0))
-
-/*%
- * Loopback
- */
-#define IN6_IS_ADDR_LOOPBACK(a) \
- (((a)->s6_addr32[0] == 0) && \
- ((a)->s6_addr32[1] == 0) && \
- ((a)->s6_addr32[2] == 0) && \
- ((a)->s6_addr32[3] == htonl(1)))
-
-/*%
- * IPv4 compatible
- */
-#define IN6_IS_ADDR_V4COMPAT(a) \
- (((a)->s6_addr32[0] == 0) && \
- ((a)->s6_addr32[1] == 0) && \
- ((a)->s6_addr32[2] == 0) && \
- ((a)->s6_addr32[3] != 0) && \
- ((a)->s6_addr32[3] != htonl(1)))
-
-/*%
- * Mapped
- */
-#define IN6_IS_ADDR_V4MAPPED(a) \
- (((a)->s6_addr32[0] == 0) && \
- ((a)->s6_addr32[1] == 0) && \
- ((a)->s6_addr32[2] == htonl(0x0000ffff)))
-
-/*%
- * Multicast
- */
-#define IN6_IS_ADDR_MULTICAST(a) \
- ((a)->s6_addr8[0] == 0xffU)
-
-/*%
- * Unicast link / site local.
- */
-#define IN6_IS_ADDR_LINKLOCAL(a) \
- (((a)->s6_addr[0] == 0xfe) && (((a)->s6_addr[1] & 0xc0) == 0x80))
-#define IN6_IS_ADDR_SITELOCAL(a) \
- (((a)->s6_addr[0] == 0xfe) && (((a)->s6_addr[1] & 0xc0) == 0xc0))
-
-#endif /* ISC_IPV6_H */
*/
@ISC_PLATFORM_HAVESALEN@
-/*! \brief
- * If this system has the IPv6 structure definitions, ISC_PLATFORM_HAVEIPV6
- * will be defined.
- */
-@ISC_PLATFORM_HAVEIPV6@
-
/*! \brief
* If this system is missing in6addr_any, ISC_PLATFORM_NEEDIN6ADDRANY will
* be defined.
atf_tc_set_md_var(tc, "descr", "udp dscp ipv6");
}
ATF_TC_BODY(udp_dscp_v6, tc) {
-#if defined(ISC_PLATFORM_HAVEIPV6)
isc_result_t result;
isc_sockaddr_t addr1, addr2;
struct in6_addr in6;
isc_socket_detach(&s2);
isc_test_end();
-#else
- UNUSED(tc);
- atf_tc_skip("IPv6 not available");
-#endif
}
/* Test TCP sendto/recv (IPv4) */
atf_tc_set_md_var(tc, "descr", "tcp dscp ipv6");
}
ATF_TC_BODY(tcp_dscp_v6, tc) {
-#ifdef ISC_PLATFORM_HAVEIPV6
isc_result_t result;
isc_sockaddr_t addr1;
struct in6_addr in6;
isc_socket_detach(&s3);
isc_test_end();
-#else
- UNUSED(tc);
- atf_tc_skip("IPv6 not available");
-#endif
}
ATF_TC(net_probedscp);
CWARNINGS =
# Alphabetically
-OBJS = @ISC_IPV6_O@ pk11_api.@O@ \
+OBJS = pk11_api.@O@ \
app.@O@ dir.@O@ errno.@O@ errno2result.@O@ \
file.@O@ fsaccess.@O@ interfaceiter.@O@ \
keyboard.@O@ meminfo.@O@ \
strerror.@O@ syslog.@O@ time.@O@
# Alphabetically
-SRCS = @ISC_IPV6_C@ pk11_api.c \
+SRCS = pk11_api.c \
app.c dir.c errno.c errno2result.c \
file.c fsaccess.c interfaceiter.c keyboard.c meminfo.c \
net.c os.c resource.c socket.c stdio.c stdtime.c \
memmove(&ifreq, ifrp, sizeof(ifreq));
family = ifreq.ifr_addr.sa_family;
-#if defined(ISC_PLATFORM_HAVEIPV6)
if (family != AF_INET && family != AF_INET6)
-#else
- if (family != AF_INET)
-#endif
return (ISC_R_IGNORE);
memset(&iter->current, 0, sizeof(iter->current));
memmove(&lifreq, ifrp, sizeof(lifreq));
family = lifreq.lifr_addr.ss_family;
-#ifdef ISC_PLATFORM_HAVEIPV6
if (family != AF_INET && family != AF_INET6)
-#else
- if (family != AF_INET)
-#endif
return (ISC_R_IGNORE);
memset(&iter->current, 0, sizeof(iter->current));
#include <netinet/in.h> /* Contractual promise. */
#include <arpa/inet.h> /* Contractual promise. */
-#ifndef ISC_PLATFORM_HAVEIPV6
-#include <isc/ipv6.h> /* Contractual promise. */
-#endif
-
#include <isc/lang.h>
#include <isc/types.h>
#define in6_addr in_addr6 /*%< Required for pre RFC2133 implementations. */
#endif
-#ifdef ISC_PLATFORM_HAVEIPV6
#ifndef IN6ADDR_ANY_INIT
#ifdef s6_addr
/*%
#define IN6_IS_ADDR_LOOPBACK(x) \
(memcmp((x)->s6_addr, in6addr_loopback.s6_addr, 16) == 0)
#endif
-#endif
#ifndef AF_INET6
/*% IPv6 */
};
#endif
-#if defined(ISC_PLATFORM_HAVEIPV6) && defined(ISC_PLATFORM_NEEDIN6ADDRANY)
+#if defined(ISC_PLATFORM_NEEDIN6ADDRANY)
extern const struct in6_addr isc_net_in6addrany;
/*%
* Cope with a missing in6addr_any and in6addr_loopback.
#define in6addr_any isc_net_in6addrany
#endif
-#if defined(ISC_PLATFORM_HAVEIPV6) && defined(ISC_PLATFORM_NEEDIN6ADDRLOOPBACK)
+#if defined(ISC_PLATFORM_NEEDIN6ADDRLOOPBACK)
extern const struct in6_addr isc_net_in6addrloop;
#define in6addr_loopback isc_net_in6addrloop
#endif
+++ /dev/null
-/*
- * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * See the COPYRIGHT file distributed with this work for additional
- * information regarding copyright ownership.
- */
-
-
-/*! \file */
-
-#include <config.h>
-
-#include <isc/ipv6.h>
-
-const struct in6_addr in6addr_any = IN6ADDR_ANY_INIT;
-const struct in6_addr in6addr_loopback = IN6ADDR_LOOPBACK_INIT;
#endif /* HAVE_SYSCTLBYNAME */
-#if defined(ISC_PLATFORM_HAVEIPV6)
-# if defined(ISC_PLATFORM_NEEDIN6ADDRANY)
+#if defined(ISC_PLATFORM_NEEDIN6ADDRANY)
const struct in6_addr isc_net_in6addrany = IN6ADDR_ANY_INIT;
-# endif
+#endif
-# if defined(ISC_PLATFORM_NEEDIN6ADDRLOOPBACK)
+#if defined(ISC_PLATFORM_NEEDIN6ADDRLOOPBACK)
const struct in6_addr isc_net_in6addrloop = IN6ADDR_LOOPBACK_INIT;
-# endif
+#endif
static isc_once_t once_ipv6only = ISC_ONCE_INIT;
-# if defined(ISC_PLATFORM_HAVEIN6PKTINFO)
+#if defined(ISC_PLATFORM_HAVEIN6PKTINFO)
static isc_once_t once_ipv6pktinfo = ISC_ONCE_INIT;
-# endif
-#endif /* ISC_PLATFORM_HAVEIPV6 */
+#endif
#ifndef ISC_CMSG_IP_TOS
#ifdef __APPLE__
}
}
-#ifdef ISC_PLATFORM_HAVEIPV6
#ifdef ISC_PLATFORM_HAVEIN6PKTINFO
if (domain == PF_INET6) {
struct sockaddr_in6 sin6;
}
}
}
-#endif
#endif
(void)close(s);
static void
initialize_action(void) {
ipv4_result = try_proto(PF_INET);
-#ifdef ISC_PLATFORM_HAVEIPV6
#ifdef ISC_PLATFORM_HAVEIN6PKTINFO
ipv6_result = try_proto(PF_INET6);
#endif
-#endif
#ifdef ISC_PLATFORM_HAVESYSUNH
unix_result = try_proto(PF_UNIX);
#endif
return (unix_result);
}
-#ifdef ISC_PLATFORM_HAVEIPV6
static void
try_ipv6only(void) {
#ifdef IPV6_V6ONLY
try_ipv6pktinfo) == ISC_R_SUCCESS);
}
#endif /* ISC_PLATFORM_HAVEIN6PKTINFO */
-#endif /* ISC_PLATFORM_HAVEIPV6 */
isc_result_t
isc_net_probe_ipv6only(void) {
-#ifdef ISC_PLATFORM_HAVEIPV6
initialize_ipv6only();
-#endif
return (ipv6only_result);
}
isc_result_t
isc_net_probe_ipv6pktinfo(void) {
-#ifdef ISC_PLATFORM_HAVEIPV6
#ifdef ISC_PLATFORM_HAVEIN6PKTINFO
initialize_ipv6pktinfo();
-#endif
#endif
return (ipv6pktinfo_result);
}
static void
try_dscp_v6(void) {
-#ifdef ISC_PLATFORM_HAVEIPV6
#ifdef IPV6_TCLASS
char strbuf[ISC_STRERRORSIZE];
struct addrinfo hints, *res0;
close(s);
#endif /* IPV6_TCLASS */
-#endif /* ISC_PLATFORM_HAVEIPV6 */
}
static void
ISC_SOCKADDR_LEN_T len;
fd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
-#if defined(ISC_PLATFORM_HAVEIPV6)
if (fd == -1) {
switch (errno) {
case EPROTONOSUPPORT:
break;
}
}
-#endif
if (fd == -1)
return;
}
#endif /* SO_TIMESTAMP */
-#if defined(ISC_PLATFORM_HAVEIPV6)
#ifdef ISC_PLATFORM_HAVEIN6PKTINFO
#ifdef IPV6_RECVPKTINFO
/* RFC 3542 */
sizeof(action));
}
#endif
-#endif /* ISC_PLATFORM_HAVEIPV6 */
#endif /* defined(USE_CMSG) */
#if defined(IP_MTU_DISCOVER) && defined(IP_PMTUDISC_DONT)
#define PATH_MAX _MAX_PATH
#endif
-#define ISC_PLATFORM_HAVEIPV6
#if _MSC_VER > 1200
#define ISC_PLATFORM_HAVEIN6PKTINFO
#endif
#define ISC_NET_PORTRANGEHIGH 65535
#endif /* ISC_NET_PORTRANGEHIGH */
-#if defined(ISC_PLATFORM_HAVEIPV6) && defined(ISC_PLATFORM_NEEDIN6ADDRANY)
+#if defined(ISC_PLATFORM_NEEDIN6ADDRANY)
const struct in6_addr isc_net_in6addrany = IN6ADDR_ANY_INIT;
#endif
initialize_action(void) {
InitSockets();
ipv4_result = try_proto(PF_INET);
-#ifdef ISC_PLATFORM_HAVEIPV6
#ifdef ISC_PLATFORM_HAVEIN6PKTINFO
ipv6_result = try_proto(PF_INET6);
#endif
-#endif
}
static void
return (ISC_R_NOTFOUND);
}
-#ifdef ISC_PLATFORM_HAVEIPV6
static void
try_ipv6only(void) {
#ifdef IPV6_V6ONLY
try_ipv6pktinfo) == ISC_R_SUCCESS);
}
#endif /* __notyet__ */
-#endif /* ISC_PLATFORM_HAVEIPV6 */
isc_result_t
isc_net_probe_ipv6only(void) {
-#ifdef ISC_PLATFORM_HAVEIPV6
initialize_ipv6only();
-#endif
return (ipv6only_result);
}
isc_result_t
isc_net_probe_ipv6pktinfo(void) {
#ifdef __notyet__
-#ifdef ISC_PLATFORM_HAVEIPV6
initialize_ipv6pktinfo();
-#endif
#endif /* __notyet__ */
return (ipv6pktinfo_result);
}
* to collect the destination address and interface so the client can
* set them on outgoing packets.
*/
-#ifdef ISC_PLATFORM_HAVEIPV6
#ifndef USE_CMSG
#define USE_CMSG 1
#endif
-#endif
/*
* We really don't want to try and use these control messages. Win32
if (type == isc_sockettype_udp) {
#if defined(USE_CMSG)
-#if defined(ISC_PLATFORM_HAVEIPV6)
#ifdef IPV6_RECVPKTINFO
/* 2292bis */
if ((pf == AF_INET6)
strbuf);
}
#endif /* IPV6_RECVPKTINFO */
-#endif /* ISC_PLATFORM_HAVEIPV6 */
#endif /* defined(USE_CMSG) */
#if defined(SO_RCVBUF)