Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug #178 ensure --with-testnic does not affect replay #503

Merged
merged 1 commit into from
Oct 21, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 44 additions & 20 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1755,38 +1755,71 @@ AC_ARG_WITH(testnic,
nic2=$withval
AC_MSG_RESULT([Using --with-testnic=$withval])],
[
case $host in
*-*-linux*)
nic1=eth0
nic2=eth0
;;

*-*-solaris*)
nic1=hme0
nic2=hme0
;;

*-*-sunos*)
nic1=hme0
nic2=hme0
;;

*-apple-darwin*)
nic1=en0
nic2=en0
;;

*-*-openbsd*)
nic1=xl0
nic2=xl0
;;

*-*-freebsd*)
nic1=em0
nic2=em0
;;

*-*-cygwin)
nic1=%0
nic2=%0
;;

*)
AC_MSG_RESULT([$host is unknown! Using first non-loopback interface])
nic1=%0
nic2=%0
;;
esac])

dnl There's a bug in OS X which causes pcap_findalldevs() to make the wifi NIC to disassociate
dnl so under OSX we disable the interface list feature
disable_pcap_findalldevs=no

osx_frameworks=no
dnl these need to be dynamic based on OS
case $host in
*-*-linux*)
nic1=eth0
nic2=eth0
AC_DEFINE([HAVE_LINUX], [1], [Building Linux])
AC_MSG_RESULT(Linux)
;;

*-*-solaris*)
nic1=hme0
nic2=hme0
AC_DEFINE([HAVE_SOLARIS], [1], [Building Solaris])
AC_MSG_RESULT(Solaris)
;;

*-*-sunos*)
nic1=hme0
nic2=hme0
AC_DEFINE([HAVE_SUNOS], [1], [Building SunOS])
AC_MSG_RESULT(SunOS)
;;

*-apple-darwin*)
nic1=en0
nic2=en0
if test x$libpcap_version_096 = xno ; then
disable_pcap_findalldevs=yes
fi
Expand All @@ -1796,33 +1829,24 @@ case $host in
;;

*-*-openbsd*)
nic1=xl0
nic2=xl0
AC_DEFINE([HAVE_OPENBSD], [1], [Building Open BSD])
AC_MSG_RESULT(OpenBSD)
;;

*-*-freebsd*)
nic1=em0
nic2=em0
AC_DEFINE([HAVE_FREEBSD], [1], [Building Free BSD])
AC_MSG_RESULT(FreeBSD)
;;

*-*-cygwin)
AC_MSG_RESULT(Win32/Cygwin)
nic1=%0
nic2=%0
AC_DEFINE([HAVE_CYGWIN], [1], [Building Cygwin])
;;

*)
AC_MSG_RESULT([$host is unknown! Using first non-loopback interface])
nic1=%0
nic2=%0
AC_MSG_RESULT([$host is unknown!])
;;
esac])

esac
AM_CONDITIONAL([ENABLE_OSX_FRAMEWORKS], test "$osx_frameworks" = "yes")

AC_ARG_WITH(testnic2,
Expand Down