HAVE_PF_NAT_THROUGH_PF_NORDR)
endif(HAVE_NET_PFVAR_H)
check_include_file(netinet/if_ether.h HAVE_NETINET_IF_ETHER_H)
- if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
- #
- # linux/if_bonding.h requires sys/socket.h.
- #
- check_include_files("sys/socket.h;linux/if_bonding.h" HAVE_LINUX_IF_BONDING_H)
- endif()
endif(NOT WIN32)
#
/* define if we have the Linux getprotobyname_r() */
#cmakedefine HAVE_LINUX_GETPROTOBYNAME_R 1
-/* Define to 1 if you have the <linux/if_bonding.h> header file. */
-#cmakedefine HAVE_LINUX_IF_BONDING_H 1
-
/* Define to 1 if you have the <linux/net_tstamp.h> header file. */
#cmakedefine HAVE_LINUX_NET_TSTAMP_H 1
/* define if we have the Linux getprotobyname_r() */
#undef HAVE_LINUX_GETPROTOBYNAME_R
-/* Define to 1 if you have the <linux/if_bonding.h> header file. */
-#undef HAVE_LINUX_IF_BONDING_H
-
/* Define to 1 if you have the <linux/net_tstamp.h> header file. */
#undef HAVE_LINUX_NET_TSTAMP_H
fi
case "$host_os" in
-linux*|uclinux*)
- #
- # linux/if_bonding.h requires sys/socket.h.
- #
- for ac_header in linux/if_bonding.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "linux/if_bonding.h" "ac_cv_header_linux_if_bonding_h" "
-#include <sys/socket.h>
-#include <linux/if.h>
-
-"
-if test "x$ac_cv_header_linux_if_bonding_h" = xyes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LINUX_IF_BONDING_H 1
-_ACEOF
-
-fi
-
-done
-
- ;;
-
haiku*)
#
# Haiku needs _BSD_SOURCE for the _IO* macros because it doesn't use them.
fi
case "$host_os" in
-linux*|uclinux*)
- #
- # linux/if_bonding.h requires sys/socket.h.
- #
- AC_CHECK_HEADERS(linux/if_bonding.h,,,
- [
-#include <sys/socket.h>
-#include <linux/if.h>
- ])
- ;;
-
haiku*)
#
# Haiku needs _BSD_SOURCE for the _IO* macros because it doesn't use them.
#include <linux/net_tstamp.h>
#endif
-#ifdef HAVE_LINUX_IF_BONDING_H
-#include <linux/if_bonding.h>
-
/*
- * The ioctl code to use to check whether a device is a bonding device.
+ * For checking whether a device is a bonding device.
*/
-#if defined(SIOCBONDINFOQUERY)
- #define BOND_INFO_QUERY_IOCTL SIOCBONDINFOQUERY
-#elif defined(BOND_INFO_QUERY_OLD)
- #define BOND_INFO_QUERY_IOCTL BOND_INFO_QUERY_OLD
-#endif
-#endif /* HAVE_LINUX_IF_BONDING_H */
+#include <linux/if_bonding.h>
/*
* Got Wireless Extensions?
static int
is_bonding_device(int fd, const char *device)
{
-#ifdef BOND_INFO_QUERY_IOCTL
struct ifreq ifr;
ifbond ifb;
pcap_strlcpy(ifr.ifr_name, device, sizeof ifr.ifr_name);
memset(&ifb, 0, sizeof ifb);
ifr.ifr_data = (caddr_t)&ifb;
- if (ioctl(fd, BOND_INFO_QUERY_IOCTL, &ifr) == 0)
+ if (ioctl(fd, SIOCBONDINFOQUERY, &ifr) == 0)
return 1; /* success, so it's a bonding device */
-#endif /* BOND_INFO_QUERY_IOCTL */
return 0; /* no, it's not a bonding device */
}