Get rid of HAVE_REMOTE.

We never test for it - we test for HAVE_PCAP_REMOTE - so there's no need
to set it in config.h.

While we're at it, note that "PCAP" in "HAVE_PCAP_REMOTE" can refer to
libpcap as well as WinPcap, given that, at least in the tip of the
master branch, you can configure remote support in libpcap, although
it's not enabled by default (it needs to be vetted for security, as it
increases the attack surface of a machine running the server *and* of an
application using libpcap with remote support).

Change-Id: I3c96cf16bbda19ec7c085f74cffc6f125198d45b
Reviewed-on: https://code.wireshark.org/review/21589
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
Guy Harris 2017-05-10 14:15:55 -07:00
parent 537eddbc40
commit d13b8ea13c
3 changed files with 2 additions and 9 deletions

View File

@ -423,12 +423,10 @@ AC_DEFUN([AC_WIRESHARK_PCAP_REMOTE_CHECK],
[
ac_save_LIBS="$LIBS"
LIBS="$PCAP_LIBS $LIBS"
AC_DEFINE(HAVE_REMOTE, 1, [Define to 1 to enable remote
capturing feature in WinPcap library])
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.])
[Define to 1 if you have libpcap/WinPcap remote capturing support and prefer to use these new API features.])
fi
AC_CHECK_FUNCS(pcap_setsampling)
LIBS="$ac_save_LIBS"

View File

@ -89,7 +89,6 @@ if( PCAP_FOUND )
check_function_exists( "pcap_open" HAVE_PCAP_OPEN )
if( HAVE_PCAP_OPEN )
set( HAVE_PCAP_REMOTE 1 )
set( HAVE_REMOTE 1 )
endif()
cmake_pop_check_state()

View File

@ -266,8 +266,7 @@
/* Define to 1 if you have the `pcap_open_dead' function. */
#cmakedefine HAVE_PCAP_OPEN_DEAD 1
/* Define to 1 if you have WinPcap remote capturing support and prefer to use
these new API features. */
/* Define to 1 if you have libpcap/WinPcap remote capturing support. */
#cmakedefine HAVE_PCAP_REMOTE 1
/* Define to 1 if you have the `pcap_set_datalink' function. */
@ -291,9 +290,6 @@
/* Define to 1 if you have the optreset variable */
#cmakedefine HAVE_OPTRESET 1
/* Define to 1 to enable remote capturing feature in WinPcap library */
#cmakedefine HAVE_REMOTE 1
/* Define if sa_len field exists in struct sockaddr */
#cmakedefine HAVE_STRUCT_SOCKADDR_SA_LEN 1