Commit fb41a74a authored by Eddie Kohler's avatar Eddie Kohler

AddressInfo internals: Look up addresses using getifaddrs().

This library function is more standardized than the hodgepodge used
previously: it works on FreeBSD, Mac, and Linux.  However, I'm not sure
libraries like uclibc provide it, so keep the old Linux version; but use it
only if getifaddrs is not available.
Signed-off-by: default avatarEddie Kohler <ekohler@gmail.com>
parent 7492b45f
......@@ -65,6 +65,9 @@
/* Define if 'struct if_data' has an 'ifi_datalen' member. */
#undef HAVE_IF_DATA_IFI_DATALEN
/* Define if you have the <ifaddrs.h> header file. */
#undef HAVE_IFADDRS_H
/* Define if 'int64_t' is typedefed to 'long' at user level. */
#undef HAVE_INT64_IS_LONG_USERLEVEL
......@@ -92,15 +95,24 @@
/* Define if you have the <net/bpf.h> header file. */
#undef HAVE_NET_BPF_H
/* Define if you have the <net/if_dl.h> header file. */
#undef HAVE_NET_IF_DL_H
/* Define if you have the <net/if_tap.h> header file. */
#undef HAVE_NET_IF_TAP_H
/* Define if you have the <net/if_tun.h> header file. */
#undef HAVE_NET_IF_TUN_H
/* Define if you have the <net/if_types.h> header file. */
#undef HAVE_NET_IF_TYPES_H
/* Define if you have the <netdb.h> header file. */
#undef HAVE_NETDB_H
/* Define if you have the <netpacket/packet.h> header file. */
#undef HAVE_NETPACKET_PACKET_H
/* Define if <new.h> exists and works. */
#undef HAVE_NEW_H
......
......@@ -9532,7 +9532,7 @@ fi
for ac_header in linux/if_tun.h net/if_tun.h net/if_tap.h net/bpf.h
for ac_header in ifaddrs.h linux/if_tun.h net/if_dl.h net/if_tap.h net/if_tun.h net/if_types.h net/bpf.h netpacket/packet.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
......
......@@ -440,7 +440,7 @@ dnl
dnl timestamps
dnl
AC_CHECK_HEADERS(time.h)
AC_CHECK_HEADERS([time.h])
AC_CHECK_SIZEOF([struct timeval])
AC_CHECK_TYPES([struct timespec], have_timespec=yes, have_timespec=no)
if test "x$have_timespec" = xyes; then
......@@ -507,11 +507,11 @@ dnl
dnl headers, event detection, dynamic linking
dnl
AC_CHECK_HEADERS(termio.h netdb.h sys/event.h pwd.h grp.h execinfo.h)
AC_CHECK_HEADERS([termio.h netdb.h sys/event.h pwd.h grp.h execinfo.h])
CLICK_CHECK_POLL_H
AC_CHECK_FUNCS(pselect sigaction)
AC_CHECK_FUNCS([pselect sigaction])
AC_CHECK_FUNCS(kqueue, have_kqueue=yes)
AC_CHECK_FUNCS([kqueue], [have_kqueue=yes])
if test "x$have_kqueue" = xyes; then
AC_CACHE_CHECK([whether EV_SET last argument is void *], [ac_cv_ev_set_udata_pointer],
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
......@@ -961,7 +961,7 @@ dnl
dnl kernel interfaces
dnl
AC_CHECK_HEADERS(linux/if_tun.h net/if_tun.h net/if_tap.h net/bpf.h)
AC_CHECK_HEADERS([ifaddrs.h linux/if_tun.h net/if_dl.h net/if_tap.h net/if_tun.h net/if_types.h net/bpf.h netpacket/packet.h])
dnl
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment