Changeset 1697

Show
Ignore:
Timestamp:
02/24/07 13:24:34 (23 months ago)
Author:
aturner
Message:

basic tweaks for winpcap/win32. Need to improve though. refs #110

Location:
trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/configure.in

    r1694 r1697  
    418418 
    419419    for testdir in $trypcapdir /usr/local /usr ; do  
    420   
    421420     if test -f "${testdir}/include/pcap.h" -a $foundpcap = no ; then 
    422421         LPCAPINC="${testdir}/include/pcap.h" 
     
    426425         elif test -f "${testdir}/lib64/libpcap.a" ; then 
    427426             LPCAPLIB="${testdir}/lib64/libpcap.a" 
     427         elif test -f "${testdir}/lib/libpcap.a" ; then 
     428             LPCAPLIB="${testdir}/lib/libpcap.a" 
    428429         else 
    429              LPCAPLIB="${testdir}/lib/libpcap.a" 
    430          fi 
     430             LPCAPLIB="${testdir}/lib/libwpcap.a" 
     431         fi  
    431432        foundpcap=$testdir 
    432433     fi 
     
    445446dnl Checks to see what version of libpcap we've got 
    446447OLDLIBS="$LIBS" 
    447 OLDCFLAGS="$CFLAGS" 
     448OLDCFLAGS="$CFLAGS -I$LPCAPINCDIR" 
    448449LIBS="$LPCAPLIB" 
    449450CFLAGS="$CFLAGS -I$LPCAPINCDIR" 
     
    468469 * or one otherwise 
    469470 */ 
    470     if (strncmp(pcap_lib_version, PCAP_TEST, 3) >= 0) 
     471    if (strncmp(pcap_lib_version(), PCAP_TEST, 3) >= 0) 
    471472            exit(0); 
     473 
     474    /* winpcap? */ 
     475    if (strncmp(pcap_lib_version(), "WinPcap", 7) == 0) 
     476            exit(0); 
     477 
    472478    exit(1); 
    473479]]), [ 
     
    490496 * or one otherwise 
    491497 */ 
     498 
    492499    if (strncmp(pcap_version, PCAP_TEST, 3) >= 0) 
    493500            exit(0); 
     501     
    494502    exit(1); 
    495503]]), [ 
     
    876884fi 
    877885 
     886 
     887AM_CONDITIONAL(HAVE_TCPDUMP, test $td = yes) 
    878888dnl No 'make test' when cross compile 
    879889 
  • trunk/src/common/Makefile.am

    r1640 r1697  
    1414libcommon_a_SOURCES = cidr.c err.c list.c cache.c services.c get.c \ 
    1515                      fakepcap.c fakepcapnav.c fakepoll.c xX.c utils.c \ 
    16                       tcpdump.c timer.c svn_version.c abort.c sendpacket.c \ 
     16                      timer.c svn_version.c abort.c sendpacket.c \ 
    1717                          dlt_names.c mac.c 
     18 
     19if HAVE_TCPDUMP 
     20        libcommon_a_SOURCES += tcpdump.c 
     21endif 
    1822 
    1923AM_CFLAGS = -I.. -I../.. $(LNAV_CFLAGS) 
  • trunk/src/common/sendpacket.c

    r1669 r1697  
    8181#include <sys/ioctl.h> 
    8282#include <sys/file.h> 
    83 #include <sys/sysctl.h> 
    84 #include <net/route.h> 
     83//#include <sys/sysctl.h> 
     84//#include <net/route.h> 
    8585#include <stdlib.h> 
    8686#include <unistd.h>