***/
@TOP@
-/** define on DEC OSF to enable 4.4BSD style sa_len support */
-#undef _SOCKADDR_LEN
-
/** define if your system needs pthread_init() before using pthreads */
#undef NEED_PTHREAD_INIT
*** it does not get installed.
***/
-/** define on DEC OSF to enable 4.4BSD style sa_len support */
-#undef _SOCKADDR_LEN
-
/** define if your system needs pthread_init() before using pthreads */
#undef NEED_PTHREAD_INIT
/* Define if Thread-Local Storage is available */
#undef HAVE_TLS
-/* Define if running under Compaq TruCluster */
-#undef HAVE_TRUCLUSTER
-
/* Define to 1 if the system has the type `uintptr_t'. */
#undef HAVE_UINTPTR_T
# OS dependent CC flags
#
case "$host" in
- # OSF 5.0: recv/send are only available with -D_POSIX_PII_SOCKET or
- # -D_XOPEN_SOURCE_EXTENDED.
- *-dec-osf*)
- STD_CDEFINES="$STD_CDEFINES -D_POSIX_PII_SOCKET"
- CPPFLAGS="$CPPFLAGS -D_POSIX_PII_SOCKET"
- ;;
# Solaris: need -D_XPG4_2 and -D__EXTENSIONS__ for CMSG macros
*-solaris*)
STD_CDEFINES="$STD_CDEFINES -D_XPG4_2 -D__EXTENSIONS__"
fi
else
case $host in
- *-dec-osf*)
- CC="$CC -std"
- CCOPT="$CCOPT -std"
- CCNOOPT="$CCNOOPT -std"
- MKDEPCC="$CC"
- ;;
*-sgi-irix*)
STD_CWARNINGS="-fullwarn -woff 1209"
#
-#
-# Look for a 4.4BSD-style sa_len member in struct sockaddr.
-#
-case "$host" in
- *-dec-osf*)
- # Turn on 4.4BSD style sa_len support.
- $as_echo "#define _SOCKADDR_LEN 1" >>confdefs.h
-
- ;;
-esac
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sa_len in struct sockaddr" >&5
$as_echo_n "checking for sa_len in struct sockaddr... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-#
-# Compaq TruCluster requires more code for handling cluster IP aliases
-#
-case "$host" in
- *-dec-osf*)
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clua_getaliasaddress in -lclua" >&5
-$as_echo_n "checking for clua_getaliasaddress in -lclua... " >&6; }
-if ${ac_cv_lib_clua_clua_getaliasaddress+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lclua $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char clua_getaliasaddress ();
-int
-main ()
-{
-return clua_getaliasaddress ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_clua_clua_getaliasaddress=yes
-else
- ac_cv_lib_clua_clua_getaliasaddress=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_clua_clua_getaliasaddress" >&5
-$as_echo "$ac_cv_lib_clua_clua_getaliasaddress" >&6; }
-if test "x$ac_cv_lib_clua_clua_getaliasaddress" = xyes; then :
- LIBS="-lclua $LIBS"
-fi
-
- ac_fn_c_check_func "$LINENO" "clua_getaliasaddress" "ac_cv_func_clua_getaliasaddress"
-if test "x$ac_cv_func_clua_getaliasaddress" = xyes; then :
-
-$as_echo "#define HAVE_TRUCLUSTER 1" >>confdefs.h
-
-fi
-
- ;;
- *)
- ;;
-esac
-
#
# Some hosts need msg_namelen to match the size of the socket structure.
# Some hosts don't set msg_namelen appropriately on return from recvmsg().
# OS dependent CC flags
#
case "$host" in
- # OSF 5.0: recv/send are only available with -D_POSIX_PII_SOCKET or
- # -D_XOPEN_SOURCE_EXTENDED.
- *-dec-osf*)
- STD_CDEFINES="$STD_CDEFINES -D_POSIX_PII_SOCKET"
- CPPFLAGS="$CPPFLAGS -D_POSIX_PII_SOCKET"
- ;;
# Solaris: need -D_XPG4_2 and -D__EXTENSIONS__ for CMSG macros
*-solaris*)
STD_CDEFINES="$STD_CDEFINES -D_XPG4_2 -D__EXTENSIONS__"
fi
else
case $host in
- *-dec-osf*)
- CC="$CC -std"
- CCOPT="$CCOPT -std"
- CCNOOPT="$CCNOOPT -std"
- MKDEPCC="$CC"
- ;;
*-sgi-irix*)
STD_CWARNINGS="-fullwarn -woff 1209"
#
AC_SUBST(ISC_EXTRA_OBJS)
AC_SUBST(ISC_EXTRA_SRCS)
-#
-# Look for a 4.4BSD-style sa_len member in struct sockaddr.
-#
-case "$host" in
- *-dec-osf*)
- # Turn on 4.4BSD style sa_len support.
- AC_DEFINE(_SOCKADDR_LEN)
- ;;
-esac
-
AC_MSG_CHECKING(for sa_len in struct sockaddr)
AC_TRY_COMPILE([
#include <sys/types.h>
ISC_PLATFORM_HAVESTATNSEC="#undef ISC_PLATFORM_HAVESTATNSEC"])
AC_SUBST(ISC_PLATFORM_HAVESTATNSEC)
-#
-# Compaq TruCluster requires more code for handling cluster IP aliases
-#
-case "$host" in
- *-dec-osf*)
- AC_CHECK_LIB(clua, clua_getaliasaddress, LIBS="-lclua $LIBS")
- AC_CHECK_FUNC(clua_getaliasaddress,
- AC_DEFINE(HAVE_TRUCLUSTER, 1,
- [Define if running under Compaq TruCluster]))
- ;;
- *)
- ;;
-esac
-
#
# Some hosts need msg_namelen to match the size of the socket structure.
# Some hosts don't set msg_namelen appropriately on return from recvmsg().
isc_result_t result6; /* Last result code. */
bool first6;
#endif
-#ifdef HAVE_TRUCLUSTER
- int clua_context; /* Cluster alias context */
- bool clua_done;
- struct sockaddr clua_sa;
-#endif
#ifdef __linux
FILE * proc;
char entry[ISC_IF_INET6_SZ];
isc_result_t result; /* Last result code. */
};
-#ifdef HAVE_TRUCLUSTER
-#include <clua/clua.h>
-#include <sys/socket.h>
-#endif
-
-
/*%
* Size of buffer for SIOCGLIFCONF, in bytes. We assume no sane system
* will have more than a megabyte of interface configuration data.
* A newly created iterator has an undefined position
* until isc_interfaceiter_first() is called.
*/
-#ifdef HAVE_TRUCLUSTER
- iter->clua_context = -1;
- iter->clua_done = true;
-#endif
#ifdef __linux
iter->proc = fopen("/proc/net/if_inet6", "r");
iter->valid = ISC_R_FAILURE;
return (result);
}
-#ifdef HAVE_TRUCLUSTER
-static void
-get_inaddr(isc_netaddr_t *dst, struct in_addr *src) {
- dst->family = AF_INET;
- memmove(&dst->type.in, src, sizeof(struct in_addr));
-}
-
-static isc_result_t
-internal_current_clusteralias(isc_interfaceiter_t *iter) {
- struct clua_info ci;
- if (clua_getaliasinfo(&iter->clua_sa, &ci) != CLUA_SUCCESS)
- return (ISC_R_IGNORE);
- memset(&iter->current, 0, sizeof(iter->current));
- iter->current.af = iter->clua_sa.sa_family;
- memset(iter->current.name, 0, sizeof(iter->current.name));
- snprintf(iter->current.name, sizeof(iter->current.name),
- "clua%d", ci.aliasid);
- iter->current.flags = INTERFACE_F_UP;
- get_inaddr(&iter->current.address, &ci.addr);
- get_inaddr(&iter->current.netmask, &ci.netmask);
- return (ISC_R_SUCCESS);
-}
-#endif
-
/*
* Get information about the current interface to iter->current.
* If successful, return ISC_R_SUCCESS.
if (iter->result6 != ISC_R_NOMORE)
return (iter->result6);
}
-#endif
-#ifdef HAVE_TRUCLUSTER
- if (!iter->clua_done)
- return(internal_current_clusteralias(iter));
#endif
return (internal_current4(iter));
}
static isc_result_t
internal_next(isc_interfaceiter_t *iter) {
-#ifdef HAVE_TRUCLUSTER
- int clua_result;
-#endif
#if defined(SIOCGLIFCONF) && defined(SIOCGLIFADDR)
if (iter->mode == 6) {
iter->result6 = internal_next6(iter);
return (ISC_R_SUCCESS);
}
}
-#endif
-#ifdef HAVE_TRUCLUSTER
- if (!iter->clua_done) {
- clua_result = clua_getaliasaddress(&iter->clua_sa,
- &iter->clua_context);
- if (clua_result != CLUA_SUCCESS)
- iter->clua_done = true;
- return (ISC_R_SUCCESS);
- }
#endif
return (internal_next4(iter));
}
static
void internal_first(isc_interfaceiter_t *iter) {
-#ifdef HAVE_TRUCLUSTER
- int clua_result;
-#endif
iter->pos = 0;
#if defined(SIOCGLIFCONF) && defined(SIOCGLIFADDR)
iter->pos6 = 0;
iter->result6 = ISC_R_SUCCESS;
iter->first6 = true;
#endif
-#ifdef HAVE_TRUCLUSTER
- iter->clua_context = 0;
- clua_result = clua_getaliasaddress(&iter->clua_sa,
- &iter->clua_context);
- iter->clua_done = (clua_result != CLUA_SUCCESS);
-#endif
#ifdef __linux
linux_if_inet6_first(iter);
#endif