Changeset 96

Show
Ignore:
Timestamp:
23.11.2002 00:46:35 (6 years ago)
Author:
tibob
Message:

- added an option in ./configure to activate additional IP checks
- updated TODO

Location:
trunk
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • trunk/TODO

    r94 r96  
    44- use a pcap filter to select IP packets (integrate patch from Brieuc and do a non regression test) 
    55- if no packets are received, ipfm does not dump its files. 
    6 - lex and yacc checks do not work as expected (if no yacc or bison is present, does not stop ./configure) 
     6- ./configure lex and yacc checks do not work as expected (if no yacc or bison is present, does not stop ./configure) 
     7- add an ipfm.conf option to read packets from a file (to test IPFM without beeing root). 
     8- document ./configure options in INSTALL 
    79 
    810- have a better detection of long command line options (actually, #ifdef LINUX...) 
  • trunk/configure

    r86 r96  
    1414ac_help="$ac_help 
    1515  --enable-debug-messages      Use debug messages" 
     16ac_help="$ac_help 
     17  --enable-ip-check      Additional IP packets checks" 
    1618 
    1719# Initialize some variables set by options. 
     
    531533  enableval="$enable_debug_messages" 
    532534   
    533   if test $enableval = "no"; then 
    534     DEBUG_MESSAGES 
     535  if test $enableval = "yes"; then 
     536    cat >> confdefs.h <<\EOF 
     537#define DEBUG_MESSAGES 1 
     538EOF 
     539 
    535540  fi 
    536   cat >> confdefs.h <<\EOF 
    537 #define DEBUG_MESSAGES 1 
    538 EOF 
    539  
     541 
     542fi 
     543 
     544 
     545# Check whether --enable-ip-check or --disable-ip-check was given. 
     546if test "${enable_ip_check+set}" = set; then 
     547  enableval="$enable_ip_check" 
     548   
     549  if test $enableval = "yes"; then 
     550    cat >> confdefs.h <<\EOF 
     551#define IP_CHECK 1 
     552EOF 
     553 
     554  fi 
    540555 
    541556fi 
     
    553568set dummy uname; ac_word=$2 
    554569echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 
    555 echo "configure:556: checking for $ac_word" >&5 
     570echo "configure:571: checking for $ac_word" >&5 
    556571if eval "test \"`echo '$''{'ac_cv_prog_UNAME'+set}'`\" = set"; then 
    557572  echo $ac_n "(cached) $ac_c" 1>&6 
     
    587602 
    588603echo $ac_n "checking your OS""... $ac_c" 1>&6 
    589 echo "configure:590: checking your OS" >&5 
     604echo "configure:605: checking your OS" >&5 
    590605system=`$UNAME` 
    591606case $system in 
     
    645660set dummy gcc; ac_word=$2 
    646661echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 
    647 echo "configure:648: checking for $ac_word" >&5 
     662echo "configure:663: checking for $ac_word" >&5 
    648663if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then 
    649664  echo $ac_n "(cached) $ac_c" 1>&6 
     
    675690set dummy cc; ac_word=$2 
    676691echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 
    677 echo "configure:678: checking for $ac_word" >&5 
     692echo "configure:693: checking for $ac_word" >&5 
    678693if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then 
    679694  echo $ac_n "(cached) $ac_c" 1>&6 
     
    726741set dummy cl; ac_word=$2 
    727742echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 
    728 echo "configure:729: checking for $ac_word" >&5 
     743echo "configure:744: checking for $ac_word" >&5 
    729744if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then 
    730745  echo $ac_n "(cached) $ac_c" 1>&6 
     
    758773 
    759774echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 
    760 echo "configure:761: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 
     775echo "configure:776: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 
    761776 
    762777ac_ext=c 
     
    769784cat > conftest.$ac_ext << EOF 
    770785 
    771 #line 772 "configure" 
     786#line 787 "configure" 
    772787#include "confdefs.h" 
    773788 
    774789main(){return(0);} 
    775790EOF 
    776 if { (eval echo configure:777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 
     791if { (eval echo configure:792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 
    777792  ac_cv_prog_cc_works=yes 
    778793  # If we can't run a trivial program, we are probably using a cross compiler. 
     
    800815fi 
    801816echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 
    802 echo "configure:803: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 
     817echo "configure:818: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 
    803818echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 
    804819cross_compiling=$ac_cv_prog_cc_cross 
    805820 
    806821echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 
    807 echo "configure:808: checking whether we are using GNU C" >&5 
     822echo "configure:823: checking whether we are using GNU C" >&5 
    808823if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then 
    809824  echo $ac_n "(cached) $ac_c" 1>&6 
     
    814829#endif 
    815830EOF 
    816 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:817: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then 
     831if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:832: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then 
    817832  ac_cv_prog_gcc=yes 
    818833else 
     
    833848CFLAGS= 
    834849echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 
    835 echo "configure:836: checking whether ${CC-cc} accepts -g" >&5 
     850echo "configure:851: checking whether ${CC-cc} accepts -g" >&5 
    836851if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then 
    837852  echo $ac_n "(cached) $ac_c" 1>&6 
     
    865880 
    866881echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 
    867 echo "configure:868: checking how to run the C preprocessor" >&5 
     882echo "configure:883: checking how to run the C preprocessor" >&5 
    868883# On Suns, sometimes $CPP names a directory. 
    869884if test -n "$CPP" && test -d "$CPP"; then 
     
    880895  # not just through cpp. 
    881896  cat > conftest.$ac_ext <<EOF 
    882 #line 883 "configure" 
     897#line 898 "configure" 
    883898#include "confdefs.h" 
    884899#include <assert.h> 
     
    886901EOF 
    887902ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 
    888 { (eval echo configure:889: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 
     903{ (eval echo configure:904: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 
    889904ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 
    890905if test -z "$ac_err"; then 
     
    897912  CPP="${CC-cc} -E -traditional-cpp" 
    898913  cat > conftest.$ac_ext <<EOF 
    899 #line 900 "configure" 
     914#line 915 "configure" 
    900915#include "confdefs.h" 
    901916#include <assert.h> 
     
    903918EOF 
    904919ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 
    905 { (eval echo configure:906: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 
     920{ (eval echo configure:921: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 
    906921ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 
    907922if test -z "$ac_err"; then 
     
    914929  CPP="${CC-cc} -nologo -E" 
    915930  cat > conftest.$ac_ext <<EOF 
    916 #line 917 "configure" 
     931#line 932 "configure" 
    917932#include "confdefs.h" 
    918933#include <assert.h> 
     
    920935EOF 
    921936ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 
    922 { (eval echo configure:923: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 
     937{ (eval echo configure:938: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 
    923938ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 
    924939if test -z "$ac_err"; then 
     
    975990# ./install, which can be erroneously created by make from ./install.sh. 
    976991echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 
    977 echo "configure:978: checking for a BSD compatible install" >&5 
     992echo "configure:993: checking for a BSD compatible install" >&5 
    978993if test -z "$INSTALL"; then 
    979994if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then 
     
    10301045set dummy flex; ac_word=$2 
    10311046echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 
    1032 echo "configure:1033: checking for $ac_word" >&5 
     1047echo "configure:1048: checking for $ac_word" >&5 
    10331048if eval "test \"`echo '$''{'ac_cv_prog_LEX'+set}'`\" = set"; then 
    10341049  echo $ac_n "(cached) $ac_c" 1>&6 
     
    10641079  esac 
    10651080  echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6 
    1066 echo "configure:1067: checking for yywrap in -l$ac_lib" >&5 
     1081echo "configure:1082: checking for yywrap in -l$ac_lib" >&5 
    10671082ac_lib_var=`echo $ac_lib'_'yywrap | sed 'y%./+-%__p_%'` 
    10681083if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then 
     
    10721087LIBS="-l$ac_lib  $LIBS" 
    10731088cat > conftest.$ac_ext <<EOF 
    1074 #line 1075 "configure" 
     1089#line 1090 "configure" 
    10751090#include "confdefs.h" 
    10761091/* Override any gcc2 internal prototype to avoid an error.  */ 
     
    10831098; return 0; } 
    10841099EOF 
    1085 if { (eval echo configure:1086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 
     1100if { (eval echo configure:1101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 
    10861101  rm -rf conftest* 
    10871102  eval "ac_cv_lib_$ac_lib_var=yes" 
     
    11081123set dummy ranlib; ac_word=$2 
    11091124echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 
    1110 echo "configure:1111: checking for $ac_word" >&5 
     1125echo "configure:1126: checking for $ac_word" >&5 
    11111126if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then 
    11121127  echo $ac_n "(cached) $ac_c" 1>&6 
     
    11401155set dummy $ac_prog; ac_word=$2 
    11411156echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 
    1142 echo "configure:1143: checking for $ac_word" >&5 
     1157echo "configure:1158: checking for $ac_word" >&5 
    11431158if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then 
    11441159  echo $ac_n "(cached) $ac_c" 1>&6 
     
    11731188set dummy ar; ac_word=$2 
    11741189echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 
    1175 echo "configure:1176: checking for $ac_word" >&5 
     1190echo "configure:1191: checking for $ac_word" >&5 
    11761191if eval "test \"`echo '$''{'ac_cv_path_AR'+set}'`\" = set"; then 
    11771192  echo $ac_n "(cached) $ac_c" 1>&6 
     
    12121227 
    12131228echo $ac_n "checking for local libpcap""... $ac_c" 1>&6 
    1214 echo "configure:1215: checking for local libpcap" >&5 
     1229echo "configure:1230: checking for local libpcap" >&5 
    12151230pcapdirs=`ls .. | grep libpcap | sed -e 's:/$::' -e 's:^:../:' | tr '\n' ' '` 
    12161231libpcap=FAIL 
     
    12281243  echo "$ac_t""no" 1>&6 
    12291244  echo $ac_n "checking for main in -lpcap""... $ac_c" 1>&6 
    1230 echo "configure:1231: checking for main in -lpcap" >&5 
     1245echo "configure:1246: checking for main in -lpcap" >&5 
    12311246ac_lib_var=`echo pcap'_'main | sed 'y%./+-%__p_%'` 
    12321247if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then 
     
    12361251LIBS="-lpcap  $LIBS" 
    12371252cat > conftest.$ac_ext <<EOF 
    1238 #line 1239 "configure" 
     1253#line 1254 "configure" 
    12391254#include "confdefs.h" 
    12401255 
     
    12431258; return 0; } 
    12441259EOF 
    1245 if { (eval echo configure:1246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 
     1260if { (eval echo configure:1261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 
    12461261  rm -rf conftest* 
    12471262  eval "ac_cv_lib_$ac_lib_var=yes" 
     
    12671282    ac_safe=`echo "pcap.h" | sed 'y%./+-%__p_%'` 
    12681283echo $ac_n "checking for pcap.h""... $ac_c" 1>&6 
    1269 echo "configure:1270: checking for pcap.h" >&5 
     1284echo "configure:1285: checking for pcap.h" >&5 
    12701285if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then 
    12711286  echo $ac_n "(cached) $ac_c" 1>&6 
    12721287else 
    12731288  cat > conftest.$ac_ext <<EOF 
    1274 #line 1275 "configure" 
     1289#line 1290 "configure" 
    12751290#include "confdefs.h" 
    12761291#include <pcap.h> 
    12771292EOF 
    12781293ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 
    1279 { (eval echo configure:1280: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 
     1294{ (eval echo configure:1295: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 
    12801295ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 
    12811296if test -z "$ac_err"; then 
     
    13011316  if test "x$NO_PCAP_H" = "x1"; then 
    13021317    echo $ac_n "checking for exotic pcap.h places""... $ac_c" 1>&6 
    1303 echo "configure:1304: checking for exotic pcap.h places" >&5 
     1318echo "configure:1319: checking for exotic pcap.h places" >&5 
    13041319    if test -r /usr/include/pcap/pcap.h; then 
    13051320      INCLS="$INCLS -I/usr/include/pcap" 
     
    13231338 
    13241339echo $ac_n "checking for strftime""... $ac_c" 1>&6 
    1325 echo "configure:1326: checking for strftime" >&5 
     1340echo "configure:1341: checking for strftime" >&5 
    13261341cat > conftest.$ac_ext <<EOF 
    1327 #line 1328 "configure" 
     1342#line 1343 "configure" 
    13281343#include "confdefs.h" 
    13291344#include <time.h> 
     
    13321347; return 0; } 
    13331348EOF 
    1334 if { (eval echo configure:1335: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 
     1349if { (eval echo configure:1350: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 
    13351350  rm -rf conftest* 
    13361351  cat >> confdefs.h <<\EOF 
     
    13481363 
    13491364echo $ac_n "checking for snprintf""... $ac_c" 1>&6 
    1350 echo "configure:1351: checking for snprintf" >&5 
     1365echo "configure:1366: checking for snprintf" >&5 
    13511366cat > conftest.$ac_ext <<EOF 
    1352 #line 1353 "configure" 
     1367#line 1368 "configure" 
    13531368#include "confdefs.h" 
    13541369#include <stdio.h> 
     
    13571372; return 0; } 
    13581373EOF 
    1359 if { (eval echo configure:1360: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 
     1374if { (eval echo configure:1375: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 
    13601375  rm -rf conftest* 
    13611376  cat >> confdefs.h <<\EOF 
     
    13741389lockf_found=yes 
    13751390echo $ac_n "checking for lockf""... $ac_c" 1>&6 
    1376 echo "configure:1377: checking for lockf" >&5 
     1391echo "configure:1392: checking for lockf" >&5 
    13771392cat > conftest.$ac_ext <<EOF 
    1378 #line 1379 "configure" 
     1393#line 1394 "configure" 
    13791394#include "confdefs.h" 
    13801395#include <unistd.h> 
     
    13831398; return 0; } 
    13841399EOF 
    1385 if { (eval echo configure:1386: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 
     1400if { (eval echo configure:1401: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 
    13861401  rm -rf conftest* 
    13871402  cat >> confdefs.h <<\EOF 
     
    14001415flock_found=yes 
    14011416echo $ac_n "checking for flock""... $ac_c" 1>&6 
    1402 echo "configure:1403: checking for flock" >&5 
     1417echo "configure:1418: checking for flock" >&5 
    14031418cat > conftest.$ac_ext <<EOF 
    1404 #line 1405 "configure" 
     1419#line 1420 "configure" 
    14051420#include "confdefs.h" 
    14061421#include <fcntl.h> 
     
    14091424; return 0; } 
    14101425EOF 
    1411 if { (eval echo configure:1412: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 
     1426if { (eval echo configure:1427: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then 
    14121427  rm -rf conftest* 
    14131428  cat >> confdefs.h <<\EOF 
     
    14291444 
    14301445echo $ac_n "checking for daemon""... $ac_c" 1>&6 
    1431 echo "configure:1432: checking for daemon" >&5 
     1446echo "configure:1447: checking for daemon" >&5 
    14321447if eval "test \"`echo '$''{'ac_cv_func_daemon'+set}'`\" = set"; then 
    14331448  echo $ac_n "(cached) $ac_c" 1>&6 
    14341449else 
    14351450  cat > conftest.$ac_ext <<EOF 
    1436 #line 1437 "configure" 
     1451#line 1452 "configure" 
    14371452#include "confdefs.h" 
    14381453/* System header to define __stub macros and hopefully few prototypes, 
     
    14571472; return 0; } 
    14581473EOF 
    1459 if { (eval echo configure:1460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 
     1474if { (eval echo configure:1475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 
    14601475  rm -rf conftest* 
    14611476  eval "ac_cv_func_daemon=yes" 
     
    14781493  echo "$ac_t""no" 1>&6 
    14791494echo $ac_n "checking for daemon in -lbsd""... $ac_c" 1>&6 
    1480 echo "configure:1481: checking for daemon in -lbsd" >&5 
     1495echo "configure:1496: checking for daemon in -lbsd" >&5 
    14811496ac_lib_var=`echo bsd'_'daemon | sed 'y%./+-%__p_%'` 
    14821497if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then 
     
    14861501LIBS="-lbsd  $LIBS" 
    14871502cat > conftest.$ac_ext <<EOF 
    1488 #line 1489 "configure" 
     1503#line 1504 "configure" 
    14891504#include "confdefs.h" 
    14901505/* Override any gcc2 internal prototype to avoid an error.  */ 
     
    14971512; return 0; } 
    14981513EOF 
    1499 if { (eval echo configure:1500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 
     1514if { (eval echo configure:1515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 
    15001515  rm -rf conftest* 
    15011516  eval "ac_cv_lib_$ac_lib_var=yes" 
     
    15271542do 
    15281543echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 
    1529 echo "configure:1530: checking for $ac_func" >&5 
     1544echo "configure:1545: checking for $ac_func" >&5 
    15301545if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then 
    15311546  echo $ac_n "(cached) $ac_c" 1>&6 
    15321547else 
    15331548  cat > conftest.$ac_ext <<EOF 
    1534 #line 1535 "configure" 
     1549#line 1550 "configure" 
    15351550#include "confdefs.h" 
    15361551/* System header to define __stub macros and hopefully few prototypes, 
     
    15551570; return 0; } 
    15561571EOF 
    1557 if { (eval echo configure:1558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 
     1572if { (eval echo configure:1573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then 
    15581573  rm -rf conftest* 
    15591574  eval "ac_cv_func_$ac_func=yes" 
     
    15841599 
    15851600echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 
    1586 echo "configure:1587: checking for ANSI C header files" >&5 
     1601echo "configure:1602: checking for ANSI C header files" >&5 
    15871602if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then 
    15881603  echo $ac_n "(cached) $ac_c" 1>&6 
    15891604else 
    15901605  cat > conftest.$ac_ext <<EOF 
    1591 #line 1592 "configure" 
     1606#line 1607 "configure" 
    15921607#include "confdefs.h" 
    15931608#include <stdlib.h> 
     
    15971612EOF 
    15981613ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" 
    1599 { (eval echo configure:1600: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 
     1614{ (eval echo configure:1615: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } 
    16001615ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` 
    16011616if test -z "$ac_err"; then 
     
    16141629  # SunOS 4.x string.h does not declare mem*, contrary to ANSI. 
    16151630cat > conftest.$ac_ext <<EOF 
    1616 #line 1617 "configure" 
     1631#line 1632 "configure" 
    16171632#include "confdefs.h" 
    16181633#include <string.h> 
     
    16321647  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. 
    16331648cat > conftest.$ac_ext <<EOF 
    1634 #line 1635 "configure" 
     1649#line 1650 "configure" 
    16351650#include "confdefs.h" 
    16361651#include <stdlib.h> 
     
    16531668else 
    16541669  cat > conftest.$ac_ext <<EOF 
    1655 #line 1656 "configure" 
     1670#line 1671 "configure" 
    16561671#include "confdefs.h" 
    16571672#include <ctype.h> 
     
    16641679 
    16651680EOF 
    1666 if { (eval echo configure:1667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 
     1681if { (eval echo configure:1682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null 
    16671682then 
    16681683  : 
     
    16881703 
    16891704echo $ac_n "checking for u_int32_t""... $ac_c" 1>&6 
    1690 echo "configure:1691: checking for u_int32_t" >&5 
     1705echo "configure:1706: checking for u_int32_t" >&5 
    16911706if eval "test \"`echo '$''{'ac_cv_type_u_int32_t'+set}'`\" = set"; then 
    16921707  echo $ac_n "(cached) $ac_c" 1>&6 
    16931708else 
    16941709  cat > conftest.$ac_ext <<EOF 
    1695 #line 1696 "configure" 
     1710#line 1711 "configure" 
    16961711#include "confdefs.h" 
    16971712#include <sys/types.h> 
     
    17221737if test $ac_cv_type_u_int32_t = no; then 
    17231738        echo $ac_n "checking for uint32_t""... $ac_c" 1>&6 
    1724 echo "configure:1725: checking for uint32_t" >&5 
     1739echo "configure:1740: checking for uint32_t" >&5 
    17251740if eval "test \"`echo '$''{'ac_cv_type_uint32_t'+set}'`\" = set"; then 
    17261741  echo $ac_n "(cached) $ac_c" 1>&6 
    17271742else 
    17281743  cat > conftest.$ac_ext <<EOF 
    1729 #line 1730 "configure" 
     1744#line 1745 "configure" 
    17301745#include "confdefs.h" 
    17311746#include <sys/types.h> 
     
    17571772 
    17581773echo $ac_n "checking for u_int8_t""... $ac_c" 1>&6 
    1759 echo "configure:1760: checking for u_int8_t" >&5 
     1774echo "configure:1775: checking for u_int8_t" >&5 
    17601775if eval "test \"`echo '$''{'ac_cv_type_u_int8_t'+set}'`\" = set"; then 
    17611776  echo $ac_n "(cached) $ac_c" 1>&6 
    17621777else 
    17631778  cat > conftest.$ac_ext <<EOF 
    1764 #line 1765 "configure" 
     1779#line 1780 "configure" 
    17651780#include "confdefs.h" 
    17661781#include <sys/types.h> 
     
    17911806if test $ac_cv_type_u_int8_t = no; then 
    17921807        echo $ac_n "checking for uint8_t""... $ac_c" 1>&6 
    1793 echo "configure:1794: checking for uint8_t" >&5 
     1808echo "configure:1809: checking for uint8_t" >&5 
    17941809if eval "test \"`echo '$''{'ac_cv_type_uint8_t'+set}'`\" = set"; then 
    17951810  echo $ac_n "(cached) $ac_c" 1>&6 
    17961811else 
    17971812  cat > conftest.$ac_ext <<EOF 
    1798 #line 1799 "configure" 
     1813#line 1814 "configure" 
    17991814#include "confdefs.h" 
    18001815#include <sys/types.h> 
  • trunk/configure.in

    r86 r96  
    1818[  --enable-debug-messages      Use debug messages], 
    1919[ 
    20   if test $enableval = "no"; then 
    21     DEBUG_MESSAGES 
    22   fi 
    23   AC_DEFINE(DEBUG_MESSAGES) 
     20  if test $enableval = "yes"; then 
     21    AC_DEFINE(DEBUG_MESSAGES) 
     22  fi 
     23]) 
     24 
     25AC_ARG_ENABLE([ip-check], 
     26[  --enable-ip-check      Additional IP packets checks], 
     27[ 
     28  if test $enableval = "yes"; then 
     29    AC_DEFINE(IP_CHECK) 
     30  fi 
    2431]) 
    2532 
  • trunk/source/config.h.in

    r86 r96  
    7878#undef DEBUG_MESSAGES 
    7979 
     80/* [De]Activate additional IP checks */ 
     81#undef IP_CHECK 
     82 
    8083#endif /* __IPFM__CONFIG_H__ */ 
    8184 
  • trunk/source/pcap.c

    r95 r96  
    3434#include <sys/socket.h> 
    3535#include <sys/types.h> 
     36#include <unistd.h> 
    3637 
    3738#include "config.h" 
     
    211212    offset = 16; 
    212213    break; 
    213 #ifdef 
     214#ifdef DLT_LTALK 
    214215  case DLT_LTALK: 
    215216    offset = 0; 
     
    261262    packet = packet + offset; 
    262263 
     264#ifdef IP_CHECK 
     265    /* If activated in ./configure, we check if this is a valid IP packet */ 
    263266    if ( ((struct ip *) packet)->ip_hl < 5 || ((struct ip *) packet)->ip_v != 4 || iphdr_chksum(packet, ((struct ip *) packet)->ip_hl) != 0 ) { 
    264267      /* Not an IP packet */ 
     268      DEBUG_MSG("getnextippkt : dropped a malformed IP packet"); 
    265269      continue; 
    266270    } 
     271#endif 
    267272 
    268273    /* handle HUP