Integration of Type Of Service/priority patches from Glen Turner

GETADDRINFO
Stephane Bortzmeyer 24 years ago
parent 85fb3ee825
commit 52c93470c2

@ -17,6 +17,8 @@ Samuel Tardieu <sam@inf.enst.fr> for the SMTP code.
Pierre-Yves Lochou <lochou@ilog.fr> for a lot of testing, debugging Pierre-Yves Lochou <lochou@ilog.fr> for a lot of testing, debugging
and porting. and porting.
Glen Turner <glen.turner@aarnet.edu.au> for the Type Of Service code.
The Pasteur Institute because the work was done when working on the The Pasteur Institute because the work was done when working on the
French national Web cache project, while being an employee of the French national Web cache project, while being an employee of the
Institute. Institute.
@ -25,4 +27,3 @@ Institute.
$Id$ $Id$

@ -1,3 +1,6 @@
* New option (-p) to set socket priority
* New option (-P) to set IP Type of Service octet
4.1.0 (2001-02-14) 4.1.0 (2001-02-14)
* Fix several SSL bugs (#132001, #130151) * Fix several SSL bugs (#132001, #130151)
@ -54,4 +57,10 @@
$Id$ $Id$

@ -6,6 +6,9 @@
/* Do we have T/TCP? */ /* Do we have T/TCP? */
#undef HAVE_TTCP #undef HAVE_TTCP
/* Do we have TOS? */
#undef HAVE_TOS
/* Is sys_errlist declared? */ /* Is sys_errlist declared? */
#undef DECL_SYS_ERRLIST #undef DECL_SYS_ERRLIST

@ -49,6 +49,9 @@
/* Do we have T/TCP? */ /* Do we have T/TCP? */
#undef HAVE_TTCP #undef HAVE_TTCP
/* Do we have TOS? */
#undef HAVE_TOS
/* Is sys_errlist declared? */ /* Is sys_errlist declared? */
#undef DECL_SYS_ERRLIST #undef DECL_SYS_ERRLIST

218
SRC/configure vendored

@ -21,6 +21,8 @@ ac_help="$ac_help
--with-ssl[=DIR] SSL crypt support (needs OpenSSL)" --with-ssl[=DIR] SSL crypt support (needs OpenSSL)"
ac_help="$ac_help ac_help="$ac_help
--enable-ttcp T/TCP (Transaction TCP) support" --enable-ttcp T/TCP (Transaction TCP) support"
ac_help="$ac_help
--enable-tos TOS (Type Of Service - and socket priority) support"
# Initialize some variables set by options. # Initialize some variables set by options.
# The variables have the same names as the options, with # The variables have the same names as the options, with
@ -562,7 +564,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh. # ./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 $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:566: checking for a BSD compatible install" >&5 echo "configure:568: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
@ -615,7 +617,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
echo "configure:619: checking whether build environment is sane" >&5 echo "configure:621: checking whether build environment is sane" >&5
# Just in case # Just in case
sleep 1 sleep 1
echo timestamp > conftestfile echo timestamp > conftestfile
@ -672,7 +674,7 @@ test "$program_suffix" != NONE &&
test "$program_transform_name" = "" && program_transform_name="s,x,x," test "$program_transform_name" = "" && program_transform_name="s,x,x,"
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
echo "configure:676: checking whether ${MAKE-make} sets \${MAKE}" >&5 echo "configure:678: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
@ -718,7 +720,7 @@ EOF
missing_dir=`cd $ac_aux_dir && pwd` missing_dir=`cd $ac_aux_dir && pwd`
echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
echo "configure:722: checking for working aclocal" >&5 echo "configure:724: checking for working aclocal" >&5
# Run test in a subshell; some versions of sh will print an error if # Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected. # an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh. # Redirect stdin to placate older versions of autoconf. Sigh.
@ -731,7 +733,7 @@ else
fi fi
echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
echo "configure:735: checking for working autoconf" >&5 echo "configure:737: checking for working autoconf" >&5
# Run test in a subshell; some versions of sh will print an error if # Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected. # an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh. # Redirect stdin to placate older versions of autoconf. Sigh.
@ -744,7 +746,7 @@ else
fi fi
echo $ac_n "checking for working automake""... $ac_c" 1>&6 echo $ac_n "checking for working automake""... $ac_c" 1>&6
echo "configure:748: checking for working automake" >&5 echo "configure:750: checking for working automake" >&5
# Run test in a subshell; some versions of sh will print an error if # Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected. # an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh. # Redirect stdin to placate older versions of autoconf. Sigh.
@ -757,7 +759,7 @@ else
fi fi
echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
echo "configure:761: checking for working autoheader" >&5 echo "configure:763: checking for working autoheader" >&5
# Run test in a subshell; some versions of sh will print an error if # Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected. # an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh. # Redirect stdin to placate older versions of autoconf. Sigh.
@ -770,7 +772,7 @@ else
fi fi
echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
echo "configure:774: checking for working makeinfo" >&5 echo "configure:776: checking for working makeinfo" >&5
# Run test in a subshell; some versions of sh will print an error if # Run test in a subshell; some versions of sh will print an error if
# an executable is not found, even if stderr is redirected. # an executable is not found, even if stderr is redirected.
# Redirect stdin to placate older versions of autoconf. Sigh. # Redirect stdin to placate older versions of autoconf. Sigh.
@ -857,7 +859,7 @@ fi
# Extract the first word of "gcc", so it can be a program name with args. # Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2 set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:861: checking for $ac_word" >&5 echo "configure:863: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -887,7 +889,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args. # Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2 set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:891: checking for $ac_word" >&5 echo "configure:893: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -938,7 +940,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args. # Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2 set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:942: checking for $ac_word" >&5 echo "configure:944: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -970,7 +972,7 @@ fi
fi fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:974: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 echo "configure:976: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@ -981,12 +983,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF cat > conftest.$ac_ext << EOF
#line 985 "configure" #line 987 "configure"
#include "confdefs.h" #include "confdefs.h"
main(){return(0);} main(){return(0);}
EOF EOF
if { (eval echo configure:990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler. # If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then if (./conftest; exit) 2>/dev/null; then
@ -1012,12 +1014,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; } { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:1016: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "configure:1018: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
echo "configure:1021: checking whether we are using GNU C" >&5 echo "configure:1023: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -1026,7 +1028,7 @@ else
yes; yes;
#endif #endif
EOF EOF
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1030: \"$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:1032: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes ac_cv_prog_gcc=yes
else else
ac_cv_prog_gcc=no ac_cv_prog_gcc=no
@ -1045,7 +1047,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS" ac_save_CFLAGS="$CFLAGS"
CFLAGS= CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
echo "configure:1049: checking whether ${CC-cc} accepts -g" >&5 echo "configure:1051: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -1088,7 +1090,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh. # ./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 $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:1092: checking for a BSD compatible install" >&5 echo "configure:1094: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
@ -1143,7 +1145,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:1147: checking how to run the C preprocessor" >&5 echo "configure:1149: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory. # On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then if test -n "$CPP" && test -d "$CPP"; then
CPP= CPP=
@ -1158,13 +1160,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser, # On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. # not just through cpp.
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1162 "configure" #line 1164 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <assert.h> #include <assert.h>
Syntax Error Syntax Error
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1168: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:1170: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
: :
@ -1175,13 +1177,13 @@ else
rm -rf conftest* rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp" CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1179 "configure" #line 1181 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <assert.h> #include <assert.h>
Syntax Error Syntax Error
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1185: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:1187: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
: :
@ -1192,13 +1194,13 @@ else
rm -rf conftest* rm -rf conftest*
CPP="${CC-cc} -nologo -E" CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1196 "configure" #line 1198 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <assert.h> #include <assert.h>
Syntax Error Syntax Error
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1202: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:1204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
: :
@ -1223,12 +1225,12 @@ fi
echo "$ac_t""$CPP" 1>&6 echo "$ac_t""$CPP" 1>&6
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
echo "configure:1227: checking for ANSI C header files" >&5 echo "configure:1229: checking for ANSI C header files" >&5
if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1232 "configure" #line 1234 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <stdlib.h> #include <stdlib.h>
#include <stdarg.h> #include <stdarg.h>
@ -1236,7 +1238,7 @@ else
#include <float.h> #include <float.h>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1240: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:1242: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
@ -1253,7 +1255,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI. # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1257 "configure" #line 1259 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <string.h> #include <string.h>
EOF EOF
@ -1271,7 +1273,7 @@ fi
if test $ac_cv_header_stdc = yes; then if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1275 "configure" #line 1277 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <stdlib.h> #include <stdlib.h>
EOF EOF
@ -1292,7 +1294,7 @@ if test "$cross_compiling" = yes; then
: :
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1296 "configure" #line 1298 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <ctype.h> #include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z') #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@ -1303,7 +1305,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); } exit (0); }
EOF EOF
if { (eval echo configure:1307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null if { (eval echo configure:1309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then then
: :
else else
@ -1330,17 +1332,17 @@ for ac_hdr in sys/time.h unistd.h
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:1334: checking for $ac_hdr" >&5 echo "configure:1336: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1339 "configure" #line 1341 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <$ac_hdr>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1344: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:1346: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
@ -1371,13 +1373,13 @@ for cf_name in sys_nerr sys_errlist
do do
echo $ac_n "checking if external $cf_name is declared""... $ac_c" 1>&6 echo $ac_n "checking if external $cf_name is declared""... $ac_c" 1>&6
echo "configure:1375: checking if external $cf_name is declared" >&5 echo "configure:1377: checking if external $cf_name is declared" >&5
if eval "test \"`echo '$''{'cf_cv_dcl_$cf_name'+set}'`\" = set"; then if eval "test \"`echo '$''{'cf_cv_dcl_$cf_name'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1381 "configure" #line 1383 "configure"
#include "confdefs.h" #include "confdefs.h"
#ifdef HAVE_STDLIB_H #ifdef HAVE_STDLIB_H
@ -1390,7 +1392,7 @@ int main() {
long x = (long) $cf_name long x = (long) $cf_name
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1394: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:1396: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
eval 'cf_cv_dcl_'$cf_name'=yes' eval 'cf_cv_dcl_'$cf_name'=yes'
else else
@ -1420,13 +1422,13 @@ fi
# It's possible (for near-UNIX clones) that the data doesn't exist # It's possible (for near-UNIX clones) that the data doesn't exist
echo $ac_n "checking if external $cf_name exists""... $ac_c" 1>&6 echo $ac_n "checking if external $cf_name exists""... $ac_c" 1>&6
echo "configure:1424: checking if external $cf_name exists" >&5 echo "configure:1426: checking if external $cf_name exists" >&5
if eval "test \"`echo '$''{'cf_cv_have_$cf_name'+set}'`\" = set"; then if eval "test \"`echo '$''{'cf_cv_have_$cf_name'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1430 "configure" #line 1432 "configure"
#include "confdefs.h" #include "confdefs.h"
#undef $cf_name #undef $cf_name
@ -1436,7 +1438,7 @@ int main() {
$cf_name = 2 $cf_name = 2
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:1442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval 'cf_cv_have_'$cf_name'=yes' eval 'cf_cv_have_'$cf_name'=yes'
else else
@ -1469,12 +1471,12 @@ done
echo $ac_n "checking for working const""... $ac_c" 1>&6 echo $ac_n "checking for working const""... $ac_c" 1>&6
echo "configure:1473: checking for working const" >&5 echo "configure:1475: checking for working const" >&5
if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1478 "configure" #line 1480 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
@ -1523,7 +1525,7 @@ ccp = (char const *const *) p;
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1527: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:1529: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
ac_cv_c_const=yes ac_cv_c_const=yes
else else
@ -1544,12 +1546,12 @@ EOF
fi fi
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
echo "configure:1548: checking whether time.h and sys/time.h may both be included" >&5 echo "configure:1550: checking whether time.h and sys/time.h may both be included" >&5
if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1553 "configure" #line 1555 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <sys/types.h> #include <sys/types.h>
#include <sys/time.h> #include <sys/time.h>
@ -1558,7 +1560,7 @@ int main() {
struct tm *tp; struct tm *tp;
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1562: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:1564: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
ac_cv_header_time=yes ac_cv_header_time=yes
else else
@ -1581,7 +1583,7 @@ fi
echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6 echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
echo "configure:1585: checking for socket in -lsocket" >&5 echo "configure:1587: checking for socket in -lsocket" >&5
ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'` ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
@ -1589,7 +1591,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-lsocket $LIBS" LIBS="-lsocket $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1593 "configure" #line 1595 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
@ -1600,7 +1602,7 @@ int main() {
socket() socket()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:1606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
@ -1617,9 +1619,9 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6 echo "$ac_t""yes" 1>&6
echo $ac_n "checking if libsocket is mandatory""... $ac_c" 1>&6 echo $ac_n "checking if libsocket is mandatory""... $ac_c" 1>&6
echo "configure:1621: checking if libsocket is mandatory" >&5 echo "configure:1623: checking if libsocket is mandatory" >&5
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1623 "configure" #line 1625 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <sys/types.h> #include <sys/types.h>
#include <netinet/in.h> #include <netinet/in.h>
@ -1635,7 +1637,7 @@ int main() {
socket (AF_INET, SOCK_STREAM, 0) socket (AF_INET, SOCK_STREAM, 0)
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:1641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
echo "$ac_t""no" 1>&6 echo "$ac_t""no" 1>&6
else else
@ -1653,7 +1655,7 @@ fi
echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
echo "configure:1657: checking for gethostbyname in -lnsl" >&5 echo "configure:1659: checking for gethostbyname in -lnsl" >&5
ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
@ -1661,7 +1663,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-lnsl $LIBS" LIBS="-lnsl $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1665 "configure" #line 1667 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
@ -1672,7 +1674,7 @@ int main() {
gethostbyname() gethostbyname()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:1678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
@ -1689,9 +1691,9 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6 echo "$ac_t""yes" 1>&6
echo $ac_n "checking if libnsl is mandatory""... $ac_c" 1>&6 echo $ac_n "checking if libnsl is mandatory""... $ac_c" 1>&6
echo "configure:1693: checking if libnsl is mandatory" >&5 echo "configure:1695: checking if libnsl is mandatory" >&5
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1695 "configure" #line 1697 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <sys/types.h> #include <sys/types.h>
#include <netinet/in.h> #include <netinet/in.h>
@ -1700,7 +1702,7 @@ int main() {
gethostbyname(domain) gethostbyname(domain)
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1704: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:1706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
echo "$ac_t""no" 1>&6 echo "$ac_t""no" 1>&6
else else
@ -1717,12 +1719,12 @@ fi
echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
echo "configure:1721: checking return type of signal handlers" >&5 echo "configure:1723: checking return type of signal handlers" >&5
if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1726 "configure" #line 1728 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <sys/types.h> #include <sys/types.h>
#include <signal.h> #include <signal.h>
@ -1739,7 +1741,7 @@ int main() {
int i; int i;
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1743: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:1745: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
ac_cv_type_signal=void ac_cv_type_signal=void
else else
@ -1758,12 +1760,12 @@ EOF
echo $ac_n "checking for vprintf""... $ac_c" 1>&6 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
echo "configure:1762: checking for vprintf" >&5 echo "configure:1764: checking for vprintf" >&5
if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1767 "configure" #line 1769 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char vprintf(); below. */ which can conflict with char vprintf(); below. */
@ -1786,7 +1788,7 @@ vprintf();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:1792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_vprintf=yes" eval "ac_cv_func_vprintf=yes"
else else
@ -1810,12 +1812,12 @@ fi
if test "$ac_cv_func_vprintf" != yes; then if test "$ac_cv_func_vprintf" != yes; then
echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
echo "configure:1814: checking for _doprnt" >&5 echo "configure:1816: checking for _doprnt" >&5
if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1819 "configure" #line 1821 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char _doprnt(); below. */ which can conflict with char _doprnt(); below. */
@ -1838,7 +1840,7 @@ _doprnt();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:1844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func__doprnt=yes" eval "ac_cv_func__doprnt=yes"
else else
@ -1865,12 +1867,12 @@ fi
for ac_func in gettimeofday socket gethostbyname sigaction for ac_func in gettimeofday socket gethostbyname sigaction
do do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
echo "configure:1869: checking for $ac_func" >&5 echo "configure:1871: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1874 "configure" #line 1876 "configure"
#include "confdefs.h" #include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes, /* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */ which can conflict with char $ac_func(); below. */
@ -1893,7 +1895,7 @@ $ac_func();
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1897: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:1899: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_func_$ac_func=yes" eval "ac_cv_func_$ac_func=yes"
else else
@ -1922,7 +1924,7 @@ done
if test "$OPENSSL" = "1"; then if test "$OPENSSL" = "1"; then
echo $ac_n "checking for SSL_CTX_new in -lssl""... $ac_c" 1>&6 echo $ac_n "checking for SSL_CTX_new in -lssl""... $ac_c" 1>&6
echo "configure:1926: checking for SSL_CTX_new in -lssl" >&5 echo "configure:1928: checking for SSL_CTX_new in -lssl" >&5
ac_lib_var=`echo ssl'_'SSL_CTX_new | sed 'y%./+-%__p_%'` ac_lib_var=`echo ssl'_'SSL_CTX_new | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
@ -1931,7 +1933,7 @@ else
LIBS="-lssl -lcrypto LIBS="-lssl -lcrypto
$LIBS" $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1935 "configure" #line 1937 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
@ -1942,7 +1944,7 @@ int main() {
SSL_CTX_new() SSL_CTX_new()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:1948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
@ -1966,9 +1968,9 @@ fi
fi fi
echo $ac_n "checking T/TCP""... $ac_c" 1>&6 echo $ac_n "checking T/TCP""... $ac_c" 1>&6
echo "configure:1970: checking T/TCP" >&5 echo "configure:1972: checking T/TCP" >&5
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1972 "configure" #line 1974 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <sys/types.h> #include <sys/types.h>
#include <sys/socket.h> #include <sys/socket.h>
@ -1977,7 +1979,7 @@ int main() {
int foobar = MSG_EOF; int foobar = MSG_EOF;
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1981: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:1983: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
cat >> confdefs.h <<\EOF cat >> confdefs.h <<\EOF
#define TTCP 1 #define TTCP 1
@ -2017,6 +2019,55 @@ EOF
fi fi
echo $ac_n "checking Type Of Service""... $ac_c" 1>&6
echo "configure:2024: checking Type Of Service" >&5
cat > conftest.$ac_ext <<EOF
#line 2026 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/socket.h>
int main() {
int foobar = SO_PRIORITY;
; return 0; }
EOF
if { (eval echo configure:2035: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define TOS 1
EOF
ac_have_tos="yes"
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_have_tos=no
fi
rm -f conftest*
echo "$ac_t""$ac_have_tos" 1>&6
# Check whether --enable-tos or --disable-tos was given.
if test "${enable_tos+set}" = set; then
enableval="$enable_tos"
if test "$enableval" = "yes"; then
if test $ac_have_tos = "yes"; then
cat >> confdefs.h <<\EOF
#define HAVE_TOS 1
EOF
else
echo "configure: warning: No TOS support on this system, request ignored" 1>&2
fi
fi
else
if test $ac_have_tos = "yes"; then
cat >> confdefs.h <<\EOF
#define HAVE_TOS 1
EOF
fi
fi
if test "$GCC" = yes; then if test "$GCC" = yes; then
CFLAGS="$CFLAGS -Wall" CFLAGS="$CFLAGS -Wall"
@ -2390,13 +2441,12 @@ rm -fr confdefs* $ac_clean_files
test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
echo "" echo ""
echo "Configuration of echoping:" echo "Configuration of echoping:"
echo $ac_n "checking HTTP""... $ac_c" 1>&6 echo $ac_n "checking HTTP""... $ac_c" 1>&6
echo "configure:2400: checking HTTP" >&5 echo "configure:2450: checking HTTP" >&5
if eval 'test "$HTTP" = "1"' > /dev/null; then if eval 'test "$HTTP" = "1"' > /dev/null; then
echo "$ac_t""enabled" 1>&6 echo "$ac_t""enabled" 1>&6
else else
@ -2405,7 +2455,7 @@ fi
echo $ac_n "checking ICP""... $ac_c" 1>&6 echo $ac_n "checking ICP""... $ac_c" 1>&6
echo "configure:2409: checking ICP" >&5 echo "configure:2459: checking ICP" >&5
if eval 'test "$ICP" = "1"' > /dev/null; then if eval 'test "$ICP" = "1"' > /dev/null; then
echo "$ac_t""enabled" 1>&6 echo "$ac_t""enabled" 1>&6
else else
@ -2414,7 +2464,7 @@ fi
echo $ac_n "checking OPENSSL""... $ac_c" 1>&6 echo $ac_n "checking OPENSSL""... $ac_c" 1>&6
echo "configure:2418: checking OPENSSL" >&5 echo "configure:2468: checking OPENSSL" >&5
if eval 'test "$OPENSSL" = "1"' > /dev/null; then if eval 'test "$OPENSSL" = "1"' > /dev/null; then
echo "$ac_t""enabled" 1>&6 echo "$ac_t""enabled" 1>&6
else else
@ -2423,7 +2473,7 @@ fi
echo $ac_n "checking SMTP""... $ac_c" 1>&6 echo $ac_n "checking SMTP""... $ac_c" 1>&6
echo "configure:2427: checking SMTP" >&5 echo "configure:2477: checking SMTP" >&5
if eval 'test "$SMTP" = "1"' > /dev/null; then if eval 'test "$SMTP" = "1"' > /dev/null; then
echo "$ac_t""enabled" 1>&6 echo "$ac_t""enabled" 1>&6
else else
@ -2432,7 +2482,7 @@ fi
echo $ac_n "checking TTCP""... $ac_c" 1>&6 echo $ac_n "checking TTCP""... $ac_c" 1>&6
echo "configure:2436: checking TTCP" >&5 echo "configure:2486: checking TTCP" >&5
if eval 'test "$TTCP" = "1"' > /dev/null; then if eval 'test "$TTCP" = "1"' > /dev/null; then
echo "$ac_t""enabled" 1>&6 echo "$ac_t""enabled" 1>&6
else else

@ -100,9 +100,30 @@ AC_ARG_ENABLE(ttcp,
TTCP=1 TTCP=1
fi) fi)
dnl if test "$ICP" = "1"; then dnl Type Of Service
dnl CF_CHECK_SERVICES AC_MSG_CHECKING([Type Of Service])
dnl fi AC_TRY_COMPILE(
[#include <sys/types.h>
#include <sys/socket.h>
],
[int foobar = SO_PRIORITY;],
[AC_DEFINE(TOS)
ac_have_tos="yes"],
ac_have_tos=no)
AC_MSG_RESULT($ac_have_tos)
AC_ARG_ENABLE(tos,
[--enable-tos TOS (Type Of Service - and socket priority) support],
[if test "$enableval" = "yes"; then
if test $ac_have_tos = "yes"; then
AC_DEFINE(HAVE_TOS)
else
AC_MSG_WARN([No TOS support on this system, request ignored])
fi
fi],
dnl Default: enable it if supported
if test $ac_have_tos = "yes"; then
AC_DEFINE(HAVE_TOS)
fi)
if test "$GCC" = yes; then if test "$GCC" = yes; then
CFLAGS="$CFLAGS -Wall" CFLAGS="$CFLAGS -Wall"
@ -110,7 +131,6 @@ fi
AC_OUTPUT(Makefile) AC_OUTPUT(Makefile)
AC_DEFUN([DISPLAY_SETTING], AC_DEFUN([DISPLAY_SETTING],
[ [
AC_MSG_CHECKING($1) AC_MSG_CHECKING($1)

@ -13,6 +13,8 @@ echoping \- tests a remote host with TCP or UDP
.RI [ -h\ URL ] .RI [ -h\ URL ]
.RI [ -i\ URL ] .RI [ -i\ URL ]
.RI [ -S ] .RI [ -S ]
.RI [ -p\ number ]
.RI [ -P\ number ]
.B hostname .B hostname
[:port] [:port]
@ -72,18 +74,89 @@ Use the SMTP protocol (instead of echo) for the given server.
Use T/TCP (if it has been compiled with it). See the INSTALL file for details. Use T/TCP (if it has been compiled with it). See the INSTALL file for details.
.IP -f\ character .IP -f\ character
Fill the packet with this character (default is random filling) Fill the packet with this character (default is random filling)
.IP -p\ n
Send packets with the socket priority to the integer
.IR n .
The mapping of the socket priority into a network layer or a link
layer priority depends upon the network protocol and link protocol
in use. For more details see
.B SO_PRIORITY
in
.BR socket (7).
.IP -P\ n
Set the IP type of service octet in the transmitted packets to the
least significant eight bits of the integer
.IR n .
.SH EXAMPLES .SH EXAMPLES
.IP echoping\ \-v\ foobar.whoops.org .IP echoping\ \-v\ foobar.example.com
Tests the remote machine with TCP echo (one test). Tests the remote machine with TCP echo (one test).
.IP echoping\ \-n\ 5\ \-w\ 10\ foobar.whoops.org .IP echoping\ \-n\ 5\ \-w\ 10\ foobar.example.com
Tests the remote machine with TCP echo (five tests, every ten seconds). Tests the remote machine with TCP echo (five tests, every ten seconds).
.IP echoping\ \-h\ /\ foobar.whoops.org .IP echoping\ \-h\ /\ foobar.example.com
Tests the remote Web server and asks its home page. Note you don't Tests the remote Web server and asks its home page. Note you don't
indicate the whole URL. indicate the whole URL.
.IP echoping\ \-h\ http://www.whoops.org/\ cache.whoops.org:3128 .IP echoping\ \-h\ http://www.example.com/\ cache.example.com:3128
Tests the remote Web proxy-cache and asks a Web page. Note that you must Tests the remote Web proxy-cache and asks a Web page. Note that you must
indicate the whole URL. indicate the whole URL.
.IP echoping\ -u\ \-P\ 0xa0\ foobar.example.com
Sends several UDP Echo packets with an IP Precedence of 5.
.SH IP TYPE OF SERVICE OCTET
The IP packet header contains 8 bits named the "type of service octet".
The value of the octet is set with the
.B \-P
option. The effects of the octet are defined differently in RFC791
.I "Internet Protocol"
and RFC2474
.IR "Definition of the Differentiated Services Field (DS Field) in the IPv4 and IPv6 Headers".
RFC791 defines
.I Precedence
which has ascending priorities 0 through to 7, and the bits
.IR Delay ,
.IR Throughput ,
.IR Reliability ,
and
.I Cost
which indicates the application's preference for the properties of
the packet's path through the network.
.I Precedence
is in the most significant three bits of the type of service octet,
followed in decending significance order by the
.IR D ,
.IR T ,
.I R
and
.I C
bits. The least significant bit must be zero. Only one of the
.IR D ,
.IR T ,
.I R
or
.I C
bits may be set.
RFC2474 defines the Distributed Services Code Point, or
DSCP.
This acts as a selector between 64 possible behaviours that the
network can apply to the packet. The
.I DSCP
is in the most significant six bits of the type of service octet.
The remaining least significant two bits of the octet must be
zero.
The numeric arguments to
.B -p
and
.B -P
can be in decimal (such as 11), octal (such as 013) or hexadecimal
(such as 0x0b). So padding decimal arguments with leading zeros will
change the value read.
You may need to be superuser to set some
.B -p
or
.B -P
values.
.SH BUGS .SH BUGS
@ -95,5 +168,3 @@ See the README for information about other network measurements programs.
.SH AUTHOR .SH AUTHOR
Stephane Bortzmeyer <bortz@users.sourceforge.net> Stephane Bortzmeyer <bortz@users.sourceforge.net>

@ -5,7 +5,9 @@
* the AUTHORS file for other contributors. * the AUTHORS file for other contributors.
* *
* $Id$ * $Id$
* */ *
*/
char *progname; char *progname;
unsigned short timeout_flag; unsigned short timeout_flag;
@ -61,7 +63,7 @@ main (argc, argv)
int n, nr = 0; int n, nr = 0;
int rc; int rc;
#ifdef OPENSSL #ifdef OPENSSL
int sslcode; int sslcode;
char rand_file[MAXLINE]; char rand_file[MAXLINE];
#endif #endif
char *sendline, recvline[MAXLINE + 1]; char *sendline, recvline[MAXLINE + 1];
@ -111,6 +113,12 @@ main (argc, argv)
SSL *sslh = NULL; SSL *sslh = NULL;
#endif #endif
int priority;
int priority_requested = 0;
int tos;
int tos_requested = 0;
char *arg_end;
null_timeval.tv_sec = 0; null_timeval.tv_sec = 0;
null_timeval.tv_usec = 0; null_timeval.tv_usec = 0;
max_timeval.tv_sec = 1000000000; max_timeval.tv_sec = 1000000000;
@ -128,7 +136,7 @@ main (argc, argv)
results[i].valid = 0; results[i].valid = 0;
} }
progname = argv[0]; progname = argv[0];
while ((ch = getopt (argc, argv, "vs:n:w:dch:i:rut:f:SC")) != EOF) while ((ch = getopt (argc, argv, "vs:n:w:dch:i:rut:f:SCp:P:")) != EOF)
{ {
switch (ch) switch (ch)
{ {
@ -175,6 +183,34 @@ main (argc, argv)
port_to_use = USE_SMTP; port_to_use = USE_SMTP;
smtp = 1; smtp = 1;
break; break;
case 'p':
priority = (int) strtol (optarg, &arg_end, 0);
if (arg_end == optarg || arg_end == '\0')
{
(void) fprintf (stderr,
"%s: socket priority (-p) should be numeric.\n",
progname);
exit (1);
}
else
{
priority_requested = 1;
}
break;
case 'P':
tos = (int) strtol (optarg, &arg_end, 0);
if (arg_end == optarg || arg_end == '\0')
{
(void) fprintf (stderr,
"%s: IP type of service (-P) should be "
"numeric.\n", progname);
exit (1);
}
else
{
tos_requested = 1;
}
break;
case 's': case 's':
size = atoi (optarg); size = atoi (optarg);
if (size > MAXLINE) if (size > MAXLINE)
@ -321,6 +357,15 @@ main (argc, argv)
{ {
port_name = DEFAULT_HTTPS_TCP_PORT; port_name = DEFAULT_HTTPS_TCP_PORT;
} }
#ifndef USE_TOS
if (priority_requested || tos_requested)
{
(void) fprintf (stderr,
"%s: Not compiled with Type Of Service support.\n",
progname);
exit (1);
}
#endif
if (!udp && !ttcp) if (!udp && !ttcp)
{ {
tcp = 1; tcp = 1;
@ -453,7 +498,7 @@ main (argc, argv)
SSLeay_add_ssl_algorithms (); SSLeay_add_ssl_algorithms ();
/* The following RAND_ calls are only for systems insecure /* The following RAND_ calls are only for systems insecure
enough to fail to have /dev/urandom. Bug #132001 */ enough to fail to have /dev/urandom. Bug #132001 */
RAND_file_name (rand_file, sizeof( rand_file)); RAND_file_name (rand_file, sizeof (rand_file));
RAND_write_file (rand_file); RAND_write_file (rand_file);
RAND_load_file (rand_file, 1024); RAND_load_file (rand_file, 1024);
meth = SSLv2_client_method (); meth = SSLv2_client_method ();
@ -500,6 +545,37 @@ main (argc, argv)
err_sys ("bind error"); err_sys ("bind error");
} }
} }
#ifdef USE_TOS
if (priority_requested)
{
if (verbose)
{
printf ("Setting socket priority to %d (0x%02x)\n",
priority, (unsigned int) priority);
}
if (setsockopt (sockfd,
SOL_SOCKET,
SO_PRIORITY,
(void *) &priority, (socklen_t) sizeof (priority)))
{
err_sys ("Failed setting socket priority");
}
}
if (tos_requested)
{
if (verbose)
{
printf ("Setting IP type of service octet to %d (0x%02x)\n",
tos, (unsigned int) tos);
}
if (setsockopt (sockfd,
SOL_IP,
IP_TOS, (void *) &tos, (socklen_t) sizeof (tos)))
{
err_sys ("Failed setting IP type of service octet");
}
}
#endif
if (verbose) if (verbose)
{ {
if (tcp) if (tcp)
@ -661,6 +737,18 @@ main (argc, argv)
} }
} }
#endif #endif
/* Write something to the server */
if (writen (sockfd, sendline, n) != n)
{
if ((nr < 0 || nr != n) && timeout_flag)
{
nr = n;
printf ("Timeout while writing\n");
continue;
}
else
err_sys ("writen error on socket");
}
} }
else else
{ {

@ -78,6 +78,10 @@ extern int sys_nerr;
#ifdef HAVE_TTCP #ifdef HAVE_TTCP
#define USE_TTCP 1 #define USE_TTCP 1
#endif #endif
#ifdef HAVE_TOS
#define USE_TOS 1
#endif
#ifndef HEADER_INCLUDED #ifndef HEADER_INCLUDED
typedef union _CHANNEL typedef union _CHANNEL
@ -90,6 +94,7 @@ typedef union _CHANNEL
CHANNEL; CHANNEL;
#endif #endif
struct timeval null_timeval; struct timeval null_timeval;
struct timeval max_timeval; struct timeval max_timeval;
@ -99,7 +104,6 @@ struct timeval max_timeval;
#define DEFAULT_HTTP_TCP_PORT "HTTP" #define DEFAULT_HTTP_TCP_PORT "HTTP"
#define DEFAULT_HTTPS_TCP_PORT "HTTPS" #define DEFAULT_HTTPS_TCP_PORT "HTTPS"
#define DEFAULT_ICP_UDP_PORT "ICP" #define DEFAULT_ICP_UDP_PORT "ICP"
/* #define ICP_UDP_PORT "icp" *//* In config.h */
#define USE_ECHO 1 #define USE_ECHO 1
#define USE_DISCARD 2 #define USE_DISCARD 2

@ -24,7 +24,7 @@ err_ret (char *str, ...)
{ {
va_list args; va_list args;
va_start (args, str); va_start (args, str);
vfprintf (stderr, str, args); vfprintf (stderr, str, args);
va_end (args); va_end (args);
@ -70,7 +70,7 @@ err_quit (char *str, ...)
*/ */
/* VARARGS1 */ /* VARARGS1 */
void void
err_sys (char *str, ...) err_sys (char *str, ...)
{ {
va_list args; va_list args;
@ -88,7 +88,7 @@ void
usage () usage ()
{ {
fprintf (stderr, fprintf (stderr,
"Usage: %s [-v] [-t timeout] [-c] [-d] [-u] [-s size] [-n number] [-w delay] [-h url] [-C] [-S] server-name[:port]\n", "Usage: %s [-v] [-t timeout] [-c] [-d] [-u] [-s size] [-n number] [-w delay] [-h url] [-p priority] [-P tos] [-C] [-S] server-name[:port]\n",
progname); progname);
exit (1); exit (1);
} }

Loading…
Cancel
Save