No *pcap should have pcap_open() without the other remote extensions.

WinPcap 3.0 introduced pcap_open(); it also introduced
pcap_findalldevs_ex() and pcap_createsrcstr().  If you're going to put
pcap_open() in libpcap, there's not much point to doing so but not also
putting pcap_findalldevs_ex() and pcap_createsrcstr() there.

(And, in the future, there'll be support for remote capturing with
pcap_create() and pcap_activate(), with no need for pcap_createsrcstr(),
and a replacement for pcap_findalldevs() and pcap_findalldevs_ex(),
which we'll also check for.)

So there's no need to check for pcap_findalldevs_ex() or
pcap_createsrcstr().

Change-Id: I9323aad20136684d05d1e909326792a2f1408887
Reviewed-on: https://code.wireshark.org/review/6311
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
Guy Harris 2015-01-04 12:58:49 -08:00
parent 9aeb249943
commit 5653fcedca
2 changed files with 3 additions and 7 deletions

View File

@ -638,10 +638,8 @@ AC_DEFUN([AC_WIRESHARK_PCAP_REMOTE_CHECK],
LIBS="$PCAP_LIBS $SOCKET_LIBS $NSL_LIBS $LIBS"
AC_DEFINE(HAVE_REMOTE, 1, [Define to 1 to enable remote
capturing feature in WinPcap library])
AC_CHECK_FUNCS(pcap_open pcap_findalldevs_ex pcap_createsrcstr)
if test $ac_cv_func_pcap_open = "yes" -a \
$ac_cv_func_pcap_findalldevs_ex = "yes" -a \
$ac_cv_func_pcap_createsrcstr = "yes" ; then
AC_CHECK_FUNCS(pcap_open)
if test $ac_cv_func_pcap_open = "yes" ; then
AC_DEFINE(HAVE_PCAP_REMOTE, 1,
[Define to 1 if you have WinPcap remote capturing support and prefer to use these new API features.])
fi

View File

@ -80,9 +80,7 @@ check_function_exists( "pcap_setsampling" HAVE_PCAP_SETSAMPLING )
check_function_exists( "pcap_set_tstamp_precision" HAVE_PCAP_SET_TSTAMP_PRECISION )
# Remote pcap checks
check_function_exists( "pcap_open" HAVE_PCAP_OPEN )
check_function_exists( "pcap_findalldevs_ex" H_FINDALLDEVS_EX )
check_function_exists( "pcap_createsrcstr" H_CREATESRCSTR )
if( HAVE_PCAP_OPEN AND H_FINDALLDEVS_EX AND H_CREATESRCSTR )
if( HAVE_PCAP_OPEN )
set( HAVE_PCAP_REMOTE 1 )
set( HAVE_REMOTE 1 )
endif()