Skip to content

Commit

Permalink
Bug #174 ensure --with-testnic does not affect replay
Browse files Browse the repository at this point in the history
  • Loading branch information
fklassen committed Oct 21, 2018
1 parent 55ccd7a commit 8e61046
Showing 1 changed file with 44 additions and 20 deletions.
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

0 comments on commit 8e61046

Please sign in to comment.