From: glenn <> Date: Tue, 27 Apr 1999 02:44:02 +0000 (+0000) Subject: WCCP functionality for Squid X-Git-Tag: SQUID_3_0_PRE1~2250 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=320e9f3612daa1eee96a476d0092a25b934f4330;p=thirdparty%2Fsquid.git WCCP functionality for Squid --- diff --git a/configure b/configure index 787cb7901a..d739b75c90 100755 --- a/configure +++ b/configure @@ -36,6 +36,8 @@ ac_help="$ac_help --enable-mem-gen-trace Do trace of memory stuff" ac_help="$ac_help --enable-useragent-log Enable logging of User-Agent header" +ac_help="$ac_help + --enable-wccp Enable Web Cache Coordination Protocol" ac_help="$ac_help --enable-kill-parent-hack Kill parent on shutdown" @@ -591,7 +593,7 @@ fi -# From configure.in Revision: 1.170 +# From configure.in Revision: 1.171 ac_aux_dir= for ac_dir in cfgaux $srcdir/cfgaux; do if test -f $ac_dir/install-sh; then @@ -619,7 +621,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:623: checking host system type" >&5 +echo "configure:625: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -687,7 +689,7 @@ PRESET_CFLAGS="$CFLAGS" # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:691: checking for $ac_word" >&5 +echo "configure:693: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -716,7 +718,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:720: checking for $ac_word" >&5 +echo "configure:722: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -764,7 +766,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:768: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:770: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -774,11 +776,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -798,12 +800,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:802: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:804: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:807: checking whether we are using GNU C" >&5 +echo "configure:809: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -812,7 +814,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:816: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:818: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -827,7 +829,7 @@ if test $ac_cv_prog_gcc = yes; then ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:831: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:833: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1185,6 +1187,22 @@ EOF fi +# Check whether --enable-wccp or --disable-wccp was given. +if test "${enable_wccp+set}" = set; then + enableval="$enable_wccp" + if test "$enableval" = "yes" ; then + echo "Web Cache Coordination Protocol enabled" + WCCP_OBJS='$(WCCP_OBJS)' + cat >> confdefs.h <<\EOF +#define WCCP 1 +EOF + + fi + +fi + + + # Check whether --enable-kill_parent_hack or --disable-kill_parent_hack was given. if test "${enable_kill_parent_hack+set}" = set; then enableval="$enable_kill_parent_hack" @@ -1452,7 +1470,7 @@ case "$host" in esac echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1456: checking how to run the C preprocessor" >&5 +echo "configure:1474: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1467,13 +1485,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1477: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1495: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1484,13 +1502,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1494: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1512: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1523,7 +1541,7 @@ echo "$ac_t""$CPP" 1>&6 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1527: checking for a BSD compatible install" >&5 +echo "configure:1545: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1575,7 +1593,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1579: checking for $ac_word" >&5 +echo "configure:1597: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1602,7 +1620,7 @@ else fi echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1606: checking whether ln -s works" >&5 +echo "configure:1624: checking whether ln -s works" >&5 if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1625,7 +1643,7 @@ fi # Extract the first word of "sh", so it can be a program name with args. set dummy sh; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1629: checking for $ac_word" >&5 +echo "configure:1647: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_SH'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1657,7 +1675,7 @@ fi # Extract the first word of "false", so it can be a program name with args. set dummy false; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1661: checking for $ac_word" >&5 +echo "configure:1679: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_FALSE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1689,7 +1707,7 @@ fi # Extract the first word of "true", so it can be a program name with args. set dummy true; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1693: checking for $ac_word" >&5 +echo "configure:1711: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_TRUE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1721,7 +1739,7 @@ fi # Extract the first word of "rm", so it can be a program name with args. set dummy rm; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1725: checking for $ac_word" >&5 +echo "configure:1743: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_RM'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1753,7 +1771,7 @@ fi # Extract the first word of "mv", so it can be a program name with args. set dummy mv; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1757: checking for $ac_word" >&5 +echo "configure:1775: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MV'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1785,7 +1803,7 @@ fi # Extract the first word of "mkdir", so it can be a program name with args. set dummy mkdir; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1789: checking for $ac_word" >&5 +echo "configure:1807: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MKDIR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1817,7 +1835,7 @@ fi # Extract the first word of "ln", so it can be a program name with args. set dummy ln; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1821: checking for $ac_word" >&5 +echo "configure:1839: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_LN'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1849,7 +1867,7 @@ fi # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1853: checking for $ac_word" >&5 +echo "configure:1871: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1881,7 +1899,7 @@ fi # Extract the first word of "makedepend", so it can be a program name with args. set dummy makedepend; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1885: checking for $ac_word" >&5 +echo "configure:1903: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_MAKEDEPEND'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1913,7 +1931,7 @@ fi # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1917: checking for $ac_word" >&5 +echo "configure:1935: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_AR'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1963,12 +1981,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:1967: checking for $ac_hdr that defines DIR" >&5 +echo "configure:1985: checking for $ac_hdr that defines DIR" >&5 if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include <$ac_hdr> @@ -1976,7 +1994,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:1980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1998: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -2001,7 +2019,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:2005: checking for opendir in -ldir" >&5 +echo "configure:2023: checking for opendir in -ldir" >&5 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2009,7 +2027,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2042,7 +2060,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:2046: checking for opendir in -lx" >&5 +echo "configure:2064: checking for opendir in -lx" >&5 ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2050,7 +2068,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2083: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2084,12 +2102,12 @@ fi fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:2088: checking for ANSI C header files" >&5 +echo "configure:2106: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2097,7 +2115,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2101: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2119: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2114,7 +2132,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2132,7 +2150,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2153,7 +2171,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -2164,7 +2182,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:2168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -2248,17 +2266,17 @@ for ac_hdr in \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2252: checking for $ac_hdr" >&5 +echo "configure:2270: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2262: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2280: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2286,12 +2304,12 @@ done echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2290: checking for working const" >&5 +echo "configure:2308: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2362: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2361,14 +2379,14 @@ EOF fi echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:2365: checking whether byte ordering is bigendian" >&5 +echo "configure:2383: checking whether byte ordering is bigendian" >&5 if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat > conftest.$ac_ext < #include @@ -2379,11 +2397,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:2383: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2401: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext < #include @@ -2394,7 +2412,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:2398: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2416: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -2414,7 +2432,7 @@ if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else @@ -2452,20 +2470,20 @@ fi echo $ac_n "checking if ANSI prototypes work""... $ac_c" 1>&6 -echo "configure:2456: checking if ANSI prototypes work" >&5 +echo "configure:2474: checking if ANSI prototypes work" >&5 if eval "test \"`echo '$''{'ac_cv_have_ansi_prototypes'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2487: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_ansi_prototypes="yes" else @@ -2487,13 +2505,13 @@ EOF fi echo $ac_n "checking for tm->tm_gmtoff""... $ac_c" 1>&6 -echo "configure:2491: checking for tm->tm_gmtoff" >&5 +echo "configure:2509: checking for tm->tm_gmtoff" >&5 if eval "test \"`echo '$''{'ac_cv_have_tm_gmoff'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2502,7 +2520,7 @@ struct tm foo; foo.tm_gmtoff = 0; ; return 0; } EOF -if { (eval echo configure:2506: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2524: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_tm_gmoff="yes" else @@ -2524,13 +2542,13 @@ EOF fi echo $ac_n "checking for extended mallinfo""... $ac_c" 1>&6 -echo "configure:2528: checking for extended mallinfo" >&5 +echo "configure:2546: checking for extended mallinfo" >&5 if eval "test \"`echo '$''{'ac_cv_have_ext_mallinfo'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2539,7 +2557,7 @@ struct mallinfo foo; foo.mxfast = 0; ; return 0; } EOF -if { (eval echo configure:2543: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2561: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_ext_mallinfo="yes" else @@ -2561,13 +2579,13 @@ EOF fi echo $ac_n "checking for struct rusage""... $ac_c" 1>&6 -echo "configure:2565: checking for struct rusage" >&5 +echo "configure:2583: checking for struct rusage" >&5 if eval "test \"`echo '$''{'ac_cv_have_struct_rusage'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2602: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_struct_rusage="yes" else @@ -2602,13 +2620,13 @@ EOF fi echo $ac_n "checking for ip->ip_hl""... $ac_c" 1>&6 -echo "configure:2606: checking for ip->ip_hl" >&5 +echo "configure:2624: checking for ip->ip_hl" >&5 if eval "test \"`echo '$''{'ac_cv_have_ip_hl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2625,7 +2643,7 @@ struct iphdr ip; ip.ip_hl= 0; ; return 0; } EOF -if { (eval echo configure:2629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2647: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_ip_hl="yes" else @@ -2647,7 +2665,7 @@ EOF fi echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:2651: checking size of int" >&5 +echo "configure:2669: checking size of int" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2655,7 +2673,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -2666,7 +2684,7 @@ main() exit(0); } EOF -if { (eval echo configure:2670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_int=`cat conftestval` else @@ -2686,7 +2704,7 @@ EOF echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:2690: checking size of long" >&5 +echo "configure:2708: checking size of long" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2694,7 +2712,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -2705,7 +2723,7 @@ main() exit(0); } EOF -if { (eval echo configure:2709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long=`cat conftestval` else @@ -2725,7 +2743,7 @@ EOF echo $ac_n "checking size of void *""... $ac_c" 1>&6 -echo "configure:2729: checking size of void *" >&5 +echo "configure:2747: checking size of void *" >&5 if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2733,7 +2751,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -2744,7 +2762,7 @@ main() exit(0); } EOF -if { (eval echo configure:2748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_void_p=`cat conftestval` else @@ -2767,19 +2785,19 @@ EOF # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:2771: checking for working alloca.h" >&5 +echo "configure:2789: checking for working alloca.h" >&5 if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *p = alloca(2 * sizeof(int)); ; return 0; } EOF -if { (eval echo configure:2783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -2800,12 +2818,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:2804: checking for alloca" >&5 +echo "configure:2822: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -2860,12 +2878,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:2864: checking whether alloca needs Cray hooks" >&5 +echo "configure:2882: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2894: checking for $ac_func" >&5 +echo "configure:2912: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2945,7 +2963,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:2949: checking stack direction for C alloca" >&5 +echo "configure:2967: checking stack direction for C alloca" >&5 if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -2953,7 +2971,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -2995,12 +3013,12 @@ fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:2999: checking for pid_t" >&5 +echo "configure:3017: checking for pid_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3028,12 +3046,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3032: checking for size_t" >&5 +echo "configure:3050: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3061,12 +3079,12 @@ EOF fi echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 -echo "configure:3065: checking for ssize_t" >&5 +echo "configure:3083: checking for ssize_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3094,12 +3112,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:3098: checking for off_t" >&5 +echo "configure:3116: checking for off_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3127,12 +3145,12 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:3131: checking for mode_t" >&5 +echo "configure:3149: checking for mode_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3160,12 +3178,12 @@ EOF fi echo $ac_n "checking for fd_mask""... $ac_c" 1>&6 -echo "configure:3164: checking for fd_mask" >&5 +echo "configure:3182: checking for fd_mask" >&5 if eval "test \"`echo '$''{'ac_cv_type_fd_mask'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3194,13 +3212,13 @@ fi echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 -echo "configure:3198: checking for socklen_t" >&5 +echo "configure:3216: checking for socklen_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3231,7 +3249,7 @@ EOF fi echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6 -echo "configure:3235: checking for main in -lnsl" >&5 +echo "configure:3253: checking for main in -lnsl" >&5 ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3239,14 +3257,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3274,7 +3292,7 @@ else fi echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6 -echo "configure:3278: checking for main in -lsocket" >&5 +echo "configure:3296: checking for main in -lsocket" >&5 ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3282,14 +3300,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3321,7 +3339,7 @@ if test "x$ac_cv_enabled_dlmalloc" = "xyes" ; then echo "skipping libmalloc check (--enable-dlmalloc specified)" else echo $ac_n "checking for main in -lgnumalloc""... $ac_c" 1>&6 -echo "configure:3325: checking for main in -lgnumalloc" >&5 +echo "configure:3343: checking for main in -lgnumalloc" >&5 ac_lib_var=`echo gnumalloc'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3329,14 +3347,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lgnumalloc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3379,7 +3397,7 @@ fi *) echo $ac_n "checking for main in -lmalloc""... $ac_c" 1>&6 -echo "configure:3383: checking for main in -lmalloc" >&5 +echo "configure:3401: checking for main in -lmalloc" >&5 ac_lib_var=`echo malloc'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3387,14 +3405,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lmalloc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3427,7 +3445,7 @@ fi fi echo $ac_n "checking for main in -lbsd""... $ac_c" 1>&6 -echo "configure:3431: checking for main in -lbsd" >&5 +echo "configure:3449: checking for main in -lbsd" >&5 ac_lib_var=`echo bsd'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3435,14 +3453,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lbsd $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3470,7 +3488,7 @@ else fi echo $ac_n "checking for main in -lregex""... $ac_c" 1>&6 -echo "configure:3474: checking for main in -lregex" >&5 +echo "configure:3492: checking for main in -lregex" >&5 ac_lib_var=`echo regex'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3478,14 +3496,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lregex $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3506,7 +3524,7 @@ else fi echo $ac_n "checking for gethostbyname in -lbind""... $ac_c" 1>&6 -echo "configure:3510: checking for gethostbyname in -lbind" >&5 +echo "configure:3528: checking for gethostbyname in -lbind" >&5 ac_lib_var=`echo bind'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3514,7 +3532,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lbind $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3559,7 +3577,7 @@ if test $ac_cv_lib_bind_gethostbyname = "no" ; then ;; *) echo $ac_n "checking for inet_aton in -lresolv""... $ac_c" 1>&6 -echo "configure:3563: checking for inet_aton in -lresolv" >&5 +echo "configure:3581: checking for inet_aton in -lresolv" >&5 ac_lib_var=`echo resolv'_'inet_aton | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3567,7 +3585,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3594,7 +3612,7 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for inet_aton in -l44bsd""... $ac_c" 1>&6 -echo "configure:3598: checking for inet_aton in -l44bsd" >&5 +echo "configure:3616: checking for inet_aton in -l44bsd" >&5 ac_lib_var=`echo 44bsd'_'inet_aton | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3602,7 +3620,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l44bsd $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3645,7 +3663,7 @@ else fi echo $ac_n "checking for main in -lresolv""... $ac_c" 1>&6 -echo "configure:3649: checking for main in -lresolv" >&5 +echo "configure:3667: checking for main in -lresolv" >&5 ac_lib_var=`echo resolv'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3653,14 +3671,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3691,7 +3709,7 @@ fi esac fi echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 -echo "configure:3695: checking for main in -lm" >&5 +echo "configure:3713: checking for main in -lm" >&5 ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3699,14 +3717,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3735,7 +3753,7 @@ fi echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:3739: checking for crypt in -lcrypt" >&5 +echo "configure:3757: checking for crypt in -lcrypt" >&5 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3743,7 +3761,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3787,7 +3805,7 @@ fi echo $ac_n "checking for main in -lpthread""... $ac_c" 1>&6 -echo "configure:3791: checking for main in -lpthread" >&5 +echo "configure:3809: checking for main in -lpthread" >&5 ac_lib_var=`echo pthread'_'main | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3795,14 +3813,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lpthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3837,7 +3855,7 @@ fi case "$host" in *-pc-sco3.2*) echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6 -echo "configure:3841: checking for strftime in -lintl" >&5 +echo "configure:3859: checking for strftime in -lintl" >&5 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3845,7 +3863,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4020,12 +4038,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4024: checking for $ac_func" >&5 +echo "configure:4042: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4081,12 +4099,12 @@ if test "$async_io" = "yes" ; then do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4085: checking for $ac_func" >&5 +echo "configure:4103: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4136,7 +4154,7 @@ done fi echo $ac_n "checking if setresuid is implemented""... $ac_c" 1>&6 -echo "configure:4140: checking if setresuid is implemented" >&5 +echo "configure:4158: checking if setresuid is implemented" >&5 if eval "test \"`echo '$''{'ac_cv_func_setresuid'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -4144,7 +4162,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < @@ -4157,7 +4175,7 @@ else } EOF -if { (eval echo configure:4161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_setresuid="yes" else @@ -4182,7 +4200,7 @@ fi if test "$IPF_TRANSPARENT" ; then echo $ac_n "checking if IP-Filter header files are installed""... $ac_c" 1>&6 -echo "configure:4186: checking if IP-Filter header files are installed" >&5 +echo "configure:4204: checking if IP-Filter header files are installed" >&5 if test "$ac_cv_header_ip_compat_h" = "no" || test "$ac_cv_header_ip_fil_h" = "no" || test "$ac_cv_header_ip_nat_h" = "no" ; then @@ -4217,13 +4235,13 @@ if test -z "$USE_GNUREGEX" ; then esac fi echo $ac_n "checking if GNUregex needs to be compiled""... $ac_c" 1>&6 -echo "configure:4221: checking if GNUregex needs to be compiled" >&5 +echo "configure:4239: checking if GNUregex needs to be compiled" >&5 if test -z "$USE_GNUREGEX"; then if test "$ac_cv_func_regcomp" = "no" || test "$USE_GNUREGEX" = "yes" ; then USE_GNUREGEX="yes" else cat > conftest.$ac_ext < #include @@ -4231,7 +4249,7 @@ int main() { regex_t t; regcomp(&t,"",0); ; return 0; } EOF -if { (eval echo configure:4235: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4253: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* USE_GNUREGEX="no" else @@ -4262,12 +4280,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4266: checking for $ac_func" >&5 +echo "configure:4284: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4318,12 +4336,12 @@ done echo $ac_n "checking Default FD_SETSIZE value""... $ac_c" 1>&6 -echo "configure:4322: checking Default FD_SETSIZE value" >&5 +echo "configure:4340: checking Default FD_SETSIZE value" >&5 if test "$cross_compiling" = yes; then DEFAULT_FD_SETSIZE=256 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then DEFAULT_FD_SETSIZE=`cat conftestval` else @@ -4367,12 +4385,12 @@ EOF echo $ac_n "checking Maximum number of filedescriptors we can open""... $ac_c" 1>&6 -echo "configure:4371: checking Maximum number of filedescriptors we can open" >&5 +echo "configure:4389: checking Maximum number of filedescriptors we can open" >&5 if test "$cross_compiling" = yes; then SQUID_MAXFD=256 else cat > conftest.$ac_ext < @@ -4429,7 +4447,7 @@ main() { } EOF -if { (eval echo configure:4433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then SQUID_MAXFD=`cat conftestval` else @@ -4455,12 +4473,12 @@ if test "$SQUID_MAXFD" -lt 512 ; then fi echo $ac_n "checking Default UDP send buffer size""... $ac_c" 1>&6 -echo "configure:4459: checking Default UDP send buffer size" >&5 +echo "configure:4477: checking Default UDP send buffer size" >&5 if test "$cross_compiling" = yes; then SQUID_UDP_SO_SNDBUF=16384 else cat > conftest.$ac_ext < @@ -4481,7 +4499,7 @@ main () } EOF -if { (eval echo configure:4485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then SQUID_UDP_SO_SNDBUF=`cat conftestval` else @@ -4500,12 +4518,12 @@ EOF echo $ac_n "checking Default UDP receive buffer size""... $ac_c" 1>&6 -echo "configure:4504: checking Default UDP receive buffer size" >&5 +echo "configure:4522: checking Default UDP receive buffer size" >&5 if test "$cross_compiling" = yes; then SQUID_UDP_SO_RCVBUF=16384 else cat > conftest.$ac_ext < @@ -4526,7 +4544,7 @@ main () } EOF -if { (eval echo configure:4530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then SQUID_UDP_SO_RCVBUF=`cat conftestval` else @@ -4545,12 +4563,12 @@ EOF echo $ac_n "checking Default TCP send buffer size""... $ac_c" 1>&6 -echo "configure:4549: checking Default TCP send buffer size" >&5 +echo "configure:4567: checking Default TCP send buffer size" >&5 if test "$cross_compiling" = yes; then SQUID_TCP_SO_SNDBUF=16384 else cat > conftest.$ac_ext < @@ -4571,7 +4589,7 @@ main () } EOF -if { (eval echo configure:4575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then SQUID_TCP_SO_SNDBUF=`cat conftestval` else @@ -4590,12 +4608,12 @@ EOF echo $ac_n "checking Default TCP receive buffer size""... $ac_c" 1>&6 -echo "configure:4594: checking Default TCP receive buffer size" >&5 +echo "configure:4612: checking Default TCP receive buffer size" >&5 if test "$cross_compiling" = yes; then SQUID_TCP_SO_RCVBUF=16384 else cat > conftest.$ac_ext < @@ -4616,7 +4634,7 @@ main () } EOF -if { (eval echo configure:4620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then SQUID_TCP_SO_RCVBUF=`cat conftestval` else @@ -4635,19 +4653,19 @@ EOF echo $ac_n "checking if sys_errlist is already defined""... $ac_c" 1>&6 -echo "configure:4639: checking if sys_errlist is already defined" >&5 +echo "configure:4657: checking if sys_errlist is already defined" >&5 if eval "test \"`echo '$''{'ac_cv_needs_sys_errlist'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *s = sys_errlist0; ; return 0; } EOF -if { (eval echo configure:4651: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4669: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_needs_sys_errlist="no" else @@ -4669,16 +4687,16 @@ EOF fi echo $ac_n "checking for libresolv _dns_ttl_ hack""... $ac_c" 1>&6 -echo "configure:4673: checking for libresolv _dns_ttl_ hack" >&5 +echo "configure:4691: checking for libresolv _dns_ttl_ hack" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF @@ -4694,12 +4712,12 @@ fi rm -f conftest* echo $ac_n "checking if inet_ntoa() actually works""... $ac_c" 1>&6 -echo "configure:4698: checking if inet_ntoa() actually works" >&5 +echo "configure:4716: checking if inet_ntoa() actually works" >&5 if test "$cross_compiling" = yes; then INET_NTOA_RESULT="broken" else cat > conftest.$ac_ext < @@ -4718,7 +4736,7 @@ main () } EOF -if { (eval echo configure:4722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then INET_NTOA_RESULT=`cat conftestval` else @@ -4744,9 +4762,9 @@ fi if test "$ac_cv_header_sys_statvfs_h" = "yes" ; then echo $ac_n "checking for working statvfs() interface""... $ac_c" 1>&6 -echo "configure:4748: checking for working statvfs() interface" >&5 +echo "configure:4766: checking for working statvfs() interface" >&5 cat > conftest.$ac_ext < @@ -4763,7 +4781,7 @@ statvfs("/tmp", &sfs); ; return 0; } EOF -if { (eval echo configure:4767: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4785: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_func_statvfs=yes else @@ -4783,12 +4801,12 @@ fi fi echo $ac_n "checking for _res.nsaddr_list""... $ac_c" 1>&6 -echo "configure:4787: checking for _res.nsaddr_list" >&5 +echo "configure:4805: checking for _res.nsaddr_list" >&5 if eval "test \"`echo '$''{'ac_cv_have_res_nsaddr_list'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4833: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_res_nsaddr_list="yes" else @@ -4833,12 +4851,12 @@ fi if test $ac_cv_have_res_nsaddr_list = "no" ; then echo $ac_n "checking for _res.ns_list""... $ac_c" 1>&6 -echo "configure:4837: checking for _res.ns_list" >&5 +echo "configure:4855: checking for _res.ns_list" >&5 if eval "test \"`echo '$''{'ac_cv_have_res_ns_list'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4883: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_res_ns_list="yes" else @@ -5068,6 +5086,7 @@ s%@LIB_MALLOC@%$LIB_MALLOC%g s%@ASYNC_OBJS@%$ASYNC_OBJS%g s%@SQUID_PTHREAD_LIB@%$SQUID_PTHREAD_LIB%g s%@DELAY_OBJS@%$DELAY_OBJS%g +s%@WCCP_OBJS@%$WCCP_OBJS%g s%@SNMPLIB@%$SNMPLIB%g s%@SNMP_OBJS@%$SNMP_OBJS%g s%@makesnmplib@%$makesnmplib%g diff --git a/configure.in b/configure.in index 2119561987..188b493a00 100644 --- a/configure.in +++ b/configure.in @@ -3,13 +3,13 @@ dnl Configuration input file for Squid dnl dnl Duane Wessels, wessels@nlanr.net, February 1996 (autoconf v2.9) dnl -dnl $Id: configure.in,v 1.171 1999/04/23 02:57:14 wessels Exp $ +dnl $Id: configure.in,v 1.172 1999/04/26 20:44:04 glenn Exp $ dnl dnl dnl AC_INIT(src/main.c) AC_CONFIG_HEADER(include/autoconf.h) -AC_REVISION($Revision: 1.171 $)dnl +AC_REVISION($Revision: 1.172 $)dnl AC_PREFIX_DEFAULT(/usr/local/squid) AC_CONFIG_AUX_DIR(cfgaux) @@ -334,6 +334,16 @@ AC_ARG_ENABLE(useragent_log, fi ]) +AC_ARG_ENABLE(wccp, +[ --enable-wccp Enable Web Cache Coordination Protocol], +[ if test "$enableval" = "yes" ; then + echo "Web Cache Coordination Protocol enabled" + WCCP_OBJS='$(WCCP_OBJS)' + AC_DEFINE(WCCP) + fi +]) +AC_SUBST(WCCP_OBJS) + AC_ARG_ENABLE(kill_parent_hack, [ --enable-kill-parent-hack Kill parent on shutdown], diff --git a/doc/debug-sections.txt b/doc/debug-sections.txt index 745e65ff99..15bf1ad1a5 100644 --- a/doc/debug-sections.txt +++ b/doc/debug-sections.txt @@ -84,3 +84,4 @@ section 76 Internal Squid Object handling section 77 Delay Pools section 78 HTTP Connection Header section 79 HTTP Meter Header +section 80 WCCP diff --git a/include/autoconf.h.in b/include/autoconf.h.in index 3d3fa7045b..21e9b72e68 100644 --- a/include/autoconf.h.in +++ b/include/autoconf.h.in @@ -104,6 +104,9 @@ /* Define to enable SNMP monitoring of Squid */ #undef SQUID_SNMP +/* Define to enable WCCP */ +#undef WCCP + /* * Squid frequently calls gettimeofday() for accurate timestamping. * If you are concerned that gettimeofday() is called too often, and diff --git a/src/Makefile.in b/src/Makefile.in index 764ba77761..9c7e17f01c 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -1,7 +1,7 @@ # # Makefile for the Squid Object Cache server # -# $Id: Makefile.in,v 1.169 1999/04/14 05:16:14 wessels Exp $ +# $Id: Makefile.in,v 1.170 1999/04/26 20:44:06 glenn Exp $ # # Uncomment and customize the following to suit your needs: # @@ -169,6 +169,7 @@ OBJS = \ urn.o \ useragent.o \ wais.o \ + @WCCP_OBJS@ \ whois.o \ $(XTRA_OBJS) @@ -187,6 +188,9 @@ ASYNC_OBJS = \ LEAKFINDER_OBJS = \ leakfinder.o +WCCP_OBJS = \ + wccp.o + DEFAULTS = \ -DDEFAULT_CONFIG_FILE=\"$(DEFAULT_CONFIG_FILE)\" diff --git a/src/cf.data.pre b/src/cf.data.pre index f41a913065..d84b197c02 100644 --- a/src/cf.data.pre +++ b/src/cf.data.pre @@ -1,6 +1,6 @@ # -# $Id: cf.data.pre,v 1.148 1999/04/23 02:57:19 wessels Exp $ +# $Id: cf.data.pre,v 1.149 1999/04/26 20:44:07 glenn Exp $ # # # SQUID Internet Object Cache http://squid.nlanr.net/Squid/ @@ -2497,6 +2497,47 @@ DOC_START queried only when Squid starts up, not for every request. DOC_END +NAME: wccp_router +TYPE: address +LOC: Config.Wccp.router +DEFAULT: 0.0.0.0 +IFDEF: WCCP +DOC_START + Specifies the router that will manage WCCP for this + cache. + +wccp_router 10.0.0.1 +DOC_END + +NAME: wccp_incoming_address +TYPE: address +LOC: Config.Addrs.wccp_outgoing +DEFAULT: 0.0.0.0 +IFDEF: WCCP +DOC_NONE +NAME: wccp_outgoing_address +TYPE: address +LOC: Config.Addrs.wccp_outgoing +DEFAULT: 255.255.255.255 +IFDEF: WCCP +DOC_START + Just like 'udp_incoming_address' above, but for the WCCP port. + + wccp_incoming_address is used for the WCCP socket receiving + messages from WCCP routers. + wccp_outgoing_address is used for WCCP packets returned to WCCP + routers. + + The default behaviour is to not bind to any specific address. + + NOTE, wccp_incoming_address and wccp_outgoing_address can not have + the same value since they both use port 2048. + +wccp_incoming_address 0.0.0.0 +wccp_outgoing_address 0.0.0.0 +DOC_END + + COMMENT_START DELAY POOL PARAMETERS (all require DELAY_POOLS compilation option) ----------------------------------------------------------------------------- diff --git a/src/globals.h b/src/globals.h index 3bc7e354e1..220b80a0fe 100644 --- a/src/globals.h +++ b/src/globals.h @@ -1,6 +1,6 @@ /* - * $Id: globals.h,v 1.78 1999/04/16 01:00:51 wessels Exp $ + * $Id: globals.h,v 1.79 1999/04/26 20:44:08 glenn Exp $ * * * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ @@ -98,6 +98,12 @@ extern int theInSnmpConnection; /* -1 */ extern int theOutSnmpConnection; /* -1 */ extern char *snmp_agentinfo; #endif +#ifdef WCCP +extern int theInWccpConnection; /* -1 */ +extern int theOutWccpConnection; /* -1 */ +extern int theInGreConnection; /* -1 */ +extern int theOutGreConnection; /* -1 */ +#endif extern int vhost_mode; /* 0 */ extern int n_disk_objects; /* 0 */ extern iostats IOStats; diff --git a/src/main.cc b/src/main.cc index d81295fd11..2e07e00eaf 100644 --- a/src/main.cc +++ b/src/main.cc @@ -1,7 +1,7 @@ /* - * $Id: main.cc,v 1.295 1999/04/23 02:57:24 wessels Exp $ - * $Id: main.cc,v 1.295 1999/04/23 02:57:24 wessels Exp $ + * $Id: main.cc,v 1.296 1999/04/26 20:44:09 glenn Exp $ + * $Id: main.cc,v 1.296 1999/04/26 20:44:09 glenn Exp $ * * DEBUG: section 1 Startup and Main Loop * AUTHOR: Harvest Derived @@ -280,6 +280,9 @@ serverConnectionsOpen(void) #endif #ifdef SQUID_SNMP snmpConnectionOpen(); +#endif +#ifdef WCCP + wccpConnectionOpen(); #endif clientdbInit(); icmpOpen(); @@ -303,6 +306,9 @@ serverConnectionsClose(void) icmpClose(); #ifdef SQUID_SNMP snmpConnectionShutdown(); +#endif +#ifdef WCCP + wccpConnectionShutdown(); #endif asnFreeMemory(); } @@ -320,6 +326,9 @@ mainReconfigure(void) #endif #ifdef SQUID_SNMP snmpConnectionClose(); +#endif +#ifdef WCCP + wccpConnectionClose(); #endif dnsShutdown(); idnsShutdown(); @@ -452,7 +461,9 @@ mainInitialize(void) #ifdef SQUID_SNMP snmpInit(); #endif - +#ifdef WCCP + wccpInit(); +#endif #if MALLOC_DBG malloc_debug(0, malloc_debug_level); #endif @@ -508,6 +519,10 @@ mainInitialize(void) eventAdd("start_announce", start_announce, NULL, 3600.0, 1); eventAdd("ipcache_purgelru", ipcache_purgelru, NULL, 10.0, 1); eventAdd("fqdncache_purgelru", fqdncache_purgelru, NULL, 15.0, 1); +#ifdef WCCP + if(Config.Wccp.router.s_addr != inet_addr("0.0.0.0")) + eventAdd("wccpHereIam", wccpHereIam, NULL, 10.0, 1); +#endif } configured_once = 1; } @@ -772,6 +787,9 @@ SquidShutdown(void *unused) #endif #ifdef SQUID_SNMP snmpConnectionClose(); +#endif +#ifdef WCCP + wccpConnectionClose(); #endif releaseServerSockets(); commCloseAllSockets(); diff --git a/src/protos.h b/src/protos.h index 2fdae6cabc..c0894da051 100644 --- a/src/protos.h +++ b/src/protos.h @@ -1,7 +1,7 @@ /* - * $Id: protos.h,v 1.321 1999/04/23 02:57:29 wessels Exp $ - * $Id: protos.h,v 1.321 1999/04/23 02:57:29 wessels Exp $ + * $Id: protos.h,v 1.322 1999/04/26 20:44:10 glenn Exp $ + * $Id: protos.h,v 1.322 1999/04/26 20:44:10 glenn Exp $ * * * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ @@ -520,6 +520,16 @@ extern variable_list *snmp_meshPtblFn(variable_list *, snint *); extern variable_list *snmp_meshCtblFn(variable_list *, snint *); #endif /* SQUID_SNMP */ +#ifdef WCCP +extern PF wccpHandleUdp; +extern PF wccpHandleGre; +extern EVH wccpHereIam; +extern void wccpInit(void); +extern void wccpConnectionOpen(void); +extern void wccpConnectionShutdown(void); +extern void wccpConnectionClose(void); +#endif /* WCCP */ + extern void icpHandleIcpV3(int, struct sockaddr_in, char *, int); extern int icpCheckUdpHit(StoreEntry *, request_t * request); extern void icpConnectionsOpen(void); diff --git a/src/structs.h b/src/structs.h index d113e536c8..62f8ba9a58 100644 --- a/src/structs.h +++ b/src/structs.h @@ -1,7 +1,7 @@ /* - * $Id: structs.h,v 1.283 1999/04/23 02:57:39 wessels Exp $ - * $Id: structs.h,v 1.283 1999/04/23 02:57:39 wessels Exp $ + * $Id: structs.h,v 1.284 1999/04/26 20:44:12 glenn Exp $ + * $Id: structs.h,v 1.284 1999/04/26 20:44:12 glenn Exp $ * * * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ @@ -268,6 +268,11 @@ struct _SquidConfig { char *agentInfo; u_short localPort; } Snmp; +#endif +#if WCCP + struct { + struct in_addr router; + } Wccp; #endif char *as_whois_server; struct { @@ -318,6 +323,10 @@ struct _SquidConfig { #if SQUID_SNMP struct in_addr snmp_incoming; struct in_addr snmp_outgoing; +#endif +#if WCCP + struct in_addr wccp_incoming; + struct in_addr wccp_outgoing; #endif struct in_addr client_netmask; } Addrs; diff --git a/src/wccp.cc b/src/wccp.cc new file mode 100644 index 0000000000..2567897070 --- /dev/null +++ b/src/wccp.cc @@ -0,0 +1,377 @@ + +/* + * $Id: wccp.cc,v 1.1 1999/04/26 20:44:12 glenn Exp $ + * + * DEBUG: section 80 WCCP Support + * AUTHOR: Glenn Chisholm + * + * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ + * ---------------------------------------------------------- + * + * Squid is the result of efforts by numerous individuals from the + * Internet community. Development is led by Duane Wessels of the + * National Laboratory for Applied Network Research and funded by the + * National Science Foundation. Squid is Copyrighted (C) 1998 by + * Duane Wessels and the University of California San Diego. Please + * see the COPYRIGHT file for full details. Squid incorporates + * software developed and/or copyrighted by other sources. Please see + * the CREDITS file for full details. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. + * + */ +#include "squid.h" + +#define WCCP_PORT 2048 +#define WCCP_VERSION 4 +#define WCCP_REVISION 0 +#define WCCP_RESPONSE_SIZE 12448 +#define WCCP_ACTIVE_CACHES 32 +#define WCCP_HASH_SIZE 32 +#define WCCP_BUCKETS 256 + +#define WCCP_HERE_I_AM 7 +#define WCCP_I_SEE_YOU 8 +#define WCCP_ASSIGN_BUCKET 9 + +struct wccp_here_i_am_t { + int type; + int version; + int revision; + char hash[WCCP_HASH_SIZE]; + int reserved; + int id; +}; + +struct wccp_cache_entry_t { + int ip_addr; + int revision; + int hash[WCCP_HASH_SIZE]; + int reserved; +}; + +struct wccp_i_see_you_t { + int type; + int version; + int change; + int id; + int number; + struct wccp_cache_entry_t wccp_cache_entry[WCCP_ACTIVE_CACHES]; +}; + +struct wccp_assign_bucket_t { + int type; + int id; + int number; + int ip_addr[32]; + char bucket[WCCP_BUCKETS]; +}; + +static struct wccp_here_i_am_t wccp_here_i_am; +static struct sockaddr_in router; +static int router_len; +static int last_change; +static int last_assign; +static int change; + +static void wccpAssignBuckets(struct wccp_i_see_you_t * wccp_i_see_you); +/* + * The functions used during startup: + * wccpInit + * wccpConnectionOpen + * wccpConnectionShutdown + * wccpConnectionClose + */ + +void +wccpInit(void) +{ + debug(80, 5) ("wccpInit: Called\n"); + + router_len = sizeof(router); + memset(&router, '\0', router_len); + router.sin_family = AF_INET; + router.sin_port = htons(2048); + router.sin_addr = Config.Wccp.router; + + memset(&wccp_here_i_am, '\0', sizeof(wccp_here_i_am)); + wccp_here_i_am.type = htonl(WCCP_HERE_I_AM); + wccp_here_i_am.version = htonl(WCCP_VERSION); + wccp_here_i_am.revision = htonl(WCCP_REVISION); + + change = 0; + last_change = 0; + last_assign = 0; +} + +void +wccpConnectionOpen(void) +{ + u_short port = WCCP_PORT; + + debug(80, 5) ("wccpConnectionOpen: Called\n"); + if (Config.Wccp.router.s_addr != inet_addr("0.0.0.0")) { + enter_suid(); + theInWccpConnection = comm_open(SOCK_DGRAM, + 0, + Config.Addrs.wccp_incoming, + port, + COMM_NONBLOCKING, + "WCCP Port"); + theInGreConnection = comm_open(SOCK_RAW, + 47, + Config.Addrs.wccp_incoming, + 0, + COMM_NONBLOCKING, + "GRE Port"); + leave_suid(); + if ((theInWccpConnection < 0) || (theInGreConnection < 0)) + fatal("Cannot open wccp Port"); + commSetSelect(theInWccpConnection, COMM_SELECT_READ, wccpHandleUdp, NULL, 0); + commSetSelect(theInGreConnection, COMM_SELECT_READ, wccpHandleGre, NULL, 0); + debug(1, 1) ("Accepting WCCP UDP messages on port %d, FD %d.\n", + (int) port, theInWccpConnection); + debug(1, 1) ("Accepting WCCP GRE messages on FD %d.\n", + theInGreConnection); + if (Config.Addrs.wccp_outgoing.s_addr != no_addr.s_addr) { + enter_suid(); + theOutWccpConnection = comm_open(SOCK_DGRAM, + 0, + Config.Addrs.wccp_outgoing, + port, + COMM_NONBLOCKING, + "WCCP Port"); + leave_suid(); + if (theOutWccpConnection < 0) + fatal("Cannot open Outgoing WCCP Port"); + commSetSelect(theOutWccpConnection, + COMM_SELECT_READ, + wccpHandleUdp, + NULL, 0); + debug(1, 1) ("Outgoing WCCP messages on port %d, FD %d.\n", + (int) port, theOutWccpConnection); + fd_note(theOutWccpConnection, "Outgoing WCCP socket"); + fd_note(theInWccpConnection, "Incoming WCCP socket"); + } else { + theOutWccpConnection = theInWccpConnection; + theOutGreConnection = theInGreConnection; + } + }else{ + debug(1, 1) ("WCCP Disabled.\n"); + } +} + +void +wccpConnectionShutdown(void) +{ + if (theInWccpConnection < 0) + return; + if (theInWccpConnection != theOutWccpConnection) { + debug(80, 1) ("FD %d Closing WCCP socket\n", theInWccpConnection); + comm_close(theInWccpConnection); + } + /* + * Here we set 'theInWccpConnection' to -1 even though the WCCP 'in' + * and 'out' sockets might be just one FD. This prevents this + * function from executing repeatedly. When we are really ready to + * exit or restart, main will comm_close the 'out' descriptor. + */ theInWccpConnection = -1; + /* + * Normally we only write to the outgoing WCCP socket, but we + * also have a read handler there to catch messages sent to that + * specific interface. During shutdown, we must disable reading + * on the outgoing socket. + */ + assert(theOutWccpConnection > -1); + commSetSelect(theOutWccpConnection, COMM_SELECT_READ, NULL, NULL, 0); +} + +void +wccpConnectionClose(void) +{ + wccpConnectionShutdown(); + if (theOutWccpConnection > -1) { + debug(80, 1) ("FD %d Closing WCCP socket\n", theOutWccpConnection); + comm_close(theOutWccpConnection); + } +} + +/* + * Functions for handling the requests. + */ + +/* + * Accept the GRE packet + */ +void +wccpHandleGre(int sock, void *not_used) +{ + struct wccp_i_see_you_t wccp_i_see_you; + struct sockaddr_in from; + socklen_t from_len; + int len; + + debug(80, 6) ("wccpHandleUdp: Called.\n"); + + commSetSelect(sock, COMM_SELECT_READ, wccpHandleUdp, NULL, 0); + from_len = sizeof(struct sockaddr_in); + memset(&from, '\0', from_len); + + Counter.syscalls.sock.recvfroms++; + + len = recvfrom(sock, + &wccp_i_see_you, + WCCP_RESPONSE_SIZE, + 0, + (struct sockaddr *) &from, + &from_len); + + if (len > 0) { + debug(80, 5) ("wccpHandleUdp: FD %d: received %d bytes from %s.\n", + sock, + len, + inet_ntoa(from.sin_addr)); + if(Config.Wccp.router.s_addr != ntohl(from.sin_addr.s_addr)){ + if((ntohl(wccp_i_see_you.version) == WCCP_VERSION) && (ntohl(wccp_i_see_you.type) == WCCP_I_SEE_YOU)){ + debug(80, 5) ("wccpHandleUdp: Valid WCCP packet recieved.\n"); + wccp_here_i_am.id = wccp_i_see_you.id; + if(change != wccp_i_see_you.change){ + change = wccp_i_see_you.change; + if(last_assign) + last_assign = 0; + else + last_change = 4; + } + if(last_change){ + last_change--; + if(!last_change){ + wccpAssignBuckets(&wccp_i_see_you); + last_assign = 1; + } + } + }else{ + debug(80, 5) ("wccpHandleUdp: Invalid WCCP packet recieved.\n"); + } + } else { + debug(80, 5) ("wccpHandleUdp: WCCP packet recieved from invalid address.\n"); + } + } +} + +/* + * Accept the UDP packet + */ +void +wccpHandleUdp(int sock, void *not_used) +{ + struct wccp_i_see_you_t wccp_i_see_you; + struct sockaddr_in from; + socklen_t from_len; + int len; + + debug(80, 6) ("wccpHandleUdp: Called.\n"); + + commSetSelect(sock, COMM_SELECT_READ, wccpHandleUdp, NULL, 0); + from_len = sizeof(struct sockaddr_in); + memset(&from, '\0', from_len); + + Counter.syscalls.sock.recvfroms++; + + len = recvfrom(sock, + &wccp_i_see_you, + WCCP_RESPONSE_SIZE, + 0, + (struct sockaddr *) &from, + &from_len); + + if (len > 0) { + debug(80, 5) ("wccpHandleUdp: FD %d: received %d bytes from %s.\n", + sock, + len, + inet_ntoa(from.sin_addr)); + if(Config.Wccp.router.s_addr != ntohl(from.sin_addr.s_addr)){ + if((ntohl(wccp_i_see_you.version) == WCCP_VERSION) && (ntohl(wccp_i_see_you.type) == WCCP_I_SEE_YOU)){ + debug(80, 5) ("wccpHandleUdp: Valid WCCP packet recieved.\n"); + wccp_here_i_am.id = wccp_i_see_you.id; + if(change != wccp_i_see_you.change){ + change = wccp_i_see_you.change; + if(last_assign) + last_assign = 0; + else + last_change = 4; + } + if(last_change){ + last_change--; + if(!last_change){ + wccpAssignBuckets(&wccp_i_see_you); + last_assign = 1; + } + } + }else{ + debug(80, 5) ("wccpHandleUdp: Invalid WCCP packet recieved.\n"); + } + } else { + debug(80, 5) ("wccpHandleUdp: WCCP packet recieved from invalid address.\n"); + } + } +} + +void +wccpHereIam(void *voidnotused) +{ + debug(80, 6) ("wccpHereIam: Called\n"); + + sendto(theOutWccpConnection, + &wccp_here_i_am, + sizeof(wccp_here_i_am), + 0, + (struct sockaddr *) & router, + router_len); + + eventAdd("wccpHereIam", wccpHereIam, NULL, 10.0, 1); +} + +void +wccpAssignBuckets(struct wccp_i_see_you_t * wccp_i_see_you) +{ + struct wccp_assign_bucket_t wccp_assign_bucket; + int number_buckets, loop_buckets, loop, bucket, number_caches; + + debug(80, 6) ("wccpAssignBuckets: Called\n"); + memset(&wccp_assign_bucket, '\0', sizeof(wccp_assign_bucket)); + memset(&wccp_assign_bucket.bucket, 0, sizeof(wccp_assign_bucket.bucket)); + + number_caches = ntohl(wccp_i_see_you->number); + if(number_caches > WCCP_ACTIVE_CACHES) + number_caches = WCCP_ACTIVE_CACHES; + + number_buckets = WCCP_BUCKETS/number_caches; + bucket = 0; + for(loop=0;loop < number_caches;loop++){ + wccp_assign_bucket.ip_addr[loop] = wccp_i_see_you->wccp_cache_entry[loop].ip_addr; + for(loop_buckets=0;loop_buckets < number_buckets;loop_buckets++){ + wccp_assign_bucket.bucket[bucket++] = loop; + } + } + wccp_assign_bucket.type = ntohl(WCCP_ASSIGN_BUCKET); + wccp_assign_bucket.id = wccp_i_see_you->id; + wccp_assign_bucket.number = ntohl(number_caches); + sendto(theOutWccpConnection, + &wccp_assign_bucket, + sizeof(wccp_assign_bucket), + 0, + (struct sockaddr *) & router, + router_len); +}