Final pcap changes

This commit is contained in:
fyodor 2006-08-17 00:36:00 +00:00
parent 3d9ccee8ff
commit 971790a972
3 changed files with 20 additions and 37 deletions

View file

@ -5,13 +5,15 @@ o Worked with Zhao to improve the new OS detection system with
better algorithms and bug fixes.
o Nmap now uses the (relatively) new libpcap pcap_get_selectable_fd
API on systems which support it. This means that we no longer need to
hack the included Pcap to better support Linux. So Nmap will now link
with an existing system libpcap by default on that platform if one is
detected.
API on systems which support it. This means that we no longer need
to hack the included Pcap to better support Linux. So Nmap will now
link with an existing system libpcap by default on that platform if
one is detected. Thanks to Doug Hoyte for the patch.
o Updated the included libpcap from 0.9.3 to 0.9.4. The changes I
made are in libpcap/NMAP_MODIFICATIONS .
made are in libpcap/NMAP_MODIFICATIONS . By default, Nmap will now
use the included libpcap unless version 0.9.4 or greater is already
installed on the system.
o Applied some nsock bugfixes from Diman Todorov. These don't
affect the current version of Nmap, but are important for his upcoming

23
configure vendored
View file

@ -5878,25 +5878,16 @@ cat >>conftest.$ac_ext <<_ACEOF
#include <stdio.h>
extern char pcap_version[];
int main() {
int major, minor;
sscanf(pcap_version,"%d.%d", &major, &minor);
int major, minor1, minor2;
sscanf(pcap_version,"%d.%d.%d", &major, &minor1, &minor2);
printf("The pcap version is %s -> %d.%d.%d\n", pcap_version, major, minor1, minor2);
if (major > 0)
exit(0);
if (minor > 4)
exit(0);
if (minor < 4)
if (minor1 < 9)
exit(1);
if (pcap_version[3] > 'a')
exit(0);
if (pcap_version[3] == 'a') {
if(!sscanf(&pcap_version[4], "%d", &minor))
exit(1);
if (minor >= 6)
exit(0);
else
exit(1);
}
exit(1);
if (minor2 < 4)
exit(1);
exit(0);
}
_ACEOF
rm -f conftest$ac_exeext

View file

@ -381,25 +381,15 @@ if test $have_libpcap = yes; then
#include <stdio.h>
extern char pcap_version[];
int main() {
int major, minor;
sscanf(pcap_version,"%d.%d", &major, &minor);
int major, minor1, minor2;
sscanf(pcap_version,"%d.%d.%d", &major, &minor1, &minor2);
if (major > 0)
exit(0);
if (minor > 4)
exit(0);
if (minor < 4)
if (minor1 < 9)
exit(1);
if (pcap_version[3] > 'a')
exit(0);
if (pcap_version[3] == 'a') {
if(!sscanf(&pcap_version[4], "%d", &minor))
exit(1);
if (minor >= 6)
exit(0);
else
exit(1);
}
exit(1);
if (minor2 < 4)
exit(1);
exit(0);
}],
[AC_MSG_RESULT(yes); have_libpcap=yes],
[AC_MSG_RESULT(no); have_libpcap=no],