diff -Nru netperf-2.4.5/aclocal.m4 netperf-2.5.0/aclocal.m4 --- netperf-2.4.5/aclocal.m4 2009-06-12 00:10:28.000000000 +0000 +++ netperf-2.5.0/aclocal.m4 2011-07-19 17:28:28.000000000 +0000 @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.7.9 -*- Autoconf -*- +# generated automatically by aclocal 1.11.1 -*- Autoconf -*- -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 -# Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -11,674 +11,57 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],, +[m4_warning([this file was generated for autoconf 2.67. +You have another version of autoconf. It may work, but is not guaranteed to. +If you have problems, you may need to regenerate the build system entirely. +To do so, use the procedure documented by the package, typically `autoreconf'.])]) -dnl This comes from libcurl's acinclude.m4. it is not clear if this -dnl is original libcurl code, or other code, so we include the libcurl -dnl copyright here -dnl -dnl -dnl Copyright (c) 1996 - 2005, Daniel Stenberg, . -dnl -dnl All rights reserved. -dnl -dnl Permission to use, copy, modify, and distribute this software for any purpose -dnl with or without fee is hereby granted, provided that the above copyright -dnl notice and this permission notice appear in all copies. -dnl -dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN -dnl NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -dnl DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -dnl OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE -dnl OR OTHER DEALINGS IN THE SOFTWARE. -dnl -dnl Except as contained in this notice, the name of a copyright holder shall not -dnl be used in advertising or otherwise to promote the sale, use or other dealings -dnl in this Software without prior written authorization of the copyright holder. - -dnl Check for socklen_t: historically on BSD it is an int, and in -dnl POSIX 1g it is a type of its own, but some platforms use different -dnl types for the argument to getsockopt, getpeername, etc. So we -dnl have to test to find something that will work. - -dnl Remove the AC_CHECK_TYPE - on HP-UX it would find a socklen_t, but the -dnl function prototypes for getsockopt et al will not actually use -dnl socklen_t args unless _XOPEN_SOURCE_EXTENDED is defined. so, the -dnl AC_CHECK_TYPE will find a socklen_t and think all is happiness and -dnl joy when you will really get warnings about mismatch types - type -dnl mismatches that would be possibly Bad (tm) in a 64-bit compile. -dnl raj 2005-05-11 this change may be redistributed at will - -dnl also, added "extern" to the "int getpeername" in an attempt to resolve -dnl an issue with this code under Solaris 2.9. this too may be -dnl redistributed at will - - -AC_DEFUN([OLD_TYPE_SOCKLEN_T], -[ - AC_MSG_CHECKING([for socklen_t equivalent]) - AC_CACHE_VAL([curl_cv_socklen_t_equiv], - [ - # Systems have either "struct sockaddr *" or - # "void *" as the second argument to getpeername - curl_cv_socklen_t_equiv= - for arg2 in "struct sockaddr" void; do - for t in int size_t unsigned long "unsigned long" socklen_t; do - AC_TRY_COMPILE([ - #ifdef HAVE_SYS_TYPES_H - #include - #endif - #ifdef HAVE_SYS_SOCKET_H - #include - #endif - - extern int getpeername (int, $arg2 *, $t *); - ],[ - $t len; - getpeername(0,0,&len); - ],[ - curl_cv_socklen_t_equiv="$t" - break 2 - ]) - done - done - - if test "x$curl_cv_socklen_t_equiv" = x; then - # take a wild guess - curl_cv_socklen_t_equiv="socklen_t" - AC_MSG_WARN([Cannot find a type to use in place of socklen_t, guessing socklen_t]) - fi - ]) - AC_MSG_RESULT($curl_cv_socklen_t_equiv) - AC_DEFINE_UNQUOTED(netperf_socklen_t, $curl_cv_socklen_t_equiv, - [type to use in place of socklen_t if not defined]) -]) - - -dnl * -dnl * Copyright (c) 2001 Motoyuki Kasahara -dnl * -dnl * Redistribution and use in source and binary forms, with or without -dnl * modification, are permitted provided that the following conditions -dnl * are met: -dnl * 1. Redistributions of source code must retain the above copyright -dnl * notice, this list of conditions and the following disclaimer. -dnl * 2. Redistributions in binary form must reproduce the above copyright -dnl * notice, this list of conditions and the following disclaimer in the -dnl * documentation and/or other materials provided with the distribution. -dnl * 3. Neither the name of the project nor the names of its contributors -dnl * may be used to endorse or promote products derived from this software -dnl * without specific prior written permission. -dnl * -dnl * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND -dnl * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -dnl * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -dnl * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORSBE -dnl * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -dnl * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -dnl * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -dnl * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -dnl * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -dnl * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF -dnl * THE POSSIBILITY OF SUCH DAMAGE. -dnl * - -dnl * -dnl * Check for h_errno. -dnl * -AC_DEFUN([AC_DECL_H_ERRNO], -[AC_CACHE_CHECK(for h_errno declaration in netdb.h, ac_cv_decl_h_errno, -[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#include ]], [[ -h_errno = 0; -]])],[ac_cv_decl_h_errno=yes],[ac_cv_decl_h_errno=no])]) -if test "$ac_cv_decl_h_errno" = yes; then - AC_DEFINE(H_ERRNO_DECLARED, 1, -[Define to 1 if `h_errno' is declared by ]) -fi]) - -dnl * -dnl * Copyright (c) 2001 Motoyuki Kasahara -dnl * -dnl * Redistribution and use in source and binary forms, with or without -dnl * modification, are permitted provided that the following conditions -dnl * are met: -dnl * 1. Redistributions of source code must retain the above copyright -dnl * notice, this list of conditions and the following disclaimer. -dnl * 2. Redistributions in binary form must reproduce the above copyright -dnl * notice, this list of conditions and the following disclaimer in the -dnl * documentation and/or other materials provided with the distribution. -dnl * 3. Neither the name of the project nor the names of its contributors -dnl * may be used to endorse or promote products derived from this software -dnl * without specific prior written permission. -dnl * -dnl * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND -dnl * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -dnl * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -dnl * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORSBE -dnl * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -dnl * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -dnl * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -dnl * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -dnl * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -dnl * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF -dnl * THE POSSIBILITY OF SUCH DAMAGE. -dnl * - -dnl * -dnl * Check for struct sockaddr_in6 -dnl * -AC_DEFUN([AC_STRUCT_SOCKADDR_IN6], -[AC_CACHE_CHECK(for struct sockaddr_in6, ac_cv_struct_sockaddr_in6, -[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#include -#include -#include ]], [[ -struct sockaddr_in6 address; -]])],[ac_cv_struct_sockaddr_in6=yes],[ac_cv_struct_sockaddr_in6=no])]) -if test "$ac_cv_struct_sockaddr_in6" = yes; then - AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6, 1, -[Define to 1 if defines `struct sockaddr_in6']) -fi]) - -dnl * -dnl * Check for struct sockaddr_storage -dnl * -AC_DEFUN([AC_STRUCT_SOCKADDR_STORAGE], -[AC_CACHE_CHECK(for struct sockaddr_storage, ac_cv_struct_sockaddr_storage, -[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#include -#include -#include ]], [[ -struct sockaddr_storage address; -]])],[ac_cv_struct_sockaddr_storage=yes],[ac_cv_struct_sockaddr_storage=no])]) -if test "$ac_cv_struct_sockaddr_storage" = yes; then - AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE, 1, -[Define to 1 if defines `struct sockaddr_storage']) -fi]) - -dnl * -dnl * Copyright (c) 2001, 2003 Motoyuki Kasahara -dnl * -dnl * Redistribution and use in source and binary forms, with or without -dnl * modification, are permitted provided that the following conditions -dnl * are met: -dnl * 1. Redistributions of source code must retain the above copyright -dnl * notice, this list of conditions and the following disclaimer. -dnl * 2. Redistributions in binary form must reproduce the above copyright -dnl * notice, this list of conditions and the following disclaimer in the -dnl * documentation and/or other materials provided with the distribution. -dnl * 3. Neither the name of the project nor the names of its contributors -dnl * may be used to endorse or promote products derived from this software -dnl * without specific prior written permission. -dnl * -dnl * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND -dnl * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -dnl * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -dnl * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORSBE -dnl * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -dnl * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -dnl * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -dnl * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -dnl * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -dnl * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF -dnl * THE POSSIBILITY OF SUCH DAMAGE. -dnl * - -dnl * -dnl * Check for socklen_t. -dnl * -AC_DEFUN([AC_TYPE_SOCKLEN_T], -[AC_CACHE_CHECK([for socklen_t], ac_cv_type_socklen_t, -[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#include -#include ]], [[ -socklen_t socklen; -]])],[ac_cv_type_socklen_t=yes],[ac_cv_type_socklen_t=no])]) -if test "$ac_cv_type_socklen_t" != yes; then - AC_DEFINE(socklen_t, int, -[Define to `int' if or does not define.]) -fi]) - -dnl * -dnl * Check for in_port_t. -dnl * -AC_DEFUN([AC_TYPE_IN_PORT_T], -[AC_CACHE_CHECK([for in_port_t], ac_cv_type_in_port_t, -[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#include -#include -#include ]], [[ -in_port_t in_port; -]])],[ac_cv_type_in_port_t=yes],[ac_cv_type_in_port_t=no])]) -if test "$ac_cv_type_in_port_t" != yes; then - ac_cv_sin_port_size=unknown - AC_RUN_IFELSE([AC_LANG_SOURCE([[ - #include - #include - #include - int main() { - struct sockaddr_in addr; - return (sizeof(addr.sin_port) == sizeof(long)) ? 0 : 1; - } - ]])],[ac_cv_sin_port_size=long],[],[]) - AC_RUN_IFELSE([AC_LANG_SOURCE([[ - #include - #include - #include - int main() { - struct sockaddr_in addr; - return (sizeof(addr.sin_port) == sizeof(int)) ? 0 : 1; - } - ]])],[ac_cv_sin_port_size=int],[],[]) - AC_RUN_IFELSE([AC_LANG_SOURCE([[ - #include - #include - #include - int main() { - struct sockaddr_in addr; - return (sizeof(addr.sin_port) == sizeof(short)) ? 0 : 1; - } - ]])],[ac_cv_sin_port_size=short],[],[]) - AC_RUN_IFELSE([AC_LANG_SOURCE([[ - #include - #include - #include - int main() { - struct sockaddr_in addr; - return (sizeof(addr.sin_port) == sizeof(char)) ? 0 : 1; - } - ]])],[ac_cv_sin_port_size=char],[],[]) - if test "$ac_cv_sin_port_size" = unknown; then - AC_MSG_ERROR([Failed to get size of sin_port in struct sockaddr_in.]) - fi - AC_DEFINE_UNQUOTED(in_port_t, unsigned $ac_cv_sin_port_size, -[Define to `unsigned char', `unsigned short', `unsigned int' or -`unsigned long' according with size of `sin_port' in `struct sockaddr_in', -if , or does not define -`in_port_t'.]) -fi]) - -dnl * -dnl * Check for sa_family_t. -dnl * -AC_DEFUN([AC_TYPE_SA_FAMILY_T], -[AC_CACHE_CHECK([for sa_family_t], ac_cv_type_sa_family_t, -[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ -#include -#include ]], [[ -sa_family_t sa_family; -]])],[ac_cv_type_sa_family_t=yes],[ac_cv_type_sa_family_t=no])]) -if test "$ac_cv_type_sa_family_t" != yes; then - ac_cv_sa_family_size=unknown - AC_RUN_IFELSE([AC_LANG_SOURCE([[ - #include - #include - int main() { - struct sockaddr addr; - return (sizeof(addr.sa_family) == sizeof(long)) ? 0 : 1; - } - ]])],[ac_cv_sa_family_size=long],[],[]) - AC_RUN_IFELSE([AC_LANG_SOURCE([[ - #include - #include - int main() { - struct sockaddr addr; - return (sizeof(addr.sa_family) == sizeof(int)) ? 0 : 1; - } - ]])],[ac_cv_sa_family_size=int],[],[]) - AC_RUN_IFELSE([AC_LANG_SOURCE([[ - #include - #include - int main() { - struct sockaddr addr; - return (sizeof(addr.sa_family) == sizeof(short)) ? 0 : 1; - } - ]])],[ac_cv_sa_family_size=short],[],[]) - AC_RUN_IFELSE([AC_LANG_SOURCE([[ - #include - #include - int main() { - struct sockaddr addr; - return (sizeof(addr.sa_family) == sizeof(char)) ? 0 : 1; - } - ]])],[ac_cv_sa_family_size=char],[],[]) - if test "$ac_cv_sa_family_size" = unknown; then - AC_MSG_ERROR([Failed to get size of sa_family in struct sockaddr.]) - fi - AC_DEFINE_UNQUOTED(sa_family_t, unsigned $ac_cv_sa_family_size, -[Define to `unsigned char', `unsigned short', `unsigned int' or -`unsigned long' according with size of `sa_family' in `struct sockaddr', -if or does not define `sa_family_t'.]) -fi]) - -# Do all the work for Automake. -*- Autoconf -*- - -# This macro actually does too much some checks are only needed if -# your package does certain things. But this isn't really a big deal. - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 -# Free Software Foundation, Inc. - -# 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, 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-1307, USA. - -# serial 10 - -AC_PREREQ([2.54]) - -# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow -# the ones we care about. -m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl - -# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) -# AM_INIT_AUTOMAKE([OPTIONS]) -# ----------------------------------------------- -# The call with PACKAGE and VERSION arguments is the old style -# call (pre autoconf-2.50), which is being phased out. PACKAGE -# and VERSION should now be passed to AC_INIT and removed from -# the call to AM_INIT_AUTOMAKE. -# We support both call styles for the transition. After -# the next Automake release, Autoconf can make the AC_INIT -# arguments mandatory, and then we can depend on a new Autoconf -# release and drop the old call support. -AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl - AC_REQUIRE([AC_PROG_INSTALL])dnl -# test to see if srcdir already configured -if test "`cd $srcdir && pwd`" != "`pwd`" && - test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi -AC_SUBST([CYGPATH_W]) - -# Define the identity of the package. -dnl Distinguish between old-style and new-style calls. -m4_ifval([$2], -[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl - AC_SUBST([PACKAGE], [$1])dnl - AC_SUBST([VERSION], [$2])], -[_AM_SET_OPTIONS([$1])dnl - AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl - AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl - -_AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl - -# Some tools Automake needs. -AC_REQUIRE([AM_SANITY_CHECK])dnl -AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) -AM_MISSING_PROG(AUTOCONF, autoconf) -AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) -AM_MISSING_PROG(AUTOHEADER, autoheader) -AM_MISSING_PROG(MAKEINFO, makeinfo) -AM_MISSING_PROG(AMTAR, tar) -AM_PROG_INSTALL_SH -AM_PROG_INSTALL_STRIP -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([AC_PROG_MAKE_SET])dnl -AC_REQUIRE([AM_SET_LEADING_DOT])dnl - -_AM_IF_OPTION([no-dependencies],, -[AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES(CC)], - [define([AC_PROG_CC], - defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl -AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES(CXX)], - [define([AC_PROG_CXX], - defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl -]) -]) - - -# When config.status generates a header, we must update the stamp-h file. -# This file resides in the same directory as the config header -# that is generated. The stamp files are numbered to have different names. - -# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the -# loop where config.status creates the headers, so we can generate -# our stamp files there. -AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], -[# Compute $1's index in $config_headers. -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $1 | $1:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) - -# Copyright 2002 Free Software Foundation, Inc. - -# 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, 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 +# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. -AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"]) +# (This private macro should not be called outside this file.) +AC_DEFUN([AM_AUTOMAKE_VERSION], +[am__api_version='1.11' +dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +dnl require some minimum version. Point them to the right macro. +m4_if([$1], [1.11.1], [], + [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +]) + +# _AM_AUTOCONF_VERSION(VERSION) +# ----------------------------- +# aclocal traces this macro to find the Autoconf version. +# This is a private macro too. Using m4_define simplifies +# the logic in aclocal, which can simply ignore this definition. +m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- -# Call AM_AUTOMAKE_VERSION so it can be traced. -# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. +# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], - [AM_AUTOMAKE_VERSION([1.7.9])]) - -# Helper functions for option handling. -*- Autoconf -*- - -# Copyright 2001, 2002 Free Software Foundation, Inc. - -# 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, 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-1307, USA. - -# serial 2 - -# _AM_MANGLE_OPTION(NAME) -# ----------------------- -AC_DEFUN([_AM_MANGLE_OPTION], -[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) - -# _AM_SET_OPTION(NAME) -# ------------------------------ -# Set option NAME. Presently that only means defining a flag for this option. -AC_DEFUN([_AM_SET_OPTION], -[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) - -# _AM_SET_OPTIONS(OPTIONS) -# ---------------------------------- -# OPTIONS is a space-separated list of Automake options. -AC_DEFUN([_AM_SET_OPTIONS], -[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) +[AM_AUTOMAKE_VERSION([1.11.1])dnl +m4_ifndef([AC_AUTOCONF_VERSION], + [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) -# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) -# ------------------------------------------- -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -AC_DEFUN([_AM_IF_OPTION], -[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) +# AM_AUX_DIR_EXPAND -*- Autoconf -*- +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # -# Check to make sure that the build environment is sane. -# - -# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. - -# 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, 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-1307, USA. - -# serial 3 - -# AM_SANITY_CHECK -# --------------- -AC_DEFUN([AM_SANITY_CHECK], -[AC_MSG_CHECKING([whether build environment is sane]) -# Just in case -sleep 1 -echo timestamp > conftest.file -# Do `set' in a subshell so we don't clobber the current shell's -# arguments. Must try -L first in case configure is actually a -# symlink; some systems play weird games with the mod time of symlinks -# (eg FreeBSD returns the mod time of the symlink's containing -# directory). -if ( - set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t $srcdir/configure conftest.file` - fi - rm -f conftest.file - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken -alias in your environment]) - fi - - test "$[2]" = conftest.file - ) -then - # Ok. - : -else - AC_MSG_ERROR([newly created file is older than distributed files! -Check your system clock]) -fi -AC_MSG_RESULT(yes)]) - -# -*- Autoconf -*- - - -# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc. - -# 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, 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-1307, USA. - -# serial 3 - -# AM_MISSING_PROG(NAME, PROGRAM) -# ------------------------------ -AC_DEFUN([AM_MISSING_PROG], -[AC_REQUIRE([AM_MISSING_HAS_RUN]) -$1=${$1-"${am_missing_run}$2"} -AC_SUBST($1)]) - - -# AM_MISSING_HAS_RUN -# ------------------ -# Define MISSING if not defined so far and test if it supports --run. -# If it does, set am_missing_run to use it, otherwise, to nothing. -AC_DEFUN([AM_MISSING_HAS_RUN], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" -# Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " -else - am_missing_run= - AC_MSG_WARN([`missing' script is too old or missing]) -fi -]) - -# AM_AUX_DIR_EXPAND - -# Copyright 2001 Free Software Foundation, Inc. - -# 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, 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-1307, USA. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to @@ -718,131 +101,57 @@ # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. -# Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50]) - -AC_DEFUN([AM_AUX_DIR_EXPAND], [ +AC_DEFUN([AM_AUX_DIR_EXPAND], +[dnl Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) -# AM_PROG_INSTALL_SH -# ------------------ -# Define $install_sh. - -# Copyright 2001 Free Software Foundation, Inc. - -# 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, or (at your option) -# any later version. +# AM_CONDITIONAL -*- Autoconf -*- -# 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-1307, USA. - -AC_DEFUN([AM_PROG_INSTALL_SH], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -install_sh=${install_sh-"$am_aux_dir/install-sh"} -AC_SUBST(install_sh)]) +# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# AM_PROG_INSTALL_STRIP +# serial 9 -# Copyright 2001 Free Software Foundation, Inc. +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ(2.52)dnl + ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE])dnl +AC_SUBST([$1_FALSE])dnl +_AM_SUBST_NOTMAKE([$1_TRUE])dnl +_AM_SUBST_NOTMAKE([$1_FALSE])dnl +m4_define([_AM_COND_VALUE_$1], [$2])dnl +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([[conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]]) +fi])]) -# 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, 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-1307, USA. - -# One issue with vendor `install' (even GNU) is that you can't -# specify the program used to strip binaries. This is especially -# annoying in cross-compiling environments, where the build's strip -# is unlikely to handle the host's binaries. -# Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in `make install-strip', and initialize -# STRIPPROG with the value of the STRIP variable (set by the user). -AC_DEFUN([AM_PROG_INSTALL_STRIP], -[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be `maybe'. -if test "$cross_compiling" != no; then - AC_CHECK_TOOL([STRIP], [strip], :) -fi -INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" -AC_SUBST([INSTALL_STRIP_PROGRAM])]) - -# -*- Autoconf -*- -# Copyright (C) 2003 Free Software Foundation, Inc. - -# 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, 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-1307, USA. - -# serial 1 - -# Check whether the underlying file-system supports filenames -# with a leading dot. For instance MS-DOS doesn't. -AC_DEFUN([AM_SET_LEADING_DOT], -[rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null -AC_SUBST([am__leading_dot])]) - -# serial 5 -*- Autoconf -*- - -# Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. - -# 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, 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-1307, USA. +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. +# serial 10 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, @@ -851,7 +160,6 @@ # CC etc. in the Makefile, will ask for an AC_PROG_CC use... - # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. @@ -871,6 +179,7 @@ ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) @@ -899,6 +208,16 @@ if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi + am__universal=false + m4_case([$1], [CC], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac], + [CXX], + [case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac]) + for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and @@ -910,11 +229,23 @@ : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c - : > sub/conftst$i.h + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested @@ -924,23 +255,33 @@ break fi ;; + msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; none) break ;; esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings - # (even with -Werror). So we grep stderr for any message - # that says an option was ignored. - if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi @@ -974,84 +315,81 @@ # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, -[ --disable-dependency-tracking Speeds up one-time builds - --enable-dependency-tracking Do not reject slow dependency extractors]) +[ --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) -AC_SUBST([AMDEPBACKSLASH]) +AC_SUBST([AMDEPBACKSLASH])dnl +_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) -# Generate code to set up dependency tracking. -*- Autoconf -*- - -# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc. - -# 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, or (at your option) -# any later version. +# Generate code to set up dependency tracking. -*- Autoconf -*- -# 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-1307, USA. +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -#serial 2 +#serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], -[for mf in $CONFIG_FILES; do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # So let's grep whole file. - if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue - # Extract the definition of DEP_FILES from the Makefile without - # running `make'. - DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` - test -z "$DEPDIR" && continue - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n -e '/^U = / s///p' < "$mf"` - test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" - # We invoke sed twice because it is the simplest approach to - # changing $(DEPDIR) to its actual value in the expansion. - for file in `sed -n -e ' - /^DEP_FILES = .*\\\\$/ { - s/^DEP_FILES = // - :loop - s/\\\\$// - p - n - /\\\\$/ b loop - p - } - /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" +[{ + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done done -done +} ])# _AM_OUTPUT_DEPENDENCY_COMMANDS @@ -1068,27 +406,209 @@ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) -# Check to see how 'make' treats includes. -*- Autoconf -*- +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 8 -# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. +# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. +AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) -# 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, or (at your option) -# any later version. +# Do all the work for Automake. -*- Autoconf -*- -# 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-1307, USA. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 16 + +# This macro actually does too much. Some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.62])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl +dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, + [m4_fatal([AC_INIT should be called with package and version arguments])])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) +AM_MISSING_PROG(AUTOCONF, autoconf) +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) +AM_MISSING_PROG(AUTOHEADER, autoheader) +AM_MISSING_PROG(MAKEINFO, makeinfo) +AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl +AC_REQUIRE([AM_PROG_MKDIR_P])dnl +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl +_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], + [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], + [_AM_PROG_TAR([v7])])]) +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES(CC)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJC], + [_AM_DEPENDENCIES(OBJC)], + [define([AC_PROG_OBJC], + defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl +]) +_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl +dnl The `parallel-tests' driver may need to know about EXEEXT, so add the +dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro +dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_CONFIG_COMMANDS_PRE(dnl +[m4_provide_if([_AM_COMPILER_EXEEXT], + [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl +]) + +dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further +dnl mangled by Autoconf and run in a shell conditional statement. +m4_define([_AC_COMPILER_EXEEXT], +m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) + + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_arg=$1 +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) + +# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi +AC_SUBST(install_sh)]) + +# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. # serial 2 +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 4 + # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. @@ -1096,7 +616,7 @@ [am_make=${MAKE-make} cat > confinc << 'END' am__doit: - @echo done + @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. @@ -1106,24 +626,24 @@ _am_result=none # First try GNU make style include. echo "include confinc" > confmf -# We grep out `Entering directory' and `Leaving directory' -# messages which can occur if `w' ends up in MAKEFLAGS. -# In particular we don't look at `^make:' because GNU make might -# be invoked under some other name (usually "gmake"), in which -# case it prints its new name instead of `make'. -if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then - am__include=include - am__quote= - _am_result=GNU -fi +# Ignore all kinds of additional output from `make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf - if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then - am__include=.include - am__quote="\"" - _am_result=BSD - fi + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) @@ -1131,106 +651,315 @@ rm -f confinc confmf ]) -# AM_CONDITIONAL -*- Autoconf -*- +# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright 1997, 2000, 2001 Free Software Foundation, Inc. +# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# 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, or (at your option) -# any later version. +# serial 6 + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) -# 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-1307, USA. + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it supports --run. +# If it does, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([missing])dnl +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + AC_MSG_WARN([`missing' script is too old or missing]) +fi +]) + +# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_PROG_MKDIR_P +# --------------- +# Check for `mkdir -p'. +AC_DEFUN([AM_PROG_MKDIR_P], +[AC_PREREQ([2.60])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, +dnl while keeping a definition of mkdir_p for backward compatibility. +dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. +dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of +dnl Makefile.ins that do not define MKDIR_P, so we do our own +dnl adjustment using top_builddir (which is defined more often than +dnl MKDIR_P). +AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl +case $mkdir_p in + [[\\/$]]* | ?:[[\\/]]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac +]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# serial 4 + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# ------------------------------ +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) + +# _AM_SET_OPTIONS(OPTIONS) +# ---------------------------------- +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# Check to make sure that the build environment is sane. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 +# Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. # serial 5 -AC_PREREQ(2.52) +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftest.file +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[[\\\"\#\$\&\'\`$am_lf]]*) + AC_MSG_ERROR([unsafe absolute working directory name]);; +esac +case $srcdir in + *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) + AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; +esac + +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + rm -f conftest.file + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then -# AM_CONDITIONAL(NAME, SHELL-CONDITION) -# ------------------------------------- -# Define a conditional. -AC_DEFUN([AM_CONDITIONAL], -[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl -AC_SUBST([$1_TRUE]) -AC_SUBST([$1_FALSE]) -if $2; then - $1_TRUE= - $1_FALSE='#' + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi + + test "$[2]" = conftest.file + ) +then + # Ok. + : else - $1_TRUE='#' - $1_FALSE= + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) fi -AC_CONFIG_COMMANDS_PRE( -[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then - AC_MSG_ERROR([conditional "$1" was never defined. -Usually this means the macro was only invoked conditionally.]) -fi])]) +AC_MSG_RESULT(yes)]) -# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*- +# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. +# AM_PROG_INSTALL_STRIP +# --------------------- +# One issue with vendor `install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in `make install-strip', and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# 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, or (at your option) -# any later version. +# Copyright (C) 2006, 2008 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -# 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-1307, USA. +# serial 2 -AC_PREREQ([2.52]) +# _AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. +# This macro is traced by Automake. +AC_DEFUN([_AM_SUBST_NOTMAKE]) + +# AM_SUBST_NOTMAKE(VARIABLE) +# --------------------------- +# Public sister of _AM_SUBST_NOTMAKE. +AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) -# serial 6 +# Check how to create a tarball. -*- Autoconf -*- -# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. -AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) +# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. -dnl Copyright (c) 1995, 1996, 1997, 1998 -dnl tising materials mentioning -dnl dnl features or use of this software display the following acknowledgement: -dnl dnl ``This product includes software developed by the University of California, -dnl dnl Lawrence Berkeley Laboratory and its contributors.'' Neither the name of -dnl dnl the University nor the names of its contributors may be used to endorse -dnl dnl or promote products derived from this software without specific prior -dnl dnl written permission. -dnl dnl THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED -dnl dnl WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF -dnl dnl MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -dnl dnl -dnl dnl LBL autoconf macros -dnl dnl -dnl -dnl -dnl Checks to see if the sockaddr struct has the 4.4 BSD sa_len member -dnl borrowed from LBL libpcap -AC_DEFUN(AC_CHECK_SA_LEN, [ - AC_MSG_CHECKING(if sockaddr struct has sa_len member) - AC_CACHE_VAL($1, - AC_TRY_COMPILE([ -# include -# include ], - [u_int i = sizeof(((struct sockaddr *)0)->sa_len)], - $1=yes, - $1=no)) - AC_MSG_RESULT($$1) - if test $$1 = yes ; then - AC_DEFINE([HAVE_SOCKADDR_SA_LEN],1,[Define if struct sockaddr has the sa_len member]) - fi -]) +# serial 2 + +# _AM_PROG_TAR(FORMAT) +# -------------------- +# Check how to create a tarball in format FORMAT. +# FORMAT should be one of `v7', `ustar', or `pax'. +# +# Substitute a variable $(am__tar) that is a command +# writing to stdout a FORMAT-tarball containing the directory +# $tardir. +# tardir=directory && $(am__tar) > result.tar +# +# Substitute a variable $(am__untar) that extract such +# a tarball read from stdin. +# $(am__untar) < result.tar +AC_DEFUN([_AM_PROG_TAR], +[# Always define AMTAR for backward compatibility. +AM_MISSING_PROG([AMTAR], [tar]) +m4_if([$1], [v7], + [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], + [m4_case([$1], [ustar],, [pax],, + [m4_fatal([Unknown tar format])]) +AC_MSG_CHECKING([how to create a $1 tar archive]) +# Loop over all known methods to create a tar archive until one works. +_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' +_am_tools=${am_cv_prog_tar_$1-$_am_tools} +# Do not fold the above two line into one, because Tru64 sh and +# Solaris sh will not grok spaces in the rhs of `-'. +for _am_tool in $_am_tools +do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; + do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi +done +rm -rf conftest.dir + +AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) +AC_MSG_RESULT([$am_cv_prog_tar_$1])]) +AC_SUBST([am__tar]) +AC_SUBST([am__untar]) +]) # _AM_PROG_TAR +m4_include([src/missing/m4/salen.m4]) +m4_include([acinclude.m4]) diff -Nru netperf-2.4.5/AUTHORS netperf-2.5.0/AUTHORS --- netperf-2.4.5/AUTHORS 2009-05-27 21:49:16.000000000 +0000 +++ netperf-2.5.0/AUTHORS 2011-07-19 18:31:11.000000000 +0000 @@ -105,6 +105,7 @@ calibration-free fixes to configure to recognize Solaris 11 fixes to netcpu_procstat.c for later linux kernels +workarounds to get Linux to report ENOBUFS on TX queue overflows Mark Cooper pointing-out the need for -lresolv when compiling -DDO_DNS on RedHat @@ -228,7 +229,36 @@ is very long. Gisle Vanem -MingW cnd MSDOS (djgpp) leanups. +MingW cnd MSDOS (djgpp) cleanups. Marcel Shuldman Changes to make netperf more profiling friendly + +Bruno Cornec +Fixes to supply some missing fprintf format statements. + +Jose Pedro Oliveira +Linux compilation fixes when SCTP and DCCP are enabled. Changes to +configure.ac to allow it to inherit compiler flags from environment +variables. + +Pal Baranyai +Typo in nettest_dlpi.c + +Brian Haley +Changes to allow something like netperf -H ::1 to work + +Frank Schuster +Discovering that FreeBSD 8.X also does not need an SCTP library + +Josselin Costanzi +DEBUG_LOG_FILE patch for Android + +Dongsheng Song +Assorted Windows fixes + +Hushan Jia +Fix to actually run SCTP_RR_MANY when requested + +David MacMahon davidm@astro.berkeley.edu +Fix to allow configure in a build directory. \ No newline at end of file diff -Nru netperf-2.4.5/autogen.sh netperf-2.5.0/autogen.sh --- netperf-2.4.5/autogen.sh 2007-06-01 22:06:03.000000000 +0000 +++ netperf-2.5.0/autogen.sh 2011-02-10 17:04:21.000000000 +0000 @@ -2,4 +2,4 @@ aclocal -I src/missing/m4 \ && automake --add-missing \ -&& autoconf +&& autoconf && autoheader diff -Nru netperf-2.4.5/config.h.in netperf-2.5.0/config.h.in --- netperf-2.4.5/config.h.in 2009-06-12 00:12:01.000000000 +0000 +++ netperf-2.5.0/config.h.in 2011-07-19 20:29:50.000000000 +0000 @@ -18,6 +18,9 @@ /* Define to 1 if you have the `bzero' function. */ #undef HAVE_BZERO +/* Define to 1 if you have the `daemon' function. */ +#undef HAVE_DAEMON + /* Define to 1 if you have the header file. */ #undef HAVE_ENDIAN_H @@ -75,6 +78,9 @@ /* Define to 1 if you have the `exs' library (-lexs). */ #undef HAVE_LIBEXS +/* Define to 1 if you have the `IO' library (-lIO). */ +#undef HAVE_LIBIO + /* Define to 1 if you have the `kstat' library (-lkstat). */ #undef HAVE_LIBKSTAT @@ -87,6 +93,9 @@ /* Define to 1 if you have the `nsl' library (-lnsl). */ #undef HAVE_LIBNSL +/* Define to 1 if you have the `olrad' library (-lolrad). */ +#undef HAVE_LIBOLRAD + /* Define to 1 if you have the `perfstat' library (-lperfstat). */ #undef HAVE_LIBPERFSTAT @@ -108,6 +117,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_LIMITS_H +/* Define to 1 if you have the header file. */ +#undef HAVE_LINUX_TCP_H + /* Define to 1 if you have the header file. */ #undef HAVE_MALLOC_H @@ -154,6 +166,9 @@ /* Define to 1 if you have the `sendfile' function. */ #undef HAVE_SENDFILE +/* Define to 1 if you have the `setsid' function. */ +#undef HAVE_SETSID + /* Define to 1 if you have the header file. */ #undef HAVE_SIGNAL_H @@ -199,9 +214,15 @@ /* Define to 1 if defines `struct sockaddr_storage' */ #undef HAVE_STRUCT_SOCKADDR_STORAGE +/* Define to 1 if you have the header file. */ +#undef HAVE_SYSCALL_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_IOCTL_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_IPC_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_MMAN_H @@ -226,15 +247,21 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SYSINFO_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H -/* Define to 1 if you have that is POSIX.1 compatible. */ +/* Define to 1 if you have the header file. */ #undef HAVE_SYS_WAIT_H +/* Define to 1 if you have the `toupper' function. */ +#undef HAVE_TOUPPER + /* Define to 1 if you have the `uname' function. */ #undef HAVE_UNAME @@ -274,6 +301,9 @@ /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME +/* Define to the home page for this package. */ +#undef PACKAGE_URL + /* Define to the version of this package. */ #undef PACKAGE_VERSION @@ -340,6 +370,9 @@ /* Define to one to enable paced operation support. May affect results. */ #undef WANT_INTERVALS +/* Define to one to migrate classic to OMNI tests. */ +#undef WANT_MIGRATION + /* Define to one to include OMNI tests. */ #undef WANT_OMNI diff -Nru netperf-2.4.5/configure netperf-2.5.0/configure --- netperf-2.4.5/configure 2009-06-12 00:10:34.000000000 +0000 +++ netperf-2.5.0/configure 2011-07-19 17:28:29.000000000 +0000 @@ -1,60 +1,83 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61 for netperf 2.4.5. +# Generated by GNU Autoconf 2.67 for netperf 2.5.0. +# # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software +# Foundation, Inc. +# +# # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; esac - fi - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' else - PATH_SEPARATOR=: + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' fi - rm -f conf$$.sh + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' fi -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } fi @@ -63,20 +86,18 @@ # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) -as_nl=' -' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -case $0 in +case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done IFS=$as_save_IFS ;; @@ -87,354 +108,321 @@ as_myself=$0 fi if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 fi -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - fi -done - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - - -# Name of the executable. -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE # CDPATH. -$as_unset CDPATH - +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test "x$CONFIG_SHELL" = x; then - if (eval ":") 2>/dev/null; then - as_have_required=yes + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST else - as_have_required=no + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac fi - - if test $as_have_required = yes && (eval ": -(as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes else - exitcode=1 - echo positional parameters were not saved. + as_have_required=no fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : -test \$exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=\$LINENO - as_lineno_2=\$LINENO - test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && - test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } -") 2> /dev/null; then - : else - as_candidate_shells= - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - case $as_dir in + as_found=: + case $as_dir in #( /*) for as_base in sh bash ksh sh5; do - as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi done;; esac + as_found=false done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } IFS=$as_save_IFS - for as_shell in $as_candidate_shells $SHELL; do - # Try only shells that exist, to save several forks. - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { ("$as_shell") 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - + if test "x$CONFIG_SHELL" != x; then : + # We cannot yet assume a decent shell, so we have to provide a + # neutralization value for shells without unset; and this also + # works around shells that cannot unset nonexistent variables. + BASH_ENV=/dev/null + ENV=/dev/null + (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, +$0: including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." + fi + exit 1 fi - - -: -_ASEOF -}; then - CONFIG_SHELL=$as_shell - as_have_required=yes - if { "$as_shell" 2> /dev/null <<\_ASEOF -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - fi - - -: -(as_func_return () { - (exit $1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi -if ( set x; as_func_ret_success y && test x = "$1" ); then - : +} # as_fn_mkdir_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' else - exitcode=1 - echo positional parameters were not saved. -fi - -test $exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } - -_ASEOF -}; then - break -fi - -fi - - done - - if test "x$CONFIG_SHELL" != x; then - for as_var in BASH_ENV ENV - do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - - if test $as_have_required = no; then - echo This script requires a shell more modern than all the - echo shells that I found on your system. Please install a - echo modern shell, or manually run the script under such a - echo shell if you do have one. - { (exit 1); exit 1; } -fi - - -fi - -fi + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith -(eval "as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error -exitcode=0 -if as_func_success; then - : +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. + as_expr=false fi -if as_func_ret_success; then - : +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. + as_basename=false fi -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname else - exitcode=1 - echo positional parameters were not saved. + as_dirname=false fi -test \$exitcode = 0") || { - echo No shell found that supports shell functions. - echo Please tell autoconf@gnu.org about your system, - echo including any error possibly output before this - echo message -} +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= @@ -451,8 +439,7 @@ s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the @@ -462,49 +449,40 @@ exit } - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in +case `echo -n x` in #((((( -n*) - case `echo 'x\c'` in + case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir - mkdir conf$$.dir + mkdir conf$$.dir 2>/dev/null fi -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else as_ln_s='cp -p' -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln + fi else as_ln_s='cp -p' fi @@ -512,7 +490,7 @@ rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then - as_mkdir_p=: + as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false @@ -529,12 +507,12 @@ as_test_x=' eval sh -c '\'' if test -d "$1"; then - test -d "$1/."; + test -d "$1/."; else - case $1 in - -*)set "./$1";; + case $1 in #( + -*)set "./$1";; esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' @@ -548,11 +526,11 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - -exec 7<&0 &1 +test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` @@ -567,14 +545,14 @@ subdirs= MFLAGS= MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='netperf' PACKAGE_TARNAME='netperf' -PACKAGE_VERSION='2.4.5' -PACKAGE_STRING='netperf 2.4.5' +PACKAGE_VERSION='2.5.0' +PACKAGE_STRING='netperf 2.5.0' PACKAGE_BUGREPORT='' +PACKAGE_URL='' ac_unique_file="src/hist.h" ac_config_libobj_dir=src/missing @@ -614,104 +592,138 @@ # include #endif" -ac_subst_vars='SHELL -PATH_SEPARATOR -PACKAGE_NAME -PACKAGE_TARNAME -PACKAGE_VERSION -PACKAGE_STRING -PACKAGE_BUGREPORT -exec_prefix -prefix -program_transform_name -bindir -sbindir -libexecdir -datarootdir -datadir -sysconfdir -sharedstatedir -localstatedir -includedir -oldincludedir -docdir -infodir -htmldir -dvidir -pdfdir -psdir -libdir -localedir -mandir -DEFS -ECHO_C -ECHO_N -ECHO_T -LIBS -build_alias -host_alias -target_alias -build -build_cpu -build_vendor -build_os -host -host_cpu -host_vendor -host_os -target -target_cpu -target_vendor -target_os -INSTALL_PROGRAM -INSTALL_SCRIPT -INSTALL_DATA -CYGPATH_W -PACKAGE -VERSION -ACLOCAL -AUTOCONF -AUTOMAKE -AUTOHEADER -MAKEINFO +ac_header_list= +ac_subst_vars='am__EXEEXT_FALSE +am__EXEEXT_TRUE +LTLIBOBJS +NETSYSLKUP_SOURCE +NETDRVLKUP_SOURCE +NETSECLKUP_SOURCE +NETSLOTLKUP_SOURCE +NETRTLKUP_SOURCE +NETCPU_SOURCE +NEED_LIBCOMPAT_FALSE +NEED_LIBCOMPAT_TRUE +LIBOBJS +EGREP +GREP +CPP +RANLIB +am__fastdepCC_FALSE +am__fastdepCC_TRUE +CCDEPMODE +AMDEPBACKSLASH +AMDEP_FALSE +AMDEP_TRUE +am__quote +am__include +DEPDIR +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +am__untar +am__tar AMTAR -install_sh -STRIP -INSTALL_STRIP_PROGRAM -AWK -SET_MAKE am__leading_dot -CC -CFLAGS -LDFLAGS -CPPFLAGS -ac_ct_CC -EXEEXT -OBJEXT -DEPDIR -am__include -am__quote -AMDEP_TRUE -AMDEP_FALSE -AMDEPBACKSLASH -CCDEPMODE -am__fastdepCC_TRUE -am__fastdepCC_FALSE -RANLIB -CPP -GREP -EGREP -LIBOBJS -NEED_LIBCOMPAT_TRUE -NEED_LIBCOMPAT_FALSE -NETCPU_SOURCE -NETRTLKUP_SOURCE -NETSLOTLKUP_SOURCE -NETSECLKUP_SOURCE -NETDRVLKUP_SOURCE -NETSYSLKUP_SOURCE -LTLIBOBJS' +SET_MAKE +AWK +mkdir_p +MKDIR_P +INSTALL_STRIP_PROGRAM +STRIP +install_sh +MAKEINFO +AUTOHEADER +AUTOMAKE +AUTOCONF +ACLOCAL +VERSION +PACKAGE +CYGPATH_W +am__isrc +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +target_os +target_vendor +target_cpu +target +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' ac_subst_files='' +ac_user_opts=' +enable_option_checking +enable_dependency_tracking +enable_largefile +enable_histogram +enable_dirty +enable_demo +enable_unixdomain +enable_dlpi +enable_dccp +enable_omni +enable_xti +enable_sdp +enable_exs +enable_sctp +enable_intervals +enable_spin +enable_burst +enable_cpuutil +enable_rtlookup +enable_slotlookup +enable_seclookup +enable_drvlookup +enable_syslookup +' ac_precious_vars='build_alias host_alias target_alias @@ -726,6 +738,8 @@ # Initialize some variables set by options. ac_init_help= ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null @@ -781,8 +795,9 @@ fi case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. @@ -824,13 +839,20 @@ datarootdir=$ac_optarg ;; -disable-* | --disable-*) - ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=no ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; @@ -843,13 +865,20 @@ dvidir=$ac_optarg ;; -enable-* | --enable-*) - ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid feature name: $ac_feature" >&2 - { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` - eval enable_$ac_feature=\$ac_optarg ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -1040,22 +1069,36 @@ ac_init_version=: ;; -with-* | --with-*) - ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 - { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=\$ac_optarg ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) - ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. - expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid package name: $ac_package" >&2 - { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/[-.]/_/g'` - eval with_$ac_package=no ;; + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. @@ -1075,25 +1118,25 @@ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) { echo "$as_me: error: unrecognized option: $ac_option -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. - expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && - { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 - { (exit 1); exit 1; }; } + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. - echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; @@ -1102,23 +1145,36 @@ if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - { echo "$as_me: error: missing argument to $ac_option" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "missing argument to $ac_option" +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac fi -# Be sure to have absolute directory names. +# Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1132,8 +1188,8 @@ if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 + $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1148,23 +1204,21 @@ ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - { echo "$as_me: error: Working directory cannot be determined" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - { echo "$as_me: error: pwd does not report name of working directory" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$0" || -$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$0" : 'X\(//\)[^/]' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X"$0" | + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -1191,13 +1245,11 @@ fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 - { (exit 1); exit 1; }; } + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then @@ -1223,7 +1275,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures netperf 2.4.5 to adapt to many kinds of systems. +\`configure' configures netperf 2.5.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1237,7 +1289,7 @@ --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages + -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files @@ -1245,9 +1297,9 @@ Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] + [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] + [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify @@ -1257,25 +1309,25 @@ For better control, use the options below. Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/netperf] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/netperf] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF @@ -1294,15 +1346,16 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of netperf 2.4.5:";; + short | recursive ) echo "Configuration of netperf 2.5.0:";; esac cat <<\_ACEOF Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --disable-dependency-tracking Speeds up one-time builds - --enable-dependency-tracking Do not reject slow dependency extractors + --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors --disable-largefile omit support for large files --enable-histogram include individual op timing, may affect result --enable-dirty write to buffers each time, may affect result @@ -1341,13 +1394,14 @@ LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. +Report bugs to the package provider. _ACEOF ac_status=$? fi @@ -1355,15 +1409,17 @@ if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -1399,7 +1455,7 @@ echo && $SHELL "$ac_srcdir/configure" --help=recursive else - echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done @@ -1408,38 +1464,500 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -netperf configure 2.4.5 -generated by GNU Autoconf 2.61 +netperf configure 2.5.0 +generated by GNU Autoconf 2.67 -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. -It was created by netperf $as_me 2.4.5, which was -generated by GNU Autoconf 2.61. Invocation command line was +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## + +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval - $ $0 $@ +} # ac_fn_c_try_compile -_ACEOF -exec 5>>config.log +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () { -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval + +} # ac_fn_c_try_link + +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + as_fn_set_status $ac_retval + +} # ac_fn_c_try_run + +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if eval "test \"\${$3+set}\"" = set; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval "test \"\${$3+set}\"" = set; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.i conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval "test \"\${$3+set}\"" = set; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_header_mongrel + +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval "test \"\${$3+set}\"" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_header_compile + +# ac_fn_c_check_type LINENO TYPE VAR INCLUDES +# ------------------------------------------- +# Tests whether TYPE exists after having included INCLUDES, setting cache +# variable VAR accordingly. +ac_fn_c_check_type () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval "test \"\${$3+set}\"" = set; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=no" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof ($2)) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof (($2))) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + eval "$3=yes" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_type + +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval "test \"\${$3+set}\"" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +int +main () +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_func + +# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES +# ---------------------------------------------------- +# Tries to find if the field MEMBER exists in type AGGR, after including +# INCLUDES, setting cache variable VAR accordingly. +ac_fn_c_check_member () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 +$as_echo_n "checking for $2.$3... " >&6; } +if eval "test \"\${$4+set}\"" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$5 +int +main () +{ +static $2 ac_aggr; +if (ac_aggr.$3) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$4=yes" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$5 +int +main () +{ +static $2 ac_aggr; +if (sizeof ac_aggr.$3) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$4=yes" +else + eval "$4=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$4 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + +} # ac_fn_c_check_member +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by netperf $as_me 2.5.0, which was +generated by GNU Autoconf 2.67. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` @@ -1459,8 +1977,8 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - echo "PATH: $as_dir" -done + $as_echo "PATH: $as_dir" + done IFS=$as_save_IFS } >&5 @@ -1494,12 +2012,12 @@ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) - ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in - 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) - ac_configure_args1="$ac_configure_args1 '$ac_arg'" + as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else @@ -1515,13 +2033,13 @@ -* ) ac_must_keep_next=true ;; esac fi - ac_configure_args="$ac_configure_args '$ac_arg'" + as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done -$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } -$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there @@ -1533,11 +2051,9 @@ { echo - cat <<\_ASBOX -## ---------------- ## + $as_echo "## ---------------- ## ## Cache variables. ## -## ---------------- ## -_ASBOX +## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( @@ -1546,12 +2062,13 @@ case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( - *) $as_unset $ac_var ;; + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done @@ -1570,131 +2087,142 @@ ) echo - cat <<\_ASBOX -## ----------------- ## + $as_echo "## ----------------- ## ## Output variables. ## -## ----------------- ## -_ASBOX +## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - echo "$ac_var='\''$ac_val'\''" + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## + $as_echo "## ------------------- ## ## File substitutions. ## -## ------------------- ## -_ASBOX +## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac - echo "$ac_var='\''$ac_val'\''" + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## + $as_echo "## ----------- ## ## confdefs.h. ## -## ----------- ## -_ASBOX +## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && - echo "$as_me: caught signal $ac_signal" - echo "$as_me: exit $exit_status" + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h +$as_echo "/* confdefs.h */" > confdefs.h + # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF - cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + # Let the site file select an alternate cache file if it wants to. -# Prefer explicitly selected file to automatically selected ones. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - set x "$CONFIG_SITE" + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac elif test "x$prefix" != xNONE; then - set x "$prefix/share/config.site" "$prefix/etc/config.site" + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site else - set x "$ac_default_prefix/share/config.site" \ - "$ac_default_prefix/etc/config.site" + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site fi -shift -for ac_site_file +for ac_site_file in "$ac_site_file1" "$ac_site_file2" do - if test -r "$ac_site_file"; then - { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 -echo "$as_me: loading site script $ac_site_file" >&6;} + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5 ; } fi done if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special - # files actually), so we avoid doing that. - if test -f "$cache_file"; then - { echo "$as_me:$LINENO: loading cache $cache_file" >&5 -echo "$as_me: loading cache $cache_file" >&6;} + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else - { echo "$as_me:$LINENO: creating cache $cache_file" >&5 -echo "$as_me: creating cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi +as_fn_append ac_header_list " stdlib.h" +as_fn_append ac_header_list " unistd.h" +as_fn_append ac_header_list " sys/param.h" # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false @@ -1705,68 +2233,56 @@ eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) - { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 -echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then - { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 -echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 -echo "$as_me: former value: $ac_old_val" >&2;} - { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 -echo "$as_me: current value: $ac_new_val" >&2;} - ac_cache_corrupted=: + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then - { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 -echo "$as_me: error: changes in the environment can compromise the build" >&2;} - { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 -echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} - { (exit 1); exit 1; }; } -fi - - - - - - - - - - - - - - - - - - - - - - - - + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -1775,6 +2291,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + +# Inherit compiler flags from the environment... +CFLAGS="${CFLAGS:=}" +CXXFLAGS="${CXXFLAGS:=}" + # use the target version rather than host - one day we may want cross-compile ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do @@ -1793,9 +2314,7 @@ fi done if test -z "$ac_aux_dir"; then - { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 -echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, @@ -1809,35 +2328,27 @@ # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 -echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} - { (exit 1); exit 1; }; } - -{ echo "$as_me:$LINENO: checking build system type" >&5 -echo $ECHO_N "checking build system type... $ECHO_C" >&6; } -if test "${ac_cv_build+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if test "${ac_cv_build+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && - { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 -echo "$as_me: error: cannot guess build type; you must specify one" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 -echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi -{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5 -echo "${ECHO_T}$ac_cv_build" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 -echo "$as_me: error: invalid value of canonical build" >&2;} - { (exit 1); exit 1; }; };; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -1853,28 +2364,24 @@ case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac -{ echo "$as_me:$LINENO: checking host system type" >&5 -echo $ECHO_N "checking host system type... $ECHO_C" >&6; } -if test "${ac_cv_host+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if test "${ac_cv_host+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 -echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi -{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5 -echo "${ECHO_T}$ac_cv_host" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 -echo "$as_me: error: invalid value of canonical host" >&2;} - { (exit 1); exit 1; }; };; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -1890,28 +2397,24 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac -{ echo "$as_me:$LINENO: checking target system type" >&5 -echo $ECHO_N "checking target system type... $ECHO_C" >&6; } -if test "${ac_cv_target+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 +$as_echo_n "checking target system type... " >&6; } +if test "${ac_cv_target+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test "x$target_alias" = x; then ac_cv_target=$ac_cv_host else ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || - { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5 -echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 fi fi -{ echo "$as_me:$LINENO: result: $ac_cv_target" >&5 -echo "${ECHO_T}$ac_cv_target" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 +$as_echo "$ac_cv_target" >&6; } case $ac_cv_target in *-*-*) ;; -*) { { echo "$as_me:$LINENO: error: invalid value of canonical target" >&5 -echo "$as_me: error: invalid value of canonical target" >&2;} - { (exit 1); exit 1; }; };; +*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5 ;; esac target=$ac_cv_target ac_save_IFS=$IFS; IFS='-' @@ -1934,7 +2437,8 @@ NONENONEs,x,x, && program_prefix=${target_alias}- -am__api_version="1.7" +am__api_version='1.11' + # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: @@ -1948,22 +2452,23 @@ # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. -{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test "${ac_cv_path_install+set}" = set; then : + $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in - ./ | .// | /cC/* | \ + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. @@ -1981,17 +2486,29 @@ # program-specific install script used by HP pwplus--don't use. : else - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi fi fi done done ;; esac -done + + done IFS=$as_save_IFS +rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then @@ -2004,8 +2521,8 @@ INSTALL=$ac_install_sh fi fi -{ echo "$as_me:$LINENO: result: $INSTALL" >&5 -echo "${ECHO_T}$INSTALL" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. @@ -2015,21 +2532,34 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' -{ echo "$as_me:$LINENO: checking whether build environment is sane" >&5 -echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 +$as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[\\\"\#\$\&\'\`$am_lf]*) + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5 ;; +esac +case $srcdir in + *[\\\"\#\$\&\'\`$am_lf\ \ ]*) + as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5 ;; +esac + # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( - set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. - set X `ls -t $srcdir/configure conftest.file` + set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ @@ -2039,11 +2569,8 @@ # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". - { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken -alias in your environment" >&5 -echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken -alias in your environment" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken +alias in your environment" "$LINENO" 5 fi test "$2" = conftest.file @@ -2052,49 +2579,206 @@ # Ok. : else - { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! -Check your system clock" >&5 -echo "$as_me: error: newly created file is older than distributed files! -Check your system clock" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "newly created file is older than distributed files! +Check your system clock" "$LINENO" 5 fi -{ echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" -# Double any \ or $. echo might interpret backslashes. +# Double any \ or $. # By default was `s,x,x', remove it if useless. -cat <<\_ACEOF >conftest.sed -s/[\\$]/&&/g;s/;s,x,x,$// -_ACEOF -program_transform_name=`echo $program_transform_name | sed -f conftest.sed` -rm -f conftest.sed - +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` -test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= - { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 -echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi -for ac_prog in gawk mawk nawk awk -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +if test x"${install_sh}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi + +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_STRIP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } +if test -z "$MKDIR_P"; then + if test "${ac_cv_path_mkdir+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done + done +IFS=$as_save_IFS + +fi + + test -d ./--version && rmdir ./--version + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + MKDIR_P="$ac_install_sh -d" + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } + +mkdir_p="$MKDIR_P" +case $mkdir_p in + [\\/$]* | ?:[\\/]*) ;; + */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +esac + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_AWK+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. @@ -2104,43 +2788,44 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then - { echo "$as_me:$LINENO: result: $AWK" >&5 -echo "${ECHO_T}$AWK" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi test -n "$AWK" && break done -{ echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } -set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : + $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; @@ -2150,12 +2835,12 @@ rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } SET_MAKE= else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi @@ -2168,12 +2853,14 @@ fi rmdir .tst 2>/dev/null - # test to see if srcdir already configured -if test "`cd $srcdir && pwd`" != "`pwd`" && - test -f $srcdir/config.status; then - { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 -echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} - { (exit 1); exit 1; }; } +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + fi fi # test whether we have cygpath @@ -2188,7 +2875,7 @@ # Define the identity of the package. PACKAGE='netperf' - VERSION='2.4.5' + VERSION='2.5.0' cat >>confdefs.h <<_ACEOF @@ -2216,117 +2903,15 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +# Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} -install_sh=${install_sh-"$am_aux_dir/install-sh"} - -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right -# tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -if test "$cross_compiling" != no; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_STRIP="${ac_tool_prefix}strip" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { echo "$as_me:$LINENO: result: $STRIP" >&5 -echo "${ECHO_T}$STRIP" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_STRIP="strip" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done -IFS=$as_save_IFS - -fi -fi -ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 -echo "${ECHO_T}$ac_ct_STRIP" >&6; } -else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi +am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' -fi -INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. @@ -2337,7 +2922,7 @@ # make sure we build netperf_version.h -touch src/netperf_version.h.in +touch ${ac_top_srcdir}src/netperf_version.h.in # Checks for programs. ac_ext=c @@ -2348,10 +2933,10 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2361,25 +2946,25 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -2388,10 +2973,10 @@ ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -2401,25 +2986,25 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then @@ -2427,12 +3012,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -2445,10 +3026,10 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2458,25 +3039,25 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -2485,10 +3066,10 @@ 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 "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2499,18 +3080,18 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then @@ -2529,11 +3110,11 @@ fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -2544,10 +3125,10 @@ do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2557,25 +3138,25 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - { echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -2588,10 +3169,10 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -2601,25 +3182,25 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then - { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 -echo "${ECHO_T}$ac_ct_CC" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -2631,12 +3212,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC @@ -2646,51 +3223,37 @@ fi -test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&5 -echo "$as_me: error: no acceptable C compiler found in \$PATH -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5 ; } # Provide some information about the compiler. -echo "$as_me:$LINENO: checking for C compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -V >&5") 2>&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -2702,42 +3265,38 @@ } _ACEOF ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.exe b.out" +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } -ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -# -# List of possible output files, starting from the most likely. -# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) -# only as a last resort. b.out is created by i960 compilers. -ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' -# -# The IRIX 6 linker writes into existing files which may not be -# executable, retaining their permissions. Remove them first so a -# subsequent execution test works. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + ac_rmfiles= for ac_file in $ac_files do case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles -if { (ac_try="$ac_link_default" +if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, @@ -2747,14 +3306,14 @@ do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi @@ -2773,78 +3332,41 @@ else ac_file='' fi - -{ echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6; } -if test -z "$ac_file"; then - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { echo "$as_me:$LINENO: error: C compiler cannot create executables -See \`config.log' for more details." >&5 -echo "$as_me: error: C compiler cannot create executables -See \`config.log' for more details." >&2;} - { (exit 77); exit 77; }; } -fi - +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5 ; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } -# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 -# If not cross compiling, check that we can run a simple program. -if test "$cross_compiling" != yes; then - if { ac_try='./$ac_file' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { echo "$as_me:$LINENO: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } - fi - fi -fi -{ echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } - -rm -f a.out a.exe conftest$ac_cv_exeext b.out +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } -{ echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6; } - -{ echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } -if { (ac_try="$ac_link" +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with @@ -2852,154 +3374,182 @@ for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else - { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi - -rm -f conftest$ac_cv_exeext -{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 -echo "${ECHO_T}$ac_cv_exeext" >&6; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5 ; } +fi +rm -f conftest conftest$ac_cv_exeext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT -{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 -echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } -if test "${ac_cv_objext+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - +#include int main () { +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF -rm -f conftest.o conftest.obj -if { (ac_try="$ac_compile" +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>&5 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute suffix of object files: cannot compile -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } -fi - -rm -f conftest.$ac_cv_objext conftest.$ac_ext + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details" "$LINENO" 5 ; } + fi + fi fi -{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 -echo "${ECHO_T}$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 -echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if test "${ac_cv_objext+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { -#ifndef __GNUC__ - choke me -#endif ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" +rm -f conftest.o conftest.obj +if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_compiler_gnu=yes + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_compiler_gnu=no +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5 ; } +fi +rm -f conftest.$ac_cv_objext conftest.$ac_ext fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } -GCC=`test $ac_compiler_gnu = yes && echo yes` +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3010,34 +3560,11 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CFLAGS="" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3048,35 +3575,12 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_compile "$LINENO"; then : - ac_c_werror_flag=$ac_save_c_werror_flag +else + ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3087,42 +3591,18 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi -{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -3138,18 +3618,14 @@ CFLAGS= fi fi -{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 -echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -3206,31 +3682,9 @@ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done @@ -3241,17 +3695,19 @@ # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) - { echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6; } ;; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; xno) - { echo "$as_me:$LINENO: result: unsupported" >&5 -echo "${ECHO_T}unsupported" >&6; } ;; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" - { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac +if test "x$ac_cv_prog_cc_c89" != xno; then : +fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -3266,44 +3722,44 @@ am_make=${MAKE-make} cat > confinc << 'END' am__doit: - @echo done + @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. -{ echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 -echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 +$as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf -# We grep out `Entering directory' and `Leaving directory' -# messages which can occur if `w' ends up in MAKEFLAGS. -# In particular we don't look at `^make:' because GNU make might -# be invoked under some other name (usually "gmake"), in which -# case it prints its new name instead of `make'. -if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then - am__include=include - am__quote= - _am_result=GNU -fi +# Ignore all kinds of additional output from `make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf - if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then - am__include=.include - am__quote="\"" - _am_result=BSD - fi + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac fi -{ echo "$as_me:$LINENO: result: $_am_result" >&5 -echo "${ECHO_T}$_am_result" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 +$as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then +if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi @@ -3311,9 +3767,7 @@ am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi - - -if test "x$enable_dependency_tracking" != xno; then + if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else @@ -3323,13 +3777,12 @@ - depcc="$CC" am_compiler_list= -{ echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 -echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } -if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up @@ -3354,6 +3807,11 @@ if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and @@ -3365,11 +3823,23 @@ : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c - : > sub/conftst$i.h + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested @@ -3379,23 +3849,33 @@ break fi ;; + msvisualcpp | msvcmsys) + # This compiler won't grok `-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; none) break ;; esac - # We check with `-c' and `-o' for the sake of the "dashmstdout" - # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. if depmode=$depmode \ - source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings - # (even with -Werror). So we grep stderr for any message - # that says an option was ignored. - if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi @@ -3409,13 +3889,11 @@ fi fi -{ echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 -echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - -if + if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= @@ -3429,10 +3907,10 @@ if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_RANLIB+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. @@ -3442,25 +3920,25 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then - { echo "$as_me:$LINENO: result: $RANLIB" >&5 -echo "${ECHO_T}$RANLIB" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 +$as_echo "$RANLIB" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi @@ -3469,10 +3947,10 @@ ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 -{ echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. @@ -3482,25 +3960,25 @@ do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do + for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done -done + done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then - { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 -echo "${ECHO_T}$ac_ct_RANLIB" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 +$as_echo "$ac_ct_RANLIB" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then @@ -3508,12 +3986,8 @@ else case $cross_compiling:$ac_tool_warned in yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB @@ -3524,16 +3998,12 @@ -{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 -echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; } -if test "${ac_cv_c_const+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 +$as_echo_n "checking for an ANSI C-conforming const... " >&6; } +if test "${ac_cv_c_const+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -3593,58 +4063,31 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_c_const=no + ac_cv_c_const=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 -echo "${ECHO_T}$ac_cv_c_const" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 +$as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then -cat >>confdefs.h <<\_ACEOF -#define const -_ACEOF +$as_echo "#define const /**/" >>confdefs.h fi # Checks for libraries. - -{ echo "$as_me:$LINENO: checking for main in -lm" >&5 -echo $ECHO_N "checking for main in -lm... $ECHO_C" >&6; } -if test "${ac_cv_lib_m_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5 +$as_echo_n "checking for main in -lm... " >&6; } +if test "${ac_cv_lib_m_main+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -3656,39 +4099,18 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_main=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_m_main=no + ac_cv_lib_m_main=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_m_main" >&5 -echo "${ECHO_T}$ac_cv_lib_m_main" >&6; } -if test $ac_cv_lib_m_main = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5 +$as_echo "$ac_cv_lib_m_main" >&6; } +if test "x$ac_cv_lib_m_main" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF @@ -3705,15 +4127,15 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 -echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + if test "${ac_cv_prog_CPP+set}" = set; then : + $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" @@ -3727,11 +4149,7 @@ # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include @@ -3740,76 +4158,34 @@ #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_cpp "$LINENO"; then : +else # Broken: fails on valid input. continue fi - -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then +if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - # Passes both tests. ac_preproc_ok=: break fi - -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : break fi @@ -3821,8 +4197,8 @@ else ac_cv_prog_CPP=$CPP fi -{ echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -3832,11 +4208,7 @@ # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include @@ -3845,83 +4217,40 @@ #endif Syntax error _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_cpp "$LINENO"; then : +else # Broken: fails on valid input. continue fi - -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then +if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - # Passes both tests. ac_preproc_ok=: break fi - -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then - : +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + else - { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&5 -echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." >&2;} - { (exit 1); exit 1; }; } + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5 ; } fi ac_ext=c @@ -3931,45 +4260,40 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 -echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } -if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Extract the first word of "grep ggrep" to use in msg output -if test -z "$GREP"; then -set dummy grep ggrep; ac_prog_name=$2 -if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if test "${ac_cv_path_GREP+set}" = set; then : + $as_echo_n "(cached) " >&6 else + if test -z "$GREP"; then ac_path_GREP_found=false -# Loop through the user's path and test for each of PROGNAME-LIST -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue - # Check for GNU ac_path_GREP and select it if it is found. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue +# Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - echo 'GREP' >> "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` + as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" @@ -3981,77 +4305,61 @@ rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac - - $ac_path_GREP_found && break 3 + $ac_path_GREP_found && break 3 + done + done done -done - -done IFS=$as_save_IFS - - -fi - -GREP="$ac_cv_path_GREP" -if test -z "$GREP"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } -fi - + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi else ac_cv_path_GREP=$GREP fi - fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 -echo "${ECHO_T}$ac_cv_path_GREP" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" -{ echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then : + $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else - # Extract the first word of "egrep" to use in msg output -if test -z "$EGREP"; then -set dummy egrep; ac_prog_name=$2 -if test "${ac_cv_path_EGREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else + if test -z "$EGREP"; then ac_path_EGREP_found=false -# Loop through the user's path and test for each of PROGNAME-LIST -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue - # Check for GNU ac_path_EGREP and select it if it is found. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue +# Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" + $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" - echo 'EGREP' >> "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` + as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" @@ -4063,46 +4371,31 @@ rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac - - $ac_path_EGREP_found && break 3 + $ac_path_EGREP_found && break 3 + done + done done -done - -done IFS=$as_save_IFS - - -fi - -EGREP="$ac_cv_path_EGREP" -if test -z "$EGREP"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } -fi - + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi else ac_cv_path_EGREP=$EGREP fi - fi fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 -echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" -{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } -if test "${ac_cv_header_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if test "${ac_cv_header_stdc+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -4117,47 +4410,23 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_stdc=no + ac_cv_header_stdc=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : + $EGREP "memchr" >/dev/null 2>&1; then : + else ac_cv_header_stdc=no fi @@ -4167,18 +4436,14 @@ 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 <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then - : + $EGREP "free" >/dev/null 2>&1; then : + else ac_cv_header_stdc=no fi @@ -4188,14 +4453,10 @@ if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then + if test "$cross_compiling" = yes; then : : else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -4222,61 +4483,31 @@ return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +if ac_fn_c_try_run "$LINENO"; then : -( exit $ac_status ) -ac_cv_header_stdc=no +else + ac_cv_header_stdc=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - fi fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then -cat >>confdefs.h <<\_ACEOF -#define STDC_HEADERS 1 -_ACEOF +$as_echo "#define STDC_HEADERS 1" >>confdefs.h fi -{ echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 -echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6; } -if test "${ac_cv_header_sys_wait_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 +$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } +if test "${ac_cv_header_sys_wait_h+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -4297,105 +4528,33 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_sys_wait_h=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_sys_wait_h=no + ac_cv_header_sys_wait_h=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5 +$as_echo "$ac_cv_header_sys_wait_h" >&6; } if test $ac_cv_header_sys_wait_h = yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_SYS_WAIT_H 1 -_ACEOF +$as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h fi -# On IRIX 5.3, sys/types and inttypes.h are conflicting. - - - - - - - - +# lets keep this in some semblence of alphabetical order +# On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - eval "$as_ac_Header=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Header'}'` = yes; then +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -4403,159 +4562,13 @@ done - - - - - - - - - - - - - - - - - - - - -for ac_header in arpa/inet.h endian.h errno.h fcntl.h limits.h malloc.h netdb.h netinet/in.h signal.h stdlib.h string.h strings.h sys/ioctl.h sys/mman.h sys/param.h sys/socket.h sys/time.h unistd.h ifaddrs.h sys/sockio.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +for ac_header in arpa/inet.h endian.h errno.h fcntl.h ifaddrs.h limits.h linux/tcp.h malloc.h netdb.h netinet/in.h netinet/sctp.h signal.h stdlib.h string.h strings.h syscall.h sys/ioctl.h sys/mman.h sys/param.h sys/socket.h sys/stat.h sys/time.h sys/wait.h sys/ipc.h sys/sockio.h sys/sysinfo.h sys/wait.h stdlib.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -4564,19 +4577,14 @@ # Some platforms require these. There may be a better way. - -{ echo "$as_me:$LINENO: checking for main in -lsocket" >&5 -echo $ECHO_N "checking for main in -lsocket... $ECHO_C" >&6; } -if test "${ac_cv_lib_socket_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lsocket" >&5 +$as_echo_n "checking for main in -lsocket... " >&6; } +if test "${ac_cv_lib_socket_main+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -4588,39 +4596,18 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_socket_main=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_socket_main=no + ac_cv_lib_socket_main=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_main" >&5 -echo "${ECHO_T}$ac_cv_lib_socket_main" >&6; } -if test $ac_cv_lib_socket_main = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_main" >&5 +$as_echo "$ac_cv_lib_socket_main" >&6; } +if test "x$ac_cv_lib_socket_main" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBSOCKET 1 _ACEOF @@ -4631,19 +4618,14 @@ ac_cv_lib_socket=ac_cv_lib_socket_main if test "$ac_cv_lib_socket_main" = yes ; then - -{ echo "$as_me:$LINENO: checking for main in -lnsl" >&5 -echo $ECHO_N "checking for main in -lnsl... $ECHO_C" >&6; } -if test "${ac_cv_lib_nsl_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lnsl" >&5 +$as_echo_n "checking for main in -lnsl... " >&6; } +if test "${ac_cv_lib_nsl_main+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -4655,39 +4637,18 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_nsl_main=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_nsl_main=no + ac_cv_lib_nsl_main=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_main" >&5 -echo "${ECHO_T}$ac_cv_lib_nsl_main" >&6; } -if test $ac_cv_lib_nsl_main = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_main" >&5 +$as_echo "$ac_cv_lib_nsl_main" >&6; } +if test "x$ac_cv_lib_nsl_main" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBNSL 1 _ACEOF @@ -4697,19 +4658,14 @@ fi ac_cv_lib_nsl=ac_cv_lib_nsl_main - -{ echo "$as_me:$LINENO: checking for main in -lsendfile" >&5 -echo $ECHO_N "checking for main in -lsendfile... $ECHO_C" >&6; } -if test "${ac_cv_lib_sendfile_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lsendfile" >&5 +$as_echo_n "checking for main in -lsendfile... " >&6; } +if test "${ac_cv_lib_sendfile_main+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsendfile $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -4721,39 +4677,18 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_sendfile_main=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_sendfile_main=no + ac_cv_lib_sendfile_main=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_sendfile_main" >&5 -echo "${ECHO_T}$ac_cv_lib_sendfile_main" >&6; } -if test $ac_cv_lib_sendfile_main = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sendfile_main" >&5 +$as_echo "$ac_cv_lib_sendfile_main" >&6; } +if test "x$ac_cv_lib_sendfile_main" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBSENDFILE 1 _ACEOF @@ -4764,16 +4699,16 @@ ac_cv_lib_sendfile=ac_cv_lib_sendfile_main # Check whether --enable-largefile was given. -if test "${enable_largefile+set}" = set; then +if test "${enable_largefile+set}" = set; then : enableval=$enable_largefile; fi if test "$enable_largefile" != no; then - { echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5 -echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6; } -if test "${ac_cv_sys_largefile_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 +$as_echo_n "checking for special C compiler options needed for large files... " >&6; } +if test "${ac_cv_sys_largefile_CC+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_cv_sys_largefile_CC=no if test "$GCC" != yes; then @@ -4781,11 +4716,7 @@ while :; do # IRIX 6.2 and later do not support large files by default, # so use the C compiler's -n32 option if that helps. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. @@ -4804,58 +4735,14 @@ return 0; } _ACEOF - rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + if ac_fn_c_try_compile "$LINENO"; then : break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext CC="$CC -n32" - rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then + if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_largefile_CC=' -n32'; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext break done @@ -4863,23 +4750,19 @@ rm -f conftest.$ac_ext fi fi -{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5 -echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 +$as_echo "$ac_cv_sys_largefile_CC" >&6; } if test "$ac_cv_sys_largefile_CC" != no; then CC=$CC$ac_cv_sys_largefile_CC fi - { echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5 -echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6; } -if test "${ac_cv_sys_file_offset_bits+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 +$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } +if test "${ac_cv_sys_file_offset_bits+set}" = set; then : + $as_echo_n "(cached) " >&6 else while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. @@ -4898,37 +4781,11 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_file_offset_bits=no; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _FILE_OFFSET_BITS 64 #include @@ -4948,38 +4805,16 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_file_offset_bits=64; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_sys_file_offset_bits=unknown break done fi -{ echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5 -echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 +$as_echo "$ac_cv_sys_file_offset_bits" >&6; } case $ac_cv_sys_file_offset_bits in #( no | unknown) ;; *) @@ -4988,19 +4823,15 @@ _ACEOF ;; esac -rm -f conftest* +rm -rf conftest* if test $ac_cv_sys_file_offset_bits = unknown; then - { echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5 -echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6; } -if test "${ac_cv_sys_large_files+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 +$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } +if test "${ac_cv_sys_large_files+set}" = set; then : + $as_echo_n "(cached) " >&6 else while :; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. @@ -5019,37 +4850,11 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_large_files=no; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define _LARGE_FILES 1 #include @@ -5069,38 +4874,16 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sys_large_files=1; break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_sys_large_files=unknown break done fi -{ echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5 -echo "${ECHO_T}$ac_cv_sys_large_files" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 +$as_echo "$ac_cv_sys_large_files" >&6; } case $ac_cv_sys_large_files in #( no | unknown) ;; *) @@ -5109,26 +4892,21 @@ _ACEOF ;; esac -rm -f conftest* +rm -rf conftest* fi fi fi # this one is for Tru64 and bind_to_cpu_id - -{ echo "$as_me:$LINENO: checking for main in -lmach" >&5 -echo $ECHO_N "checking for main in -lmach... $ECHO_C" >&6; } -if test "${ac_cv_lib_mach_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmach" >&5 +$as_echo_n "checking for main in -lmach... " >&6; } +if test "${ac_cv_lib_mach_main+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lmach $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -5140,39 +4918,18 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_mach_main=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_mach_main=no + ac_cv_lib_mach_main=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_mach_main" >&5 -echo "${ECHO_T}$ac_cv_lib_mach_main" >&6; } -if test $ac_cv_lib_mach_main = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mach_main" >&5 +$as_echo "$ac_cv_lib_mach_main" >&6; } +if test "x$ac_cv_lib_mach_main" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBMACH 1 _ACEOF @@ -5184,16 +4941,12 @@ # Checks for typedefs, structures, and compiler characteristics. -{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 -echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; } -if test "${ac_cv_c_const+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 +$as_echo_n "checking for an ANSI C-conforming const... " >&6; } +if test "${ac_cv_c_const+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -5253,98 +5006,24 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_c_const=no + ac_cv_c_const=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 -echo "${ECHO_T}$ac_cv_c_const" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 +$as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then -cat >>confdefs.h <<\_ACEOF -#define const -_ACEOF +$as_echo "#define const /**/" >>confdefs.h fi -{ echo "$as_me:$LINENO: checking for off_t" >&5 -echo $ECHO_N "checking for off_t... $ECHO_C" >&6; } -if test "${ac_cv_type_off_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -typedef off_t ac__type_new_; -int -main () -{ -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_type_off_t=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_off_t=no -fi +ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" +if test "x$ac_cv_type_off_t" = x""yes; then : -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 -echo "${ECHO_T}$ac_cv_type_off_t" >&6; } -if test $ac_cv_type_off_t = yes; then - : else cat >>confdefs.h <<_ACEOF @@ -5353,61 +5032,9 @@ fi -{ echo "$as_me:$LINENO: checking for size_t" >&5 -echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } -if test "${ac_cv_type_size_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -typedef size_t ac__type_new_; -int -main () -{ -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_type_size_t=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_size_t=no -fi +ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" +if test "x$ac_cv_type_size_t" = x""yes; then : -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 -echo "${ECHO_T}$ac_cv_type_size_t" >&6; } -if test $ac_cv_type_size_t = yes; then - : else cat >>confdefs.h <<_ACEOF @@ -5419,10 +5046,10 @@ # AC_TYPE_SOCKLEN_T - { echo "$as_me:$LINENO: checking for socklen_t equivalent" >&5 -echo $ECHO_N "checking for socklen_t equivalent... $ECHO_C" >&6; } - if test "${curl_cv_socklen_t_equiv+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5 +$as_echo_n "checking for socklen_t equivalent... " >&6; } + if test "${curl_cv_socklen_t_equiv+set}" = set; then : + $as_echo_n "(cached) " >&6 else # Systems have either "struct sockaddr *" or @@ -5430,11 +5057,7 @@ curl_cv_socklen_t_equiv= for arg2 in "struct sockaddr" void; do for t in int size_t unsigned long "unsigned long" socklen_t; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef HAVE_SYS_TYPES_H @@ -5457,34 +5080,12 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : curl_cv_socklen_t_equiv="$t" break 2 -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done done @@ -5492,14 +5093,14 @@ if test "x$curl_cv_socklen_t_equiv" = x; then # take a wild guess curl_cv_socklen_t_equiv="socklen_t" - { echo "$as_me:$LINENO: WARNING: Cannot find a type to use in place of socklen_t, guessing socklen_t" >&5 -echo "$as_me: WARNING: Cannot find a type to use in place of socklen_t, guessing socklen_t" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find a type to use in place of socklen_t, guessing socklen_t" >&5 +$as_echo "$as_me: WARNING: Cannot find a type to use in place of socklen_t, guessing socklen_t" >&2;} fi fi - { echo "$as_me:$LINENO: result: $curl_cv_socklen_t_equiv" >&5 -echo "${ECHO_T}$curl_cv_socklen_t_equiv" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_socklen_t_equiv" >&5 +$as_echo "$curl_cv_socklen_t_equiv" >&6; } cat >>confdefs.h <<_ACEOF #define netperf_socklen_t $curl_cv_socklen_t_equiv @@ -5508,16 +5109,12 @@ # AC_TYPE_IN_PORT_T -{ echo "$as_me:$LINENO: checking for h_errno declaration in netdb.h" >&5 -echo $ECHO_N "checking for h_errno declaration in netdb.h... $ECHO_C" >&6; } -if test "${ac_cv_decl_h_errno+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for h_errno declaration in netdb.h" >&5 +$as_echo_n "checking for h_errno declaration in netdb.h... " >&6; } +if test "${ac_cv_decl_h_errno+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -5531,52 +5128,26 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_decl_h_errno=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_decl_h_errno=no + ac_cv_decl_h_errno=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_decl_h_errno" >&5 -echo "${ECHO_T}$ac_cv_decl_h_errno" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_decl_h_errno" >&5 +$as_echo "$ac_cv_decl_h_errno" >&6; } if test "$ac_cv_decl_h_errno" = yes; then -cat >>confdefs.h <<\_ACEOF -#define H_ERRNO_DECLARED 1 -_ACEOF +$as_echo "#define H_ERRNO_DECLARED 1" >>confdefs.h fi -{ echo "$as_me:$LINENO: checking for struct sockaddr_storage" >&5 -echo $ECHO_N "checking for struct sockaddr_storage... $ECHO_C" >&6; } -if test "${ac_cv_struct_sockaddr_storage+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_storage" >&5 +$as_echo_n "checking for struct sockaddr_storage... " >&6; } +if test "${ac_cv_struct_sockaddr_storage+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -5592,52 +5163,26 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_struct_sockaddr_storage=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_struct_sockaddr_storage=no + ac_cv_struct_sockaddr_storage=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5 -echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_sockaddr_storage" >&5 +$as_echo "$ac_cv_struct_sockaddr_storage" >&6; } if test "$ac_cv_struct_sockaddr_storage" = yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_STRUCT_SOCKADDR_STORAGE 1 -_ACEOF +$as_echo "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h fi -{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 -echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; } -if test "${ac_cv_header_time+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 +$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } +if test "${ac_cv_header_time+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -5652,53 +5197,27 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_time=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_time=no + ac_cv_header_time=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 -echo "${ECHO_T}$ac_cv_header_time" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 +$as_echo "$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then -cat >>confdefs.h <<\_ACEOF -#define TIME_WITH_SYS_TIME 1 -_ACEOF +$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h fi -{ echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5 -echo $ECHO_N "checking for stdbool.h that conforms to C99... $ECHO_C" >&6; } -if test "${ac_cv_header_stdbool_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 +$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } +if test "${ac_cv_header_stdbool_h+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include @@ -5733,6 +5252,8 @@ char h[sizeof (_Bool)]; char i[sizeof s.t]; enum { j = false, k = true, l = false * true, m = true * 256 }; + /* The following fails for + HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ _Bool n[m]; char o[sizeof n == m * sizeof n[0] ? 1 : -1]; char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; @@ -5776,89 +5297,17 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdbool_h=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_header_stdbool_h=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5 -echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6; } -{ echo "$as_me:$LINENO: checking for _Bool" >&5 -echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; } -if test "${ac_cv_type__Bool+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -typedef _Bool ac__type_new_; -int -main () -{ -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_type__Bool=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type__Bool=no + ac_cv_header_stdbool_h=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5 -echo "${ECHO_T}$ac_cv_type__Bool" >&6; } -if test $ac_cv_type__Bool = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 +$as_echo "$ac_cv_header_stdbool_h" >&6; } +ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" +if test "x$ac_cv_type__Bool" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE__BOOL 1 @@ -5869,23 +5318,17 @@ if test $ac_cv_header_stdbool_h = yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_STDBOOL_H 1 -_ACEOF +$as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h fi - { echo "$as_me:$LINENO: checking if sockaddr struct has sa_len member" >&5 -echo $ECHO_N "checking if sockaddr struct has sa_len member... $ECHO_C" >&6; } - if test "${ac_cv_sockaddr_has_sa_len+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if sockaddr struct has sa_len member" >&5 +$as_echo_n "checking if sockaddr struct has sa_len member... " >&6; } + if test "${ac_cv_sockaddr_has_sa_len+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ # include @@ -5898,102 +5341,28 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_sockaddr_has_sa_len=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_sockaddr_has_sa_len=no + ac_cv_sockaddr_has_sa_len=no fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi - { echo "$as_me:$LINENO: result: $ac_cv_sockaddr_has_sa_len" >&5 -echo "${ECHO_T}$ac_cv_sockaddr_has_sa_len" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sockaddr_has_sa_len" >&5 +$as_echo "$ac_cv_sockaddr_has_sa_len" >&6; } if test $ac_cv_sockaddr_has_sa_len = yes ; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_SOCKADDR_SA_LEN 1 -_ACEOF +$as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h fi # Checks for library functions. # AC_FUNC_ERROR_AT_LINE -{ echo "$as_me:$LINENO: checking for pid_t" >&5 -echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; } -if test "${ac_cv_type_pid_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -typedef pid_t ac__type_new_; -int -main () -{ -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_type_pid_t=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" +if test "x$ac_cv_type_pid_t" = x""yes; then : - ac_cv_type_pid_t=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 -echo "${ECHO_T}$ac_cv_type_pid_t" >&6; } -if test $ac_cv_type_pid_t = yes; then - : else cat >>confdefs.h <<_ACEOF @@ -6002,304 +5371,65 @@ fi - for ac_header in vfork.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> +do : + ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" +if test "x$ac_cv_header_vfork_h" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_VFORK_H 1 _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_compiler=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } +done -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> +for ac_func in fork vfork +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - ac_header_preproc=no fi +done -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } +if test "x$ac_cv_func_fork" = xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 +$as_echo_n "checking for working fork... " >&6; } +if test "${ac_cv_func_fork_works+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + if test "$cross_compiling" = yes; then : + ac_cv_func_fork_works=cross +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + /* By Ruediger Kuhlmann. */ + return fork () < 0; - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + ac_cv_func_fork_works=yes else - eval "$as_ac_Header=\$ac_header_preproc" + ac_cv_func_fork_works=no fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - -for ac_func in fork vfork -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi -done - -if test "x$ac_cv_func_fork" = xyes; then - { echo "$as_me:$LINENO: checking for working fork" >&5 -echo $ECHO_N "checking for working fork... $ECHO_C" >&6; } -if test "${ac_cv_func_fork_works+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then - ac_cv_func_fork_works=cross -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ - - /* By Ruediger Kuhlmann. */ - return fork () < 0; - - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_fork_works=yes -else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_func_fork_works=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5 -echo "${ECHO_T}$ac_cv_func_fork_works" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 +$as_echo "$ac_cv_func_fork_works" >&6; } else ac_cv_func_fork_works=$ac_cv_func_fork @@ -6314,24 +5444,20 @@ ac_cv_func_fork_works=yes ;; esac - { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 -echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 +$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} fi ac_cv_func_vfork_works=$ac_cv_func_vfork if test "x$ac_cv_func_vfork" = xyes; then - { echo "$as_me:$LINENO: checking for working vfork" >&5 -echo $ECHO_N "checking for working vfork... $ECHO_C" >&6; } -if test "${ac_cv_func_vfork_works+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 +$as_echo_n "checking for working vfork... " >&6; } +if test "${ac_cv_func_vfork_works+set}" = set; then : + $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then + if test "$cross_compiling" = yes; then : ac_cv_func_vfork_works=cross else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Thanks to Paul Eggert for this test. */ $ac_includes_default @@ -6423,207 +5549,53 @@ } } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_vfork_works=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_func_vfork_works=no + ac_cv_func_vfork_works=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5 -echo "${ECHO_T}$ac_cv_func_vfork_works" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 +$as_echo "$ac_cv_func_vfork_works" >&6; } fi; if test "x$ac_cv_func_fork_works" = xcross; then ac_cv_func_vfork_works=$ac_cv_func_vfork - { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 -echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 +$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} fi if test "x$ac_cv_func_vfork_works" = xyes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_WORKING_VFORK 1 -_ACEOF +$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h else -cat >>confdefs.h <<\_ACEOF -#define vfork fork -_ACEOF +$as_echo "#define vfork fork" >>confdefs.h fi if test "x$ac_cv_func_fork_works" = xyes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_WORKING_FORK 1 -_ACEOF +$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h fi # AC_FUNC_MALLOC -for ac_header in stdlib.h unistd.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then + for ac_header in $ac_header_list +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -6631,112 +5603,32 @@ done -for ac_func in getpagesize -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ -# include -#else -# include -#endif -#undef $ac_func -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_var'}'` = yes; then +for ac_func in getpagesize +do : + ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" +if test "x$ac_cv_func_getpagesize" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define HAVE_GETPAGESIZE 1 _ACEOF fi done -{ echo "$as_me:$LINENO: checking for working mmap" >&5 -echo $ECHO_N "checking for working mmap... $ECHO_C" >&6; } -if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 +$as_echo_n "checking for working mmap... " >&6; } +if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then : + $as_echo_n "(cached) " >&6 else - if test "$cross_compiling" = yes; then + if test "$cross_compiling" = yes; then : ac_cv_func_mmap_fixed_mapped=no else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default /* malloc might have been renamed as rpl_malloc. */ @@ -6773,11 +5665,6 @@ /* This mess was copied from the GNU getpagesize.h. */ #ifndef HAVE_GETPAGESIZE -/* Assume that all systems that can run configure have sys/param.h. */ -# ifndef HAVE_SYS_PARAM_H -# define HAVE_SYS_PARAM_H 1 -# endif - # ifdef _SC_PAGESIZE # define getpagesize() sysconf(_SC_PAGESIZE) # else /* no _SC_PAGESIZE */ @@ -6812,8 +5699,9 @@ main () { char *data, *data2, *data3; + const char *cdata2; int i, pagesize; - int fd; + int fd, fd2; pagesize = getpagesize (); @@ -6826,27 +5714,41 @@ umask (0); fd = creat ("conftest.mmap", 0600); if (fd < 0) - return 1; + return 2; if (write (fd, data, pagesize) != pagesize) - return 1; + return 3; close (fd); + /* Next, check that the tail of a page is zero-filled. File must have + non-zero length, otherwise we risk SIGBUS for entire page. */ + fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); + if (fd2 < 0) + return 4; + cdata2 = ""; + if (write (fd2, cdata2, 1) != 1) + return 5; + data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); + if (data2 == MAP_FAILED) + return 6; + for (i = 0; i < pagesize; ++i) + if (*(data2 + i)) + return 7; + close (fd2); + if (munmap (data2, pagesize)) + return 8; + /* Next, try to mmap the file at a fixed address which already has something else allocated at it. If we can, also make sure that we see the same garbage. */ fd = open ("conftest.mmap", O_RDWR); if (fd < 0) - return 1; - data2 = (char *) malloc (2 * pagesize); - if (!data2) - return 1; - data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1); + return 9; if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_FIXED, fd, 0L)) - return 1; + return 10; for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data2 + i)) - return 1; + return 11; /* Finally, make sure that changes to the mapped area do not percolate back to the file as seen by read(). (This is a bug on @@ -6855,215 +5757,57 @@ *(data2 + i) = *(data2 + i) + 1; data3 = (char *) malloc (pagesize); if (!data3) - return 1; + return 12; if (read (fd, data3, pagesize) != pagesize) - return 1; + return 13; for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data3 + i)) - return 1; + return 14; close (fd); return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_mmap_fixed_mapped=yes else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_func_mmap_fixed_mapped=no + ac_cv_func_mmap_fixed_mapped=no fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5 -echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 +$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } if test $ac_cv_func_mmap_fixed_mapped = yes; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_MMAP 1 -_ACEOF +$as_echo "#define HAVE_MMAP 1" >>confdefs.h fi -rm -f conftest.mmap +rm -f conftest.mmap conftest.txt + +for ac_header in sys/select.h sys/socket.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF +fi +done -for ac_header in sys/select.h sys/socket.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - -{ echo "$as_me:$LINENO: checking types of arguments for select" >&5 -echo $ECHO_N "checking types of arguments for select... $ECHO_C" >&6; } -if test "${ac_cv_func_select_args+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for select" >&5 +$as_echo_n "checking types of arguments for select... " >&6; } +if test "${ac_cv_func_select_args+set}" = set; then : + $as_echo_n "(cached) " >&6 else for ac_arg234 in 'fd_set *' 'int *' 'void *'; do for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default #ifdef HAVE_SYS_SELECT_H @@ -7083,31 +5827,9 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3 -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done done @@ -7116,8 +5838,8 @@ : ${ac_cv_func_select_args='int,int *,struct timeval *'} fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_select_args" >&5 -echo "${ECHO_T}$ac_cv_func_select_args" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_select_args" >&5 +$as_echo "$ac_cv_func_select_args" >&6; } ac_save_IFS=$IFS; IFS=',' set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'` IFS=$ac_save_IFS @@ -7139,21 +5861,15 @@ rm -f conftest* -{ echo "$as_me:$LINENO: checking whether setpgrp takes no argument" >&5 -echo $ECHO_N "checking whether setpgrp takes no argument... $ECHO_C" >&6; } -if test "${ac_cv_func_setpgrp_void+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then - { { echo "$as_me:$LINENO: error: cannot check setpgrp when cross compiling" >&5 -echo "$as_me: error: cannot check setpgrp when cross compiling" >&2;} - { (exit 1); exit 1; }; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 +$as_echo_n "checking whether setpgrp takes no argument... " >&6; } +if test "${ac_cv_func_setpgrp_void+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + if test "$cross_compiling" = yes; then : + as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int @@ -7167,60 +5883,30 @@ return 0; } _ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then +if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_setpgrp_void=no else - echo "$as_me: program exited with status $ac_status" >&5 -echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -( exit $ac_status ) -ac_cv_func_setpgrp_void=yes + ac_cv_func_setpgrp_void=yes fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext fi - fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_setpgrp_void" >&5 -echo "${ECHO_T}$ac_cv_func_setpgrp_void" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 +$as_echo "$ac_cv_func_setpgrp_void" >&6; } if test $ac_cv_func_setpgrp_void = yes; then -cat >>confdefs.h <<\_ACEOF -#define SETPGRP_VOID 1 -_ACEOF +$as_echo "#define SETPGRP_VOID 1" >>confdefs.h fi -{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5 -echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; } -if test "${ac_cv_type_signal+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 +$as_echo_n "checking return type of signal handlers... " >&6; } +if test "${ac_cv_type_signal+set}" = set; then : + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include @@ -7233,35 +5919,15 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then +if ac_fn_c_try_compile "$LINENO"; then : ac_cv_type_signal=int else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_type_signal=void + ac_cv_type_signal=void fi - rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 -echo "${ECHO_T}$ac_cv_type_signal" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 +$as_echo "$ac_cv_type_signal" >&6; } cat >>confdefs.h <<_ACEOF #define RETSIGTYPE $ac_cv_type_signal @@ -7271,111 +5937,13 @@ # AC_FUNC_STAT # remove pstat_getdynamic (at least for now) since we don't do # anything conditional with the check anyway... - - - - - - - - - - - - - - - - - -for ac_func in alarm bzero gethostbyname gethrtime gettimeofday inet_ntoa memset memcpy munmap select socket sqrt strcasecmp strchr strstr strtoul uname -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_var'}'` = yes; then +for ac_func in alarm bzero daemon gethostbyname gethrtime gettimeofday inet_ntoa memset memcpy munmap select setsid socket sqrt strcasecmp strchr strstr strtoul uname toupper +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi @@ -7385,423 +5953,84 @@ #AC_CONFIG_SUBDIRS(src/missing) # does this platform need the replacement getaddrinfo - - - - for ac_func in getnameinfo getaddrinfo inet_ntop getifaddrs -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - -# AC_REPLACE_FUNCS([getaddrinfo]) - - -if test "$ac_cv_func_getaddrinfo$ac_cv_func_getnameinfo" != yesyes ; then - { echo "$as_me:$LINENO: Requesting replacement getaddrinfo/getnameinfo" >&5 -echo "$as_me: Requesting replacement getaddrinfo/getnameinfo" >&6;} - case " $LIBOBJS " in - *" getaddrinfo.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext" - ;; -esac - - HAVE_MISSING=yes -fi -if test "$ac_cv_func_inet_ntop" != yes ; then - { echo "$as_me:$LINENO: Requesting replacement inet_ntop" >&5 -echo "$as_me: Requesting replacement inet_ntop" >&6;} - case " $LIBOBJS " in - *" inet_ntop.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS inet_ntop.$ac_objext" - ;; -esac - - HAVE_MISSING=yes -fi - - -if test "$HAVE_MISSING" = "yes"; then - NEED_LIBCOMPAT_TRUE= - NEED_LIBCOMPAT_FALSE='#' -else - NEED_LIBCOMPAT_TRUE='#' - NEED_LIBCOMPAT_FALSE= -fi - - - -for ac_func in sendfile -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_var'}'` = yes; then - cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - - -for ac_func in uname -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $ac_func - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_var=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_var'}'` = yes; then +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done - -# check for the various CPU binding calls - +# AC_REPLACE_FUNCS([getaddrinfo]) +if test "$ac_cv_func_getaddrinfo$ac_cv_func_getnameinfo" != yesyes ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: Requesting replacement getaddrinfo/getnameinfo" >&5 +$as_echo "$as_me: Requesting replacement getaddrinfo/getnameinfo" >&6;} + case " $LIBOBJS " in + *" getaddrinfo.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext" + ;; +esac + HAVE_MISSING=yes +fi +if test "$ac_cv_func_inet_ntop" != yes ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: Requesting replacement inet_ntop" >&5 +$as_echo "$as_me: Requesting replacement inet_ntop" >&6;} + case " $LIBOBJS " in + *" inet_ntop.$ac_objext "* ) ;; + *) LIBOBJS="$LIBOBJS inet_ntop.$ac_objext" + ;; +esac -for ac_func in mpctl processor_bind sched_setaffinity bind_to_cpu_id bindprocessor -do -as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_func" >&5 -echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } -if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + HAVE_MISSING=yes +fi + if test "$HAVE_MISSING" = "yes"; then + NEED_LIBCOMPAT_TRUE= + NEED_LIBCOMPAT_FALSE='#' else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Define $ac_func to an innocuous variant, in case declares $ac_func. - For example, HP-UX 11i declares gettimeofday. */ -#define $ac_func innocuous_$ac_func + NEED_LIBCOMPAT_TRUE='#' + NEED_LIBCOMPAT_FALSE= +fi -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $ac_func (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ -#ifdef __STDC__ -# include -#else -# include -#endif +for ac_func in sendfile +do : + ac_fn_c_check_func "$LINENO" "sendfile" "ac_cv_func_sendfile" +if test "x$ac_cv_func_sendfile" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_SENDFILE 1 +_ACEOF -#undef $ac_func +fi +done -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $ac_func (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$ac_func || defined __stub___$ac_func -choke me -#endif -int -main () -{ -return $ac_func (); - ; - return 0; -} +for ac_func in uname +do : + ac_fn_c_check_func "$LINENO" "uname" "ac_cv_func_uname" +if test "x$ac_cv_func_uname" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_UNAME 1 _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - eval "$as_ac_var=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - eval "$as_ac_var=no" fi +done -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_var'}'` = yes; then + +# check for the various CPU binding calls +for ac_func in mpctl processor_bind sched_setaffinity bind_to_cpu_id bindprocessor +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi @@ -7810,11 +6039,11 @@ # see if we should be enabling histogram support -{ echo "$as_me:$LINENO: checking whether to include histogram support" >&5 -echo $ECHO_N "checking whether to include histogram support... $ECHO_C" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include histogram support" >&5 +$as_echo_n "checking whether to include histogram support... " >&6; } # Check whether --enable-histogram was given. -if test "${enable_histogram+set}" = set; then +if test "${enable_histogram+set}" = set; then : enableval=$enable_histogram; fi @@ -7831,36 +6060,32 @@ use_histogram=false ;; *) - { { echo "$as_me:$LINENO: error: --enable-histogram takes yes or no" >&5 -echo "$as_me: error: --enable-histogram takes yes or no" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "--enable-histogram takes yes or no" "$LINENO" 5 ;; esac if $use_histogram then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if $use_histogram then -cat >>confdefs.h <<\_ACEOF -#define WANT_HISTOGRAM -_ACEOF +$as_echo "#define WANT_HISTOGRAM /**/" >>confdefs.h fi # see if we should be enabling histogram support -{ echo "$as_me:$LINENO: checking whether to include dirty support" >&5 -echo $ECHO_N "checking whether to include dirty support... $ECHO_C" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include dirty support" >&5 +$as_echo_n "checking whether to include dirty support... " >&6; } # Check whether --enable-dirty was given. -if test "${enable_dirty+set}" = set; then +if test "${enable_dirty+set}" = set; then : enableval=$enable_dirty; fi @@ -7877,37 +6102,33 @@ use_dirty=false ;; *) - { { echo "$as_me:$LINENO: error: --enable-dirty takes yes or no" >&5 -echo "$as_me: error: --enable-dirty takes yes or no" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "--enable-dirty takes yes or no" "$LINENO" 5 ;; esac if $use_dirty then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if $use_dirty then -cat >>confdefs.h <<\_ACEOF -#define DIRTY -_ACEOF +$as_echo "#define DIRTY /**/" >>confdefs.h fi # see if we should be enabling demo support -{ echo "$as_me:$LINENO: checking whether to include demo support" >&5 -echo $ECHO_N "checking whether to include demo support... $ECHO_C" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include demo support" >&5 +$as_echo_n "checking whether to include demo support... " >&6; } # Check whether --enable-demo was given. -if test "${enable_demo+set}" = set; then +if test "${enable_demo+set}" = set; then : enableval=$enable_demo; fi @@ -7924,37 +6145,33 @@ use_demo=false ;; *) - { { echo "$as_me:$LINENO: error: --enable-demo takes yes or no" >&5 -echo "$as_me: error: --enable-demo takes yes or no" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "--enable-demo takes yes or no" "$LINENO" 5 ;; esac if $use_demo then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if $use_demo then -cat >>confdefs.h <<\_ACEOF -#define WANT_DEMO -_ACEOF +$as_echo "#define WANT_DEMO /**/" >>confdefs.h fi # see if we should be including the AF_UNIX tests -{ echo "$as_me:$LINENO: checking whether to include Unix-domain socket tests" >&5 -echo $ECHO_N "checking whether to include Unix-domain socket tests... $ECHO_C" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include Unix-domain socket tests" >&5 +$as_echo_n "checking whether to include Unix-domain socket tests... " >&6; } # Check whether --enable-unixdomain was given. -if test "${enable_unixdomain+set}" = set; then +if test "${enable_unixdomain+set}" = set; then : enableval=$enable_unixdomain; fi @@ -7970,37 +6187,33 @@ use_unixdomain=false ;; *) - { { echo "$as_me:$LINENO: error: --enable-unixdomain takes yes or no" >&5 -echo "$as_me: error: --enable-unixdomain takes yes or no" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "--enable-unixdomain takes yes or no" "$LINENO" 5 ;; esac if $use_unixdomain then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if $use_unixdomain then -cat >>confdefs.h <<\_ACEOF -#define WANT_UNIX -_ACEOF +$as_echo "#define WANT_UNIX /**/" >>confdefs.h fi # see if we should be including the DLPI tests -{ echo "$as_me:$LINENO: checking whether to include DLPI tests" >&5 -echo $ECHO_N "checking whether to include DLPI tests... $ECHO_C" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include DLPI tests" >&5 +$as_echo_n "checking whether to include DLPI tests... " >&6; } # Check whether --enable-dlpi was given. -if test "${enable_dlpi+set}" = set; then +if test "${enable_dlpi+set}" = set; then : enableval=$enable_dlpi; fi @@ -8016,37 +6229,33 @@ use_dlpi=false ;; *) - { { echo "$as_me:$LINENO: error: --enable-dlpi takes yes or no" >&5 -echo "$as_me: error: --enable-dlpi takes yes or no" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "--enable-dlpi takes yes or no" "$LINENO" 5 ;; esac if $use_dlpi then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if $use_dlpi then -cat >>confdefs.h <<\_ACEOF -#define WANT_DLPI -_ACEOF +$as_echo "#define WANT_DLPI /**/" >>confdefs.h fi # see if we should be including the DCCP tests -{ echo "$as_me:$LINENO: checking whether to include DCCP tests" >&5 -echo $ECHO_N "checking whether to include DCCP tests... $ECHO_C" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include DCCP tests" >&5 +$as_echo_n "checking whether to include DCCP tests... " >&6; } # Check whether --enable-dccp was given. -if test "${enable_dccp+set}" = set; then +if test "${enable_dccp+set}" = set; then : enableval=$enable_dccp; fi @@ -8062,37 +6271,33 @@ use_dccp=false ;; *) - { { echo "$as_me:$LINENO: error: --enable-dccp takes yes or no" >&5 -echo "$as_me: error: --enable-dccp takes yes or no" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "--enable-dccp takes yes or no" "$LINENO" 5 ;; esac if $use_dccp then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if $use_dccp then -cat >>confdefs.h <<\_ACEOF -#define WANT_DCCP -_ACEOF +$as_echo "#define WANT_DCCP /**/" >>confdefs.h fi # see if we should be including the OMNI tests -{ echo "$as_me:$LINENO: checking whether to include OMNI tests" >&5 -echo $ECHO_N "checking whether to include OMNI tests... $ECHO_C" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include OMNI tests" >&5 +$as_echo_n "checking whether to include OMNI tests... " >&6; } # Check whether --enable-omni was given. -if test "${enable_omni+set}" = set; then +if test "${enable_omni+set}" = set; then : enableval=$enable_omni; fi @@ -8105,41 +6310,40 @@ use_omni=false ;; '') - use_omni=false + use_omni=true ;; *) - { { echo "$as_me:$LINENO: error: --enable-omni takes yes or no" >&5 -echo "$as_me: error: --enable-omni takes yes or no" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "--enable-omni takes yes or no" "$LINENO" 5 ;; esac if $use_omni then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if $use_omni then -cat >>confdefs.h <<\_ACEOF -#define WANT_OMNI -_ACEOF +$as_echo "#define WANT_OMNI /**/" >>confdefs.h + + +$as_echo "#define WANT_MIGRATION /**/" >>confdefs.h fi # see if we should be including the XTI tests -{ echo "$as_me:$LINENO: checking whether to include XTI tests" >&5 -echo $ECHO_N "checking whether to include XTI tests... $ECHO_C" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include XTI tests" >&5 +$as_echo_n "checking whether to include XTI tests... " >&6; } # Check whether --enable-xti was given. -if test "${enable_xti+set}" = set; then +if test "${enable_xti+set}" = set; then : enableval=$enable_xti; fi @@ -8155,37 +6359,33 @@ use_xti=false ;; *) - { { echo "$as_me:$LINENO: error: --enable-xti takes yes or no" >&5 -echo "$as_me: error: --enable-xti takes yes or no" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "--enable-xti takes yes or no" "$LINENO" 5 ;; esac if $use_xti then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if $use_xti then -cat >>confdefs.h <<\_ACEOF -#define WANT_XTI -_ACEOF +$as_echo "#define WANT_XTI /**/" >>confdefs.h fi # see if we should be including the SDP tests -{ echo "$as_me:$LINENO: checking whether to include SDP tests" >&5 -echo $ECHO_N "checking whether to include SDP tests... $ECHO_C" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include SDP tests" >&5 +$as_echo_n "checking whether to include SDP tests... " >&6; } # Check whether --enable-sdp was given. -if test "${enable_sdp+set}" = set; then +if test "${enable_sdp+set}" = set; then : enableval=$enable_sdp; fi @@ -8193,19 +6393,14 @@ case "$enable_sdp" in yes) # probably need to be a bit more sophisticated here - -{ echo "$as_me:$LINENO: checking for t_open in -lsdp" >&5 -echo $ECHO_N "checking for t_open in -lsdp... $ECHO_C" >&6; } -if test "${ac_cv_lib_sdp_t_open+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_open in -lsdp" >&5 +$as_echo_n "checking for t_open in -lsdp... " >&6; } +if test "${ac_cv_lib_sdp_t_open+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsdp $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -8223,39 +6418,18 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_sdp_t_open=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_sdp_t_open=no + ac_cv_lib_sdp_t_open=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_sdp_t_open" >&5 -echo "${ECHO_T}$ac_cv_lib_sdp_t_open" >&6; } -if test $ac_cv_lib_sdp_t_open = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sdp_t_open" >&5 +$as_echo "$ac_cv_lib_sdp_t_open" >&6; } +if test "x$ac_cv_lib_sdp_t_open" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBSDP 1 _ACEOF @@ -8273,37 +6447,33 @@ use_sdp=false ;; *) - { { echo "$as_me:$LINENO: error: --enable-sdp takes yes or no" >&5 -echo "$as_me: error: --enable-sdp takes yes or no" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "--enable-sdp takes yes or no" "$LINENO" 5 ;; esac if $use_sdp then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if $use_sdp then -cat >>confdefs.h <<\_ACEOF -#define WANT_SDP -_ACEOF +$as_echo "#define WANT_SDP /**/" >>confdefs.h fi # see if we should be including the ICSC-EXS tests -{ echo "$as_me:$LINENO: checking whether to include ICSC-EXS tests" >&5 -echo $ECHO_N "checking whether to include ICSC-EXS tests... $ECHO_C" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include ICSC-EXS tests" >&5 +$as_echo_n "checking whether to include ICSC-EXS tests... " >&6; } # Check whether --enable-exs was given. -if test "${enable_exs+set}" = set; then +if test "${enable_exs+set}" = set; then : enableval=$enable_exs; fi @@ -8311,151 +6481,22 @@ case "$enable_exs" in yes) use_exs=true - if test "${ac_cv_header_sys_exs_h+set}" = set; then - { echo "$as_me:$LINENO: checking for sys/exs.h" >&5 -echo $ECHO_N "checking for sys/exs.h... $ECHO_C" >&6; } -if test "${ac_cv_header_sys_exs_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_exs_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_exs_h" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking sys/exs.h usability" >&5 -echo $ECHO_N "checking sys/exs.h usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking sys/exs.h presence" >&5 -echo $ECHO_N "checking sys/exs.h presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: sys/exs.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: sys/exs.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/exs.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: sys/exs.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: sys/exs.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: sys/exs.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/exs.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: sys/exs.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/exs.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: sys/exs.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/exs.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: sys/exs.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/exs.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: sys/exs.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: sys/exs.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: sys/exs.h: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ echo "$as_me:$LINENO: checking for sys/exs.h" >&5 -echo $ECHO_N "checking for sys/exs.h... $ECHO_C" >&6; } -if test "${ac_cv_header_sys_exs_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_sys_exs_h=$ac_header_preproc -fi -{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_exs_h" >&5 -echo "${ECHO_T}$ac_cv_header_sys_exs_h" >&6; } + ac_fn_c_check_header_mongrel "$LINENO" "sys/exs.h" "ac_cv_header_sys_exs_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_exs_h" = x""yes; then : -fi -if test $ac_cv_header_sys_exs_h = yes; then - : else use_exs=false fi - -{ echo "$as_me:$LINENO: checking for exs_init in -lexs" >&5 -echo $ECHO_N "checking for exs_init in -lexs... $ECHO_C" >&6; } -if test "${ac_cv_lib_exs_exs_init+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for exs_init in -lexs" >&5 +$as_echo_n "checking for exs_init in -lexs... " >&6; } +if test "${ac_cv_lib_exs_exs_init+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lexs $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. @@ -8473,39 +6514,18 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_exs_exs_init=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_exs_exs_init=no + ac_cv_lib_exs_exs_init=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_exs_exs_init" >&5 -echo "${ECHO_T}$ac_cv_lib_exs_exs_init" >&6; } -if test $ac_cv_lib_exs_exs_init = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_exs_exs_init" >&5 +$as_echo "$ac_cv_lib_exs_exs_init" >&6; } +if test "x$ac_cv_lib_exs_exs_init" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBEXS 1 _ACEOF @@ -8524,27 +6544,23 @@ use_exs=false ;; *) - { { echo "$as_me:$LINENO: error: --enable-exs takes yes or no" >&5 -echo "$as_me: error: --enable-exs takes yes or no" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "--enable-exs takes yes or no" "$LINENO" 5 ;; esac if $use_exs then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if $use_exs then -cat >>confdefs.h <<\_ACEOF -#define HAVE_ICSC_EXS -_ACEOF +$as_echo "#define HAVE_ICSC_EXS /**/" >>confdefs.h fi @@ -8552,7 +6568,7 @@ # Check whether --enable-sctp was given. -if test "${enable_sctp+set}" = set; then +if test "${enable_sctp+set}" = set; then : enableval=$enable_sctp; fi @@ -8560,60 +6576,15 @@ case "$enable_sctp" in yes) use_sctp=true - -for ac_header in netinet/sctp.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - + for ac_header in netinet/sctp.h +do : + ac_fn_c_check_header_compile "$LINENO" "netinet/sctp.h" "ac_cv_header_netinet_sctp_h" " #include - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - eval "$as_ac_Header=yes" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - eval "$as_ac_Header=no" -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -if test `eval echo '${'$as_ac_Header'}'` = yes; then +" +if test "x$ac_cv_header_netinet_sctp_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_NETINET_SCTP_H 1 _ACEOF else @@ -8623,181 +6594,63 @@ done case "$host" in - *-*-freebsd7.*) - # FreeBSD 7.x SCTP support doesn't need -lsctp. + *-*-freebsd78.*) + # FreeBSD 7.x and later SCTP support doesn't need -lsctp. ;; *) - -{ echo "$as_me:$LINENO: checking for main in -lsctp" >&5 -echo $ECHO_N "checking for main in -lsctp... $ECHO_C" >&6; } -if test "${ac_cv_lib_sctp_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsctp $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - - -int -main () -{ -return main (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_lib_sctp_main=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_sctp_main=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_sctp_main" >&5 -echo "${ECHO_T}$ac_cv_lib_sctp_main" >&6; } -if test $ac_cv_lib_sctp_main = yes; then - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBSCTP 1 -_ACEOF - - LIBS="-lsctp $LIBS" - -else - use_sctp=false -fi -ac_cv_lib_sctp=ac_cv_lib_sctp_main - - ;; - esac - { echo "$as_me:$LINENO: checking for struct sctp_event_subscribe.sctp_adaptation_layer_event" >&5 -echo $ECHO_N "checking for struct sctp_event_subscribe.sctp_adaptation_layer_event... $ECHO_C" >&6; } -if test "${ac_cv_member_struct_sctp_event_subscribe_sctp_adaptation_layer_event+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -int -main () -{ -static struct sctp_event_subscribe ac_aggr; -if (ac_aggr.sctp_adaptation_layer_event) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_member_struct_sctp_event_subscribe_sctp_adaptation_layer_event=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lsctp" >&5 +$as_echo_n "checking for main in -lsctp... " >&6; } +if test "${ac_cv_lib_sctp_main+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsctp $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + int main () { -static struct sctp_event_subscribe ac_aggr; -if (sizeof ac_aggr.sctp_adaptation_layer_event) -return 0; +return main (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_member_struct_sctp_event_subscribe_sctp_adaptation_layer_event=yes +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_sctp_main=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_member_struct_sctp_event_subscribe_sctp_adaptation_layer_event=no + ac_cv_lib_sctp_main=no fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sctp_main" >&5 +$as_echo "$ac_cv_lib_sctp_main" >&6; } +if test "x$ac_cv_lib_sctp_main" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBSCTP 1 +_ACEOF -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + LIBS="-lsctp $LIBS" + +else + use_sctp=false fi +ac_cv_lib_sctp=ac_cv_lib_sctp_main + + ;; + esac + ac_fn_c_check_member "$LINENO" "struct sctp_event_subscribe" "sctp_adaptation_layer_event" "ac_cv_member_struct_sctp_event_subscribe_sctp_adaptation_layer_event" "#include +" +if test "x$ac_cv_member_struct_sctp_event_subscribe_sctp_adaptation_layer_event" = x""yes; then : -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_sctp_event_subscribe_sctp_adaptation_layer_event" >&5 -echo "${ECHO_T}$ac_cv_member_struct_sctp_event_subscribe_sctp_adaptation_layer_event" >&6; } if test "$ac_cv_member_struct_sctp_event_subscribe_sctp_adaptation_layer_event" = "yes"; then -cat >>confdefs.h <<\_ACEOF -#define HAVE_SCTP_ADAPTATION_LAYER_EVENT 1 -_ACEOF +$as_echo "#define HAVE_SCTP_ADAPTATION_LAYER_EVENT 1" >>confdefs.h fi ;; @@ -8809,40 +6662,36 @@ use_sctp=false ;; *) - { { echo "$as_me:$LINENO: error: --enable-sctp takes yes or no" >&5 -echo "$as_me: error: --enable-sctp takes yes or no" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "--enable-sctp takes yes or no" "$LINENO" 5 ;; esac -{ echo "$as_me:$LINENO: checking whether to include SCTP tests" >&5 -echo $ECHO_N "checking whether to include SCTP tests... $ECHO_C" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include SCTP tests" >&5 +$as_echo_n "checking whether to include SCTP tests... " >&6; } if $use_sctp then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if $use_sctp then -cat >>confdefs.h <<\_ACEOF -#define WANT_SCTP -_ACEOF +$as_echo "#define WANT_SCTP /**/" >>confdefs.h fi # see if we should be enabling paced sends -{ echo "$as_me:$LINENO: checking whether to include paced send (intervals) support" >&5 -echo $ECHO_N "checking whether to include paced send (intervals) support... $ECHO_C" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include paced send (intervals) support" >&5 +$as_echo_n "checking whether to include paced send (intervals) support... " >&6; } # Check whether --enable-intervals was given. -if test "${enable_intervals+set}" = set; then +if test "${enable_intervals+set}" = set; then : enableval=$enable_intervals; fi @@ -8858,37 +6707,33 @@ use_intervals=false ;; *) - { { echo "$as_me:$LINENO: error: --enable-intervals takes yes or no" >&5 -echo "$as_me: error: --enable-intervals takes yes or no" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "--enable-intervals takes yes or no" "$LINENO" 5 ;; esac if $use_intervals then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if $use_intervals then -cat >>confdefs.h <<\_ACEOF -#define WANT_INTERVALS -_ACEOF +$as_echo "#define WANT_INTERVALS /**/" >>confdefs.h fi # see if paced sends should wait and spin -{ echo "$as_me:$LINENO: checking whether paced sends should spin" >&5 -echo $ECHO_N "checking whether paced sends should spin... $ECHO_C" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether paced sends should spin" >&5 +$as_echo_n "checking whether paced sends should spin... " >&6; } # Check whether --enable-spin was given. -if test "${enable_spin+set}" = set; then +if test "${enable_spin+set}" = set; then : enableval=$enable_spin; fi @@ -8904,42 +6749,36 @@ use_spin=false ;; *) - { { echo "$as_me:$LINENO: error: --enable-spin takes yes or no" >&5 -echo "$as_me: error: --enable-spin takes yes or no" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "--enable-spin takes yes or no" "$LINENO" 5 ;; esac if $use_spin then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if $use_spin then -cat >>confdefs.h <<\_ACEOF -#define WANT_INTERVALS -_ACEOF +$as_echo "#define WANT_INTERVALS /**/" >>confdefs.h -cat >>confdefs.h <<\_ACEOF -#define WANT_SPIN -_ACEOF +$as_echo "#define WANT_SPIN /**/" >>confdefs.h fi # see if we should be enabling initial request bursts -{ echo "$as_me:$LINENO: checking whether to include initial burst support in _RR tests" >&5 -echo $ECHO_N "checking whether to include initial burst support in _RR tests... $ECHO_C" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include initial burst support in _RR tests" >&5 +$as_echo_n "checking whether to include initial burst support in _RR tests... " >&6; } # Check whether --enable-burst was given. -if test "${enable_burst+set}" = set; then +if test "${enable_burst+set}" = set; then : enableval=$enable_burst; fi @@ -8952,40 +6791,36 @@ use_burst=false ;; '') - use_burst=false + use_burst=true ;; *) - { { echo "$as_me:$LINENO: error: --enable-burst takes yes or no" >&5 -echo "$as_me: error: --enable-burst takes yes or no" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "--enable-burst takes yes or no" "$LINENO" 5 ;; esac if $use_burst then - { echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } else - { echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi if $use_burst then -cat >>confdefs.h <<\_ACEOF -#define WANT_FIRST_BURST -_ACEOF +$as_echo "#define WANT_FIRST_BURST /**/" >>confdefs.h fi # time to see about CPU utilization measurements -{ echo "$as_me:$LINENO: checking which CPU utilization measurement type to use" >&5 -echo $ECHO_N "checking which CPU utilization measurement type to use... $ECHO_C" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which CPU utilization measurement type to use" >&5 +$as_echo_n "checking which CPU utilization measurement type to use... " >&6; } # Check whether --enable-cpuutil was given. -if test "${enable_cpuutil+set}" = set; then +if test "${enable_cpuutil+set}" = set; then : enableval=$enable_cpuutil; fi @@ -8995,39 +6830,28 @@ pstat) use_cpuutil=true -cat >>confdefs.h <<\_ACEOF -#define USE_PSTAT -_ACEOF +$as_echo "#define USE_PSTAT /**/" >>confdefs.h ;; pstatnew) use_cpuutil=true -cat >>confdefs.h <<\_ACEOF -#define USE_PSTAT -_ACEOF +$as_echo "#define USE_PSTAT /**/" >>confdefs.h ;; perfstat) use_cpuutil=true -cat >>confdefs.h <<\_ACEOF -#define USE_PERFSTAT -_ACEOF - +$as_echo "#define USE_PERFSTAT /**/" >>confdefs.h -{ echo "$as_me:$LINENO: checking for main in -lperfstat" >&5 -echo $ECHO_N "checking for main in -lperfstat... $ECHO_C" >&6; } -if test "${ac_cv_lib_perfstat_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lperfstat" >&5 +$as_echo_n "checking for main in -lperfstat... " >&6; } +if test "${ac_cv_lib_perfstat_main+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lperfstat $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -9039,39 +6863,18 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_perfstat_main=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_perfstat_main=no + ac_cv_lib_perfstat_main=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_perfstat_main" >&5 -echo "${ECHO_T}$ac_cv_lib_perfstat_main" >&6; } -if test $ac_cv_lib_perfstat_main = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_perfstat_main" >&5 +$as_echo "$ac_cv_lib_perfstat_main" >&6; } +if test "x$ac_cv_lib_perfstat_main" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBPERFSTAT 1 _ACEOF @@ -9086,39 +6889,28 @@ looper) use_cpuutil=true -cat >>confdefs.h <<\_ACEOF -#define USE_LOOPER -_ACEOF +$as_echo "#define USE_LOOPER /**/" >>confdefs.h ;; procstat) use_cpuutil=true -cat >>confdefs.h <<\_ACEOF -#define USE_PROC_STAT -_ACEOF +$as_echo "#define USE_PROC_STAT /**/" >>confdefs.h ;; kstat) use_cpuutil=true -cat >>confdefs.h <<\_ACEOF -#define USE_KSTAT -_ACEOF - +$as_echo "#define USE_KSTAT /**/" >>confdefs.h -{ echo "$as_me:$LINENO: checking for main in -lkstat" >&5 -echo $ECHO_N "checking for main in -lkstat... $ECHO_C" >&6; } -if test "${ac_cv_lib_kstat_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lkstat" >&5 +$as_echo_n "checking for main in -lkstat... " >&6; } +if test "${ac_cv_lib_kstat_main+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lkstat $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -9130,39 +6922,18 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_kstat_main=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_kstat_main=no + ac_cv_lib_kstat_main=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_kstat_main" >&5 -echo "${ECHO_T}$ac_cv_lib_kstat_main" >&6; } -if test $ac_cv_lib_kstat_main = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_main" >&5 +$as_echo "$ac_cv_lib_kstat_main" >&6; } +if test "x$ac_cv_lib_kstat_main" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBKSTAT 1 _ACEOF @@ -9176,23 +6947,16 @@ kstat10) use_cpuutil=true -cat >>confdefs.h <<\_ACEOF -#define USE_KSTAT -_ACEOF - +$as_echo "#define USE_KSTAT /**/" >>confdefs.h -{ echo "$as_me:$LINENO: checking for main in -lkstat" >&5 -echo $ECHO_N "checking for main in -lkstat... $ECHO_C" >&6; } -if test "${ac_cv_lib_kstat_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lkstat" >&5 +$as_echo_n "checking for main in -lkstat... " >&6; } +if test "${ac_cv_lib_kstat_main+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lkstat $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -9204,39 +6968,18 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_kstat_main=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_kstat_main=no + ac_cv_lib_kstat_main=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_kstat_main" >&5 -echo "${ECHO_T}$ac_cv_lib_kstat_main" >&6; } -if test $ac_cv_lib_kstat_main = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_main" >&5 +$as_echo "$ac_cv_lib_kstat_main" >&6; } +if test "x$ac_cv_lib_kstat_main" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBKSTAT 1 _ACEOF @@ -9250,9 +6993,7 @@ osx) use_cpuutil=true -cat >>confdefs.h <<\_ACEOF -#define USE_OSX -_ACEOF +$as_echo "#define USE_OSX /**/" >>confdefs.h ;; '') @@ -9263,9 +7004,7 @@ *-*-linux*) use_cpuutil=true -cat >>confdefs.h <<\_ACEOF -#define USE_PROC_STAT -_ACEOF +$as_echo "#define USE_PROC_STAT /**/" >>confdefs.h enable_cpuutil="procstat - auto" NETCPU_SOURCE="procstat" @@ -9273,9 +7012,7 @@ *-*-hpux11.23 | *-*-hpux11.31) use_cpuutil=true -cat >>confdefs.h <<\_ACEOF -#define USE_PSTAT -_ACEOF +$as_echo "#define USE_PSTAT /**/" >>confdefs.h enable_cpuutil="pstatnew - auto" NETCPU_SOURCE="pstatnew" @@ -9283,9 +7020,7 @@ *-*-hpux11* | *-*-hpux10*) use_cpuutil=true -cat >>confdefs.h <<\_ACEOF -#define USE_PSTAT -_ACEOF +$as_echo "#define USE_PSTAT /**/" >>confdefs.h enable_cpuutil="pstat - auto" NETCPU_SOURCE="pstat" @@ -9293,23 +7028,16 @@ *-*-aix5.*) use_puutil=true -cat >>confdefs.h <<\_ACEOF -#define USE_PERFSTAT -_ACEOF - +$as_echo "#define USE_PERFSTAT /**/" >>confdefs.h -{ echo "$as_me:$LINENO: checking for main in -lperfstat" >&5 -echo $ECHO_N "checking for main in -lperfstat... $ECHO_C" >&6; } -if test "${ac_cv_lib_perfstat_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lperfstat" >&5 +$as_echo_n "checking for main in -lperfstat... " >&6; } +if test "${ac_cv_lib_perfstat_main+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lperfstat $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -9321,39 +7049,18 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_perfstat_main=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_perfstat_main=no + ac_cv_lib_perfstat_main=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_perfstat_main" >&5 -echo "${ECHO_T}$ac_cv_lib_perfstat_main" >&6; } -if test $ac_cv_lib_perfstat_main = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_perfstat_main" >&5 +$as_echo "$ac_cv_lib_perfstat_main" >&6; } +if test "x$ac_cv_lib_perfstat_main" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBPERFSTAT 1 _ACEOF @@ -9369,23 +7076,16 @@ *-*-solaris2.1*) use_cpuutil=true -cat >>confdefs.h <<\_ACEOF -#define USE_KSTAT -_ACEOF - +$as_echo "#define USE_KSTAT /**/" >>confdefs.h -{ echo "$as_me:$LINENO: checking for main in -lkstat" >&5 -echo $ECHO_N "checking for main in -lkstat... $ECHO_C" >&6; } -if test "${ac_cv_lib_kstat_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lkstat" >&5 +$as_echo_n "checking for main in -lkstat... " >&6; } +if test "${ac_cv_lib_kstat_main+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lkstat $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -9397,39 +7097,18 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_kstat_main=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_kstat_main=no + ac_cv_lib_kstat_main=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_kstat_main" >&5 -echo "${ECHO_T}$ac_cv_lib_kstat_main" >&6; } -if test $ac_cv_lib_kstat_main = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_main" >&5 +$as_echo "$ac_cv_lib_kstat_main" >&6; } +if test "x$ac_cv_lib_kstat_main" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBKSTAT 1 _ACEOF @@ -9445,23 +7124,16 @@ *-*-solaris2.*) use_cpuutil=true -cat >>confdefs.h <<\_ACEOF -#define USE_KSTAT -_ACEOF - +$as_echo "#define USE_KSTAT /**/" >>confdefs.h -{ echo "$as_me:$LINENO: checking for main in -lkstat" >&5 -echo $ECHO_N "checking for main in -lkstat... $ECHO_C" >&6; } -if test "${ac_cv_lib_kstat_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lkstat" >&5 +$as_echo_n "checking for main in -lkstat... " >&6; } +if test "${ac_cv_lib_kstat_main+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lkstat $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -9473,39 +7145,18 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_kstat_main=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_kstat_main=no + ac_cv_lib_kstat_main=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_kstat_main" >&5 -echo "${ECHO_T}$ac_cv_lib_kstat_main" >&6; } -if test $ac_cv_lib_kstat_main = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_kstat_main" >&5 +$as_echo "$ac_cv_lib_kstat_main" >&6; } +if test "x$ac_cv_lib_kstat_main" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBKSTAT 1 _ACEOF @@ -9521,9 +7172,7 @@ *-*-freebsd[4-7].* | *-*-netbsd[1-9].* ) use_cpuutil=true -cat >>confdefs.h <<\_ACEOF -#define USE_SYSCTL -_ACEOF +$as_echo "#define USE_SYSCTL /**/" >>confdefs.h enable_cpuutil="sysctl - auto" NETCPU_SOURCE="sysctl" @@ -9531,9 +7180,7 @@ *-*-darwin*) use_cpuutil=true -cat >>confdefs.h <<\_ACEOF -#define USE_OSX -_ACEOF +$as_echo "#define USE_OSX /**/" >>confdefs.h enable_cpuutil="osx - auto" NETCPU_SOURCE="osx" @@ -9549,24 +7196,22 @@ use_cpuutil=false ;; *) - { { echo "$as_me:$LINENO: error: --enable-cpuutil takes kstat, kstat10, looper, osx, perfstat, procstat, pstat, pstatnew, sysctl or none" >&5 -echo "$as_me: error: --enable-cpuutil takes kstat, kstat10, looper, osx, perfstat, procstat, pstat, pstatnew, sysctl or none" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "--enable-cpuutil takes kstat, kstat10, looper, osx, perfstat, procstat, pstat, pstatnew, sysctl or none" "$LINENO" 5 ;; esac - { echo "$as_me:$LINENO: result: \"$enable_cpuutil\"" >&5 -echo "${ECHO_T}\"$enable_cpuutil\"" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$enable_cpuutil\"" >&5 +$as_echo "\"$enable_cpuutil\"" >&6; } # time to see about route lookup mechanisms -{ echo "$as_me:$LINENO: checking which route lookup type to use" >&5 -echo $ECHO_N "checking which route lookup type to use... $ECHO_C" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which route lookup type to use" >&5 +$as_echo_n "checking which route lookup type to use... " >&6; } # Check whether --enable-rtlookup was given. -if test "${enable_rtlookup+set}" = set; then +if test "${enable_rtlookup+set}" = set; then : enableval=$enable_rtlookup; fi @@ -9609,24 +7254,22 @@ use_rtlookup=false ;; *) - { { echo "$as_me:$LINENO: error: --enable-rtlookup takes rtmget, rtnetlink or none" >&5 -echo "$as_me: error: --enable-rtlookup takes rtmget, rtnetlink or none" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "--enable-rtlookup takes rtmget, rtnetlink or none" "$LINENO" 5 ;; esac - { echo "$as_me:$LINENO: result: \"$enable_rtlookup\"" >&5 -echo "${ECHO_T}\"$enable_rtlookup\"" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$enable_rtlookup\"" >&5 +$as_echo "\"$enable_rtlookup\"" >&6; } # time to see about slot lookup mechanisms -{ echo "$as_me:$LINENO: checking which slot lookup type to use" >&5 -echo $ECHO_N "checking which slot lookup type to use... $ECHO_C" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which slot lookup type to use" >&5 +$as_echo_n "checking which slot lookup type to use... " >&6; } # Check whether --enable-slotlookup was given. -if test "${enable_slotlookup+set}" = set; then +if test "${enable_slotlookup+set}" = set; then : enableval=$enable_slotlookup; fi @@ -9640,6 +7283,9 @@ solaris) use_slotlookup=true ;; + hpux) + use_slotlookup=true + ;; '') # guess it automagically in a nice big case statement case $target in @@ -9652,19 +7298,14 @@ use_slotlookup=true enable_slotlookup="solaris - auto" NETSLOTLKUP_SOURCE="solaris" - -{ echo "$as_me:$LINENO: checking for main in -ldevinfo" >&5 -echo $ECHO_N "checking for main in -ldevinfo... $ECHO_C" >&6; } -if test "${ac_cv_lib_devinfo_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ldevinfo" >&5 +$as_echo_n "checking for main in -ldevinfo... " >&6; } +if test "${ac_cv_lib_devinfo_main+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldevinfo $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -9676,39 +7317,18 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_devinfo_main=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_devinfo_main=no + ac_cv_lib_devinfo_main=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_devinfo_main" >&5 -echo "${ECHO_T}$ac_cv_lib_devinfo_main" >&6; } -if test $ac_cv_lib_devinfo_main = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_devinfo_main" >&5 +$as_echo "$ac_cv_lib_devinfo_main" >&6; } +if test "x$ac_cv_lib_devinfo_main" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDEVINFO 1 _ACEOF @@ -9719,6 +7339,91 @@ ac_cv_lib_devinfo=ac_cv_lib_devinfo_main ;; + *-*-hpux11.31*) + use_slotlookup=true + enable_slotlookup="hpux 11.31 - auto" + NETSLOTLKUP_SOURCE="ux1131" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lIO" >&5 +$as_echo_n "checking for main in -lIO... " >&6; } +if test "${ac_cv_lib_IO_main+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lIO $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_IO_main=yes +else + ac_cv_lib_IO_main=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_IO_main" >&5 +$as_echo "$ac_cv_lib_IO_main" >&6; } +if test "x$ac_cv_lib_IO_main" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBIO 1 +_ACEOF + + LIBS="-lIO $LIBS" + +fi +ac_cv_lib_IO=ac_cv_lib_IO_main + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lolrad" >&5 +$as_echo_n "checking for main in -lolrad... " >&6; } +if test "${ac_cv_lib_olrad_main+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lolrad $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_olrad_main=yes +else + ac_cv_lib_olrad_main=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_olrad_main" >&5 +$as_echo "$ac_cv_lib_olrad_main" >&6; } +if test "x$ac_cv_lib_olrad_main" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBOLRAD 1 +_ACEOF + + LIBS="-lolrad $LIBS" + +fi +ac_cv_lib_olrad=ac_cv_lib_olrad_main + + ;; *) use_slotlookup=false NETSLOTLKUP_SOURCE="none" @@ -9730,25 +7435,23 @@ use_slotlookup=false ;; *) - { { echo "$as_me:$LINENO: error: --enable-slotlookup takes linux or none" >&5 -echo "$as_me: error: --enable-slotlookup takes linux or none" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "--enable-slotlookup takes linux or none" "$LINENO" 5 ;; esac - { echo "$as_me:$LINENO: result: \"$enable_slotlookup\"" >&5 -echo "${ECHO_T}\"$enable_slotlookup\"" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$enable_slotlookup\"" >&5 +$as_echo "\"$enable_slotlookup\"" >&6; } # time to see about sec lookup mechanisms -{ echo "$as_me:$LINENO: checking which sec lookup type to use" >&5 -echo $ECHO_N "checking which sec lookup type to use... $ECHO_C" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which sec lookup type to use" >&5 +$as_echo_n "checking which sec lookup type to use... " >&6; } # Check whether --enable-seclookup was given. -if test "${enable_seclookup+set}" = set; then +if test "${enable_seclookup+set}" = set; then : enableval=$enable_seclookup; fi @@ -9763,19 +7466,14 @@ # guess it automagically in a nice big case statement case $target in *-*-linux*) - -{ echo "$as_me:$LINENO: checking for main in -ldl" >&5 -echo $ECHO_N "checking for main in -ldl... $ECHO_C" >&6; } -if test "${ac_cv_lib_dl_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ldl" >&5 +$as_echo_n "checking for main in -ldl... " >&6; } +if test "${ac_cv_lib_dl_main+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -9787,39 +7485,18 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_main=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_dl_main=no + ac_cv_lib_dl_main=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_main" >&5 -echo "${ECHO_T}$ac_cv_lib_dl_main" >&6; } -if test $ac_cv_lib_dl_main = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_main" >&5 +$as_echo "$ac_cv_lib_dl_main" >&6; } +if test "x$ac_cv_lib_dl_main" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBDL 1 _ACEOF @@ -9844,25 +7521,23 @@ use_seclookup=false ;; *) - { { echo "$as_me:$LINENO: error: --enable-seclookup takes linux or none" >&5 -echo "$as_me: error: --enable-seclookup takes linux or none" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "--enable-seclookup takes linux or none" "$LINENO" 5 ;; esac - { echo "$as_me:$LINENO: result: \"$enable_seclookup\"" >&5 -echo "${ECHO_T}\"$enable_seclookup\"" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$enable_seclookup\"" >&5 +$as_echo "\"$enable_seclookup\"" >&6; } # time to see about driver lookup mechanisms -{ echo "$as_me:$LINENO: checking which driver info lookup type to use" >&5 -echo $ECHO_N "checking which driver info lookup type to use... $ECHO_C" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which driver info lookup type to use" >&5 +$as_echo_n "checking which driver info lookup type to use... " >&6; } # Check whether --enable-drvlookup was given. -if test "${enable_drvlookup+set}" = set; then +if test "${enable_drvlookup+set}" = set; then : enableval=$enable_drvlookup; fi @@ -9900,24 +7575,22 @@ use_drvlookup=false ;; *) - { { echo "$as_me:$LINENO: error: --enable-drvlookup takes ethtool or none" >&5 -echo "$as_me: error: --enable-drvlookup takes ethtool or none" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "--enable-drvlookup takes ethtool or none" "$LINENO" 5 ;; esac - { echo "$as_me:$LINENO: result: \"$enable_drvlookup\"" >&5 -echo "${ECHO_T}\"$enable_drvlookup\"" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$enable_drvlookup\"" >&5 +$as_echo "\"$enable_drvlookup\"" >&6; } # time to see about system lookup mechanisms -{ echo "$as_me:$LINENO: checking which system info lookup type to use" >&5 -echo $ECHO_N "checking which system info lookup type to use... $ECHO_C" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which system info lookup type to use" >&5 +$as_echo_n "checking which system info lookup type to use... " >&6; } # Check whether --enable-syslookup was given. -if test "${enable_syslookup+set}" = set; then +if test "${enable_syslookup+set}" = set; then : enableval=$enable_syslookup; fi @@ -9928,161 +7601,28 @@ use_syslookup=true ;; - linux) - use_syslookup=true; - -for ac_header in smbios/SystemInfo.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then + linux) + use_syslookup=true; + for ac_header in smbios/SystemInfo.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "smbios/SystemInfo.h" "ac_cv_header_smbios_SystemInfo_h" "$ac_includes_default" +if test "x$ac_cv_header_smbios_SystemInfo_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_SMBIOS_SYSTEMINFO_H 1 _ACEOF fi done - -{ echo "$as_me:$LINENO: checking for main in -lsmbios" >&5 -echo $ECHO_N "checking for main in -lsmbios... $ECHO_C" >&6; } -if test "${ac_cv_lib_smbios_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lsmbios" >&5 +$as_echo_n "checking for main in -lsmbios... " >&6; } +if test "${ac_cv_lib_smbios_main+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsmbios $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -10094,39 +7634,18 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_smbios_main=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_smbios_main=no + ac_cv_lib_smbios_main=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_smbios_main" >&5 -echo "${ECHO_T}$ac_cv_lib_smbios_main" >&6; } -if test $ac_cv_lib_smbios_main = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_smbios_main" >&5 +$as_echo "$ac_cv_lib_smbios_main" >&6; } +if test "x$ac_cv_lib_smbios_main" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBSMBIOS 1 _ACEOF @@ -10140,159 +7659,26 @@ solaris) use_syslookup=true; # this will basically tell us if we can use libsmbios - -for ac_header in sys/sbmios.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then + for ac_header in sys/sbmios.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "sys/sbmios.h" "ac_cv_header_sys_sbmios_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_sbmios_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_SYS_SBMIOS_H 1 _ACEOF fi done - -{ echo "$as_me:$LINENO: checking for main in -lsmbios" >&5 -echo $ECHO_N "checking for main in -lsmbios... $ECHO_C" >&6; } -if test "${ac_cv_lib_smbios_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lsmbios" >&5 +$as_echo_n "checking for main in -lsmbios... " >&6; } +if test "${ac_cv_lib_smbios_main+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsmbios $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -10304,39 +7690,18 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_smbios_main=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_smbios_main=no + ac_cv_lib_smbios_main=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_smbios_main" >&5 -echo "${ECHO_T}$ac_cv_lib_smbios_main" >&6; } -if test $ac_cv_lib_smbios_main = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_smbios_main" >&5 +$as_echo "$ac_cv_lib_smbios_main" >&6; } +if test "x$ac_cv_lib_smbios_main" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBSMBIOS 1 _ACEOF @@ -10358,159 +7723,26 @@ *-*-linux*) use_syslookup=true enable_syslookup="linux - auto" - -for ac_header in smbios/SystemInfo.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then + for ac_header in smbios/SystemInfo.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "smbios/SystemInfo.h" "ac_cv_header_smbios_SystemInfo_h" "$ac_includes_default" +if test "x$ac_cv_header_smbios_SystemInfo_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_SMBIOS_SYSTEMINFO_H 1 _ACEOF fi done - -{ echo "$as_me:$LINENO: checking for main in -lsmbios" >&5 -echo $ECHO_N "checking for main in -lsmbios... $ECHO_C" >&6; } -if test "${ac_cv_lib_smbios_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lsmbios" >&5 +$as_echo_n "checking for main in -lsmbios... " >&6; } +if test "${ac_cv_lib_smbios_main+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsmbios $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -10522,39 +7754,18 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_smbios_main=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_smbios_main=no + ac_cv_lib_smbios_main=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_smbios_main" >&5 -echo "${ECHO_T}$ac_cv_lib_smbios_main" >&6; } -if test $ac_cv_lib_smbios_main = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_smbios_main" >&5 +$as_echo "$ac_cv_lib_smbios_main" >&6; } +if test "x$ac_cv_lib_smbios_main" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBSMBIOS 1 _ACEOF @@ -10570,159 +7781,26 @@ use_syslookup=true enable_syslookup="solaris - auto" NETSYSLKUP_SOURCE="solaris" - -for ac_header in sys/smbios.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } -else - # Is the header compilable? -{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 -echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_includes_default -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_header_compiler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_compiler=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6; } - -# Is the header present? -{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 -echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <$ac_header> -_ACEOF -if { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then - ac_header_preproc=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_header_preproc=no -fi - -rm -f conftest.err conftest.$ac_ext -{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 -echo "${ECHO_T}$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in - yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - - ;; -esac -{ echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&6; } - -fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then + for ac_header in sys/smbios.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "sys/smbios.h" "ac_cv_header_sys_smbios_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_smbios_h" = x""yes; then : cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define HAVE_SYS_SMBIOS_H 1 _ACEOF fi done - -{ echo "$as_me:$LINENO: checking for main in -lsmbios" >&5 -echo $ECHO_N "checking for main in -lsmbios... $ECHO_C" >&6; } -if test "${ac_cv_lib_smbios_main+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lsmbios" >&5 +$as_echo_n "checking for main in -lsmbios... " >&6; } +if test "${ac_cv_lib_smbios_main+set}" = set; then : + $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsmbios $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF +cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -10734,39 +7812,18 @@ return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then +if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_smbios_main=yes else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_smbios_main=no + ac_cv_lib_smbios_main=no fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ echo "$as_me:$LINENO: result: $ac_cv_lib_smbios_main" >&5 -echo "${ECHO_T}$ac_cv_lib_smbios_main" >&6; } -if test $ac_cv_lib_smbios_main = yes; then +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_smbios_main" >&5 +$as_echo "$ac_cv_lib_smbios_main" >&6; } +if test "x$ac_cv_lib_smbios_main" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBSMBIOS 1 _ACEOF @@ -10788,14 +7845,12 @@ use_syslookup=false ;; *) - { { echo "$as_me:$LINENO: error: --enable-syslookup takes hpux11i, linux or none" >&5 -echo "$as_me: error: --enable-syslookup takes hpux11i, linux or none" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "--enable-syslookup takes hpux11i, linux or none" "$LINENO" 5 ;; esac - { echo "$as_me:$LINENO: result: \"$enable_syslookup\"" >&5 -echo "${ECHO_T}\"$enable_syslookup\"" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$enable_syslookup\"" >&5 +$as_echo "\"$enable_syslookup\"" >&6; } @@ -10830,12 +7885,13 @@ case $ac_val in #( *${as_nl}*) case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( - *) $as_unset $ac_var ;; + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done @@ -10843,8 +7899,8 @@ (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes (double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \). + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" @@ -10867,12 +7923,12 @@ if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && - { echo "$as_me:$LINENO: updating cache $cache_file" >&5 -echo "$as_me: updating cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else - { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 -echo "$as_me: not updating unwritable cache $cache_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -10885,48 +7941,50 @@ ac_libobjs= ac_ltlibobjs= +U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`echo "$ac_i" | sed "$ac_script"` + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. - ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs + if test -n "$EXEEXT"; then + am__EXEEXT_TRUE= + am__EXEEXT_FALSE='#' +else + am__EXEEXT_TRUE='#' + am__EXEEXT_FALSE= +fi + if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${NEED_LIBCOMPAT_TRUE}" && test -z "${NEED_LIBCOMPAT_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"NEED_LIBCOMPAT\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"NEED_LIBCOMPAT\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "conditional \"NEED_LIBCOMPAT\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : ${CONFIG_STATUS=./config.status} +ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 -echo "$as_me: creating $CONFIG_STATUS" >&6;} -cat >$CONFIG_STATUS <<_ACEOF +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. @@ -10936,59 +7994,79 @@ debug=false ac_cs_recheck=false ac_cs_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; esac - fi - - -# PATH needs CR -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - echo "#! /bin/sh" >conf$$.sh - echo "exit 0" >>conf$$.sh - chmod +x conf$$.sh - if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then - PATH_SEPARATOR=';' +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' else - PATH_SEPARATOR=: + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' fi - rm -f conf$$.sh + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' fi -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } fi @@ -10997,20 +8075,18 @@ # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) -as_nl=' -' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. -case $0 in +case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break -done + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done IFS=$as_save_IFS ;; @@ -11021,32 +8097,111 @@ as_myself=$0 fi if test ! -f "$as_myself"; then - echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 fi -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - fi -done +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + -# Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr @@ -11060,13 +8215,17 @@ as_basename=false fi +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi -# Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || -echo X/"$0" | +$as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q @@ -11081,104 +8240,103 @@ } s/.*/./; q'` -# CDPATH. -$as_unset CDPATH - - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # Create $as_me.lineno as a copy of $as_myself, but with $LINENO - # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, and appends - # trailing '-' during substitution so that $LINENO is not a special - # case at line end. - # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - chmod +x "$as_me.lineno" || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 - { (exit 1); exit 1; }; } - - # Don't try to exec as it changes $[0], causing all sort of problems - # (the dirname of $[0] is not the place where we might find the - # original and so on. Autoconf is especially sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in +case `echo -n x` in #((((( -n*) - case `echo 'x\c'` in + case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir - mkdir conf$$.dir + mkdir conf$$.dir 2>/dev/null fi -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else as_ln_s='cp -p' -elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln + fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then - as_mkdir_p=: + as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false @@ -11195,12 +8353,12 @@ as_test_x=' eval sh -c '\'' if test -d "$1"; then - test -d "$1/."; + test -d "$1/."; else - case $1 in - -*)set "./$1";; + case $1 in #( + -*)set "./$1";; esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' @@ -11215,13 +8373,19 @@ exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 -# Save the log message, to keep $[0] and so on meaningful, and to +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by netperf $as_me 2.4.5, which was -generated by GNU Autoconf 2.61. Invocation command line was +This file was extended by netperf $as_me 2.5.0, which was +generated by GNU Autoconf 2.67. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -11234,7 +8398,16 @@ _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + +case $ac_config_headers in *" +"*) set x $ac_config_headers; shift; ac_config_headers=$*;; +esac + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" @@ -11242,22 +8415,25 @@ _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ -\`$as_me' instantiates files from templates according to the -current configuration. +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. -Usage: $0 [OPTIONS] [FILE]... +Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit - -q, --quiet do not print progress messages + --config print configuration, then exit + -q, --quiet, --silent + do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE Configuration files: $config_files @@ -11268,36 +8444,44 @@ Configuration commands: $config_commands -Report bugs to ." +Report bugs to the package provider." _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -netperf config.status 2.4.5 -configured by $0, generated by GNU Autoconf 2.61, - with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" +netperf config.status 2.5.0 +configured by $0, generated by GNU Autoconf 2.67, + with options \\"\$ac_cs_config\\" -Copyright (C) 2006 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' +AWK='$AWK' +test -n "\$AWK" || AWK=awk _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -# If no file are specified by the user, then we need to provide default -# value. By we need to know if files were specified by the user. +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in - --*=*) + --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; *) ac_option=$1 ac_optarg=$2 @@ -11310,34 +8494,41 @@ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - echo "$ac_cs_version"; exit ;; + $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift - CONFIG_FILES="$CONFIG_FILES $ac_optarg" + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift - CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header - { echo "$as_me: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; };; + as_fn_error $? "ambiguous option: \`$1' +Try \`$0 --help' for more information.";; --help | --hel | -h ) - echo "$ac_cs_usage"; exit ;; + $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) { echo "$as_me: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&2 - { (exit 1); exit 1; }; } ;; + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; - *) ac_config_targets="$ac_config_targets $1" + *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac @@ -11352,27 +8543,29 @@ fi _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - CONFIG_SHELL=$SHELL + set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' export CONFIG_SHELL - exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + exec "\$@" fi _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX - echo "$ac_log" + $as_echo "$ac_log" } >&5 _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # @@ -11380,7 +8573,7 @@ _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets @@ -11397,9 +8590,7 @@ "doc/examples/Makefile") CONFIG_FILES="$CONFIG_FILES doc/examples/Makefile" ;; "netperf.spec") CONFIG_FILES="$CONFIG_FILES netperf.spec" ;; - *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -echo "$as_me: error: invalid argument: $ac_config_target" >&2;} - { (exit 1); exit 1; }; };; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;; esac done @@ -11426,7 +8617,7 @@ trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 - trap '{ (exit 1); exit 1; }' 1 2 13 15 + trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. @@ -11437,191 +8628,285 @@ { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") -} || -{ - echo "$me: cannot create a temporary directory in ." >&2 - { (exit 1); exit 1; } -} +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 -# -# Set up the sed scripts for CONFIG_FILES section. -# - -# No need to generate the scripts if there are no CONFIG_FILES. -# This happens for instance when ./config.status config.h +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then -_ACEOF +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$tmp/subs1.awk" && +_ACEOF +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -SHELL!$SHELL$ac_delim -PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim -PACKAGE_NAME!$PACKAGE_NAME$ac_delim -PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim -PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim -PACKAGE_STRING!$PACKAGE_STRING$ac_delim -PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim -exec_prefix!$exec_prefix$ac_delim -prefix!$prefix$ac_delim -program_transform_name!$program_transform_name$ac_delim -bindir!$bindir$ac_delim -sbindir!$sbindir$ac_delim -libexecdir!$libexecdir$ac_delim -datarootdir!$datarootdir$ac_delim -datadir!$datadir$ac_delim -sysconfdir!$sysconfdir$ac_delim -sharedstatedir!$sharedstatedir$ac_delim -localstatedir!$localstatedir$ac_delim -includedir!$includedir$ac_delim -oldincludedir!$oldincludedir$ac_delim -docdir!$docdir$ac_delim -infodir!$infodir$ac_delim -htmldir!$htmldir$ac_delim -dvidir!$dvidir$ac_delim -pdfdir!$pdfdir$ac_delim -psdir!$psdir$ac_delim -libdir!$libdir$ac_delim -localedir!$localedir$ac_delim -mandir!$mandir$ac_delim -DEFS!$DEFS$ac_delim -ECHO_C!$ECHO_C$ac_delim -ECHO_N!$ECHO_N$ac_delim -ECHO_T!$ECHO_T$ac_delim -LIBS!$LIBS$ac_delim -build_alias!$build_alias$ac_delim -host_alias!$host_alias$ac_delim -target_alias!$target_alias$ac_delim -build!$build$ac_delim -build_cpu!$build_cpu$ac_delim -build_vendor!$build_vendor$ac_delim -build_os!$build_os$ac_delim -host!$host$ac_delim -host_cpu!$host_cpu$ac_delim -host_vendor!$host_vendor$ac_delim -host_os!$host_os$ac_delim -target!$target$ac_delim -target_cpu!$target_cpu$ac_delim -target_vendor!$target_vendor$ac_delim -target_os!$target_os$ac_delim -INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim -INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim -INSTALL_DATA!$INSTALL_DATA$ac_delim -CYGPATH_W!$CYGPATH_W$ac_delim -PACKAGE!$PACKAGE$ac_delim -VERSION!$VERSION$ac_delim -ACLOCAL!$ACLOCAL$ac_delim -AUTOCONF!$AUTOCONF$ac_delim -AUTOMAKE!$AUTOMAKE$ac_delim -AUTOHEADER!$AUTOHEADER$ac_delim -MAKEINFO!$MAKEINFO$ac_delim -AMTAR!$AMTAR$ac_delim -install_sh!$install_sh$ac_delim -STRIP!$STRIP$ac_delim -INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim -AWK!$AWK$ac_delim -SET_MAKE!$SET_MAKE$ac_delim -am__leading_dot!$am__leading_dot$ac_delim -CC!$CC$ac_delim -CFLAGS!$CFLAGS$ac_delim -LDFLAGS!$LDFLAGS$ac_delim -CPPFLAGS!$CPPFLAGS$ac_delim -ac_ct_CC!$ac_ct_CC$ac_delim -EXEEXT!$EXEEXT$ac_delim -OBJEXT!$OBJEXT$ac_delim -DEPDIR!$DEPDIR$ac_delim -am__include!$am__include$ac_delim -am__quote!$am__quote$ac_delim -AMDEP_TRUE!$AMDEP_TRUE$ac_delim -AMDEP_FALSE!$AMDEP_FALSE$ac_delim -AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim -CCDEPMODE!$CCDEPMODE$ac_delim -am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim -am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim -RANLIB!$RANLIB$ac_delim -CPP!$CPP$ac_delim -GREP!$GREP$ac_delim -EGREP!$EGREP$ac_delim -LIBOBJS!$LIBOBJS$ac_delim -NEED_LIBCOMPAT_TRUE!$NEED_LIBCOMPAT_TRUE$ac_delim -NEED_LIBCOMPAT_FALSE!$NEED_LIBCOMPAT_FALSE$ac_delim -NETCPU_SOURCE!$NETCPU_SOURCE$ac_delim -NETRTLKUP_SOURCE!$NETRTLKUP_SOURCE$ac_delim -NETSLOTLKUP_SOURCE!$NETSLOTLKUP_SOURCE$ac_delim -NETSECLKUP_SOURCE!$NETSECLKUP_SOURCE$ac_delim -NETDRVLKUP_SOURCE!$NETDRVLKUP_SOURCE$ac_delim -NETSYSLKUP_SOURCE!$NETSYSLKUP_SOURCE$ac_delim -LTLIBOBJS!$LTLIBOBJS$ac_delim -_ACEOF + . ./conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done +rm -f conf$$subs.sh -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` -fi +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\)..*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\)..*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK _ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF -CEOF$ac_eof +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF - -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// s/^[^=]*=[ ]*$// }' fi -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" +# Set up the scripts for CONFIG_HEADERS section. +# No need to generate them if there are no CONFIG_HEADERS. +# This happens for instance with `./config.status Makefile'. +if test -n "$CONFIG_HEADERS"; then +cat >"$tmp/defines.awk" <<\_ACAWK || +BEGIN { +_ACEOF + +# Transform confdefs.h into an awk script `defines.awk', embedded as +# here-document in config.status, that substitutes the proper values into +# config.h.in to produce config.h. + +# Create a delimiter string that does not exist in confdefs.h, to ease +# handling of long lines. +ac_delim='%!_!# ' +for ac_last_try in false false :; do + ac_t=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_t"; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +# For the awk script, D is an array of macro values keyed by name, +# likewise P contains macro parameters if any. Preserve backslash +# newline sequences. + +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +sed -n ' +s/.\{148\}/&'"$ac_delim"'/g +t rset +:rset +s/^[ ]*#[ ]*define[ ][ ]*/ / +t def +d +:def +s/\\$// +t bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3"/p +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p +d +:bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3\\\\\\n"\\/p +t cont +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p +t cont +d +:cont +n +s/.\{148\}/&'"$ac_delim"'/g +t clear +:clear +s/\\$// +t bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/"/p +d +:bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p +b cont +' >$CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + for (key in D) D_is_set[key] = 1 + FS = "" +} +/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { + line = \$ 0 + split(line, arg, " ") + if (arg[1] == "#") { + defundef = arg[2] + mac1 = arg[3] + } else { + defundef = substr(arg[1], 2) + mac1 = arg[2] + } + split(mac1, mac2, "(") #) + macro = mac2[1] + prefix = substr(line, 1, index(line, defundef) - 1) + if (D_is_set[macro]) { + # Preserve the white space surrounding the "#". + print prefix "define", macro P[macro] D[macro] + next + } else { + # Replace #undef with comments. This is necessary, for example, + # in the case of _POSIX_SOURCE, which is predefined and required + # on some systems where configure will not decide to define it. + if (defundef == "undef") { + print "/*", prefix defundef, macro, "*/" + next + } + } +} +{ print } +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 +fi # test -n "$CONFIG_HEADERS" + -for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" +shift +for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 -echo "$as_me: error: Invalid tag $ac_tag." >&2;} - { (exit 1); exit 1; }; };; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -11649,26 +8934,34 @@ [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -echo "$as_me: error: cannot find input file: $ac_f" >&2;} - { (exit 1); exit 1; }; };; + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;; esac - ac_file_inputs="$ac_file_inputs $ac_f" + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ - configure_input="Generated from "`IFS=: - echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin";; + *:-:* | *:-) cat >"$tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -11678,42 +8971,7 @@ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { as_dir="$ac_dir" - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -echo X"$as_dir" | +$as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -11731,20 +8989,15 @@ q } s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } + as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; @@ -11782,14 +9035,19 @@ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= - -case `sed -n '/datarootdir/ { +ac_sed_dataroot=' +/datarootdir/ { p q } @@ -11797,36 +9055,37 @@ /@docdir@/p /@infodir@/p /@localedir@/p -/@mandir@/p -' $ac_file_inputs` in +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; + s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF - sed "$ac_vpsub +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub $extrasub _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s&@configure_input@&$configure_input&;t t +s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t @@ -11835,136 +9094,67 @@ s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack -" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed 's/|#_!!_#|//g' >$tmp/out +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 -echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$tmp/stdin" case $ac_file in - -) cat "$tmp/out"; rm -f "$tmp/out";; - *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; - esac + -) cat "$tmp/out" && rm -f "$tmp/out";; + *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + esac \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # -_ACEOF - -# Transform confdefs.h into a sed script `conftest.defines', that -# substitutes the proper values into config.h.in to produce config.h. -rm -f conftest.defines conftest.tail -# First, append a space to every undef/define line, to ease matching. -echo 's/$/ /' >conftest.defines -# Then, protect against being on the right side of a sed subst, or in -# an unquoted here document, in config.status. If some macros were -# called several times there might be several #defines for the same -# symbol, which is useless. But do not sort them, since the last -# AC_DEFINE must be honored. -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where -# NAME is the cpp macro being defined, VALUE is the value it is being given. -# PARAMS is the parameter list in the macro definition--in most cases, it's -# just an empty string. -ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' -ac_dB='\\)[ (].*,\\1define\\2' -ac_dC=' ' -ac_dD=' ,' - -uniq confdefs.h | - sed -n ' - t rset - :rset - s/^[ ]*#[ ]*define[ ][ ]*// - t ok - d - :ok - s/[\\&,]/\\&/g - s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p - s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p - ' >>conftest.defines - -# Remove the space that was appended to ease matching. -# Then replace #undef with comments. This is necessary, for -# example, in the case of _POSIX_SOURCE, which is predefined and required -# on some systems where configure will not decide to define it. -# (The regexp can be short, since the line contains either #define or #undef.) -echo 's/ $// -s,^[ #]*u.*,/* & */,' >>conftest.defines - -# Break up conftest.defines: -ac_max_sed_lines=50 - -# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" -# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" -# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" -# et cetera. -ac_in='$ac_file_inputs' -ac_out='"$tmp/out1"' -ac_nxt='"$tmp/out2"' - -while : -do - # Write a here document: - cat >>$CONFIG_STATUS <<_ACEOF - # First, check the format of the line: - cat >"\$tmp/defines.sed" <<\\CEOF -/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def -/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def -b -:def -_ACEOF - sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS - echo 'CEOF - sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS - ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in - sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail - grep . conftest.tail >/dev/null || break - rm -f conftest.defines - mv conftest.tail conftest.defines -done -rm -f conftest.defines conftest.tail - -echo "ac_result=$ac_in" >>$CONFIG_STATUS -cat >>$CONFIG_STATUS <<\_ACEOF if test x"$ac_file" != x-; then - echo "/* $configure_input */" >"$tmp/config.h" - cat "$ac_result" >>"$tmp/config.h" - if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then - { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 -echo "$as_me: $ac_file is unchanged" >&6;} + { + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" + } >"$tmp/config.h" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} else - rm -f $ac_file - mv "$tmp/config.h" $ac_file + rm -f "$ac_file" + mv "$tmp/config.h" "$ac_file" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else - echo "/* $configure_input */" - cat "$ac_result" + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ + || as_fn_error $? "could not create -" "$LINENO" 5 fi - rm -f "$tmp/out12" -# Compute $ac_file's index in $config_headers. +# Compute "$ac_file"'s index in $config_headers. +_am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in - $ac_file | $ac_file:* ) + $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done -echo "timestamp for $ac_file" >`$as_dirname -- $ac_file || -$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X$ac_file : 'X\(//\)[^/]' \| \ - X$ac_file : 'X\(//\)$' \| \ - X$ac_file : 'X\(/\)' \| . 2>/dev/null || -echo X$ac_file | +echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || +$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$_am_arg" : 'X\(//\)[^/]' \| \ + X"$_am_arg" : 'X\(//\)$' \| \ + X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -11984,29 +9174,40 @@ s/.*/./; q'`/stamp-h$_am_stamp_count ;; - :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 -echo "$as_me: executing $ac_file commands" >&6;} + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in - "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do - # Strip MF so we end up with the name of the file. - mf=`echo "$mf" | sed -e 's/:.*$//'` - # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but - # some people rename them; so instead we look at the file content. - # Grep'ing the first line is not enough: some people post-process - # each Makefile.in and add a new line on top of each file to say so. - # So let's grep whole file. - if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then - dirpart=`$as_dirname -- "$mf" || + "depfiles":C) test x"$AMDEP_TRUE" != x"" || { + # Autoconf 2.62 quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || -echo X"$mf" | +$as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -12024,74 +9225,33 @@ q } s/.*/./; q'` - else - continue - fi - grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue - # Extract the definition of DEP_FILES from the Makefile without - # running `make'. - DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` - test -z "$DEPDIR" && continue - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n -e '/^U = / s///p' < "$mf"` - test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" - # We invoke sed twice because it is the simplest approach to - # changing $(DEPDIR) to its actual value in the expansion. - for file in `sed -n -e ' - /^DEP_FILES = .*\\\\$/ { - s/^DEP_FILES = // - :loop - s/\\\\$// - p - n - /\\\\$/ b loop - p - } - /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`$as_dirname -- "$file" || + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || -echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - { as_dir=$dirpart/$fdir - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -echo X"$as_dir" | +$as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q @@ -12109,27 +9269,25 @@ q } s/.*/./; q'` - test -d "$as_dir" && break + as_dir=$dirpart/$fdir; as_fn_mkdir_p + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" done -done +} ;; esac done # for ac_tag -{ (exit 0); exit 0; } +as_fn_exit 0 _ACEOF -chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save +test $ac_write_fail = 0 || + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 + # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. @@ -12149,6 +9307,10 @@ exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || { (exit 1); exit 1; } + $ac_cs_success || as_fn_exit 1 +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi diff -Nru netperf-2.4.5/configure.ac netperf-2.5.0/configure.ac --- netperf-2.4.5/configure.ac 2009-06-12 00:10:22.000000000 +0000 +++ netperf-2.5.0/configure.ac 2011-07-19 17:28:24.000000000 +0000 @@ -2,11 +2,16 @@ # Process this file with autoconf to produce a configure script. FULL-PACKAGE-NAME=netperf -VERSION=2.4.5 +VERSION=2.5.0 BUG-REPORT-ADDRESS=netperf-feedback@netperf.org AC_PREREQ(2.59) -AC_INIT(netperf, 2.4.5) +AC_INIT(netperf, 2.5.0) + +# Inherit compiler flags from the environment... +CFLAGS="${CFLAGS:=}" +CXXFLAGS="${CXXFLAGS:=}" + # use the target version rather than host - one day we may want cross-compile AC_CANONICAL_TARGET AC_CONFIG_SRCDIR([src/hist.h]) @@ -17,7 +22,7 @@ AC_CONFIG_LIBOBJ_DIR(src/missing) # make sure we build netperf_version.h -touch src/netperf_version.h.in +touch ${ac_top_srcdir}src/netperf_version.h.in # Checks for programs. AC_PROG_CC @@ -31,7 +36,9 @@ # Checks for header files. AC_HEADER_STDC AC_HEADER_SYS_WAIT -AC_CHECK_HEADERS([arpa/inet.h endian.h errno.h fcntl.h limits.h malloc.h netdb.h netinet/in.h signal.h stdlib.h string.h strings.h sys/ioctl.h sys/mman.h sys/param.h sys/socket.h sys/time.h unistd.h ifaddrs.h sys/sockio.h]) + +# lets keep this in some semblence of alphabetical order +AC_CHECK_HEADERS([arpa/inet.h endian.h errno.h fcntl.h ifaddrs.h limits.h linux/tcp.h malloc.h netdb.h netinet/in.h netinet/sctp.h signal.h stdlib.h string.h strings.h syscall.h sys/ioctl.h sys/mman.h sys/param.h sys/socket.h sys/stat.h sys/time.h sys/wait.h sys/ipc.h sys/sockio.h sys/sysinfo.h sys/wait.h stdlib.h unistd.h]) # Some platforms require these. There may be a better way. AC_HAVE_LIBRARY(socket) @@ -70,7 +77,7 @@ # AC_FUNC_STAT # remove pstat_getdynamic (at least for now) since we don't do # anything conditional with the check anyway... -AC_CHECK_FUNCS([alarm bzero gethostbyname gethrtime gettimeofday inet_ntoa memset memcpy munmap select socket sqrt strcasecmp strchr strstr strtoul uname]) +AC_CHECK_FUNCS([alarm bzero daemon gethostbyname gethrtime gettimeofday inet_ntoa memset memcpy munmap select setsid socket sqrt strcasecmp strchr strstr strtoul uname toupper]) #AC_CONFIG_SUBDIRS(src/missing) @@ -319,7 +326,7 @@ use_omni=false ;; '') - use_omni=false + use_omni=true ;; *) AC_MSG_ERROR([--enable-omni takes yes or no]) @@ -336,6 +343,7 @@ if $use_omni then AC_DEFINE([WANT_OMNI],,[Define to one to include OMNI tests.]) + AC_DEFINE([WANT_MIGRATION],,[Define to one to migrate classic to OMNI tests.]) fi @@ -459,8 +467,8 @@ #include ]]) case "$host" in - *-*-freebsd7.*) - # FreeBSD 7.x SCTP support doesn't need -lsctp. + *-*-freebsd[78].*) + # FreeBSD 7.x and later SCTP support doesn't need -lsctp. ;; *) AC_HAVE_LIBRARY(sctp,,use_sctp=false) @@ -583,7 +591,7 @@ use_burst=false ;; '') - use_burst=false + use_burst=true ;; *) AC_MSG_ERROR([--enable-burst takes yes or no]) @@ -791,6 +799,9 @@ solaris) use_slotlookup=true ;; + hpux) + use_slotlookup=true + ;; '') # guess it automagically in a nice big case statement case $target in @@ -805,6 +816,13 @@ NETSLOTLKUP_SOURCE="solaris" AC_HAVE_LIBRARY(devinfo) ;; + *-*-hpux11.31*) + use_slotlookup=true + enable_slotlookup="hpux 11.31 - auto" + NETSLOTLKUP_SOURCE="ux1131" + AC_HAVE_LIBRARY(IO) + AC_HAVE_LIBRARY(olrad) + ;; *) use_slotlookup=false NETSLOTLKUP_SOURCE="none" diff -Nru netperf-2.4.5/debian/changelog netperf-2.5.0/debian/changelog --- netperf-2.4.5/debian/changelog 2011-07-26 18:30:11.000000000 +0000 +++ netperf-2.5.0/debian/changelog 2011-08-16 20:03:45.000000000 +0000 @@ -1,3 +1,10 @@ +netperf (2.5.0-1) unstable; urgency=low + + * [4174b40a] Imported Upstream version 2.5.0 + * [3d7a224f] [patches] recreated patches using quilt + + -- Erik Wenzel Tue, 16 Aug 2011 21:58:36 +0200 + netperf (2.4.5-1) unstable; urgency=low * [b904c9b8] [init.d] removed S from default start (Closes: 493188) - diff -Nru netperf-2.4.5/debian/patches/00list netperf-2.5.0/debian/patches/00list --- netperf-2.4.5/debian/patches/00list 2011-07-26 18:30:11.000000000 +0000 +++ netperf-2.5.0/debian/patches/00list 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -10_man_fix_unknown_macro -20_fix_debug_file_location -30_svn_trunk_20071205 diff -Nru netperf-2.4.5/debian/patches/100_man_fix_unknown_macro.dpatch netperf-2.5.0/debian/patches/100_man_fix_unknown_macro.dpatch --- netperf-2.4.5/debian/patches/100_man_fix_unknown_macro.dpatch 2011-07-26 18:30:11.000000000 +0000 +++ netperf-2.5.0/debian/patches/100_man_fix_unknown_macro.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,47 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 10_man_fix_unknown_macro.dpatch by > -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: man_fix_unknown_macro - -@DPATCH@ -diff -urNad netperf-2.4.3~/doc/netperf.man netperf-2.4.3/doc/netperf.man ---- netperf-2.4.3~/doc/netperf.man 2007-07-23 13:41:52.000000000 +0000 -+++ netperf-2.4.3/doc/netperf.man 2007-07-23 13:44:14.000000000 +0000 -@@ -195,7 +195,7 @@ - else fails send email to Rick Jones . - - .SH SEE ALSO --.C netserver -+.BR netserver (1) - .br - .I - Netperf: A Network Performance Benchmark -diff -urNad netperf-2.4.3~/doc/netserver.man netperf-2.4.3/doc/netserver.man ---- netperf-2.4.3~/doc/netserver.man 2007-07-23 13:41:52.000000000 +0000 -+++ netperf-2.4.3/doc/netserver.man 2007-07-23 13:46:00.000000000 +0000 -@@ -12,12 +12,12 @@ - .SH DESCRIPTION - .B Netserver - listens for connections from a --.C netperf -+.BR netperf - benchmark, and responds accordingly. - It can either be run from --.C inetd -+.BR inetd - or as a standalone daemon (with the -p flag). If run from --.C inetd -+.BR inetd - the -p option should not be used. - - .SS OPTIONS -@@ -37,7 +37,7 @@ - No known bugs at this time. If you think you have found a bug, please send email to Rick Jones . - - .SH SEE ALSO --.C netperf -+.BR netperf (1) - .br - .I - Netperf: A Network Performance Benchmark diff -Nru netperf-2.4.5/debian/patches/10_man_fix_unknown_macro.diff netperf-2.5.0/debian/patches/10_man_fix_unknown_macro.diff --- netperf-2.4.5/debian/patches/10_man_fix_unknown_macro.diff 1970-01-01 00:00:00.000000000 +0000 +++ netperf-2.5.0/debian/patches/10_man_fix_unknown_macro.diff 2011-08-16 20:03:45.000000000 +0000 @@ -0,0 +1,18 @@ +--- a/doc/netserver.man ++++ b/doc/netserver.man +@@ -18,12 +18,12 @@ + .SH DESCRIPTION + .B Netserver + listens for connections from a +-.C netperf ++.BR netperf + benchmark, and responds accordingly. + It can either be run from +-.C inetd ++.BR inetd + or as a standalone daemon (with the -p flag). If run from +-.C inetd ++.BR inetd + the -p option should not be used. + + .SS OPTIONS diff -Nru netperf-2.4.5/debian/patches/10_man_fix_unknown_macro.dpatch netperf-2.5.0/debian/patches/10_man_fix_unknown_macro.dpatch --- netperf-2.4.5/debian/patches/10_man_fix_unknown_macro.dpatch 2011-07-26 18:30:11.000000000 +0000 +++ netperf-2.5.0/debian/patches/10_man_fix_unknown_macro.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,47 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 10_man_fix_unknown_macro.dpatch by > -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: man_fix_unknown_macro - -@DPATCH@ -diff -urNad netperf-2.4.3~/doc/netperf.man netperf-2.4.3/doc/netperf.man ---- netperf-2.4.3~/doc/netperf.man 2007-07-23 13:41:52.000000000 +0000 -+++ netperf-2.4.3/doc/netperf.man 2007-07-23 13:44:14.000000000 +0000 -@@ -195,7 +195,7 @@ - else fails send email to Rick Jones . - - .SH SEE ALSO --.C netserver -+.BR netserver (1) - .br - .I - Netperf: A Network Performance Benchmark -diff -urNad netperf-2.4.3~/doc/netserver.man netperf-2.4.3/doc/netserver.man ---- netperf-2.4.3~/doc/netserver.man 2007-07-23 13:41:52.000000000 +0000 -+++ netperf-2.4.3/doc/netserver.man 2007-07-23 13:46:00.000000000 +0000 -@@ -12,12 +12,12 @@ - .SH DESCRIPTION - .B Netserver - listens for connections from a --.C netperf -+.BR netperf - benchmark, and responds accordingly. - It can either be run from --.C inetd -+.BR inetd - or as a standalone daemon (with the -p flag). If run from --.C inetd -+.BR inetd - the -p option should not be used. - - .SS OPTIONS -@@ -37,7 +37,7 @@ - No known bugs at this time. If you think you have found a bug, please send email to Rick Jones . - - .SH SEE ALSO --.C netperf -+.BR netperf (1) - .br - .I - Netperf: A Network Performance Benchmark diff -Nru netperf-2.4.5/debian/patches/200_fix_debug_file_location.dpatch netperf-2.5.0/debian/patches/200_fix_debug_file_location.dpatch --- netperf-2.4.5/debian/patches/200_fix_debug_file_location.dpatch 2011-07-26 18:30:11.000000000 +0000 +++ netperf-2.5.0/debian/patches/200_fix_debug_file_location.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 20_fix_debug_file_location.dpatch by > -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: fix debug file location - -@DPATCH@ -diff -urNad netperf~/src/netserver.c netperf/src/netserver.c ---- netperf~/src/netserver.c 2007-10-18 21:10:12.000000000 +0000 -+++ netperf/src/netserver.c 2007-10-18 21:30:46.000000000 +0000 -@@ -141,7 +141,7 @@ - - #ifndef DEBUG_LOG_FILE - #ifndef WIN32 --#define DEBUG_LOG_FILE "/tmp/netperf.debug" -+#define DEBUG_LOG_FILE "/var/log/netperf.debug" - #else - #define DEBUG_LOG_FILE "c:\\temp\\netperf.debug" - #endif /* WIN32 */ diff -Nru netperf-2.4.5/debian/patches/20_fix_debug_file_location.diff netperf-2.5.0/debian/patches/20_fix_debug_file_location.diff --- netperf-2.4.5/debian/patches/20_fix_debug_file_location.diff 1970-01-01 00:00:00.000000000 +0000 +++ netperf-2.5.0/debian/patches/20_fix_debug_file_location.diff 2011-08-16 20:03:45.000000000 +0000 @@ -0,0 +1,11 @@ +--- a/src/netserver.c ++++ b/src/netserver.c +@@ -162,7 +162,7 @@ + #elif defined(ANDROID) + #define DEBUG_LOG_FILE_DIR "/data/local/tmp/" + #else +-#define DEBUG_LOG_FILE_DIR "/tmp/" ++#define DEBUG_LOG_FILE_DIR "/var/log/" + #endif + #endif /* DEBUG_LOG_FILE_DIR */ + diff -Nru netperf-2.4.5/debian/patches/20_fix_debug_file_location.dpatch netperf-2.5.0/debian/patches/20_fix_debug_file_location.dpatch --- netperf-2.4.5/debian/patches/20_fix_debug_file_location.dpatch 2011-07-26 18:30:11.000000000 +0000 +++ netperf-2.5.0/debian/patches/20_fix_debug_file_location.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,19 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 20_fix_debug_file_location.dpatch by > -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: fix debug file location - -@DPATCH@ -diff -urNad netperf~/src/netserver.c netperf/src/netserver.c ---- netperf~/src/netserver.c 2007-10-18 21:10:12.000000000 +0000 -+++ netperf/src/netserver.c 2007-10-18 21:30:46.000000000 +0000 -@@ -141,7 +141,7 @@ - - #ifndef DEBUG_LOG_FILE - #ifndef WIN32 --#define DEBUG_LOG_FILE "/tmp/netperf.debug" -+#define DEBUG_LOG_FILE "/var/log/netperf.debug" - #else - #define DEBUG_LOG_FILE "c:\\temp\\netperf.debug" - #endif /* WIN32 */ diff -Nru netperf-2.4.5/debian/patches/30_svn_trunk_20071205.dpatch netperf-2.5.0/debian/patches/30_svn_trunk_20071205.dpatch --- netperf-2.4.5/debian/patches/30_svn_trunk_20071205.dpatch 2011-07-26 18:30:11.000000000 +0000 +++ netperf-2.5.0/debian/patches/30_svn_trunk_20071205.dpatch 1970-01-01 00:00:00.000000000 +0000 @@ -1,655 +0,0 @@ -#! /bin/sh /usr/share/dpatch/dpatch-run -## 30_svn_trunk_20071205.dpatch by > -## -## All lines beginning with `## DP:' are a description of the patch. -## DP: svn_trunk_20071205 patches - -@DPATCH@ -diff -urNad netperf~/Release_Notes netperf/Release_Notes ---- netperf~/Release_Notes 2007-12-05 10:06:45.000000000 +0000 -+++ netperf/Release_Notes 2007-12-05 10:08:18.000000000 +0000 -@@ -1,4 +1,33 @@ --These are the Release Notes leading-up to Revision 2.4.4 of netperf: -+These are the Release Notes leading-up to Revision 2.4.5 of netperf: -+ -+Things changed in this release: -+ -+*) Track the bouncing interfaces that are linux processor affinity -+ -+*) Fixes for Solaris sendfilev usage. -+ -+*) A TCP_MSS test has been added which will report the MSS for a data -+ connection setup as if the test were a TCP_STREAM test. While the -+ remote (netserver) is tricked into thinking it is to accept a -+ TCP_STREAM test, no actual data will flow over the connection. -+ This means that if the MSS is one which might change over the life -+ of the connection, it will not be reflected in the test output. -+ Should this prove to be a problem a single send() can be arranged -+ along with the return of the shutdown();recv() handshake. -+ -+ The idea is that this might be useful for netperf scripts wanting -+ to parameterize things based on the MSS - for example the -+ packet_byte_script. -+ -+*) The width of the confidence interval can be specified in fractions -+ of a percent for the confidence of a clean, close, comfortable -+ calculation. :) -+ -+*) Honor the global -B option in a TCP_SENDFILE test. -+ -+*) Correct the sense of Send/Recv in the banner of a TCP_MAERTS test. -+ -+These are the Release Notes for Revision 2.4.4 of netperf: - - Things changed in this release: - -diff -urNad netperf~/doc/examples/Makefile.in netperf/doc/examples/Makefile.in ---- netperf~/doc/examples/Makefile.in 2007-12-05 10:06:45.000000000 +0000 -+++ netperf/doc/examples/Makefile.in 2007-12-05 10:08:18.000000000 +0000 -@@ -57,7 +57,6 @@ - ECHO_T = @ECHO_T@ - EGREP = @EGREP@ - EXEEXT = @EXEEXT@ --GREP = @GREP@ - INSTALL_DATA = @INSTALL_DATA@ - INSTALL_PROGRAM = @INSTALL_PROGRAM@ - INSTALL_SCRIPT = @INSTALL_SCRIPT@ -@@ -84,6 +83,8 @@ - STRIP = @STRIP@ - VERSION = @VERSION@ - ac_ct_CC = @ac_ct_CC@ -+ac_ct_RANLIB = @ac_ct_RANLIB@ -+ac_ct_STRIP = @ac_ct_STRIP@ - am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ - am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ - am__include = @am__include@ -@@ -96,29 +97,22 @@ - build_os = @build_os@ - build_vendor = @build_vendor@ - datadir = @datadir@ --datarootdir = @datarootdir@ --docdir = @docdir@ --dvidir = @dvidir@ - exec_prefix = @exec_prefix@ - host = @host@ - host_alias = @host_alias@ - host_cpu = @host_cpu@ - host_os = @host_os@ - host_vendor = @host_vendor@ --htmldir = @htmldir@ - includedir = @includedir@ - infodir = @infodir@ - install_sh = @install_sh@ - libdir = @libdir@ - libexecdir = @libexecdir@ --localedir = @localedir@ - localstatedir = @localstatedir@ - mandir = @mandir@ - oldincludedir = @oldincludedir@ --pdfdir = @pdfdir@ - prefix = @prefix@ - program_transform_name = @program_transform_name@ --psdir = @psdir@ - sbindir = @sbindir@ - sharedstatedir = @sharedstatedir@ - sysconfdir = @sysconfdir@ -diff -urNad netperf~/doc/examples/packet_byte_script netperf/doc/examples/packet_byte_script ---- netperf~/doc/examples/packet_byte_script 2007-12-05 10:06:45.000000000 +0000 -+++ netperf/doc/examples/packet_byte_script 2007-12-05 10:08:18.000000000 +0000 -@@ -10,6 +10,9 @@ - # - # rick jones 4/99 - # -+# teach it about processor affinity and the TCP_MSS test -+# rick jones 2007-11-08 -+# - - if [ $# -gt 2 ]; then - echo "try again, correctly -> packet_byte_script hostname [CPU]" -@@ -22,7 +25,8 @@ - fi - - # where is netperf --NETPERF_CMD=${NETPERF_CMD:=/opt/netperf/netperf} -+NETPERF_DIR=${NETPERF_DIR:=/opt/netperf2/bin} -+ - - # at what port will netserver be waiting? If you decide to run - # netserver at a differnet port than the default of 12865, then set -@@ -32,25 +36,22 @@ - - - # The test length in seconds --NETPERF_TIME=${NETPERF_TIME:=20} -+NETPERF_TIME=${NETPERF_TIME:=30} - - # How accurate we want the estimate of performance: - # maximum and minimum test iterations (-i) - # confidence level (99 or 95) and interval (percent) --NETPERF_STATS=${NETPERF_STATS:="-i 10,3 -I 99,5"} -+NETPERF_STATS=${NETPERF_STATS:="-i 30,3 -I 99,5"} - - # The socket sizes that we will be testing - using -1 will let it - # be the system default. - NETPERF_SKTS=${NETPERF_SKTS:="-1"} - --# The request,response sizes that we will be using. The netperf --# command parser will treat "1" the same as "1,1" - I use 1,1 to --# remember that it is "request,response" --NETPERF_REQS=${NETPERF_REQS:="1 16 32 64 128 256 512 1024 \ -- 1460 1461 2920 2921 4380 4381"} -+# The CPU affinity to be applied -+NETPERF_AFFINITY=${NETPERF_AFFINITY:=""} - --NETPERF_RESP=${NETPERF_RESP:="1 16 32 64 128 256 512 1024 \ -- 1460 1461 2920 2921 4380 4381"} -+# NETPERF_CMD is an amalgam of previous variables -+NETPERF_CMD="${NETPERF_DIR}/netperf ${NETPERF_AFFINITY}" - - # if there are two parms, parm one it the hostname and parm two will - # be a CPU indicator. actually, anything as a second parm will cause -@@ -66,6 +67,44 @@ - REM_HOST=$1 - fi - -+MSS=`$NETPERF_CMD -H $REM_HOST -t TCP_MSS -P 0 -v 0` -+ -+# The request,response sizes that we will be using. The netperf -+# command parser will treat "1" the same as "1,1" - I use 1,1 to -+# remember that it is "request,response" -+ -+# start at one and multiply by two on our way to the MSS -+bar=1 -+while [ $bar -lt $MSS ] -+do -+ NETPERF_REQS="${NETPERF_REQS} $bar" -+ bar=`expr $bar \* 2` -+done -+ -+# and now multiples of the mss and that plus one -+for i in 1 2 3 -+do -+ bar=`expr $MSS \* $i` -+ NETPERF_REQS="${NETPERF_REQS} $bar" -+ NETPERF_REQS="${NETPERF_REQS} `expr $bar + 1`" -+done -+ -+bar=1 -+while [ $bar -lt $MSS ] -+do -+ NETPERF_RESP="${NETPERF_RESP} $bar" -+ bar=`expr $bar \* 2` -+done -+ -+for i in 1 2 3 -+do -+ bar=`expr $MSS \* $i` -+ NETPERF_RESP="${NETPERF_RESP} $bar" -+ NETPERF_RESP="${NETPERF_RESP} `expr $bar + 1`" -+done -+ -+ -+ - # If we are measuring CPU utilization, then we can save beaucoup - # time by saving the results of the CPU calibration and passing - # them in during the real tests. So, we execute the new CPU "tests" -diff -urNad netperf~/src/netlib.c netperf/src/netlib.c ---- netperf~/src/netlib.c 2007-12-05 10:06:46.000000000 +0000 -+++ netperf/src/netlib.c 2007-12-05 10:08:18.000000000 +0000 -@@ -1990,8 +1990,13 @@ - - #if defined(__CPU_SETSIZE) - #define NETPERF_CPU_SETSIZE __CPU_SETSIZE -+#if defined(__CPU_SET_S) -+#define NETPERF_CPU_SET(cpu, cpusetp) __CPU_SET_S(cpu, sizeof (cpu_set_t), cpusetp) -+#define NETPERF_CPU_ZERO(cpusetp) __CPU_ZERO_S (sizeof (cpu_set_t), cpusetp) -+#else - #define NETPERF_CPU_SET(cpu, cpusetp) __CPU_SET(cpu, cpusetp) - #define NETPERF_CPU_ZERO(cpusetp) __CPU_ZERO (cpusetp) -+#endif - typedef cpu_set_t netperf_cpu_set_t; - #else - #define NETPERF_CPU_SETSIZE sizeof(unsigned long) -@@ -4149,13 +4154,13 @@ - fprintf(where, - "!!! must be investigated before going further.\n"); - fprintf(where, -- "!!! Confidence intervals: Throughput : %4.1f%%\n", -+ "!!! Confidence intervals: Throughput : %4.3f%%\n", - 100.0 * (interval - result_confid)); - fprintf(where, -- "!!! Local CPU util : %4.1f%%\n", -+ "!!! Local CPU util : %4.3f%%\n", - 100.0 * (interval - loc_cpu_confid)); - fprintf(where, -- "!!! Remote CPU util : %4.1f%%\n\n", -+ "!!! Remote CPU util : %4.3f%%\n\n", - 100.0 * (interval - rem_cpu_confid)); - } - -diff -urNad netperf~/src/netperf.c netperf/src/netperf.c ---- netperf~/src/netperf.c 2007-12-05 10:06:46.000000000 +0000 -+++ netperf/src/netperf.c 2007-12-05 10:08:18.000000000 +0000 -@@ -144,6 +144,9 @@ - else if (strcasecmp(test_name,"TCP_MAERTS") == 0) { - send_tcp_maerts(host_name); - } -+ else if (strcasecmp(test_name,"TCP_MSS") == 0) { -+ send_tcp_mss(host_name); -+ } - #ifdef HAVE_ICSC_EXS - else if (strcasecmp(test_name,"EXS_TCP_STREAM") == 0) { - send_exs_tcp_stream(host_name); -diff -urNad netperf~/src/netsh.c netperf/src/netsh.c ---- netperf~/src/netsh.c 2007-12-05 10:06:46.000000000 +0000 -+++ netperf/src/netsh.c 2007-12-05 10:08:18.000000000 +0000 -@@ -589,7 +589,9 @@ - exit(1); - } - if (arg2[0] ) { -- interval = (double) convert(arg2)/100; -+ /* it doesn't make much sense to use convert() here so just -+ use strtod() instead. raj 2007-10-24 */ -+ interval = strtod(arg2,NULL)/100.0; - } - /* make sure that iteration_min and iteration_max are at least - at a reasonable default value. if a -i option has previously -@@ -886,6 +888,7 @@ - (strcasecmp(test_name,"TCP_RR") == 0) || - (strcasecmp(test_name,"TCP_CRR") == 0) || - (strcasecmp(test_name,"TCP_CC") == 0) || -+ (strcasecmp(test_name,"TCP_MSS") == 0) || - #ifdef DO_1644 - (strcasecmp(test_name,"TCP_TRR") == 0) || - #endif /* DO_1644 */ -diff -urNad netperf~/src/nettest_bsd.c netperf/src/nettest_bsd.c ---- netperf~/src/nettest_bsd.c 2007-12-05 10:06:46.000000000 +0000 -+++ netperf/src/nettest_bsd.c 2007-12-05 10:08:18.000000000 +0000 -@@ -26,6 +26,7 @@ - /* recv_tcp_conn_rr() */ - /* send_tcp_cc() a connect/disconnect test with */ - /* recv_tcp_cc() no RR */ -+/* send_tcp_mss() just report the mss */ - /* send_udp_stream() perform a udp stream test */ - /* recv_udp_stream() */ - /* send_udp_rr() perform a udp request/response */ -@@ -95,6 +96,10 @@ - #include - #endif /* NOSTDLIBH */ - -+#ifdef WANT_SCTP -+#include -+#endif -+ - #ifndef WIN32 - #if !defined(__VMS) - #include -@@ -147,9 +152,9 @@ - 2007-06-08 */ - int first_burst_size=0; - --#if defined(HAVE_SENDFILE) && (defined(__linux) || defined(__sun__)) -+#if defined(HAVE_SENDFILE) && (defined(__linux) || defined(__sun)) - #include --#endif /* HAVE_SENDFILE && (__linux || __sun__) */ -+#endif /* HAVE_SENDFILE && (__linux || __sun) */ - - - -@@ -1184,7 +1189,7 @@ - - if (iteration_max > 1) { - fprintf(where, -- " : +/-%3.1f%% @ %2d%% conf. %s", -+ " : +/-%.3f%% @ %2d%% conf. %s", - interval/0.02, - confidence_level, - result_confidence_only ? " on result only" : ""); -@@ -1957,7 +1962,7 @@ - - char *cpu_title = "\ - Recv Send Send Utilization Service Demand\n\ --Socket Socket Message Elapsed Send Recv Send Recv\n\ -+Socket Socket Message Elapsed Recv Send Recv Send\n\ - Size Size Size Time Throughput local remote local remote\n\ - bytes bytes bytes secs. %-8.8s/s %% %c %% %c us/KB us/KB\n\n"; - -@@ -2637,6 +2642,197 @@ - - - -+/* this routine implements the TCP_MSS test. All it does is pretend -+ to be a TCP_STREAM test and report the TCP_MSS for the data -+ connection. No actual data is transferred. raj 2007-11-07 -+*/ -+void -+send_tcp_mss(char remote_host[]) -+{ -+ -+ char *mss_title = "\ -+Maximum\n\ -+Segment\n\ -+Size (bytes)\n\n"; -+ -+ char *mss_fmt_0 = -+ "%d %s\n"; -+ -+ SOCKET send_socket; -+ int tcp_mss = -1; /* possibly uninitialized on printf far below */ -+ -+ struct addrinfo *remote_res; -+ struct addrinfo *local_res; -+ -+ struct tcp_stream_request_struct *tcp_stream_request; -+ struct tcp_stream_response_struct *tcp_stream_response; -+ struct tcp_stream_results_struct *tcp_stream_result; -+ -+ tcp_stream_request = -+ (struct tcp_stream_request_struct *)netperf_request.content.test_specific_data; -+ tcp_stream_response = -+ (struct tcp_stream_response_struct *)netperf_response.content.test_specific_data; -+ tcp_stream_result = -+ (struct tcp_stream_results_struct *)netperf_response.content.test_specific_data; -+ -+ /* since we are now disconnected from the code that established the */ -+ /* control socket, and since we want to be able to use different */ -+ /* protocols and such, we are passed the name of the remote host and */ -+ /* must turn that into the test specific addressing information. */ -+ -+ /* complete_addrinfos will either succede or exit the process */ -+ complete_addrinfos(&remote_res, -+ &local_res, -+ remote_host, -+ SOCK_STREAM, -+ IPPROTO_TCP, -+ 0); -+ -+ if ( print_headers ) { -+ print_top_test_header("TCP MSS TEST",local_res,remote_res); -+ } -+ -+ /*set up the data socket */ -+ send_socket = create_data_socket(local_res); -+ -+ if (send_socket == INVALID_SOCKET){ -+ perror("netperf: send_tcp_stream: tcp stream data socket"); -+ exit(1); -+ } -+ -+ if (debug) { -+ fprintf(where,"send_tcp_stream: send_socket obtained...\n"); -+ } -+ -+ -+ if (!no_control) { -+ /* Tell the remote end to do a listen. The server alters the -+ socket paramters on the other side at this point, hence the -+ reason for all the values being passed in the setup -+ message. If the user did not specify any of the parameters, -+ they will be passed as 0, which will indicate to the remote -+ that no changes beyond the system's default should be -+ used. Alignment is the exception, it will default to 1, which -+ will be no alignment alterations. */ -+ -+ netperf_request.content.request_type = DO_TCP_STREAM; -+ tcp_stream_request->send_buf_size = rss_size_req; -+ tcp_stream_request->recv_buf_size = rsr_size_req; -+ tcp_stream_request->receive_size = recv_size; -+ tcp_stream_request->no_delay = rem_nodelay; -+ tcp_stream_request->recv_alignment = remote_recv_align; -+ tcp_stream_request->recv_offset = remote_recv_offset; -+ tcp_stream_request->measure_cpu = remote_cpu_usage; -+ tcp_stream_request->cpu_rate = remote_cpu_rate; -+ if (test_time) { -+ tcp_stream_request->test_length = test_time; -+ } -+ else { -+ tcp_stream_request->test_length = test_bytes; -+ } -+ tcp_stream_request->so_rcvavoid = rem_rcvavoid; -+ tcp_stream_request->so_sndavoid = rem_sndavoid; -+#ifdef DIRTY -+ tcp_stream_request->dirty_count = rem_dirty_count; -+ tcp_stream_request->clean_count = rem_clean_count; -+#endif /* DIRTY */ -+ tcp_stream_request->port = atoi(remote_data_port); -+ tcp_stream_request->ipfamily = af_to_nf(remote_res->ai_family); -+ if (debug > 1) { -+ fprintf(where, -+ "netperf: send_tcp_mss: requesting TCP stream test\n"); -+ } -+ -+ send_request(); -+ -+ /* The response from the remote will contain all of the relevant -+ socket parameters for this test type. We will put them back -+ into the variables here so they can be displayed if desired. -+ The remote will have calibrated CPU if necessary, and will -+ have done all the needed set-up we will have calibrated the -+ cpu locally before sending the request, and will grab the -+ counter value right after the connect returns. The remote -+ will grab the counter right after the accept call. This saves -+ the hassle of extra messages being sent for the TCP -+ tests. */ -+ -+ recv_response(); -+ -+ if (!netperf_response.content.serv_errno) { -+ if (debug) -+ fprintf(where,"remote listen done.\n"); -+ rsr_size = tcp_stream_response->recv_buf_size; -+ rss_size = tcp_stream_response->send_buf_size; -+ rem_nodelay = tcp_stream_response->no_delay; -+ remote_cpu_usage= tcp_stream_response->measure_cpu; -+ remote_cpu_rate = tcp_stream_response->cpu_rate; -+ -+ /* we have to make sure that the server port number is in -+ network order */ -+ set_port_number(remote_res, -+ (short)tcp_stream_response->data_port_number); -+ -+ rem_rcvavoid = tcp_stream_response->so_rcvavoid; -+ rem_sndavoid = tcp_stream_response->so_sndavoid; -+ } -+ else { -+ Set_errno(netperf_response.content.serv_errno); -+ fprintf(where, -+ "netperf: remote error %d", -+ netperf_response.content.serv_errno); -+ perror(""); -+ fflush(where); -+ -+ exit(1); -+ } -+ } -+ -+ /*Connect up to the remote port on the data socket */ -+ if (connect(send_socket, -+ remote_res->ai_addr, -+ remote_res->ai_addrlen) == INVALID_SOCKET){ -+ perror("netperf: send_tcp_mss: data socket connect failed"); -+ exit(1); -+ } -+ -+ -+ /* find-out what the TCP maximum segment_size was (if possible) */ -+ tcp_mss = -1; -+ get_tcp_info(send_socket,&tcp_mss); -+ -+ /* just go ahead and close the socket, the remote should figure it -+ out */ -+ close(send_socket); -+ -+ /* statistics? we don't need no stinking statistics */ -+ -+ -+ switch (verbosity) { -+ case 0: -+ fprintf(where, -+ mss_fmt_0, -+ tcp_mss, -+ ((print_headers) || -+ (result_brand == NULL)) ? "" : result_brand); -+ break; -+ case 1: -+ case 2: -+ if (print_headers) { -+ fprintf(where,mss_title); -+ } -+ fprintf(where, -+ mss_fmt_0, /* the format string */ -+ tcp_mss, -+ ((print_headers) || -+ (result_brand == NULL)) ? "" : result_brand); -+ break; -+ } -+ -+ -+} -+ -+ -+ - #ifdef HAVE_ICSC_EXS - - #include -@@ -3427,10 +3623,10 @@ - bytes bytes bytes secs. %s/sec \n\n"; - - char *tput_fmt_0 = -- "%7.2f\n"; -+ "%7.2f %s\n"; - - char *tput_fmt_1 = -- "%6d %6d %6d %-6.2f %7.2f \n"; -+ "%6d %6d %6d %-6.2f %7.2f %s\n"; - - char *cpu_title = "\ - Recv Send Send Utilization Service Demand\n\ -@@ -3439,9 +3635,9 @@ - bytes bytes bytes secs. %-8.8s/s %% %c %% %c us/KB us/KB\n\n"; - - char *cpu_fmt_0 = -- "%6.3f %c\n"; -+ "%6.3f %c %s\n"; - char *cpu_fmt_1 = -- "%6d %6d %6d %-6.2f %7.2f %-6.2f %-6.2f %-6.3f %-6.3f\n"; -+ "%6d %6d %6d %-6.2f %7.2f %-6.2f %-6.2f %-6.3f %-6.3f %s\n"; - - char *ksink_fmt = "\n\ - Alignment Offset %-8.8s %-8.8s Sends %-8.8s Recvs\n\ -@@ -3488,22 +3684,22 @@ - struct addrinfo *local_res; - struct sockaddr_in server; - --#if defined(__linux) || defined(__sun__) -+#if defined(__linux) || defined(__sun) - off_t scratch_offset; /* the linux sendfile() call will update - the offset variable, which is - something we do _not_ want to happen - to the value in the send_ring! so, we - have to use a scratch variable. */ --#endif /* __linux || defined(__sun__) */ -+#endif /* __linux || defined(__sun) */ - #if defined (USE_OSX) - off_t scratch_len; /* Darwin 9.x need a value-result parameter */ - #endif --#if defined (__sun__) -+#if defined (__sun) - size_t scratch_len; /* the sun sendfilev() needs a place to - tell us how many bytes were written, - even though it also returns the value */ - sendfilevec_t sv; --#endif /* __sun__ */ -+#endif /* __sun */ - - struct tcp_stream_request_struct *tcp_stream_request; - struct tcp_stream_response_struct *tcp_stream_response; -@@ -3839,7 +4035,7 @@ - send_ring->fildes, - &scratch_offset, /* modified after the call! */ - send_ring->length)) != send_size) --#elif defined (__sun__) -+#elif defined (__sun) - /* We must call with SFV_NOWAIT and a large file size (>= 16MB) to - get zero-copy, as well as compiling with -D_LARGEFILE_SOURCE - -D_FILE_OFFSET_BITS=64 */ -@@ -4104,14 +4300,18 @@ - fprintf(where, - cpu_fmt_0, - local_service_demand, -- local_cpu_method); -+ local_cpu_method, -+ ((print_headers) || -+ (result_brand == NULL)) ? "" : result_brand); - } - - else { - fprintf(where, - cpu_fmt_0, - remote_service_demand, -- remote_cpu_method); -+ remote_cpu_method, -+ ((print_headers) || -+ (result_brand == NULL)) ? "" : result_brand); - } - - break; -@@ -4136,7 +4336,9 @@ - local_cpu_utilization, /* local cpu */ - remote_cpu_utilization, /* remote cpu */ - local_service_demand, /* local service demand */ -- remote_service_demand); /* remote service demand */ -+ remote_service_demand, /* remote service demand */ -+ ((print_headers) || -+ (result_brand == NULL)) ? "" : result_brand); - break; - } - -@@ -4151,7 +4353,9 @@ - - fprintf(where, - tput_fmt_0, -- thruput); -+ thruput, -+ ((print_headers) || -+ (result_brand == NULL)) ? "" : result_brand); - break; - - case 1: -@@ -4167,7 +4371,9 @@ - lss_size, /* local sendbuf size */ - send_size, /* how large were the sends */ - elapsed_time, /* how long did it take */ -- thruput);/* how fast did it go */ -+ thruput, /* how fast did it go */ -+ ((print_headers) || -+ (result_brand == NULL)) ? "" : result_brand); - break; - } - } -@@ -4926,6 +5132,12 @@ - Send Recv Size Size Time Throughput \n\ - bytes Bytes bytes bytes secs. %s/sec \n\n"; - -+ char *tput_title_latency = "\ -+Local /Remote\n\ -+Socket Size Request Resp. Elapsed \n\ -+Send Recv Size Size Time Latency \n\ -+bytes Bytes bytes bytes secs. usec/tran \n\n"; -+ - char *tput_fmt_0 = - "%7.2f %s\n"; - -@@ -4945,6 +5157,12 @@ - Socket Size Request Resp. Elapsed Tput CPU CPU S.dem S.dem\n\ - Send Recv Size Size Time %-8.8s local remote local remote\n\ - bytes bytes bytes bytes secs. per sec %% %c %% %c us/Tr us/Tr\n\n"; -+ -+ char *cpu_title_latency = "\ -+Local /Remote\n\ -+Socket Size Request Resp. Elapsed Latency CPU CPU S.dem S.dem\n\ -+Send Recv Size Size Time usecs local remote local remote\n\ -+bytes bytes bytes bytes secs. per tran %% %c %% %c us/Tr us/Tr\n\n"; - - char *cpu_fmt_0 = - "%6.3f %c %s\n"; diff -Nru netperf-2.4.5/debian/patches/debian-changes-2.5.0-1 netperf-2.5.0/debian/patches/debian-changes-2.5.0-1 --- netperf-2.4.5/debian/patches/debian-changes-2.5.0-1 1970-01-01 00:00:00.000000000 +0000 +++ netperf-2.5.0/debian/patches/debian-changes-2.5.0-1 2011-08-16 20:04:40.000000000 +0000 @@ -0,0 +1,179 @@ +Description: Upstream changes introduced in version 2.5.0-1 + This patch has been created by dpkg-source during the package build. + Here's the last changelog entry, hopefully it gives details on why + those changes were made: + . + netperf (2.5.0-1) unstable; urgency=low + . + * [4174b40a] Imported Upstream version 2.5.0 + * [3d7a224f] [patches] recreated patches using quilt + . + The person named in the Author field signed this changelog entry. +Author: Erik Wenzel + +--- +The information above should follow the Patch Tagging Guidelines, please +checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here +are templates for supplementary fields that you might want to add: + +Origin: , +Bug: +Bug-Debian: http://bugs.debian.org/ +Bug-Ubuntu: https://launchpad.net/bugs/ +Forwarded: +Reviewed-By: +Last-Update: + +--- netperf-2.5.0.orig/m4/.svn/entries ++++ netperf-2.5.0/m4/.svn/entries +@@ -1,7 +1,7 @@ +-10 ++8 + + dir +-432 ++299 + http://www.netperf.org/svn/netperf2/trunk/m4 + http://www.netperf.org/svn/netperf2 + +@@ -12,7 +12,7 @@ http://www.netperf.org/svn/netperf2 + raj + + +- ++svn:special svn:externals svn:needs-lock + + + +--- /dev/null ++++ netperf-2.5.0/m4/.svn/format +@@ -0,0 +1 @@ ++8 +--- netperf-2.5.0.orig/m4/m4/.svn/entries ++++ netperf-2.5.0/m4/m4/.svn/entries +@@ -1,7 +1,7 @@ +-10 ++8 + + dir +-432 ++299 + http://www.netperf.org/svn/netperf2/trunk/m4/m4 + http://www.netperf.org/svn/netperf2 + +@@ -12,7 +12,7 @@ http://www.netperf.org/svn/netperf2 + raj + + +- ++svn:special svn:externals svn:needs-lock + + + +@@ -32,33 +32,11 @@ file + + + +-2011-02-10T17:04:06.952170Z ++2008-03-18T18:36:22.000000Z + 0a5ed6a330cac1af2398fb47a8b2e3f8 + 2008-03-18T21:08:56.012824Z + 266 + raj +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +-1402 + + sockaddrin6.m4 + file +@@ -66,33 +44,11 @@ file + + + +-2011-02-10T17:04:06.952170Z ++2007-06-01T22:05:59.000000Z + 19d9c4f1138e5876254228d1b554c13d + 2005-10-17T22:25:24.828295Z + 33 + raj +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +-2714 + + sockinttypes.m4 + file +@@ -100,31 +56,9 @@ file + + + +-2011-02-10T17:04:06.952170Z ++2007-06-01T22:05:59.000000Z + d5b12afdcfa72f3b6846639f0f91dd5f + 2005-10-17T22:25:24.828295Z + 33 + raj +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +-5727 + +--- /dev/null ++++ netperf-2.5.0/m4/m4/.svn/format +@@ -0,0 +1 @@ ++8 diff -Nru netperf-2.4.5/debian/patches/series netperf-2.5.0/debian/patches/series --- netperf-2.4.5/debian/patches/series 2011-07-26 18:30:11.000000000 +0000 +++ netperf-2.5.0/debian/patches/series 2011-08-16 20:04:40.000000000 +0000 @@ -1,2 +1,3 @@ -200_fix_debug_file_location.dpatch -100_man_fix_unknown_macro.dpatch +20_fix_debug_file_location.diff +10_man_fix_unknown_macro.diff +debian-changes-2.5.0-1 diff -Nru netperf-2.4.5/debian/rules netperf-2.5.0/debian/rules --- netperf-2.4.5/debian/rules 2011-07-26 18:30:11.000000000 +0000 +++ netperf-2.5.0/debian/rules 2011-08-16 20:03:45.000000000 +0000 @@ -3,6 +3,7 @@ include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/class/autotools.mk #include /usr/share/cdbs/1/rules/dpatch.mk +include /usr/share/cdbs/1/rules/patchsys-quilt.mk DEB_CONFIGURE_EXTRA_FLAGS := --enable-demo diff -Nru netperf-2.4.5/doc/examples/Makefile.in netperf-2.5.0/doc/examples/Makefile.in --- netperf-2.4.5/doc/examples/Makefile.in 2009-06-12 00:10:32.000000000 +0000 +++ netperf-2.5.0/doc/examples/Makefile.in 2011-07-19 23:25:15.000000000 +0000 @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.7.9 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ -# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 -# Free Software Foundation, Inc. +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -13,17 +14,12 @@ # PARTICULAR PURPOSE. @SET_MAKE@ - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../.. - +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -35,10 +31,24 @@ NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ +subdir = doc/examples +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/src/missing/m4/salen.m4 \ + $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -58,6 +68,7 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -67,8 +78,7 @@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ -NEED_LIBCOMPAT_FALSE = @NEED_LIBCOMPAT_FALSE@ -NEED_LIBCOMPAT_TRUE = @NEED_LIBCOMPAT_TRUE@ +MKDIR_P = @MKDIR_P@ NETCPU_SOURCE = @NETCPU_SOURCE@ NETDRVLKUP_SOURCE = @NETDRVLKUP_SOURCE@ NETRTLKUP_SOURCE = @NETRTLKUP_SOURCE@ @@ -81,6 +91,7 @@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ @@ -88,18 +99,23 @@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ +builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ @@ -119,6 +135,7 @@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ +mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ @@ -126,12 +143,16 @@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ EXTRA_DIST = \ arr_script \ packet_byte_script \ @@ -143,64 +164,79 @@ udp_rr_script \ udp_stream_script -subdir = doc/examples -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -DIST_SOURCES = -DIST_COMMON = $(srcdir)/Makefile.in Makefile.am all: all-am .SUFFIXES: -$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu doc/examples/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) -uninstall-info-am: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/examples/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu doc/examples/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): tags: TAGS TAGS: ctags: CTAGS CTAGS: -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - -top_distdir = ../.. -distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkinstalldirs) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile - installdirs: install: install-am install-exec: install-exec-am @@ -221,7 +257,8 @@ clean-generic: distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -238,18 +275,40 @@ dvi-am: +html: html-am + +html-am: + info: info-am info-am: install-data-am: +install-dvi: install-dvi-am + +install-dvi-am: + install-exec-am: +install-html: install-html-am + +install-html-am: + install-info: install-info-am +install-info-am: + install-man: +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -268,16 +327,20 @@ ps-am: -uninstall-am: uninstall-info-am +uninstall-am: + +.MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic distclean \ - distclean-generic distdir dvi dvi-am info info-am install \ - install-am install-data install-data-am install-exec \ - install-exec-am install-info install-info-am install-man \ + distclean-generic distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \ - uninstall-info-am + mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru netperf-2.4.5/doc/examples/sctp_stream_script netperf-2.5.0/doc/examples/sctp_stream_script --- netperf-2.4.5/doc/examples/sctp_stream_script 2007-06-01 22:06:03.000000000 +0000 +++ netperf-2.5.0/doc/examples/sctp_stream_script 2011-02-10 17:04:20.000000000 +0000 @@ -98,7 +98,3 @@ done done -echo If you wish to submit these results to the netperf database at -echo http://www.cup.hp.com/netperf/NetperfPage.html, please submit each -echo datapoint individually. Individual datapoints are separated by -echo lines of dashes. diff -Nru netperf-2.4.5/doc/examples/snapshot_script netperf-2.5.0/doc/examples/snapshot_script --- netperf-2.4.5/doc/examples/snapshot_script 2007-06-01 22:06:03.000000000 +0000 +++ netperf-2.5.0/doc/examples/snapshot_script 2011-02-10 17:04:20.000000000 +0000 @@ -220,7 +220,3 @@ echo Tests completed at `date` >&2 echo -echo If you wish to submit these results to the netperf database at -echo http://www.cup.hp.com/netperf/NetperfPage.html, please submit each -echo datapoint individually. Individual datapoints are separated by -echo lines of dashes. diff -Nru netperf-2.4.5/doc/examples/tcp_range_script netperf-2.5.0/doc/examples/tcp_range_script --- netperf-2.4.5/doc/examples/tcp_range_script 2007-06-01 22:06:03.000000000 +0000 +++ netperf-2.5.0/doc/examples/tcp_range_script 2011-02-10 17:04:20.000000000 +0000 @@ -106,8 +106,4 @@ done echo -echo If you wish to submit these results to the netperf database at -echo http://www.cup.hp.com/netperf/NetperfPage.html, please submit each -echo datapoint individually. Individual datapoints are separated by -echo lines of dashes. diff -Nru netperf-2.4.5/doc/examples/tcp_rr_script netperf-2.5.0/doc/examples/tcp_rr_script --- netperf-2.4.5/doc/examples/tcp_rr_script 2007-06-01 22:06:03.000000000 +0000 +++ netperf-2.5.0/doc/examples/tcp_rr_script 2011-02-10 17:04:20.000000000 +0000 @@ -101,7 +101,3 @@ done done echo -echo If you wish to submit these results to the netperf database at -echo http://www.cup.hp.com/netperf/NetperfPage.html, please submit each -echo datapoint individually. Individual datapoints are separated by -echo lines of dashes. diff -Nru netperf-2.4.5/doc/examples/tcp_stream_script netperf-2.5.0/doc/examples/tcp_stream_script --- netperf-2.4.5/doc/examples/tcp_stream_script 2007-06-01 22:06:03.000000000 +0000 +++ netperf-2.5.0/doc/examples/tcp_stream_script 2011-02-10 17:04:20.000000000 +0000 @@ -98,7 +98,3 @@ done done -echo If you wish to submit these results to the netperf database at -echo http://www.cup.hp.com/netperf/NetperfPage.html, please submit each -echo datapoint individually. Individual datapoints are separated by -echo lines of dashes. diff -Nru netperf-2.4.5/doc/examples/udp_rr_script netperf-2.5.0/doc/examples/udp_rr_script --- netperf-2.4.5/doc/examples/udp_rr_script 2007-06-01 22:06:03.000000000 +0000 +++ netperf-2.5.0/doc/examples/udp_rr_script 2011-02-10 17:04:20.000000000 +0000 @@ -101,7 +101,3 @@ done done echo -echo If you wish to submit these results to the netperf database at -echo http://www.cup.hp.com/netperf/NetperfPage.html, please submit each -echo datapoint individually. Individual datapoints are separated by -echo lines of dashes. diff -Nru netperf-2.4.5/doc/examples/udp_stream_script netperf-2.5.0/doc/examples/udp_stream_script --- netperf-2.4.5/doc/examples/udp_stream_script 2007-06-01 22:06:03.000000000 +0000 +++ netperf-2.5.0/doc/examples/udp_stream_script 2011-02-10 17:04:20.000000000 +0000 @@ -98,7 +98,3 @@ done done echo -echo If you wish to submit these results to the netperf database at -echo http://www.cup.hp.com/netperf/NetperfPage.html, please submit each -echo datapoint individually. Individual datapoints are separated by -echo lines of dashes. diff -Nru netperf-2.4.5/doc/Makefile.in netperf-2.5.0/doc/Makefile.in --- netperf-2.4.5/doc/Makefile.in 2009-06-12 00:10:32.000000000 +0000 +++ netperf-2.5.0/doc/Makefile.in 2011-07-19 23:25:15.000000000 +0000 @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.7.9 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ -# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 -# Free Software Foundation, Inc. +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -17,17 +18,12 @@ # what is your philosophy - distribute pre-made .pdf et al in a make dist # or not? choose your EXTRA_DIST line accordingly # EXTRA_DIST = netperf.man netserver.man netperf.txt netperf.html netperf.xml netperf_old.ps netperf.pdf netperf.ps netperf.texi examples - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = .. - +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -39,10 +35,101 @@ NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ +subdir = doc +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in texinfo.tex +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/src/missing/m4/salen.m4 \ + $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +INFO_DEPS = $(srcdir)/netperf.info +am__TEXINFO_TEX_DIR = $(srcdir) +DVIS = netperf.dvi +PDFS = netperf.pdf +PSS = netperf.ps +HTMLS = netperf.html +TEXINFOS = netperf.texi +TEXI2DVI = texi2dvi +TEXI2PDF = $(TEXI2DVI) --pdf --batch +MAKEINFOHTML = $(MAKEINFO) --html +AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS) +DVIPS = dvips +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +am__installdirs = "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)" +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +man1dir = $(mandir)/man1 +NROFF = nroff +MANS = $(man1_MANS) +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -62,6 +149,7 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -71,8 +159,7 @@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ -NEED_LIBCOMPAT_FALSE = @NEED_LIBCOMPAT_FALSE@ -NEED_LIBCOMPAT_TRUE = @NEED_LIBCOMPAT_TRUE@ +MKDIR_P = @MKDIR_P@ NETCPU_SOURCE = @NETCPU_SOURCE@ NETDRVLKUP_SOURCE = @NETDRVLKUP_SOURCE@ NETRTLKUP_SOURCE = @NETRTLKUP_SOURCE@ @@ -85,6 +172,7 @@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ @@ -92,18 +180,23 @@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ +builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ @@ -123,6 +216,7 @@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ +mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ @@ -130,85 +224,137 @@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ - +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ SUBDIRS = examples - EXTRA_DIST = netperf.man netserver.man netperf_old.ps netperf.texi man1_MANS = netperf.man netserver.man info_TEXINFOS = netperf.texi CLEANFILES = netperf.txt netperf.xml netperf.html -subdir = doc -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -DIST_SOURCES = -am__TEXINFO_TEX_DIR = $(srcdir) -INFO_DEPS = netperf.info -DVIS = netperf.dvi -PDFS = netperf.pdf -PSS = netperf.ps -TEXINFOS = netperf.texi - -NROFF = nroff -MANS = $(man1_MANS) - -RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \ - ps-recursive install-info-recursive uninstall-info-recursive \ - all-recursive install-data-recursive install-exec-recursive \ - installdirs-recursive install-recursive uninstall-recursive \ - check-recursive installcheck-recursive -DIST_COMMON = $(srcdir)/Makefile.in Makefile.am texinfo.tex -DIST_SUBDIRS = $(SUBDIRS) all: all-recursive .SUFFIXES: -.SUFFIXES: .dvi .info .pdf .ps .texi -$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu doc/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) +.SUFFIXES: .dvi .html .info .pdf .ps .texi +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu doc/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): .texi.info: - @rm -f $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9] - $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ - -o $@ `test -f '$<' || echo '$(srcdir)/'`$< + restore=: && backupdir="$(am__leading_dot)am$$$$" && \ + am__cwd=`pwd` && $(am__cd) $(srcdir) && \ + rm -rf $$backupdir && mkdir $$backupdir && \ + if ($(MAKEINFO) --version) >/dev/null 2>&1; then \ + for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \ + if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \ + done; \ + else :; fi && \ + cd "$$am__cwd"; \ + if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ + -o $@ $<; \ + then \ + rc=0; \ + $(am__cd) $(srcdir); \ + else \ + rc=$$?; \ + $(am__cd) $(srcdir) && \ + $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \ + fi; \ + rm -rf $$backupdir; exit $$rc .texi.dvi: TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ - $(TEXI2DVI) `test -f '$<' || echo '$(srcdir)/'`$< + $(TEXI2DVI) $< .texi.pdf: TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ - $(TEXI2PDF) `test -f '$<' || echo '$(srcdir)/'`$< -netperf.info: netperf.texi + $(TEXI2PDF) $< + +.texi.html: + rm -rf $(@:.html=.htp) + if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ + -o $(@:.html=.htp) $<; \ + then \ + rm -rf $@; \ + if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \ + mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \ + else \ + if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \ + rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \ + exit 1; \ + fi +$(srcdir)/netperf.info: netperf.texi netperf.dvi: netperf.texi netperf.pdf: netperf.texi -TEXI2DVI = texi2dvi - -TEXI2PDF = $(TEXI2DVI) --pdf --batch -DVIPS = dvips .dvi.ps: + TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ $(DVIPS) -o $@ $< +uninstall-dvi-am: + @$(NORMAL_UNINSTALL) + @list='$(DVIS)'; test -n "$(dvidir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \ + rm -f "$(DESTDIR)$(dvidir)/$$f"; \ + done + +uninstall-html-am: + @$(NORMAL_UNINSTALL) + @list='$(HTMLS)'; test -n "$(htmldir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \ + rm -rf "$(DESTDIR)$(htmldir)/$$f"; \ + done + uninstall-info-am: - $(PRE_UNINSTALL) - @if (install-info --version && \ + @$(PRE_UNINSTALL) + @if test -d '$(DESTDIR)$(infodir)' && \ + (install-info --version && \ install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \ list='$(INFO_DEPS)'; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ - echo " install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$relfile"; \ - install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$relfile; \ + echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \ + if install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \ + then :; else test ! -f "$(DESTDIR)$(infodir)/$$relfile" || exit 1; fi; \ done; \ else :; fi @$(NORMAL_UNINSTALL) @@ -216,28 +362,57 @@ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \ - (if cd $(DESTDIR)$(infodir); then \ - echo " rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9])"; \ + (if test -d "$(DESTDIR)$(infodir)" && cd "$(DESTDIR)$(infodir)"; then \ + echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \ rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \ else :; fi); \ done +uninstall-pdf-am: + @$(NORMAL_UNINSTALL) + @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \ + rm -f "$(DESTDIR)$(pdfdir)/$$f"; \ + done + +uninstall-ps-am: + @$(NORMAL_UNINSTALL) + @list='$(PSS)'; test -n "$(psdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \ + rm -f "$(DESTDIR)$(psdir)/$$f"; \ + done + dist-info: $(INFO_DEPS) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ list='$(INFO_DEPS)'; \ for base in $$list; do \ + case $$base in \ + $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \ + esac; \ if test -f $$base; then d=.; else d=$(srcdir); fi; \ - for file in $$d/$$base*; do \ - relfile=`expr "$$file" : "$$d/\(.*\)"`; \ - test -f $(distdir)/$$relfile || \ - cp -p $$file $(distdir)/$$relfile; \ + base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \ + for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \ + if test -f $$file; then \ + relfile=`expr "$$file" : "$$d/\(.*\)"`; \ + test -f "$(distdir)/$$relfile" || \ + cp -p $$file "$(distdir)/$$relfile"; \ + else :; fi; \ done; \ done mostlyclean-aminfo: - -rm -f netperf.aux netperf.cp netperf.cps netperf.fn netperf.fns netperf.ky \ - netperf.kys netperf.log netperf.pg netperf.pgs netperf.tmp \ - netperf.toc netperf.tp netperf.tps netperf.vr netperf.vrs \ - netperf.dvi netperf.pdf netperf.ps + -rm -rf netperf.aux netperf.cp netperf.cps netperf.fn netperf.fns \ + netperf.ky netperf.kys netperf.log netperf.pg netperf.pgs \ + netperf.tmp netperf.toc netperf.tp netperf.tps netperf.vr \ + netperf.vrs + +clean-aminfo: + -test -z "netperf.dvi netperf.pdf netperf.ps netperf.html" \ + || rm -rf netperf.dvi netperf.pdf netperf.ps netperf.html maintainer-clean-aminfo: @list='$(INFO_DEPS)'; for i in $$list; do \ @@ -245,53 +420,40 @@ echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \ rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \ done - -man1dir = $(mandir)/man1 -install-man1: $(man1_MANS) $(man_MANS) +install-man1: $(man1_MANS) @$(NORMAL_INSTALL) - $(mkinstalldirs) $(DESTDIR)$(man1dir) - @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.1*) list="$$list $$i" ;; \ - esac; \ + test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" + @list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \ + { for i in $$list; do echo "$$i"; done; \ + } | while read p; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; echo "$$p"; \ + done | \ + sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ + sed 'N;N;s,\n, ,g' | { \ + list=; while read file base inst; do \ + if test "$$base" = "$$inst"; then list="$$list $$file"; else \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ + fi; \ done; \ - for i in $$list; do \ - if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ - else file=$$i; fi; \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 1*) ;; \ - *) ext='1' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \ - $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \ - done + for i in $$list; do echo "$$i"; done | $(am__base_list) | \ + while read files; do \ + test -z "$$files" || { \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ + done; } + uninstall-man1: @$(NORMAL_UNINSTALL) - @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.1*) list="$$list $$i" ;; \ - esac; \ - done; \ - for i in $$list; do \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 1*) ;; \ - *) ext='1' ;; \ - esac; \ - inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ - inst=`echo $$inst | sed -e 's/^.*\///'`; \ - inst=`echo $$inst | sed '$(transform)'`.$$ext; \ - echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \ - rm -f $(DESTDIR)$(man1dir)/$$inst; \ - done + @list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \ + files=`{ for i in $$list; do echo "$$i"; done; \ + } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ + -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ + test -z "$$files" || { \ + echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. @@ -300,7 +462,13 @@ # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): - @set fnord $$MAKEFLAGS; amf=$$2; \ + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ @@ -311,16 +479,21 @@ else \ local_target="$$target"; \ fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -mostlyclean-recursive clean-recursive distclean-recursive \ -maintainer-clean-recursive: - @set fnord $$MAKEFLAGS; amf=$$2; \ +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ @@ -340,123 +513,150 @@ else \ local_target="$$target"; \ fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done -ETAGS = etags -ETAGSFLAGS = - -CTAGS = ctags -CTAGSFLAGS = - -tags: TAGS - ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique +tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ + set x; \ here=`pwd`; \ - if (etags --etags-include --version) >/dev/null 2>&1; then \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ + empty_fix=.; \ else \ include_option=--include; \ + empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -f $$subdir/TAGS && \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(ETAGS_ARGS)$$tags$$unique" \ - || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique - + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - -top_distdir = .. -distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + @list='$(MANS)'; if test -n "$$list"; then \ + list=`for p in $$list; do \ + if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ + if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ + if test -n "$$list" && \ + grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ + echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ + grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ + echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ + echo " typically \`make maintainer-clean' will remove them" >&2; \ + exit 1; \ + else :; fi; \ + else :; fi + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkinstalldirs) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done - list='$(SUBDIRS)'; for subdir in $$list; do \ + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d $(distdir)/$$subdir \ - || mkdir $(distdir)/$$subdir \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ - (cd $$subdir && \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" \ - distdir=../$(distdir)/$$subdir \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ @@ -469,8 +669,9 @@ all-am: Makefile $(INFO_DEPS) $(MANS) installdirs: installdirs-recursive installdirs-am: - $(mkinstalldirs) $(DESTDIR)$(infodir) $(DESTDIR)$(man1dir) - + for dir in "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive @@ -491,14 +692,15 @@ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive -clean-am: clean-generic mostlyclean-am +clean-am: clean-aminfo clean-generic mostlyclean-am distclean: distclean-recursive -rm -f Makefile @@ -508,44 +710,116 @@ dvi-am: $(DVIS) +html: html-recursive + +html-am: $(HTMLS) + info: info-recursive info-am: $(INFO_DEPS) install-data-am: install-info-am install-man +install-dvi: install-dvi-recursive + +install-dvi-am: $(DVIS) + @$(NORMAL_INSTALL) + test -z "$(dvidir)" || $(MKDIR_P) "$(DESTDIR)$(dvidir)" + @list='$(DVIS)'; test -n "$(dvidir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dvidir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(dvidir)" || exit $$?; \ + done install-exec-am: +install-html: install-html-recursive + +install-html-am: $(HTMLS) + @$(NORMAL_INSTALL) + test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)" + @list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \ + for p in $$list; do \ + if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \ + $(am__strip_dir) \ + if test -d "$$d$$p"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \ + $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \ + echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \ + $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \ + else \ + list2="$$list2 $$d$$p"; \ + fi; \ + done; \ + test -z "$$list2" || { echo "$$list2" | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \ + done; } install-info: install-info-recursive install-info-am: $(INFO_DEPS) @$(NORMAL_INSTALL) - $(mkinstalldirs) $(DESTDIR)$(infodir) - @list='$(INFO_DEPS)'; \ + test -z "$(infodir)" || $(MKDIR_P) "$(DESTDIR)$(infodir)" + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \ for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + esac; \ if test -f $$file; then d=.; else d=$(srcdir); fi; \ file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \ for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \ - $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \ + $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \ if test -f $$ifile; then \ - relfile=`echo "$$ifile" | sed 's|^.*/||'`; \ - echo " $(INSTALL_DATA) $$ifile $(DESTDIR)$(infodir)/$$relfile"; \ - $(INSTALL_DATA) $$ifile $(DESTDIR)$(infodir)/$$relfile; \ + echo "$$ifile"; \ else : ; fi; \ done; \ - done + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; done @$(POST_INSTALL) @if (install-info --version && \ install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \ - list='$(INFO_DEPS)'; \ + list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ - echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$relfile";\ - install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$relfile || :;\ + echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\ + install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\ done; \ else : ; fi install-man: install-man1 +install-pdf: install-pdf-recursive + +install-pdf-am: $(PDFS) + @$(NORMAL_INSTALL) + test -z "$(pdfdir)" || $(MKDIR_P) "$(DESTDIR)$(pdfdir)" + @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pdfdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(pdfdir)" || exit $$?; done +install-ps: install-ps-recursive + +install-ps-am: $(PSS) + @$(NORMAL_INSTALL) + test -z "$(psdir)" || $(MKDIR_P) "$(DESTDIR)$(psdir)" + @list='$(PSS)'; test -n "$(psdir)" || list=; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(psdir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(psdir)" || exit $$?; done installcheck-am: maintainer-clean: maintainer-clean-recursive @@ -565,29 +839,29 @@ ps-am: $(PSS) -uninstall-am: uninstall-info-am uninstall-man - -uninstall-info: uninstall-info-recursive +uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \ + uninstall-man uninstall-pdf-am uninstall-ps-am uninstall-man: uninstall-man1 -.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \ - clean-generic clean-recursive ctags ctags-recursive dist-info \ - distclean distclean-generic distclean-recursive distclean-tags \ - distdir dvi dvi-am dvi-recursive info info-am info-recursive \ - install install-am install-data install-data-am \ - install-data-recursive install-exec install-exec-am \ - install-exec-recursive install-info install-info-am \ - install-info-recursive install-man install-man1 \ - install-recursive install-strip installcheck installcheck-am \ - installdirs installdirs-am installdirs-recursive \ - maintainer-clean maintainer-clean-aminfo \ - maintainer-clean-generic maintainer-clean-recursive mostlyclean \ - mostlyclean-aminfo mostlyclean-generic mostlyclean-recursive \ - pdf pdf-am pdf-recursive ps ps-am ps-recursive tags \ - tags-recursive uninstall uninstall-am uninstall-info-am \ - uninstall-info-recursive uninstall-man uninstall-man1 \ - uninstall-recursive +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-aminfo clean-generic \ + ctags ctags-recursive dist-info distclean distclean-generic \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-man1 install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs installdirs-am maintainer-clean \ + maintainer-clean-aminfo maintainer-clean-generic mostlyclean \ + mostlyclean-aminfo mostlyclean-generic pdf pdf-am ps ps-am \ + tags tags-recursive uninstall uninstall-am uninstall-dvi-am \ + uninstall-html-am uninstall-info-am uninstall-man \ + uninstall-man1 uninstall-pdf-am uninstall-ps-am netperf.html: $(info_TEXINFOS) @@ -601,6 +875,7 @@ netperf.xml: $(info_TEXINFOS) $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) --xml -I $(srcdir) \ -o $@ `test -f '$<' || echo '$(srcdir)/'`$< + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff -Nru netperf-2.4.5/doc/netperf.info netperf-2.5.0/doc/netperf.info --- netperf-2.4.5/doc/netperf.info 2009-05-15 21:19:09.000000000 +0000 +++ netperf-2.5.0/doc/netperf.info 2011-07-15 23:20:00.000000000 +0000 @@ -1,10 +1,10 @@ -This is netperf.info, produced by makeinfo version 4.11 from +This is netperf.info, produced by makeinfo version 4.13 from netperf.texi. This is Rick Jones' feeble attempt at a Texinfo-based manual for the netperf benchmark. - Copyright (C) 2005-2007 Hewlett-Packard Company + Copyright (C) 2005-2011 Hewlett-Packard Company Permission is granted to copy, distribute and/or modify this document per the terms of the netperf source licence, a copy of @@ -20,7 +20,7 @@ This is Rick Jones' feeble attempt at a Texinfo-based manual for the netperf benchmark. - Copyright (C) 2005-2007 Hewlett-Packard Company + Copyright (C) 2005-2011 Hewlett-Packard Company Permission is granted to copy, distribute and/or modify this document per the terms of the netperf source licence, a copy of @@ -29,7 +29,8 @@ * Menu: -* Introduction:: An introduction to netperf - what it is and whatit is not. +* Introduction:: An introduction to netperf - what it +is and what it is not. * Installing Netperf:: How to go about installing netperf. * The Design of Netperf:: * Global Command-line Options:: @@ -37,6 +38,7 @@ * Using Netperf to Measure Request/Response :: * Using Netperf to Measure Aggregate Performance:: * Using Netperf to Measure Bidirectional Transfer:: +* The Omni Tests:: * Other Netperf Tests:: * Address Resolution:: * Enhancing Netperf:: @@ -44,79 +46,6 @@ * Concept Index:: * Option Index:: - --- The Detailed Node Listing --- - -Introduction - -* Conventions:: - -Installing Netperf - -* Getting Netperf Bits:: -* Installing Netperf Bits:: -* Verifying Installation:: - -The Design of Netperf - -* CPU Utilization:: - -Global Command-line Options - -* Command-line Options Syntax:: -* Global Options:: - -Using Netperf to Measure Bulk Data Transfer - -* Issues in Bulk Transfer:: -* Options common to TCP UDP and SCTP tests:: - -Options common to TCP UDP and SCTP tests - -* TCP_STREAM:: -* TCP_MAERTS:: -* TCP_SENDFILE:: -* UDP_STREAM:: -* XTI_TCP_STREAM:: -* XTI_UDP_STREAM:: -* SCTP_STREAM:: -* DLCO_STREAM:: -* DLCL_STREAM:: -* STREAM_STREAM:: -* DG_STREAM:: - -Using Netperf to Measure Request/Response - -* Issues in Request/Response:: -* Options Common to TCP UDP and SCTP _RR tests:: - -Options Common to TCP UDP and SCTP _RR tests - -* TCP_RR:: -* TCP_CC:: -* TCP_CRR:: -* UDP_RR:: -* XTI_TCP_RR:: -* XTI_TCP_CC:: -* XTI_TCP_CRR:: -* XTI_UDP_RR:: -* DLCL_RR:: -* DLCO_RR:: -* SCTP_RR:: - -Using Netperf to Measure Aggregate Performance - -* Running Concurrent Netperf Tests:: -* Using --enable-burst:: - -Using Netperf to Measure Bidirectional Transfer - -* Bidirectional Transfer with Concurrent Tests:: -* Bidirectional Transfer with TCP_RR:: - -Other Netperf Tests - -* CPU rate calibration:: -  File: netperf.info, Node: Introduction, Next: Installing Netperf, Prev: Top, Up: Top @@ -153,8 +82,6 @@ * Windows - * OpenVMS - * Others Netperf is maintained and informally supported primarily by Rick @@ -169,15 +96,18 @@ to netperf-feedback for possible inclusion into subsequent versions of netperf. - If you would prefer to make contributions to networking benchmark -using certified "open source" license, please considuer netperf4, which -is distributed under the terms of the GPL. + It is the Contributing Editor's belief that the netperf license walks +like open source and talks like open source. However, the license was +never submitted for "certification" as an open source license. If you +would prefer to make contributions to a networking benchmark using a +certified open source license, please consider netperf4, which is +distributed under the terms of the GPLv2. The netperf-talk mailing list is available to discuss the care and feeding of netperf with others who share your interest in network performance benchmarking. The -netperf-talk mailing list is a closed list and you must first subscribe -by sending email to netperf-talk-request +netperf-talk mailing list is a closed list (to deal with spam) and you +must first subscribe by sending email to netperf-talk-request . * Menu: @@ -292,11 +222,12 @@ The bits corresponding to each discrete release of netperf are tagged (http://www.netperf.org/svn/netperf2/tags) for retrieval via subversion. For example, there is a tag for the first version -corresponding to this version of the manual - netperf 2.4.3 -(http://www.netperf.org/svn/netperf2/tags/netperf-2.4.3). Those +corresponding to this version of the manual - netperf 2.5.0 +(http://www.netperf.org/svn/netperf2/tags/netperf-2.5.0). Those wishing to be on the bleeding edge of netperf development can use subversion to grab the top of trunk -(http://www.netperf.org/svn/netperf2/trunk). +(http://www.netperf.org/svn/netperf2/trunk). When fixing bugs or +making enhancements, patches against the top-of-trunk are preferred. There are likely other places around the Internet from which one can download netperf bits. These may be simple mirrors of the main netperf @@ -309,8 +240,7 @@ distributed from ftp.netperf.org. From time to time a kind soul or souls has packaged netperf as a Debian package available via the apt-get mechanism or as an RPM. I would be most interested in learning -how to enhance the makefiles to make that easier for people, and -perhaps to generate HP-UX swinstall"depots." +how to enhance the makefiles to make that easier for people.  File: netperf.info, Node: Installing Netperf Bits, Next: Verifying Installation, Prev: Getting Netperf Bits, Up: Installing Netperf @@ -323,8 +253,8 @@ directory, run configure and then make. Most of the time it should be sufficient to just: - gzcat .tar.gz | tar xf - - cd + gzcat netperf-.tar.gz | tar xf - + cd netperf- ./configure make make install @@ -332,7 +262,9 @@ Most of the "usual" configure script options should be present dealing with where to install binaries and whatnot. ./configure --help - should list all of those and more. + should list all of those and more. You may find the `--prefix' +option helpful in deciding where the binaries and such will be put +during the `make install'. If the netperf configure script does not know how to automagically detect which CPU utilization mechanism to use on your platform you may @@ -342,9 +274,30 @@ Similarly, if you want tests using the XTI interface, Unix Domain Sockets, DLPI or SCTP it will be necessary to add one or more -`--enable-[xti|unix|dlpi|sctp]=yes' options to the configure command. -As of this writing, the configure script will not include those tests -automagically. +`--enable-[xti|unixdomain|dlpi|sctp]=yes' options to the configure +command. As of this writing, the configure script will not include +those tests automagically. + + Starting with version 2.5.0, netperf is migrating most of the +"classic" netperf tests found in `src/nettest_bsd.c' to the so-called +"omni" tests (aka "two routines to run them all") found in +`src/nettest_omni.c'. This migration enables a number of new features +such as greater control over what output is included, and new things to +output. The "omni" test is enabled by default in 2.5.0 and a number of +the classic tests are migrated - you can tell if a test has been +migrated from the presence of `MIGRATED' in the test banner. If you +encounter problems with either the omni or migrated tests, please first +attempt to obtain resolution via or +. If that is unsuccessful, you can add a +`--enable-omni=no' to the configure command and the omni tests will not +be compiled-in and the classic tests will not be migrated. + + Starting with version 2.5.0, netperf will include the "burst mode" +functionality in a default compilation of the bits. If you encounter +problems with this, please first attempt to obtain help via + or . If that +is unsuccessful, you can add a `--enable-burst=no' to the configure +command and the burst mode functionality will nt be compiled-in. On some platforms, it may be necessary to precede the configure command with a CFLAGS and/or LIBS variable as the netperf configure @@ -386,11 +339,6 @@ >100_SECS: 0 HIST_TOTAL: 35391 - Long-time users of netperf will notice the expansion of the main test -header. This stems from the merging-in of IPv6 with the standard IPv4 -tests and the addition of code to specify addressing information for -both sides of the data connection. - The histogram you see above is basically a base-10 log histogram where we can see that most of the transaction times were on the order of one hundred to one-hundred, ninety-nine microseconds, but they were @@ -399,30 +347,42 @@ The `--enable-demo=yes' configure option will cause code to be included to report interim results during a test run. The rate at which interim results are reported can then be controlled via the -global `-D' option. Here is an example of -enable-demo mode output: +global `-D' option. Here is an example of `-D' output: - src/netperf -D 1.35 -H lag -f M - TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to lag.hpl.hp.com (15.4.89.214) port 0 AF_INET : demo - Interim result: 9.66 MBytes/s over 1.67 seconds - Interim result: 9.64 MBytes/s over 1.35 seconds - Interim result: 9.58 MBytes/s over 1.36 seconds - Interim result: 9.51 MBytes/s over 1.36 seconds - Interim result: 9.71 MBytes/s over 1.35 seconds - Interim result: 9.66 MBytes/s over 1.36 seconds - Interim result: 9.61 MBytes/s over 1.36 seconds + $ src/netperf -D 1.35 -H tardy.hpl.hp.com -f M + MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to tardy.hpl.hp.com (15.9.116.144) port 0 AF_INET : demo + Interim result: 5.41 MBytes/s over 1.35 seconds ending at 1308789765.848 + Interim result: 11.07 MBytes/s over 1.36 seconds ending at 1308789767.206 + Interim result: 16.00 MBytes/s over 1.36 seconds ending at 1308789768.566 + Interim result: 20.66 MBytes/s over 1.36 seconds ending at 1308789769.922 + Interim result: 22.74 MBytes/s over 1.36 seconds ending at 1308789771.285 + Interim result: 23.07 MBytes/s over 1.36 seconds ending at 1308789772.647 + Interim result: 23.77 MBytes/s over 1.37 seconds ending at 1308789774.016 Recv Send Send Socket Socket Message Elapsed Size Size Size Time Throughput bytes bytes bytes secs. MBytes/sec - 32768 16384 16384 10.00 9.61 + 87380 16384 16384 10.06 17.81 Notice how the units of the interim result track that requested by the `-f' option. Also notice that sometimes the interval will be longer than the value specified in the `-D' option. This is normal and -stems from how demo mode is implemented without relying on interval -timers, but by calculating how many units of work must be performed to -take at least the desired interval. +stems from how demo mode is implemented not by relying on interval +timers or frequent calls to get the current time, but by calculating +how many units of work must be performed to take at least the desired +interval. + + Those familiar with this option in earlier versions of netperf will +note the addition of the "ending at" text. This is the time as +reported by a `gettimeofday()' call (or its emulation) with a `NULL' +timezone pointer. This addition is intended to make it easier to +insert interim results into an rrdtool +(http://oss.oetiker.ch/rrdtool/doc/rrdtool.en.html) Round-Robin +Database (RRD). A likely bug-riddled example of doing so can be found +in `doc/examples/netperf_interim_to_rrd.sh'. The time is reported out +to milliseconds rather than microseconds because that is the most +rrdtool understands as of the time of this writing. As of this writing, a `make install' will not actually update the files `/etc/services' and/or `/etc/inetd.conf' or their @@ -474,13 +434,15 @@ Netperf is designed around a basic client-server model. There are two executables - netperf and netserver. Generally you will only execute the netperf program, with the netserver program being invoked by the -remote system's inetd or equivalent. When you execute netperf, the -first that that will happen is the establishment of a control -connection to the remote system. This connection will be used to pass -test configuration information and results to and from the remote -system. Regardless of the type of test to be run, the control -connection will be a TCP connection using BSD sockets. The control -connection can use either IPv4 or IPv6. +remote system's inetd or having been previously started as its own +standalone daemon. + + When you execute netperf it will establish a "control connection" to +the remote system. This connection will be used to pass test +configuration information and results to and from the remote system. +Regardless of the type of test to be run, the control connection will +be a TCP connection using BSD sockets. The control connection can use +either IPv4 or IPv6. Once the control connection is up and the configuration information has been passed, a separate "data" connection will be opened for the @@ -508,9 +470,10 @@ CPU utilization is an important, and alas all-too infrequently reported component of networking performance. Unfortunately, it can be one of -the most difficult metrics to measure accurately as many systems offer -mechanisms that are at best il-suited to measuring CPU utilization in -high interrupt rate (eg networking) situations. +the most difficult metrics to measure accurately and portably. Netperf +will do its level best to report accurate CPU utilization figures, but +some combinations of processor, OS and configuration may make that +difficult. CPU utilization in netperf is reported as a value between 0 and 100% regardless of the number of CPUs involved. In addition to CPU @@ -523,7 +486,7 @@ Service demand can be particularly useful when trying to gauge the effect of a performance change. It is essentially a measure of -efficiency, with smaller values being more efficient. +efficiency, with smaller values being more efficient and thus "better." Netperf is coded to be able to use one of several, generally platform-specific CPU utilization measurement mechanisms. Single @@ -557,7 +520,7 @@ `P' An HP-UX-specific CPU utilization mechanism whereby the kernel keeps-track of time (in the form of CPU cycles) spent in the kernel - idle loop (HP-UX 10.0 to 11.23 inclusive), or where the kernel + idle loop (HP-UX 10.0 to 11.31 inclusive), or where the kernel keeps track of time spent in idle, user, kernel and interrupt processing (HP-UX 11.23 and later). The former requires calibration, the latter does not. Values in either case are @@ -566,14 +529,14 @@ `src/netcpu_pstat.c' and `src/netcpu_pstatnew.c' respectively. `K' - A Solaris-specific CPU utilization mechanism where by the kernel + A Solaris-specific CPU utilization mechanism whereby the kernel keeps track of ticks (eg HZ) spent in the idle loop. This method is statistical and is known to be inaccurate when the interrupt rate is above epsilon as time spent processing interrupts is not subtracted from idle. The value is retrieved via a kstat() call - hence the use of the letter `K'. Since this mechanism uses units of ticks (HZ) the calibration value should invariably match HZ. - (Eg 100) The code for this mechanism is implemented in + (Eg 100) The code for this mechanism is implemented in `src/netcpu_kstat.c'. `M' @@ -605,9 +568,9 @@ what appears to be a form of micro-state accounting and requires no calibration. On laptops, or other systems which may dynamically alter the CPU frequency to minimize power consumtion, it has been - suggested that this mechanism may become slightly confsed, in - which case using BIOS settings to disable the power saving would - be indicated. + suggested that this mechanism may become slightly confused, in + which case using BIOS/uEFI settings to disable the power saving + would be indicated. `S' This mechanism uses `/proc/stat' on Linux to retrieve time (ticks) @@ -625,7 +588,7 @@ using the times() and getrusage() calls. These calls are actually rather poorly suited to the task of measuring CPU overhead for networking as they tend to be process-specific and much - network-related processing can happen outside the context of a + network-related processing can happen outside the context of a process, in places where it is not a given it will be charged to the correct, or even a process. They are mentioned here as a warning to anyone seeing those mechanisms used in other networking @@ -652,11 +615,11 @@ In fact, time spent in the processing of interrupts is a common issue for many CPU utilization mechanisms. In particular, the "PSTAT" mechanism was eventually known to have problems accounting for certain -interrupt time prior to HP-UX 11.11 (11iv1). HP-UX 11iv1 and later are -known to be good. The "KSTAT" mechanism is known to have problems on -all versions of Solaris up to and including Solaris 10. Even the -microstate accounting available via kstat in Solaris 10 has issues, -though perhaps not as bad as those of prior versions. +interrupt time prior to HP-UX 11.11 (11iv1). HP-UX 11iv2 and later are +known/presumed to be good. The "KSTAT" mechanism is known to have +problems on all versions of Solaris up to and including Solaris 10. +Even the microstate accounting available via kstat in Solaris 10 has +issues, though perhaps not as bad as those of prior versions. The /proc/stat mechanism under Linux is in what the author would consider an "uncertain" category as it appears to be statistical, which @@ -666,6 +629,40 @@ with other mechanisms. However, platform tools such as top, vmstat or mpstat are often based on the same mechanisms used by netperf. +* Menu: + +* CPU Utilization in a Virtual Guest:: + + +File: netperf.info, Node: CPU Utilization in a Virtual Guest, Prev: CPU Utilization, Up: CPU Utilization + +3.1.1 CPU Utilization in a Virtual Guest +---------------------------------------- + +The CPU utilization mechanisms used by netperf are "inline" in that +they are run by the same netperf or netserver process as is running the +test itself. This works just fine for "bare iron" tests but runs into +a problem when using virtual machines. + + The relationship between virtual guest and hypervisor can be thought +of as being similar to that between a process and kernel in a bare iron +system. As such, (m)any CPU utilization mechanisms used in the virtual +guest are similar to "process-local" mechanisms in a bare iron +situation. However, just as with bare iron and process-local +mechanisms, much networking processing happens outside the context of +the virtual guest. It takes place in the hypervisor, and is not +visible to mechanisms running in the guest(s). For this reason, one +should not really trust CPU utilization figures reported by netperf or +netserver when running in a virtual guest. + + If one is looking to measure the added overhead of a virtualization +mechanism, rather than rely on CPU utilization, one can rely instead on +netperf _RR tests - path-lengths and overheads can be a significant +fraction of the latency, so increases in overhead should appear as +decreases in transaction rate. Whatever you do, DO NOT rely on the +throughput of a _STREAM test. Achieving link-rate can be done via a +multitude of options that mask overhead rather than eliminate it. +  File: netperf.info, Node: Global Command-line Options, Next: Using Netperf to Measure Bulk Data Transfer, Prev: The Design of Netperf, Up: Top @@ -691,7 +688,8 @@ Revision 1.8 of netperf introduced enough new functionality to overrun the English alphabet for mnemonic command-line option names, and the author was not and is not quite ready to switch to the contemporary -`--mumble' style of command-line options. (Call him a Luddite). +`--mumble' style of command-line options. (Call him a Luddite if you +wish :). For this reason, the command-line options were split into two parts - the first are the global command-line options. They are options that @@ -777,12 +775,14 @@ take at least INTERVAL seconds. If omitted, INTERVAL defaults to one second and UNITS to values specific to each test type. -`-f G|M|K|g|m|k' +`-f G|M|K|g|m|k|x' This option can be used to change the reporting units for _STREAM tests. Arguments of "G," "M," or "K" will set the units to 2^30, 2^20 or 2^10 bytes/s respectively (EG power of two GB, MB or KB). Arguments of "g," ",m" or "k" will set the units to 10^9, 10^6 or - 10^3 bits/s respectively. [Default: 'm' or 10^6 bits/s] + 10^3 bits/s respectively. An argument of "x" requests the units + be transactions per second and is only meaninful for a + request-response test. [Default: "m" or 10^6 bits/s] `-F ' This option specified the file from which send which buffers will @@ -794,19 +794,20 @@ compressibility and so is useful when measuring performance over mechanisms which perform compression. - While optional for most tests, this option is required for a test - utilizing the sendfile() or related calls because sendfile tests - need a name of a file to reference. + While previously required for a TCP_SENDFILE test, later versions + of netperf removed that restriction, creating a temporary file as + needed. While the author cannot recall exactly when that took + place, it is known to be unnecessary in version 2.5.0 and later. `-h' - This option causes netperf to display its usage string and exit to - the exclusion of all else. + This option causes netperf to display its "global" usage string and + exit to the exclusion of all else. `-H ' This option will set the name of the remote system and or the address family used for the control connection. For example: -H linger,4 - will set the name of the remote system to "tardy" and tells + will set the name of the remote system to "linger" and tells netperf to use IPv4 addressing only. -H ,6 will leave the name of the remote system at its default, and @@ -839,7 +840,7 @@ `-I ' This option enables the calculation of confidence intervals and - sets the confidence and width parameters with the first have of the + sets the confidence and width parameters with the first half of the optionspec being either 99 or 95 for 99% or 95% confidence respectively. The second value of the optionspec specifies the width of the desired confidence interval. For example @@ -850,9 +851,9 @@ is omitted, the confidence defaults to 99% and the width to 5% (giving +/- 2.5%) - If netperf calculates that the desired confidence intervals have - not been met, it emits a noticeable warning that cannot be - suppressed with the `-P' or `-v' options: + If classic netperf test calculates that the desired confidence + intervals have not been met, it emits a noticeable warning that + cannot be suppressed with the `-P' or `-v' options: netperf -H tardy.cup -i 3 -I 99,5 TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to tardy.cup.hp.com (15.244.44.58) port 0 AF_INET : +/-2.5% 99% conf. @@ -871,12 +872,20 @@ 32768 16384 16384 10.01 40.23 - Where we see that netperf did not meet the desired convidence - intervals. Instead of being 99% confident it was within +/- 2.5% - of the real mean value of throughput it is only confident it was - within +/-3.4%. In this example, increasing the `-i' option - (described below) and/or increasing the iteration length with the - `-l' option might resolve the situation. + In the example above we see that netperf did not meet the desired + convidence intervals. Instead of being 99% confident it was within + +/- 2.5% of the real mean value of throughput it is only confident + it was within +/-3.4%. In this example, increasing the `-i' + option (described below) and/or increasing the iteration length + with the `-l' option might resolve the situation. + + In an explicit "omni" test, failure to meet the confidence + intervals will not result in netperf emitting a warning. To + verify the hitting, or not, of the confidence intervals one will + need to include them as part of an an *note output selection: Omni + Output Selection. in the test-specific `-o', `-O' or `k' output + selection options. The warning about not hitting the confidence + intervals will remain in a "migrated" classic netperf test. `-i ' This option enables the calculation of confidence intervals and @@ -887,18 +896,60 @@ at 30 and the minimum is silently floored at 3. Netperf repeats the measurement the minimum number of iterations and continues until it reaches either the desired confidence interval, or the - maximum number of iterations, whichever comes first. + maximum number of iterations, whichever comes first. A classic or + migrated netperf test will not display the actual number of + iterations run. An *note omni test: The Omni Tests. will emit the + number of iterations run if the `CONFIDENCE_ITERATION' output + selector is included in the *note output selection: Omni Output + Selection. If the `-I' option is specified and the `-i' option omitted the maximum number of iterations is set to 10 and the minimum to three. - If netperf determines that the desired confidence intervals have - not been met, it emits a noticeable warning. + Output of a warning upon not hitting the desired confidence + intervals follows the description provided for the `-I' option. The total test time will be somewhere between the minimum and maximum number of iterations multiplied by the test length supplied by the `-l' option. +`-j' + This option instructs netperf to keep additional timing statistics + when explicitly running an *note omni test: The Omni Tests. These + can be output when the test-specific `-o', `-O' or `-k' *note + output selectors: Omni Output Selectors. include one or more of: + + * MIN_LATENCY + + * MAX_LATENCY + + * P50_LATENCY + + * P90_LATENCY + + * P99_LATENCY + + * MEAN_LATENCY + + * STDDEV_LATENCY + + These statistics will be based on an expanded (100 buckets per row + rather than 10) histogram of times rather than a terribly long + list of individual times. As such, there will be some slight + error thanks to the bucketing. However, the reduction in storage + and processing overheads is well worth it. When running a + request/response test, one might get some idea of the error by + comparing the *note `MEAN_LATENCY': Omni Output Selectors. + calculated from the histogram with the `RT_LATENCY' calculated + from the number of request/response transactions and the test run + time. + + In the case of a request/response test the latencies will be + transaction latencies. In the case of a receive-only test they + will be time spent in the receive call. In the case of a + send-only test they will be tim spent in the send call. The units + will be microseconds. Added in netperf 2.5.0. + `-l testlen' This option controls the length of any one iteration of the requested test. A positive value for TESTLEN will run each @@ -906,7 +957,8 @@ value for TESTLEN will run each iteration for the absolute value of TESTLEN transactions for a _RR test or bytes for a _STREAM test. Certain tests, notably those using UDP can only be timed, they - cannot be limited by transaction or byte count. + cannot be limited by transaction or byte count. This limitation + may be relaxed in an *note omni: The Omni Tests. test. In some situations, individual iterations of a test may run for longer for the number of seconds specified by the `-l' option. In @@ -944,6 +996,11 @@ automagically determine the number of CPUs that can only be set for netserver via a netserver `-n' command-line option. + As it is almost universally possible for netperf/netserver to + determine the number of CPUs on the system automagically, 99 times + out of 10 this option should not be necessary and may be removed + in a future release of netperf. + `-N' This option tells netperf to forego establishing a control connection. This makes it is possible to run some limited netperf @@ -967,8 +1024,8 @@ specified, it is not possible to set "remote" properties such as socket buffer size and the like via the netperf command line. Nor is it possible to retrieve such interesting remote information as - CPU utilization. These items will be set to values which when - displayed should make it immediately obvious that was the case. + CPU utilization. These items will be displayed as values which + should make it immediately obvious that was the case. The only way to change remote characteristics such as socket buffer size or to obtain information such as CPU utilization is to employ @@ -985,13 +1042,14 @@ added to the alignment specified with the `-a' option. For example: -o 3 -a 4096 - will cause the buffers passed to the local send and receive calls - to begin three bytes past an address aligned to 4096 bytes. - [Default: 0 bytes] + will cause the buffers passed to the local (netperf) send and + receive calls to begin three bytes past an address aligned to 4096 + bytes. [Default: 0 bytes] `-O ' This option behaves just as the `-o' option but on the remote - system and in conjunction with the `-A' option. [Default: 0 bytes] + (netserver) system and in conjunction with the `-A' option. + [Default: 0 bytes] `-p ' The first value of the optionspec passed-in with this option tells @@ -1022,6 +1080,25 @@ and unnecessarily clutter the output. [Default: 1 - display test banners] +`-s ' + This option will cause netperf to sleep `' before + actually transferring data over the data connection. This may be + useful in situations where one wishes to start a great many netperf + instances and do not want the earlier ones affecting the ability of + the later ones to get established. + + Added somewhere between versions 2.4.3 and 2.5.0. + +`-S' + This option will cause an attempt to be made to set SO_KEEPALIVE on + the data socket of a test using the BSD sockets interface. The + attempt will be made on the netperf side of all tests, and will be + made on the netserver side of an *note omni: The Omni Tests. or + *note migrated: Migrated Tests. test. No indication of failure is + given unless debug output is enabled with the global `-d' option. + + Added in version 2.5.0. + `-t testname' This option is used to tell netperf which test you wish to run. As of this writing, valid values for TESTNAME include: @@ -1042,15 +1119,35 @@ * *note LOC_CPU: Other Netperf Tests, *note REM_CPU: Other Netperf Tests. + + * *note OMNI: The Omni Tests. Not all tests are always compiled into netperf. In particular, the - "XTI," "SCTP," "UNIX," and "DL*" tests are only included in - netperf when configured with `--enable-[xti|sctp|unix|dlpi]=yes'. + "XTI," "SCTP," "UNIXDOMAIN," and "DL*" tests are only included in + netperf when configured with + `--enable-[xti|sctp|unixdomain|dlpi]=yes'. Netperf only runs one type of test no matter how many `-t' options may be present on the command-line. The last `-t' global command-line option will determine the test to be run. [Default: TCP_STREAM] +`-T ' + This option controls the CPU, and probably by extension memory, + affinity of netperf and/or netserver. + netperf -T 1 + will bind both netperf and netserver to "CPU 1" on their respective + systems. + netperf -T 1, + will bind just netperf to "CPU 1" and will leave netserver unbound. + netperf -T ,2 + will leave netperf unbound and will bind netserver to "CPU 2." + netperf -T 1,2 + will bind netperf to "CPU 1" and netserver to "CPU 2." + + This can be particularly useful when investigating performance + issues involving where processes run relative to where NIC + interrupts are processed or where NICs allocate their DMA buffers. + `-v verbosity' This option controls how verbose netperf will be in its output, and is often used in conjunction with the `-P' option. If the @@ -1073,6 +1170,17 @@ call or for each transaction if netperf was configured with `--enable-histogram=yes'. [Default: 1 - normal verbosity] + In an *note omni: The Omni Tests. test the verbosity setting is + largely ignored, save for when asking for the time histogram to be + displayed. In version 2.5.0 there is no *note output selector: + Omni Output Selectors. for the histogram and so it remains + displayed only when the verbosity level is set to 2. + +`-V' + This option displays the netperf version and then exits. + + Added in netperf 2.4.4. + `-w time' If netperf was configured with `--enable-intervals=yes' then this value will set the inter-burst time to time milliseconds, and the @@ -1116,8 +1224,8 @@ The most commonly measured aspect of networked system performance is that of bulk or unidirectional transfer performance. Everyone wants to know how many bits or bytes per second they can push across the -network. The netperf convention for a bulk data transfer test name is -to tack a "_STREAM" suffix to a test name. +network. The classic netperf convention for a bulk data transfer test +name is to tack a "_STREAM" suffix to a test name. * Menu: @@ -1152,7 +1260,8 @@ of a netperf _STREAM test cannot make use of much more than the power of one CPU. Exceptions to this generally occur when netperf and/or netserver run on CPU(s) other than the CPU(s) taking interrupts from -the NIC(s). +the NIC(s). In that case, one might see as much as two CPUs' worth of +processing being used to service the flow of data. Distance and the speed-of-light can affect performance for a bulk-transfer; often this can be mitigated by using larger windows. @@ -1188,12 +1297,26 @@ netstat -p tcp > after is indicated. The beforeafter (ftp://ftp.cup.hp.com/dist/networking/tools/) utility can be used to -subtract the statistics in `before' from the statistics in `after' +subtract the statistics in `before' from the statistics in `after': beforeafter before after > delta and then one can look at the statistics in `delta'. Beforeafter is -distributed in source form so one can compile it on the platofrm(s) of +distributed in source form so one can compile it on the platform(s) of interest. + If running a version 2.5.0 or later "omni" test under Linux one can +include either or both of: + * LOCAL_TRANSPORT_RETRANS + + * REMOTE_TRANSPORT_RETRANS + + in the values provided via a test-specific `-o', `-O', or `-k' +output selction option and netperf will report the retransmissions +experienced on the data connection, as reported via a +`getsockopt(TCP_INFO)' call. If confidence intervals have been +requested via the global `-I' or `-i' options, the reported value(s) +will be for the last iteration. If the test is over a protocol other +than TCP, or on a platform other than Linux, the results are undefined. + While it was written with HP-UX's netstat in mind, the annotated netstat (ftp://ftp.cup.hp.com/dist/networking/briefs/annotated_netstat.txt) @@ -1264,14 +1387,14 @@ Set the local and/or remote port numbers for the data connection. `-s ' - This option sets the local send and receive socket buffer sizes for - the data connection to the value(s) specified. Often, this will - affect the advertised and/or effective TCP or other window, but on - some platforms it may not. By default the units are bytes, but - suffix of "G," "M," or "K" will specify the units to be 2^30 (GB), - 2^20 (MB) or 2^10 (KB) respectively. A suffix of "g," "m" or "k" - will specify units of 10^9, 10^6 or 10^3 bytes respectively. For - example: + This option sets the local (netperf) send and receive socket buffer + sizes for the data connection to the value(s) specified. Often, + this will affect the advertised and/or effective TCP or other + window, but on some platforms it may not. By default the units are + bytes, but suffix of "G," "M," or "K" will specify the units to be + 2^30 (GB), 2^20 (MB) or 2^10 (KB) respectively. A suffix of "g," + "m" or "k" will specify units of 10^9, 10^6 or 10^3 bytes + respectively. For example: `-s 128K' Will request the local send and receive socket buffer sizes to be 128KB or 131072 bytes. @@ -1279,31 +1402,31 @@ While the historic expectation is that setting the socket buffer size has a direct effect on say the TCP window, today that may not hold true for all stacks. Further, while the historic expectation - is that the value specified in a setsockopt() call will be the - value returned via a getsockopt() call, at least one stack is + is that the value specified in a `setsockopt()' call will be the + value returned via a `getsockopt()' call, at least one stack is known to deliberately ignore history. When running under Windows a value of 0 may be used which will be an indication to the stack the user wants to enable a form of copy avoidance. [Default: -1 - use the system's default socket buffer sizes] `-S ' - This option sets the remote send and/or receive socket buffer sizes - for the data connection to the value(s) specified. Often, this - will affect the advertised and/or effective TCP or other window, - but on some platforms it may not. By default the units are bytes, - but suffix of "G," "M," or "K" will specify the units to be 2^30 - (GB), 2^20 (MB) or 2^10 (KB) respectively. A suffix of "g," "m" - or "k" will specify units of 10^9, 10^6 or 10^3 bytes respectively. - For example: + This option sets the remote (netserver) send and/or receive socket + buffer sizes for the data connection to the value(s) specified. + Often, this will affect the advertised and/or effective TCP or + other window, but on some platforms it may not. By default the + units are bytes, but suffix of "G," "M," or "K" will specify the + units to be 2^30 (GB), 2^20 (MB) or 2^10 (KB) respectively. A + suffix of "g," "m" or "k" will specify units of 10^9, 10^6 or 10^3 + bytes respectively. For example: `-s 128K' - Will request the local send and receive socket buffer sizes to be + Will request the remote send and receive socket buffer sizes to be 128KB or 131072 bytes. While the historic expectation is that setting the socket buffer size has a direct effect on say the TCP window, today that may not hold true for all stacks. Further, while the historic expectation - is that the value specified in a setsockopt() call will be the - value returned via a getsockopt() call, at least one stack is + is that the value specified in a `setsockopt()' call will be the + value returned via a `getsockopt()' call, at least one stack is known to deliberately ignore history. When running under Windows a value of 0 may be used which will be an indication to the stack the user wants to enable a form of copy avoidance. [Default: -1 - @@ -1404,9 +1527,14 @@ We see that the default receive socket buffer size for the receiver (lag - HP-UX 11.23) is 32768 bytes, and the default socket send buffer -size for the sender (Debian 2.6 kernel) is 16384 bytes. Througput is -expressed as 10^6 (aka Mega) bits per second, and the test ran for 10 -seconds. IPv4 addresses (AF_INET) were used. +size for the sender (Debian 2.6 kernel) is 16384 bytes, however Linux +does "auto tuning" of socket buffer and TCP window sizes, which means +the send socket buffer size may be different at the end of the test +than it was at the beginning. This is addressed in the *note omni +tests: The Omni Tests. added in version 2.5.0 and *note output +selection: Omni Output Selection. Througput is expressed as 10^6 (aka +Mega) bits per second, and the test ran for 10 seconds. IPv4 addresses +(AF_INET) were used.  File: netperf.info, Node: TCP_MAERTS, Next: TCP_SENDFILE, Prev: TCP_STREAM, Up: Options common to TCP UDP and SCTP tests @@ -1434,7 +1562,7 @@ 221184 131072 131072 10.03 81.14 Where we see that Linux, unlike HP-UX, may not return the same value -in a getsockopt() as was requested in the prior setsockopt(). +in a `getsockopt()' as was requested in the prior `setsockopt()'. This test is included more for benchmarking convenience than anything else. @@ -1462,12 +1590,14 @@ no opportunity to reserve space for headers and so a packet will be contained in two or more buffers. - The *note global `-F' option: Global Options. is required for this -test and it must specify a file of at least the size of the send ring -(*Note the global `-W' option: Global Options.) multiplied by the send -size (*Note the test-specific `-m' option: Options common to TCP UDP -and SCTP tests.). All other TCP-specific options are available and -optional. + As of some time before version 2.5.0, the *note global `-F' option: +Global Options. is no longer required for this test. If it is not +specified, netperf will create a temporary file, which it will delete +at the end of the test. If the `-F' option is specified it must +reference a file of at least the size of the send ring (*Note the +global `-W' option: Global Options.) multiplied by the send size (*Note +the test-specific `-m' option: Options common to TCP UDP and SCTP +tests.). All other TCP-specific options remain available and optional. In this first example: $ netperf -H lag -F ../src/netperf -t TCP_SENDFILE -- -s 128K -S 128K @@ -1477,7 +1607,7 @@ we see what happens when the file is too small. Here: - $ ../src/netperf -H lag -F /boot/vmlinuz-2.6.8-1-686 -t TCP_SENDFILE -- -s 128K -S 128K + $ netperf -H lag -F /boot/vmlinuz-2.6.8-1-686 -t TCP_SENDFILE -- -s 128K -S 128K TCP SENDFILE TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to lag.hpl.hp.com (15.4.89.214) port 0 AF_INET Recv Send Send Socket Socket Message Elapsed @@ -1692,8 +1822,8 @@ `tempnam()' call. The STREAM_STREAM test is only present if netperf was configured with -`--enable-unix=yes'. The remote netserver must have also been -configured with `--enable-unix=yes'. +`--enable-unixdomain=yes'. The remote netserver must have also been +configured with `--enable-unixdomain=yes'.  File: netperf.info, Node: DG_STREAM, Prev: STREAM_STREAM, Up: Options common to TCP UDP and SCTP tests @@ -1710,8 +1840,8 @@ DG_STREAM test. The DG_STREAM test is only present if netperf was configured with -`--enable-unix=yes'. The remote netserver must have also been -configured with `--enable-unix=yes'. +`--enable-unixdomain=yes'. The remote netserver must have also been +configured with `--enable-unixdomain=yes'.  File: netperf.info, Node: Using Netperf to Measure Request/Response, Next: Using Netperf to Measure Aggregate Performance, Prev: Using Netperf to Measure Bulk Data Transfer, Up: Top @@ -1721,30 +1851,35 @@ Request/response performance is often overlooked, yet it is just as important as bulk-transfer performance. While things like larger -socket buffers and TCP windows can cover a multitude of latency and -even path-length sins, they cannot easily hide from a request/response -test. The convention for a request/response test is to have a _RR -suffix. There are however a few "request/response" tests that have -other suffixes. +socket buffers and TCP windows, and stateless offloads like TSO and LRO +can cover a multitude of latency and even path-length sins, those sins +cannot easily hide from a request/response test. The convention for a +request/response test is to have a _RR suffix. There are however a few +"request/response" tests that have other suffixes. A request/response test, particularly synchronous, one transaction at -at time test such as those found in netperf, is particularly sensitive -to the path-length of the networking stack. An _RR test can also -uncover those platforms where the NIC's are strapped by default with -overbearing interrupt avoidance settings in an attempt to increase the -bulk-transfer performance (or rather, decrease the CPU utilization of a -bulk-transfer test). This sensitivity is most acute for small request -and response sizes, such as the single-byte default for a netperf _RR -test. +at time test such as those found by default in netperf, is particularly +sensitive to the path-length of the networking stack. An _RR test can +also uncover those platforms where the NIC's are strapped by default +with overbearing interrupt avoidance settings in an attempt to increase +the bulk-transfer performance (or rather, decrease the CPU utilization +of a bulk-transfer test). This sensitivity is most acute for small +request and response sizes, such as the single-byte default for a +netperf _RR test. While a bulk-transfer test reports its results in units of bits or -bytes transfered per second, a mumble_RR test reports transactions per -second where a transaction is defined as the completed exchange of a -request and a response. One can invert the transaction rate to arrive -at the average round-trip latency. If one is confident about the -symmetry of the connection, the average one-way latency can be taken as -one-half the average round-trip latency. Netperf does not do either of -these on its own but leaves them as exercises to the benchmarker. +bytes transfered per second, by default a mumble_RR test reports +transactions per second where a transaction is defined as the completed +exchange of a request and a response. One can invert the transaction +rate to arrive at the average round-trip latency. If one is confident +about the symmetry of the connection, the average one-way latency can +be taken as one-half the average round-trip latency. As of version +2.5.0 (actually slightly before) netperf still does not do the latter, +but will do the former if one sets the verbosity to 2 for a classic +netperf test, or includes the apropriate *note output selector: Omni +Output Selectors. in an *note omni test: The Omni Tests. It will also +allow the user to switch the throughput units from transactions per +secont to bits or bytes per second with the global `-f' option. * Menu: @@ -1754,7 +1889,7 @@  File: netperf.info, Node: Issues in Request/Response, Next: Options Common to TCP UDP and SCTP _RR tests, Prev: Using Netperf to Measure Request/Response, Up: Using Netperf to Measure Request/Response -6.1 Issues in Reqeust/Response +6.1 Issues in Request/Response ============================== Most if not all the *note Issues in Bulk Transfer:: apply to @@ -1774,6 +1909,13 @@ as there is no opportunity for a "fast retransmit" or retransmission prior to a retransmission timer expiring. + Virtualization may considerably increase the effective path length of +a networking stack. While this may not preclude achieving link-rate on +a comparatively slow link (eg 1 Gigabit Ethernet) on a _STREAM test, it +can show-up as measurably fewer transactions per second on an _RR test. +However, this may still be masked by interrupt coalescing in the +NIC/driver. + Certain NICs have ways to minimize the number of interrupts sent to the host. If these are strapped badly they can significantly reduce the performance of something like a single-byte request/response test. @@ -1839,17 +1981,17 @@ response ] `-s ' - This option sets the local send and receive socket buffer sizes for - the data connection to the value(s) specified. Often, this will - affect the advertised and/or effective TCP or other window, but on - some platforms it may not. By default the units are bytes, but a - suffix of "G," "M," or "K" will specify the units to be 2^30 (GB), - 2^20 (MB) or 2^10 (KB) respectively. A suffix of "g," "m" or "k" - will specify units of 10^9, 10^6 or 10^3 bytes respectively. For - example: + This option sets the local (netperf) send and receive socket buffer + sizes for the data connection to the value(s) specified. Often, + this will affect the advertised and/or effective TCP or other + window, but on some platforms it may not. By default the units are + bytes, but a suffix of "G," "M," or "K" will specify the units to + be 2^30 (GB), 2^20 (MB) or 2^10 (KB) respectively. A suffix of + "g," "m" or "k" will specify units of 10^9, 10^6 or 10^3 bytes + respectively. For example: `-s 128K' - Will request the local send and receive socket buffer sizes to be - 128KB or 131072 bytes. + Will request the local send (netperf) and receive socket buffer + sizes to be 128KB or 131072 bytes. While the historic expectation is that setting the socket buffer size has a direct effect on say the TCP window, today that may not @@ -1859,17 +2001,17 @@ system's default socket buffer sizes] `-S ' - This option sets the remote send and/or receive socket buffer sizes - for the data connection to the value(s) specified. Often, this - will affect the advertised and/or effective TCP or other window, - but on some platforms it may not. By default the units are bytes, - but a suffix of "G," "M," or "K" will specify the units to be 2^30 - (GB), 2^20 (MB) or 2^10 (KB) respectively. A suffix of "g," "m" - or "k" will specify units of 10^9, 10^6 or 10^3 bytes respectively. - For example: + This option sets the remote (netserver) send and/or receive socket + buffer sizes for the data connection to the value(s) specified. + Often, this will affect the advertised and/or effective TCP or + other window, but on some platforms it may not. By default the + units are bytes, but a suffix of "G," "M," or "K" will specify the + units to be 2^30 (GB), 2^20 (MB) or 2^10 (KB) respectively. A + suffix of "g," "m" or "k" will specify units of 10^9, 10^6 or 10^3 + bytes respectively. For example: `-s 128K' - Will request the local send and receive socket buffer sizes to be - 128KB or 131072 bytes. + Will request the remote (netserver) send and receive socket buffer + sizes to be 128KB or 131072 bytes. While the historic expectation is that setting the socket buffer size has a direct effect on say the TCP window, today that may not @@ -1911,8 +2053,9 @@ A TCP_RR (TCP Request/Response) test is requested by passing a value of "TCP_RR" to the global `-t' command-line option. A TCP_RR test can be -though-of as a user-space to user-space `ping' with no think time - it -is a synchronous, one transaction at a time, request/response test. +thought-of as a user-space to user-space `ping' with no think time - it +is by default a synchronous, one transaction at a time, +request/response test. The transaction rate is the number of complete transactions exchanged divided by the length of time it took to perform those transactions. @@ -1926,7 +2069,7 @@ Time to establish the TCP connection is not counted in the result. If you want connection setup overheads included, you should consider the -TCP_CC or TCP_CRR tests. +*note TPC_CC: TCP_CC. or *note TCP_CRR: TCP_CRR. tests. If specifying the `-D' option to set TCP_NODELAY and disable the Nagle Algorithm increases the transaction rate reported by a TCP_RR @@ -1951,7 +2094,8 @@ In this example the request and response sizes were one byte, the socket buffers were left at their defaults, and the test ran for all of -10 seconds. The transaction per second rate was rather good :) +10 seconds. The transaction per second rate was rather good for the +time :)  File: netperf.info, Node: TCP_CC, Next: TCP_CRR, Prev: TCP_RR, Up: Options Common to TCP UDP and SCTP _RR tests @@ -1992,8 +2136,8 @@ only the `-H', `-L', `-4' and `-6' of the "common" test-specific options are likely to have an effect, if any, on the results. The `-s' and `-S' options _may_ have some effect if they alter the number and/or -type of options carried in the TCP SYNchronize segments. The `-P' and -`-r' options are utterly ignored. +type of options carried in the TCP SYNchronize segments, such as Window +Scaling or Timestamps. The `-P' and `-r' options are utterly ignored. Since connection establishment and tear-down for TCP is not symmetric, a TCP_CC test is not symmetric in its loading of the two @@ -2006,13 +2150,13 @@ ------------- The TCP Connect/Request/Response (TCP_CRR) test is requested by passing -a value of "TCP_CRR" to the global `-t' command-line option. A TCP_RR -test is like a merger of a TCP_RR and TCP_CC test which measures the -performance of establishing a connection, exchanging a single -request/response transaction, and tearing-down that connection. This -is very much like what happens in an HTTP 1.0 or HTTP 1.1 connection -when HTTP Keepalives are not used. In fact, the TCP_CRR test was added -to netperf to simulate just that. +a value of "TCP_CRR" to the global `-t' command-line option. A TCP_CRR +test is like a merger of a *note TCP_RR:: and *note TCP_CC:: test which +measures the performance of establishing a connection, exchanging a +single request/response transaction, and tearing-down that connection. +This is very much like what happens in an HTTP 1.0 or HTTP 1.1 +connection when HTTP Keepalives are not used. In fact, the TCP_CRR +test was added to netperf to simulate just that. Since a request and response are exchanged the `-r', `-s' and `-S' options can have an effect on the performance. @@ -2037,7 +2181,11 @@ _any_ request or response is lost, the exchange of requests and responses will stop from that point until the test timer expires. Netperf will not really "know" this has happened - the only symptom -will be a low transaction per second rate. +will be a low transaction per second rate. If `--enable-burst' was +included in the `configure' command and a test-specific `-b' option +used, the UDP_RR test will "survive" the loss of requests and responses +until the sum is one more than the value passed via the `-b' option. It +will though almost certainly run more slowly. The netperf side of a UDP_RR test will call `connect()' on its data socket and thenceforth use the `send()' and `recv()' socket calls. The @@ -2084,12 +2232,26 @@ 6.2.6 XTI_TCP_CC ---------------- +An XTI_TCP_CC test is essentially the same as a *note TCP_CC: TCP_CC. +test, only using the XTI rather than BSD Sockets interface. + + The test-specific options for an XTI_TCP_CC test are the same as +those for a TCP_CC test with the addition of the `-X ' option +to specify the names of the local and/or remote XTI device file(s). +  File: netperf.info, Node: XTI_TCP_CRR, Next: XTI_UDP_RR, Prev: XTI_TCP_CC, Up: Options Common to TCP UDP and SCTP _RR tests 6.2.7 XTI_TCP_CRR ----------------- +The XTI_TCP_CRR test is essentially the same as a *note TCP_CRR: +TCP_CRR. test, only using the XTI rather than BSD Sockets interface. + + The test-specific options for an XTI_TCP_CRR test are the same as +those for a TCP_RR test with the addition of the `-X ' option +to specify the names of the local and/or remote XTI device file(s). +  File: netperf.info, Node: XTI_UDP_RR, Next: DLCL_RR, Prev: XTI_TCP_CRR, Up: Options Common to TCP UDP and SCTP _RR tests @@ -2128,9 +2290,11 @@ 7 Using Netperf to Measure Aggregate Performance ************************************************ -*note Netperf4: Netperf4. is the preferred benchmark to use when one -wants to measure aggregate performance because netperf has no support -for explicit synchronization of concurrent tests. +Ultimately, *note Netperf4: Netperf4. will be the preferred benchmark to +use when one wants to measure aggregate performance because netperf has +no support for explicit synchronization of concurrent tests. Until +netperf4 is ready for prime time, one can make use of the heuristics +and procedures mentioned here for the 85% solution. Basically, there are two ways to measure aggregate performance with netperf. The first is to run multiple, concurrent netperf tests and @@ -2200,7 +2364,11 @@ advised, particularly when/if the CPU utilization approaches 100 percent. In the example above we see that the CPU utilization on the local system remains the same for all four tests, and is only off by -0.01 out of 5.09 on the remote system. +0.01 out of 5.09 on the remote system. As the number of CPUs in the +system increases, and so too the odds of saturating a single CPU, the +accuracy of similar CPU utilization implying little skew error is +diminished. This is also the case for those increasingly rare single +CPU systems if the utilization is reported as 100% or very close to it. NOTE: It is very important to rememeber that netperf is calculating system-wide CPU utilization. When calculating the service demand @@ -2229,25 +2397,69 @@ Even if you see the Netperf Contributing Editor acting to the contrary!-) +* Menu: + +* Issues in Running Concurrent Tests:: + + +File: netperf.info, Node: Issues in Running Concurrent Tests, Prev: Running Concurrent Netperf Tests, Up: Running Concurrent Netperf Tests + +7.1.1 Issues in Running Concurrent Tests +---------------------------------------- + +In addition to the aforementioned issue of skew error, there can be +other issues to consider when running concurrent netperf tests. + + For example, when running concurrent tests over multiple interfaces, +one is not always assured that the traffic one thinks went over a given +interface actually did so. In particular, the Linux networking stack +takes a particularly strong stance on its following the so called `weak +end system model'. As such, it is willing to answer ARP requests for +any of its local IP addresses on any of its interfaces. If multiple +interfaces are connected to the same broadcast domain, then even if +they are configured into separate IP subnets there is no a priori way +of knowing which interface was actually used for which connection(s). +This can be addressed by setting the `arp_ignore' sysctl before +configuring interfaces. + + As it is quite important, we will repeat that it is very important to +rememeber that each concurrent netperf instance is calculating +system-wide CPU utilization. When calculating the service demand each +netperf assumes it is the only thing running on the system. This means +that for concurrent tests the service demands reported by netperf will +be wrong. One has to compute service demands for concurrent tests by +hand +  File: netperf.info, Node: Using --enable-burst, Prev: Running Concurrent Netperf Tests, Up: Using Netperf to Measure Aggregate Performance 7.2 Using -enable-burst ======================= -If one configures netperf with `--enable-burst': +Starting in version 2.5.0 `--enable-burst=yes' is the default, which +means one no longer must: configure --enable-burst - Then a test-specific `-b num' option is added to the *note TCP_RR: -TCP_RR. and *note UDP_RR: UDP_RR. tests. This option causes TCP_RR and -UDP_RR to quickly work their way up to having at least `num' -transactions in flight at one time. - - This is used as an alternative to or even in conjunction with -multiple-concurrent _RR tests. When run with just a single instance of -netperf, increasing the burst size can determine the maximum number of -transactions per second can be serviced by a single process: + To have burst-mode functionality present in netperf. This enables a +test-specific `-b num' option in *note TCP_RR: TCP_RR, *note UDP_RR: +UDP_RR. and *note omni: The Omni Tests. tests. + + Normally, netperf will attempt to ramp-up the number of outstanding +requests to `num' plus one transactions in flight at one time. The +ramp-up is to avoid transactions being smashed together into a smaller +number of segments when the transport's congestion window (if any) is +smaller at the time than what netperf wants to have outstanding at one +time. If, however, the user specifies a negative value for `num' this +ramp-up is bypassed and the burst of sends is made without +consideration of transport congestion window. + + This burst-mode is used as an alternative to or even in conjunction +with multiple-concurrent _RR tests and as a way to implement a +single-connection, bidirectional bulk-transfer test. When run with +just a single instance of netperf, increasing the burst size can +determine the maximum number of transactions per second which can be +serviced by a single process: for b in 0 1 2 4 8 16 32 do @@ -2265,16 +2477,17 @@ The global `-v' and `-P' options were used to minimize the output to the single figure of merit which in this case the transaction rate. The global `-B' option was used to more clearly label the output, and -the test-specific `-b' option enabled by `--enable-burst' set the +the test-specific `-b' option enabled by `--enable-burst' increase the number of transactions in flight at one time. Now, since the test-specific `-D' option was not specified to set TCP_NODELAY, the stack was free to "bundle" requests and/or responses into TCP segments as it saw fit, and since the default request and response size is one byte, there could have been some considerable -bundling. If one wants to try to achieve a closer to one-to-one -correspondence between a request and response and a TCP segment, add -the test-specific `-D' option: +bundling even in the absense of transport congestion window issues. If +one wants to try to achieve a closer to one-to-one correspondence +between a request and response and a TCP segment, add the test-specific +`-D' option: for b in 0 1 2 4 8 16 32 do @@ -2297,7 +2510,7 @@ NOTE: Even if you set the `-D' option that is still not a guarantee that each transaction is in its own TCP segments. You should get into the habit of verifying the relationship between the - transaction rate and the packet rate via other means + transaction rate and the packet rate via other means. You can also combine `--enable-burst' functionality with concurrent netperf tests. This would then be an "aggregate of aggregates" if you @@ -2403,7 +2616,7 @@ specified in the test-specific `-b' option.  -File: netperf.info, Node: Using Netperf to Measure Bidirectional Transfer, Next: Other Netperf Tests, Prev: Using Netperf to Measure Aggregate Performance, Up: Top +File: netperf.info, Node: Using Netperf to Measure Bidirectional Transfer, Next: The Omni Tests, Prev: Using Netperf to Measure Aggregate Performance, Up: Top 8 Using Netperf to Measure Bidirectional Transfer ************************************************* @@ -2426,6 +2639,7 @@ * Bidirectional Transfer with Concurrent Tests:: * Bidirectional Transfer with TCP_RR:: +* Implications of Concurrent Tests vs Burst Request/Response::  File: netperf.info, Node: Bidirectional Transfer with Concurrent Tests, Next: Bidirectional Transfer with TCP_RR, Prev: Using Netperf to Measure Bidirectional Transfer, Up: Using Netperf to Measure Bidirectional Transfer @@ -2447,8 +2661,10 @@ for i in 1 do - netperf -H 192.168.2.108 -t TCP_STREAM -B "outbound" -i 10 -P 0 -v 0 -- -s 256K -S 256K & - netperf -H 192.168.2.108 -t TCP_MAERTS -B "inbound" -i 10 -P 0 -v 0 -- -s 256K -S 256K & + netperf -H 192.168.2.108 -t TCP_STREAM -B "outbound" -i 10 -P 0 -v 0 \ + -- -s 256K -S 256K & + netperf -H 192.168.2.108 -t TCP_MAERTS -B "inbound" -i 10 -P 0 -v 0 \ + -- -s 256K -S 256K & done 892.66 outbound @@ -2465,23 +2681,60 @@ explained in *note Running Concurrent Netperf Tests: Running Concurrent Netperf Tests. + Beginning with version 2.5.0 we can accomplish a similar result with +the *note the omni tests: The Omni Tests. and *note output selectors: +Omni Output Selectors.: + + for i in 1 + do + netperf -H 192.168.1.3 -t omni -l 10 -P 0 -- \ + -d stream -s 256K -S 256K -o throughput,direction & + netperf -H 192.168.1.3 -t omni -l 10 -P 0 -- \ + -d maerts -s 256K -S 256K -o throughput,direction & + done + + 805.26,Receive + 828.54,Send +  -File: netperf.info, Node: Bidirectional Transfer with TCP_RR, Prev: Bidirectional Transfer with Concurrent Tests, Up: Using Netperf to Measure Bidirectional Transfer +File: netperf.info, Node: Bidirectional Transfer with TCP_RR, Next: Implications of Concurrent Tests vs Burst Request/Response, Prev: Bidirectional Transfer with Concurrent Tests, Up: Using Netperf to Measure Bidirectional Transfer 8.2 Bidirectional Transfer with TCP_RR ====================================== -If one configures netperf with `--enable-burst' then one can use the -test-specific `-b' option to increase the number of transactions in -flight at one time. If one also uses the -r option to make those -transactions larger the test starts to look more and more like a -bidirectional transfer than a request/response test. - - Now, the logic behing `--enable-burst' is very simple, and there are -no calls to `poll()' or `select()' which means we want to make sure -that the `send()' calls will never block, or we run the risk of -deadlock with each side stuck trying to call `send()' and neither -calling `recv()'. +Starting with version 2.5.0 the `--enable-burst' configure option +defaults to `yes', and starting some time before version 2.5.0 but +after 2.4.0 the global `-f' option would affect the "throughput" +reported by request/response tests. If one uses the test-specific `-b' +option to have several "transactions" in flight at one time and the +test-specific `-r' option to increase their size, the test looks more +and more like a single-connection bidirectional transfer than a simple +request/response test. + + So, putting it all together one can do something like: + + netperf -f m -t TCP_RR -H 192.168.1.3 -v 2 -- -b 6 -r 32K -S 256K -S 256K + MIGRATED TCP REQUEST/RESPONSE TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.1.3 (192.168.1.3) port 0 AF_INET : interval : first burst 6 + Local /Remote + Socket Size Request Resp. Elapsed + Send Recv Size Size Time Throughput + bytes Bytes bytes bytes secs. 10^6bits/sec + + 16384 87380 32768 32768 10.00 1821.30 + 524288 524288 + Alignment Offset RoundTrip Trans Throughput + Local Remote Local Remote Latency Rate 10^6bits/s + Send Recv Send Recv usec/Tran per sec Outbound Inbound + 8 0 0 0 2015.402 3473.252 910.492 910.492 + + to get a bidirectional bulk-throughput result. As one can see, the -v +2 output will include a number of interesting, related values. + + NOTE: The logic behind `--enable-burst' is very simple, and there + are no calls to `poll()' or `select()' which means we want to make + sure that the `send()' calls will never block, or we run the risk + of deadlock with each side stuck trying to call `send()' and + neither calling `recv()'. Fortunately, this is easily accomplished by setting a "large enough" socket buffer size with the test-specific `-s' and `-S' options. @@ -2489,38 +2742,1067 @@ netperf might attempt to do this automagically, but there are some issues to be worked-out. - Here then is an example of a bidirectional transfer test using -`--enable-burst' and the *note TCP_RR: TCP_RR. test: + +File: netperf.info, Node: Implications of Concurrent Tests vs Burst Request/Response, Prev: Bidirectional Transfer with TCP_RR, Up: Using Netperf to Measure Bidirectional Transfer - netperf -t TCP_RR -H hpcpc108 -- -b 6 -r 32K -s 256K -S 256K - TCP REQUEST/RESPONSE TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to hpcpc108.cup.hp.com (16.89.84.108) port 0 AF_INET : first burst 6 +8.3 Implications of Concurrent Tests vs Burst Request/Response +============================================================== + +There are perhaps subtle but important differences between using +concurrent unidirectional tests vs a burst-mode request to measure +bidirectional performance. + + Broadly speaking, a single "connection" or "flow" of traffic cannot +make use of the services of more than one or two CPUs at either end. +Whether one or two CPUs will be used processing a flow will depend on +the specifics of the stack(s) involved and whether or not the global +`-T' option has been used to bind netperf/netserver to specific CPUs. + + When using concurrent tests there will be two concurrent connections +or flows, which means that upwards of four CPUs will be employed +processing the packets (global `-T' used, no more than two if not), +however, with just a single, bidirectional request/response test no +more than two CPUs will be employed (only one if the global `-T' is not +used). + + If there is a CPU bottleneck on either system this may result in +rather different results between the two methods. + + Also, with a bidirectional request/response test there is something +of a natural balance or synchronization between inbound and outbound - a +response will not be sent until a request is received, and (once the +burst level is reached) a subseqent request will not be sent until a +response is received. This may mask favoritism in the NIC between +inbound and outbound processing. + + With two concurrent unidirectional tests there is no such +synchronization or balance and any favoritism in the NIC may be exposed. + + +File: netperf.info, Node: The Omni Tests, Next: Other Netperf Tests, Prev: Using Netperf to Measure Bidirectional Transfer, Up: Top + +9 The Omni Tests +**************** + +Beginning with version 2.5.0, netperf begins a migration to the `omni' +tests or "Two routines to measure them all." The code for the omni +tests can be found in `src/nettest_omni.c' and the goal is to make it +easier for netperf to support multiple protocols and report a great +many additional things about the systems under test. Additionally, a +flexible output selection mechanism is present which allows the user to +chose specifically what values she wishes to have reported and in what +format. + + The omni tests are included by default in version 2.5.0. To disable +them, one must: + ./configure --enable-omni=no ... + + and remake netperf. Remaking netserver is optional because even in +2.5.0 it has "unmigrated" netserver side routines for the classic (eg +`src/nettest_bsd.c') tests. + +* Menu: + +* Native Omni Tests:: +* Migrated Tests:: +* Omni Output Selection:: + + +File: netperf.info, Node: Native Omni Tests, Next: Migrated Tests, Prev: The Omni Tests, Up: The Omni Tests + +9.1 Native Omni Tests +===================== + +One access the omni tests "natively" by using a value of "OMNI" with +the global `-t' test-selection option. This will then cause netperf to +use the code in `src/nettest_omni.c' and in particular the +test-specific options parser for the omni tests. The test-specific +options for the omni tests are a superset of those for "classic" tests. +The options added by the omni tests are: + +`-c' + This explicitly declares that the test is to include connection + establishment and tear-down as in either a TCP_CRR or TCP_CC test. + +`-d ' + This option sets the direction of the test relative to the netperf + process. As of version 2.5.0 one can use the following in a + case-insenstive manner: + + `send, stream, transmit, xmit or 2' + Any of which will cause netperf to send to the netserver. + + `recv, receive, maerts or 4' + Any of which will cause netserver to send to netperf. + + `rr or 6' + Either of which will cause a request/response test. + + Additionally, one can specify two directions separated by a '|' + character and they will be OR'ed together. In this way one can use + the "Send|Recv" that will be emitted by the *note DIRECTION: Omni + Output Selectors. *note output selector: Omni Output Selection. + when used with a request/reponse test. + +`-k [*note output selector: Omni Output Selection.]' + This option sets the style of output to "keyval" where each line of + output has the form: + key=value + For example: + $ netperf -t omni -- -d rr -k "THROUGHPUT,THROUGHPUT_UNITS" + OMNI TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to localhost.localdomain (127.0.0.1) port 0 AF_INET : demo + THROUGHPUT=59092.65 + THROUGHPUT_UNITS=Trans/s + + Using the `-k' option will override any previous, test-specific + `-o' or `-O' option. + +`-o [*note output selector: Omni Output Selection.]' + This option sets the style of output to "CSV" where there will be + one line of comma-separated values, preceeded by one line of column + names unless the global `-P' option is used with a value of 0: + $ netperf -t omni -- -d rr -o "THROUGHPUT,THROUGHPUT_UNITS" + OMNI TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to localhost.localdomain (127.0.0.1) port 0 AF_INET : demo + Throughput,Throughput Units + 60999.07,Trans/s + + Using the `-o' option will override any previous, test-specific + `-k' or `-O' option. + +`-O [*note output selector: Omni Output Selection.]' + This option sets the style of output to "human readable" which will + look quite similar to classic netperf output: + $ netperf -t omni -- -d rr -O "THROUGHPUT,THROUGHPUT_UNITS" + OMNI TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to localhost.localdomain (127.0.0.1) port 0 AF_INET : demo + Throughput Throughput + Units + + + 60492.57 Trans/s + + Using the `-O' option will override any previous, test-specific + `-k' or `-o' option. + +`-t' + This option explicitly sets the socket type for the test's data + connection. As of version 2.5.0 the known socket types include + "stream" and "dgram" for SOCK_STREAM and SOCK_DGRAM respectively. + +`-T ' + This option is used to explicitly set the protocol used for the + test. It is case-insensitive. As of version 2.5.0 the protocols + known to netperf include: + `TCP' + Select the Transmission Control Protocol + + `UDP' + Select the User Datagram Procotol + + `SDP' + Select the Sockets Direct Protocol + + `DCCP' + Select the Datagram Congestion Control Protocol + + `SCTP' + Select the Stream Control Transport Protocol + + `udplite' + Select UDP Lite + + The default is implicit based on other settings. + + The omni tests also extend the interpretation of some of the classic, +test-specific options for the BSD Sockets tests: + +`-m ' + This can set the send size for either or both of the netperf and + netserver sides of the test: + -m 32K + sets only the netperf-side send size to 32768 bytes, and or's-in + transmit for the direction. This is effectively the same behaviour + as for the classic tests. + -m ,32K + sets only the netserver side send size to 32768 bytes and or's-in + receive for the direction. + -m 16K,32K + sets the netperf side send size to 16284 bytes, the netserver side + send size to 32768 bytes and the direction will be "Send|Recv." + +`-M ' + This can set the receive size for either or both of the netperf and + netserver sides of the test: + -M 32K + sets only the netserver side receive size to 32768 bytes and + or's-in send for the test direction. + -M ,32K + sets only the netperf side receive size to 32768 bytes and or's-in + receive for the test direction. + -M 16K,32K + sets the netserver side receive size to 16384 bytes and the netperf + side receive size to 32768 bytes and the direction will be + "Send|Recv." + + +File: netperf.info, Node: Migrated Tests, Next: Omni Output Selection, Prev: Native Omni Tests, Up: The Omni Tests + +9.2 Migrated Tests +================== + +As of version 2.5.0 several tests have been migrated to use the omni +code in `src/nettest_omni.c' for the core of their testing. A migrated +test retains all its previous output code and so should still "look and +feel" just like a pre-2.5.0 test with one exception - the first line of +the test banners will include the word "MIGRATED" at the beginning as +in: + + $ netperf + MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to localhost.localdomain (127.0.0.1) port 0 AF_INET : demo + Recv Send Send + Socket Socket Message Elapsed + Size Size Size Time Throughput + bytes bytes bytes secs. 10^6bits/sec + + 87380 16384 16384 10.00 27175.27 + + The tests migrated in version 2.5.0 are: + * TCP_STREAM + + * TCP_MAERTS + + * TCP_RR + + * TCP_CRR + + * UDP_STREAM + + * UDP_RR + + It is expected that future releases will have additional tests +migrated to use the "omni" functionality. + + If one uses "omni-specific" test-specific options in conjunction +with a migrated test, instead of using the classic output code, the new +omni output code will be used. For example if one uses the `-k' +test-specific option with a value of "MIN_LATENCY,MAX_LATENCY" with a +migrated TCP_RR test one will see: + + $ netperf -t tcp_rr -- -k THROUGHPUT,THROUGHPUT_UNITS + MIGRATED TCP REQUEST/RESPONSE TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to localhost.localdomain (127.0.0.1) port 0 AF_INET : demo + THROUGHPUT=60074.74 + THROUGHPUT_UNITS=Trans/s + rather than: + $ netperf -t tcp_rr + MIGRATED TCP REQUEST/RESPONSE TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to localhost.localdomain (127.0.0.1) port 0 AF_INET : demo Local /Remote Socket Size Request Resp. Elapsed Trans. Send Recv Size Size Time Rate bytes Bytes bytes bytes secs. per sec - 524288 524288 32768 32768 10.01 3525.97 - 524288 524288 + 16384 87380 1 1 10.00 59421.52 + 16384 87380 + + +File: netperf.info, Node: Omni Output Selection, Prev: Migrated Tests, Up: The Omni Tests - Now, at present netperf does not include a bit or byte rate in the -output of an _RR test which means we must calculate it ourselves. Each -transaction is the exchange of 32768 bytes of request and 32768 bytes -of response, or 65536 bytes. Multiply that by 8 and we arrive at -524288 bits per transaction. Multiply that by 3525.97 and we arrive at -1848623759 bits per second. Since things were uniform, we can divide -that by two and arrive at roughly 924311879 bits per second each way. -That corresponds to "link-rate" for a 1 Gigiabit Ethernet which happens -to be the type of netpwrk used in the example. - - A future version of netperf may perform the calculation on behalf of -the user, but it would likely not emit it unless the user specified a -verbosity of 2 or more with the global `-v' option. +9.3 Omni Output Selection +========================= + +The omni test-specific `-k', `-o' and `-O' options take an optional +`output selector' by which the user can configure what values are +reported. The output selector can take several forms: + +``filename'' + The output selections will be read from the named file. Within the + file there can be up to four lines of comma-separated output + selectors. This controls how many multi-line blocks of output are + emitted when the `-O' option is used. This output, while not + identical to "classic" netperf output, is inspired by it. + Multiple lines have no effect for `-k' and `-o' options. Putting + output selections in a file can be useful when the list of + selections is long. + +`comma and/or semi-colon-separated list' + The output selections will be parsed from a comma and/or + semi-colon-separated list of output selectors. When the list is + given to a `-O' option a semi-colon specifies a new output block + should be started. Semi-colons have the same meaning as commas + when used with the `-k' or `-o' options. Depending on the command + interpreter being used, the semi-colon may have to be escaped + somehow to keep it from being interpreted by the command + interpreter. This can often be done by enclosing the entire list + in quotes. + +`all' + If the keyword all is specified it means that all known output + values should be displayed at the end of the test. This can be a + great deal of output. As of version 2.5.0 there are 157 different + output selectors. + +`?' + If a "?" is given as the output selection, the list of all known + output selectors will be displayed and no test actually run. When + passed to the `-O' option they will be listed one per line. + Otherwise they will be listed as a comma-separated list. It may + be necessary to protect the "?" from the command interpreter by + escaping it or enclosing it in quotes. + +`no selector' + If nothing is given to the `-k', `-o' or `-O' option then the code + selects a default set of output selectors inspired by classic + netperf output. The format will be the `human readable' format + emitted by the test-specific `-O' option. + + The order of evaluation will first check for an output selection. If +none is specified with the `-k', `-o' or `-O' option netperf will +select a default based on the characterists of the test. If there is +an output selection, the code will first check for `?', then check to +see if it is the magic `all' keyword. After that it will check for +either `,' or `;' in the selection and take that to mean it is a comma +and/or semi-colon-separated list. If none of those checks match, +netperf will then assume the output specification is a filename and +attempt to open and parse the file. + +* Menu: + +* Omni Output Selectors::  -File: netperf.info, Node: Other Netperf Tests, Next: Address Resolution, Prev: Using Netperf to Measure Bidirectional Transfer, Up: Top +File: netperf.info, Node: Omni Output Selectors, Prev: Omni Output Selection, Up: Omni Output Selection -9 Other Netperf Tests -********************* +9.3.1 Omni Output Selectors +--------------------------- + +As of version 2.5.0 the output selectors are: + +`OUTPUT_NONE' + This is essentially a null output. For `-k' output it will simply + add a line that reads "OUTPUT_NONE=" to the output. For `-o' it + will cause an empty "column" to be included. For `-O' output it + will cause extra spaces to separate "real" output. + +`SOCKET_TYPE' + This will cause the socket type (eg SOCK_STREAM, SOCK_DGRAM) for + the data connection to be output. + +`PROTOCOL' + This will cause the protocol used for the data connection to be + displayed. + +`DIRECTION' + This will display the data flow direction relative to the netperf + process. Units: Send or Recv for a unidirectional bulk-transfer + test, or Send|Recv for a request/response test. + +`ELAPSED_TIME' + This will display the elapsed time in seconds for the test. + +`THROUGHPUT' + This will display the througput for the test. Units: As requested + via the global `-f' option and displayed by the THROUGHPUT_UNITS + output selector. + +`THROUGHPUT_UNITS' + This will display the units for what is displayed by the + `THROUGHPUT' output selector. + +`LSS_SIZE_REQ' + This will display the local (netperf) send socket buffer size (aka + SO_SNDBUF) requested via the command line. Units: Bytes. + +`LSS_SIZE' + This will display the local (netperf) send socket buffer size + (SO_SNDBUF) immediately after the data connection socket was + created. Peculiarities of different networking stacks may lead to + this differing from the size requested via the command line. + Units: Bytes. + +`LSS_SIZE_END' + This will display the local (netperf) send socket buffer size + (SO_SNDBUF) immediately before the data connection socket is + closed. Peculiarities of different networking stacks may lead + this to differ from the size requested via the command line and/or + the size immediately after the data connection socket was created. + Units: Bytes. + +`LSR_SIZE_REQ' + This will display the local (netperf) receive socket buffer size + (aka SO_RCVBUF) requested via the command line. Units: Bytes. + +`LSR_SIZE' + This will display the local (netperf) receive socket buffer size + (SO_RCVBUF) immediately after the data connection socket was + created. Peculiarities of different networking stacks may lead to + this differing from the size requested via the command line. + Units: Bytes. + +`LSR_SIZE_END' + This will display the local (netperf) receive socket buffer size + (SO_RCVBUF) immediately before the data connection socket is + closed. Peculiarities of different networking stacks may lead + this to differ from the size requested via the command line and/or + the size immediately after the data connection socket was created. + Units: Bytes. + +`RSS_SIZE_REQ' + This will display the remote (netserver) send socket buffer size + (aka SO_SNDBUF) requested via the command line. Units: Bytes. + +`RSS_SIZE' + This will display the remote (netserver) send socket buffer size + (SO_SNDBUF) immediately after the data connection socket was + created. Peculiarities of different networking stacks may lead to + this differing from the size requested via the command line. + Units: Bytes. + +`RSS_SIZE_END' + This will display the remote (netserver) send socket buffer size + (SO_SNDBUF) immediately before the data connection socket is + closed. Peculiarities of different networking stacks may lead + this to differ from the size requested via the command line and/or + the size immediately after the data connection socket was created. + Units: Bytes. + +`RSR_SIZE_REQ' + This will display the remote (netserver) receive socket buffer + size (aka SO_RCVBUF) requested via the command line. Units: Bytes. + +`RSR_SIZE' + This will display the remote (netserver) receive socket buffer size + (SO_RCVBUF) immediately after the data connection socket was + created. Peculiarities of different networking stacks may lead to + this differing from the size requested via the command line. + Units: Bytes. + +`RSR_SIZE_END' + This will display the remote (netserver) receive socket buffer size + (SO_RCVBUF) immediately before the data connection socket is + closed. Peculiarities of different networking stacks may lead + this to differ from the size requested via the command line and/or + the size immediately after the data connection socket was created. + Units: Bytes. + +`LOCAL_SEND_SIZE' + This will display the size of the buffers netperf passed in any + "send" calls it made on the data connection for a + non-request/response test. Units: Bytes. + +`LOCAL_RECV_SIZE' + This will display the size of the buffers netperf passed in any + "receive" calls it made on the data connection for a + non-request/response test. Units: Bytes. + +`REMOTE_SEND_SIZE' + This will display the size of the buffers netserver passed in any + "send" calls it made on the data connection for a + non-request/response test. Units: Bytes. + +`REMOTE_RECV_SIZE' + This will display the size of the buffers netserver passed in any + "receive" calls it made on the data connection for a + non-request/response test. Units: Bytes. + +`REQUEST_SIZE' + This will display the size of the requests netperf sent in a + request-response test. Units: Bytes. + +`RESPONSE_SIZE' + This will display the size of the responses netserver sent in a + request-response test. Units: Bytes. + +`LOCAL_CPU_UTIL' + This will display the overall CPU utilization during the test as + measured by netperf. Units: 0 to 100 percent. + +`LOCAL_CPU_METHOD' + This will display the method used by netperf to measure CPU + utilization. Units: single character denoting method. + +`LOCAL_SD' + This will display the service demand, or units of CPU consumed per + unit of work, as measured by netperf. Units: microsconds of CPU + consumed per either KB (K==1024) of data transferred or + request/response transaction. + +`REMOTE_CPU_UTIL' + This will display the overall CPU utilization during the test as + measured by netserver. Units 0 to 100 percent. + +`REMOTE_CPU_METHOD' + This will display the method used by netserver to measure CPU + utilization. Units: single character denoting method. + +`REMOTE_SD' + This will display the service demand, or units of CPU consumed per + unit of work, as measured by netserver. Units: microseconds of CPU + consumed consumed per either KB (K==1024) of data transferred or + request/response transaction. + +`SD_UNITS' + This will display the units for LOCAL_SD and REMOTE_SD + +`CONFIDENCE_LEVEL' + This will display the confidence level requested by the user either + explicitly via the global `-I' option, or implicitly via the + global `-i' option. The value will be either 95 or 99 if + confidence intervals have been requested or 0 if they were not. + Units: Percent + +`CONFIDENCE_INTERVAL' + This will display the width of the confidence interval requested + either explicitly via the global `-I' option or implicitly via the + global `-i' option. Units: Width in percent of mean value + computed. A value of -1.0 means that confidence intervals were not + requested. + +`CONFIDENCE_ITERATION' + This will display the number of test iterations netperf undertook, + perhaps while attempting to achieve the requested confidence + interval and level. If confidence intervals were requested via the + command line then the value will be between 3 and 30. If + confidence intervals were not requested the value will be 1. + Units: Iterations + +`THROUGHPUT_CONFID' + This will display the width of the confidence interval actually + achieved for `THROUGHPUT' during the test. Units: Width of + interval as percentage of reported throughput value. + +`LOCAL_CPU_CONFID' + This will display the width of the confidence interval actually + achieved for overall CPU utilization on the system running netperf + (`LOCAL_CPU_UTIL') during the test, if CPU utilization measurement + was enabled. Units: Width of interval as percentage of reported + CPU utilization. + +`REMOTE_CPU_CONFID' + This will display the width of the confidence interval actually + achieved for overall CPU utilization on the system running + netserver (`REMOTE_CPU_UTIL') during the test, if CPU utilization + measurement was enabled. Units: Width of interval as percentage of + reported CPU utilization. + +`TRANSACTION_RATE' + This will display the transaction rate in transactions per second + for a request/response test even if the user has requested a + throughput in units of bits or bytes per second via the global `-f' + option. It is undefined for a non-request/response test. Units: + Transactions per second. + +`RT_LATENCY' + This will display the average round-trip latency for a + request/response test, accounting for number of transactions in + flight at one time. It is undefined for a non-request/response + test. Units: Microseconds per transaction + +`BURST_SIZE' + This will display the "burst size" or added transactions in flight + in a request/response test as requested via a test-specific `-b' + option. The number of transactions in flight at one time will be + one greater than this value. It is undefined for a + non-request/response test. Units: added Transactions in flight. + +`LOCAL_TRANSPORT_RETRANS' + This will display the number of retransmissions experienced on the + data connection during the test as determined by netperf. A value + of -1 means the attempt to determine the number of retransmissions + failed or the concept was not valid for the given protocol or the + mechanism is not known for the platform. A value of -2 means it + was not attempted. As of version 2.5.0 the meaning of values are + in flux and subject to change. Units: number of retransmissions. + +`REMOTE_TRANSPORT_RETRANS' + This will display the number of retransmissions experienced on the + data connection during the test as determined by netserver. A + value of -1 means the attempt to determine the number of + retransmissions failed or the concept was not valid for the given + protocol or the mechanism is not known for the platform. A value + of -2 means it was not attempted. As of version 2.5.0 the meaning + of values are in flux and subject to change. Units: number of + retransmissions. + +`TRANSPORT_MSS' + This will display the Maximum Segment Size (aka MSS) or its + equivalent for the protocol being used during the test. A value + of -1 means either the concept of an MSS did not apply to the + protocol being used, or there was an error in retrieving it. + Units: Bytes. + +`LOCAL_SEND_THROUGHPUT' + The throughput as measured by netperf for the successful "send" + calls it made on the data connection. Units: as requested via the + global `-f' option and displayed via the `THROUGHPUT_UNITS' output + selector. + +`LOCAL_RECV_THROUGHPUT' + The throughput as measured by netperf for the successful "receive" + calls it made on the data connection. Units: as requested via the + global `-f' option and displayed via the `THROUGHPUT_UNITS' output + selector. + +`REMOTE_SEND_THROUGHPUT' + The throughput as measured by netserver for the successful "send" + calls it made on the data connection. Units: as requested via the + global `-f' option and displayed via the `THROUGHPUT_UNITS' output + selector. + +`REMOTE_RECV_THROUGHPUT' + The throughput as measured by netserver for the successful + "receive" calls it made on the data connection. Units: as + requested via the global `-f' option and displayed via the + `THROUGHPUT_UNITS' output selector. + +`LOCAL_CPU_BIND' + The CPU to which netperf was bound, if at all, during the test. A + value of -1 means that netperf was not explicitly bound to a CPU + during the test. Units: CPU ID + +`LOCAL_CPU_COUNT' + The number of CPUs (cores, threads) detected by netperf. Units: + CPU count. + +`LOCAL_CPU_PEAK_UTIL' + The utilization of the CPU most heavily utilized during the test, + as measured by netperf. This can be used to see if any one CPU of a + multi-CPU system was saturated even though the overall CPU + utilization as reported by `LOCAL_CPU_UTIL' was low. Units: 0 to + 100% + +`LOCAL_CPU_PEAK_ID' + The id of the CPU most heavily utilized during the test as + determined by netperf. Units: CPU ID. + +`LOCAL_CPU_MODEL' + Model information for the processor(s) present on the system + running netperf. Assumes all processors in the system (as + perceived by netperf) on which netperf is running are the same + model. Units: Text + +`LOCAL_CPU_FREQUENCY' + The frequency of the processor(s) on the system running netperf, at + the time netperf made the call. Assumes that all processors + present in the system running netperf are running at the same + frequency. Units: MHz + +`REMOTE_CPU_BIND' + The CPU to which netserver was bound, if at all, during the test. A + value of -1 means that netperf was not explicitly bound to a CPU + during the test. Units: CPU ID + +`REMOTE_CPU_COUNT' + The number of CPUs (cores, threads) detected by netserver. Units: + CPU count. + +`REMOTE_CPU_PEAK_UTIL' + The utilization of the CPU most heavily utilized during the test, + as measured by netserver. This can be used to see if any one CPU + of a multi-CPU system was saturated even though the overall CPU + utilization as reported by `REMOTE_CPU_UTIL' was low. Units: 0 to + 100% + +`REMOTE_CPU_PEAK_ID' + The id of the CPU most heavily utilized during the test as + determined by netserver. Units: CPU ID. + +`REMOTE_CPU_MODEL' + Model information for the processor(s) present on the system + running netserver. Assumes all processors in the system (as + perceived by netserver) on which netserver is running are the same + model. Units: Text + +`REMOTE_CPU_FREQUENCY' + The frequency of the processor(s) on the system running netserver, + at the time netserver made the call. Assumes that all processors + present in the system running netserver are running at the same + frequency. Units: MHz + +`SOURCE_PORT' + The port ID/service name to which the data socket created by + netperf was bound. A value of 0 means the data socket was not + explicitly bound to a port number. Units: ASCII text. + +`SOURCE_ADDR' + The name/address to which the data socket created by netperf was + bound. A value of 0.0.0.0 means the data socket was not explicitly + bound to an address. Units: ASCII text. + +`SOURCE_FAMILY' + The address family to which the data socket created by netperf was + bound. A value of 0 means the data socket was not explicitly + bound to a given address family. Units: ASCII text. + +`DEST_PORT' + The port ID to which the data socket created by netserver was + bound. A value of 0 means the data socket was not explicitly bound + to a port number. Units: ASCII text. + +`DEST_ADDR' + The name/address of the data socket created by netserver. Units: + ASCII text. + +`DEST_FAMILY' + The address family to which the data socket created by netserver + was bound. A value of 0 means the data socket was not explicitly + bound to a given address family. Units: ASCII text. + +`LOCAL_SEND_CALLS' + The number of successful "send" calls made by netperf against its + data socket. Units: Calls. + +`LOCAL_RECV_CALLS' + The number of successful "receive" calls made by netperf against + its data socket. Units: Calls. + +`LOCAL_BYTES_PER_RECV' + The average number of bytes per "receive" call made by netperf + against its data socket. Units: Bytes. + +`LOCAL_BYTES_PER_SEND' + The average number of bytes per "send" call made by netperf against + its data socket. Units: Bytes. + +`LOCAL_BYTES_SENT' + The number of bytes successfully sent by netperf through its data + socket. Units: Bytes. + +`LOCAL_BYTES_RECVD' + The number of bytes successfully received by netperf through its + data socket. Units: Bytes. + +`LOCAL_BYTES_XFERD' + The sum of bytes sent and received by netperf through its data + socket. Units: Bytes. + +`LOCAL_SEND_OFFSET' + The offset from the alignment of the buffers passed by netperf in + its "send" calls. Specified via the global `-o' option and + defaults to 0. Units: Bytes. + +`LOCAL_RECV_OFFSET' + The offset from the alignment of the buffers passed by netperf in + its "receive" calls. Specified via the global `-o' option and + defaults to 0. Units: Bytes. + +`LOCAL_SEND_ALIGN' + The alignment of the buffers passed by netperf in its "send" calls + as specified via the global `-a' option. Defaults to 8. Units: + Bytes. + +`LOCAL_RECV_ALIGN' + The alignment of the buffers passed by netperf in its "receive" + calls as specified via the global `-a' option. Defaults to 8. + Units: Bytes. + +`LOCAL_SEND_WIDTH' + The "width" of the ring of buffers through which netperf cycles as + it makes its "send" calls. Defaults to one more than the local + send socket buffer size divided by the send size as determined at + the time the data socket is created. Can be used to make netperf + more processor data cache unfiendly. Units: number of buffers. + +`LOCAL_RECV_WIDTH' + The "width" of the ring of buffers through which netperf cycles as + it makes its "receive" calls. Defaults to one more than the local + receive socket buffer size divided by the receive size as + determined at the time the data socket is created. Can be used to + make netperf more processor data cache unfiendly. Units: number of + buffers. + +`LOCAL_SEND_DIRTY_COUNT' + The number of bytes to "dirty" (write to) before netperf makes a + "send" call. Specified via the global `-k' option, which requires + that -enable-dirty=yes was specificed with the configure command + prior to building netperf. Units: Bytes. + +`LOCAL_RECV_DIRTY_COUNT' + The number of bytes to "dirty" (write to) before netperf makes a + "recv" call. Specified via the global `-k' option which requires + that -enable-dirty was specified with the configure command prior + to building netperf. Units: Bytes. + +`LOCAL_RECV_CLEAN_COUNT' + The number of bytes netperf should read "cleanly" before making a + "receive" call. Specified via the global `-k' option which + requires that -enable-dirty was specified with configure command + prior to building netperf. Clean reads start were dirty writes + ended. Units: Bytes. + +`LOCAL_NODELAY' + Indicates whether or not setting the test protocol-specific "no + delay" (eg TCP_NODELAY) option on the data socket used by netperf + was requested by the test-specific `-D' option and successful. + Units: 0 means no, 1 means yes. + +`LOCAL_CORK' + Indicates whether or not TCP_CORK was set on the data socket used + by netperf as requested via the test-specific `-C' option. 1 means + yes, 0 means no/not applicable. + +`REMOTE_SEND_CALLS' + +`REMOTE_RECV_CALLS' + +`REMOTE_BYTES_PER_RECV' + +`REMOTE_BYTES_PER_SEND' + +`REMOTE_BYTES_SENT' + +`REMOTE_BYTES_RECVD' + +`REMOTE_BYTES_XFERD' + +`REMOTE_SEND_OFFSET' + +`REMOTE_RECV_OFFSET' + +`REMOTE_SEND_ALIGN' + +`REMOTE_RECV_ALIGN' + +`REMOTE_SEND_WIDTH' + +`REMOTE_RECV_WIDTH' + +`REMOTE_SEND_DIRTY_COUNT' + +`REMOTE_RECV_DIRTY_COUNT' + +`REMOTE_RECV_CLEAN_COUNT' + +`REMOTE_NODELAY' + +`REMOTE_CORK' + These are all like their "LOCAL_" counterparts only for the + netserver rather than netperf. + +`LOCAL_SYSNAME' + The name of the OS (eg "Linux") running on the system on which + netperf was running. Units: ASCII Text + +`LOCAL_SYSTEM_MODEL' + The model name of the system on which netperf was running. Units: + ASCII Text. + +`LOCAL_RELEASE' + The release name/number of the OS running on the system on which + netperf was running. Units: ASCII Text + +`LOCAL_VERSION' + The version number of the OS running on the system on which netperf + was running. Units: ASCII Text + +`LOCAL_MACHINE' + The machine architecture of the machine on which netperf was + running. Units: ASCII Text. + +`REMOTE_SYSNAME' + +`REMOTE_SYSTEM_MODEL' + +`REMOTE_RELEASE' + +`REMOTE_VERSION' + +`REMOTE_MACHINE' + These are all like their "LOCAL_" counterparts only for the + netserver rather than netperf. + +`LOCAL_INTERFACE_NAME' + The name of the probable egress interface through which the data + connection went on the system running netperf. Example: eth0. + Units: ASCII Text. + +`LOCAL_INTERFACE_VENDOR' + The vendor ID of the probable egress interface through which + traffic on the data connection went on the system running netperf. + Units: Hexadecimal IDs as might be found in a `pci.ids' file or at + the PCI ID Repository (http://pciids.sourceforge.net/). + +`LOCAL_INTERFACE_DEVICE' + The device ID of the probable egress interface through which + traffic on the data connection went on the system running netperf. + Units: Hexadecimal IDs as might be found in a `pci.ids' file or at + the PCI ID Repository (http://pciids.sourceforge.net/). + +`LOCAL_INTERFACE_SUBVENDOR' + The sub-vendor ID of the probable egress interface through which + traffic on the the data connection went on the system running + netperf. Units: Hexadecimal IDs as might be found in a `pci.ids' + file or at the PCI ID Repository (http://pciids.sourceforge.net/). + +`LOCAL_INTERFACE_SUBDEVICE' + The sub-device ID of the probable egress interface through which + traffic on the data connection went on the system running netperf. + Units: Hexadecimal IDs as might be found in a `pci.ids' file or at + the PCI ID Repository (http://pciids.sourceforge.net/). + +`LOCAL_DRIVER_NAME' + The name of the driver used for the probable egress interface + through which traffic on the data connection went on the system + running netperf. Units: ASCII Text. + +`LOCAL_DRIVER_VERSION' + The version string for the driver used for the probable egress + interface through which traffic on the data connection went on the + system running netperf. Units: ASCII Text. + +`LOCAL_DRIVER_FIRMWARE' + The firmware version for the driver used for the probable egress + interface through which traffic on the data connection went on the + system running netperf. Units: ASCII Text. + +`LOCAL_DRIVER_BUS' + The bus address of the probable egress interface through which + traffic on the data connection went on the system running netperf. + Units: ASCII Text. + +`LOCAL_INTERFACE_SLOT' + The slot ID of the probable egress interface through which traffic + on the data connection went on the system running netperf. Units: + ASCII Text. + +`REMOTE_INTERFACE_NAME' + +`REMOTE_INTERFACE_VENDOR' + +`REMOTE_INTERFACE_DEVICE' + +`REMOTE_INTERFACE_SUBVENDOR' + +`REMOTE_INTERFACE_SUBDEVICE' + +`REMOTE_DRIVER_NAME' + +`REMOTE_DRIVER_VERSION' + +`REMOTE_DRIVER_FIRMWARE' + +`REMOTE_DRIVER_BUS' + +`REMOTE_INTERFACE_SLOT' + These are all like their "LOCAL_" counterparts only for the + netserver rather than netperf. + +`LOCAL_INTERVAL_USECS' + The interval at which bursts of operations (sends, receives, + transactions) were attempted by netperf. Specified by the global + `-w' option which requires -enable-intervals to have been + specified with the configure command prior to building netperf. + Units: Microseconds (though specified by default in milliseconds + on the command line) + +`LOCAL_INTERVAL_BURST' + The number of operations (sends, receives, transactions depending + on the test) which were attempted by netperf each + LOCAL_INTERVAL_USECS units of time. Specified by the global `-b' + option which requires -enable-intervals to have been specified + with the configure command prior to building netperf. Units: + number of operations per burst. + +`REMOTE_INTERVAL_USECS' + The interval at which bursts of operations (sends, receives, + transactions) were attempted by netserver. Specified by the + global `-w' option which requires -enable-intervals to have been + specified with the configure command prior to building netperf. + Units: Microseconds (though specified by default in milliseconds + on the command line) + +`REMOTE_INTERVAL_BURST' + The number of operations (sends, receives, transactions depending + on the test) which were attempted by netperf each + LOCAL_INTERVAL_USECS units of time. Specified by the global `-b' + option which requires -enable-intervals to have been specified + with the configure command prior to building netperf. Units: + number of operations per burst. + +`LOCAL_SECURITY_TYPE_ID' + +`LOCAL_SECURITY_TYPE' + +`LOCAL_SECURITY_ENABLED_NUM' + +`LOCAL_SECURITY_ENABLED' + +`LOCAL_SECURITY_SPECIFIC' + +`REMOTE_SECURITY_TYPE_ID' + +`REMOTE_SECURITY_TYPE' + +`REMOTE_SECURITY_ENABLED_NUM' + +`REMOTE_SECURITY_ENABLED' + +`REMOTE_SECURITY_SPECIFIC' + A bunch of stuff related to what sort of security mechanisms (eg + SELINUX) were enabled on the systems during the test. + +`RESULT_BRAND' + The string specified by the user with the global `-B' option. + Units: ASCII Text. + +`UUID' + The universally unique identifier associated with this test, either + generated automagically by netperf, or passed to netperf via an + omni test-specific `-u' option. Note: Future versions may make this + a global command-line option. Units: ASCII Text. + +`MIN_LATENCY' + The minimum "latency" or operation time (send, receive or + request/response exchange depending on the test) as measured on the + netperf side when the global `-j' option was specified. Units: + Microseconds. + +`MAX_LATENCY' + The maximum "latency" or operation time (send, receive or + request/response exchange depending on the test) as measured on the + netperf side when the global `-j' option was specified. Units: + Microseconds. + +`P50_LATENCY' + The 50th percentile value of "latency" or operation time (send, + receive or request/response exchange depending on the test) as + measured on the netperf side when the global `-j' option was + specified. Units: Microseconds. + +`P90_LATENCY' + The 90th percentile value of "latency" or operation time (send, + receive or request/response exchange depending on the test) as + measured on the netperf side when the global `-j' option was + specified. Units: Microseconds. + +`P99_LATENCY' + The 99th percentile value of "latency" or operation time (send, + receive or request/response exchange depending on the test) as + measured on the netperf side when the global `-j' option was + specified. Units: Microseconds. + +`MEAN_LATENCY' + The average "latency" or operation time (send, receive or + request/response exchange depending on the test) as measured on the + netperf side when the global `-j' option was specified. Units: + Microseconds. + +`STDDEV_LATENCY' + The standard deviation of "latency" or operation time (send, + receive or request/response exchange depending on the test) as + measured on the netperf side when the global `-j' option was + specified. Units: Microseconds. + +`COMMAND_LINE' + The full command line used when invoking netperf. Units: ASCII + Text. + +`OUTPUT_END' + While emitted with the list of output selectors, it is ignored when + specified as an output selector. + + +File: netperf.info, Node: Other Netperf Tests, Next: Address Resolution, Prev: The Omni Tests, Up: Top + +10 Other Netperf Tests +********************** Apart from the typical performance tests, netperf contains some tests which can be used to streamline measurements and reporting. These @@ -2530,12 +3812,13 @@ * Menu: * CPU rate calibration:: +* UUID Generation::  -File: netperf.info, Node: CPU rate calibration, Prev: Other Netperf Tests, Up: Other Netperf Tests +File: netperf.info, Node: CPU rate calibration, Next: UUID Generation, Prev: Other Netperf Tests, Up: Other Netperf Tests -9.1 CPU rate calibration -======================== +10.1 CPU rate calibration +========================= Some of the CPU utilization measurement mechanisms of netperf work by comparing the rate at which some counter increments when the system is @@ -2578,9 +3861,27 @@ by hand.  +File: netperf.info, Node: UUID Generation, Prev: CPU rate calibration, Up: Other Netperf Tests + +10.2 UUID Generation +==================== + +Beginning with version 2.5.0 netperf can generate Universally Unique +IDentifiers (UUIDs). This can be done explicitly via the "UUID" test: + $ netperf -t UUID + 2c8561ae-9ebd-11e0-a297-0f5bfa0349d0 + + In and of itself, this is not terribly useful, but used in conjuction +with the test-specific `-u' option of an "omni" test to set the UUID +emitted by the *note UUID: Omni Output Selectors. output selector, it +can be used to tie-together the separate instances of an aggregate +netperf test. Say, for instance if they were inserted into a database +of some sort. + + File: netperf.info, Node: Address Resolution, Next: Enhancing Netperf, Prev: Other Netperf Tests, Up: Top -10 Address Resolution +11 Address Resolution ********************* Netperf versions 2.4.0 and later have merged IPv4 and IPv6 tests so the @@ -2619,12 +3920,12 @@  File: netperf.info, Node: Enhancing Netperf, Next: Netperf4, Prev: Address Resolution, Up: Top -11 Enhancing Netperf +12 Enhancing Netperf ******************** Netperf is constantly evolving. If you find you want to make enhancements to netperf, by all means do so. If you wish to add a new -"suite" of tests to netperf the general idea is to +"suite" of tests to netperf the general idea is to: 1. Add files `src/nettest_mumble.c' and `src/nettest_mumble.h' where mumble is replaced with something meaningful for the test-suite. @@ -2637,6 +3938,11 @@ 4. Compile and test + However, with the addition of the "omni" tests in version 2.5.0 it +is preferred that one attempt to make the necessary changes to +`src/nettest_omni.c' rather than adding new source files, unless this +would make the omni tests entirely too complicated. + If you wish to submit your changes for possible inclusion into the mainline sources, please try to base your changes on the latest available sources. (*Note Getting Netperf Bits::.) and then send email @@ -2650,7 +3956,7 @@  File: netperf.info, Node: Netperf4, Next: Concept Index, Prev: Enhancing Netperf, Up: Top -12 Netperf4 +13 Netperf4 *********** Netperf4 is the shorthand name given to version 4.X.X of netperf. This @@ -2662,8 +3968,8 @@ for synchronized, multiple-thread, multiple-test, multiple-system, network-oriented benchmarking. - Netperf4 is still undergoing rapid evolution. Those wishing to work -with or on netperf4 are encouraged to join the netperf-dev + Netperf4 is still undergoing evolution. Those wishing to work with or +on netperf4 are encouraged to join the netperf-dev (http://www.netperf.org/cgi-bin/mailman/listinfo/netperf-dev) mailing list and/or peruse the current sources (http://www.netperf.org/svn/netperf4/trunk). @@ -2678,34 +3984,33 @@ * Menu: * Aggregate Performance: Using Netperf to Measure Aggregate Performance. - (line 3) + (line 6) * Bandwidth Limitation: Installing Netperf Bits. - (line 41) -* Connection Latency: TCP_CC. (line 3) -* CPU Utilization: The Design of Netperf. - (line 35) + (line 64) +* Connection Latency: TCP_CC. (line 6) +* CPU Utilization: CPU Utilization. (line 6) * Design of Netperf: The Design of Netperf. (line 6) * Installation: Installing Netperf. (line 6) * Introduction: Introduction. (line 6) -* Latency, Connection Establishment <1>: XTI_TCP_CRR. (line 3) -* Latency, Connection Establishment <2>: XTI_TCP_CC. (line 3) -* Latency, Connection Establishment <3>: TCP_CRR. (line 3) -* Latency, Connection Establishment: TCP_CC. (line 3) -* Latency, Request-Response <1>: SCTP_RR. (line 3) -* Latency, Request-Response <2>: DLCO_RR. (line 3) -* Latency, Request-Response <3>: DLCL_RR. (line 3) -* Latency, Request-Response <4>: XTI_UDP_RR. (line 3) -* Latency, Request-Response <5>: XTI_TCP_CRR. (line 3) -* Latency, Request-Response <6>: XTI_TCP_RR. (line 3) -* Latency, Request-Response <7>: UDP_RR. (line 3) -* Latency, Request-Response <8>: TCP_CRR. (line 3) -* Latency, Request-Response: TCP_RR. (line 3) +* Latency, Connection Establishment <1>: XTI_TCP_CRR. (line 6) +* Latency, Connection Establishment <2>: XTI_TCP_CC. (line 6) +* Latency, Connection Establishment <3>: TCP_CRR. (line 6) +* Latency, Connection Establishment: TCP_CC. (line 6) +* Latency, Request-Response <1>: SCTP_RR. (line 6) +* Latency, Request-Response <2>: DLCO_RR. (line 6) +* Latency, Request-Response <3>: DLCL_RR. (line 6) +* Latency, Request-Response <4>: XTI_UDP_RR. (line 6) +* Latency, Request-Response <5>: XTI_TCP_CRR. (line 6) +* Latency, Request-Response <6>: XTI_TCP_RR. (line 6) +* Latency, Request-Response <7>: UDP_RR. (line 6) +* Latency, Request-Response <8>: TCP_CRR. (line 6) +* Latency, Request-Response: TCP_RR. (line 6) * Limiting Bandwidth <1>: UDP_STREAM. (line 9) * Limiting Bandwidth: Installing Netperf Bits. - (line 41) -* Measuring Latency: TCP_RR. (line 3) -* Packet Loss: UDP_RR. (line 3) + (line 64) +* Measuring Latency: TCP_RR. (line 6) +* Packet Loss: UDP_RR. (line 6) * Port Reuse: TCP_CC. (line 13) * TIME_WAIT: TCP_CC. (line 13) @@ -2719,29 +4024,31 @@ * Menu: * --enable-burst, Configure: Using Netperf to Measure Aggregate Performance. - (line 3) + (line 6) * --enable-cpuutil, Configure: Installing Netperf Bits. - (line 22) + (line 24) * --enable-dlpi, Configure: Installing Netperf Bits. - (line 28) + (line 30) * --enable-histogram, Configure: Installing Netperf Bits. - (line 41) + (line 64) * --enable-intervals, Configure: Installing Netperf Bits. - (line 41) + (line 64) +* --enable-omni, Configure: Installing Netperf Bits. + (line 36) * --enable-sctp, Configure: Installing Netperf Bits. - (line 28) -* --enable-unix, Configure: Installing Netperf Bits. - (line 28) + (line 30) +* --enable-unixdomain, Configure: Installing Netperf Bits. + (line 30) * --enable-xti, Configure: Installing Netperf Bits. - (line 28) -* -4, Global: Global Options. (line 379) + (line 30) +* -4, Global: Global Options. (line 489) * -4, Test-specific <1>: Options Common to TCP UDP and SCTP _RR tests. (line 88) * -4, Test-specific: Options common to TCP UDP and SCTP tests. (line 110) * -6 Test-specific: Options Common to TCP UDP and SCTP _RR tests. (line 94) -* -6, Global: Global Options. (line 388) +* -6, Global: Global Options. (line 498) * -6, Test-specific: Options common to TCP UDP and SCTP tests. (line 116) * -A, Global: Global Options. (line 18) @@ -2750,22 +4057,26 @@ * -b, Global: Global Options. (line 22) * -C, Global: Global Options. (line 42) * -c, Global: Global Options. (line 33) +* -c, Test-specific: Native Omni Tests. (line 13) * -D, Global: Global Options. (line 56) * -d, Global: Global Options. (line 47) -* -F, Global: Global Options. (line 74) +* -d, Test-specific: Native Omni Tests. (line 17) +* -F, Global: Global Options. (line 76) * -f, Global: Global Options. (line 67) -* -H, Global: Global Options. (line 92) -* -h, Global: Global Options. (line 88) +* -H, Global: Global Options. (line 95) +* -h, Global: Global Options. (line 91) * -H, Test-specific: Options Common to TCP UDP and SCTP _RR tests. (line 17) * -h, Test-specific <1>: Options Common to TCP UDP and SCTP _RR tests. (line 10) * -h, Test-specific: Options common to TCP UDP and SCTP tests. (line 10) -* -i, Global: Global Options. (line 168) -* -I, Global: Global Options. (line 127) -* -L, Global: Global Options. (line 209) -* -l, Global: Global Options. (line 189) +* -i, Global: Global Options. (line 179) +* -I, Global: Global Options. (line 130) +* -j, Global: Global Options. (line 205) +* -k, Test-specific: Native Omni Tests. (line 37) +* -L, Global: Global Options. (line 263) +* -l, Global: Global Options. (line 242) * -L, Test-specific <1>: Options Common to TCP UDP and SCTP _RR tests. (line 26) * -L, Test-specific: Options common to TCP UDP and SCTP tests. @@ -2774,12 +4085,14 @@ (line 48) * -m, Test-specific: Options common to TCP UDP and SCTP tests. (line 32) -* -N, Global: Global Options. (line 234) -* -n, Global: Global Options. (line 221) -* -O, Global: Global Options. (line 279) -* -o, Global: Global Options. (line 270) -* -P, Global: Global Options. (line 303) -* -p, Global: Global Options. (line 283) +* -N, Global: Global Options. (line 293) +* -n, Global: Global Options. (line 275) +* -O, Global: Global Options. (line 338) +* -o, Global: Global Options. (line 329) +* -O, Test-specific: Native Omni Tests. (line 62) +* -o, Test-specific: Native Omni Tests. (line 50) +* -P, Global: Global Options. (line 363) +* -p, Global: Global Options. (line 343) * -P, Test-specific <1>: Options Common to TCP UDP and SCTP _RR tests. (line 33) * -P, Test-specific: Options common to TCP UDP and SCTP tests. @@ -2788,72 +4101,87 @@ (line 36) * -S Test-specific: Options common to TCP UDP and SCTP tests. (line 87) +* -S, Global: Global Options. (line 381) +* -s, Global: Global Options. (line 372) * -S, Test-specific: Options Common to TCP UDP and SCTP _RR tests. (line 68) * -s, Test-specific <1>: Options Common to TCP UDP and SCTP _RR tests. (line 48) * -s, Test-specific: Options common to TCP UDP and SCTP tests. (line 64) -* -t, Global: Global Options. (line 312) -* -v, Global: Global Options. (line 341) -* -W, Global: Global Options. (line 370) -* -w, Global: Global Options. (line 363) +* -T, Global: Global Options. (line 423) +* -t, Global: Global Options. (line 391) +* -T, Test-specific: Native Omni Tests. (line 81) +* -t, Test-specific: Native Omni Tests. (line 76) +* -V, Global: Global Options. (line 468) +* -v, Global: Global Options. (line 440) +* -W, Global: Global Options. (line 480) +* -w, Global: Global Options. (line 473)  Tag Table: Node: Top439 -Node: Introduction2700 -Node: Conventions5161 -Node: Installing Netperf6924 -Node: Getting Netperf Bits8478 -Node: Installing Netperf Bits10296 -Node: Verifying Installation16760 -Node: The Design of Netperf17464 -Node: CPU Utilization19046 -Node: Global Command-line Options27659 -Node: Command-line Options Syntax28198 -Node: Global Options29580 -Node: Using Netperf to Measure Bulk Data Transfer48876 -Node: Issues in Bulk Transfer49541 -Node: Options common to TCP UDP and SCTP tests53070 -Node: TCP_STREAM59364 -Node: TCP_MAERTS63132 -Node: TCP_SENDFILE64365 -Node: UDP_STREAM66681 -Node: XTI_TCP_STREAM70117 -Node: XTI_UDP_STREAM70762 -Node: SCTP_STREAM71407 -Node: DLCO_STREAM72107 -Node: DLCL_STREAM74080 -Node: STREAM_STREAM74954 -Node: DG_STREAM75800 -Node: Using Netperf to Measure Request/Response76469 -Node: Issues in Request/Response78390 -Node: Options Common to TCP UDP and SCTP _RR tests80396 -Node: TCP_RR85375 -Node: TCP_CC87719 -Node: TCP_CRR89916 -Node: UDP_RR90962 -Node: XTI_TCP_RR92983 -Node: XTI_TCP_CC93566 -Node: XTI_TCP_CRR93732 -Node: XTI_UDP_RR93900 -Node: DLCL_RR94477 -Node: DLCO_RR94630 -Node: SCTP_RR94782 -Node: Using Netperf to Measure Aggregate Performance94918 -Node: Running Concurrent Netperf Tests95753 -Node: Using --enable-burst99645 -Node: Using Netperf to Measure Bidirectional Transfer105830 -Node: Bidirectional Transfer with Concurrent Tests106903 -Node: Bidirectional Transfer with TCP_RR108769 -Node: Other Netperf Tests111303 -Node: CPU rate calibration111749 -Node: Address Resolution114090 -Node: Enhancing Netperf116066 -Node: Netperf4117303 -Node: Concept Index118213 -Node: Option Index120603 +Node: Introduction1476 +Node: Conventions4150 +Node: Installing Netperf5913 +Node: Getting Netperf Bits7467 +Node: Installing Netperf Bits9326 +Node: Verifying Installation17822 +Node: The Design of Netperf18526 +Node: CPU Utilization20122 +Node: CPU Utilization in a Virtual Guest28845 +Node: Global Command-line Options30432 +Node: Command-line Options Syntax30971 +Node: Global Options32367 +Node: Using Netperf to Measure Bulk Data Transfer56521 +Node: Issues in Bulk Transfer57194 +Node: Options common to TCP UDP and SCTP tests61455 +Node: TCP_STREAM67780 +Node: TCP_MAERTS71864 +Node: TCP_SENDFILE73101 +Node: UDP_STREAM75601 +Node: XTI_TCP_STREAM79037 +Node: XTI_UDP_STREAM79682 +Node: SCTP_STREAM80327 +Node: DLCO_STREAM81027 +Node: DLCL_STREAM83000 +Node: STREAM_STREAM83874 +Node: DG_STREAM84732 +Node: Using Netperf to Measure Request/Response85413 +Node: Issues in Request/Response87731 +Node: Options Common to TCP UDP and SCTP _RR tests90104 +Node: TCP_RR95128 +Node: TCP_CC97528 +Node: TCP_CRR99762 +Node: UDP_RR100824 +Node: XTI_TCP_RR103128 +Node: XTI_TCP_CC103711 +Node: XTI_TCP_CRR104216 +Node: XTI_UDP_RR104728 +Node: DLCL_RR105305 +Node: DLCO_RR105458 +Node: SCTP_RR105610 +Node: Using Netperf to Measure Aggregate Performance105746 +Node: Running Concurrent Netperf Tests106725 +Node: Issues in Running Concurrent Tests110974 +Node: Using --enable-burst112483 +Node: Using Netperf to Measure Bidirectional Transfer119352 +Node: Bidirectional Transfer with Concurrent Tests120483 +Node: Bidirectional Transfer with TCP_RR122839 +Node: Implications of Concurrent Tests vs Burst Request/Response125223 +Node: The Omni Tests127036 +Node: Native Omni Tests128083 +Node: Migrated Tests133360 +Node: Omni Output Selection135465 +Node: Omni Output Selectors138446 +Node: Other Netperf Tests166164 +Node: CPU rate calibration166599 +Node: UUID Generation168966 +Node: Address Resolution169681 +Node: Enhancing Netperf171657 +Node: Netperf4173151 +Node: Concept Index174055 +Node: Option Index176381  End Tag Table diff -Nru netperf-2.4.5/doc/netperf.man netperf-2.5.0/doc/netperf.man --- netperf-2.4.5/doc/netperf.man 2007-06-01 22:06:03.000000000 +0000 +++ netperf-2.5.0/doc/netperf.man 2011-06-30 00:03:05.000000000 +0000 @@ -81,6 +81,13 @@ Set the maximum and minimum number of iterations when trying to reach certain confidence levels. .TP +.B \-j +Instruct netperf to calculate additional statistics on timing when +running an omni test. Display of said statistics will depend on the +presence of the corresponding output selectors in the output +selection. These are MIN_LATENCY, MAX_LATENCY, P50_LATENCY, +P90_LATENCY, P99_LATENCY, MEAN_LATENCY and STDDEV_LATENCY. +.TP .B \-I lvl,[,intvl] Specify the confidence level (either 95 or 99 - 99 is the default) and the width of the confidence interval as a percentage (default 10) @@ -125,6 +132,16 @@ .B \-P 0|1 Show (1) or suppress (0) the test banner. .TP +.B \-S +This option will cause an attempt to set SO_KEEPALIVE on the ends of +the data connection for tests using BSD Sockets. It will be made on +the netperf side of classic tests, and both netperf and netserver side +of an omni or migrated test. +.TP +.B \-s seconds +This will cause netperf to sleep "seconds" seconds before transferring +data over the data connection. +.TP .B \-t testname Specify the test to perform. Valid testnames include, but are not limited to, nor always compiled-in: @@ -146,6 +163,10 @@ .I STREAM_RR .I DG_STREAM .I DG_RR +.I SCTP_STREAM +.I SCTP_STREAM_MANY +.I SCTP_RR +.I SCTP_RR_MANY .I LOC_CPU .I REM_CPU .fi @@ -158,7 +179,9 @@ .TP .B \-v verbosity Set the verbosity level for the test (only with -P). - +.TP +.B \-V +Display the netperf version and exit. .SS TEST SPECIFIC OPTIONS @@ -168,9 +191,9 @@ Please consult the netperf manual .I -Netperf: A Network Performance Benchmark -(netperf.ps) for more information. Or you can join and mail to -netperf-talk@netperf.org. +Care and Feeding of Netperf 2.5.X +(doc/netperf.[pdf|html|txt]) for more information. Or you can join and +send email to netperf-talk@netperf.org. .SH NOTE For those options taking two parms, at least one must be specified; @@ -181,7 +204,7 @@ comma. * For these options taking two parms, specifying one value with no -comma will only set the first parms and will leave the second at the +comma will only set the first parm and will leave the second at the default value. To set the second value it must be preceded with a comma or be a comma-separated pair. This is to retain previous netperf behaviour. @@ -192,23 +215,23 @@ mention it in netperf-talk@netperf.org. List membership is required to send email to the list. See http://www.netperf.org/cgi-bin/mailman/listinfo/netperf-talk . If all -else fails send email to Rick Jones . +else fails send email to netperf-feedback@netperf.org. .SH SEE ALSO -.C netserver +.BR netserver (1) .br .I -Netperf: A Network Performance Benchmark +Care and Feeding of Netperf 2.5.X .br http://www.netperf.org/ .SH AUTHORS HP Information Networks Division - Networking Performance Team. .br -Rick Jones +Rick Jones .br Karen Choy HP IND .br Dave Shield (man pages) .br -Others too numerous to mention here - see the ACKNWLDGMNTS file +Others too numerous to mention here - see the AUTHORS file diff -Nru netperf-2.4.5/doc/netperf.texi netperf-2.5.0/doc/netperf.texi --- netperf-2.4.5/doc/netperf.texi 2009-03-25 22:30:47.000000000 +0000 +++ netperf-2.5.0/doc/netperf.texi 2011-07-15 23:17:26.000000000 +0000 @@ -1,14 +1,14 @@ \input texinfo @c -*-texinfo-*- @c %**start of header @setfilename netperf.info -@settitle Care and Feeding of Netperf 2.4.X +@settitle Care and Feeding of Netperf 2.5.X @c %**end of header @copying This is Rick Jones' feeble attempt at a Texinfo-based manual for the netperf benchmark. -Copyright @copyright{} 2005-2007 Hewlett-Packard Company +Copyright @copyright{} 2005-2011 Hewlett-Packard Company @quotation Permission is granted to copy, distribute and/or modify this document per the terms of the netperf source licence, a copy of which can be @@ -18,7 +18,7 @@ @titlepage @title Care and Feeding of Netperf -@subtitle Versions 2.4.3 and Later +@subtitle Versions 2.5.0 and Later @author Rick Jones @email{rick.jones2@@hp.com} @c this is here to start the copyright page @page @@ -37,7 +37,8 @@ @end ifnottex @menu -* Introduction:: An introduction to netperf - what it is and whatit is not. +* Introduction:: An introduction to netperf - what it +is and what it is not. * Installing Netperf:: How to go about installing netperf. * The Design of Netperf:: * Global Command-line Options:: @@ -45,88 +46,13 @@ * Using Netperf to Measure Request/Response :: * Using Netperf to Measure Aggregate Performance:: * Using Netperf to Measure Bidirectional Transfer:: +* The Omni Tests:: * Other Netperf Tests:: * Address Resolution:: * Enhancing Netperf:: * Netperf4:: * Concept Index:: * Option Index:: - -@detailmenu - --- The Detailed Node Listing --- - -Introduction - -* Conventions:: - -Installing Netperf - -* Getting Netperf Bits:: -* Installing Netperf Bits:: -* Verifying Installation:: - -The Design of Netperf - -* CPU Utilization:: - -Global Command-line Options - -* Command-line Options Syntax:: -* Global Options:: - -Using Netperf to Measure Bulk Data Transfer - -* Issues in Bulk Transfer:: -* Options common to TCP UDP and SCTP tests:: - -Options common to TCP UDP and SCTP tests - -* TCP_STREAM:: -* TCP_MAERTS:: -* TCP_SENDFILE:: -* UDP_STREAM:: -* XTI_TCP_STREAM:: -* XTI_UDP_STREAM:: -* SCTP_STREAM:: -* DLCO_STREAM:: -* DLCL_STREAM:: -* STREAM_STREAM:: -* DG_STREAM:: - -Using Netperf to Measure Request/Response - -* Issues in Request/Response:: -* Options Common to TCP UDP and SCTP _RR tests:: - -Options Common to TCP UDP and SCTP _RR tests - -* TCP_RR:: -* TCP_CC:: -* TCP_CRR:: -* UDP_RR:: -* XTI_TCP_RR:: -* XTI_TCP_CC:: -* XTI_TCP_CRR:: -* XTI_UDP_RR:: -* DLCL_RR:: -* DLCO_RR:: -* SCTP_RR:: - -Using Netperf to Measure Aggregate Performance - -* Running Concurrent Netperf Tests:: -* Using --enable-burst:: - -Using Netperf to Measure Bidirectional Transfer - -* Bidirectional Transfer with Concurrent Tests:: -* Bidirectional Transfer with TCP_RR:: - -Other Netperf Tests - -* CPU rate calibration:: - -@end detailmenu @end menu @node Introduction, Installing Netperf, Top, Top @@ -170,8 +96,6 @@ @item Windows @item -OpenVMS -@item Others @end itemize @@ -188,15 +112,18 @@ @email{netperf-feedback@@netperf.org,netperf-feedback} for possible inclusion into subsequent versions of netperf. -If you would prefer to make contributions to networking benchmark -using certified ``open source'' license, please considuer netperf4, -which is distributed under the terms of the GPL. +It is the Contributing Editor's belief that the netperf license walks +like open source and talks like open source. However, the license was +never submitted for ``certification'' as an open source license. If +you would prefer to make contributions to a networking benchmark using +a certified open source license, please consider netperf4, which is +distributed under the terms of the GPLv2. The @email{netperf-talk@@netperf.org,netperf-talk} mailing list is available to discuss the care and feeding of netperf with others who share your interest in network performance benchmarking. The -netperf-talk mailing list is a closed list and you must first -subscribe by sending email to +netperf-talk mailing list is a closed list (to deal with spam) and you +must first subscribe by sending email to @email{netperf-talk-request@@netperf.org,netperf-talk-request}. @@ -322,10 +249,12 @@ @uref{http://www.netperf.org/svn/netperf2/tags,tagged} for retrieval via subversion. For example, there is a tag for the first version corresponding to this version of the manual - -@uref{http://www.netperf.org/svn/netperf2/tags/netperf-2.4.3,netperf -2.4.3}. Those wishing to be on the bleeding edge of netperf +@uref{http://www.netperf.org/svn/netperf2/tags/netperf-2.5.0,netperf +2.5.0}. Those wishing to be on the bleeding edge of netperf development can use subversion to grab the -@uref{http://www.netperf.org/svn/netperf2/trunk,top of trunk}. +@uref{http://www.netperf.org/svn/netperf2/trunk,top of trunk}. When +fixing bugs or making enhancements, patches against the top-of-trunk +are preferred. There are likely other places around the Internet from which one can download netperf bits. These may be simple mirrors of the main @@ -338,8 +267,7 @@ distributed from ftp.netperf.org. From time to time a kind soul or souls has packaged netperf as a Debian package available via the apt-get mechanism or as an RPM. I would be most interested in -learning how to enhance the makefiles to make that easier for people, -and perhaps to generate HP-UX swinstall``depots.'' +learning how to enhance the makefiles to make that easier for people. @node Installing Netperf Bits, Verifying Installation, Getting Netperf Bits, Installing Netperf @section Installing Netperf @@ -350,8 +278,8 @@ sufficient to just: @example -gzcat .tar.gz | tar xf - -cd +gzcat netperf-.tar.gz | tar xf - +cd netperf- ./configure make make install @@ -362,7 +290,9 @@ @example ./configure --help @end example -should list all of those and more. +should list all of those and more. You may find the @code{--prefix} +option helpful in deciding where the binaries and such will be put +during the @code{make install}. @vindex --enable-cpuutil, Configure If the netperf configure script does not know how to automagically @@ -372,15 +302,41 @@ that area, feel free to contact @email{netperf-feedback@@netperf.org}. @vindex --enable-xti, Configure -@vindex --enable-unix, Configure +@vindex --enable-unixdomain, Configure @vindex --enable-dlpi, Configure @vindex --enable-sctp, Configure Similarly, if you want tests using the XTI interface, Unix Domain Sockets, DLPI or SCTP it will be necessary to add one or more -@code{--enable-[xti|unix|dlpi|sctp]=yes} options to the configure +@code{--enable-[xti|unixdomain|dlpi|sctp]=yes} options to the configure command. As of this writing, the configure script will not include those tests automagically. +@vindex --enable-omni, Configure +Starting with version 2.5.0, netperf is migrating most of the +``classic'' netperf tests found in @file{src/nettest_bsd.c} to the +so-called ``omni'' tests (aka ``two routines to run them all'') found +in @file{src/nettest_omni.c}. This migration enables a number of new +features such as greater control over what output is included, and new +things to output. The ``omni'' test is enabled by default in 2.5.0 +and a number of the classic tests are migrated - you can tell if a +test has been migrated +from the presence of @code{MIGRATED} in the test banner. If you +encounter problems with either the omni or migrated tests, please +first attempt to obtain resolution via +@email{netperf-talk@@netperf.org} or +@email{netperf-feedback@@netperf.org}. If that is unsuccessful, you +can add a @code{--enable-omni=no} to the configure command and the +omni tests will not be compiled-in and the classic tests will not be +migrated. + +Starting with version 2.5.0, netperf will include the ``burst mode'' +functionality in a default compilation of the bits. If you encounter +problems with this, please first attempt to obtain help via +@email{netperf-talk@@netperf.org} or +@email{netperf-feedback@@netperf.org}. If that is unsuccessful, you +can add a @code{--enable-burst=no} to the configure command and the +burst mode functionality will nt be compiled-in. + On some platforms, it may be necessary to precede the configure command with a CFLAGS and/or LIBS variable as the netperf configure script is not yet smart enough to set them itself. Whenever possible, @@ -427,11 +383,6 @@ HIST_TOTAL: 35391 @end example -Long-time users of netperf will notice the expansion of the main test -header. This stems from the merging-in of IPv6 with the standard IPv4 -tests and the addition of code to specify addressing information for -both sides of the data connection. - The histogram you see above is basically a base-10 log histogram where we can see that most of the transaction times were on the order of one hundred to one-hundred, ninety-nine microseconds, but they were @@ -440,33 +391,44 @@ The @option{--enable-demo=yes} configure option will cause code to be included to report interim results during a test run. The rate at which interim results are reported can then be controlled via the -global @option{-D} option. Here is an example of --enable-demo mode -output: +global @option{-D} option. Here is an example of @option{-D} output: @example -src/netperf -D 1.35 -H lag -f M -TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to lag.hpl.hp.com (15.4.89.214) port 0 AF_INET : demo -Interim result: 9.66 MBytes/s over 1.67 seconds -Interim result: 9.64 MBytes/s over 1.35 seconds -Interim result: 9.58 MBytes/s over 1.36 seconds -Interim result: 9.51 MBytes/s over 1.36 seconds -Interim result: 9.71 MBytes/s over 1.35 seconds -Interim result: 9.66 MBytes/s over 1.36 seconds -Interim result: 9.61 MBytes/s over 1.36 seconds +$ src/netperf -D 1.35 -H tardy.hpl.hp.com -f M +MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to tardy.hpl.hp.com (15.9.116.144) port 0 AF_INET : demo +Interim result: 5.41 MBytes/s over 1.35 seconds ending at 1308789765.848 +Interim result: 11.07 MBytes/s over 1.36 seconds ending at 1308789767.206 +Interim result: 16.00 MBytes/s over 1.36 seconds ending at 1308789768.566 +Interim result: 20.66 MBytes/s over 1.36 seconds ending at 1308789769.922 +Interim result: 22.74 MBytes/s over 1.36 seconds ending at 1308789771.285 +Interim result: 23.07 MBytes/s over 1.36 seconds ending at 1308789772.647 +Interim result: 23.77 MBytes/s over 1.37 seconds ending at 1308789774.016 Recv Send Send Socket Socket Message Elapsed Size Size Size Time Throughput bytes bytes bytes secs. MBytes/sec - 32768 16384 16384 10.00 9.61 + 87380 16384 16384 10.06 17.81 @end example Notice how the units of the interim result track that requested by the @option{-f} option. Also notice that sometimes the interval will be longer than the value specified in the @option{-D} option. This is -normal and stems from how demo mode is implemented without relying on -interval timers, but by calculating how many units of work must be -performed to take at least the desired interval. +normal and stems from how demo mode is implemented not by relying on +interval timers or frequent calls to get the current time, but by +calculating how many units of work must be performed to take at least +the desired interval. + +Those familiar with this option in earlier versions of netperf will +note the addition of the ``ending at'' text. This is the time as +reported by a @code{gettimeofday()} call (or its emulation) with a +@code{NULL} timezone pointer. This addition is intended to make it +easier to insert interim results into an +@uref{http://oss.oetiker.ch/rrdtool/doc/rrdtool.en.html,rrdtool} +Round-Robin Database (RRD). A likely bug-riddled example of doing so +can be found in @file{doc/examples/netperf_interim_to_rrd.sh}. The +time is reported out to milliseconds rather than microseconds because +that is the most rrdtool understands as of the time of this writing. As of this writing, a @code{make install} will not actually update the files @file{/etc/services} and/or @file{/etc/inetd.conf} or their @@ -521,13 +483,15 @@ Netperf is designed around a basic client-server model. There are two executables - netperf and netserver. Generally you will only execute the netperf program, with the netserver program being invoked -by the remote system's inetd or equivalent. -When you execute netperf, the first that that will happen is the -establishment of a control connection to the remote system. This -connection will be used to pass test configuration information and -results to and from the remote system. Regardless of the type of test -to be run, the control connection will be a TCP connection using BSD -sockets. The control connection can use either IPv4 or IPv6. +by the remote system's inetd or having been previously started as its +own standalone daemon. + +When you execute netperf it will establish a ``control connection'' to +the remote system. This connection will be used to pass test +configuration information and results to and from the remote system. +Regardless of the type of test to be run, the control connection will +be a TCP connection using BSD sockets. The control connection can use +either IPv4 or IPv6. Once the control connection is up and the configuration information has been passed, a separate ``data'' connection will be opened for the @@ -547,15 +511,16 @@ * CPU Utilization:: @end menu -@cindex CPU Utilization @node CPU Utilization, , The Design of Netperf, The Design of Netperf @section CPU Utilization +@cindex CPU Utilization CPU utilization is an important, and alas all-too infrequently reported component of networking performance. Unfortunately, it can -be one of the most difficult metrics to measure accurately as many -systems offer mechanisms that are at best il-suited to measuring CPU -utilization in high interrupt rate (eg networking) situations. +be one of the most difficult metrics to measure accurately and +portably. Netperf will do its level best to report accurate +CPU utilization figures, but some combinations of processor, OS and +configuration may make that difficult. CPU utilization in netperf is reported as a value between 0 and 100% regardless of the number of CPUs involved. In addition to CPU @@ -569,7 +534,8 @@ Service demand can be particularly useful when trying to gauge the effect of a performance change. It is essentially a measure of -efficiency, with smaller values being more efficient. +efficiency, with smaller values being more efficient and thus +``better.'' Netperf is coded to be able to use one of several, generally platform-specific CPU utilization measurement mechanisms. Single @@ -601,7 +567,7 @@ @item P An HP-UX-specific CPU utilization mechanism whereby the kernel keeps-track of time (in the form of CPU cycles) spent in the kernel -idle loop (HP-UX 10.0 to 11.23 inclusive), or where the kernel keeps +idle loop (HP-UX 10.0 to 11.31 inclusive), or where the kernel keeps track of time spent in idle, user, kernel and interrupt processing (HP-UX 11.23 and later). The former requires calibration, the latter does not. Values in either case are retrieved via one of the pstat(2) @@ -609,13 +575,13 @@ these mechanisms is found in @file{src/netcpu_pstat.c} and @file{src/netcpu_pstatnew.c} respectively. @item K -A Solaris-specific CPU utilization mechanism where by the kernel -keeps track of ticks (eg HZ) spent in the idle loop. This method is +A Solaris-specific CPU utilization mechanism whereby the kernel keeps +track of ticks (eg HZ) spent in the idle loop. This method is statistical and is known to be inaccurate when the interrupt rate is above epsilon as time spent processing interrupts is not subtracted from idle. The value is retrieved via a kstat() call - hence the use of the letter @code{K}. Since this mechanism uses units of ticks (HZ) -the calibration value should invariably match HZ. (Eg 100) The code +the calibration value should invariably match HZ. (Eg 100) The code for this mechanism is implemented in @file{src/netcpu_kstat.c}. @item M A Solaris-specific mechanism available on Solaris 10 and latter which @@ -643,8 +609,8 @@ what appears to be a form of micro-state accounting and requires no calibration. On laptops, or other systems which may dynamically alter the CPU frequency to minimize power consumtion, it has been suggested -that this mechanism may become slightly confsed, in which case using -BIOS settings to disable the power saving would be indicated. +that this mechanism may become slightly confused, in which case using +BIOS/uEFI settings to disable the power saving would be indicated. @item S This mechanism uses @file{/proc/stat} on Linux to retrieve time @@ -659,7 +625,7 @@ Other mechanisms included in netperf in the past have included using the times() and getrusage() calls. These calls are actually rather poorly suited to the task of measuring CPU overhead for networking as -they tend to be process-specific and much network-related processing +they tend to be process-specific and much network-related processing can happen outside the context of a process, in places where it is not a given it will be charged to the correct, or even a process. They are mentioned here as a warning to anyone seeing those mechanisms used @@ -667,8 +633,6 @@ netperf 2.4.0 and later. @end table - - For many platforms, the configure script will chose the best available CPU utilization mechanism. However, some platforms have no particularly good mechanisms. On those platforms, it is probably best @@ -689,11 +653,11 @@ In fact, time spent in the processing of interrupts is a common issue for many CPU utilization mechanisms. In particular, the ``PSTAT'' mechanism was eventually known to have problems accounting for certain -interrupt time prior to HP-UX 11.11 (11iv1). HP-UX 11iv1 and later -are known to be good. The ``KSTAT'' mechanism is known to have -problems on all versions of Solaris up to and including Solaris 10. -Even the microstate accounting available via kstat in Solaris 10 has -issues, though perhaps not as bad as those of prior versions. +interrupt time prior to HP-UX 11.11 (11iv1). HP-UX 11iv2 and later +are known/presumed to be good. The ``KSTAT'' mechanism is known to +have problems on all versions of Solaris up to and including Solaris +10. Even the microstate accounting available via kstat in Solaris 10 +has issues, though perhaps not as bad as those of prior versions. The /proc/stat mechanism under Linux is in what the author would consider an ``uncertain'' category as it appears to be statistical, @@ -703,6 +667,37 @@ with other mechanisms. However, platform tools such as top, vmstat or mpstat are often based on the same mechanisms used by netperf. +@menu +* CPU Utilization in a Virtual Guest:: +@end menu + +@node CPU Utilization in a Virtual Guest, , CPU Utilization, CPU Utilization +@subsection CPU Utilization in a Virtual Guest + +The CPU utilization mechanisms used by netperf are ``inline'' in that +they are run by the same netperf or netserver process as is running +the test itself. This works just fine for ``bare iron'' tests but +runs into a problem when using virtual machines. + +The relationship between virtual guest and hypervisor can be thought +of as being similar to that between a process and kernel in a bare +iron system. As such, (m)any CPU utilization mechanisms used in the +virtual guest are similar to ``process-local'' mechanisms in a bare +iron situation. However, just as with bare iron and process-local +mechanisms, much networking processing happens outside the context of +the virtual guest. It takes place in the hypervisor, and is not +visible to mechanisms running in the guest(s). For this reason, one +should not really trust CPU utilization figures reported by netperf or +netserver when running in a virtual guest. + +If one is looking to measure the added overhead of a virtualization +mechanism, rather than rely on CPU utilization, one can rely instead +on netperf _RR tests - path-lengths and overheads can be a significant +fraction of the latency, so increases in overhead should appear as +decreases in transaction rate. Whatever you do, @b{DO NOT} rely on +the throughput of a _STREAM test. Achieving link-rate can be done via +a multitude of options that mask overhead rather than eliminate it. + @node Global Command-line Options, Using Netperf to Measure Bulk Data Transfer, The Design of Netperf, Top @chapter Global Command-line Options @@ -724,7 +719,8 @@ Revision 1.8 of netperf introduced enough new functionality to overrun the English alphabet for mnemonic command-line option names, and the author was not and is not quite ready to switch to the contemporary -@option{--mumble} style of command-line options. (Call him a Luddite). +@option{--mumble} style of command-line options. (Call him a Luddite +if you wish :). For this reason, the command-line options were split into two parts - the first are the global command-line options. They are options that @@ -824,12 +820,14 @@ specific to each test type. @vindex -f, Global -@item -f G|M|K|g|m|k +@item -f G|M|K|g|m|k|x This option can be used to change the reporting units for _STREAM tests. Arguments of ``G,'' ``M,'' or ``K'' will set the units to 2^30, 2^20 or 2^10 bytes/s respectively (EG power of two GB, MB or KB). Arguments of ``g,'' ``,m'' or ``k'' will set the units to 10^9, -10^6 or 10^3 bits/s respectively. [Default: 'm' or 10^6 bits/s] +10^6 or 10^3 bits/s respectively. An argument of ``x'' requests the +units be transactions per second and is only meaninful for a +request-response test. [Default: ``m'' or 10^6 bits/s] @vindex -F, Global @item -F @@ -841,14 +839,15 @@ with data having different compressibility and so is useful when measuring performance over mechanisms which perform compression. -While optional for most tests, this option is required for a test -utilizing the sendfile() or related calls because sendfile tests need -a name of a file to reference. +While previously required for a TCP_SENDFILE test, later versions of +netperf removed that restriction, creating a temporary file as +needed. While the author cannot recall exactly when that took place, +it is known to be unnecessary in version 2.5.0 and later. @vindex -h, Global @item -h -This option causes netperf to display its usage string and exit to the -exclusion of all else. +This option causes netperf to display its ``global'' usage string and +exit to the exclusion of all else. @vindex -H, Global @item -H @@ -857,7 +856,7 @@ @example -H linger,4 @end example -will set the name of the remote system to ``tardy'' and tells netperf to +will set the name of the remote system to ``linger'' and tells netperf to use IPv4 addressing only. @example -H ,6 @@ -893,7 +892,7 @@ @vindex -I, Global @item -I This option enables the calculation of confidence intervals and sets -the confidence and width parameters with the first have of the +the confidence and width parameters with the first half of the optionspec being either 99 or 95 for 99% or 95% confidence respectively. The second value of the optionspec specifies the width of the desired confidence interval. For example @@ -906,9 +905,9 @@ @option{-I} option is omitted, the confidence defaults to 99% and the width to 5% (giving +/- 2.5%) -If netperf calculates that the desired confidence intervals have not -been met, it emits a noticeable warning that cannot be suppressed with -the @option{-P} or @option{-v} options: +If classic netperf test calculates that the desired confidence +intervals have not been met, it emits a noticeable warning that cannot +be suppressed with the @option{-P} or @option{-v} options: @example netperf -H tardy.cup -i 3 -I 99,5 @@ -929,12 +928,20 @@ 32768 16384 16384 10.01 40.23 @end example -Where we see that netperf did not meet the desired convidence -intervals. Instead of being 99% confident it was within +/- 2.5% of -the real mean value of throughput it is only confident it was within -+/-3.4%. In this example, increasing the @option{-i} option -(described below) and/or increasing the iteration length with the -@option{-l} option might resolve the situation. +In the example above we see that netperf did not meet the desired +convidence intervals. Instead of being 99% confident it was within ++/- 2.5% of the real mean value of throughput it is only confident it +was within +/-3.4%. In this example, increasing the @option{-i} +option (described below) and/or increasing the iteration length with +the @option{-l} option might resolve the situation. + +In an explicit ``omni'' test, failure to meet the confidence intervals +will not result in netperf emitting a warning. To verify the hitting, +or not, of the confidence intervals one will need to include them as +part of an an @ref{Omni Output Selection,output selection} in the +test-specific @option{-o}, @option{-O} or @option{k} output selection +options. The warning about not hitting the confidence intervals will +remain in a ``migrated'' classic netperf test. @vindex -i, Global @item -i @@ -946,19 +953,57 @@ is silently floored at 3. Netperf repeats the measurement the minimum number of iterations and continues until it reaches either the desired confidence interval, or the maximum number of iterations, -whichever comes first. +whichever comes first. A classic or migrated netperf test will not +display the actual number of iterations run. An @ref{The Omni +Tests,omni test} will emit the number of iterations run if the +@code{CONFIDENCE_ITERATION} output selector is included in the +@ref{Omni Output Selection,output selection}. If the @option{-I} option is specified and the @option{-i} option omitted the maximum number of iterations is set to 10 and the minimum to three. -If netperf determines that the desired confidence intervals have not -been met, it emits a noticeable warning. +Output of a warning upon not hitting the desired confidence intervals +follows the description provided for the @option{-I} option. The total test time will be somewhere between the minimum and maximum number of iterations multiplied by the test length supplied by the @option{-l} option. +@vindex -j, Global +@item -j +This option instructs netperf to keep additional timing statistics +when explicitly running an @ref{The Omni Tests,omni test}. These can +be output when the test-specific @option{-o}, @option{-O} or +@option{-k} @ref{Omni Output Selectors,output selectors} include one +or more of: + +@itemize +@item MIN_LATENCY +@item MAX_LATENCY +@item P50_LATENCY +@item P90_LATENCY +@item P99_LATENCY +@item MEAN_LATENCY +@item STDDEV_LATENCY +@end itemize + +These statistics will be based on an expanded (100 buckets per row +rather than 10) histogram of times rather than a terribly long list of +individual times. As such, there will be some slight error thanks to +the bucketing. However, the reduction in storage and processing +overheads is well worth it. When running a request/response test, one +might get some idea of the error by comparing the @ref{Omni Output +Selectors,@code{MEAN_LATENCY}} calculated from the histogram with the +@code{RT_LATENCY} calculated from the number of request/response +transactions and the test run time. + +In the case of a request/response test the latencies will be +transaction latencies. In the case of a receive-only test they will +be time spent in the receive call. In the case of a send-only test +they will be tim spent in the send call. The units will be +microseconds. Added in netperf 2.5.0. + @vindex -l, Global @item -l testlen This option controls the length of any @b{one} iteration of the requested @@ -967,7 +1012,8 @@ @var{testlen} will run each iteration for the absolute value of @var{testlen} transactions for a _RR test or bytes for a _STREAM test. Certain tests, notably those using UDP can only be timed, they cannot -be limited by transaction or byte count. +be limited by transaction or byte count. This limitation may be +relaxed in an @ref{The Omni Tests,omni} test. In some situations, individual iterations of a test may run for longer for the number of seconds specified by the @option{-l} option. In @@ -1008,6 +1054,11 @@ determine the number of CPUs that can only be set for netserver via a netserver @option{-n} command-line option. +As it is almost universally possible for netperf/netserver to +determine the number of CPUs on the system automagically, 99 times out +of 10 this option should not be necessary and may be removed in a +future release of netperf. + @vindex -N, Global @item -N This option tells netperf to forego establishing a control @@ -1032,7 +1083,7 @@ is not possible to set ``remote'' properties such as socket buffer size and the like via the netperf command line. Nor is it possible to retrieve such interesting remote information as CPU utilization. -These items will be set to values which when displayed should make it +These items will be displayed as values which should make it immediately obvious that was the case. The only way to change remote characteristics such as socket buffer @@ -1053,15 +1104,15 @@ @example -o 3 -a 4096 @end example -will cause the buffers passed to the local send and receive calls to -begin three bytes past an address aligned to 4096 bytes. [Default: 0 -bytes] +will cause the buffers passed to the local (netperf) send and receive +calls to begin three bytes past an address aligned to 4096 +bytes. [Default: 0 bytes] @vindex -O, Global @item -O This option behaves just as the @option{-o} option but on the remote -system and in conjunction with the @option{-A} option. [Default: 0 -bytes] +(netserver) system and in conjunction with the @option{-A} +option. [Default: 0 bytes] @vindex -p, Global @item -p @@ -1096,6 +1147,27 @@ succession where the test banners would then simply be redundant and unnecessarily clutter the output. [Default: 1 - display test banners] +@vindex -s, Global +@item -s +This option will cause netperf to sleep @samp{} before +actually transferring data over the data connection. This may be +useful in situations where one wishes to start a great many netperf +instances and do not want the earlier ones affecting the ability of +the later ones to get established. + +Added somewhere between versions 2.4.3 and 2.5.0. + +@vindex -S, Global +@item -S +This option will cause an attempt to be made to set SO_KEEPALIVE on +the data socket of a test using the BSD sockets interface. The +attempt will be made on the netperf side of all tests, and will be +made on the netserver side of an @ref{The Omni Tests,omni} or +@ref{Migrated Tests,migrated} test. No indication of failure is given +unless debug output is enabled with the global @option{-d} option. + +Added in version 2.5.0. + @vindex -t, Global @item -t testname This option is used to tell netperf which test you wish to run. As of @@ -1115,17 +1187,45 @@ @ref{DLCO_STREAM}, @ref{DLCO_RR}, @ref{DLCL_STREAM}, @ref{DLCL_RR} @item @ref{Other Netperf Tests,LOC_CPU}, @ref{Other Netperf Tests,REM_CPU} +@item +@ref{The Omni Tests,OMNI} @end itemize Not all tests are always compiled into netperf. In particular, the -``XTI,'' ``SCTP,'' ``UNIX,'' and ``DL*'' tests are only included in +``XTI,'' ``SCTP,'' ``UNIXDOMAIN,'' and ``DL*'' tests are only included in netperf when configured with -@option{--enable-[xti|sctp|unix|dlpi]=yes}. +@option{--enable-[xti|sctp|unixdomain|dlpi]=yes}. Netperf only runs one type of test no matter how many @option{-t} options may be present on the command-line. The last @option{-t} global command-line option will determine the test to be run. [Default: TCP_STREAM] +@vindex -T, Global +@item -T +This option controls the CPU, and probably by extension memory, +affinity of netperf and/or netserver. +@example +netperf -T 1 +@end example +will bind both netperf and netserver to ``CPU 1'' on their respective +systems. +@example +netperf -T 1, +@end example +will bind just netperf to ``CPU 1'' and will leave netserver unbound. +@example +netperf -T ,2 +@end example +will leave netperf unbound and will bind netserver to ``CPU 2.'' +@example +netperf -T 1,2 +@end example +will bind netperf to ``CPU 1'' and netserver to ``CPU 2.'' + +This can be particularly useful when investigating performance issues +involving where processes run relative to where NIC interrupts are +processed or where NICs allocate their DMA buffers. + @vindex -v, Global @item -v verbosity This option controls how verbose netperf will be in its output, and is @@ -1149,6 +1249,18 @@ each transaction if netperf was configured with @option{--enable-histogram=yes}. [Default: 1 - normal verbosity] +In an @ref{The Omni Tests,omni} test the verbosity setting is largely +ignored, save for when asking for the time histogram to be displayed. +In version 2.5.0 there is no @ref{Omni Output Selectors,output +selector} for the histogram and so it remains displayed only when the +verbosity level is set to 2. + +@vindex -V, Global +@item -V +This option displays the netperf version and then exits. + +Added in netperf 2.4.4. + @vindex -w, Global @item -w time If netperf was configured with @option{--enable-intervals=yes} then @@ -1195,8 +1307,8 @@ The most commonly measured aspect of networked system performance is that of bulk or unidirectional transfer performance. Everyone wants to know how many bits or bytes per second they can push across the -network. The netperf convention for a bulk data transfer test name is -to tack a ``_STREAM'' suffix to a test name. +network. The classic netperf convention for a bulk data transfer test +name is to tack a ``_STREAM'' suffix to a test name. @menu * Issues in Bulk Transfer:: @@ -1229,7 +1341,8 @@ of a netperf _STREAM test cannot make use of much more than the power of one CPU. Exceptions to this generally occur when netperf and/or netserver run on CPU(s) other than the CPU(s) taking interrupts from -the NIC(s). +the NIC(s). In that case, one might see as much as two CPUs' worth of +processing being used to service the flow of data. Distance and the speed-of-light can affect performance for a bulk-transfer; often this can be mitigated by using larger windows. @@ -1274,14 +1387,30 @@ is indicated. The @uref{ftp://ftp.cup.hp.com/dist/networking/tools/,beforeafter} utility can be used to subtract the statistics in @file{before} from the -statistics in @file{after} +statistics in @file{after}: @example beforeafter before after > delta @end example and then one can look at the statistics in @file{delta}. Beforeafter -is distributed in source form so one can compile it on the platofrm(s) +is distributed in source form so one can compile it on the platform(s) of interest. +If running a version 2.5.0 or later ``omni'' test under Linux one can +include either or both of: +@itemize +@item LOCAL_TRANSPORT_RETRANS +@item REMOTE_TRANSPORT_RETRANS +@end itemize + +in the values provided via a test-specific @option{-o}, @option{-O}, +or @option{-k} output selction option and netperf will report the +retransmissions experienced on the data connection, as reported via a +@code{getsockopt(TCP_INFO)} call. If confidence intervals have been +requested via the global @option{-I} or @option{-i} options, the +reported value(s) will be for the last iteration. If the test is over +a protocol other than TCP, or on a platform other than Linux, the +results are undefined. + While it was written with HP-UX's netstat in mind, the @uref{ftp://ftp.cup.hp.com/dist/networking/briefs/annotated_netstat.txt,annotated netstat} writeup may be helpful with other platforms as well. @@ -1361,14 +1490,14 @@ @vindex -s, Test-specific @item -s -This option sets the local send and receive socket buffer sizes for -the data connection to the value(s) specified. Often, this will -affect the advertised and/or effective TCP or other window, but on -some platforms it may not. By default the units are bytes, but suffix -of ``G,'' ``M,'' or ``K'' will specify the units to be 2^30 (GB), 2^20 -(MB) or 2^10 (KB) respectively. A suffix of ``g,'' ``m'' or ``k'' -will specify units of 10^9, 10^6 or 10^3 bytes respectively. For -example: +This option sets the local (netperf) send and receive socket buffer +sizes for the data connection to the value(s) specified. Often, this +will affect the advertised and/or effective TCP or other window, but +on some platforms it may not. By default the units are bytes, but +suffix of ``G,'' ``M,'' or ``K'' will specify the units to be 2^30 +(GB), 2^20 (MB) or 2^10 (KB) respectively. A suffix of ``g,'' ``m'' +or ``k'' will specify units of 10^9, 10^6 or 10^3 bytes +respectively. For example: @example @code{-s 128K} @end example @@ -1378,8 +1507,8 @@ While the historic expectation is that setting the socket buffer size has a direct effect on say the TCP window, today that may not hold true for all stacks. Further, while the historic expectation is that -the value specified in a setsockopt() call will be the value returned -via a getsockopt() call, at least one stack is known to deliberately +the value specified in a @code{setsockopt()} call will be the value returned +via a @code{getsockopt()} call, at least one stack is known to deliberately ignore history. When running under Windows a value of 0 may be used which will be an indication to the stack the user wants to enable a form of copy avoidance. [Default: -1 - use the system's default socket @@ -1387,25 +1516,25 @@ @vindex -S Test-specific @item -S -This option sets the remote send and/or receive socket buffer sizes -for the data connection to the value(s) specified. Often, this -will affect the advertised and/or effective TCP or other window, but -on some platforms it may not. By default the units are bytes, but -suffix of ``G,'' ``M,'' or ``K'' will specify the units to be 2^30 -(GB), 2^20 (MB) or 2^10 (KB) respectively. A suffix of ``g,'' ``m'' -or ``k'' will specify units of 10^9, 10^6 or 10^3 bytes respectively. -For example: +This option sets the remote (netserver) send and/or receive socket +buffer sizes for the data connection to the value(s) specified. +Often, this will affect the advertised and/or effective TCP or other +window, but on some platforms it may not. By default the units are +bytes, but suffix of ``G,'' ``M,'' or ``K'' will specify the units to +be 2^30 (GB), 2^20 (MB) or 2^10 (KB) respectively. A suffix of ``g,'' +``m'' or ``k'' will specify units of 10^9, 10^6 or 10^3 bytes +respectively. For example: @example @code{-s 128K} @end example -Will request the local send and receive socket buffer sizes to be +Will request the remote send and receive socket buffer sizes to be 128KB or 131072 bytes. While the historic expectation is that setting the socket buffer size has a direct effect on say the TCP window, today that may not hold true for all stacks. Further, while the historic expectation is that -the value specified in a setsockopt() call will be the value returned -via a getsockopt() call, at least one stack is known to deliberately +the value specified in a @code{setsockopt()} call will be the value returned +via a @code{getsockopt()} call, at least one stack is known to deliberately ignore history. When running under Windows a value of 0 may be used which will be an indication to the stack the user wants to enable a form of copy avoidance. [Default: -1 - use the system's default socket @@ -1512,9 +1641,14 @@ We see that the default receive socket buffer size for the receiver (lag - HP-UX 11.23) is 32768 bytes, and the default socket send buffer -size for the sender (Debian 2.6 kernel) is 16384 bytes. Througput is -expressed as 10^6 (aka Mega) bits per second, and the test ran for 10 -seconds. IPv4 addresses (AF_INET) were used. +size for the sender (Debian 2.6 kernel) is 16384 bytes, however Linux +does ``auto tuning'' of socket buffer and TCP window sizes, which +means the send socket buffer size may be different at the end of the +test than it was at the beginning. This is addressed in the @ref{The +Omni Tests,omni tests} added in version 2.5.0 and @ref{Omni Output +Selection,output selection}. Througput is expressed as 10^6 (aka +Mega) bits per second, and the test ran for 10 seconds. IPv4 +addresses (AF_INET) were used. @node TCP_MAERTS, TCP_SENDFILE, TCP_STREAM, Options common to TCP UDP and SCTP tests @comment node-name, next, previous, up @@ -1542,7 +1676,7 @@ @end example Where we see that Linux, unlike HP-UX, may not return the same value -in a getsockopt() as was requested in the prior setsockopt(). +in a @code{getsockopt()} as was requested in the prior @code{setsockopt()}. This test is included more for benchmarking convenience than anything else. @@ -1568,12 +1702,15 @@ no opportunity to reserve space for headers and so a packet will be contained in two or more buffers. -The @ref{Global Options,global @option{-F} option} is required for this test and it must -specify a file of at least the size of the send ring (@xref{Global -Options,the global @option{-W} option}.) multiplied by the send size -(@xref{Options common to TCP UDP and SCTP tests,the test-specific -@option{-m} option}.). All other TCP-specific options are available -and optional. +As of some time before version 2.5.0, the @ref{Global Options,global +@option{-F} option} is no longer required for this test. If it is not +specified, netperf will create a temporary file, which it will delete +at the end of the test. If the @option{-F} option is specified it +must reference a file of at least the size of the send ring +(@xref{Global Options,the global @option{-W} option}.) multiplied by +the send size (@xref{Options common to TCP UDP and SCTP tests,the +test-specific @option{-m} option}.). All other TCP-specific options +remain available and optional. In this first example: @example @@ -1586,7 +1723,7 @@ we see what happens when the file is too small. Here: @example -$ ../src/netperf -H lag -F /boot/vmlinuz-2.6.8-1-686 -t TCP_SENDFILE -- -s 128K -S 128K +$ netperf -H lag -F /boot/vmlinuz-2.6.8-1-686 -t TCP_SENDFILE -- -s 128K -S 128K TCP SENDFILE TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to lag.hpl.hp.com (15.4.89.214) port 0 AF_INET Recv Send Send Socket Socket Message Elapsed @@ -1789,8 +1926,8 @@ the pipes in the system default for the @code{tempnam()} call. The STREAM_STREAM test is only present if netperf was configured with -@code{--enable-unix=yes}. The remote netserver must have also been -configured with @code{--enable-unix=yes}. +@code{--enable-unixdomain=yes}. The remote netserver must have also been +configured with @code{--enable-unixdomain=yes}. @node DG_STREAM, , STREAM_STREAM, Options common to TCP UDP and SCTP tests @comment node-name, next, previous, up @@ -1805,8 +1942,8 @@ test. The DG_STREAM test is only present if netperf was configured with -@code{--enable-unix=yes}. The remote netserver must have also been -configured with @code{--enable-unix=yes}. +@code{--enable-unixdomain=yes}. The remote netserver must have also been +configured with @code{--enable-unixdomain=yes}. @node Using Netperf to Measure Request/Response , Using Netperf to Measure Aggregate Performance, Using Netperf to Measure Bulk Data Transfer, Top @@ -1814,31 +1951,36 @@ Request/response performance is often overlooked, yet it is just as important as bulk-transfer performance. While things like larger -socket buffers and TCP windows can cover a multitude of latency and -even path-length sins, they cannot easily hide from a request/response -test. The convention for a request/response test is to have a _RR -suffix. There are however a few ``request/response'' tests that have -other suffixes. +socket buffers and TCP windows, and stateless offloads like TSO and +LRO can cover a multitude of latency and even path-length sins, those +sins cannot easily hide from a request/response test. The convention +for a request/response test is to have a _RR suffix. There are +however a few ``request/response'' tests that have other suffixes. A request/response test, particularly synchronous, one transaction at -at time test such as those found in netperf, is particularly sensitive -to the path-length of the networking stack. An _RR test can also -uncover those platforms where the NIC's are strapped by default with -overbearing interrupt avoidance settings in an attempt to increase the -bulk-transfer performance (or rather, decrease the CPU utilization of -a bulk-transfer test). This sensitivity is most acute for small -request and response sizes, such as the single-byte default for a -netperf _RR test. +at time test such as those found by default in netperf, is +particularly sensitive to the path-length of the networking stack. An +_RR test can also uncover those platforms where the NIC's are strapped +by default with overbearing interrupt avoidance settings in an attempt +to increase the bulk-transfer performance (or rather, decrease the CPU +utilization of a bulk-transfer test). This sensitivity is most acute +for small request and response sizes, such as the single-byte default +for a netperf _RR test. While a bulk-transfer test reports its results in units of bits or -bytes transfered per second, a mumble_RR test reports transactions per -second where a transaction is defined as the completed exchange of a -request and a response. One can invert the transaction rate to arrive -at the average round-trip latency. If one is confident about the -symmetry of the connection, the average one-way latency can be taken -as one-half the average round-trip latency. Netperf does not do -either of these on its own but leaves them as exercises to the -benchmarker. +bytes transfered per second, by default a mumble_RR test reports +transactions per second where a transaction is defined as the +completed exchange of a request and a response. One can invert the +transaction rate to arrive at the average round-trip latency. If one +is confident about the symmetry of the connection, the average one-way +latency can be taken as one-half the average round-trip latency. As of +version 2.5.0 (actually slightly before) netperf still does not do the +latter, but will do the former if one sets the verbosity to 2 for a +classic netperf test, or includes the apropriate @ref{Omni Output +Selectors,output selector} in an @ref{The Omni Tests,omni test}. It +will also allow the user to switch the throughput units from +transactions per secont to bits or bytes per second with the global +@option{-f} option. @menu * Issues in Request/Response:: @@ -1847,7 +1989,7 @@ @node Issues in Request/Response, Options Common to TCP UDP and SCTP _RR tests, Using Netperf to Measure Request/Response , Using Netperf to Measure Request/Response @comment node-name, next, previous, up -@section Issues in Reqeust/Response +@section Issues in Request/Response Most if not all the @ref{Issues in Bulk Transfer} apply to request/response. The issue of round-trip latency is even more @@ -1866,6 +2008,13 @@ as there is no opportunity for a @dfn{fast retransmit} or retransmission prior to a retransmission timer expiring. +Virtualization may considerably increase the effective path length of +a networking stack. While this may not preclude achieving link-rate +on a comparatively slow link (eg 1 Gigabit Ethernet) on a _STREAM +test, it can show-up as measurably fewer transactions per second on an +_RR test. However, this may still be masked by interrupt coalescing +in the NIC/driver. + Certain NICs have ways to minimize the number of interrupts sent to the host. If these are strapped badly they can significantly reduce the performance of something like a single-byte request/response test. @@ -1940,10 +2089,10 @@ @vindex -s, Test-specific @item -s -This option sets the local send and receive socket buffer sizes for -the data connection to the value(s) specified. Often, this will -affect the advertised and/or effective TCP or other window, but on -some platforms it may not. By default the units are bytes, but a +This option sets the local (netperf) send and receive socket buffer +sizes for the data connection to the value(s) specified. Often, this +will affect the advertised and/or effective TCP or other window, but +on some platforms it may not. By default the units are bytes, but a suffix of ``G,'' ``M,'' or ``K'' will specify the units to be 2^30 (GB), 2^20 (MB) or 2^10 (KB) respectively. A suffix of ``g,'' ``m'' or ``k'' will specify units of 10^9, 10^6 or 10^3 bytes @@ -1951,8 +2100,8 @@ @example @code{-s 128K} @end example -Will request the local send and receive socket buffer sizes to be -128KB or 131072 bytes. +Will request the local send (netperf) and receive socket buffer sizes +to be 128KB or 131072 bytes. While the historic expectation is that setting the socket buffer size has a direct effect on say the TCP window, today that may not hold @@ -1963,19 +2112,19 @@ @vindex -S, Test-specific @item -S -This option sets the remote send and/or receive socket buffer sizes -for the data connection to the value(s) specified. Often, this -will affect the advertised and/or effective TCP or other window, but -on some platforms it may not. By default the units are bytes, but a -suffix of ``G,'' ``M,'' or ``K'' will specify the units to be 2^30 -(GB), 2^20 (MB) or 2^10 (KB) respectively. A suffix of ``g,'' ``m'' -or ``k'' will specify units of 10^9, 10^6 or 10^3 bytes respectively. -For example: +This option sets the remote (netserver) send and/or receive socket +buffer sizes for the data connection to the value(s) specified. +Often, this will affect the advertised and/or effective TCP or other +window, but on some platforms it may not. By default the units are +bytes, but a suffix of ``G,'' ``M,'' or ``K'' will specify the units +to be 2^30 (GB), 2^20 (MB) or 2^10 (KB) respectively. A suffix of +``g,'' ``m'' or ``k'' will specify units of 10^9, 10^6 or 10^3 bytes +respectively. For example: @example @code{-s 128K} @end example -Will request the local send and receive socket buffer sizes to be -128KB or 131072 bytes. +Will request the remote (netserver) send and receive socket buffer +sizes to be 128KB or 131072 bytes. While the historic expectation is that setting the socket buffer size has a direct effect on say the TCP window, today that may not hold @@ -2014,15 +2163,15 @@ @end menu @node TCP_RR, TCP_CC, Options Common to TCP UDP and SCTP _RR tests, Options Common to TCP UDP and SCTP _RR tests +@subsection TCP_RR @cindex Measuring Latency @cindex Latency, Request-Response -@subsection TCP_RR A TCP_RR (TCP Request/Response) test is requested by passing a value of ``TCP_RR'' to the global @option{-t} command-line option. A TCP_RR -test can be though-of as a user-space to user-space @code{ping} with -no think time - it is a synchronous, one transaction at a time, -request/response test. +test can be thought-of as a user-space to user-space @code{ping} with +no think time - it is by default a synchronous, one transaction at a +time, request/response test. The transaction rate is the number of complete transactions exchanged divided by the length of time it took to perform those transactions. @@ -2036,7 +2185,7 @@ Time to establish the TCP connection is not counted in the result. If you want connection setup overheads included, you should consider the -TCP_CC or TCP_CRR tests. +@ref{TCP_CC,TPC_CC} or @ref{TCP_CRR,TCP_CRR} tests. If specifying the @option{-D} option to set TCP_NODELAY and disable the Nagle Algorithm increases the transaction rate reported by a @@ -2063,12 +2212,13 @@ In this example the request and response sizes were one byte, the socket buffers were left at their defaults, and the test ran for all -of 10 seconds. The transaction per second rate was rather good :) +of 10 seconds. The transaction per second rate was rather good for +the time :) @node TCP_CC, TCP_CRR, TCP_RR, Options Common to TCP UDP and SCTP _RR tests +@subsection TCP_CC @cindex Connection Latency @cindex Latency, Connection Establishment -@subsection TCP_CC A TCP_CC (TCP Connect/Close) test is requested by passing a value of ``TCP_CC'' to the global @option{-t} option. A TCP_CC test simply @@ -2106,26 +2256,26 @@ ``common'' test-specific options are likely to have an effect, if any, on the results. The @option{-s} and @option{-S} options _may_ have some effect if they alter the number and/or type of options carried in -the TCP SYNchronize segments. The @option{-P} and @option{-r} -options are utterly ignored. +the TCP SYNchronize segments, such as Window Scaling or Timestamps. +The @option{-P} and @option{-r} options are utterly ignored. Since connection establishment and tear-down for TCP is not symmetric, a TCP_CC test is not symmetric in its loading of the two systems under test. @node TCP_CRR, UDP_RR, TCP_CC, Options Common to TCP UDP and SCTP _RR tests +@subsection TCP_CRR @cindex Latency, Connection Establishment @cindex Latency, Request-Response -@subsection TCP_CRR The TCP Connect/Request/Response (TCP_CRR) test is requested by passing a value of ``TCP_CRR'' to the global @option{-t} command-line -option. A TCP_RR test is like a merger of a TCP_RR and TCP_CC test -which measures the performance of establishing a connection, exchanging -a single request/response transaction, and tearing-down that -connection. This is very much like what happens in an HTTP 1.0 or -HTTP 1.1 connection when HTTP Keepalives are not used. In fact, the -TCP_CRR test was added to netperf to simulate just that. +option. A TCP_CRR test is like a merger of a @ref{TCP_RR} and +@ref{TCP_CC} test which measures the performance of establishing a +connection, exchanging a single request/response transaction, and +tearing-down that connection. This is very much like what happens in +an HTTP 1.0 or HTTP 1.1 connection when HTTP Keepalives are not used. +In fact, the TCP_CRR test was added to netperf to simulate just that. Since a request and response are exchanged the @option{-r}, @option{-s} and @option{-S} options can have an effect on the @@ -2137,9 +2287,9 @@ when the request and response sizes are the same. @node UDP_RR, XTI_TCP_RR, TCP_CRR, Options Common to TCP UDP and SCTP _RR tests +@subsection UDP_RR @cindex Latency, Request-Response @cindex Packet Loss -@subsection UDP_RR A UDP Request/Response (UDP_RR) test is requested by passing a value of ``UDP_RR'' to a global @option{-t} option. It is very much the @@ -2150,7 +2300,12 @@ _any_ request or response is lost, the exchange of requests and responses will stop from that point until the test timer expires. Netperf will not really ``know'' this has happened - the only symptom -will be a low transaction per second rate. +will be a low transaction per second rate. If @option{--enable-burst} +was included in the @code{configure} command and a test-specific +@option{-b} option used, the UDP_RR test will ``survive'' the loss of +requests and responses until the sum is one more than the value passed +via the @option{-b} option. It will though almost certainly run more +slowly. The netperf side of a UDP_RR test will call @code{connect()} on its data socket and thenceforth use the @code{send()} and @code{recv()} @@ -2181,8 +2336,8 @@ netserver ran on a given CPU and did not move around during the test. @node XTI_TCP_RR, XTI_TCP_CC, UDP_RR, Options Common to TCP UDP and SCTP _RR tests -@cindex Latency, Request-Response @subsection XTI_TCP_RR +@cindex Latency, Request-Response An XTI_TCP_RR test is essentially the same as a @ref{TCP_RR} test only using the XTI rather than BSD Sockets interface. It is requested by @@ -2195,18 +2350,33 @@ @node XTI_TCP_CC, XTI_TCP_CRR, XTI_TCP_RR, Options Common to TCP UDP and SCTP _RR tests @comment node-name, next, previous, up -@cindex Latency, Connection Establishment @subsection XTI_TCP_CC +@cindex Latency, Connection Establishment + +An XTI_TCP_CC test is essentially the same as a @ref{TCP_CC,TCP_CC} +test, only using the XTI rather than BSD Sockets interface. + +The test-specific options for an XTI_TCP_CC test are the same as those +for a TCP_CC test with the addition of the @option{-X } option to +specify the names of the local and/or remote XTI device file(s). @node XTI_TCP_CRR, XTI_UDP_RR, XTI_TCP_CC, Options Common to TCP UDP and SCTP _RR tests @comment node-name, next, previous, up +@subsection XTI_TCP_CRR @cindex Latency, Connection Establishment @cindex Latency, Request-Response -@subsection XTI_TCP_CRR + +The XTI_TCP_CRR test is essentially the same as a +@ref{TCP_CRR,TCP_CRR} test, only using the XTI rather than BSD Sockets +interface. + +The test-specific options for an XTI_TCP_CRR test are the same as those +for a TCP_RR test with the addition of the @option{-X } option to +specify the names of the local and/or remote XTI device file(s). @node XTI_UDP_RR, DLCL_RR, XTI_TCP_CRR, Options Common to TCP UDP and SCTP _RR tests -@cindex Latency, Request-Response @subsection XTI_UDP_RR +@cindex Latency, Request-Response An XTI_UDP_RR test is essentially the same as a UDP_RR test only using the XTI rather than BSD Sockets interface. It is requested by passing @@ -2220,28 +2390,30 @@ @node DLCL_RR, DLCO_RR, XTI_UDP_RR, Options Common to TCP UDP and SCTP _RR tests @comment node-name, next, previous, up -@cindex Latency, Request-Response @subsection DLCL_RR +@cindex Latency, Request-Response @node DLCO_RR, SCTP_RR, DLCL_RR, Options Common to TCP UDP and SCTP _RR tests @comment node-name, next, previous, up -@cindex Latency, Request-Response @subsection DLCO_RR +@cindex Latency, Request-Response @node SCTP_RR, , DLCO_RR, Options Common to TCP UDP and SCTP _RR tests @comment node-name, next, previous, up -@cindex Latency, Request-Response @subsection SCTP_RR +@cindex Latency, Request-Response @node Using Netperf to Measure Aggregate Performance, Using Netperf to Measure Bidirectional Transfer, Using Netperf to Measure Request/Response , Top @comment node-name, next, previous, up +@chapter Using Netperf to Measure Aggregate Performance @cindex Aggregate Performance @vindex --enable-burst, Configure -@chapter Using Netperf to Measure Aggregate Performance -@ref{Netperf4,Netperf4} is the preferred benchmark to use when one -wants to measure aggregate performance because netperf has no support -for explicit synchronization of concurrent tests. +Ultimately, @ref{Netperf4,Netperf4} will be the preferred benchmark to +use when one wants to measure aggregate performance because netperf +has no support for explicit synchronization of concurrent tests. Until +netperf4 is ready for prime time, one can make use of the heuristics +and procedures mentioned here for the 85% solution. Basically, there are two ways to measure aggregate performance with netperf. The first is to run multiple, concurrent netperf tests and @@ -2318,7 +2490,12 @@ not advised, particularly when/if the CPU utilization approaches 100 percent. In the example above we see that the CPU utilization on the local system remains the same for all four tests, and is only off by -0.01 out of 5.09 on the remote system. +0.01 out of 5.09 on the remote system. As the number of CPUs in the +system increases, and so too the odds of saturating a single CPU, the +accuracy of similar CPU utilization implying little skew error is +diminished. This is also the case for those increasingly rare single +CPU systems if the utilization is reported as 100% or very close to +it. @quotation @b{NOTE: It is very important to rememeber that netperf is calculating @@ -2351,25 +2528,66 @@ tests. Even if you see the Netperf Contributing Editor acting to the contrary!-) +@menu +* Issues in Running Concurrent Tests:: +@end menu + +@node Issues in Running Concurrent Tests, , Running Concurrent Netperf Tests, Running Concurrent Netperf Tests +@subsection Issues in Running Concurrent Tests + +In addition to the aforementioned issue of skew error, there can be +other issues to consider when running concurrent netperf tests. + +For example, when running concurrent tests over multiple interfaces, +one is not always assured that the traffic one thinks went over a +given interface actually did so. In particular, the Linux networking +stack takes a particularly strong stance on its following the so +called @samp{weak end system model}. As such, it is willing to answer +ARP requests for any of its local IP addresses on any of its +interfaces. If multiple interfaces are connected to the same +broadcast domain, then even if they are configured into separate IP +subnets there is no a priori way of knowing which interface was +actually used for which connection(s). This can be addressed by +setting the @samp{arp_ignore} sysctl before configuring interfaces. + +As it is quite important, we will repeat that it is very important to +rememeber that each concurrent netperf instance is calculating +system-wide CPU utilization. When calculating the service demand each +netperf assumes it is the only thing running on the system. This +means that for concurrent tests the service demands reported by +netperf @b{will be wrong}. One has to compute service demands for +concurrent tests by hand + @node Using --enable-burst, , Running Concurrent Netperf Tests, Using Netperf to Measure Aggregate Performance @comment node-name, next, previous, up @section Using --enable-burst -If one configures netperf with @code{--enable-burst}: +Starting in version 2.5.0 @code{--enable-burst=yes} is the default, +which means one no longer must: @example configure --enable-burst @end example -Then a test-specific @option{-b num} option is added to the -@ref{TCP_RR,TCP_RR} and @ref{UDP_RR,UDP_RR} tests. This option causes -TCP_RR and UDP_RR to quickly work their way up to having at least -@option{num} transactions in flight at one time. - -This is used as an alternative to or even in conjunction with -multiple-concurrent _RR tests. When run with just a single instance -of netperf, increasing the burst size can determine the maximum number -of transactions per second can be serviced by a single process: +To have burst-mode functionality present in netperf. This enables a +test-specific @option{-b num} option in @ref{TCP_RR,TCP_RR}, +@ref{UDP_RR,UDP_RR} and @ref{The Omni Tests,omni} tests. + +Normally, netperf will attempt to ramp-up the number of outstanding +requests to @option{num} plus one transactions in flight at one time. +The ramp-up is to avoid transactions being smashed together into a +smaller number of segments when the transport's congestion window (if +any) is smaller at the time than what netperf wants to have +outstanding at one time. If, however, the user specifies a negative +value for @option{num} this ramp-up is bypassed and the burst of sends +is made without consideration of transport congestion window. + +This burst-mode is used as an alternative to or even in conjunction +with multiple-concurrent _RR tests and as a way to implement a +single-connection, bidirectional bulk-transfer test. When run with +just a single instance of netperf, increasing the burst size can +determine the maximum number of transactions per second which can be +serviced by a single process: @example for b in 0 1 2 4 8 16 32 @@ -2390,14 +2608,15 @@ the output to the single figure of merit which in this case the transaction rate. The global @code{-B} option was used to more clearly label the output, and the test-specific @option{-b} option -enabled by @code{--enable-burst} set the number of transactions in -flight at one time. +enabled by @code{--enable-burst} increase the number of transactions +in flight at one time. Now, since the test-specific @option{-D} option was not specified to set TCP_NODELAY, the stack was free to ``bundle'' requests and/or responses into TCP segments as it saw fit, and since the default request and response size is one byte, there could have been some -considerable bundling. If one wants to try to achieve a closer to +considerable bundling even in the absense of transport congestion +window issues. If one wants to try to achieve a closer to one-to-one correspondence between a request and response and a TCP segment, add the test-specific @option{-D} option: @@ -2425,7 +2644,7 @@ @b{NOTE: Even if you set the @option{-D} option that is still not a guarantee that each transaction is in its own TCP segments. You should get into the habit of verifying the relationship between the -transaction rate and the packet rate via other means} +transaction rate and the packet rate via other means.} @end quotation You can also combine @code{--enable-burst} functionality with @@ -2542,7 +2761,7 @@ specified in the test-specific @option{-b} option. -@node Using Netperf to Measure Bidirectional Transfer, Other Netperf Tests, Using Netperf to Measure Aggregate Performance, Top +@node Using Netperf to Measure Bidirectional Transfer, The Omni Tests, Using Netperf to Measure Aggregate Performance, Top @comment node-name, next, previous, up @chapter Using Netperf to Measure Bidirectional Transfer @@ -2563,6 +2782,7 @@ @menu * Bidirectional Transfer with Concurrent Tests:: * Bidirectional Transfer with TCP_RR:: +* Implications of Concurrent Tests vs Burst Request/Response:: @end menu @node Bidirectional Transfer with Concurrent Tests, Bidirectional Transfer with TCP_RR, Using Netperf to Measure Bidirectional Transfer, Using Netperf to Measure Bidirectional Transfer @@ -2584,13 +2804,14 @@ @example for i in 1 do - netperf -H 192.168.2.108 -t TCP_STREAM -B "outbound" -i 10 -P 0 -v 0 -- -s 256K -S 256K & - netperf -H 192.168.2.108 -t TCP_MAERTS -B "inbound" -i 10 -P 0 -v 0 -- -s 256K -S 256K & + netperf -H 192.168.2.108 -t TCP_STREAM -B "outbound" -i 10 -P 0 -v 0 \ + -- -s 256K -S 256K & + netperf -H 192.168.2.108 -t TCP_MAERTS -B "inbound" -i 10 -P 0 -v 0 \ + -- -s 256K -S 256K & done 892.66 outbound 891.34 inbound - @end example We have used a @code{for} loop in the shell with just one iteration @@ -2604,21 +2825,65 @@ the global @option{-i} option is explained in @ref{Running Concurrent Netperf Tests,Running Concurrent Netperf Tests}. -@node Bidirectional Transfer with TCP_RR, , Bidirectional Transfer with Concurrent Tests, Using Netperf to Measure Bidirectional Transfer +Beginning with version 2.5.0 we can accomplish a similar result with +the @ref{The Omni Tests,the omni tests} and @ref{Omni Output +Selectors,output selectors}: + +@example +for i in 1 +do + netperf -H 192.168.1.3 -t omni -l 10 -P 0 -- \ + -d stream -s 256K -S 256K -o throughput,direction & + netperf -H 192.168.1.3 -t omni -l 10 -P 0 -- \ + -d maerts -s 256K -S 256K -o throughput,direction & +done + +805.26,Receive +828.54,Send +@end example + +@node Bidirectional Transfer with TCP_RR, Implications of Concurrent Tests vs Burst Request/Response, Bidirectional Transfer with Concurrent Tests, Using Netperf to Measure Bidirectional Transfer @comment node-name, next, previous, up @section Bidirectional Transfer with TCP_RR -If one configures netperf with @code{--enable-burst} then one can use -the test-specific @option{-b} option to increase the number of -transactions in flight at one time. If one also uses the -r option to -make those transactions larger the test starts to look more and more -like a bidirectional transfer than a request/response test. +Starting with version 2.5.0 the @code{--enable-burst} configure option +defaults to @code{yes}, and starting some time before version 2.5.0 +but after 2.4.0 the global @option{-f} option would affect the +``throughput'' reported by request/response tests. If one uses the +test-specific @option{-b} option to have several ``transactions'' in +flight at one time and the test-specific @option{-r} option to +increase their size, the test looks more and more like a +single-connection bidirectional transfer than a simple +request/response test. + +So, putting it all together one can do something like: -Now, the logic behing @code{--enable-burst} is very simple, and there +@example +netperf -f m -t TCP_RR -H 192.168.1.3 -v 2 -- -b 6 -r 32K -S 256K -S 256K +MIGRATED TCP REQUEST/RESPONSE TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to 192.168.1.3 (192.168.1.3) port 0 AF_INET : interval : first burst 6 +Local /Remote +Socket Size Request Resp. Elapsed +Send Recv Size Size Time Throughput +bytes Bytes bytes bytes secs. 10^6bits/sec + +16384 87380 32768 32768 10.00 1821.30 +524288 524288 +Alignment Offset RoundTrip Trans Throughput +Local Remote Local Remote Latency Rate 10^6bits/s +Send Recv Send Recv usec/Tran per sec Outbound Inbound + 8 0 0 0 2015.402 3473.252 910.492 910.492 +@end example + +to get a bidirectional bulk-throughput result. As one can see, the -v +2 output will include a number of interesting, related values. + +@quotation +@b{NOTE: The logic behind @code{--enable-burst} is very simple, and there are no calls to @code{poll()} or @code{select()} which means we want to make sure that the @code{send()} calls will never block, or we run the risk of deadlock with each side stuck trying to call @code{send()} -and neither calling @code{recv()}. +and neither calling @code{recv()}.} +@end quotation Fortunately, this is easily accomplished by setting a ``large enough'' socket buffer size with the test-specific @option{-s} and @option{-S} @@ -2626,37 +2891,902 @@ versions of netperf might attempt to do this automagically, but there are some issues to be worked-out. -Here then is an example of a bidirectional transfer test using -@code{--enable-burst} and the @ref{TCP_RR,TCP_RR} test: +@node Implications of Concurrent Tests vs Burst Request/Response, , Bidirectional Transfer with TCP_RR, Using Netperf to Measure Bidirectional Transfer +@section Implications of Concurrent Tests vs Burst Request/Response + +There are perhaps subtle but important differences between using +concurrent unidirectional tests vs a burst-mode request to measure +bidirectional performance. + +Broadly speaking, a single ``connection'' or ``flow'' of traffic +cannot make use of the services of more than one or two CPUs at either +end. Whether one or two CPUs will be used processing a flow will +depend on the specifics of the stack(s) involved and whether or not +the global @option{-T} option has been used to bind netperf/netserver +to specific CPUs. + +When using concurrent tests there will be two concurrent connections +or flows, which means that upwards of four CPUs will be employed +processing the packets (global @option{-T} used, no more than two if +not), however, with just a single, bidirectional request/response test +no more than two CPUs will be employed (only one if the global +@option{-T} is not used). + +If there is a CPU bottleneck on either system this may result in +rather different results between the two methods. + +Also, with a bidirectional request/response test there is something of +a natural balance or synchronization between inbound and outbound - a +response will not be sent until a request is received, and (once the +burst level is reached) a subseqent request will not be sent until a +response is received. This may mask favoritism in the NIC between +inbound and outbound processing. + +With two concurrent unidirectional tests there is no such +synchronization or balance and any favoritism in the NIC may be exposed. + +@node The Omni Tests, Other Netperf Tests, Using Netperf to Measure Bidirectional Transfer, Top +@chapter The Omni Tests + +Beginning with version 2.5.0, netperf begins a migration to the +@samp{omni} tests or ``Two routines to measure them all.'' The code for +the omni tests can be found in @file{src/nettest_omni.c} and the goal +is to make it easier for netperf to support multiple protocols and +report a great many additional things about the systems under test. +Additionally, a flexible output selection mechanism is present which +allows the user to chose specifically what values she wishes to have +reported and in what format. + +The omni tests are included by default in version 2.5.0. To disable +them, one must: +@example +./configure --enable-omni=no ... +@end example + +and remake netperf. Remaking netserver is optional because even in +2.5.0 it has ``unmigrated'' netserver side routines for the classic +(eg @file{src/nettest_bsd.c}) tests. + +@menu +* Native Omni Tests:: +* Migrated Tests:: +* Omni Output Selection:: +@end menu + +@node Native Omni Tests, Migrated Tests, The Omni Tests, The Omni Tests +@section Native Omni Tests + +One access the omni tests ``natively'' by using a value of ``OMNI'' +with the global @option{-t} test-selection option. This will then +cause netperf to use the code in @file{src/nettest_omni.c} and in +particular the test-specific options parser for the omni tests. The +test-specific options for the omni tests are a superset of those for +``classic'' tests. The options added by the omni tests are: + +@table @code +@vindex -c, Test-specific +@item -c +This explicitly declares that the test is to include connection +establishment and tear-down as in either a TCP_CRR or TCP_CC test. + +@vindex -d, Test-specific +@item -d +This option sets the direction of the test relative to the netperf +process. As of version 2.5.0 one can use the following in a +case-insenstive manner: +@table @code +@item send, stream, transmit, xmit or 2 +Any of which will cause netperf to send to the netserver. +@item recv, receive, maerts or 4 +Any of which will cause netserver to send to netperf. +@item rr or 6 +Either of which will cause a request/response test. +@end table + +Additionally, one can specify two directions separated by a '|' +character and they will be OR'ed together. In this way one can use +the ''Send|Recv'' that will be emitted by the @ref{Omni Output +Selectors,DIRECTION} @ref{Omni Output Selection,output selector} when +used with a request/reponse test. + +@vindex -k, Test-specific +@item -k [@ref{Omni Output Selection,output selector}] +This option sets the style of output to ``keyval'' where each line of +output has the form: @example -netperf -t TCP_RR -H hpcpc108 -- -b 6 -r 32K -s 256K -S 256K -TCP REQUEST/RESPONSE TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to hpcpc108.cup.hp.com (16.89.84.108) port 0 AF_INET : first burst 6 +key=value +@end example +For example: +@example +$ netperf -t omni -- -d rr -k "THROUGHPUT,THROUGHPUT_UNITS" +OMNI TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to localhost.localdomain (127.0.0.1) port 0 AF_INET : demo +THROUGHPUT=59092.65 +THROUGHPUT_UNITS=Trans/s +@end example + +Using the @option{-k} option will override any previous, test-specific +@option{-o} or @option{-O} option. + +@vindex -o, Test-specific +@item -o [@ref{Omni Output Selection,output selector}] +This option sets the style of output to ``CSV'' where there will be +one line of comma-separated values, preceeded by one line of column +names unless the global @option{-P} option is used with a value of 0: +@example +$ netperf -t omni -- -d rr -o "THROUGHPUT,THROUGHPUT_UNITS" +OMNI TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to localhost.localdomain (127.0.0.1) port 0 AF_INET : demo +Throughput,Throughput Units +60999.07,Trans/s +@end example + +Using the @option{-o} option will override any previous, test-specific +@option{-k} or @option{-O} option. + +@vindex -O, Test-specific +@item -O [@ref{Omni Output Selection,output selector}] +This option sets the style of output to ``human readable'' which will +look quite similar to classic netperf output: +@example +$ netperf -t omni -- -d rr -O "THROUGHPUT,THROUGHPUT_UNITS" +OMNI TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to localhost.localdomain (127.0.0.1) port 0 AF_INET : demo +Throughput Throughput + Units + + +60492.57 Trans/s +@end example + +Using the @option{-O} option will override any previous, test-specific +@option{-k} or @option{-o} option. + +@vindex -t, Test-specific +@item -t +This option explicitly sets the socket type for the test's data +connection. As of version 2.5.0 the known socket types include +``stream'' and ``dgram'' for SOCK_STREAM and SOCK_DGRAM respectively. + +@vindex -T, Test-specific +@item -T +This option is used to explicitly set the protocol used for the +test. It is case-insensitive. As of version 2.5.0 the protocols known +to netperf include: +@table @code +@item TCP +Select the Transmission Control Protocol +@item UDP +Select the User Datagram Procotol +@item SDP +Select the Sockets Direct Protocol +@item DCCP +Select the Datagram Congestion Control Protocol +@item SCTP +Select the Stream Control Transport Protocol +@item udplite +Select UDP Lite +@end table + +The default is implicit based on other settings. +@end table + +The omni tests also extend the interpretation of some of the classic, +test-specific options for the BSD Sockets tests: + +@table @code +@item -m +This can set the send size for either or both of the netperf and +netserver sides of the test: +@example +-m 32K +@end example +sets only the netperf-side send size to 32768 bytes, and or's-in +transmit for the direction. This is effectively the same behaviour as +for the classic tests. +@example +-m ,32K +@end example +sets only the netserver side send size to 32768 bytes and or's-in +receive for the direction. +@example +-m 16K,32K +sets the netperf side send size to 16284 bytes, the netserver side +send size to 32768 bytes and the direction will be "Send|Recv." +@end example +@item -M +This can set the receive size for either or both of the netperf and +netserver sides of the test: +@example +-M 32K +@end example +sets only the netserver side receive size to 32768 bytes and or's-in +send for the test direction. +@example +-M ,32K +@end example +sets only the netperf side receive size to 32768 bytes and or's-in +receive for the test direction. +@example +-M 16K,32K +@end example +sets the netserver side receive size to 16384 bytes and the netperf +side receive size to 32768 bytes and the direction will be "Send|Recv." +@end table + +@node Migrated Tests, Omni Output Selection, Native Omni Tests, The Omni Tests +@section Migrated Tests + +As of version 2.5.0 several tests have been migrated to use the omni +code in @file{src/nettest_omni.c} for the core of their testing. A +migrated test retains all its previous output code and so should still +``look and feel'' just like a pre-2.5.0 test with one exception - the +first line of the test banners will include the word ``MIGRATED'' at +the beginning as in: + +@example +$ netperf +MIGRATED TCP STREAM TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to localhost.localdomain (127.0.0.1) port 0 AF_INET : demo +Recv Send Send +Socket Socket Message Elapsed +Size Size Size Time Throughput +bytes bytes bytes secs. 10^6bits/sec + + 87380 16384 16384 10.00 27175.27 +@end example + +The tests migrated in version 2.5.0 are: +@itemize +@item TCP_STREAM +@item TCP_MAERTS +@item TCP_RR +@item TCP_CRR +@item UDP_STREAM +@item UDP_RR +@end itemize + +It is expected that future releases will have additional tests +migrated to use the ``omni'' functionality. + +If one uses ``omni-specific'' test-specific options in conjunction +with a migrated test, instead of using the classic output code, the +new omni output code will be used. For example if one uses the +@option{-k} test-specific option with a value of +``MIN_LATENCY,MAX_LATENCY'' with a migrated TCP_RR test one will see: + +@example +$ netperf -t tcp_rr -- -k THROUGHPUT,THROUGHPUT_UNITS +MIGRATED TCP REQUEST/RESPONSE TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to localhost.localdomain (127.0.0.1) port 0 AF_INET : demo +THROUGHPUT=60074.74 +THROUGHPUT_UNITS=Trans/s +@end example +rather than: +@example +$ netperf -t tcp_rr +MIGRATED TCP REQUEST/RESPONSE TEST from 0.0.0.0 (0.0.0.0) port 0 AF_INET to localhost.localdomain (127.0.0.1) port 0 AF_INET : demo Local /Remote Socket Size Request Resp. Elapsed Trans. Send Recv Size Size Time Rate bytes Bytes bytes bytes secs. per sec -524288 524288 32768 32768 10.01 3525.97 -524288 524288 - +16384 87380 1 1 10.00 59421.52 +16384 87380 @end example -Now, at present netperf does not include a bit or byte rate in the -output of an _RR test which means we must calculate it ourselves. Each -transaction is the exchange of 32768 bytes of request and 32768 bytes -of response, or 65536 bytes. Multiply that by 8 and we arrive at -524288 bits per transaction. Multiply that by 3525.97 and we arrive -at 1848623759 bits per second. Since things were uniform, we can -divide that by two and arrive at roughly 924311879 bits per second -each way. That corresponds to ``link-rate'' for a 1 Gigiabit Ethernet -which happens to be the type of netpwrk used in the example. - -A future version of netperf may perform the calculation on behalf of -the user, but it would likely not emit it unless the user specified a -verbosity of 2 or more with the global @option{-v} option. +@node Omni Output Selection, , Migrated Tests, The Omni Tests +@section Omni Output Selection -@node Other Netperf Tests, Address Resolution, Using Netperf to Measure Bidirectional Transfer, Top +The omni test-specific @option{-k}, @option{-o} and @option{-O} +options take an optional @code{output selector} by which the user can +configure what values are reported. The output selector can take +several forms: + +@table @code +@item @file{filename} +The output selections will be read from the named file. Within the +file there can be up to four lines of comma-separated output +selectors. This controls how many multi-line blocks of output are emitted +when the @option{-O} option is used. This output, while not identical to +``classic'' netperf output, is inspired by it. Multiple lines have no +effect for @option{-k} and @option{-o} options. Putting output +selections in a file can be useful when the list of selections is long. +@item comma and/or semi-colon-separated list +The output selections will be parsed from a comma and/or +semi-colon-separated list of output selectors. When the list is given +to a @option{-O} option a semi-colon specifies a new output block +should be started. Semi-colons have the same meaning as commas when +used with the @option{-k} or @option{-o} options. Depending on the +command interpreter being used, the semi-colon may have to be escaped +somehow to keep it from being interpreted by the command interpreter. +This can often be done by enclosing the entire list in quotes. +@item all +If the keyword @b{all} is specified it means that all known output +values should be displayed at the end of the test. This can be a +great deal of output. As of version 2.5.0 there are 157 different +output selectors. +@item ? +If a ``?'' is given as the output selection, the list of all known +output selectors will be displayed and no test actually run. When +passed to the @option{-O} option they will be listed one per +line. Otherwise they will be listed as a comma-separated list. It may +be necessary to protect the ``?'' from the command interpreter by +escaping it or enclosing it in quotes. +@item no selector +If nothing is given to the @option{-k}, @option{-o} or @option{-O} +option then the code selects a default set of output selectors +inspired by classic netperf output. The format will be the @samp{human +readable} format emitted by the test-specific @option{-O} option. +@end table + +The order of evaluation will first check for an output selection. If +none is specified with the @option{-k}, @option{-o} or @option{-O} +option netperf will select a default based on the characterists of the +test. If there is an output selection, the code will first check for +@samp{?}, then check to see if it is the magic @samp{all} keyword. +After that it will check for either @samp{,} or @samp{;} in the +selection and take that to mean it is a comma and/or +semi-colon-separated list. If none of those checks match, netperf will then +assume the output specification is a filename and attempt to open and +parse the file. + +@menu +* Omni Output Selectors:: +@end menu + +@node Omni Output Selectors, , Omni Output Selection, Omni Output Selection +@subsection Omni Output Selectors + +As of version 2.5.0 the output selectors are: + +@table @code +@item OUTPUT_NONE +This is essentially a null output. For @option{-k} output it will +simply add a line that reads ``OUTPUT_NONE='' to the output. For +@option{-o} it will cause an empty ``column'' to be included. For +@option{-O} output it will cause extra spaces to separate ``real'' output. +@item SOCKET_TYPE +This will cause the socket type (eg SOCK_STREAM, SOCK_DGRAM) for the +data connection to be output. +@item PROTOCOL +This will cause the protocol used for the data connection to be displayed. +@item DIRECTION +This will display the data flow direction relative to the netperf +process. Units: Send or Recv for a unidirectional bulk-transfer test, +or Send|Recv for a request/response test. +@item ELAPSED_TIME +This will display the elapsed time in seconds for the test. +@item THROUGHPUT +This will display the througput for the test. Units: As requested via +the global @option{-f} option and displayed by the THROUGHPUT_UNITS +output selector. +@item THROUGHPUT_UNITS +This will display the units for what is displayed by the +@code{THROUGHPUT} output selector. +@item LSS_SIZE_REQ +This will display the local (netperf) send socket buffer size (aka +SO_SNDBUF) requested via the command line. Units: Bytes. +@item LSS_SIZE +This will display the local (netperf) send socket buffer size +(SO_SNDBUF) immediately after the data connection socket was created. +Peculiarities of different networking stacks may lead to this +differing from the size requested via the command line. Units: Bytes. +@item LSS_SIZE_END +This will display the local (netperf) send socket buffer size +(SO_SNDBUF) immediately before the data connection socket is closed. +Peculiarities of different networking stacks may lead this to differ +from the size requested via the command line and/or the size +immediately after the data connection socket was created. Units: Bytes. +@item LSR_SIZE_REQ +This will display the local (netperf) receive socket buffer size (aka +SO_RCVBUF) requested via the command line. Units: Bytes. +@item LSR_SIZE +This will display the local (netperf) receive socket buffer size +(SO_RCVBUF) immediately after the data connection socket was created. +Peculiarities of different networking stacks may lead to this +differing from the size requested via the command line. Units: Bytes. +@item LSR_SIZE_END +This will display the local (netperf) receive socket buffer size +(SO_RCVBUF) immediately before the data connection socket is closed. +Peculiarities of different networking stacks may lead this to differ +from the size requested via the command line and/or the size +immediately after the data connection socket was created. Units: Bytes. +@item RSS_SIZE_REQ +This will display the remote (netserver) send socket buffer size (aka +SO_SNDBUF) requested via the command line. Units: Bytes. +@item RSS_SIZE +This will display the remote (netserver) send socket buffer size +(SO_SNDBUF) immediately after the data connection socket was created. +Peculiarities of different networking stacks may lead to this +differing from the size requested via the command line. Units: Bytes. +@item RSS_SIZE_END +This will display the remote (netserver) send socket buffer size +(SO_SNDBUF) immediately before the data connection socket is closed. +Peculiarities of different networking stacks may lead this to differ +from the size requested via the command line and/or the size +immediately after the data connection socket was created. Units: Bytes. +@item RSR_SIZE_REQ +This will display the remote (netserver) receive socket buffer size (aka +SO_RCVBUF) requested via the command line. Units: Bytes. +@item RSR_SIZE +This will display the remote (netserver) receive socket buffer size +(SO_RCVBUF) immediately after the data connection socket was created. +Peculiarities of different networking stacks may lead to this +differing from the size requested via the command line. Units: Bytes. +@item RSR_SIZE_END +This will display the remote (netserver) receive socket buffer size +(SO_RCVBUF) immediately before the data connection socket is closed. +Peculiarities of different networking stacks may lead this to differ +from the size requested via the command line and/or the size +immediately after the data connection socket was created. Units: Bytes. +@item LOCAL_SEND_SIZE +This will display the size of the buffers netperf passed in any +``send'' calls it made on the data connection for a +non-request/response test. Units: Bytes. +@item LOCAL_RECV_SIZE +This will display the size of the buffers netperf passed in any +``receive'' calls it made on the data connection for a +non-request/response test. Units: Bytes. +@item REMOTE_SEND_SIZE +This will display the size of the buffers netserver passed in any +``send'' calls it made on the data connection for a +non-request/response test. Units: Bytes. +@item REMOTE_RECV_SIZE +This will display the size of the buffers netserver passed in any +``receive'' calls it made on the data connection for a +non-request/response test. Units: Bytes. +@item REQUEST_SIZE +This will display the size of the requests netperf sent in a +request-response test. Units: Bytes. +@item RESPONSE_SIZE +This will display the size of the responses netserver sent in a +request-response test. Units: Bytes. +@item LOCAL_CPU_UTIL +This will display the overall CPU utilization during the test as +measured by netperf. Units: 0 to 100 percent. +@item LOCAL_CPU_METHOD +This will display the method used by netperf to measure CPU +utilization. Units: single character denoting method. +@item LOCAL_SD +This will display the service demand, or units of CPU consumed per +unit of work, as measured by netperf. Units: microsconds of CPU +consumed per either KB (K==1024) of data transferred or request/response +transaction. +@item REMOTE_CPU_UTIL +This will display the overall CPU utilization during the test as +measured by netserver. Units 0 to 100 percent. +@item REMOTE_CPU_METHOD +This will display the method used by netserver to measure CPU +utilization. Units: single character denoting method. +@item REMOTE_SD +This will display the service demand, or units of CPU consumed per +unit of work, as measured by netserver. Units: microseconds of CPU +consumed consumed per either KB (K==1024) of data transferred or +request/response transaction. +@item SD_UNITS +This will display the units for LOCAL_SD and REMOTE_SD +@item CONFIDENCE_LEVEL +This will display the confidence level requested by the user either +explicitly via the global @option{-I} option, or implicitly via the +global @option{-i} option. The value will be either 95 or 99 if +confidence intervals have been requested or 0 if they were not. Units: +Percent +@item CONFIDENCE_INTERVAL +This will display the width of the confidence interval requested +either explicitly via the global @option{-I} option or implicitly via +the global @option{-i} option. Units: Width in percent of mean value +computed. A value of -1.0 means that confidence intervals were not requested. +@item CONFIDENCE_ITERATION +This will display the number of test iterations netperf undertook, +perhaps while attempting to achieve the requested confidence interval +and level. If confidence intervals were requested via the command line +then the value will be between 3 and 30. If confidence intervals were +not requested the value will be 1. Units: Iterations +@item THROUGHPUT_CONFID +This will display the width of the confidence interval actually +achieved for @code{THROUGHPUT} during the test. Units: Width of +interval as percentage of reported throughput value. +@item LOCAL_CPU_CONFID +This will display the width of the confidence interval actually +achieved for overall CPU utilization on the system running netperf +(@code{LOCAL_CPU_UTIL}) during the test, if CPU utilization measurement +was enabled. Units: Width of interval as percentage of reported CPU +utilization. +@item REMOTE_CPU_CONFID +This will display the width of the confidence interval actually +achieved for overall CPU utilization on the system running netserver +(@code{REMOTE_CPU_UTIL}) during the test, if CPU utilization +measurement was enabled. Units: Width of interval as percentage of +reported CPU utilization. +@item TRANSACTION_RATE +This will display the transaction rate in transactions per second for +a request/response test even if the user has requested a throughput in +units of bits or bytes per second via the global @option{-f} +option. It is undefined for a non-request/response test. Units: +Transactions per second. +@item RT_LATENCY +This will display the average round-trip latency for a +request/response test, accounting for number of transactions in flight +at one time. It is undefined for a non-request/response test. Units: +Microseconds per transaction +@item BURST_SIZE +This will display the ``burst size'' or added transactions in flight +in a request/response test as requested via a test-specific +@option{-b} option. The number of transactions in flight at one time +will be one greater than this value. It is undefined for a +non-request/response test. Units: added Transactions in flight. +@item LOCAL_TRANSPORT_RETRANS +This will display the number of retransmissions experienced on the +data connection during the test as determined by netperf. A value of +-1 means the attempt to determine the number of retransmissions failed +or the concept was not valid for the given protocol or the mechanism +is not known for the platform. A value of -2 means it was not +attempted. As of version 2.5.0 the meaning of values are in flux and +subject to change. Units: number of retransmissions. +@item REMOTE_TRANSPORT_RETRANS +This will display the number of retransmissions experienced on the +data connection during the test as determined by netserver. A value +of -1 means the attempt to determine the number of retransmissions +failed or the concept was not valid for the given protocol or the +mechanism is not known for the platform. A value of -2 means it was +not attempted. As of version 2.5.0 the meaning of values are in flux +and subject to change. Units: number of retransmissions. +@item TRANSPORT_MSS +This will display the Maximum Segment Size (aka MSS) or its equivalent +for the protocol being used during the test. A value of -1 means +either the concept of an MSS did not apply to the protocol being used, +or there was an error in retrieving it. Units: Bytes. +@item LOCAL_SEND_THROUGHPUT +The throughput as measured by netperf for the successful ``send'' +calls it made on the data connection. Units: as requested via the +global @option{-f} option and displayed via the @code{THROUGHPUT_UNITS} +output selector. +@item LOCAL_RECV_THROUGHPUT +The throughput as measured by netperf for the successful ``receive'' +calls it made on the data connection. Units: as requested via the +global @option{-f} option and displayed via the @code{THROUGHPUT_UNITS} +output selector. +@item REMOTE_SEND_THROUGHPUT +The throughput as measured by netserver for the successful ``send'' +calls it made on the data connection. Units: as requested via the +global @option{-f} option and displayed via the @code{THROUGHPUT_UNITS} +output selector. +@item REMOTE_RECV_THROUGHPUT +The throughput as measured by netserver for the successful ``receive'' +calls it made on the data connection. Units: as requested via the +global @option{-f} option and displayed via the @code{THROUGHPUT_UNITS} +output selector. +@item LOCAL_CPU_BIND +The CPU to which netperf was bound, if at all, during the test. A +value of -1 means that netperf was not explicitly bound to a CPU +during the test. Units: CPU ID +@item LOCAL_CPU_COUNT +The number of CPUs (cores, threads) detected by netperf. Units: CPU count. +@item LOCAL_CPU_PEAK_UTIL +The utilization of the CPU most heavily utilized during the test, as +measured by netperf. This can be used to see if any one CPU of a +multi-CPU system was saturated even though the overall CPU utilization +as reported by @code{LOCAL_CPU_UTIL} was low. Units: 0 to 100% +@item LOCAL_CPU_PEAK_ID +The id of the CPU most heavily utilized during the test as determined +by netperf. Units: CPU ID. +@item LOCAL_CPU_MODEL +Model information for the processor(s) present on the system running +netperf. Assumes all processors in the system (as perceived by +netperf) on which netperf is running are the same model. Units: Text +@item LOCAL_CPU_FREQUENCY +The frequency of the processor(s) on the system running netperf, at +the time netperf made the call. Assumes that all processors present +in the system running netperf are running at the same +frequency. Units: MHz +@item REMOTE_CPU_BIND +The CPU to which netserver was bound, if at all, during the test. A +value of -1 means that netperf was not explicitly bound to a CPU +during the test. Units: CPU ID +@item REMOTE_CPU_COUNT +The number of CPUs (cores, threads) detected by netserver. Units: CPU +count. +@item REMOTE_CPU_PEAK_UTIL +The utilization of the CPU most heavily utilized during the test, as +measured by netserver. This can be used to see if any one CPU of a +multi-CPU system was saturated even though the overall CPU utilization +as reported by @code{REMOTE_CPU_UTIL} was low. Units: 0 to 100% +@item REMOTE_CPU_PEAK_ID +The id of the CPU most heavily utilized during the test as determined +by netserver. Units: CPU ID. +@item REMOTE_CPU_MODEL +Model information for the processor(s) present on the system running +netserver. Assumes all processors in the system (as perceived by +netserver) on which netserver is running are the same model. Units: +Text +@item REMOTE_CPU_FREQUENCY +The frequency of the processor(s) on the system running netserver, at +the time netserver made the call. Assumes that all processors present +in the system running netserver are running at the same +frequency. Units: MHz +@item SOURCE_PORT +The port ID/service name to which the data socket created by netperf +was bound. A value of 0 means the data socket was not explicitly +bound to a port number. Units: ASCII text. +@item SOURCE_ADDR +The name/address to which the data socket created by netperf was +bound. A value of 0.0.0.0 means the data socket was not explicitly +bound to an address. Units: ASCII text. +@item SOURCE_FAMILY +The address family to which the data socket created by netperf was +bound. A value of 0 means the data socket was not explicitly bound to +a given address family. Units: ASCII text. +@item DEST_PORT +The port ID to which the data socket created by netserver was bound. A +value of 0 means the data socket was not explicitly bound to a port +number. Units: ASCII text. +@item DEST_ADDR +The name/address of the data socket created by netserver. Units: +ASCII text. +@item DEST_FAMILY +The address family to which the data socket created by netserver was +bound. A value of 0 means the data socket was not explicitly bound to +a given address family. Units: ASCII text. +@item LOCAL_SEND_CALLS +The number of successful ``send'' calls made by netperf against its +data socket. Units: Calls. +@item LOCAL_RECV_CALLS +The number of successful ``receive'' calls made by netperf against its +data socket. Units: Calls. +@item LOCAL_BYTES_PER_RECV +The average number of bytes per ``receive'' call made by netperf +against its data socket. Units: Bytes. +@item LOCAL_BYTES_PER_SEND +The average number of bytes per ``send'' call made by netperf against +its data socket. Units: Bytes. +@item LOCAL_BYTES_SENT +The number of bytes successfully sent by netperf through its data +socket. Units: Bytes. +@item LOCAL_BYTES_RECVD +The number of bytes successfully received by netperf through its data +socket. Units: Bytes. +@item LOCAL_BYTES_XFERD +The sum of bytes sent and received by netperf through its data +socket. Units: Bytes. +@item LOCAL_SEND_OFFSET +The offset from the alignment of the buffers passed by netperf in its +``send'' calls. Specified via the global @option{-o} option and +defaults to 0. Units: Bytes. +@item LOCAL_RECV_OFFSET +The offset from the alignment of the buffers passed by netperf in its +``receive'' calls. Specified via the global @option{-o} option and +defaults to 0. Units: Bytes. +@item LOCAL_SEND_ALIGN +The alignment of the buffers passed by netperf in its ``send'' calls +as specified via the global @option{-a} option. Defaults to 8. Units: +Bytes. +@item LOCAL_RECV_ALIGN +The alignment of the buffers passed by netperf in its ``receive'' +calls as specified via the global @option{-a} option. Defaults to +8. Units: Bytes. +@item LOCAL_SEND_WIDTH +The ``width'' of the ring of buffers through which netperf cycles as +it makes its ``send'' calls. Defaults to one more than the local send +socket buffer size divided by the send size as determined at the time +the data socket is created. Can be used to make netperf more processor +data cache unfiendly. Units: number of buffers. +@item LOCAL_RECV_WIDTH +The ``width'' of the ring of buffers through which netperf cycles as +it makes its ``receive'' calls. Defaults to one more than the local +receive socket buffer size divided by the receive size as determined +at the time the data socket is created. Can be used to make netperf +more processor data cache unfiendly. Units: number of buffers. +@item LOCAL_SEND_DIRTY_COUNT +The number of bytes to ``dirty'' (write to) before netperf makes a +``send'' call. Specified via the global @option{-k} option, which +requires that --enable-dirty=yes was specificed with the configure +command prior to building netperf. Units: Bytes. +@item LOCAL_RECV_DIRTY_COUNT +The number of bytes to ``dirty'' (write to) before netperf makes a +``recv'' call. Specified via the global @option{-k} option which +requires that --enable-dirty was specified with the configure command +prior to building netperf. Units: Bytes. +@item LOCAL_RECV_CLEAN_COUNT +The number of bytes netperf should read ``cleanly'' before making a +``receive'' call. Specified via the global @option{-k} option which +requires that --enable-dirty was specified with configure command +prior to building netperf. Clean reads start were dirty writes ended. +Units: Bytes. +@item LOCAL_NODELAY +Indicates whether or not setting the test protocol-specific ``no +delay'' (eg TCP_NODELAY) option on the data socket used by netperf was +requested by the test-specific @option{-D} option and +successful. Units: 0 means no, 1 means yes. +@item LOCAL_CORK +Indicates whether or not TCP_CORK was set on the data socket used by +netperf as requested via the test-specific @option{-C} option. 1 means +yes, 0 means no/not applicable. +@item REMOTE_SEND_CALLS +@item REMOTE_RECV_CALLS +@item REMOTE_BYTES_PER_RECV +@item REMOTE_BYTES_PER_SEND +@item REMOTE_BYTES_SENT +@item REMOTE_BYTES_RECVD +@item REMOTE_BYTES_XFERD +@item REMOTE_SEND_OFFSET +@item REMOTE_RECV_OFFSET +@item REMOTE_SEND_ALIGN +@item REMOTE_RECV_ALIGN +@item REMOTE_SEND_WIDTH +@item REMOTE_RECV_WIDTH +@item REMOTE_SEND_DIRTY_COUNT +@item REMOTE_RECV_DIRTY_COUNT +@item REMOTE_RECV_CLEAN_COUNT +@item REMOTE_NODELAY +@item REMOTE_CORK +These are all like their ``LOCAL_'' counterparts only for the +netserver rather than netperf. +@item LOCAL_SYSNAME +The name of the OS (eg ``Linux'') running on the system on which +netperf was running. Units: ASCII Text +@item LOCAL_SYSTEM_MODEL +The model name of the system on which netperf was running. Units: +ASCII Text. +@item LOCAL_RELEASE +The release name/number of the OS running on the system on which +netperf was running. Units: ASCII Text +@item LOCAL_VERSION +The version number of the OS running on the system on which netperf +was running. Units: ASCII Text +@item LOCAL_MACHINE +The machine architecture of the machine on which netperf was +running. Units: ASCII Text. +@item REMOTE_SYSNAME +@item REMOTE_SYSTEM_MODEL +@item REMOTE_RELEASE +@item REMOTE_VERSION +@item REMOTE_MACHINE +These are all like their ``LOCAL_'' counterparts only for the +netserver rather than netperf. +@item LOCAL_INTERFACE_NAME +The name of the probable egress interface through which the data +connection went on the system running netperf. Example: eth0. Units: +ASCII Text. +@item LOCAL_INTERFACE_VENDOR +The vendor ID of the probable egress interface through which traffic +on the data connection went on the system running netperf. Units: +Hexadecimal IDs as might be found in a @file{pci.ids} file or at +@uref{http://pciids.sourceforge.net/,the PCI ID Repository}. +@item LOCAL_INTERFACE_DEVICE +The device ID of the probable egress interface through which traffic +on the data connection went on the system running netperf. Units: +Hexadecimal IDs as might be found in a @file{pci.ids} file or at +@uref{http://pciids.sourceforge.net/,the PCI ID Repository}. +@item LOCAL_INTERFACE_SUBVENDOR +The sub-vendor ID of the probable egress interface through which +traffic on the the data connection went on the system running +netperf. Units: Hexadecimal IDs as might be found in a @file{pci.ids} +file or at @uref{http://pciids.sourceforge.net/,the PCI ID +Repository}. +@item LOCAL_INTERFACE_SUBDEVICE +The sub-device ID of the probable egress interface through which +traffic on the data connection went on the system running +netperf. Units: Hexadecimal IDs as might be found in a @file{pci.ids} +file or at @uref{http://pciids.sourceforge.net/,the PCI ID +Repository}. +@item LOCAL_DRIVER_NAME +The name of the driver used for the probable egress interface through +which traffic on the data connection went on the system running +netperf. Units: ASCII Text. +@item LOCAL_DRIVER_VERSION +The version string for the driver used for the probable egress +interface through which traffic on the data connection went on the +system running netperf. Units: ASCII Text. +@item LOCAL_DRIVER_FIRMWARE +The firmware version for the driver used for the probable egress +interface through which traffic on the data connection went on the +system running netperf. Units: ASCII Text. +@item LOCAL_DRIVER_BUS +The bus address of the probable egress interface through which traffic +on the data connection went on the system running netperf. Units: +ASCII Text. +@item LOCAL_INTERFACE_SLOT +The slot ID of the probable egress interface through which traffic +on the data connection went on the system running netperf. Units: +ASCII Text. +@item REMOTE_INTERFACE_NAME +@item REMOTE_INTERFACE_VENDOR +@item REMOTE_INTERFACE_DEVICE +@item REMOTE_INTERFACE_SUBVENDOR +@item REMOTE_INTERFACE_SUBDEVICE +@item REMOTE_DRIVER_NAME +@item REMOTE_DRIVER_VERSION +@item REMOTE_DRIVER_FIRMWARE +@item REMOTE_DRIVER_BUS +@item REMOTE_INTERFACE_SLOT +These are all like their ``LOCAL_'' counterparts only for the +netserver rather than netperf. +@item LOCAL_INTERVAL_USECS +The interval at which bursts of operations (sends, receives, +transactions) were attempted by netperf. Specified by the +global @option{-w} option which requires --enable-intervals to have +been specified with the configure command prior to building +netperf. Units: Microseconds (though specified by default in +milliseconds on the command line) +@item LOCAL_INTERVAL_BURST +The number of operations (sends, receives, transactions depending on +the test) which were attempted by netperf each LOCAL_INTERVAL_USECS +units of time. Specified by the global @option{-b} option which +requires --enable-intervals to have been specified with the configure +command prior to building netperf. Units: number of operations per burst. +@item REMOTE_INTERVAL_USECS +The interval at which bursts of operations (sends, receives, +transactions) were attempted by netserver. Specified by the +global @option{-w} option which requires --enable-intervals to have +been specified with the configure command prior to building +netperf. Units: Microseconds (though specified by default in +milliseconds on the command line) +@item REMOTE_INTERVAL_BURST +The number of operations (sends, receives, transactions depending on +the test) which were attempted by netperf each LOCAL_INTERVAL_USECS +units of time. Specified by the global @option{-b} option which +requires --enable-intervals to have been specified with the configure +command prior to building netperf. Units: number of operations per burst. +@item LOCAL_SECURITY_TYPE_ID +@item LOCAL_SECURITY_TYPE +@item LOCAL_SECURITY_ENABLED_NUM +@item LOCAL_SECURITY_ENABLED +@item LOCAL_SECURITY_SPECIFIC +@item REMOTE_SECURITY_TYPE_ID +@item REMOTE_SECURITY_TYPE +@item REMOTE_SECURITY_ENABLED_NUM +@item REMOTE_SECURITY_ENABLED +@item REMOTE_SECURITY_SPECIFIC +A bunch of stuff related to what sort of security mechanisms (eg +SELINUX) were enabled on the systems during the test. +@item RESULT_BRAND +The string specified by the user with the global @option{-B} +option. Units: ASCII Text. +@item UUID +The universally unique identifier associated with this test, either +generated automagically by netperf, or passed to netperf via an omni +test-specific @option{-u} option. Note: Future versions may make this +a global command-line option. Units: ASCII Text. +@item MIN_LATENCY +The minimum ``latency'' or operation time (send, receive or +request/response exchange depending on the test) as measured on the +netperf side when the global @option{-j} option was specified. Units: +Microseconds. +@item MAX_LATENCY +The maximum ``latency'' or operation time (send, receive or +request/response exchange depending on the test) as measured on the +netperf side when the global @option{-j} option was specified. Units: +Microseconds. +@item P50_LATENCY +The 50th percentile value of ``latency'' or operation time (send, receive or +request/response exchange depending on the test) as measured on the +netperf side when the global @option{-j} option was specified. Units: +Microseconds. +@item P90_LATENCY +The 90th percentile value of ``latency'' or operation time (send, receive or +request/response exchange depending on the test) as measured on the +netperf side when the global @option{-j} option was specified. Units: +Microseconds. +@item P99_LATENCY +The 99th percentile value of ``latency'' or operation time (send, receive or +request/response exchange depending on the test) as measured on the +netperf side when the global @option{-j} option was specified. Units: +Microseconds. +@item MEAN_LATENCY +The average ``latency'' or operation time (send, receive or +request/response exchange depending on the test) as measured on the +netperf side when the global @option{-j} option was specified. Units: +Microseconds. +@item STDDEV_LATENCY +The standard deviation of ``latency'' or operation time (send, receive or +request/response exchange depending on the test) as measured on the +netperf side when the global @option{-j} option was specified. Units: +Microseconds. +@item COMMAND_LINE +The full command line used when invoking netperf. Units: ASCII Text. +@item OUTPUT_END +While emitted with the list of output selectors, it is ignored when +specified as an output selector. +@end table + +@node Other Netperf Tests, Address Resolution, The Omni Tests, Top @chapter Other Netperf Tests Apart from the typical performance tests, netperf contains some tests @@ -2666,9 +3796,10 @@ @menu * CPU rate calibration:: +* UUID Generation:: @end menu -@node CPU rate calibration, , Other Netperf Tests, Other Netperf Tests +@node CPU rate calibration, UUID Generation, Other Netperf Tests, Other Netperf Tests @section CPU rate calibration Some of the CPU utilization measurement mechanisms of netperf work by @@ -2714,6 +3845,24 @@ utilization reported by netperf in an aggregate test, but you have to calculate service demands by hand. +@node UUID Generation, , CPU rate calibration, Other Netperf Tests +@section UUID Generation + +Beginning with version 2.5.0 netperf can generate Universally Unique +IDentifiers (UUIDs). This can be done explicitly via the ``UUID'' +test: +@example +$ netperf -t UUID +2c8561ae-9ebd-11e0-a297-0f5bfa0349d0 +@end example + +In and of itself, this is not terribly useful, but used in conjuction +with the test-specific @option{-u} option of an ``omni'' test to set +the UUID emitted by the @ref{Omni Output Selectors,UUID} output +selector, it can be used to tie-together the separate instances of an +aggregate netperf test. Say, for instance if they were inserted into +a database of some sort. + @node Address Resolution, Enhancing Netperf, Other Netperf Tests, Top @comment node-name, next, previous, up @chapter Address Resolution @@ -2760,7 +3909,7 @@ Netperf is constantly evolving. If you find you want to make enhancements to netperf, by all means do so. If you wish to add a new -``suite'' of tests to netperf the general idea is to +``suite'' of tests to netperf the general idea is to: @enumerate @item @@ -2776,6 +3925,11 @@ Compile and test @end enumerate +However, with the addition of the ``omni'' tests in version 2.5.0 it +is preferred that one attempt to make the necessary changes to +@file{src/nettest_omni.c} rather than adding new source files, unless +this would make the omni tests entirely too complicated. + If you wish to submit your changes for possible inclusion into the mainline sources, please try to base your changes on the latest available sources. (@xref{Getting Netperf Bits}.) and then send email @@ -2800,8 +3954,8 @@ for synchronized, multiple-thread, multiple-test, multiple-system, network-oriented benchmarking. -Netperf4 is still undergoing rapid evolution. Those wishing to work -with or on netperf4 are encouraged to join the +Netperf4 is still undergoing evolution. Those wishing to work with or +on netperf4 are encouraged to join the @uref{http://www.netperf.org/cgi-bin/mailman/listinfo/netperf-dev,netperf-dev} mailing list and/or peruse the @uref{http://www.netperf.org/svn/netperf4/trunk,current sources}. diff -Nru netperf-2.4.5/doc/netserver.man netperf-2.5.0/doc/netserver.man --- netperf-2.4.5/doc/netserver.man 2008-07-03 00:23:36.000000000 +0000 +++ netperf-2.5.0/doc/netserver.man 2011-06-17 18:52:28.000000000 +0000 @@ -6,8 +6,14 @@ .SH SYNOPSIS .B netserver +[-4] +[-6] +[-d] +[-h] +[-L name,family] [-p portnum] -[-n numcpus] +[-v verbosity] +[-V] .SH DESCRIPTION .B Netserver @@ -22,22 +28,40 @@ .SS OPTIONS .TP +.B \-4 +Use AF_INET (aka IPv4) addressing for the control and possibly data +connections. +.TP +.B \-6 +Use AF_INET6 (aka IPv6) addressing for the control and possibly data +connections. +.TP +.B \-d +Increase the quantity of debugging output displayed during +a test (possibly at the expense of performance). +.TP .B \-h Display a usage string, and exit. .TP -.B \-n numcpus -Specify the number of CPU's in the system on those systems for which -netperf has no way to find the number of CPU's programatically. +.B \-L name,family +Set the local name and/or address family for the socket used for +the control connection. .TP .B \-p portnum Listen on the specified port. This is used when running as a standalone daemon. +.TP +.B \-v verbosity +Set the verbosity level for the test. +.TP +.B \-V +Display the netperf version and exit. .SH BUGS -No known bugs at this time. If you think you have found a bug, please send email to Rick Jones . +No known bugs at this time. If you think you have found a bug, please report it to either netperf-talk@netperf.org or netperf-feedback@netperf.org. .SH SEE ALSO -.C netperf +.BR netperf (1) .br .I Netperf: A Network Performance Benchmark @@ -47,10 +71,10 @@ .SH AUTHORS HP Information Networks Division - Networking Performance Team. .br -Rick Jones +Rick Jones .br Karen Choy HP IND .br Dave Shield (man pages) .br -Others too numerous to mention here - see the ACKNWLDGMNTS file +Others too numerous to mention here - see the AUTHORS file diff -Nru netperf-2.4.5/install-sh netperf-2.5.0/install-sh --- netperf-2.4.5/install-sh 2007-06-01 22:06:03.000000000 +0000 +++ netperf-2.5.0/install-sh 2011-07-19 23:43:31.000000000 +0000 @@ -1,7 +1,8 @@ #!/bin/sh -# # install - install a program, script, or datafile -# + +scriptversion=2009-04-28.21; # UTC + # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. @@ -38,257 +39,482 @@ # when there is no Makefile. # # This script is compatible with the BSD install script, but was written -# from scratch. It can only install one file at a time, a restriction -# shared with many OS's install programs. +# from scratch. +nl=' +' +IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" - +doit=${DOITPROG-} +if test -z "$doit"; then + doit_exec=exec +else + doit_exec=$doit +fi -# put in absolute paths if you don't have them in your path; or use env. vars. +# Put in absolute file names if you don't have them in your path; +# or use environment vars. -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" - -transformbasename="" -transform_arg="" -instcmd="$mvprog" -chmodcmd="$chmodprog 0755" -chowncmd="" -chgrpcmd="" -stripcmd="" +chgrpprog=${CHGRPPROG-chgrp} +chmodprog=${CHMODPROG-chmod} +chownprog=${CHOWNPROG-chown} +cmpprog=${CMPPROG-cmp} +cpprog=${CPPROG-cp} +mkdirprog=${MKDIRPROG-mkdir} +mvprog=${MVPROG-mv} +rmprog=${RMPROG-rm} +stripprog=${STRIPPROG-strip} + +posix_glob='?' +initialize_posix_glob=' + test "$posix_glob" != "?" || { + if (set -f) 2>/dev/null; then + posix_glob= + else + posix_glob=: + fi + } +' + +posix_mkdir= + +# Desired mode of installed file. +mode=0755 + +chgrpcmd= +chmodcmd=$chmodprog +chowncmd= +mvcmd=$mvprog rmcmd="$rmprog -f" -mvcmd="$mvprog" -src="" -dst="" -dir_arg="" - -while [ x"$1" != x ]; do - case $1 in - -c) instcmd=$cpprog - shift - continue;; - - -d) dir_arg=true - shift - continue;; - - -m) chmodcmd="$chmodprog $2" - shift - shift - continue;; - - -o) chowncmd="$chownprog $2" - shift - shift - continue;; - - -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; - - -s) stripcmd=$stripprog - shift - continue;; - - -t=*) transformarg=`echo $1 | sed 's/-t=//'` - shift - continue;; - - -b=*) transformbasename=`echo $1 | sed 's/-b=//'` - shift - continue;; +stripcmd= - *) if [ x"$src" = x ] - then - src=$1 - else - # this colon is to work around a 386BSD /bin/sh bug - : - dst=$1 - fi - shift - continue;; - esac -done +src= +dst= +dir_arg= +dst_arg= -if [ x"$src" = x ] -then - echo "$0: no input file specified" >&2 - exit 1 -else - : -fi +copy_on_change=false +no_target_directory= -if [ x"$dir_arg" != x ]; then - dst=$src - src="" - - if [ -d "$dst" ]; then - instcmd=: - chmodcmd="" - else - instcmd=$mkdirprog - fi -else +usage="\ +Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE + or: $0 [OPTION]... SRCFILES... DIRECTORY + or: $0 [OPTION]... -t DIRECTORY SRCFILES... + or: $0 [OPTION]... -d DIRECTORIES... -# Waiting for this to be detected by the "$instcmd $src $dsttmp" command -# might cause directories to be created, which would be especially bad -# if $src (and thus $dsttmp) contains '*'. - - if [ -f "$src" ] || [ -d "$src" ] - then - : - else - echo "$0: $src does not exist" >&2 - exit 1 - fi +In the 1st form, copy SRCFILE to DSTFILE. +In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. +In the 4th, create DIRECTORIES. - if [ x"$dst" = x ] - then - echo "$0: no destination specified" >&2 - exit 1 - else - : - fi +Options: + --help display this help and exit. + --version display version info and exit. -# If destination is a directory, append the input filename; if your system -# does not like double slashes in filenames, you may need to add some logic + -c (ignored) + -C install only if different (preserve the last data modification time) + -d create directories instead of installing files. + -g GROUP $chgrpprog installed files to GROUP. + -m MODE $chmodprog installed files to MODE. + -o USER $chownprog installed files to USER. + -s $stripprog installed files. + -t DIRECTORY install into DIRECTORY. + -T report an error if DSTFILE is a directory. - if [ -d "$dst" ] - then - dst=$dst/`basename "$src"` - else - : - fi -fi +Environment variables override the default commands: + CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG + RMPROG STRIPPROG +" -## this sed command emulates the dirname command -dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` +while test $# -ne 0; do + case $1 in + -c) ;; -# Make sure that the destination directory exists. -# this part is taken from Noah Friedman's mkinstalldirs script + -C) copy_on_change=true;; -# Skip lots of stat calls in the usual case. -if [ ! -d "$dstdir" ]; then -defaultIFS=' - ' -IFS="${IFS-$defaultIFS}" - -oIFS=$IFS -# Some sh's can't handle IFS=/ for some reason. -IFS='%' -set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` -IFS=$oIFS - -pathcomp='' - -while [ $# -ne 0 ] ; do - pathcomp=$pathcomp$1 - shift - - if [ ! -d "$pathcomp" ] ; - then - $mkdirprog "$pathcomp" - else - : - fi + -d) dir_arg=true;; - pathcomp=$pathcomp/ -done -fi + -g) chgrpcmd="$chgrpprog $2" + shift;; -if [ x"$dir_arg" != x ] -then - $doit $instcmd "$dst" && - - if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi -else + --help) echo "$usage"; exit $?;; -# If we're going to rename the final executable, determine the name now. + -m) mode=$2 + case $mode in + *' '* | *' '* | *' +'* | *'*'* | *'?'* | *'['*) + echo "$0: invalid mode: $mode" >&2 + exit 1;; + esac + shift;; - if [ x"$transformarg" = x ] - then - dstfile=`basename "$dst"` - else - dstfile=`basename "$dst" $transformbasename | - sed $transformarg`$transformbasename - fi + -o) chowncmd="$chownprog $2" + shift;; -# don't allow the sed command to completely eliminate the filename + -s) stripcmd=$stripprog;; - if [ x"$dstfile" = x ] - then - dstfile=`basename "$dst"` - else - : - fi + -t) dst_arg=$2 + shift;; -# Make a couple of temp file names in the proper directory. + -T) no_target_directory=true;; - dsttmp=$dstdir/_inst.$$_ - rmtmp=$dstdir/_rm.$$_ + --version) echo "$0 $scriptversion"; exit $?;; -# Trap to clean up temp files at exit. + --) shift + break;; - trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0 - trap '(exit $?); exit' 1 2 13 15 + -*) echo "$0: invalid option: $1" >&2 + exit 1;; -# Move or copy the file name to the temp name + *) break;; + esac + shift +done - $doit $instcmd "$src" "$dsttmp" && +if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then + # When -d is used, all remaining arguments are directories to create. + # When -t is used, the destination is already specified. + # Otherwise, the last argument is the destination. Remove it from $@. + for arg + do + if test -n "$dst_arg"; then + # $@ is not empty: it contains at least $arg. + set fnord "$@" "$dst_arg" + shift # fnord + fi + shift # arg + dst_arg=$arg + done +fi -# and set any options; do chmod last to preserve setuid bits +if test $# -eq 0; then + if test -z "$dir_arg"; then + echo "$0: no input file specified." >&2 + exit 1 + fi + # It's OK to call `install-sh -d' without argument. + # This can happen when creating conditional directories. + exit 0 +fi -# If any of these fail, we abort the whole thing. If we want to -# ignore errors from any of these, just make sure not to ignore -# errors from the above "$doit $instcmd $src $dsttmp" command. +if test -z "$dir_arg"; then + trap '(exit $?); exit' 1 2 13 15 - if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi && + # Set umask so as not to create temps with too-generous modes. + # However, 'strip' requires both read and write access to temps. + case $mode in + # Optimize common cases. + *644) cp_umask=133;; + *755) cp_umask=22;; + + *[0-7]) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw='% 200' + fi + cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; + *) + if test -z "$stripcmd"; then + u_plus_rw= + else + u_plus_rw=,u+rw + fi + cp_umask=$mode$u_plus_rw;; + esac +fi -# Now remove or move aside any old file at destination location. We try this -# two ways since rm can't unlink itself on some systems and the destination -# file might be busy for other reasons. In this case, the final cleanup -# might fail but the new file should still install successfully. +for src +do + # Protect names starting with `-'. + case $src in + -*) src=./$src;; + esac + + if test -n "$dir_arg"; then + dst=$src + dstdir=$dst + test -d "$dstdir" + dstdir_status=$? + else + + # Waiting for this to be detected by the "$cpprog $src $dsttmp" command + # might cause directories to be created, which would be especially bad + # if $src (and thus $dsttmp) contains '*'. + if test ! -f "$src" && test ! -d "$src"; then + echo "$0: $src does not exist." >&2 + exit 1 + fi + + if test -z "$dst_arg"; then + echo "$0: no destination specified." >&2 + exit 1 + fi + + dst=$dst_arg + # Protect names starting with `-'. + case $dst in + -*) dst=./$dst;; + esac -{ - if [ -f "$dstdir/$dstfile" ] - then - $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null || - $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null || - { - echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 - (exit 1); exit - } + # If destination is a directory, append the input filename; won't work + # if double slashes aren't ignored. + if test -d "$dst"; then + if test -n "$no_target_directory"; then + echo "$0: $dst_arg: Is a directory" >&2 + exit 1 + fi + dstdir=$dst + dst=$dstdir/`basename "$src"` + dstdir_status=0 + else + # Prefer dirname, but fall back on a substitute if dirname fails. + dstdir=` + (dirname "$dst") 2>/dev/null || + expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$dst" : 'X\(//\)[^/]' \| \ + X"$dst" : 'X\(//\)$' \| \ + X"$dst" : 'X\(/\)' \| . 2>/dev/null || + echo X"$dst" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q' + ` + + test -d "$dstdir" + dstdir_status=$? + fi + fi + + obsolete_mkdir_used=false + + if test $dstdir_status != 0; then + case $posix_mkdir in + '') + # Create intermediate dirs using mode 755 as modified by the umask. + # This is like FreeBSD 'install' as of 1997-10-28. + umask=`umask` + case $stripcmd.$umask in + # Optimize common cases. + *[2367][2367]) mkdir_umask=$umask;; + .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; + + *[0-7]) + mkdir_umask=`expr $umask + 22 \ + - $umask % 100 % 40 + $umask % 20 \ + - $umask % 10 % 4 + $umask % 2 + `;; + *) mkdir_umask=$umask,go-w;; + esac + + # With -d, create the new directory with the user-specified mode. + # Otherwise, rely on $mkdir_umask. + if test -n "$dir_arg"; then + mkdir_mode=-m$mode else - : + mkdir_mode= fi -} && -# Now rename the file to the real destination. + posix_mkdir=false + case $umask in + *[123567][0-7][0-7]) + # POSIX mkdir -p sets u+wx bits regardless of umask, which + # is incompatible with FreeBSD 'install' when (umask & 300) != 0. + ;; + *) + tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ + trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 + + if (umask $mkdir_umask && + exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 + then + if test -z "$dir_arg" || { + # Check for POSIX incompatibilities with -m. + # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or + # other-writeable bit of parent directory when it shouldn't. + # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. + ls_ld_tmpdir=`ls -ld "$tmpdir"` + case $ls_ld_tmpdir in + d????-?r-*) different_mode=700;; + d????-?--*) different_mode=755;; + *) false;; + esac && + $mkdirprog -m$different_mode -p -- "$tmpdir" && { + ls_ld_tmpdir_1=`ls -ld "$tmpdir"` + test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" + } + } + then posix_mkdir=: + fi + rmdir "$tmpdir/d" "$tmpdir" + else + # Remove any dirs left behind by ancient mkdir implementations. + rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null + fi + trap '' 0;; + esac;; + esac - $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" + if + $posix_mkdir && ( + umask $mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" + ) + then : + else + + # The umask is ridiculous, or mkdir does not conform to POSIX, + # or it failed possibly due to a race condition. Create the + # directory the slow way, step by step, checking for races as we go. + + case $dstdir in + /*) prefix='/';; + -*) prefix='./';; + *) prefix='';; + esac + + eval "$initialize_posix_glob" + + oIFS=$IFS + IFS=/ + $posix_glob set -f + set fnord $dstdir + shift + $posix_glob set +f + IFS=$oIFS + + prefixes= + + for d + do + test -z "$d" && continue + + prefix=$prefix$d + if test -d "$prefix"; then + prefixes= + else + if $posix_mkdir; then + (umask=$mkdir_umask && + $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break + # Don't fail if two instances are running concurrently. + test -d "$prefix" || exit 1 + else + case $prefix in + *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; + *) qprefix=$prefix;; + esac + prefixes="$prefixes '$qprefix'" + fi + fi + prefix=$prefix/ + done -fi && + if test -n "$prefixes"; then + # Don't fail if two instances are running concurrently. + (umask $mkdir_umask && + eval "\$doit_exec \$mkdirprog $prefixes") || + test -d "$dstdir" || exit 1 + obsolete_mkdir_used=true + fi + fi + fi + + if test -n "$dir_arg"; then + { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && + { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || + test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 + else + + # Make a couple of temp file names in the proper directory. + dsttmp=$dstdir/_inst.$$_ + rmtmp=$dstdir/_rm.$$_ + + # Trap to clean up those temp files at exit. + trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 + + # Copy the file name to the temp name. + (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && + + # and set any options; do chmod last to preserve setuid bits. + # + # If any of these fail, we abort the whole thing. If we want to + # ignore errors from any of these, just make sure not to ignore + # errors from the above "$doit $cpprog $src $dsttmp" command. + # + { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && + { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && + { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && + { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && + + # If -C, don't bother to copy if it wouldn't change the file. + if $copy_on_change && + old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && + new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && + + eval "$initialize_posix_glob" && + $posix_glob set -f && + set X $old && old=:$2:$4:$5:$6 && + set X $new && new=:$2:$4:$5:$6 && + $posix_glob set +f && + + test "$old" = "$new" && + $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 + then + rm -f "$dsttmp" + else + # Rename the file to the real destination. + $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || + + # The rename failed, perhaps because mv can't rename something else + # to itself, or perhaps because mv is so ancient that it does not + # support -f. + { + # Now remove or move aside any old file at destination location. + # We try this two ways since rm can't unlink itself on some + # systems and the destination file might be busy for other + # reasons. In this case, the final cleanup might fail but the new + # file should still install successfully. + { + test ! -f "$dst" || + $doit $rmcmd -f "$dst" 2>/dev/null || + { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && + { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } + } || + { echo "$0: cannot unlink or rename $dst" >&2 + (exit 1); exit 1 + } + } && + + # Now rename the file to the real destination. + $doit $mvcmd "$dsttmp" "$dst" + } + fi || exit 1 -# The final little trick to "correctly" pass the exit status to the exit trap. + trap '' 0 + fi +done -{ - (exit 0); exit -} +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff -Nru netperf-2.4.5/m4/m4/.svn/entries netperf-2.5.0/m4/m4/.svn/entries --- netperf-2.4.5/m4/m4/.svn/entries 2009-05-27 21:48:44.000000000 +0000 +++ netperf-2.5.0/m4/m4/.svn/entries 2011-07-14 17:23:55.000000000 +0000 @@ -1,7 +1,7 @@ -8 +10 dir -299 +432 http://www.netperf.org/svn/netperf2/trunk/m4/m4 http://www.netperf.org/svn/netperf2 @@ -12,7 +12,7 @@ raj -svn:special svn:externals svn:needs-lock + @@ -32,11 +32,33 @@ -2008-03-18T18:36:22.000000Z +2011-02-10T17:04:06.952170Z 0a5ed6a330cac1af2398fb47a8b2e3f8 2008-03-18T21:08:56.012824Z 266 raj + + + + + + + + + + + + + + + + + + + + + +1402 sockaddrin6.m4 file @@ -44,11 +66,33 @@ -2007-06-01T22:05:59.000000Z +2011-02-10T17:04:06.952170Z 19d9c4f1138e5876254228d1b554c13d 2005-10-17T22:25:24.828295Z 33 raj + + + + + + + + + + + + + + + + + + + + + +2714 sockinttypes.m4 file @@ -56,9 +100,31 @@ -2007-06-01T22:05:59.000000Z +2011-02-10T17:04:06.952170Z d5b12afdcfa72f3b6846639f0f91dd5f 2005-10-17T22:25:24.828295Z 33 raj + + + + + + + + + + + + + + + + + + + + + +5727 diff -Nru netperf-2.4.5/m4/m4/.svn/format netperf-2.5.0/m4/m4/.svn/format --- netperf-2.4.5/m4/m4/.svn/format 2007-06-01 22:05:59.000000000 +0000 +++ netperf-2.5.0/m4/m4/.svn/format 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -8 diff -Nru netperf-2.4.5/m4/.svn/entries netperf-2.5.0/m4/.svn/entries --- netperf-2.4.5/m4/.svn/entries 2009-05-27 21:48:44.000000000 +0000 +++ netperf-2.5.0/m4/.svn/entries 2011-07-14 17:23:55.000000000 +0000 @@ -1,7 +1,7 @@ -8 +10 dir -299 +432 http://www.netperf.org/svn/netperf2/trunk/m4 http://www.netperf.org/svn/netperf2 @@ -12,7 +12,7 @@ raj -svn:special svn:externals svn:needs-lock + diff -Nru netperf-2.4.5/m4/.svn/format netperf-2.5.0/m4/.svn/format --- netperf-2.4.5/m4/.svn/format 2007-06-01 22:05:59.000000000 +0000 +++ netperf-2.5.0/m4/.svn/format 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -8 diff -Nru netperf-2.4.5/Makefile.in netperf-2.5.0/Makefile.in --- netperf-2.4.5/Makefile.in 2009-06-12 00:10:32.000000000 +0000 +++ netperf-2.5.0/Makefile.in 2011-07-19 23:25:15.000000000 +0000 @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.7.9 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ -# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 -# Free Software Foundation, Inc. +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -13,17 +14,12 @@ # PARTICULAR PURPOSE. @SET_MAKE@ - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = . - +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -35,10 +31,80 @@ NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ +subdir = . +DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/config.h.in \ + $(srcdir)/netperf.spec.in $(top_srcdir)/configure AUTHORS \ + COPYING ChangeLog INSTALL NEWS config.guess config.sub depcomp \ + install-sh missing mkinstalldirs +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/src/missing/m4/salen.m4 \ + $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = config.h +CONFIG_CLEAN_FILES = netperf.spec +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir dist dist-all distcheck +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + { test ! -d "$(distdir)" \ + || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr "$(distdir)"; }; } +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 $(distdir).zip +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -58,6 +124,7 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -67,8 +134,7 @@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ -NEED_LIBCOMPAT_FALSE = @NEED_LIBCOMPAT_FALSE@ -NEED_LIBCOMPAT_TRUE = @NEED_LIBCOMPAT_TRUE@ +MKDIR_P = @MKDIR_P@ NETCPU_SOURCE = @NETCPU_SOURCE@ NETDRVLKUP_SOURCE = @NETDRVLKUP_SOURCE@ NETRTLKUP_SOURCE = @NETRTLKUP_SOURCE@ @@ -81,6 +147,7 @@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ @@ -88,18 +155,23 @@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ +builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ @@ -119,6 +191,7 @@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ +mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ @@ -126,74 +199,76 @@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ - +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = dist-bzip2 dist-zip SUBDIRS = src doc EXTRA_DIST = README.* Release_Notes inet_ntop.c autogen.sh m4 -subdir = . -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = config.h -CONFIG_CLEAN_FILES = netperf.spec -DIST_SOURCES = - -RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \ - ps-recursive install-info-recursive uninstall-info-recursive \ - all-recursive install-data-recursive install-exec-recursive \ - installdirs-recursive install-recursive uninstall-recursive \ - check-recursive installcheck-recursive -DIST_COMMON = README $(srcdir)/Makefile.in $(srcdir)/configure AUTHORS \ - COPYING ChangeLog INSTALL Makefile.am NEWS acinclude.m4 \ - aclocal.m4 config.guess config.h.in config.sub configure \ - configure.ac depcomp install-sh missing mkinstalldirs \ - netperf.spec.in -DIST_SUBDIRS = $(SUBDIRS) all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: +am--refresh: + @: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; -am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno -$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe) - -$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck -$(srcdir)/configure: $(srcdir)/configure.ac $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) - cd $(srcdir) && $(AUTOCONF) -$(ACLOCAL_M4): configure.ac acinclude.m4 - cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(top_srcdir)/configure: $(am__configure_deps) + $(am__cd) $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(am__aclocal_m4_deps): config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ - $(MAKE) stamp-h1; \ + $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h - -$(srcdir)/config.h.in: $(top_srcdir)/configure.ac $(ACLOCAL_M4) - cd $(top_srcdir) && $(AUTOHEADER) - touch $(srcdir)/config.h.in +$(srcdir)/config.h.in: $(am__configure_deps) + ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) + rm -f stamp-h1 + touch $@ distclean-hdr: -rm -f config.h stamp-h1 -netperf.spec: $(top_builddir)/config.status netperf.spec.in +netperf.spec: $(top_builddir)/config.status $(srcdir)/netperf.spec.in cd $(top_builddir) && $(SHELL) ./config.status $@ -uninstall-info-am: # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. @@ -202,7 +277,13 @@ # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): - @set fnord $$MAKEFLAGS; amf=$$2; \ + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ @@ -213,16 +294,21 @@ else \ local_target="$$target"; \ fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -mostlyclean-recursive clean-recursive distclean-recursive \ -maintainer-clean-recursive: - @set fnord $$MAKEFLAGS; amf=$$2; \ +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ @@ -242,160 +328,180 @@ else \ local_target="$$target"; \ fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done -ETAGS = etags -ETAGSFLAGS = - -CTAGS = ctags -CTAGSFLAGS = - -tags: TAGS - ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique +tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ + set x; \ here=`pwd`; \ - if (etags --etags-include --version) >/dev/null 2>&1; then \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ + empty_fix=.; \ else \ include_option=--include; \ + empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -f $$subdir/TAGS && \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(ETAGS_ARGS)$$tags$$unique" \ - || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique - + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - -top_distdir = . -distdir = $(PACKAGE)-$(VERSION) - -am__remove_distdir = \ - { test ! -d $(distdir) \ - || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr $(distdir); }; } - -GZIP_ENV = --best -distuninstallcheck_listfiles = find . -type f -print -distcleancheck_listfiles = find . -type f -print distdir: $(DISTFILES) $(am__remove_distdir) - mkdir $(distdir) - $(mkinstalldirs) $(distdir)/. $(distdir)/src - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + test -d "$(distdir)" || mkdir "$(distdir)" + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkinstalldirs) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done - list='$(SUBDIRS)'; for subdir in $$list; do \ + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d $(distdir)/$$subdir \ - || mkdir $(distdir)/$$subdir \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ - (cd $$subdir && \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" \ - distdir=../$(distdir)/$$subdir \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done - -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ + -test -n "$(am__skip_mode_fix)" \ + || find "$(distdir)" -type d ! -perm -755 \ + -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ - || chmod -R a+r $(distdir) + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r "$(distdir)" dist-gzip: distdir - $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) - dist-bzip2: distdir - $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2 + tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-lzma: distdir + tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma + $(am__remove_distdir) + +dist-xz: distdir + tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz + $(am__remove_distdir) + +dist-tarZ: distdir + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) +dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir - $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2 + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) @@ -404,15 +510,31 @@ # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist - $(am__remove_distdir) - GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lzma*) \ + lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ + *.tar.xz*) \ + xz -dc $(distdir).tar.xz | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) + test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ - && cd $(distdir)/_build \ + && am__cwd=`pwd` \ + && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ @@ -425,21 +547,24 @@ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ - (cd ../.. && $(mkinstalldirs) "$$dc_destdir") \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ - && $(MAKE) $(AM_MAKEFLAGS) dist-gzip \ - && rm -f $(distdir).tar.gz \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ + && cd "$$am__cwd" \ + || exit 1 $(am__remove_distdir) - @echo "$(distdir).tar.gz is ready for distribution" | \ - sed 'h;s/./=/g;p;x;p;x' + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: - @cd $(distuninstallcheck_dir) \ + @$(am__cd) '$(distuninstallcheck_dir)' \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ @@ -461,7 +586,6 @@ all-am: Makefile config.h installdirs: installdirs-recursive installdirs-am: - install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive @@ -481,7 +605,8 @@ clean-generic: distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -499,18 +624,40 @@ dvi-am: +html: html-recursive + +html-am: + info: info-recursive info-am: install-data-am: +install-dvi: install-dvi-recursive + +install-dvi-am: + install-exec-am: +install-html: install-html-recursive + +install-html-am: + install-info: install-info-recursive +install-info-am: + install-man: +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-recursive @@ -531,26 +678,26 @@ ps-am: -uninstall-am: uninstall-info-am +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ + ctags-recursive install-am install-strip tags-recursive -uninstall-info: uninstall-info-recursive +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am am--refresh check check-am clean clean-generic \ + ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ + dist-lzma dist-shar dist-tarZ dist-xz dist-zip distcheck \ + distclean distclean-generic distclean-hdr distclean-tags \ + distcleancheck distdir distuninstallcheck dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ + pdf-am ps ps-am tags tags-recursive uninstall uninstall-am -.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \ - clean-generic clean-recursive ctags ctags-recursive dist \ - dist-all dist-bzip2 dist-gzip dist-zip distcheck distclean \ - distclean-generic distclean-hdr distclean-recursive \ - distclean-tags distcleancheck distdir distuninstallcheck dvi \ - dvi-am dvi-recursive info info-am info-recursive install \ - install-am install-data install-data-am install-data-recursive \ - install-exec install-exec-am install-exec-recursive \ - install-info install-info-am install-info-recursive install-man \ - install-recursive install-strip installcheck installcheck-am \ - installdirs installdirs-am installdirs-recursive \ - maintainer-clean maintainer-clean-generic \ - maintainer-clean-recursive mostlyclean mostlyclean-generic \ - mostlyclean-recursive pdf pdf-am pdf-recursive ps ps-am \ - ps-recursive tags tags-recursive uninstall uninstall-am \ - uninstall-info-am uninstall-info-recursive uninstall-recursive # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru netperf-2.4.5/netperf.spec.in netperf-2.5.0/netperf.spec.in --- netperf-2.4.5/netperf.spec.in 2007-06-01 22:06:03.000000000 +0000 +++ netperf-2.5.0/netperf.spec.in 2011-02-10 17:04:21.000000000 +0000 @@ -1,48 +1,63 @@ -Summary: Network Performance Testing Tool -Name: netperf -Version: @VERSION@ -Release: 1 -Copyright: Unknown -Group: System Environment/Base -URL: http://www.netperf.org/ -Packager: Martin A. Brown -Source: ftp://ftp.netperf.org/netperf/%{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-root -Prefix: /usr +Summary: Network Performance Testing Tool +Name: netperf +Version: @VERSION@ +Release: 1 + +Group: System Environment/Base +License: Unknown +URL: http://www.netperf.org/ +Packager: Martin A. Brown +Source: ftp://ftp.netperf.org/netperf/%{name}-%{version}.tar.bz2 +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root + +BuildRequires: texinfo, texinfo-tex + +# we are not quite ready to make this a requirement but leave +# the line here as a heads up for the attentive :) +# BuildRequires: libsmbios-devel + +# if you want to enable the SCTP tests, append --enable-sctp to the +# configure line, and uncomment the next line +# BuildRequires: lksctp-tools-devel %description Many different network benchmarking tools are collected in this package, maintained by Rick Jones of HP. + %prep -%setup +%setup -q %build -#%patch0 -p1 -./configure \ - --prefix=%{_prefix} \ - --mandir=%{_mandir} \ - --infodir=%{_infodir} -make +# gcc 4.4 users may want to disable the strict aliasing warnings +# CFLAGS="$RPM_OPT_FLAGS -Wno-strict-aliasing" +%configure +make %{_smp_mflags} %install -test "$RPM_BUILD_ROOT" = "/" || rm -rf $RPM_BUILD_ROOT -make DESTDIR=${RPM_BUILD_ROOT} install +rm -rf $RPM_BUILD_ROOT +make install DESTDIR=${RPM_BUILD_ROOT} + +# Convert the main netperf document to other formats +cd doc +make %{name}.txt %{name}.html %{name}.xml pdf +cd .. -# -- .svn directory only needed by developers; blowing it away -# in our BUILD/ directory, so that we do not package it -# -rm -rf doc/examples/.svn +# We don't want to package the Makefile files in the examples directory +rm -f doc/examples/Makefile* + +# Info +rm -f $RPM_BUILD_ROOT/%{_infodir}/dir %clean -test "$RPM_BUILD_ROOT" = "/" || rm -rf $RPM_BUILD_ROOT +rm -rf $RPM_BUILD_ROOT # %post %files -%defattr(-,root,root) -%doc README AUTHORS ChangeLog INSTALL COPYING -%doc README.* Release_Notes +%defattr(-,root,root,-) +%doc README AUTHORS COPYING Release_Notes +%doc doc/netperf.{html,pdf,txt,xml} %doc doc/examples %{_mandir}/man1/* %{_infodir}/* @@ -51,5 +66,8 @@ %changelog -* Sat Jun 17 2006 Martin A. Brown +* Mon Sep 7 2009 Jose Pedro Oliveira - 2.4.5-1 +- Specfile cleanup. + +* Sat Jun 17 2006 Martin A. Brown - 2.4.2-1 - initial contributed specfile for netperf package (v2.4.2) diff -Nru netperf-2.4.5/README netperf-2.5.0/README --- netperf-2.4.5/README 2007-06-01 22:06:03.000000000 +0000 +++ netperf-2.5.0/README 2011-02-10 17:04:21.000000000 +0000 @@ -41,7 +41,7 @@ If you run into severe difficulties, or are just feeling chatty, please feel free to drop some email to me - Rick Jones -. Be sure to include a meaningful subject lines. +. Be sure to include a meaningful subject lines. happy benchmarking, rick jones diff -Nru netperf-2.4.5/README.vmware~ netperf-2.5.0/README.vmware~ --- netperf-2.4.5/README.vmware~ 2008-07-25 18:51:26.000000000 +0000 +++ netperf-2.5.0/README.vmware~ 1970-01-01 00:00:00.000000000 +0000 @@ -1,9 +0,0 @@ -Compiling for VMware is somewhat like compiling for Windows - there is -a separate, standalone makefile one uses. In this case, it is -src/Makefile.uw. - -Also, seems the way things are "run" under VMware is enough different -that the scripts, should you chose to use them, will need to be -modified. The initial set of patches make some arbitrary changes that -need to be re-worked with some "To run this under VMware uncomment -this line" or somesuch. diff -Nru netperf-2.4.5/Release_Notes netperf-2.5.0/Release_Notes --- netperf-2.4.5/Release_Notes 2009-05-27 21:46:43.000000000 +0000 +++ netperf-2.5.0/Release_Notes 2011-07-19 20:24:52.000000000 +0000 @@ -1,4 +1,124 @@ -These are the Release Notes leading-up to Revision 2.4.5 of netperf: +These are the Release Notes for Revision 2.5.0 of netperf: + +*) Add a new -N option to netserver which will suppress all creation + of debug files and so debugging output. While this would put a + serious crimp in debugging a problem in netserver, it will enable + folks using small embedded systems to avoid soaking-up their /tmp + filesystem with clutter. + +*) A refactoring and partial re-write of the src/netserver.c code to + untangle years of accumulated spaghetti code. Included is the + ability to not daemonize netserver when launched from the + command-line (-D) and also to not fork/spawn child processes upon + the acceptance of a control connection (-f). Combined, the two + options will cause netserver to remain in the forground and not + spawn children - in effect netserver will handle only one test at a + time. + +*) As it has been two years since the defect in Solaris getaddrinfo() + was submitted, it should be the case that a fix is available, so it + should no longer be necessary to "hide" the "Hey your platform's + getaddrinfo() call is buggy" warning. Consequently, it is no + longer being suppressed. + +*) A new global command line option - -S - has been added to enable + setting of SO_KEEPALIVE on the data socket. This will affect the + netperf side of the "classic" netperf tests, and will also affect + the netserver side of an "omni" or migrated classic test as only + the control message for the omni tests has the requisite flags + field to communicate the desire to set SO_KEEPALIVE. + + Ostensibly, this may help when netperf is (ab)used in functional + testing situations and netservers end-up orphaned and out in the + cold because their corresponding netperfs went away and the + notification was lost amid the roar of traffic over-saturating the + interconnect(s). + + The default is to behave as before - SO_KEEPALIVE not set. + +*) Base on the frequency at which the author has used the + functionality, the default for --enable-burst is now "yes." To + disable support for burst mode one must now include a + --enable-burst=no when performing the ./configure prior to + compiling the bits. + +*) The output of the -D global command line option (./configure + --enable-demo) has been enhanced to include seconds and + milliseconds since the epoch as returned by a gettimeofday() call + with a null pointer for the timezone. This is in support of being + able to easily shove interim results into an rrdtool Round-Robin + Database (RRD). + +*) The "omni" tests will be compiled-in by default, and WANT_MIGRATION + is the default. One must ./configure with --enable-omni=no to + disable this. + +*) When ./configured with --enable-intervals and intervals are + actually used, the round-trip latency reported by an omni (or + migrated classic) request/response test should better reflect + reality rather than the length of the pacing interval. It and the + MEAN_LATENCY from the histogram and -j output will still differ + slightly and probably always will. + +*) The histogram code has been enhanced to track more than one latency + at a time and so --enable-histogram and --enable-burst are now + compatible - for the omni tests or migrated "classic" tests only + however. This change was inspired/instigated by Jim Gettys and his + work on overly-large queues of buffers + +*) WANT_MIGRATION is enabled when one specifies --enable-omni on the + configure command line. + +*) Massage and encorporate a patch from Google that enables + randomization of the IP addresses used in a test. An optional mask + length in the standard '/' notation can be added to the end of the + IP/name in the test-specific -H or -L options of an Omni test. + +*) Massage and include a DEBUG_LOG_FILE patch for Android from + Josselin Costanzi + +*) Add intial attempt to report Slot ID on HP-UX 11.31. + +*) Add global -s option to cause omni tests to pause between + setting-up the test and actually starting it. pause is in seconds. + Poor man's way to (attempt to) avoid issues when starting many, + Many, MANY concurrent netperf tests. Based on patches from Google. + +*) Additional timing statistics will be kept by the omni tests when + the global "-j" option is specified. The additional statistics are + min, max, mean, stddev and the 50th, 90th and 99th percentiles on + the timings measured by histograms. Based on patches from Google. + +*) Add a workaround to get Linux to report TX queue drops in a + UDP_STREAM test when the socket buffer size is larger than the + TX queue. Provided by Andrew Gallatin. + +*) Fix the configure script to know it does not have to look for an + SCTP library on FreeBSD 8.X + +*) The BSD and "omni" tests now have a test-specific -R option which + is a boolean controlling whether or not SO_DONTROUTE will be set on + the data socket. By default, any unidirectional UDP test will have + SO_DONTROUTE set unless a -R 1 option is given. All other tests + (including UDP request/response tests) will not have SO_DONTROUTE + set unless a -R 0 option is given. This is put into place to make + it take longer for blithering idiots to shoot themselves in the + foot by running tests on setups they shouldn't. + +*) At least the beginnings of support for RDS, based on a circa 2007 + patch against 2.4.2 by Vladimir Sokolovsky. Rather than create the + "RDS_STREAM" test of his patch, the intention this time around is + to enable RDS for the "omni" tests by using an omni test-specific + -T rds specifyer for the "transport" to use. + +*) Missing fprintf format statements provided by Bruno Cornec + +*) Numerous cleanups from Jose Pedro Oliveira + +*) Fixes to allow netperf -H ::1 to work without having to add -6 or + an AF_INET6 -L option + +These are the Release Notes for Revision 2.4.5 of netperf: Things changed in this release: diff -Nru netperf-2.4.5/src/hist.h netperf-2.5.0/src/hist.h --- netperf-2.4.5/src/hist.h 2007-06-01 22:06:00.000000000 +0000 +++ netperf-2.5.0/src/hist.h 2011-03-14 18:36:33.000000000 +0000 @@ -43,17 +43,43 @@ #include "hrt.h" #endif +#ifndef HIST_NUM_OF_BUCKET +#define HIST_NUM_OF_BUCKET 100 +#endif + struct histogram_struct { - int unit_usec[10]; - int ten_usec[10]; - int hundred_usec[10]; - int unit_msec[10]; - int ten_msec[10]; - int hundred_msec[10]; - int unit_sec[10]; - int ten_sec[10]; + int unit_usec[HIST_NUM_OF_BUCKET]; + int ten_usec[HIST_NUM_OF_BUCKET]; + int hundred_usec[HIST_NUM_OF_BUCKET]; + int unit_msec[HIST_NUM_OF_BUCKET]; + int ten_msec[HIST_NUM_OF_BUCKET]; + int hundred_msec[HIST_NUM_OF_BUCKET]; + int unit_sec[HIST_NUM_OF_BUCKET]; + int ten_sec[HIST_NUM_OF_BUCKET]; int ridiculous; int total; + int sum; + double sumsquare; + int hmin; + int hmax; + int limit; + int count; + int producer; + int consumer; +#ifdef HAVE_GETHRTIME + hrtime_t *time_ones; + hrtime_t time_two; +#elif HAVE_GET_HRT + hrt_t *time_ones; + hrt_t time_two; +#elif defined(WIN32) + LARGE_INTEGER *time_ones; + LARGE_INTEGER time_two; +#else + struct timeval *time_ones; + struct timeval time_two; +#endif /* HAVE_GETHRTIME */ + }; typedef struct histogram_struct *HIST; @@ -65,12 +91,27 @@ HIST HIST_new(void); /* + HIST_new_n - return a new, cleard histogram data type able to track + at least max_outstanding timestamps +*/ + +HIST HIST_new_n(int max_outstanding); + +/* HIST_clear - reset a histogram by clearing all totals to zero */ + void HIST_clear(HIST h); /* + HIST_purge - forget about any remaining outstanding timestamps + being tracked +*/ + +void HIST_purge(HIST h); + +/* HIST_add - add a time difference to a histogram. Time should be in microseconds. */ @@ -99,6 +140,19 @@ #endif /* + HIST_timestamp_start - start a new timestamp +*/ + +void HIST_timestamp_start(HIST h); + +/* + HIST_timestamp_stop_add - complete the oldest outstanding timestamp + and add it to the histogram +*/ + +void HIST_timestamp_stop_add(HIST h); + +/* delta_micro - calculate the difference in microseconds between two timestamps */ diff -Nru netperf-2.4.5/src/Makefile.am netperf-2.5.0/src/Makefile.am --- netperf-2.4.5/src/Makefile.am 2008-10-24 23:19:36.000000000 +0000 +++ netperf-2.5.0/src/Makefile.am 2011-02-10 17:04:11.000000000 +0000 @@ -13,7 +13,7 @@ USE_SYS_SOURCE=netsys_@NETSYSLKUP_SOURCE@.c USE_SEC_SOURCE=netsec_@NETSECLKUP_SOURCE@.c -EXTRA_DIST = netcpu_none.c netcpu_looper.c netcpu_pstat.c netcpu_pstatnew.c netcpu_perfstat.c netcpu_procstat.c netcpu_kstat.c netcpu_kstat10.c netcpu_sysctl.c netcpu_ntperf.c netcpu_osx.c dirs NetPerfDir/* NetServerDir/* netperf_version.h.in netrt_rtnetlink.c netrt_none.c netrt_rtmget.c netdrv_ethtool.c netdrv_none.c netslot_linux.c netslot_none.c netsys_none.c netsys_hpux11i.c netsys_linux.c netsys_solaris.c netdrv_solaris.c netslot_solaris.c netsec_linux.c netsec_none.c Makefile.uw +EXTRA_DIST = netcpu_none.c netcpu_looper.c netcpu_pstat.c netcpu_pstatnew.c netcpu_perfstat.c netcpu_procstat.c netcpu_kstat.c netcpu_kstat10.c netcpu_sysctl.c netcpu_ntperf.c netcpu_osx.c dirs NetPerfDir/* NetServerDir/* netperf_version.h.in netrt_rtnetlink.c netrt_none.c netrt_rtmget.c netdrv_ethtool.c netdrv_none.c netslot_linux.c netslot_none.c netsys_none.c netsys_hpux11i.c netsys_linux.c netsys_solaris.c netdrv_solaris.c netslot_solaris.c netslot_ux1131.c netsec_linux.c netsec_none.c Makefile.uw COMMON_SRC = hist.h netlib.c netlib.h netcpu.h netsh.c netsh.h nettest_bsd.c nettest_bsd.h nettest_dlpi.c nettest_dlpi.h nettest_unix.c nettest_unix.h nettest_xti.c nettest_xti.h nettest_sctp.c nettest_sctp.h netperf_version.h nettest_sdp.c nettest_sdp.h nettest_omni.c net_uuid.c @@ -23,5 +23,5 @@ # if there are any "missing" routines, the libobjs should cover it if NEED_LIBCOMPAT netperf_LDADD = missing/libcompat.a -netserver_LDADD = missing/libcompat.a +netserver_LDADD = missing/libcompat.ap endif diff -Nru netperf-2.4.5/src/Makefile.in netperf-2.5.0/src/Makefile.in --- netperf-2.4.5/src/Makefile.in 2009-06-12 00:10:32.000000000 +0000 +++ netperf-2.5.0/src/Makefile.in 2011-07-19 23:25:15.000000000 +0000 @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.7.9 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ -# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 -# Free Software Foundation, Inc. +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -14,16 +15,12 @@ @SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = .. - +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -35,10 +32,97 @@ NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ +bin_PROGRAMS = netperf$(EXEEXT) netserver$(EXEEXT) +subdir = src +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(srcdir)/netperf_version.h.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/src/missing/m4/salen.m4 \ + $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = netperf_version.h +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +PROGRAMS = $(bin_PROGRAMS) +am__objects_1 = netlib.$(OBJEXT) netsh.$(OBJEXT) nettest_bsd.$(OBJEXT) \ + nettest_dlpi.$(OBJEXT) nettest_unix.$(OBJEXT) \ + nettest_xti.$(OBJEXT) nettest_sctp.$(OBJEXT) \ + nettest_sdp.$(OBJEXT) nettest_omni.$(OBJEXT) \ + net_uuid.$(OBJEXT) +am__objects_2 = netcpu_@NETCPU_SOURCE@.$(OBJEXT) +am__objects_3 = netrt_@NETRTLKUP_SOURCE@.$(OBJEXT) +am__objects_4 = netdrv_@NETDRVLKUP_SOURCE@.$(OBJEXT) +am__objects_5 = netslot_@NETSLOTLKUP_SOURCE@.$(OBJEXT) +am__objects_6 = netsys_@NETSYSLKUP_SOURCE@.$(OBJEXT) +am__objects_7 = netsec_@NETSECLKUP_SOURCE@.$(OBJEXT) +am_netperf_OBJECTS = netperf.$(OBJEXT) $(am__objects_1) \ + $(am__objects_2) $(am__objects_3) $(am__objects_4) \ + $(am__objects_5) $(am__objects_6) $(am__objects_7) +netperf_OBJECTS = $(am_netperf_OBJECTS) +@NEED_LIBCOMPAT_TRUE@netperf_DEPENDENCIES = missing/libcompat.a +am_netserver_OBJECTS = netserver.$(OBJEXT) $(am__objects_1) \ + $(am__objects_2) $(am__objects_3) $(am__objects_4) \ + $(am__objects_5) $(am__objects_6) $(am__objects_7) +netserver_OBJECTS = $(am_netserver_OBJECTS) +@NEED_LIBCOMPAT_TRUE@netserver_DEPENDENCIES = missing/libcompat.ap +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +SOURCES = $(netperf_SOURCES) $(netserver_SOURCES) +DIST_SOURCES = $(netperf_SOURCES) $(netserver_SOURCES) +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -58,6 +142,7 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -67,8 +152,7 @@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ -NEED_LIBCOMPAT_FALSE = @NEED_LIBCOMPAT_FALSE@ -NEED_LIBCOMPAT_TRUE = @NEED_LIBCOMPAT_TRUE@ +MKDIR_P = @MKDIR_P@ NETCPU_SOURCE = @NETCPU_SOURCE@ NETDRVLKUP_SOURCE = @NETDRVLKUP_SOURCE@ NETRTLKUP_SOURCE = @NETRTLKUP_SOURCE@ @@ -81,6 +165,7 @@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ @@ -88,18 +173,23 @@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ +builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ @@ -119,6 +209,7 @@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ +mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ @@ -126,148 +217,115 @@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ SUBDIRS = missing - CLEANFILES = netperf_version.h - -bin_PROGRAMS = netperf netserver - AM_CFLAGS = $(NETPERF_CFLAGS) - USE_CPU_SOURCE = netcpu_@NETCPU_SOURCE@.c USE_RT_SOURCE = netrt_@NETRTLKUP_SOURCE@.c USE_DRV_SOURCE = netdrv_@NETDRVLKUP_SOURCE@.c USE_SLOT_SOURCE = netslot_@NETSLOTLKUP_SOURCE@.c USE_SYS_SOURCE = netsys_@NETSYSLKUP_SOURCE@.c USE_SEC_SOURCE = netsec_@NETSECLKUP_SOURCE@.c - -EXTRA_DIST = netcpu_none.c netcpu_looper.c netcpu_pstat.c netcpu_pstatnew.c netcpu_perfstat.c netcpu_procstat.c netcpu_kstat.c netcpu_kstat10.c netcpu_sysctl.c netcpu_ntperf.c netcpu_osx.c dirs NetPerfDir/* NetServerDir/* netperf_version.h.in netrt_rtnetlink.c netrt_none.c netrt_rtmget.c netdrv_ethtool.c netdrv_none.c netslot_linux.c netslot_none.c netsys_none.c netsys_hpux11i.c netsys_linux.c netsys_solaris.c netdrv_solaris.c netslot_solaris.c netsec_linux.c netsec_none.c Makefile.uw - +EXTRA_DIST = netcpu_none.c netcpu_looper.c netcpu_pstat.c netcpu_pstatnew.c netcpu_perfstat.c netcpu_procstat.c netcpu_kstat.c netcpu_kstat10.c netcpu_sysctl.c netcpu_ntperf.c netcpu_osx.c dirs NetPerfDir/* NetServerDir/* netperf_version.h.in netrt_rtnetlink.c netrt_none.c netrt_rtmget.c netdrv_ethtool.c netdrv_none.c netslot_linux.c netslot_none.c netsys_none.c netsys_hpux11i.c netsys_linux.c netsys_solaris.c netdrv_solaris.c netslot_solaris.c netslot_ux1131.c netsec_linux.c netsec_none.c Makefile.uw COMMON_SRC = hist.h netlib.c netlib.h netcpu.h netsh.c netsh.h nettest_bsd.c nettest_bsd.h nettest_dlpi.c nettest_dlpi.h nettest_unix.c nettest_unix.h nettest_xti.c nettest_xti.h nettest_sctp.c nettest_sctp.h netperf_version.h nettest_sdp.c nettest_sdp.h nettest_omni.c net_uuid.c - netperf_SOURCES = netperf.c $(COMMON_SRC) $(USE_CPU_SOURCE) $(USE_RT_SOURCE) $(USE_DRV_SOURCE) $(USE_SLOT_SOURCE) $(USE_SYS_SOURCE) $(USE_SEC_SOURCE) netserver_SOURCES = netserver.c $(COMMON_SRC) $(USE_CPU_SOURCE) $(USE_RT_SOURCE) $(USE_DRV_SOURCE) $(USE_SLOT_SOURCE) $(USE_SYS_SOURCE) $(USE_SEC_SOURCE) # if there are any "missing" routines, the libobjs should cover it @NEED_LIBCOMPAT_TRUE@netperf_LDADD = missing/libcompat.a -@NEED_LIBCOMPAT_TRUE@netserver_LDADD = missing/libcompat.a -subdir = src -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = netperf_version.h -bin_PROGRAMS = netperf$(EXEEXT) netserver$(EXEEXT) -PROGRAMS = $(bin_PROGRAMS) - -am__objects_1 = netlib.$(OBJEXT) netsh.$(OBJEXT) nettest_bsd.$(OBJEXT) \ - nettest_dlpi.$(OBJEXT) nettest_unix.$(OBJEXT) \ - nettest_xti.$(OBJEXT) nettest_sctp.$(OBJEXT) \ - nettest_sdp.$(OBJEXT) nettest_omni.$(OBJEXT) net_uuid.$(OBJEXT) -am__objects_2 = netcpu_@NETCPU_SOURCE@.$(OBJEXT) -am__objects_3 = netrt_@NETRTLKUP_SOURCE@.$(OBJEXT) -am__objects_4 = netdrv_@NETDRVLKUP_SOURCE@.$(OBJEXT) -am__objects_5 = netslot_@NETSLOTLKUP_SOURCE@.$(OBJEXT) -am__objects_6 = netsys_@NETSYSLKUP_SOURCE@.$(OBJEXT) -am__objects_7 = netsec_@NETSECLKUP_SOURCE@.$(OBJEXT) -am_netperf_OBJECTS = netperf.$(OBJEXT) $(am__objects_1) $(am__objects_2) \ - $(am__objects_3) $(am__objects_4) $(am__objects_5) \ - $(am__objects_6) $(am__objects_7) -netperf_OBJECTS = $(am_netperf_OBJECTS) -@NEED_LIBCOMPAT_TRUE@netperf_DEPENDENCIES = missing/libcompat.a -@NEED_LIBCOMPAT_FALSE@netperf_DEPENDENCIES = -netperf_LDFLAGS = -am_netserver_OBJECTS = netserver.$(OBJEXT) $(am__objects_1) \ - $(am__objects_2) $(am__objects_3) $(am__objects_4) \ - $(am__objects_5) $(am__objects_6) $(am__objects_7) -netserver_OBJECTS = $(am_netserver_OBJECTS) -@NEED_LIBCOMPAT_TRUE@netserver_DEPENDENCIES = missing/libcompat.a -@NEED_LIBCOMPAT_FALSE@netserver_DEPENDENCIES = -netserver_LDFLAGS = - -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/net_uuid.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/netcpu_@NETCPU_SOURCE@.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/netdrv_@NETDRVLKUP_SOURCE@.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/netlib.Po ./$(DEPDIR)/netperf.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/netrt_@NETRTLKUP_SOURCE@.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/netsec_@NETSECLKUP_SOURCE@.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/netserver.Po ./$(DEPDIR)/netsh.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/netslot_@NETSLOTLKUP_SOURCE@.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/netsys_@NETSYSLKUP_SOURCE@.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/nettest_bsd.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/nettest_dlpi.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/nettest_omni.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/nettest_sctp.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/nettest_sdp.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/nettest_unix.Po \ -@AMDEP_TRUE@ ./$(DEPDIR)/nettest_xti.Po -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -DIST_SOURCES = $(netperf_SOURCES) $(netserver_SOURCES) - -RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \ - ps-recursive install-info-recursive uninstall-info-recursive \ - all-recursive install-data-recursive install-exec-recursive \ - installdirs-recursive install-recursive uninstall-recursive \ - check-recursive installcheck-recursive -DIST_COMMON = $(srcdir)/Makefile.in Makefile.am netperf_version.h.in -DIST_SUBDIRS = $(SUBDIRS) -SOURCES = $(netperf_SOURCES) $(netserver_SOURCES) - +@NEED_LIBCOMPAT_TRUE@netserver_LDADD = missing/libcompat.ap all: all-recursive .SUFFIXES: .SUFFIXES: .c .o .obj -$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) -netperf_version.h: $(top_builddir)/config.status netperf_version.h.in +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +netperf_version.h: $(top_builddir)/config.status $(srcdir)/netperf_version.h.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) - $(mkinstalldirs) $(DESTDIR)$(bindir) - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - if test -f $$p \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \ - $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \ - else :; fi; \ - done + test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p; \ + then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; for p in $$list; do \ - f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " rm -f $(DESTDIR)$(bindir)/$$f"; \ - rm -f $(DESTDIR)$(bindir)/$$f; \ - done + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) netperf$(EXEEXT): $(netperf_OBJECTS) $(netperf_DEPENDENCIES) @rm -f netperf$(EXEEXT) - $(LINK) $(netperf_LDFLAGS) $(netperf_OBJECTS) $(netperf_LDADD) $(LIBS) + $(LINK) $(netperf_OBJECTS) $(netperf_LDADD) $(LIBS) netserver$(EXEEXT): $(netserver_OBJECTS) $(netserver_DEPENDENCIES) @rm -f netserver$(EXEEXT) - $(LINK) $(netserver_LDFLAGS) $(netserver_OBJECTS) $(netserver_LDADD) $(LIBS) + $(LINK) $(netserver_OBJECTS) $(netserver_LDADD) $(LIBS) mostlyclean-compile: - -rm -f *.$(OBJEXT) core *.core + -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @@ -292,27 +350,18 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nettest_xti.Po@am__quote@ .c.o: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ -@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ -@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ -@am__fastdepCC_TRUE@ fi +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$< +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ -@am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ -@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ -@am__fastdepCC_TRUE@ fi +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi` -uninstall-info-am: +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. @@ -321,7 +370,13 @@ # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): - @set fnord $$MAKEFLAGS; amf=$$2; \ + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ @@ -332,16 +387,21 @@ else \ local_target="$$target"; \ fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -mostlyclean-recursive clean-recursive distclean-recursive \ -maintainer-clean-recursive: - @set fnord $$MAKEFLAGS; amf=$$2; \ +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ @@ -361,124 +421,137 @@ else \ local_target="$$target"; \ fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done -ETAGS = etags -ETAGSFLAGS = - -CTAGS = ctags -CTAGSFLAGS = - -tags: TAGS - ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique +tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ + set x; \ here=`pwd`; \ - if (etags --etags-include --version) >/dev/null 2>&1; then \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ + empty_fix=.; \ else \ include_option=--include; \ + empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -f $$subdir/TAGS && \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(ETAGS_ARGS)$$tags$$unique" \ - || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique - + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - -top_distdir = .. -distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) - $(mkinstalldirs) $(distdir)/NetPerfDir $(distdir)/NetServerDir - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkinstalldirs) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done - list='$(SUBDIRS)'; for subdir in $$list; do \ + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d $(distdir)/$$subdir \ - || mkdir $(distdir)/$$subdir \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ - (cd $$subdir && \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" \ - distdir=../$(distdir)/$$subdir \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ @@ -488,8 +561,9 @@ all-am: Makefile $(PROGRAMS) installdirs: installdirs-recursive installdirs-am: - $(mkinstalldirs) $(DESTDIR)$(bindir) - + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive @@ -510,7 +584,8 @@ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -529,18 +604,40 @@ dvi-am: +html: html-recursive + +html-am: + info: info-recursive info-am: install-data-am: +install-dvi: install-dvi-recursive + +install-dvi-am: + install-exec-am: install-binPROGRAMS +install-html: install-html-recursive + +install-html-am: + install-info: install-info-recursive +install-info-am: + install-man: +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-recursive @@ -560,26 +657,26 @@ ps-am: -uninstall-am: uninstall-binPROGRAMS uninstall-info-am +uninstall-am: uninstall-binPROGRAMS -uninstall-info: uninstall-info-recursive +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive -.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \ - clean-binPROGRAMS clean-generic clean-recursive ctags \ - ctags-recursive distclean distclean-compile distclean-generic \ - distclean-recursive distclean-tags distdir dvi dvi-am \ - dvi-recursive info info-am info-recursive install install-am \ - install-binPROGRAMS install-data install-data-am \ - install-data-recursive install-exec install-exec-am \ - install-exec-recursive install-info install-info-am \ - install-info-recursive install-man install-recursive \ +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-binPROGRAMS \ + clean-generic ctags ctags-recursive distclean \ + distclean-compile distclean-generic distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ - installdirs-am installdirs-recursive maintainer-clean \ - maintainer-clean-generic maintainer-clean-recursive mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-recursive \ - pdf pdf-am pdf-recursive ps ps-am ps-recursive tags \ - tags-recursive uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-info-am uninstall-info-recursive uninstall-recursive + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ + ps ps-am tags tags-recursive uninstall uninstall-am \ + uninstall-binPROGRAMS + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru netperf-2.4.5/src/missing/m4/Makefile.in netperf-2.5.0/src/missing/m4/Makefile.in --- netperf-2.4.5/src/missing/m4/Makefile.in 2009-06-12 00:10:33.000000000 +0000 +++ netperf-2.5.0/src/missing/m4/Makefile.in 2011-07-19 23:25:15.000000000 +0000 @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.7.9 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ -# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 -# Free Software Foundation, Inc. +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -13,17 +14,12 @@ # PARTICULAR PURPOSE. @SET_MAKE@ - -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../../.. - +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -35,10 +31,24 @@ NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ +subdir = src/missing/m4 +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/src/missing/m4/salen.m4 \ + $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -58,6 +68,7 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -67,8 +78,7 @@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ -NEED_LIBCOMPAT_FALSE = @NEED_LIBCOMPAT_FALSE@ -NEED_LIBCOMPAT_TRUE = @NEED_LIBCOMPAT_TRUE@ +MKDIR_P = @MKDIR_P@ NETCPU_SOURCE = @NETCPU_SOURCE@ NETDRVLKUP_SOURCE = @NETDRVLKUP_SOURCE@ NETRTLKUP_SOURCE = @NETRTLKUP_SOURCE@ @@ -81,6 +91,7 @@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ @@ -88,18 +99,23 @@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ +builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ @@ -119,6 +135,7 @@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ +mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ @@ -126,71 +143,90 @@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ EXTRA_DIST = *.m4 -subdir = src/missing/m4 -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -DIST_SOURCES = -DIST_COMMON = $(srcdir)/Makefile.in Makefile.am all: all-am .SUFFIXES: -$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/missing/m4/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) -uninstall-info-am: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/missing/m4/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/missing/m4/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): tags: TAGS TAGS: ctags: CTAGS CTAGS: -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - -top_distdir = ../../.. -distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkinstalldirs) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile - installdirs: install: install-am install-exec: install-exec-am @@ -211,7 +247,8 @@ clean-generic: distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -228,18 +265,40 @@ dvi-am: +html: html-am + +html-am: + info: info-am info-am: install-data-am: +install-dvi: install-dvi-am + +install-dvi-am: + install-exec-am: +install-html: install-html-am + +install-html-am: + install-info: install-info-am +install-info-am: + install-man: +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-am @@ -258,16 +317,20 @@ ps-am: -uninstall-am: uninstall-info-am +uninstall-am: + +.MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic distclean \ - distclean-generic distdir dvi dvi-am info info-am install \ - install-am install-data install-data-am install-exec \ - install-exec-am install-info install-info-am install-man \ + distclean-generic distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am \ - uninstall-info-am + mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru netperf-2.4.5/src/missing/m4/salen.m4 netperf-2.5.0/src/missing/m4/salen.m4 --- netperf-2.4.5/src/missing/m4/salen.m4 2008-03-18 18:35:51.000000000 +0000 +++ netperf-2.5.0/src/missing/m4/salen.m4 2011-02-10 17:04:11.000000000 +0000 @@ -16,7 +16,7 @@ dnl dnl Checks to see if the sockaddr struct has the 4.4 BSD sa_len member dnl borrowed from LBL libpcap -AC_DEFUN(AC_CHECK_SA_LEN, [ +AC_DEFUN([AC_CHECK_SA_LEN], [ AC_MSG_CHECKING(if sockaddr struct has sa_len member) AC_CACHE_VAL($1, AC_TRY_COMPILE([ diff -Nru netperf-2.4.5/src/missing/Makefile.in netperf-2.5.0/src/missing/Makefile.in --- netperf-2.4.5/src/missing/Makefile.in 2009-06-12 00:10:33.000000000 +0000 +++ netperf-2.5.0/src/missing/Makefile.in 2011-07-19 23:25:15.000000000 +0000 @@ -1,8 +1,9 @@ -# Makefile.in generated by automake 1.7.9 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ -# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 -# Free Software Foundation, Inc. +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -14,16 +15,12 @@ @SET_MAKE@ -srcdir = @srcdir@ -top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ -top_builddir = ../.. - +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c @@ -35,10 +32,81 @@ NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : +build_triplet = @build@ host_triplet = @host@ +target_triplet = @target@ +subdir = src/missing +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + getaddrinfo.c inet_ntop.c +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/src/missing/m4/salen.m4 \ + $(top_srcdir)/acinclude.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LIBRARIES = $(noinst_LIBRARIES) +AR = ar +ARFLAGS = cru +libcompat_a_AR = $(AR) $(ARFLAGS) +@NEED_LIBCOMPAT_TRUE@libcompat_a_DEPENDENCIES = $(LIBOBJS) +am__libcompat_a_SOURCES_DIST = getaddrinfo.h +am_libcompat_a_OBJECTS = +libcompat_a_OBJECTS = $(am_libcompat_a_OBJECTS) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +SOURCES = $(libcompat_a_SOURCES) +DIST_SOURCES = $(am__libcompat_a_SOURCES_DIST) +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ @@ -58,6 +126,7 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ +INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -67,8 +136,7 @@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ -NEED_LIBCOMPAT_FALSE = @NEED_LIBCOMPAT_FALSE@ -NEED_LIBCOMPAT_TRUE = @NEED_LIBCOMPAT_TRUE@ +MKDIR_P = @MKDIR_P@ NETCPU_SOURCE = @NETCPU_SOURCE@ NETDRVLKUP_SOURCE = @NETDRVLKUP_SOURCE@ NETRTLKUP_SOURCE = @NETRTLKUP_SOURCE@ @@ -81,6 +149,7 @@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ @@ -88,18 +157,23 @@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ -am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ -am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ +builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ @@ -119,6 +193,7 @@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ +mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ @@ -126,62 +201,54 @@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ SUBDIRS = m4 - @NEED_LIBCOMPAT_TRUE@noinst_LIBRARIES = libcompat.a @NEED_LIBCOMPAT_TRUE@libcompat_a_SOURCES = getaddrinfo.h @NEED_LIBCOMPAT_TRUE@libcompat_a_LIBADD = $(LIBOBJS) $(ALLOCA) -subdir = src/missing -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -LIBRARIES = $(noinst_LIBRARIES) - -libcompat_a_AR = $(AR) cru -@NEED_LIBCOMPAT_TRUE@libcompat_a_DEPENDENCIES = @LIBOBJS@ -@NEED_LIBCOMPAT_FALSE@libcompat_a_DEPENDENCIES = -am__libcompat_a_SOURCES_DIST = getaddrinfo.h -@NEED_LIBCOMPAT_TRUE@am_libcompat_a_OBJECTS = -libcompat_a_OBJECTS = $(am_libcompat_a_OBJECTS) - -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/getaddrinfo.Po $(DEPDIR)/inet_ntop.Po -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -DIST_SOURCES = $(am__libcompat_a_SOURCES_DIST) - -RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \ - ps-recursive install-info-recursive uninstall-info-recursive \ - all-recursive install-data-recursive install-exec-recursive \ - installdirs-recursive install-recursive uninstall-recursive \ - check-recursive installcheck-recursive -DIST_COMMON = $(srcdir)/Makefile.in Makefile.am getaddrinfo.c \ - inet_ntop.c -DIST_SUBDIRS = $(SUBDIRS) -SOURCES = $(libcompat_a_SOURCES) - all: all-recursive .SUFFIXES: .SUFFIXES: .c .o .obj -$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/missing/Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) - -AR = ar +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/missing/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/missing/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) @@ -191,7 +258,7 @@ $(RANLIB) libcompat.a mostlyclean-compile: - -rm -f *.$(OBJEXT) core *.core + -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @@ -200,27 +267,18 @@ @AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/inet_ntop.Po@am__quote@ .c.o: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ -@am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ -@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ -@am__fastdepCC_TRUE@ fi +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$< +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: -@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ -@am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \ -@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ -@am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ -@am__fastdepCC_TRUE@ fi +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi` -uninstall-info-am: +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. @@ -229,7 +287,13 @@ # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): - @set fnord $$MAKEFLAGS; amf=$$2; \ + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ @@ -240,16 +304,21 @@ else \ local_target="$$target"; \ fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -mostlyclean-recursive clean-recursive distclean-recursive \ -maintainer-clean-recursive: - @set fnord $$MAKEFLAGS; amf=$$2; \ +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ @@ -269,123 +338,137 @@ else \ local_target="$$target"; \ fi; \ - (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done -ETAGS = etags -ETAGSFLAGS = - -CTAGS = ctags -CTAGSFLAGS = - -tags: TAGS - ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique +tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ + set x; \ here=`pwd`; \ - if (etags --etags-include --version) >/dev/null 2>&1; then \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ + empty_fix=.; \ else \ include_option=--include; \ + empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -f $$subdir/TAGS && \ - tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(ETAGS_ARGS)$$tags$$unique" \ - || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique - + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ - $(AWK) ' { files[$$0] = 1; } \ - END { for (i in files) print i; }'`; \ - test -z "$(CTAGS_ARGS)$$tags$$unique" \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$tags $$unique + $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ - && cd $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) $$here + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) - -top_distdir = ../.. -distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ - list='$(DISTFILES)'; for file in $$list; do \ - case $$file in \ - $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ - $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ - esac; \ + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test "$$dir" != "$$file" && test "$$dir" != "."; then \ - dir="/$$dir"; \ - $(mkinstalldirs) "$(distdir)$$dir"; \ - else \ - dir=''; \ - fi; \ if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ - cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ - test -f $(distdir)/$$file \ - || cp -p $$d/$$file $(distdir)/$$file \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done - list='$(SUBDIRS)'; for subdir in $$list; do \ + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d $(distdir)/$$subdir \ - || mkdir $(distdir)/$$subdir \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ - (cd $$subdir && \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$(top_distdir)" \ - distdir=../$(distdir)/$$subdir \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ @@ -395,7 +478,6 @@ all-am: Makefile $(LIBRARIES) installdirs: installdirs-recursive installdirs-am: - install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive @@ -415,7 +497,8 @@ clean-generic: distclean-generic: - -rm -f $(CONFIG_CLEAN_FILES) + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @@ -434,18 +517,40 @@ dvi-am: +html: html-recursive + +html-am: + info: info-recursive info-am: install-data-am: +install-dvi: install-dvi-recursive + +install-dvi-am: + install-exec-am: +install-html: install-html-recursive + +install-html-am: + install-info: install-info-recursive +install-info-am: + install-man: +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + installcheck-am: maintainer-clean: maintainer-clean-recursive @@ -465,26 +570,25 @@ ps-am: -uninstall-am: uninstall-info-am +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive -uninstall-info: uninstall-info-recursive +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic \ + clean-noinstLIBRARIES ctags ctags-recursive distclean \ + distclean-compile distclean-generic distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs installdirs-am \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ + tags tags-recursive uninstall uninstall-am -.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \ - clean-generic clean-noinstLIBRARIES clean-recursive ctags \ - ctags-recursive distclean distclean-compile distclean-generic \ - distclean-recursive distclean-tags distdir dvi dvi-am \ - dvi-recursive info info-am info-recursive install install-am \ - install-data install-data-am install-data-recursive \ - install-exec install-exec-am install-exec-recursive \ - install-info install-info-am install-info-recursive install-man \ - install-recursive install-strip installcheck installcheck-am \ - installdirs installdirs-am installdirs-recursive \ - maintainer-clean maintainer-clean-generic \ - maintainer-clean-recursive mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-recursive pdf pdf-am \ - pdf-recursive ps ps-am ps-recursive tags tags-recursive \ - uninstall uninstall-am uninstall-info-am \ - uninstall-info-recursive uninstall-recursive # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru netperf-2.4.5/src/netcpu_kstat10.c netperf-2.5.0/src/netcpu_kstat10.c --- netperf-2.4.5/src/netcpu_kstat10.c 2008-08-05 00:08:34.000000000 +0000 +++ netperf-2.5.0/src/netcpu_kstat10.c 2011-07-07 22:00:53.000000000 +0000 @@ -1,5 +1,5 @@ char netcpu_kstat10_id[]="\ -@(#)netcpu_kstat10.c (c) Copyright 2005-2007, Hewlett-Packard Company Version 2.4.3"; +@(#)netcpu_kstat10.c (c) Copyright 2005-2011, Hewlett-Packard Company Version 2.5.0"; #if HAVE_CONFIG_H # include @@ -56,15 +56,17 @@ static void print_cpu_time_counters(char *name, int instance, cpu_time_counters_t *counters) { - fprintf(where,"%s[%d]:\n",name,instance); fprintf(where, - "\t idle %llu\n",counters[instance].idle); - fprintf(where, - "\t user %llu\n",counters[instance].user); - fprintf(where, - "\t kernel %llu\n",counters[instance].kernel); - fprintf(where, - "\t interrupt %llu\n",counters[instance].interrupt); + "%s[%d]:\n" + "\t idle %llu\n" + "\t user %llu\n" + "\t kernel %llu\n" + "\t interrupt %llu\n", + name,instance, + counters[instance].idle, + counters[instance].user, + counters[instance].kernel, + counters[instance].interrupt); } void @@ -104,11 +106,10 @@ if (MAXCPUS == i) { fprintf(where, - "Sorry, this system has more CPUs (%d) than netperf can handle (%d).\n", + "Sorry, this system has more CPUs (%d) than netperf can handle (%d).\n" + "Please alter MAXCPUS in netlib.h and recompile.\n", i, MAXCPUS); - fprintf(where, - "Please alter MAXCPUS in netlib.h and recompile.\n"); fflush(where); exit(1); } @@ -134,8 +135,7 @@ { if (why) { fprintf(where, - "WARNING! WARNING! WARNING! WARNING!\n"); - fprintf(where, + "WARNING! WARNING! WARNING! WARNING!\n" "%s found an unexpected %s statistic %.16s\n", who, why, @@ -202,8 +202,7 @@ /* might want to tell people about what we are skipping. however, only display other names debug >=2. raj - 2005-01-28 - */ + 2005-01-28 */ print_unexpected_statistic_warning("get_cpu_counters", knp->name, @@ -374,11 +373,11 @@ lib_local_cpu_util = (float)0.0; - /* It is possible that the library measured a time other than */ - /* the one that the user want for the cpu utilization */ - /* calculations - for example, tests that were ended by */ - /* watchdog timers such as the udp stream test. We let these */ - /* tests tell up what the elapsed time should be. */ + /* It is possible that the library measured a time other than the + one that the user want for the cpu utilization calculations - for + example, tests that were ended by watchdog timers such as the udp + stream test. We let these tests tell up what the elapsed time + should be. */ if (elapsed_time != 0.0) { correction_factor = (float) 1.0 + @@ -416,7 +415,7 @@ more interrupt time than the sum of user, kernel and idle. that is a theoretical possibility I suppose, but for the time-being, one that we will blythly ignore, except perhaps for - a quick check. raj 2005-01-31 + a quick check. raj 2005-01-31 */ /* we ass-u-me that these counters will never wrap during a @@ -450,19 +449,17 @@ the best way to get our tails out of here so let us just punt. raj 2005-01-31 */ fprintf(where, - "WARNING! WARNING! WARNING! WARNING! WARNING! \n"); - fprintf(where, - "calc_cpu_util_internal: more interrupt time than others combined!\n"); - fprintf(where, - "\tso CPU util cannot be estimated\n"); - fprintf(where, - "\t delta[%d].interrupt %llu\n",i,delta_cpu_counters[i].interrupt); - fprintf(where, - "\t delta[%d].idle %llu\n",i,delta_cpu_counters[i].idle); - fprintf(where, - "\t delta[%d].user %llu\n",i,delta_cpu_counters[i].user); - fprintf(where, - "\t delta[%d].kernel %llu\n",i,delta_cpu_counters[i].kernel); + "WARNING! WARNING! WARNING! WARNING! WARNING! \n" + "calc_cpu_util_internal: more interrupt time than others combined!\n" + "\tso CPU util cannot be estimated\n" + "\t delta[%d].interrupt %llu\n" + "\t delta[%d].idle %llu\n" + "\t delta[%d].user %llu\n" + "\t delta[%d].kernel %llu\n", + i,delta_cpu_counters[i].interrupt, + i,delta_cpu_counters[i].idle, + i,delta_cpu_counters[i].user, + i,delta_cpu_counters[i].kernel); fflush(where); lib_local_cpu_util = -1.0; @@ -497,14 +494,13 @@ if (debug) { fprintf(where, - "\tfraction_idle %llu interrupt_idle %llu\n", + "\tfraction_idle %llu interrupt_idle %llu\n" + "\tfraction_user %llu interrupt_user %llu\n" + "\tfraction_kernel %llu interrupt_kernel %llu\n", fraction_idle, - interrupt_idle); - fprintf(where, - "\tfraction_user %llu interrupt_user %llu\n", + interrupt_idle, fraction_user, - interrupt_user); - fprintf(where,"\tfraction_kernel %llu interrupt_kernel %llu\n", + interrupt_user, fraction_kernel, interrupt_kernel); } @@ -526,9 +522,9 @@ corrected_cpu_counters); } - /* I was going to checkfor going less than zero, but since all the - calculations are in unsigned quantities that would seem to be a - triffle silly... raj 2005-01-28 */ + /* I was going to check for going less than zero, but since all + the calculations are in unsigned quantities that would seem to + be a triffle silly... raj 2005-01-28 */ /* ok, now we sum the numbers again, this time including interrupt */ diff -Nru netperf-2.4.5/src/netcpu_osx.c netperf-2.5.0/src/netcpu_osx.c --- netperf-2.4.5/src/netcpu_osx.c 2007-06-01 22:06:00.000000000 +0000 +++ netperf-2.5.0/src/netcpu_osx.c 2011-07-07 21:53:43.000000000 +0000 @@ -1,5 +1,5 @@ char netcpu_sysctl_id[]="\ -@(#)netcpu_osx.c Version 2.4.3"; +@(#)netcpu_osx.c Version 2.5.0"; #if HAVE_CONFIG_H # include @@ -44,6 +44,12 @@ here */ #include +/* some of this is to make Tiger (10.4), Leopard (10.5) and + SnowLeopard (10.6) happy, we hope it does not anger previous + versions */ +#include +/* #include */ + #include "netsh.h" #include "netlib.h" @@ -106,11 +112,11 @@ natural_t userticks, systicks, idleticks, totalticks; lib_local_cpu_util = (float)0.0; - /* It is possible that the library measured a time other than */ - /* the one that the user want for the cpu utilization */ - /* calculations - for example, tests that were ended by */ - /* watchdog timers such as the udp stream test. We let these */ - /* tests tell up what the elapsed time should be. */ + /* It is possible that the library measured a time other than the + one that the user want for the cpu utilization calculations - for + example, tests that were ended by watchdog timers such as the udp + stream test. We let these tests tell up what the elapsed time + should be. */ if (elapsed_time != 0.0) { correction_factor = (float) 1.0 + diff -Nru netperf-2.4.5/src/netcpu_perfstat.c netperf-2.5.0/src/netcpu_perfstat.c --- netperf-2.4.5/src/netcpu_perfstat.c 2007-06-01 22:06:00.000000000 +0000 +++ netperf-2.5.0/src/netcpu_perfstat.c 2011-07-07 22:04:00.000000000 +0000 @@ -1,5 +1,5 @@ char netcpu_perfstat_id[]="\ -@(#)netcpu_perfstat.c Version 2.4.0"; +@(#)netcpu_perfstat.c Version 2.5.0"; #if HAVE_CONFIG_H # include @@ -222,17 +222,21 @@ per_cpu_pointer = perfstat_buffer; if(debug) { - fprintf(where, "Calibration for perfstat counter run: %d\n",i); - fprintf(where,"\tsec = %ld usec = %ld\n",sec,usec); - fprintf(where,"\telapsed time = %g\n",elapsed); + fprintf(where, + "Calibration for perfstat counter run: %d\n" + "\tsec = %ld usec = %ld\n" + "\telapsed time = %g\n", + i, + sec,usec, + elapsed); } for (j = 0; j < lib_num_loc_cpus; j++) { secondcnt[j] = per_cpu_pointer->idle; per_cpu_pointer++; if(debug) { - /* I know that there are situations where compilers know about */ - /* long long, but the library functions do not... raj 4/95 */ + /* I know that there are situations where compilers know about + long long, but the library functions do not... raj 4/95 */ fprintf(where, "\tfirstcnt[%d] = 0x%8.8lx%8.8lx secondcnt[%d] = 0x%8.8lx%8.8lx\n", j, @@ -242,8 +246,8 @@ secondcnt[j], secondcnt[j]); } - /* we assume that it would wrap no more than once. we also */ - /* assume that the result of subtracting will "fit" raj 4/95 */ + /* we assume that it would wrap no more than once. we also + assume that the result of subtracting will "fit" raj 4/95 */ temp_rate = (secondcnt[j] >= firstcnt[j]) ? (float)(secondcnt[j] - firstcnt[j])/elapsed : (float)(secondcnt[j]-firstcnt[j]+MAXLONG)/elapsed; @@ -272,11 +276,11 @@ float correction_factor; lib_local_cpu_util = (float)0.0; - /* It is possible that the library measured a time other than */ - /* the one that the user want for the cpu utilization */ - /* calculations - for example, tests that were ended by */ - /* watchdog timers such as the udp stream test. We let these */ - /* tests tell up what the elapsed time should be. */ + /* It is possible that the library measured a time other than the + one that the user want for the cpu utilization calculations - for + example, tests that were ended by watchdog timers such as the udp + stream test. We let these tests tell up what the elapsed time + should be. */ if (elapsed_time != 0.0) { correction_factor = (float) 1.0 + @@ -286,14 +290,13 @@ correction_factor = (float) 1.0; } - /* this looks just like the looper case. at least I think it */ - /* should :) raj 4/95 */ + /* this looks just like the looper case. at least I think it should + :) raj 4/95 */ for (i = 0; i < lib_num_loc_cpus; i++) { - /* we assume that the two are not more than a long apart. I */ - /* know that this is bad, but trying to go from long longs to */ - /* a float (perhaps a double) is boggling my mind right now. */ - /* raj 4/95 */ + /* we assume that the two are not more than a long apart. I know + that this is bad, but trying to go from long longs to a float + (perhaps a double) is boggling my mind right now. raj 4/95 */ long long diff; diff -Nru netperf-2.4.5/src/netcpu_procstat.c netperf-2.5.0/src/netcpu_procstat.c --- netperf-2.4.5/src/netcpu_procstat.c 2009-05-27 21:44:35.000000000 +0000 +++ netperf-2.5.0/src/netcpu_procstat.c 2011-07-16 01:35:52.000000000 +0000 @@ -1,5 +1,5 @@ char netcpu_procstat_id[]="\ -@(#)netcpu_procstat.c (c) Copyright 2005-2007 Version 2.4.3"; +@(#)netcpu_procstat.c (c) Copyright 2005-2011 Version 2.5.0"; /* netcpu_procstat.c @@ -62,7 +62,7 @@ /* The max. length of one line of /proc/stat cpu output */ -#define CPU_LINE_LENGTH ((CPU_STATES * sizeof (long) / 3 + 1) * 4 + 8) +#define CPU_LINE_LENGTH (int)((CPU_STATES * sizeof (long) / 3 + 1) * 4 + 8) #define PROC_STAT_FILE_NAME "/proc/stat" #define N_CPU_LINES(nr) (nr == 1 ? 1 : 1 + nr) @@ -160,7 +160,6 @@ static void get_cpu (cpu_states_t *res) { - int space; int i; int n = lib_num_loc_cpus; char *p = proc_stat_buf; @@ -189,17 +188,18 @@ (unsigned long long *)&res[i].steal, (unsigned long long *)&res[i].guest); if (debug) { - fprintf(where,"res[%d] is %llu %llu %llu %llu %llu %llu %llu %llu %llu\n", - i, - (unsigned long long)res[i].user, - (unsigned long long)res[i].nice, - (unsigned long long)res[i].sys, - (unsigned long long)res[i].idle, - (unsigned long long)res[i].iowait, - (unsigned long long)res[i].hard_irq, - (unsigned long long)res[i].soft_irq, - (unsigned long long)res[i].steal, - (unsigned long long)res[i].guest); + fprintf(where, + "res[%d] is %llu %llu %llu %llu %llu %llu %llu %llu %llu\n", + i, + (unsigned long long)res[i].user, + (unsigned long long)res[i].nice, + (unsigned long long)res[i].sys, + (unsigned long long)res[i].idle, + (unsigned long long)res[i].iowait, + (unsigned long long)res[i].hard_irq, + (unsigned long long)res[i].soft_irq, + (unsigned long long)res[i].steal, + (unsigned long long)res[i].guest); fflush(where); } p = strchr (p, '\n'); @@ -227,8 +227,6 @@ static uint64_t tick_subtract(uint64_t start, uint64_t end) { - uint64_t ret; - if (end >= start || (start & 0xffffffff00000000ULL)) return (end - start); @@ -245,7 +243,7 @@ float calc_cpu_util_internal(float elapsed_time) { - int i, j; + int i; float correction_factor; cpu_states_t diff; @@ -317,7 +315,8 @@ lib_local_per_cpu_util[i] *= correction_factor; if (debug) { fprintf(where, - "calc_cpu_util: util on processor %d, diff = %llu %llu %llu %llu %llu %llu %llu %llu %llu util %f cf %f\n", + "calc_cpu_util: util on processor %d, diff = %llu %llu %llu " + "%llu %llu %llu %llu %llu %llu util %f cf %f\n", i, (unsigned long long)diff.user, (unsigned long long)diff.nice, diff -Nru netperf-2.4.5/src/netcpu_pstatnew.c netperf-2.5.0/src/netcpu_pstatnew.c --- netperf-2.4.5/src/netcpu_pstatnew.c 2008-02-01 19:29:36.000000000 +0000 +++ netperf-2.5.0/src/netcpu_pstatnew.c 2011-07-07 22:05:55.000000000 +0000 @@ -1,5 +1,5 @@ char netcpu_pstatnew_id[]="\ -@(#)netcpu_pstatnew.c (c) Copyright 2005, Hewlett-Packard Company, Version 2.4.1"; +@(#)netcpu_pstatnew.c (c) Copyright 2005-2011 Hewlett-Packard Company, Version 2.5.0"; /* since we "know" that this interface is available only on 11.23 and later, and that 11.23 and later are strictly 64-bit kernels, we can @@ -60,9 +60,31 @@ static cpu_time_counters_t ending_cpu_counters[MAXCPUS]; static cpu_time_counters_t delta_cpu_counters[MAXCPUS]; +/* there can be more "processors" in the system than are actually + online. so, we can either walk all the processors one at a time, + which would be slow, or we can track not just lib_num_loc_cpu, + which is the number of active "processors" but also the total + number, and retrieve all of them at one shot and walk the list + once, ignoring those that are offline. we will ass-u-me there is + no change to the number of processors online while we are running + or there will be strange things happening to CPU utilization. raj + 2010-04-27 */ + +static long max_proc_count; + void cpu_util_init(void) { + struct pst_dynamic psd; + if (pstat_getdynamic((struct pst_dynamic *)&psd, + (size_t)sizeof(psd), (size_t)1, 0) != -1) { + max_proc_count = psd.psd_max_proc_cnt; + } + else { + /* we hope this never happens */ + max_proc_count = lib_num_loc_cpus; + } + return; } @@ -89,20 +111,31 @@ 2005/09/06 */ struct pst_processor *psp; - psp = (struct pst_processor *)malloc(lib_num_loc_cpus * sizeof(*psp)); + /* to handle the cases of "processors" present but disabled, we + will have to allocate a buffer big enough for everyone and + then walk the entire list, pulling data for those which are + online, assuming the processors online have not changed in + the middle of the run. raj 2010-04-27 */ + psp = (struct pst_processor *)malloc(max_proc_count * sizeof(*psp)); if (psp == NULL) { - printf("malloc(%d) failed!\n", lib_num_loc_cpus * sizeof(*psp)); + printf("malloc(%d) failed!\n", max_proc_count * sizeof(*psp)); exit(1); - } - if (pstat_getprocessor(psp, sizeof(*psp), lib_num_loc_cpus, 0) != -1) { - int i; + } + if (pstat_getprocessor(psp, sizeof(*psp), max_proc_count, 0) != -1) { + int i,j; /* we use lib_iticksperclktick in our sanity checking. we ass-u-me it is the same value for each CPU - famous last words no doubt. raj 2005/09/06 */ lib_iticksperclktick = psp[0].psp_iticksperclktick; - for (i = 0; i < lib_num_loc_cpus; i++) { - res[i].idle = (((uint64_t)psp[i].psp_idlecycles.psc_hi << 32) + - psp[i].psp_idlecycles.psc_lo); + i = j = 0; + while ((i < lib_num_loc_cpus) && (j < max_proc_count)) { + if (psp[j].psp_processor_state == PSP_SPU_DISABLED) { + j++; + continue; + } + /* we know that psp[j] is online */ + res[i].idle = (((uint64_t)psp[j].psp_idlecycles.psc_hi << 32) + + psp[j].psp_idlecycles.psc_lo); if(debug) { fprintf(where, "\tidle[%d] = 0x%"PRIx64" ", @@ -110,8 +143,8 @@ res[i].idle); fflush(where); } - res[i].user = (((uint64_t)psp[i].psp_usercycles.psc_hi << 32) + - psp[i].psp_usercycles.psc_lo); + res[i].user = (((uint64_t)psp[j].psp_usercycles.psc_hi << 32) + + psp[j].psp_usercycles.psc_lo); if(debug) { fprintf(where, "user[%d] = 0x%"PRIx64" ", @@ -119,8 +152,8 @@ res[i].user); fflush(where); } - res[i].kernel = (((uint64_t)psp[i].psp_systemcycles.psc_hi << 32) + - psp[i].psp_systemcycles.psc_lo); + res[i].kernel = (((uint64_t)psp[j].psp_systemcycles.psc_hi << 32) + + psp[j].psp_systemcycles.psc_lo); if(debug) { fprintf(where, "kern[%d] = 0x%"PRIx64" ", @@ -128,8 +161,8 @@ res[i].kernel); fflush(where); } - res[i].interrupt = (((uint64_t)psp[i].psp_interruptcycles.psc_hi << 32) + - psp[i].psp_interruptcycles.psc_lo); + res[i].interrupt = (((uint64_t)psp[j].psp_interruptcycles.psc_hi << 32) + + psp[j].psp_interruptcycles.psc_lo); if(debug) { fprintf(where, "intr[%d] = 0x%"PRIx64"\n", @@ -137,7 +170,9 @@ res[i].interrupt); fflush(where); } - } + i++; + j++; + } free(psp); } } @@ -156,15 +191,17 @@ static void print_cpu_time_counters(char *name, int instance, cpu_time_counters_t *counters) { - fprintf(where,"%s[%d]:\n",name,instance); - fprintf(where, - "\t idle %llu\n",counters[instance].idle); - fprintf(where, - "\t user %llu\n",counters[instance].user); fprintf(where, - "\t kernel %llu\n",counters[instance].kernel); - fprintf(where, - "\t interrupt %llu\n",counters[instance].interrupt); + "%s[%d]:\n" + "\t idle %llu\n" + "\t user %llu\n" + "\t kernel %llu\n" + "\t interrupt %llu\n", + name,instance, + counters[instance].idle, + counters[instance].user, + counters[instance].kernel, + counters[instance].interrupt); } float @@ -274,7 +311,8 @@ if (debug) { fprintf(where, - "total_cpu_cycles %"PRIu64" sanity_cpu_cycles %"PRIu64" missing %"PRIu64"\n", + "total_cpu_cycles %"PRIu64" sanity_cpu_cycles %"PRIu64 + " missing %"PRIu64"\n", total_cpu_cycles, sanity_cpu_cycles, sanity_cpu_cycles - total_cpu_cycles); @@ -308,11 +346,16 @@ (double)sanity_cpu_cycles; if (debug) { - fprintf(where,"\tfraction_idle %g\n",fraction_idle); - fprintf(where,"\tfraction_user %g\n",fraction_user); - fprintf(where,"\tfraction_kernel %g\n",fraction_kernel); - fprintf(where,"\tfraction_interrupt %g WARNING, possibly under-counted!\n",fraction_interrupt); - fprintf(where,"\testimated_fraction_interrupt %g\n", + fprintf(where, + "\tfraction_idle %g\n" + "\tfraction_user %g\n" + "\tfraction_kernel %g\n" + "\tfraction_interrupt %g WARNING, possibly under-counted!\n" + "\testimated_fraction_interrupt %g\n", + fraction_idle, + fraction_user, + fraction_kernel, + fraction_interrupt, estimated_fraction_interrupt); } @@ -352,11 +395,16 @@ CALC_ACCURACY) / sanity_cpu_cycles; if (debug) { - fprintf(where,"\tfraction_idle %"PRIu64"\n",fraction_idle); - fprintf(where,"\tfraction_user %"PRIu64"\n",fraction_user); - fprintf(where,"\tfraction_kernel %"PRIu64"\n",fraction_kernel); - fprintf(where,"\tfraction_interrupt %"PRIu64"WARNING, possibly under-counted!\n",fraction_interrupt); - fprintf(where,"\testimated_fraction_interrupt %"PRIu64"\n", + fprintf(where, + "\tfraction_idle %"PRIu64"\n" + "\tfraction_user %"PRIu64"\n" + "\tfraction_kernel %"PRIu64"\n" + "\tfraction_interrupt %"PRIu64"WARNING, possibly under-counted!\n" + "\testimated_fraction_interrupt %"PRIu64"\n", + fraction_idle, + fraction_user, + fraction_kernel, + fraction_interrupt, estimated_fraction_interrupt); } @@ -379,7 +427,8 @@ if (debug) { fprintf(where, - "calc_cpu_util: returning %g\n",lib_local_cpu_util); + "calc_cpu_util: returning %g\n", + lib_local_cpu_util); } return lib_local_cpu_util; diff -Nru netperf-2.4.5/src/netlib.c netperf-2.5.0/src/netlib.c --- netperf-2.4.5/src/netlib.c 2009-05-27 22:27:34.000000000 +0000 +++ netperf-2.5.0/src/netlib.c 2011-07-16 01:29:17.000000000 +0000 @@ -1,5 +1,5 @@ char netlib_id[]="\ -@(#)netlib.c (c) Copyright 1993-2007 Hewlett-Packard Company. Version 2.4.3"; +@(#)netlib.c (c) Copyright 1993-2011 Hewlett-Packard Company. Version 2.5.0"; /****************************************************************/ @@ -29,8 +29,11 @@ /* format_units() return the format in english */ /* msec_sleep() sleep for some msecs */ /* start_timer() start a timer */ +/* random_ip_address() select a random IP address from */ +/* specified range */ /* */ -/* the routines you get when WANT_DLPI is defined... */ +/* the routines you get when WANT_DLPI is defined... */ +/* ...all moved to src/nettest_dlpi.c */ /* */ /* dl_open() open a file descriptor and */ /* attach to the card */ @@ -54,12 +57,16 @@ #include #endif - /* It would seem that most of the includes being done here from */ - /* "sys/" actually have higher-level wrappers at just /usr/include. */ - /* This is based on a spot-check of a couple systems at my disposal. */ - /* If you have trouble compiling you may want to add "sys/" raj 10/95 */ + /* It would seem that most of the includes being done here from + "sys/" actually have higher-level wrappers at just /usr/include. + This is based on a spot-check of a couple systems at my disposal. + If you have trouble compiling you may want to add "sys/" raj + 10/95 */ #include #include +#ifdef HAVE_SYSCALL_H +#include +#endif #ifdef MPE # define NSIG _NSIG #endif /* MPE */ @@ -76,10 +83,10 @@ #ifndef WIN32 - /* at some point, I would like to get rid of all these "sys/" */ - /* includes where appropriate. if you have a system that requires */ - /* them, speak now, or your system may not compile later revisions of */ - /* netperf. raj 1/96 */ + /* at some point, I would like to get rid of all these "sys/" + includes where appropriate. if you have a system that requires/ + them, speak now, or your system may not compile later revisions of + netperf. raj 1/96 */ #include #include #include @@ -138,19 +145,6 @@ #endif /* __sgi */ #endif /* _AIX */ -#ifdef WANT_DLPI -#include -#include -#include -#ifdef __osf__ -#include -#else /* __osf__ */ -#include -#ifdef __hpux -#include -#endif /* __hpux */ -#endif /* __osf__ */ -#endif /* WANT_DLPI */ #ifdef HAVE_MPCTL #include @@ -161,9 +155,8 @@ #endif -#ifdef WANT_HISTOGRAM #include "hist.h" -#endif /* WANT_HISTOGRAM */ + /****************************************************************/ /* */ /* Local Include Files */ @@ -173,6 +166,7 @@ #include "netlib.h" #include "netsh.h" #include "netcpu.h" +#include "netperf_version.h" /****************************************************************/ /* */ @@ -194,10 +188,10 @@ #define LONG_LONG_MAX 9223372036854775807LL #endif /* LONG_LONG_MAX */ - /* older versions of netperf knew about the HP kernel IDLE counter. */ - /* this is now obsolete - in favor of either pstat(), times, or a */ - /* process-level looper process. we also now require support for the */ - /* "long" integer type. raj 4/95. */ + /* older versions of netperf knew about the HP kernel IDLE counter. + this is now obsolete - in favor of either pstat(), times, or a + process-level looper process. we also now require support for the + "long" integer type. raj 4/95. */ int lib_num_loc_cpus, /* the number of cpus in the system */ @@ -232,6 +226,7 @@ /* INVALID_SOCKET == INVALID_HANDLE_VALUE == (unsigned int)(~0) == -1 */ SOCKET netlib_control = INVALID_SOCKET; SOCKET server_sock = INVALID_SOCKET; +int control_family = AF_UNSPEC; /* global variables to hold the value for processor affinity */ int local_proc_affinity = -1,remote_proc_affinity = -1; @@ -252,11 +247,13 @@ int local_data_family=AF_UNSPEC; int remote_data_family=AF_UNSPEC; - /* in the past, I was overlaying a structure on an array of ints. now */ - /* I am going to have a "real" structure, and point an array of ints */ - /* at it. the real structure will be forced to the same alignment as */ - /* the type "double." this change will mean that pre-2.1 netperfs */ - /* cannot be mixed with 2.1 and later. raj 11/95 */ +char *netperf_version; + +/* in the past, I was overlaying a structure on an array of ints. now + I am going to have a "real" structure, and point an array of ints + at it. the real structure will be forced to the same alignment as + the type "double." this change will mean that pre-2.1 netperfs + cannot be mixed with 2.1 and later. raj 11/95 */ union netperf_request_struct netperf_request; union netperf_response_struct netperf_response; @@ -265,15 +262,6 @@ char libfmt = '?'; -#ifdef WANT_DLPI -/* some stuff for DLPI control messages */ -#define DLPI_DATA_SIZE 2048 - -unsigned long control_data[DLPI_DATA_SIZE]; -struct strbuf control_message = {DLPI_DATA_SIZE, 0, (char *)control_data}; - -#endif /* WANT_DLPI */ - #ifdef WIN32 HANDLE hAlarm = INVALID_HANDLE_VALUE; #endif @@ -490,7 +478,11 @@ break; #ifdef SOCK_DCCP case SOCK_DCCP: - return "SOCK_DCCP"; + return("SOCK_DCCP"); +#endif +#ifdef SOCK_SEQPACKET + case SOCK_SEQPACKET: + return("SOCK_SEQPACKET"); #endif default: return("SOCK_UNKNOWN"); @@ -499,6 +491,7 @@ + char unknown[32]; char * @@ -520,6 +513,11 @@ return "IPPROTO_DCCP"; break; #endif +#if defined(IPPROTO_UDPLITE) + case IPPROTO_UDPLITE: + return "IPPROTO_UDPLITE"; + break; +#endif default: snprintf(unknown,sizeof(unknown),"IPPROTO_UNKNOWN(%d)",protocol); return(unknown); @@ -538,16 +536,17 @@ switch(family) { case AF_INET: return("AF_INET"); - break; #if defined(AF_INET6) case AF_INET6: return("AF_INET6"); - break; #endif #if defined(AF_INET_SDP) case AF_INET_SDP: return("AF_INET_SDP"); - break; +#endif +#if defined(AF_RDS) + case AF_RDS: + return("AF_RDS"); #endif default: return("AF_UNSPEC"); @@ -583,6 +582,13 @@ } break; #endif +#if defined(AF_RDS) + case AF_RDS: + if (cnt >= 4) { + memcpy(dst,src,4); + return 4; + } +#endif default: Set_errno(EAFNOSUPPORT); return(-1); @@ -603,8 +609,8 @@ unsigned char scratch; int i; - /* on those systems where ntohl is a no-op, we want to return the */ - /* original value, unchanged */ + /* on those systems where ntohl is a no-op, we want to return the + original value, unchanged */ if (ntohl(1L) == 1L) { return(net_double); @@ -612,9 +618,9 @@ conv_rec.whole_thing = net_double; - /* we know that in the message passing routines that ntohl will have */ - /* been called on the 32 bit quantities. we need to put those back */ - /* the way they belong before we swap */ + /* we know that in the message passing routines that ntohl will have + been called on the 32 bit quantities. we need to put those back + the way they belong before we swap */ conv_rec.words[0] = htonl(conv_rec.words[0]); conv_rec.words[1] = htonl(conv_rec.words[1]); @@ -652,8 +658,8 @@ unsigned char scratch; int i; - /* on those systems where ntohl is a no-op, we want to return the */ - /* original value, unchanged */ + /* on those systems where ntohl is a no-op, we want to return the + original value, unchanged */ if (ntohl(1L) == 1L) { return(host_double); @@ -677,16 +683,92 @@ } #endif - /* we know that in the message passing routines htonl will */ - /* be called on the 32 bit quantities. we need to set things up so */ - /* that when this happens, the proper order will go out on the */ - /* network */ + /* we know that in the message passing routines htonl will be called + on the 32 bit quantities. we need to set things up so that when + this happens, the proper order will go out on the network */ conv_rec.words[0] = htonl(conv_rec.words[0]); conv_rec.words[1] = htonl(conv_rec.words[1]); return(conv_rec.whole_thing); } + + + +/* The original patch from Google used lrand48, but I have been + informed that is not easily available under Windows. So, rather + than have some #ifdefs here I'll just simplistically replace + lrand48 with rand(), which should be "good enough" at some point it + may be sufficient to just call rand() directly rather than call + this raj 20101130 */ + +unsigned int +rand32(){ + return (unsigned int)rand() * 2 + rand() % 2; +} + +/* this routine will set the ip address of the sockaddr in the + addrinfo to a random number in range, based on the address + family. for grins, we will sanity check the value of mask_len + against the address family. initial version from google, + enhancements by raj 20101129 */ +void +random_ip_address(struct addrinfo *res, int mask_len) +{ + switch(res->ai_family) { + case AF_INET: { + struct sockaddr_in *foo = (struct sockaddr_in *)res->ai_addr; + unsigned int addr = ntohl(foo->sin_addr.s_addr); + unsigned int mask = ((unsigned int)1 << (32 - mask_len)) - 1; + + if ((mask_len < 0) || (mask_len > 32)) { + fprintf(where, + "Mask length must be between 0 and 32 inclusive for AF_INET\n"); + fflush(where); + exit(-1); + } + + addr = ntohl(foo->sin_addr.s_addr); + do { + addr = (addr & ~mask) | (rand32() & mask); + } while ((addr & 0xff) == 0xff); + foo->sin_addr.s_addr = htonl(addr); + break; + } +#if defined(AF_INET6) + case AF_INET6: { + struct sockaddr_in6 *foo = (struct sockaddr_in6 *)res->ai_addr; + + unsigned int i, len; + unsigned int *addr = (unsigned int *)&(foo->sin6_addr.s6_addr); + unsigned int mask; + + if ((mask_len < 0) || (mask_len > 128)) { + fprintf(where, + "Mask length must be between 0 and 128 inclusive for AF_INET\n"); + fflush(where); + exit(-1); + } + + for (i = 0; i < 4; i ++){ + addr[i] = ntohl(addr[i]); + len = mask_len - i * 32; + len = ((len < 32) ? len : 32); + len = ((len > 0) ? len : 0); + mask = ((unsigned int)1 << (32 - len)) - 1; + addr[i] = (addr[i] & ~mask) | (rand32() & mask); + addr[i] = htonl(addr[i]); + } + break; + } +#endif + default: + fprintf(where, + "Unexpected Address Family of %u\n",res->ai_family); + fflush(where); + exit(-1); + } +} /* one of these days, this should be abstracted-out just like the CPU @@ -732,8 +814,8 @@ temp_cpus = SystemInfo.dwNumberOfProcessors; #else - /* we need to know some other ways to do this, or just fall-back on */ - /* a global command line option - raj 4/95 */ + /* we need to know some other ways to do this, or just fall-back on + a global command line option - raj 4/95 */ temp_cpus = shell_num_cpus; #endif /* WIN32 */ #endif /* _SC_NPROCESSORS_ONLN */ @@ -741,11 +823,10 @@ if (temp_cpus > MAXCPUS) { fprintf(where, - "Sorry, this system has more CPUs (%d) than I can handle (%d).\n", + "Sorry, this system has more CPUs (%d) than I can handle (%d).\n" + "Please alter MAXCPUS in netlib.h and recompile.\n", temp_cpus, MAXCPUS); - fprintf(where, - "Please alter MAXCPUS in netlib.h and recompile.\n"); fflush(where); exit(1); } @@ -838,18 +919,22 @@ times_up = 1; #if defined(WANT_INTERVALS) && !defined(WANT_SPIN) stop_itimer(); + /* we should also stop the normal test timer lest it fire at an + inopportune moment - we do not know if we got here off the + interval timer or the test timer... */ + stop_timer(); #endif /* WANT_INTERVALS */ break; } else { #ifdef WANT_INTERVALS #ifdef __hpux - /* the test is not over yet and we must have been using the */ - /* interval timer. if we were in SYS_SIGSUSPEND we want to */ - /* re-start the system call. Otherwise, we want to get out of */ - /* the sigsuspend call. I NEED TO KNOW HOW TO DO THIS FOR OTHER */ - /* OPERATING SYSTEMS. If you know how, please let me know. rick */ - /* jones */ + /* the test is not over yet and we must have been using the + interval timer. if we were in SYS_SIGSUSPEND we want to + re-start the system call. Otherwise, we want to get out of + the sigsuspend call. I NEED TO KNOW HOW TO DO THIS FOR OTHER + OPERATING SYSTEMS. If you know how, please let me know. rick + jones */ if (scp->sc_syscall != SYS_SIGSUSPEND) { if (debug > 2) { fprintf(where, @@ -1040,10 +1125,11 @@ #endif /* SA_INTERRUPT */ if (sigaction(SIGALRM, &action, NULL) < 0) { - fprintf(where,"start_timer: error installing alarm handler "); - fprintf(where,"errno %d\n",errno); + fprintf(where, + "start_timer: error installing alarm handler errno %d\n", + errno); fflush(where); - exit(1); + exit(-1); } /* this is the easy case - just set the timer for so many seconds */ @@ -1054,6 +1140,7 @@ ret, errno); fflush(where); + exit(-1); } #endif /* WIN32 */ @@ -1070,20 +1157,19 @@ alarm(0); #else /* at some point we may need some win32 equivalent */ - if (hAlarm != (HANDLE) INVALID_HANDLE_VALUE) - { - SetEvent(hAlarm); - } + if (hAlarm != (HANDLE) INVALID_HANDLE_VALUE) { + SetEvent(hAlarm); + } #endif /* WIN32 */ } #ifdef WANT_INTERVALS - /* this routine will enable the interval timer and set things up so */ - /* that for a timed test the test will end at the proper time. it */ - /* should detect the presence of POSIX.4 timer_* routines one of */ - /* these days */ +/* this routine will enable the interval timer and set things up so + that for a timed test the test will end at the proper time. it + should detect the presence of POSIX.4 timer_* routines one of these + days */ void start_itimer(unsigned int interval_len_msec ) { @@ -1093,12 +1179,12 @@ struct itimerval new_interval; struct itimerval old_interval; - /* if -DWANT_INTERVALS was used, we will use the ticking of the itimer to */ - /* tell us when the test is over. while the user will be specifying */ - /* some number of milliseconds, we know that the interval timer is */ - /* really in units of 1/HZ. so, to prevent the test from running */ - /* "long" it would be necessary to keep this in mind when calculating */ - /* the number of itimer events */ + /* if -DWANT_INTERVALS was used, we will use the ticking of the + itimer to tell us when the test is over. while the user will be + specifying some number of milliseconds, we know that the interval + timer is really in units of 1/HZ. so, to prevent the test from + running "long" it would be necessary to keep this in mind when + calculating the number of itimer events */ ticks_per_itvl = ((interval_wate * sysconf(_SC_CLK_TCK) * 1000) / 1000000); @@ -1119,16 +1205,16 @@ } if (debug) { - fprintf(where,"setting the interval timer to %d sec %d usec ", + fprintf(where, + "setting the interval timer to %d sec %d usec test len %d ticks\n", usec_per_itvl / 1000000, - usec_per_itvl % 1000000); - fprintf(where,"test len %d ticks\n", + usec_per_itvl % 1000000, test_len_ticks); fflush(where); } - /* if this was not a timed test, then we really aught to enable the */ - /* signal catcher raj 2/95 */ + /* if this was not a timed test, then we really aught to enable the + signal catcher raj 2/95 */ new_interval.it_interval.tv_sec = usec_per_itvl / 1000000; new_interval.it_interval.tv_usec = usec_per_itvl % 1000000; @@ -1219,7 +1305,7 @@ { int i; - where = stdout; + where = stdout; request_array = (int *)(&netperf_request); response_array = (int *)(&netperf_response); @@ -1233,6 +1319,8 @@ lib_remote_peak_cpu_id = -1; lib_remote_peak_cpu_util = -1.0; + netperf_version = strdup(NETPERF_VERSION); + /* retrieve the local system information */ get_local_system_info(); @@ -1248,23 +1336,24 @@ if (debug) { fprintf(where, - "netlib_init: request_array at %p\n", - request_array); - fprintf(where, + "netlib_init: request_array at %p\n" "netlib_init: response_array at %p\n", + request_array, response_array); - fflush(where); } + /* some functionality might want to use random numbers, so we should + initialize the random number generator */ + srand(getpid()); + } - /* this routine will conver the string into an unsigned integer. it */ - /* is used primarily for the command-line options taking a number */ - /* (such as the socket size) which could be rather large. If someone */ - /* enters 32M, then the number will be converted to 32 * 1024 * 1024. */ - /* If they inter 32m, the number will be converted to 32 * 1000 * */ - /* 1000 */ +/* this routine will conver the string into an unsigned integer. it is + used primarily for the command-line options taking a number (such + as the socket size) which could be rather large. If someone enters + 32M, then the number will be converted to 32 * 1024 * 1024. If + they inter 32m, the number will be converted to 32 * 1000 * 1000 */ unsigned int convert(char *string) @@ -1325,13 +1414,13 @@ } - /* this routine will allocate a circular list of buffers for either */ - /* send or receive operations. each of these buffers will be aligned */ - /* and offset as per the users request. the circumference of this */ - /* ring will be controlled by the setting of send_width. the buffers */ - /* will be filled with data from the file specified in fill_file. if */ - /* fill_file is an empty string, the buffers will not be filled with */ - /* any particular data */ +/* this routine will allocate a circular list of buffers for either + send or receive operations. each of these buffers will be aligned + and offset as per the users request. the circumference of this ring + will be controlled by the setting of send_width. the buffers will + be filled with data from the file specified in fill_file. if + fill_file is an empty string, the buffers will not be filled with + any particular data */ struct ring_elt * allocate_buffer_ring(int width, int buffer_size, int alignment, int offset) @@ -1375,8 +1464,10 @@ /* get the ring element */ temp_link = (struct ring_elt *)malloc(sizeof(struct ring_elt)); if (temp_link == NULL) { - printf("malloc(%u) failed!\n", sizeof(struct ring_elt)); - exit(1); + fprintf(where, + "malloc(%u) failed!\n", + (unsigned int)sizeof(struct ring_elt)); + exit(-1); } /* remember the first one so we can close the ring at the end */ if (i == 1) { @@ -1384,9 +1475,11 @@ } temp_link->buffer_base = (char *)malloc(malloc_size); if (temp_link == NULL) { - printf("malloc(%d) failed!\n", malloc_size); - exit(1); - } + fprintf(where, + "malloc(%d) failed!\n", + malloc_size); + exit(-1); + } #ifndef WIN32 temp_link->buffer_ptr = (char *)(( (long)(temp_link->buffer_base) + @@ -1486,13 +1579,13 @@ #include #include - /* this routine will allocate a circular list of buffers for either */ - /* send or receive operations. each of these buffers will be aligned */ - /* and offset as per the users request. the circumference of this */ - /* ring will be controlled by the setting of send_width. the buffers */ - /* will be filled with data from the file specified in fill_file. if */ - /* fill_file is an empty string, the buffers will not be filled with */ - /* any particular data */ +/* this routine will allocate a circular list of buffers for either + send or receive operations. each of these buffers will be aligned + and offset as per the users request. the circumference of this ring + will be controlled by the setting of send_width. the buffers will + be filled with data from the file specified in fill_file. if + fill_file is an empty string, the buffers will not be filled with + any particular data */ struct ring_elt * allocate_exs_buffer_ring (int width, int buffer_size, int alignment, int offset, exs_mhandle_t *mhandlep) @@ -1532,7 +1625,8 @@ assert (width >= 1); if (debug) { - fprintf (where, "allocate_exs_buffer_ring: " + fprintf (where, + "allocate_exs_buffer_ring: " "width=%d buffer_size=%d alignment=%d offset=%d\n", width, buffer_size, alignment, offset); } @@ -1548,7 +1642,8 @@ } mmap_buffer_aligned = (char *) ((uintptr_t)mmap_buffer & ~(NBPG-1)); if (debug) { - fprintf (where, "allocate_exs_buffer_ring: " + fprintf (where, + "allocate_exs_buffer_ring: " "mmap buffer size=%d address=0x%p aligned=0x%p\n", mmap_size, mmap_buffer, mmap_buffer_aligned); } @@ -1614,7 +1709,7 @@ prev_link = temp_link; } - return (first_link); /* it's a circle, doesn't matter which we return */ + return (first_link); /* it is a circle, doesn't matter which we return */ } #endif /* HAVE_ICSC_EXS */ @@ -1670,8 +1765,8 @@ int count; int *int_ptr; - /* initialize the random number generator */ - srand(getpid()); + /* we initialize the random number generator in + netlib_init() now. raj 20110111 */ /* unlink the file so it goes poof when we exit. unless/until shown to be a problem we will @@ -1723,8 +1818,9 @@ } if (statbuf.st_size < (width * buffer_size)) { /* the file is too short */ - fprintf(stderr,"alloc_sendfile_buf_ring: specified file too small.\n"); - fprintf(stderr,"file must be larger than send_width * send_size\n"); + fprintf(stderr, + "alloc_sendfile_buf_ring: specified file too small.\n" + "file must be larger than send_width * send_size\n"); fflush(stderr); exit(1); } @@ -1736,16 +1832,18 @@ prev_link = NULL; for (i = 1; i <= width; i++) { - /* get the ring element. we should probably make sure the malloc() - was successful, but for now we'll just let the code bomb - mysteriously. 08/2000 */ + /* get the ring element. we should probably make sure the malloc() + was successful, but for now we'll just let the code bomb + mysteriously. 08/2000 */ temp_link = (struct sendfile_ring_elt *) malloc(sizeof(struct sendfile_ring_elt)); if (temp_link == NULL) { - printf("malloc(%u) failed!\n", sizeof(struct sendfile_ring_elt)); + fprintf(where, + "malloc(%u) failed!\n", + (unsigned int) sizeof(struct sendfile_ring_elt)); exit(1); - } + } /* remember the first one so we can close the ring at the end */ @@ -2019,21 +2117,21 @@ exit(1); } - /* Now, we hang on a select waiting for the socket to become */ - /* readable to receive the shutdown indication from the remote. this */ - /* will be "just" like the recv_response() code */ - - /* we only select once. it is assumed that if the response is split */ - /* (which should not be happening, that we will receive the whole */ - /* thing and not have a problem ;-) */ + /* Now, we hang on a select waiting for the socket to become + readable to receive the shutdown indication from the remote. this + will be "just" like the recv_response() code + + we only select once. it is assumed that if the response is split + (which should not be happening, that we will receive the whole + thing and not have a problem ;-) */ FD_ZERO(&readfds); FD_SET(netlib_control,&readfds); timeout.tv_sec = 60; /* wait one minute then punt */ timeout.tv_usec = 0; - /* select had better return one, or there was either a problem or a */ - /* timeout... */ + /* select had better return one, or there was either a problem or a + timeout... */ if (select(FD_SETSIZE, &readfds, 0, @@ -2244,8 +2342,8 @@ count = sizeof(netperf_request)/4; } - /* display the contents of the request if the debug level is high */ - /* enough. otherwise, just send the darned thing ;-) */ + /* display the contents of the request if the debug level is high + enough. otherwise, just send the darned thing ;-) */ if (debug > 1) { fprintf(where, @@ -2255,18 +2353,17 @@ } /* pass the processor affinity request value to netserver this is a - kludge and I know it. sgb 8/11/04. we keep this here to deal with - there being two paths to this place - direct and via - send_request() */ + kludge and I know it. sgb 8/11/04. we keep this here to deal + with there being two paths to this place - direct and via + send_request() */ netperf_request.content.dummy = remote_proc_affinity; - /* put the entire request array into network order. We do this */ - /* arbitrarily rather than trying to figure-out just how much */ - /* of the request array contains real information. this should */ - /* be simpler, and at any rate, the performance of sending */ - /* control messages for this benchmark is not of any real */ - /* concern. */ + /* put the entire request array into network order. We do this + arbitrarily rather than trying to figure-out just how much of the + request array contains real information. this should be simpler, + and at any rate, the performance of sending control messages for + this benchmark is not of any real concern. */ for (counter = 0;counter < count; counter++) { request_array[counter] = htonl(request_array[counter]); @@ -2279,7 +2376,7 @@ fprintf(where, "\nsend_request: about to send %u bytes from %p\n", - sizeof(netperf_request), + (unsigned int) sizeof(netperf_request), &netperf_request); fflush(where); } @@ -2310,8 +2407,8 @@ send_request() { - /* pass the processor affinity request value to netserver */ - /* this is a kludge and I know it. sgb 8/11/04 */ + /* pass the processor affinity request value to netserver this is a + kludge and I know it. sgb 8/11/04 */ netperf_request.content.dummy = remote_proc_affinity; @@ -2352,16 +2449,16 @@ if (debug > 1) { fprintf(where, "send_response_n: contents of %u ints before %d htonl,\n", - sizeof(netperf_response)/4, + (unsigned int) sizeof(netperf_response)/4, count); dump_response(); } - /* put the entire response_array into network order. We do this */ - /* arbitrarily rather than trying to figure-out just how much of the */ - /* request array contains real information. this should be simpler, */ - /* and at any rate, the performance of sending control messages for */ - /* this benchmark is not of any real concern. */ + /* put the entire response_array into network order. We do this + arbitrarily rather than trying to figure-out just how much of the + request array contains real information. this should be simpler, + and at any rate, the performance of sending control messages for + this benchmark is not of any real concern. */ for (counter = 0; counter < count; counter++) { response_array[counter] = htonl(response_array[counter]); @@ -2373,7 +2470,7 @@ dump_response(); fprintf(where, "about to send %u bytes from %p\n", - sizeof(netperf_response), + (unsigned int) sizeof(netperf_response), &netperf_response); fflush(where); } @@ -2415,7 +2512,7 @@ connection. the first two ints, which are before the test-specific portion are always converted. raj 2008-02-05 */ -void +int recv_request_n(int n) { int tot_bytes_recvd, @@ -2471,17 +2568,15 @@ if (bytes_recvd == 0) { /* the remote has shutdown the control connection, we should shut - it down as well and exit */ + it down as well and return */ if (debug) { fprintf(where, "recv_request: remote requested shutdown of control\n"); fflush(where); } - if (netlib_control != INVALID_SOCKET) { - shutdown_control(); - } - exit(0); + close(server_sock); + return 0; } if (tot_bytes_recvd < buflen) { @@ -2499,15 +2594,16 @@ dump_request(); } - /* get the processor affinity request value from netperf */ - /* this is a kludge and I know it. sgb 8/11/04 */ + /* get the processor affinity request value from netperf this is a + kludge and I know it. sgb 8/11/04 */ local_proc_affinity = netperf_request.content.dummy; if (local_proc_affinity != -1) { bind_to_specific_processor(local_proc_affinity,0); } - + + return buflen; } /***********************************************************************/ @@ -2522,11 +2618,11 @@ /* */ /***********************************************************************/ -void +int recv_request() { - recv_request_n(-1); + return recv_request_n(-1); } @@ -2570,9 +2666,9 @@ response_array[counter] = 0; } - /* we only select once. it is assumed that if the response is split */ - /* (which should not be happening, that we will receive the whole */ - /* thing and not have a problem ;-) */ + /* we only select once. it is assumed that if the response is split + (which should not be happening, that we will receive the whole + thing and not have a problem ;-) */ FD_ZERO(&readfds); FD_SET(netlib_control,&readfds); @@ -2638,31 +2734,32 @@ } } - /* +/* - recv_response_timed() + recv_response_timed() - receive the remote's response on the control socket. we will put the - entire response into host order before giving it to the calling - routine. hopefully, this will go most of the way to insuring - intervendor interoperability. if there are any problems, we will just - punt the entire situation. + receive the remote's response on the control socket. we will put the + entire response into host order before giving it to the calling + routine. hopefully, this will go most of the way to insuring + intervendor interoperability. if there are any problems, we will + just punt the entire situation. - The call to select at the beginning is to get us out of hang - situations where the remote gives-up but we don't find-out about - it. This seems to happen only rarely, but it would be nice to be - somewhat robust ;-) - - The "_timed" part is to allow the caller to add (or I suppose - subtract) from the length of timeout on the select call. this was - added since not all the CPU utilization mechanisms require a 40 - second calibration, and we used to have an aribtrary 40 second sleep - in "calibrate_remote_cpu" - since we don't _always_ need that, we - want to simply add 40 seconds to the select() timeout from that call, - but don't want to change all the "recv_response" calls in the code - right away. sooo, we push the functionality of the old - recv_response() into a new recv_response_timed(addl_timout) call, and - have recv_response() call recv_response_timed(0). raj 2005-05-16 + The call to select at the beginning is to get us out of hang + situations where the remote gives-up but we don't find-out about + it. This seems to happen only rarely, but it would be nice to be + somewhat robust ;-) + + The "_timed" part is to allow the caller to add (or I suppose + subtract) from the length of timeout on the select call. this was + added since not all the CPU utilization mechanisms require a 40 + second calibration, and we used to have an aribtrary 40 second sleep + in "calibrate_remote_cpu" - since we don't _always_ need that, we + want to simply add 40 seconds to the select() timeout from that + call, but don't want to change all the "recv_response" calls in the + code right away. sooo, we push the functionality of the old + recv_response() into a new recv_response_timed(addl_timout) call, + and have recv_response() call recv_response_timed(0). raj + 2005-05-16 */ @@ -2742,8 +2839,8 @@ } *overlay; overlay = (union overlay_u *)big_int; - /* on those systems which are byte swapped, we really wish to */ - /* return words[1] - at least I think so - raj 4/95 */ + /* on those systems which are byte swapped, we really wish to return + words[1] - at least I think so - raj 4/95 */ if (htonl(1L) == 1L) { /* we are a "normal" :) machine */ return(overlay->words[0]); @@ -2763,8 +2860,8 @@ } *overlay; overlay = (union overlay_u *)big_int; - /* on those systems which are byte swapped, we really wish to */ - /* return words[0] - at least I think so - raj 4/95 */ + /* on those systems which are byte swapped, we really wish to return + words[0] - at least I think so - raj 4/95 */ if (htonl(1L) == 1L) { /* we are a "normal" :) machine */ return(overlay->words[1]); @@ -2822,7 +2919,7 @@ tells the stack you wish to enable copy-avoidance. Knuth only knows what it will do on other stacks, but it might be interesting to find-out, so we won't bother #ifdef'ing the change - to allow asking for 0 bytes. Courtesy of SAF, 2007-05 raj + to allow asking for 0 bytes. Courtesy of SAF, 2007-05 raj 2007-05-31 */ if (requested_size >= 0) { if (setsockopt(sd, SOL_SOCKET, optname, @@ -2861,25 +2958,23 @@ struct addrinfo *temp; temp=info; - fprintf(dumploc, "getaddrinfo returned the following for host '%s' ", host); - fprintf(dumploc, "port '%s' ", port); - fprintf(dumploc, "family %s\n", inet_ftos(family)); + fprintf(dumploc, + "getaddrinfo returned the following for host '%s' port '%s' " + " family %s\n", + host, + port, + inet_ftos(family)); + while (temp) { /* seems that Solaris 10 GA bits will not give a canonical name for ::0 or 0.0.0.0, and their fprintf() cannot deal with a null pointer, so we have to check for a null pointer. probably a safe thing to do anyway, eventhough it was not necessary on linux or hp-ux. raj 2005-02-09 */ - if (temp->ai_canonname) { - fprintf(dumploc, - "\tcannonical name: '%s'\n",temp->ai_canonname); - } - else { - fprintf(dumploc, - "\tcannonical name: '%s'\n","(nil)"); - } fprintf(dumploc, + "\tcannonical name: '%s'\n" "\tflags: %x family: %s: socktype: %s protocol %s addrlen %d\n", + (temp->ai_canonname) ? temp->ai_canonname : "(nil)", temp->ai_flags, inet_ftos(temp->ai_family), inet_ttos(temp->ai_socktype), @@ -2887,88 +2982,52 @@ temp->ai_addrlen); ai_addr = temp->ai_addr; if (ai_addr != NULL) { + int i; fprintf(dumploc, - "\tsa_family: %s sadata: %d %d %d %d %d %d\n", - inet_ftos(ai_addr->sa_family), - (u_char)ai_addr->sa_data[0], - (u_char)ai_addr->sa_data[1], - (u_char)ai_addr->sa_data[2], - (u_char)ai_addr->sa_data[3], - (u_char)ai_addr->sa_data[4], - (u_char)ai_addr->sa_data[5]); + "\tsa_family: %s sadata:", + inet_ftos(ai_addr->sa_family)); + for (i = 0; i < temp->ai_addrlen; i++) { + fprintf(dumploc, + (temp->ai_family == AF_INET) ? " %d" : " %.2x", + (u_char)ai_addr->sa_data[i]); + } + fprintf(dumploc,"\n"); } temp = temp->ai_next; } fflush(dumploc); } -/* - establish_control() - -set-up the control connection between netperf and the netserver so we -can actually run some tests. if we cannot establish the control -connection, that may or may not be a good thing, so we will let the -caller decide what to do. - -to assist with pesky end-to-end-unfriendly things like firewalls, we -allow the caller to specify both the remote hostname and port, and the -local addressing info. i believe that in theory it is possible to -have an IPv4 endpoint and an IPv6 endpoint communicate with one -another, but for the time being, we are only going to take-in one -requested address family parameter. this means that the only way -(iirc) that we might get a mixed-mode connection would be if the -address family is specified as AF_UNSPEC, and getaddrinfo() returns -different families for the local and server names. - -the "names" can also be IP addresses in ASCII string form. - -raj 2003-02-27 */ - -SOCKET -establish_control_internal(char *hostname, - char *port, - int remfam, - char *localhost, - char *localport, - int locfam) +struct addrinfo * +resolve_host(char *hostname, + char *port, + int family) { - int not_connected; - SOCKET control_sock; + struct addrinfo hints; + struct addrinfo *ai; int count; int error; - struct addrinfo hints; - struct addrinfo *local_res; - struct addrinfo *remote_res; - struct addrinfo *local_res_temp; - struct addrinfo *remote_res_temp; - if (debug) { fprintf(where, - "establish_control called with host '%s' port '%s' remfam %s\n", + "resolve_host called with host '%s' port '%s' family %s\n", hostname, port, - inet_ftos(remfam)); - fprintf(where, - "\t\tlocal '%s' port '%s' locfam %s\n", - localhost, - localport, - inet_ftos(locfam)); + inet_ftos(family)); fflush(where); } - /* first, we do the remote */ memset(&hints, 0, sizeof(hints)); - hints.ai_family = remfam; + hints.ai_family = family; hints.ai_socktype = SOCK_STREAM; hints.ai_protocol = IPPROTO_TCP; - hints.ai_flags = 0|AI_CANONNAME; + hints.ai_flags = AI_CANONNAME|AI_ADDRCONFIG; count = 0; do { error = getaddrinfo((char *)hostname, (char *)port, &hints, - &remote_res); + &ai); count += 1; if (error == EAI_AGAIN) { if (debug) { @@ -2980,59 +3039,81 @@ } while ((error == EAI_AGAIN) && (count <= 5)); if (error) { - printf("establish control: could not resolve remote '%s' port '%s' af %s", + printf("%s: could not resolve host '%s' port '%s' af %s" + "\n\tgetaddrinfo returned %d %s\n", + __FUNCTION__, hostname, port, - inet_ftos(remfam)); - printf("\n\tgetaddrinfo returned %d %s\n", + inet_ftos(family), error, gai_strerror(error)); - return(INVALID_SOCKET); + return(NULL); } if (debug) { - dump_addrinfo(where, remote_res, hostname, port, remfam); + dump_addrinfo(where, ai, hostname, port, family); } - /* now we do the local */ - memset(&hints, 0, sizeof(hints)); - hints.ai_family = locfam; - hints.ai_socktype = SOCK_STREAM; - hints.ai_protocol = IPPROTO_TCP; - hints.ai_flags = AI_PASSIVE|AI_CANONNAME; - count = 0; - do { - count += 1; - error = getaddrinfo((char *)localhost, - (char *)localport, - &hints, - &local_res); - if (error == EAI_AGAIN) { - if (debug) { - fprintf(where, - "Sleeping on getaddrinfo(%s,%s) EAI_AGAIN count %d \n", - localhost, - localport, - count); - fflush(where); - } - sleep(1); - } - } while ((error == EAI_AGAIN) && (count <= 5)); + return (ai); +} - if (error) { - printf("establish control: could not resolve local '%s' port '%s' af %s", - localhost, - localport, - inet_ftos(locfam)); - printf("\n\tgetaddrinfo returned %d %s\n", - error, - gai_strerror(error)); +/* + establish_control() + + set-up the control connection between netperf and the netserver so + we can actually run some tests. if we cannot establish the control + connection, that may or may not be a good thing, so we will let the + caller decide what to do. + + to assist with pesky end-to-end-unfriendly things like firewalls, we + allow the caller to specify both the remote hostname and port, and + the local addressing info. i believe that in theory it is possible + to have an IPv4 endpoint and an IPv6 endpoint communicate with one + another, but for the time being, we are only going to take-in one + requested address family parameter. this means that the only way + (iirc) that we might get a mixed-mode connection would be if the + address family is specified as AF_UNSPEC, and getaddrinfo() returns + different families for the local and server names. + + the "names" can also be IP addresses in ASCII string form. + + raj 2003-02-27 */ + +SOCKET +establish_control_internal(char *hostname, + char *port, + int remfam, + char *localhost, + char *localport, + int locfam) +{ + int not_connected; + SOCKET control_sock; + + struct addrinfo *local_res; + struct addrinfo *remote_res; + struct addrinfo *local_res_temp; + struct addrinfo *remote_res_temp; + + remote_res = resolve_host(hostname, port, remfam); + if (!remote_res) + return(INVALID_SOCKET); + + local_res = resolve_host(localhost, localport, locfam); + if (!local_res) return(INVALID_SOCKET); - } if (debug) { - dump_addrinfo(where, local_res, localhost, localport, locfam); + fprintf(where, + "establish_control called with host '%s' port '%s' remfam %s\n" + "\t\tlocal '%s' port '%s' locfam %s\n", + hostname, + port, + inet_ftos(remfam), + localhost, + localport, + inet_ftos(locfam)); + fflush(where); } not_connected = 1; @@ -3041,14 +3122,15 @@ /* we want to loop through all the possibilities. looping on the local addresses will be handled within the while loop. I suppose these is some more "C-expert" way to code this, but it has not - lept to mind just yet :) raj 2003-02024 */ + lept to mind just yet :) raj 2003-02024 */ while (remote_res_temp != NULL) { /* I am guessing that we should use the address family of the local endpoint, and we will not worry about mixed family types - presumeably the stack or other transition mechanisms will be - able to deal with that for us. famous last words :) raj 2003-02-26 */ + able to deal with that for us. famous last words :) raj + 2003-02-26 */ control_sock = socket(local_res_temp->ai_family, SOCK_STREAM, 0); @@ -3056,7 +3138,8 @@ /* at some point we'll need a more generic "display error" message for when/if we use GUIs and the like. unlike a bind or connect failure, failure to allocate a socket is - "immediately fatal" and so we return to the caller. raj 2003-02-24 */ + "immediately fatal" and so we return to the caller. raj + 2003-02-24 */ if (debug) { perror("establish_control: unable to allocate control socket"); } @@ -3093,10 +3176,10 @@ /* the connect call failed */ if (debug) { fprintf(where, - "establish_control: connect failed, errno %d %s\n", + "establish_control: connect failed, errno %d %s\n" + " trying next address combination\n", errno, strerror(errno)); - fprintf(where, " trying next address combination\n"); fflush(where); } } @@ -3105,10 +3188,10 @@ /* the bind failed */ if (debug) { fprintf(where, - "establish_control: bind failed, errno %d %s\n", + "establish_control: bind failed, errno %d %s\n" + " trying next address combination\n", errno, strerror(errno)); - fprintf(where, " trying next address combination\n"); fflush(where); } } @@ -3128,14 +3211,21 @@ close(control_sock); } + control_family = local_res_temp->ai_family; + /* we no longer need the addrinfo stuff */ freeaddrinfo(local_res); freeaddrinfo(remote_res); /* so, we are either connected or not */ if (not_connected) { - fprintf(where, "establish control: are you sure there is a netserver listening on %s at port %s?\n",hostname,port); + fprintf(where, + "establish control: are you sure there is a netserver " + "listening on %s at port %s?\n", + hostname, + port); fflush(where); + control_family = AF_UNSPEC; return(INVALID_SOCKET); } /* at this point, we are connected. we probably want some sort of @@ -3161,7 +3251,9 @@ locfam); if (netlib_control == INVALID_SOCKET) { fprintf(where, - "establish_control could not establish the control connection from %s port %s address family %s to %s port %s address family %s\n", + "establish_control could not establish the control" + " connection from %s port %s address family %s to %s" + " port %s address family %s\n", localhost,localport,inet_ftos(locfam), hostname,port,inet_ftos(remfam)); fflush(where); @@ -3275,28 +3367,28 @@ identify_remote() { -char *remote_id=""; - -/* send a request for node info to the remote */ -netperf_request.content.request_type = NODE_IDENTIFY; - -send_request(); - -/* and now wait for the reply to come back */ - -recv_response(); - -if (netperf_response.content.serv_errno) { - Set_errno(netperf_response.content.serv_errno); - perror("identify_remote: on remote"); - exit(1); -} - -fprintf(where,"Remote Information \n\ + char *remote_id=""; + + /* send a request for node info to the remote */ + netperf_request.content.request_type = NODE_IDENTIFY; + + send_request(); + + /* and now wait for the reply to come back */ + + recv_response(); + + if (netperf_response.content.serv_errno) { + Set_errno(netperf_response.content.serv_errno); + perror("identify_remote: on remote"); + exit(1); + } + + fprintf(where,"Remote Information \n\ Sysname Nodename Release Version Machine\n"); - -fprintf(where,"%s", - remote_id); + + fprintf(where,"%s", + remote_id); } void @@ -3479,13 +3571,14 @@ double thruput; if (debug) { - fprintf(where,"calc_service_demand called: units_sent = %f\n", - units_sent); - fprintf(where," elapsed_time = %f\n", - elapsed_time); - fprintf(where," cpu_util = %f\n", - cpu_utilization); - fprintf(where," num cpu = %d\n", + fprintf(where, + "calc_service_demand called: units_sent = %f\n" + " elapsed_time = %f\n" + " cpu_util = %f\n" + " num cpu = %d\n", + units_sent, + elapsed_time, + cpu_utilization, num_cpus); fflush(where); } @@ -3503,31 +3596,32 @@ (double) unit_divisor / (double) elapsed_time); - /* on MP systems, it is necessary to multiply the service demand by */ - /* the number of CPU's. at least, I believe that to be the case:) */ - /* raj 10/95 */ - - /* thruput has a "per second" component. if we were using 100% ( */ - /* 100.0) of the CPU in a second, that would be 1 second, or 1 */ - /* millisecond, so we multiply cpu_utilization by 10 to go to */ - /* milliseconds, or 10,000 to go to micro seconds. With revision */ - /* 2.1, the service demand measure goes to microseconds per unit. */ - /* raj 12/95 */ + /* on MP systems, it is necessary to multiply the service demand by + the number of CPU's. at least, I believe that to be the case:) + raj 10/95 */ + + /* thruput has a "per second" component. if we were using 100% ( + 100.0) of the CPU in a second, that would be 1 second, or 1 + millisecond, so we multiply cpu_utilization by 10 to go to + milliseconds, or 10,000 to go to micro seconds. With revision + 2.1, the service demand measure goes to microseconds per unit. + raj 12/95 */ service_demand = (cpu_utilization*10000.0/thruput) * (float) num_cpus; if (debug) { - fprintf(where,"calc_service_demand using: units_sent = %f\n", - units_sent); - fprintf(where," elapsed_time = %f\n", - elapsed_time); - fprintf(where," cpu_util = %f\n", - cpu_utilization); - fprintf(where," num cpu = %d\n", - num_cpus); - fprintf(where,"calc_service_demand got: thruput = %f\n", - thruput); - fprintf(where," servdem = %f\n", + fprintf(where, + "calc_service_demand using: units_sent = %f\n" + " elapsed_time = %f\n" + " cpu_util = %f\n" + " num cpu = %d\n" + "calc_service_demand got: thruput = %f\n" + " servdem = %f\n", + units_sent, + elapsed_time, + cpu_utilization, + num_cpus, + thruput, service_demand); fflush(where); } @@ -3584,17 +3678,17 @@ #endif /* USE_LOOPER */ if (local_cpu_rate > 0) { - /* The user think that he knows what the cpu rate is. We assume */ - /* that all the processors of an MP system are essentially the */ - /* same - for this reason we do not have a per processor maxrate. */ - /* if the machine has processors which are different in */ - /* performance, the CPU utilization will be skewed. raj 4/95 */ + /* The user think that he knows what the cpu rate is. We assume + that all the processors of an MP system are essentially the + same - for this reason we do not have a per processor maxrate. + if the machine has processors which are different in + performance, the CPU utilization will be skewed. raj 4/95 */ lib_local_maxrate = local_cpu_rate; } else { - /* if neither USE_LOOPER nor USE_PSTAT are defined, we return a */ - /* 0.0 to indicate that times or getrusage should be used. raj */ - /* 4/95 */ + /* if neither USE_LOOPER nor USE_PSTAT are defined, we return a + 0.0 to indicate that times or getrusage should be used. raj + 4/95 */ lib_local_maxrate = (float)0.0; #if defined(USE_PROC_STAT) || defined(USE_LOOPER) || defined(USE_PSTAT) || defined(USE_KSTAT) || defined(USE_PERFSTAT) || defined(USE_SYSCTL) lib_local_maxrate = calibrate_idle_rate(4,10); @@ -3611,9 +3705,9 @@ netperf_request.content.request_type = CPU_CALIBRATE; send_request(); - /* we know that calibration will last at least 40 seconds, so go to */ - /* sleep for that long so the 60 second select in recv_response will */ - /* not pop. raj 7/95 */ + /* we know that calibration will last at least 40 seconds, so go to + sleep for that long so the 60 second select in recv_response will + not pop. raj 7/95 */ /* we know that CPU calibration may last as long as 40 seconds, so make sure we "select" for at least that long while looking for @@ -3621,9 +3715,9 @@ recv_response_timed(40); if (netperf_response.content.serv_errno) { - /* initially, silently ignore remote errors and pass */ - /* back a zero to the caller this should allow us to */ - /* mix rev 1.0 and rev 1.1 netperfs... */ + /* initially, silently ignore remote errors and pass back a zero + to the caller this should allow us to mix rev 1.0 and rev 1.1 + netperfs... */ return((float)0.0); } else { @@ -3642,9 +3736,9 @@ #ifndef WIN32 -/* WIN32 requires that at least one of the file sets to select be non-null. */ -/* Since msec_sleep routine is only called by nettest_dlpi & nettest_unix, */ -/* let's duck this issue. */ +/* WIN32 requires that at least one of the file sets to select be + non-null. Since msec_sleep routine is only called by nettest_dlpi + & nettest_unix, let's duck this issue. */ int msec_sleep( int msecs ) @@ -3670,7 +3764,6 @@ } #endif /* WIN32 */ -#ifdef WANT_HISTOGRAM /* hist.c Given a time difference in microseconds, increment one of 61 @@ -3687,7 +3780,7 @@ > 100 secs This will allow any time to be recorded to within an accuracy of - 10%, and provides a compact representation for capturing the + 10%, and provides a compact representation for capturing the distribution of a large number of time differences (e.g. request-response latencies). @@ -3699,21 +3792,49 @@ /*#define HIST_TEST*/ +HIST +HIST_new_n(int max_outstanding) { + HIST h; + if((h = (HIST) malloc(sizeof(struct histogram_struct))) == NULL) { + perror("HIST_new_n - histogram_struct malloc failed"); + exit(1); + } + HIST_clear(h); + + /* we never want to have a full queue, so will trade a little space + for that. one day we may still have to check for a full queue */ + h->limit = max_outstanding + 1; + + /* now allocate the time_ones based on h->limit */ +#ifdef HAVE_GETHRTIME + h->time_ones = (hrtime_t *) malloc(h->limit * sizeof(hrtime_t)); +#elif HAVE_GET_HRT + h->time_ones = (hrt_t *) malloc(h->limit * sizeof(hrt_t)); +#elif defined(WIN32) + h->time_ones = (LARGE_INTEGER *) malloc(h->limit * + sizeof(LARGE_INTEGER)); +#else + h->time_ones = (struct timeval *) malloc(h->limit * + sizeof(struct timeval)); +#endif /* HAVE_GETHRTIME */ + if (h->time_ones == NULL) { + perror("HIST_new_n - time_ones malloc failed"); + exit(1); + } + + return h; +} + HIST HIST_new(void){ - HIST h; - if((h = (HIST) malloc(sizeof(struct histogram_struct))) == NULL) { - perror("HIST_new - malloc failed"); - exit(1); - } - HIST_clear(h); - return h; + return HIST_new_n(0); } + void HIST_clear(HIST h){ int i; - for(i = 0; i < 10; i++){ + for(i = 0; i < HIST_NUM_OF_BUCKET; i++){ h->unit_usec[i] = 0; h->ten_usec[i] = 0; h->hundred_usec[i] = 0; @@ -3725,39 +3846,67 @@ } h->ridiculous = 0; h->total = 0; + h->sum = 0; + h->sumsquare = 0; + h->hmin = 0; + h->hmax = 0; + h->limit = 0; + h->count = 0; + h->producer = 0; + h->consumer = 0; + h->time_ones = NULL; +} + +void +HIST_purge(HIST h) { + h->count = 0; + h->producer = 0; + h->consumer = 0; } void HIST_add(register HIST h, int time_delta){ - register int val; + register float val; + register int base = HIST_NUM_OF_BUCKET / 10; + if (!h->total) + h->hmin = h->hmax = time_delta; h->total++; - val = time_delta; + h->sum += time_delta; + /* am I just being paranoid about the overhead of pow() when we + aren't all that interested in the statistics derived from it? + raj 20100914 */ + if (keep_statistics) { + h->sumsquare += pow(time_delta, 2); + } + h->hmin = ((h->hmin < time_delta) ? h->hmin : time_delta); + h->hmax = ((h->hmax > time_delta) ? h->hmax : time_delta); + val = (float) time_delta; /* check for < 0 added via VMware ESX patches */ if (val < 0) { h->ridiculous++; } - if(val <= 9) h->unit_usec[val]++; + if(val < 10) h->unit_usec[(int)(val * base)]++; else { - val = val/10; - if(val <= 9) h->ten_usec[val]++; + val /= 10; + if(val < 10) h->ten_usec[(int)(val * base)]++; else { - val = val/10; - if(val <= 9) h->hundred_usec[val]++; + val /= 10; + if(val < 10) h->hundred_usec[(int)(val * base)]++; else { - val = val/10; - if(val <= 9) h->unit_msec[val]++; + val /= 10; + if(val < 10) h->unit_msec[(int)(val * base)]++; else { - val = val/10; - if(val <= 9) h->ten_msec[val]++; + val /= 10; + if(val < 10) h->ten_msec[(int)(val * base)]++; else { - val = val/10; - if(val <= 9) h->hundred_msec[val]++; + val /= 10; + if(val < 10) h->hundred_msec[(int)(val * base)]++; else { - val = val/10; - if(val <= 9) h->unit_sec[val]++; + val /= 10; + if(val < 10) h->unit_sec[(int)(val * base)]++; else { - val = val/10; - if(val <= 9) h->ten_sec[val]++; + val /= 10; + if(val < 10) h->ten_sec[(int)(val * base)]++; else h->ridiculous++; } } @@ -3768,21 +3917,28 @@ } } -#define RB_printf printf - void output_row(FILE *fd, char *title, int *row){ - register int i; - RB_printf("%s", title); - for(i = 0; i < 10; i++) RB_printf(": %4d", row[i]); - RB_printf("\n"); + register int i; + register int j; + register int base = HIST_NUM_OF_BUCKET / 10; + register int sum; + fprintf(where,"%s", title); + for(i = 0; i < 10; i++){ + sum = 0; + for (j = i * base; j < (i + 1) * base; j++) { + sum += row[j]; + } + fprintf(where,": %4d", sum); + } + fprintf(where,"\n"); } int sum_row(int *row) { int sum = 0; int i; - for (i = 0; i < 10; i++) sum += row[i]; + for (i = 0; i < HIST_NUM_OF_BUCKET; i++) sum += row[i]; return(sum); } @@ -3802,11 +3958,95 @@ output_row(stdout, "HUNDRED_MSEC ", h->hundred_msec); output_row(stdout, "UNIT_SEC ", h->unit_sec); output_row(stdout, "TEN_SEC ", h->ten_sec); - RB_printf(">100_SECS: %d\n", h->ridiculous); - RB_printf("HIST_TOTAL: %d\n", h->total); + fprintf(where,">100_SECS: %d\n", h->ridiculous); + fprintf(where,"HIST_TOTAL: %d\n", h->total); +} + +/* search buckets for each unit */ +int +HIST_search_bucket(int *unit, int num, int *last, int *current, double scale){ + int base = HIST_NUM_OF_BUCKET / 10; + int i; + for (i = 0; i < HIST_NUM_OF_BUCKET; i++){ + *last = *current; + *current += unit[i]; + if (*current >= num) + return (int)((i + (double)(num - *last)/(*current - *last)) * scale/base); + } + return 0; +} + +/* get percentile from histogram */ +int +HIST_get_percentile(HIST h, const double percentile){ + int num = (int) h->total * percentile; + int last = 0; + int current = 0; + int result; + + if (!num) + return 0; + + /* search in unit usec range */ + result = HIST_search_bucket(h->unit_usec, num, &last, ¤t, 1e0); + if (result) + return result; + + /* search in ten usec range */ + result = HIST_search_bucket(h->ten_usec, num, &last, ¤t, 1e1); + if (result) + return result; + + /* search in ten hundred usec range */ + result = HIST_search_bucket(h->hundred_usec, num, &last, ¤t, 1e2); + if (result) + return result; + + /* search in unic msec range */ + result = HIST_search_bucket(h->unit_msec, num, &last, ¤t, 1e3); + if (result) + return result; + + /* search in ten msec range */ + result = HIST_search_bucket(h->ten_msec, num, &last, ¤t, 1e4); + if (result) + return result; + + /* search in hundred msec range */ + result = HIST_search_bucket(h->hundred_msec, num, &last, ¤t, 1e5); + if (result) + return result; + + /* search in unit sec range */ + result = HIST_search_bucket(h->unit_sec, num, &last, ¤t, 1e6); + if (result) + return result; + + /* search in ten sec range */ + result = HIST_search_bucket(h->ten_sec, num, &last, ¤t, 1e7); + if (result) + return result; + + return (int)(1e8); +} + + +/* get basic stats */ +void +HIST_get_stats(HIST h, int *min, int *max, double *mean, double *stddev){ + *min = h->hmin; + *max = h->hmax; + if (h->total){ + *mean = (double)h->sum / (double)h->total; + *stddev = (h->sumsquare * h->total - pow(h->sum, 2)) / pow(h->total, 2); + *stddev = sqrt(*stddev); + } + else{ + *mean = 0; + *stddev = 0; + } } -#endif /* with the advent of sit-and-spin intervals support, we might as well make these things available all the time, not just for demo or @@ -3903,243 +4143,62 @@ } #endif /* HAVE_GETHRTIME */ - -#ifdef WANT_DLPI - -int -put_control(fd, len, pri, ack) - int fd, len, pri, ack; -{ - int error; - int flags = 0; - dl_error_ack_t *err_ack = (dl_error_ack_t *)control_data; - - control_message.len = len; +void +HIST_timestamp_start(HIST h) { - if ((error = putmsg(fd, &control_message, 0, pri)) < 0 ) { - fprintf(where,"put_control: putmsg error %d\n",error); - fflush(where); - return(-1); - } - if ((error = getmsg(fd, &control_message, 0, &flags)) < 0) { - fprintf(where,"put_control: getsmg error %d\n",error); + if (NULL == h) { + fprintf(where,"HIST_timestamp_start called with NULL histogram\n"); fflush(where); - return(-1); + exit(-1); } - if (err_ack->dl_primitive != ack) { - fprintf(where,"put_control: acknowledgement error wanted %u got %u \n", - ack,err_ack->dl_primitive); - if (err_ack->dl_primitive == DL_ERROR_ACK) { - fprintf(where," dl_error_primitive: %u\n", - err_ack->dl_error_primitive); - fprintf(where," dl_errno: %u\n", - err_ack->dl_errno); - fprintf(where," dl_unix_errno %u\n", - err_ack->dl_unix_errno); - } - fflush(where); - return(-1); + if (h->count == h->limit) { + fprintf(where,"HIST_timestamp_start called with full time_ones\n"); } - return(0); -} - -int -dl_open(char devfile[], int ppa) -{ - int fd; - dl_attach_req_t *attach_req = (dl_attach_req_t *)control_data; + HIST_timestamp(&(h->time_ones[h->producer])); + h->producer += 1; + h->producer %= h->limit; + h->count += 1; - if ((fd = open(devfile, O_RDWR)) == -1) { - fprintf(where,"netperf: dl_open: open of %s failed, errno = %d\n", - devfile, - errno); - return(-1); - } - attach_req->dl_primitive = DL_ATTACH_REQ; - attach_req->dl_ppa = ppa; - - if (put_control(fd, sizeof(dl_attach_req_t), 0, DL_OK_ACK) < 0) { - fprintf(where, - "netperf: dl_open: could not send control message, errno = %d\n", - errno); - return(-1); - } - return(fd); } -int -dl_bind(int fd, int sap, int mode, char *dlsap_ptr, int *dlsap_len) -{ - dl_bind_req_t *bind_req = (dl_bind_req_t *)control_data; - dl_bind_ack_t *bind_ack = (dl_bind_ack_t *)control_data; - - bind_req->dl_primitive = DL_BIND_REQ; - bind_req->dl_sap = sap; - bind_req->dl_max_conind = 1; - bind_req->dl_service_mode = mode; - bind_req->dl_conn_mgmt = 0; - bind_req->dl_xidtest_flg = 0; - - if (put_control(fd, sizeof(dl_bind_req_t), 0, DL_BIND_ACK) < 0) { - fprintf(where, - "netperf: dl_bind: could not send control message, errno = %d\n", - errno); - return(-1); - } - - /* at this point, the control_data portion of the control message */ - /* structure should contain a DL_BIND_ACK, which will have a full */ - /* DLSAP in it. we want to extract this and pass it up so that */ - /* it can be passed around. */ - if (*dlsap_len >= bind_ack->dl_addr_length) { - bcopy((char *)bind_ack+bind_ack->dl_addr_offset, - dlsap_ptr, - bind_ack->dl_addr_length); - *dlsap_len = bind_ack->dl_addr_length; - return(0); - } - else { - return (-1); - } -} - -int -dl_connect(int fd, unsigned char *remote_addr, int remote_addr_len) -{ - dl_connect_req_t *connection_req = (dl_connect_req_t *)control_data; - dl_connect_con_t *connection_con = (dl_connect_con_t *)control_data; - struct pollfd pinfo; - - int flags = 0; - - /* this is here on the off chance that we really want some data */ - u_long data_area[512]; - struct strbuf data_message; - - int error; - - data_message.maxlen = 2048; - data_message.len = 0; - data_message.buf = (char *)data_area; - - connection_req->dl_primitive = DL_CONNECT_REQ; - connection_req->dl_dest_addr_length = remote_addr_len; - connection_req->dl_dest_addr_offset = sizeof(dl_connect_req_t); - connection_req->dl_qos_length = 0; - connection_req->dl_qos_offset = 0; - bcopy (remote_addr, - (unsigned char *)control_data + sizeof(dl_connect_req_t), - remote_addr_len); - - /* well, I would call the put_control routine here, but the sequence */ - /* of connection stuff with DLPI is a bit screwey with all this */ - /* message passing - Toto, I don't think were in Berkeley anymore. */ - - control_message.len = sizeof(dl_connect_req_t) + remote_addr_len; - if ((error = putmsg(fd,&control_message,0,0)) !=0) { - fprintf(where,"dl_connect: putmsg failure, errno = %d, error 0x%x \n", - errno,error); - fflush(where); - return(-1); - }; +/* snap an ending timestamp and add the delta to the histogram */ +void +HIST_timestamp_stop_add(HIST h) { - pinfo.fd = fd; - pinfo.events = POLLIN | POLLPRI; - pinfo.revents = 0; - - if ((error = getmsg(fd,&control_message,&data_message,&flags)) != 0) { - fprintf(where,"dl_connect: getmsg failure, errno = %d, error 0x%x \n", - errno,error); + if (NULL == h) { + fprintf(where,"HIST_timestamp_stop called with NULL histogram\n"); fflush(where); - return(-1); - } - while (control_data[0] == DL_TEST_CON) { - /* i suppose we spin until we get an error, or a connection */ - /* indication */ - if((error = getmsg(fd,&control_message,&data_message,&flags)) !=0) { - fprintf(where,"dl_connect: getmsg failure, errno = %d, error = 0x%x\n", - errno,error); - fflush(where); - return(-1); - } + exit(-1); } - /* we are out - it either worked or it didn't - which was it? */ - if (control_data[0] == DL_CONNECT_CON) { - return(0); - } - else { - return(-1); + if (h->consumer == h->producer) { + fprintf(where, + "HIST_timestamp_stop called with empty time_ones consumer %d producer %d\n", + h->consumer, + h->producer); + fflush(where); + exit(-1); } -} + /* take our stopping timestamp */ + HIST_timestamp(&(h->time_two)); -int -dl_accept(fd, remote_addr, remote_addr_len) - int fd; - unsigned char *remote_addr; - int remote_addr_len; -{ - dl_connect_ind_t *connect_ind = (dl_connect_ind_t *)control_data; - dl_connect_res_t *connect_res = (dl_connect_res_t *)control_data; - int tmp_cor; - int flags = 0; - - /* hang around and wait for a connection request */ - getmsg(fd,&control_message,0,&flags); - while (control_data[0] != DL_CONNECT_IND) { - getmsg(fd,&control_message,0,&flags); - } - - /* now respond to the request. at some point, we may want to be sure */ - /* that the connection came from the correct station address, but */ - /* will assume that we do not have to worry about it just now. */ - - tmp_cor = connect_ind->dl_correlation; - - connect_res->dl_primitive = DL_CONNECT_RES; - connect_res->dl_correlation = tmp_cor; - connect_res->dl_resp_token = 0; - connect_res->dl_qos_length = 0; - connect_res->dl_qos_offset = 0; - connect_res->dl_growth = 0; + /* now add it */ + HIST_add(h,delta_micro(&(h->time_ones[h->consumer]),&(h->time_two))); + h->consumer += 1; + h->consumer %= h->limit; + h->count -= 1; - return(put_control(fd, sizeof(dl_connect_res_t), 0, DL_OK_ACK)); - -} - -int -dl_set_window(fd, window) - int fd, window; -{ - return(0); -} - -void -dl_stats(fd) - int fd; -{ } -int -dl_send_disc(fd) - int fd; -{ -} - -int -dl_recv_disc(fd) - int fd; -{ -} -#endif /* WANT_DLPI*/ + - /* these routines for confidence intervals are courtesy of IBM. They */ - /* have been modified slightly for more general usage beyond TCP/UDP */ - /* tests. raj 11/94 I would suspect that this code carries an IBM */ - /* copyright that is much the same as that for the original HP */ - /* netperf code */ +/* these routines for confidence intervals are courtesy of IBM. They + have been modified slightly for more general usage beyond TCP/UDP + tests. raj 11/94 I would suspect that this code carries an IBM + copyright that is much the same as that for the original HP netperf + code */ int confidence_iterations; /* for iterations */ double @@ -4229,9 +4288,9 @@ confidence=-10.0; } - /* this routine does a simple table lookup for some statistical */ - /* function that I would remember if I stayed awake in my probstats */ - /* class... raj 11/94 */ +/* this routine does a simple table lookup for some statistical + function that I would remember if I stayed awake in my probstats + class... raj 11/94 */ double confid(int level, int freedom) { @@ -4320,16 +4379,14 @@ if (debug) { fprintf(where, - "calculate_confidence: itr %d; time %f; res %f\n", + "calculate_confidence: itr %d; time %f; res %f\n" + " lcpu %f; rcpu %f\n" + " lsdm %f; rsdm %f\n", confidence_iterations, time, - result); - fprintf(where, - " lcpu %f; rcpu %f\n", + result, loc_cpu, - rem_cpu); - fprintf(where, - " lsdm %f; rsdm %f\n", + rem_cpu, loc_sd, rem_sd); fflush(where); @@ -4474,33 +4531,25 @@ return (double) (100.0 * (interval - rem_cpu_confid)); } - /* display_confidence() is called when we could not achieve the */ - /* desirec confidence in the results. it will print the achieved */ - /* confidence to "where" raj 11/94 */ +/* display_confidence() is called when we could not achieve the + desired confidence in the results. it will print the achieved + confidence to "where" raj 11/94 */ void display_confidence() { fprintf(where, - "!!! WARNING\n"); - fprintf(where, - "!!! Desired confidence was not achieved within "); - fprintf(where, - "the specified iterations.\n"); - fprintf(where, - "!!! This implies that there was variability in "); - fprintf(where, - "the test environment that\n"); - fprintf(where, - "!!! must be investigated before going further.\n"); - fprintf(where, - "!!! Confidence intervals: Throughput : %4.3f%%\n", - 100.0 * (interval - result_confid)); - fprintf(where, - "!!! Local CPU util : %4.3f%%\n", - 100.0 * (interval - loc_cpu_confid)); - fprintf(where, + "!!! WARNING\n" + "!!! Desired confidence was not achieved within " + "the specified iterations.\n" + "!!! This implies that there was variability in " + "the test environment that\n" + "!!! must be investigated before going further.\n" + "!!! Confidence intervals: Throughput : %4.3f%%\n" + "!!! Local CPU util : %4.3f%%\n" "!!! Remote CPU util : %4.3f%%\n\n", + 100.0 * (interval - result_confid), + 100.0 * (interval - loc_cpu_confid), 100.0 * (interval - rem_cpu_confid)); } diff -Nru netperf-2.4.5/src/netlib.h netperf-2.5.0/src/netlib.h --- netperf-2.4.5/src/netlib.h 2008-10-30 20:48:46.000000000 +0000 +++ netperf-2.5.0/src/netlib.h 2011-07-12 22:04:46.000000000 +0000 @@ -456,6 +456,7 @@ extern int local_data_family; extern int remote_data_family; +extern int control_family; extern union netperf_request_struct netperf_request; extern union netperf_response_struct netperf_response; @@ -482,6 +483,9 @@ extern void netlib_init(); extern int netlib_get_page_size(); extern void install_signal_catchers(); +extern struct addrinfo *resolve_host(char hostname[], + char port[], + int af); extern void establish_control(char hostname[], char port[], int af, @@ -493,11 +497,11 @@ extern void send_request(); extern void recv_response(); extern void send_response(); -extern void recv_request(); +extern int recv_request(); extern void send_request_n(int n); /* convert only the first N ints */ extern void recv_response_n(int n); /* of the test-specific data via */ extern void send_response_n(int n); /* htonl/ntonl as required */ -extern void recv_request_n(int n); +extern int recv_request_n(int n); extern void dump_request(); extern void dump_addrinfo(FILE *dumploc, struct addrinfo *info, char *host, char *port, int family); @@ -541,6 +545,7 @@ extern double ntohd(double net_double); extern double htond(double host_double); extern int inet_nton(int af, const void *src, char *dst, int cnt); +extern void random_ip_address(struct addrinfo *res, int mask_len); extern void libmain(); extern double calc_thruput(double units_received); extern double calc_thruput_interval(double units_received,double elapsed); diff -Nru netperf-2.4.5/src/netperf.c netperf-2.5.0/src/netperf.c --- netperf-2.4.5/src/netperf.c 2008-10-24 23:31:23.000000000 +0000 +++ netperf-2.5.0/src/netperf.c 2011-07-07 21:15:36.000000000 +0000 @@ -1,6 +1,6 @@ /* - Copyright (C) 1993-2007 Hewlett-Packard Company + Copyright (C) 1993-2011 Hewlett-Packard Company ALL RIGHTS RESERVED. The enclosed software and documentation includes copyrighted works @@ -42,7 +42,7 @@ */ char netperf_id[]="\ -@(#)netperf.c (c) Copyright 1993-2007 Hewlett-Packard Company. Version 2.4.3"; +@(#)netperf.c (c) Copyright 1993-2011 Hewlett-Packard Company. Version 2.5.0"; #ifdef HAVE_CONFIG_H #include "config.h" @@ -242,7 +242,7 @@ send_sctp_stream_1toMany(host_name); } else if (strcasecmp(test_name, "SCTP_RR_MANY") == 0) { - send_sctp_stream_1toMany(host_name); + send_sctp_rr_1toMany(host_name); } #endif diff -Nru netperf-2.4.5/src/NetPerfDir/sources~ netperf-2.5.0/src/NetPerfDir/sources~ --- netperf-2.4.5/src/NetPerfDir/sources~ 2007-06-01 22:05:59.000000000 +0000 +++ netperf-2.5.0/src/NetPerfDir/sources~ 1970-01-01 00:00:00.000000000 +0000 @@ -1,27 +0,0 @@ -TARGETNAME=netperf -TARGETPATH=OBJ -TARGETTYPE=PROGRAM - -LINKLIBS= \ - $(SDK_LIB_PATH)\kernel32.lib \ - $(SDK_LIB_PATH)\ws2_32.lib \ - $(SDK_LIB_PATH)\wsock32.lib - -USE_CRTDLL=1 -UMTYPE=console - -INCLUDES=$(SDK_INC_PATH);. - -MSC_WARNING_LEVEL=/W3 /WX - -C_DEFINES=$(C_DEFINES) -D_CONSOLE_ -DHAVE_GETADDRINFO -DHAVE_GETNAMEINFO -DSTDC_HEADERS - -SOURCES= \ - ..\netcpu_ntperf.c \ - ..\netlib.c \ - ..\netsh.c \ - ..\nettest_bsd.c \ - inet_ntop.c \ - ..\netperf.c - - diff -Nru netperf-2.4.5/src/netperf_version.h netperf-2.5.0/src/netperf_version.h --- netperf-2.4.5/src/netperf_version.h 2009-06-12 00:11:49.000000000 +0000 +++ netperf-2.5.0/src/netperf_version.h 2011-07-19 23:18:56.000000000 +0000 @@ -1 +1 @@ -#define NETPERF_VERSION "2.4.5" +#define NETPERF_VERSION "2.5.0" diff -Nru netperf-2.4.5/src/netrt_rtmget.c netperf-2.5.0/src/netrt_rtmget.c --- netperf-2.4.5/src/netrt_rtmget.c 2008-03-21 17:50:14.000000000 +0000 +++ netperf-2.5.0/src/netrt_rtmget.c 2011-02-10 17:04:11.000000000 +0000 @@ -275,8 +275,6 @@ struct rt_msghdr *rtm; int copy_len; char *buffer; - void *next_hop; - struct sockaddr_storage holdme; struct sockaddr_in *sin; struct sockaddr_in6 *sin6; diff -Nru netperf-2.4.5/src/netserver.c netperf-2.5.0/src/netserver.c --- netperf-2.4.5/src/netserver.c 2009-05-27 21:48:44.000000000 +0000 +++ netperf-2.5.0/src/netserver.c 2011-07-18 22:37:22.000000000 +0000 @@ -1,6 +1,6 @@ /* - Copyright (C) 1993-2007 Hewlett-Packard Company + Copyright (C) 1993-2011 Hewlett-Packard Company ALL RIGHTS RESERVED. The enclosed software and documentation includes copyrighted works @@ -45,26 +45,9 @@ #include "netperf_version.h" char netserver_id[]="\ -@(#)netserver.c (c) Copyright 1993-2007 Hewlett-Packard Co. Version 2.4.3"; +@(#)netserver.c (c) Copyright 1993-2011 Hewlett-Packard Co. Version 2.5.0"; + - /***********************************************************************/ - /* */ - /* netserver.c */ - /* */ - /* This is the server side code for the netperf test package. It */ - /* will operate either stand-alone, or as a child of inetd. In this */ - /* way, we insure that it can be installed on systems with or without */ - /* root permissions (editing inetd.conf). Essentially, this code is */ - /* the analog to the netsh.c code. */ - /* */ - /***********************************************************************/ - - -/************************************************************************/ -/* */ -/* Global include files */ -/* */ -/************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -75,54 +58,87 @@ # endif # include #endif + #if HAVE_STRINGS_H # include #endif + #if HAVE_LIMITS_H # include #endif -#include -#include -#ifndef WIN32 + +#if HAVE_SYS_IPC_H +#include +#endif + +#if HAVE_SYS_IOCTL_H +#include +#endif + +#if HAVE_SYS_SOCKET_H +#include +#endif + +#if HAVE_SYS_STAT_H +#include +#endif + +#if HAVE_NETINET_IN_H +#include +#endif + +#if HAVE_NETDB_H +#include +#endif + +#if HAVE_UNISTD_H +#include +#endif + +#if HAVE_STDLIB_H +#include +#endif + +#if HAVE_ERRNO_H #include +#endif + +#if HAVE_SIGNAL_H #include +/* some OS's have SIGCLD defined as SIGCHLD */ +#ifndef SIGCLD +#define SIGCLD SIGCHLD +#endif /* SIGCLD */ + #endif -#if !defined(WIN32) && !defined(__VMS) && !defined(MSDOS) -#include -#endif /* !defined(WIN32) && !defined(__VMS) && !defined(MSDOS) */ -#include + +#if !defined(HAVE_SETSID) +#if HAVE_SYS_WAIT_H> +#include +#endif +#endif + #ifdef WIN32 #include #include -#define netperf_socklen_t socklen_t -/* we need to find some other way to decide to include ws2 */ -/* if you are trying to compile on Windows 2000 or NT 4 you will */ -/* probably have to define DONT_IPV6 */ -#ifndef DONT_IPV6 + +#if HAVE_WS2TCPIP.h #include -#endif /* DONT_IPV6 */ +#endif + #include + #define strdup _strdup -#define sleep(x) Sleep((x)*1000) -#else -#ifndef MPE -#include -#endif /* MPE */ -#include -#include -#include -#include -#include -#include -#ifndef DONT_WAIT -#include -#endif /* DONT_WAIT */ +#define sleep(x) SLEEP((x)*1000) #endif /* WIN32 */ -#include -#ifdef __VMS -#include -#include -#endif /* __VMS */ + +/* unconditional system includes */ + +#include +#include +#include + +/* netperf includes */ #include "netlib.h" #include "nettest_bsd.h" @@ -140,57 +156,536 @@ #include "netsh.h" -#ifndef DEBUG_LOG_FILE -#ifndef WIN32 -#define DEBUG_LOG_FILE "/tmp/netperf.debug" +#ifndef DEBUG_LOG_FILE_DIR +#if defined(WIN32) +#define DEBUG_LOG_FILE_DIR "c:\\temp\\" +#elif defined(ANDROID) +#define DEBUG_LOG_FILE_DIR "/data/local/tmp/" #else -#define DEBUG_LOG_FILE "c:\\temp\\netperf.debug" -#endif /* WIN32 */ -#endif /* DEBUG_LOG_FILE */ +#define DEBUG_LOG_FILE_DIR "/tmp/" +#endif +#endif /* DEBUG_LOG_FILE_DIR */ + +#ifndef DEBUG_LOG_FILE +#define DEBUG_LOG_FILE DEBUG_LOG_FILE_DIR"netserver.debug" +#endif + +#if !defined(PATH_MAX) +#define PATH_MAX MAX_PATH +#endif +char FileName[PATH_MAX]; + + + +char listen_port[10]; + +struct listen_elt { + SOCKET fd; + struct listen_elt *next; +}; + +struct listen_elt *listen_list = NULL; - /* some global variables */ +SOCKET server_control; + +int child; /* are we the child of inetd or a parent netserver? + */ +int netperf_daemon; +int daemon_parent = 0; +int not_inetd; +int want_daemonize; +int spawn_on_accept; +int suppress_debug = 0; -FILE *afp; -char listen_port[10]; extern char *optarg; extern int optind, opterr; -#ifndef WIN32 -#define SERVER_ARGS "dL:n:p:v:V46" +static void +init_netserver_globals() { + +#if defined(__VMS) || defined(VMWARE_UW) + spawn_on_accept = 0; + want_daemonize = 0; #else -#define SERVER_ARGS "dL:n:p:v:V46I:i:" + spawn_on_accept = 1; +#if defined(WIN32) + /* we only know how to spawn in WIN32, not daemonize */ + want_daemonize = 0; +#else + want_daemonize = 1; +#endif /* WIN32 */ +#endif /* __VMS || VMWARE_UW */ + + child = 0; + not_inetd = 0; + netperf_daemon = 0; +} + +void +unlink_empty_debug_file() { + +#if !defined(WIN32) + struct stat buf; + + if (stat(FileName,&buf)== 0) { + + if (buf.st_size == 0) + unlink(FileName); + } #endif +} -/* perhaps one day we will use this as part of only opening a debug - log file if debug is set, of course we have to be wary of the base - use of "where" and so probably always need "where" pointing - "somewhere" or other. */ +/* it is important that set_server_sock() be called before this + routine as we depend on the control socket being dup()ed out of the + way when we go messing about with the streams. */ void open_debug_file() { -#ifndef WIN32 -#ifndef PATH_MAX -#define PATH_MAX MAX_PATH +#if !defined WIN32 +#define NETPERF_NULL "/dev/null" +#else +#define NETPERF_NULL "nul" #endif - char FileName[PATH_MAX]; /* for opening the debug log file */ - strcpy(FileName, DEBUG_LOG_FILE); + + FILE *rd_null_fp; if (where != NULL) fflush(where); - snprintf(&FileName[strlen(FileName)], sizeof(FileName) - strlen(FileName), "_%d", getpid()); - if ((where = fopen(FileName, "w")) == NULL) { + snprintf(FileName, + sizeof(FileName), + "%s_%d", + DEBUG_LOG_FILE, + getpid()); + if ((where = fopen((suppress_debug) ? NETPERF_NULL : FileName, + "w")) == NULL) { perror("netserver: debug file"); exit(1); } +#if !defined(WIN32) + chmod(FileName,0644); + + /* redirect stdin to "/dev/null" */ + rd_null_fp = fopen(NETPERF_NULL,"r"); + if (NULL == rd_null_fp) { + fprintf(where, + "%s: opening of %s failed: %s (errno %d)\n", + __FUNCTION__, + NETPERF_NULL, + strerror(errno), + errno); + fflush(where); + exit(1); + } + + if (close(STDIN_FILENO) == -1) { + fprintf(where, + "%s: close of STDIN_FILENO failed: %s (errno %d)\n", + __FUNCTION__, + strerror(errno), + errno); + fflush(where); + exit(1); + } + + if (dup(fileno(rd_null_fp)) == -1) { + fprintf(where, + "%s: dup of rd_null_fp to stdin failed: %s (errno %d)\n", + __FUNCTION__, + strerror(errno), + errno); + fflush(where); + exit(1); + } + + /* redirect stdout to "where" */ + if (close(STDOUT_FILENO) == -1) { + fprintf(where, + "%s: close of STDOUT_FILENO failed: %s (errno %d)\n", + __FUNCTION__, + strerror(errno), + errno); + fflush(where); + exit(1); + } + + if (dup(fileno(where)) == -1) { + fprintf(where, + "%s: dup of where to stdout failed: %s (errno %d)\n", + __FUNCTION__, + strerror(errno), + errno); + fflush(where); + exit(1); + } + + /* redirect stderr to "where" */ + if (close(STDERR_FILENO) == -1) { + fprintf(where, + "%s: close of STDERR_FILENO failed: %s (errno %d)\n", + __FUNCTION__, + strerror(errno), + errno); + fflush(where); + exit(1); + } + + if (dup(fileno(where)) == -1) { + fprintf(where, + "%s: dup of where to stderr failed: %s (errno %d)\n", + __FUNCTION__, + strerror(errno), + errno); + fflush(where); + exit(1); + } + +#else + + /* Hopefully, by closing stdout & stderr, the subsequent fopen calls + will get mapped to the correct std handles. */ + fclose(stdout); + + if ((where = fopen(FileName, "w")) == NULL) { + perror("netserver: fopen of debug file as new stdout failed!"); + exit(1); + } + + fclose(stderr); + + if ((where = fopen(FileName, "w")) == NULL) { + fprintf(stdout, "fopen of debug file as new stderr failed!\n"); + exit(1); + } + +#endif + +} + +/* so, either we are a child of inetd in which case server_sock should + be stdin, or we are a child of a netserver parent. there will be + logic here for all of it, including Windows. it is important that + this be called before open_debug_file() */ + +void +set_server_sock() { + + if (debug) { + fprintf(where, + "%s: enter\n", + __FUNCTION__); + fflush(where); + } + +#ifdef WIN32 + server_sock = (SOCKET)GetStdHandle(STD_INPUT_HANDLE); +#elif !defined(__VMS) + if (server_sock != INVALID_SOCKET) { + fprintf(where,"Yo, Iz ain't invalid!\n"); + fflush(where); + exit(1); + } + + /* we dup this to up the reference count so when we do redirection + of the io streams we don't accidentally toast the control + connection in the case of our being a child of inetd. */ + server_sock = dup(0); + +#else + if ((server_sock = + socket(TCPIP$C_AUXS, SOCK_STREAM, 0)) == INVALID_SOCKET) { + fprintf(stderr, + "%s: failed to grab aux server socket: %s (errno %s)\n", + __FUNCTION__, + strerror(errno), + errno); + fflush(stderr); + exit(1); + } +#endif + +} + + +void +create_listens(char hostname[], char port[], int af) { + + struct addrinfo hints; + struct addrinfo *local_res; + struct addrinfo *local_res_temp; + int count, error; + int on = 1; + SOCKET temp_socket; + struct listen_elt *temp_elt; + + if (debug) { + fprintf(stderr, + "%s: called with host '%s' port '%s' family %s(%d)\n", + __FUNCTION__, + hostname, + port, + inet_ftos(af), + af); + fflush(stderr); + } + memset(&hints,0,sizeof(hints)); + hints.ai_family = af; + hints.ai_socktype = SOCK_STREAM; + hints.ai_protocol = IPPROTO_TCP; + hints.ai_flags = AI_PASSIVE; + + count = 0; + do { + error = getaddrinfo((char *)hostname, + (char *)port, + &hints, + &local_res); + count += 1; + if (error == EAI_AGAIN) { + if (debug) { + fprintf(stderr, + "%s: Sleeping on getaddrinfo EAI_AGAIN\n", + __FUNCTION__); + fflush(stderr); + } + sleep(1); + } + } while ((error == EAI_AGAIN) && (count <= 5)); + + if (error) { + if (debug) { + + fprintf(stderr, + "%s: could not resolve remote '%s' port '%s' af %d\n" + "\tgetaddrinfo returned %s (%d)\n", + __FUNCTION__, + hostname, + port, + af, + gai_strerror(error), + error); + + } + return; + } + + if (debug) { + dump_addrinfo(stderr, local_res, hostname, port, af); + } + + local_res_temp = local_res; + + while (local_res_temp != NULL) { + + temp_socket = socket(local_res_temp->ai_family,SOCK_STREAM,0); + + if (temp_socket == INVALID_SOCKET) { + if (debug) { + fprintf(stderr, + "%s could not allocate a socket: %s (errno %d)\n", + __FUNCTION__, + strerror(errno), + errno); + fflush(stderr); + } + local_res_temp = local_res_temp->ai_next; + continue; + } + + /* happiness and joy, keep going */ + if (setsockopt(temp_socket, + SOL_SOCKET, + SO_REUSEADDR, + (char *)&on , + sizeof(on)) == SOCKET_ERROR) { + if (debug) { + fprintf(stderr, + "%s: warning: could not set SO_REUSEADDR: %s (errno %d)\n", + __FUNCTION__, + strerror(errno), + errno); + fflush(stderr); + } + } + /* still happy and joyful */ + + if ((bind(temp_socket, + local_res_temp->ai_addr, + local_res_temp->ai_addrlen) != SOCKET_ERROR) && + (listen(temp_socket,128) != SOCKET_ERROR)) { + + /* OK, now add to the list */ + temp_elt = (struct listen_elt *)malloc(sizeof(struct listen_elt)); + if (temp_elt) { + temp_elt->fd = temp_socket; + if (listen_list) { + temp_elt->next = listen_list; + } + else { + temp_elt->next = NULL; + } + listen_list = temp_elt; + } + else { + fprintf(stderr, + "%s: could not malloc a listen_elt\n", + __FUNCTION__); + fflush(stderr); + exit(1); + } + } + else { + /* we consider a bind() or listen() failure a transient and try + the next address */ + if (debug) { + fprintf(stderr, + "%s: warning: bind or listen call failure: %s (errno %d)\n", + __FUNCTION__, + strerror(errno), + errno); + fflush(stderr); + } + close(temp_socket); + } + local_res_temp = local_res_temp->ai_next; + } + +} + +void +setup_listens(char name[], char port[], int af) { + + int do_inet; + int no_name = 0; +#ifdef AF_INET6 + int do_inet6; +#endif + + if (debug) { + fprintf(where, + "%s: enter\n", + __FUNCTION__); + fflush(where); + } + + + if (strcmp(name,"") == 0) { + no_name = 1; + switch (af) { + case AF_UNSPEC: + do_inet = 1; +#ifdef AF_INET6 + do_inet6 = 1; +#endif + break; + case AF_INET: + do_inet = 1; +#ifdef AF_INET6 + do_inet6 = 0; +#endif + break; +#ifdef AF_INET6 + case AF_INET6: + do_inet = 0; + do_inet6 = 1; + break; #endif + default: + do_inet = 1; + } + /* if we have IPv6, try that one first because it may be a superset */ +#ifdef AF_INET6 + if (do_inet6) + create_listens("::0",port,AF_INET6); +#endif + if (do_inet) + create_listens("0.0.0.0",port,AF_INET); + } + else { + create_listens(name,port,af); + } + + if (listen_list) { + fprintf(stdout, + "Starting netserver with host '%s' port '%s' and family %s\n", + (no_name) ? "IN(6)ADDR_ANY" : name, + port, + inet_ftos(af)); + fflush(stdout); + } + else { + fprintf(stderr, + "Unable to start netserver with '%s' port '%s' and family %s\n", + (no_name) ? "IN(6)ADDR_ANY" : name, + port, + inet_ftos(af)); + fflush(stderr); + exit(1); + } +} + +int +set_fdset(struct listen_elt *list, fd_set *fdset) { + FD_ZERO(fdset); + struct listen_elt *temp; + int max = -1; + + temp = list; + + if (debug) { + fprintf(where, + "%s: enter list %p fd_set %p\n", + __FUNCTION__, + list, + fdset); + fflush(where); + } + + while (temp) { + if (temp->fd > max) + max = temp->fd; + + if (debug) { + fprintf(where, + "setting %d in fdset\n", + temp->fd); + fflush(where); + } + + FD_SET(temp->fd,fdset); + + temp = temp->next; + } + + return max; + +} + +void +close_listens(struct listen_elt *list) { + struct listen_elt *temp; + + if (debug) { + fprintf(where, + "%s: enter\n", + __FUNCTION__); + fflush(where); + } + + temp = list; + + while (temp) { + close(temp->fd); + temp = temp->next; + } } - /* This routine implements the "main event loop" of the netperf */ - /* server code. Code above it will have set-up the control connection */ - /* so it can just merrily go about its business, which is to */ - /* "schedule" performance tests on the server. */ + +/* This routine implements the "main event loop" of the netperf server + code. Code above it will have set-up the control connection so it + can just merrily go about its business, which is to "schedule" + performance tests on the server. */ void process_requests() @@ -198,56 +693,46 @@ float temp_rate; - if (debug) open_debug_file(); - + if (debug) { + fprintf(where, + "%s: enter\n", + __FUNCTION__); + fflush(where); + } while (1) { - recv_request(); + + if (recv_request() == 0) + return; switch (netperf_request.content.request_type) { case DEBUG_ON: netperf_response.content.response_type = DEBUG_OK; - /* dump_request already present in recv_request; redundant? */ - if (!debug) { + if (!suppress_debug) { debug++; - open_debug_file(); - dump_request(); + + if (debug == 1) { + /* we just flipped-on debugging, dump the request because + recv_request/recv_request_n will not have dumped it as its + dump_request() call is conditional on debug being set. raj + 2011-07-08 */ + dump_request(); + } } + send_response(); break; case DEBUG_OFF: - if (debug) - debug--; - netperf_response.content.response_type = DEBUG_OK; - send_response(); - /* +SAF why??? */ - if (!debug) - { - fclose(where); -#if !defined(WIN32) && !defined(MPE) && !defined(__VMS) && !defined(MSDOS) - /* For Unix: reopen the debug write file descriptor to "/dev/null" */ - /* and redirect stdout to it. */ - fflush (stdout); - where = fopen ("/dev/null", "w"); - if (where == NULL) - { - perror ("netserver: reopening debug fp for writing: /dev/null"); - exit (1); - } - if (close (STDOUT_FILENO) == -1) - { - perror ("netserver: closing stdout file descriptor"); - exit (1); - } - if (dup (fileno (where)) == -1) - { - perror ("netserver: duplicate /dev/null write file descr. to stdout"); - exit (1); - } -#endif /* !WIN32 !MPE !__VMS !MSDOS */ - } + if (debug) + debug--; + netperf_response.content.response_type = DEBUG_OK; + send_response(); + /* we used to take the trouble to close the debug file, but SAF + asked a good question when he asked "Why?" and since I cannot + think of a good reason, I have removed the code. raj + 2011-07-08 */ break; case DO_SYSINFO: @@ -266,7 +751,7 @@ (!strstr(local_machine,delims[i])) && (!strstr(local_version,delims[i]))) { snprintf((char *)netperf_response.content.test_specific_data, - sizeof(netperf_response) - 7, + sizeof(netperf_response.content.test_specific_data), "%c%s%c%s%c%s%c%s", delims[i][0], local_sysname, @@ -280,9 +765,11 @@ } } if (i == 4) { - /* none of the delimiters were unique, use the last one */ + /* none of the delimiters were unique, use the last one of + course, the last one is not i but i-1 */ + i -= 1; snprintf((char *)netperf_response.content.test_specific_data, - sizeof(netperf_response) - 7, + sizeof(netperf_response.content.test_specific_data), "%c%s%c%s%c%s%c%s", delims[i][0], "NoDelimUnique", @@ -303,16 +790,19 @@ (char *)netperf_response.content.test_specific_data, sizeof(temp_rate)); bcopy((char *)&lib_num_loc_cpus, - (char *)netperf_response.content.test_specific_data + sizeof(temp_rate), + (char *)netperf_response.content.test_specific_data + + sizeof(temp_rate), sizeof(lib_num_loc_cpus)); if (debug) { - fprintf(where,"netserver: sending CPU information:"); - fprintf(where,"rate is %g num cpu %d\n",temp_rate,lib_num_loc_cpus); + fprintf(where, + "netserver: sending CPU information: rate is %g num cpu %d\n", + temp_rate, + lib_num_loc_cpus); fflush(where); } - /* we need the cpu_start, cpu_stop in the looper case to kill the */ - /* child proceses raj 7/95 */ + /* we need the cpu_start, cpu_stop in the looper case to kill + the child proceses raj 7/95 */ #ifdef USE_LOOPER cpu_start(1); @@ -471,441 +961,312 @@ } } -/* - set_up_server() - - set-up the server listen socket. we only call this routine if the - user has specified a port number on the command line or we believe we - are not a child of inetd or its platform-specific equivalent */ - -/*KC*/ - -void -set_up_server(char hostname[], char port[], int af) -{ - - struct addrinfo hints; - struct addrinfo *local_res; - struct addrinfo *local_res_temp; - - struct sockaddr_storage peeraddr; - netperf_socklen_t peeraddr_len = sizeof(peeraddr); - - SOCKET server_control; - int on=1; - int count; - int error; - int not_listening; - -#if !defined(WIN32) && !defined(MPE) && !defined(__VMS) && !defined(MSDOS) - FILE *rd_null_fp; /* Used to redirect from "/dev/null". */ - FILE *wr_null_fp; /* Used to redirect to "/dev/null". */ -#endif /* !WIN32 !MPE !__VMS !MDOS */ - - if (debug) { - fprintf(stderr, - "set_up_server called with host '%s' port '%s' remfam %d\n", - hostname, - port, - af); - fflush(stderr); - } - - memset(&hints,0,sizeof(hints)); - hints.ai_family = af; - hints.ai_socktype = SOCK_STREAM; - hints.ai_protocol = IPPROTO_TCP; - hints.ai_flags = AI_PASSIVE; - - count = 0; - do { - error = getaddrinfo((char *)hostname, - (char *)port, - &hints, - &local_res); - count += 1; - if (error == EAI_AGAIN) { - if (debug) { - fprintf(stderr,"Sleeping on getaddrinfo EAI_AGAIN\n"); - fflush(stderr); - } - sleep(1); - } - } while ((error == EAI_AGAIN) && (count <= 5)); - - if (error) { - fprintf(stderr, - "set_up_server: could not resolve remote '%s' port '%s' af %d", - hostname, - port, - af); - fprintf(stderr,"\n\tgetaddrinfo returned %d %s\n", - error, - gai_strerror(error)); - exit(-1); - } +/* the routine we call when we are going to spawn/fork/whatnot a child + process from the parent netserver daemon. raj 2011-07-08 */ +void +spawn_child() { if (debug) { - dump_addrinfo(stderr, local_res, hostname, port, af); + fprintf(where, + "%s: enter\n", + __FUNCTION__); + fflush(where); } - not_listening = 1; - local_res_temp = local_res; - - while((local_res_temp != NULL) && (not_listening)) { +#if defined(HAVE_FORK) - fprintf(stderr, - "Starting netserver at port %s\n", - port); + /* flush the usual suspects */ + fflush(stdin); + fflush(stdout); + fflush(stderr); + fflush(where); + + signal(SIGCLD,SIG_IGN); + + switch (fork()) { + case -1: + fprintf(where, + "%s: fork() error %s (errno %d)\n", + __FUNCTION__, + strerror(errno), + errno); + fflush(where); + exit(1); - server_control = socket(local_res_temp->ai_family,SOCK_STREAM,0); + case 0: + /* we are the child, but not of inetd. we don't know if we are + the child of a daemonized parent or not, so we still need to + worry about the standard file descriptors. raj 2011-07-11 */ - if (server_control == INVALID_SOCKET) { - perror("set_up_server could not allocate a socket"); - exit(-1); - } + close_listens(listen_list); + open_debug_file(); - /* happiness and joy, keep going */ - if (setsockopt(server_control, - SOL_SOCKET, - SO_REUSEADDR, - (char *)&on , - sizeof(on)) == SOCKET_ERROR) { - if (debug) { - perror("warning: set_up_server could not set SO_REUSEADDR"); - } - } - /* still happy and joyful */ + child = 1; + netperf_daemon = 0; + process_requests(); + exit(0); + break; - if ((bind (server_control, - local_res_temp->ai_addr, - local_res_temp->ai_addrlen) != SOCKET_ERROR) && - (listen (server_control,5) != SOCKET_ERROR)) { - not_listening = 0; - break; - } - else { - /* we consider a bind() or listen() failure a transient and try - the next address */ + default: + /* we are the parent, not a great deal to do here, but we may + want to reap some children */ +#if !defined(HAVE_SETSID) + /* Only call "waitpid()" if "setsid()" is not used. */ + while(waitpid(-1, NULL, WNOHANG) > 0) { if (debug) { - perror("warning: set_up_server failed a bind or listen call\n"); + fprintf(where, + "%s: reaped a child process\n", + __FUNCTION__); } - local_res_temp = local_res_temp->ai_next; - continue; } +#endif + break; } - if (not_listening) { - fprintf(stderr, - "set_up_server could not establish a listen endpoint for %s port %s with family %s\n", - host_name, - port, - inet_ftos(af)); - fflush(stderr); - exit(-1); +#elif defined(WIN32) + + BOOL b; + char *cmdline; + int cmdline_length; + int cmd_index; + PROCESS_INFORMATION pi; + STARTUPINFO si; + int i; + + /* create the cmdline array based on strlen(program) + 80 chars */ + cmdline_length = strlen(program) + 80; + cmdline = malloc(cmdline_length + 1); // +1 for trailing null + + memset(&si, 0 , sizeof(STARTUPINFO)); + si.cb = sizeof(STARTUPINFO); + + /* Pass the server_sock as stdin for the new process. Hopefully + this will continue to be created with the OBJ_INHERIT + attribute. */ + si.hStdInput = (HANDLE)server_sock; + si.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE); + si.hStdError = GetStdHandle(STD_ERROR_HANDLE); + si.dwFlags = STARTF_USESTDHANDLES; + + /* Build cmdline for child process */ + strcpy(cmdline, program); + cmd_index = strlen(cmdline); + if (verbosity > 1) { + cmd_index += snprintf(&cmdline[cmd_index], + cmdline_length - cmd_index, + " -v %d", + verbosity); } - else { - printf("Starting netserver at hostname %s port %s and family %s\n", - hostname, - port, - inet_ftos(af)); + for (i=0; i < debug; i++) { + cmd_index += snprintf(&cmdline[cmd_index], + cmdline_length - cmd_index, + " -d"); } - - /* - setpgrp(); - */ - -#if !defined(WIN32) && !defined(MPE) && !defined(__VMS) && !defined(VMWARE_UW) && !defined(MSDOS) - /* Flush the standard I/O file descriptors before forking. */ - fflush (stdin); - fflush (stdout); - fflush (stderr); -#if defined(HAVE_FORK) - switch (fork()) -#else - switch (vfork()) -#endif + cmd_index += snprintf(&cmdline[cmd_index], + cmdline_length - cmd_index, + " -I %x", + (int)(UINT_PTR)server_sock); + + /* are these -i settings even necessary? the command line scanning + does not seem to do anything with them */ + cmd_index += snprintf(&cmdline[cmd_index], + cmdline_length - cmd_index, + " -i %x", + (int)(UINT_PTR)server_control); + cmd_index += snprintf(&cmdline[cmd_index], + cmdline_length - cmd_index, + " -i %x", + (int)(UINT_PTR)where); + + b = CreateProcess(NULL, /* Application Name */ + cmdline, + NULL, /* Process security attributes */ + NULL, /* Thread security attributes */ + TRUE, /* Inherit handles */ + 0, /* Creation flags + PROCESS_QUERY_INFORMATION, */ + NULL, /* Enviornment */ + NULL, /* Current directory */ + &si, /* StartupInfo */ + &pi); + if (!b) { - case -1: - perror("netperf server error"); + perror("CreateProcessfailure: "); + free(cmdline); /* even though we exit :) */ exit(1); - - case 0: - /* Redirect stdin from "/dev/null". */ - rd_null_fp = fopen ("/dev/null", "r"); - if (rd_null_fp == NULL) - { - perror ("netserver: opening for reading: /dev/null"); - exit (1); - } - if (close (STDIN_FILENO) == -1) - { - perror ("netserver: closing stdin file descriptor"); - exit (1); - } - if (dup (fileno (rd_null_fp)) == -1) - { - perror ("netserver: duplicate /dev/null read file descr. to stdin"); - exit (1); - } + } + + /* We don't need the thread or process handles any more; + let them go away on their own timeframe. */ + + CloseHandle(pi.hThread); + CloseHandle(pi.hProcess); + + /* the caller/parent will close server_sock */ - /* Redirect stdout to the debug write file descriptor. */ - if (close (STDOUT_FILENO) == -1) - { - perror ("netserver: closing stdout file descriptor"); - exit (1); - } - if (dup (fileno (where)) == -1) - { - perror ("netserver: duplicate the debug write file descr. to stdout"); - exit (1); - } + free(cmdline); - /* Redirect stderr to "/dev/null". */ - wr_null_fp = fopen ("/dev/null", "w"); - if (wr_null_fp == NULL) - { - perror ("netserver: opening for writing: /dev/null"); - exit (1); - } - if (close (STDERR_FILENO) == -1) - { - perror ("netserver: closing stderr file descriptor"); - exit (1); - } - if (dup (fileno (wr_null_fp)) == -1) - { - perror ("netserver: dupicate /dev/null write file descr. to stderr"); - exit (1); - } - -#ifndef NO_SETSID - setsid(); #else - setpgrp(); -#endif /* NO_SETSID */ - - /* some OS's have SIGCLD defined as SIGCHLD */ -#ifndef SIGCLD -#define SIGCLD SIGCHLD -#endif /* SIGCLD */ - signal(SIGCLD, SIG_IGN); - -#endif /* !WIN32 !MPE !__VMS !MSDOS */ + fprintf(where, + "%s called on platform which cannot spawn children\n", + __FUNCTION__); + fflush(where); + exit(1); - for (;;) - { - if ((server_sock=accept(server_control, - (struct sockaddr *)&peeraddr, - &peeraddr_len)) == INVALID_SOCKET) - { - printf("server_control: accept failed errno %d\n",errno); - exit(1); - } -#if defined(MPE) || defined(__VMS) || defined(VMWARE_UW) || defined(MSDOS) - /* - * Since we cannot fork this process , we cant fire any threads - * as they all share the same global data . So we better allow - * one request at at time - */ - process_requests() ; -#elif WIN32 - { - BOOL b; - char *cmdline; - PROCESS_INFORMATION pi; - STARTUPINFO si; - int i; - - /* create the cmdline array based on strlen(program) + 80 chars */ - cmdline = malloc(strlen(program) + 80); - - memset(&si, 0 , sizeof(STARTUPINFO)); - si.cb = sizeof(STARTUPINFO); - - /* Pass the server_sock as stdin for the new process. */ - /* Hopefully this will continue to be created with the OBJ_INHERIT attribute. */ - si.hStdInput = (HANDLE)server_sock; - si.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE); - si.hStdError = GetStdHandle(STD_ERROR_HANDLE); - si.dwFlags = STARTF_USESTDHANDLES; - - /* Build cmdline for child process */ - strcpy(cmdline, program); - if (verbosity > 1) { - snprintf(&cmdline[strlen(cmdline)], sizeof(cmdline) - strlen(cmdline), " -v %d", verbosity); - } - for (i=0; i < debug; i++) { - snprintf(&cmdline[strlen(cmdline)], sizeof(cmdline) - strlen(cmdline), " -d"); - } - snprintf(&cmdline[strlen(cmdline)], sizeof(cmdline) - strlen(cmdline), " -I %x", (int)(UINT_PTR)server_sock); - snprintf(&cmdline[strlen(cmdline)], sizeof(cmdline) - strlen(cmdline), " -i %x", (int)(UINT_PTR)server_control); - snprintf(&cmdline[strlen(cmdline)], sizeof(cmdline) - strlen(cmdline), " -i %x", (int)(UINT_PTR)where); - - b = CreateProcess(NULL, /* Application Name */ - cmdline, - NULL, /* Process security attributes */ - NULL, /* Thread security attributes */ - TRUE, /* Inherit handles */ - 0, /* Creation flags PROCESS_QUERY_INFORMATION, */ - NULL, /* Enviornment */ - NULL, /* Current directory */ - &si, /* StartupInfo */ - &pi); - if (!b) - { - perror("CreateProcessfailure: "); - free(cmdline); /* even though we exit :) */ - exit(1); - } - - /* We don't need the thread or process handles any more; let them */ - /* go away on their own timeframe. */ - - CloseHandle(pi.hThread); - CloseHandle(pi.hProcess); - - /* And close the server_sock since the child will own it. */ - - close(server_sock); - free(cmdline); - } -#else - signal(SIGCLD, SIG_IGN); -#if defined(HAVE_FORK) - switch (fork()) -#else - switch (vfork()) -#endif - { - case -1: - /* something went wrong */ - exit(1); - case 0: - /* we are the child process */ - close(server_control); - process_requests(); - exit(0); - break; - default: - /* we are the parent process */ - close(server_sock); - /* we should try to "reap" some of our children. on some */ - /* systems they are being left as defunct processes. we */ - /* will call waitpid, looking for any child process, */ - /* with the WNOHANG feature. when waitpid return a zero, */ - /* we have reaped all the children there are to reap at */ - /* the moment, so it is time to move on. raj 12/94 */ -#ifndef DONT_WAIT -#ifdef NO_SETSID - /* Only call "waitpid()" if "setsid()" is not used. */ - while(waitpid(-1, NULL, WNOHANG) > 0) { } -#endif /* NO_SETSID */ -#endif /* DONT_WAIT */ - break; - } -#endif /* !WIN32 !MPE !__VMS !MSDOS */ - } /*for*/ -#if !defined(WIN32) && !defined(MPE) && !defined(__VMS) && !defined(VMWARE_UW) && !defined(MSDOS) - break; /*case 0*/ - - default: - exit (0); - - } -#endif /* !WIN32 !MPE !__VMS !MSDOS */ +#endif /* HAVE_FORK */ } -#ifdef WIN32 +void +accept_connection(SOCKET listen_fd) { + + struct sockaddr_storage peeraddr; + netperf_socklen_t peeraddrlen; +#if defined(SO_KEEPALIVE) + int on = 1; +#endif - /* With Win2003, WinNT's POSIX subsystem is gone and hence so is */ - /* fork. */ + if (debug) { + fprintf(where, + "%s: enter\n", + __FUNCTION__); + fflush(where); + } - /* But hopefully the kernel support will continue to exist for some */ - /* time. */ + peeraddrlen = sizeof(peeraddr); - /* We are not counting on the child address space copy_on_write */ - /* support, since it isn't exposed except through the NT native APIs */ - /* (which is not public). */ - - /* We will try to use the InheritHandles flag in CreateProcess. It */ - /* is in the public API, though it is documented as "must be FALSE". */ - - /* So where we would have forked, we will now create a new process. */ - /* I have added a set of command line switches to specify a list of */ - /* handles that the child should close since they shouldn't have */ - /* been inherited ("-i#"), and a single switch to specify the handle */ - /* for the server_sock ("I#"). */ - - /* A better alternative would be to re-write NetPerf to be */ - /* multi-threaded; i.e., move all of the various NetPerf global */ - /* variables in to thread specific structures. But this is a bigger */ - /* effort than I want to tackle at this time. (And I doubt that the */ - /* HP-UX author sees value in this effort). */ + /* while server_control is only used by the WIN32 path, but why + bother ifdef'ing it? and besides, do we *really* need knowledge + of server_control in the WIN32 case? do we have to tell the + child about *all* the listen endpoints? raj 2011-07-08 */ + server_control = listen_fd; + + if ((server_sock = accept(listen_fd, + (struct sockaddr *)&peeraddr, + &peeraddrlen)) == INVALID_SOCKET) { + fprintf(where, + "%s: accept failure: %s (errno %d)\n", + __FUNCTION__, + strerror(errno), + errno); + fflush(where); + exit(1); + } +#if defined(SO_KEEPALIVE) + /* we are not terribly concerned if this does not work, it is merely + duct tape added to belts and suspenders. raj 2011-07-08 */ + setsockopt(server_sock, + SOL_SOCKET, + SO_KEEPALIVE, + (const char *)&on, + sizeof(on)); #endif -int _cdecl -main(int argc, char *argv[]) -{ + if (spawn_on_accept) { + spawn_child(); + /* spawn_child() only returns when we are the parent */ + close(server_sock); + } + else { + process_requests(); + } +} - int c; - int not_inetd = 0; -#ifdef WIN32 - BOOL child = FALSE; -#endif - char arg1[BUFSIZ], arg2[BUFSIZ]; -#ifndef PATH_MAX -#define PATH_MAX MAX_PATH -#endif - char FileName[PATH_MAX]; /* for opening the debug log file */ +void +accept_connections() { - struct sockaddr name; - netperf_socklen_t namelen = sizeof(name); - + fd_set read_fds, write_fds, except_fds; + int high_fd, num_ready, candidate; -#ifdef WIN32 - WSADATA wsa_data ; + if (debug) { + fprintf(where, + "%s: enter\n", + __FUNCTION__); + fflush(where); + } - /* Initialize the winsock lib ( version 2.2 ) */ - if ( WSAStartup(MAKEWORD(2,2), &wsa_data) == SOCKET_ERROR ){ - printf("WSAStartup() failed : %lu\n", GetLastError()) ; - return 1 ; - } -#endif /* WIN32 */ + while (1) { - /* Save away the program name */ - program = (char *)malloc(strlen(argv[0]) + 1); - if (program == NULL) { - printf("malloc(%d) failed!\n", strlen(argv[0]) + 1); - return 1 ; - } - strcpy(program, argv[0]); + FD_ZERO(&write_fds); + FD_ZERO(&except_fds); + high_fd = set_fdset(listen_list,&read_fds); + + num_ready = select(high_fd + 1, + &read_fds, + &write_fds, + &except_fds, + NULL); + + /* try to keep things simple */ + candidate = 0; + while ((num_ready) && (candidate <= high_fd)) { + if (FD_ISSET(candidate,&read_fds)) { + accept_connection(candidate); + FD_CLR(candidate,&read_fds); + num_ready--; + } + else { + candidate++; + } + } - netlib_init(); - - /* Scan the command line to see if we are supposed to set-up our own */ - /* listen socket instead of relying on inetd. */ + if (num_ready < 0) { + fprintf(where, + "%s: select failure: %s (errno %d)\n", + __FUNCTION__, + strerror(errno), + errno); + fflush(where); + exit(1); + } + } +} - /* first set a copy of initial values */ - strncpy(local_host_name,"0.0.0.0",sizeof(local_host_name)); - local_address_family = AF_UNSPEC; - strncpy(listen_port,TEST_PORT,sizeof(listen_port)); +#ifndef WIN32 +#define SERVER_ARGS "DdfhL:n:Np:v:V46" +#else +#define SERVER_ARGS "DdfhL:n:Np:v:V46I:i:" +#endif +void +scan_netserver_args(int argc, char *argv[]) { - while ((c = getopt(argc, argv, SERVER_ARGS)) != EOF) { + int c; + char arg1[BUFSIZ], arg2[BUFSIZ]; + + if (debug) { + fprintf(where, + "%s: enter\n", + __FUNCTION__); + fflush(where); + } + + while ((c = getopt(argc, argv, SERVER_ARGS)) != EOF){ switch (c) { case '?': case 'h': print_netserver_usage(); exit(1); case 'd': - /* we want to set the debug file name sometime */ debug++; -#ifdef MSDOS - dbug_init(); -#endif + suppress_debug = 0; + break; + case 'D': + /* perhaps one of these days we'll take an argument */ + want_daemonize = 0; + not_inetd = 1; break; + case 'f': + spawn_on_accept = 0; + not_inetd = 1; + break; +#ifdef WIN32 + case 'I': + child = TRUE; + break; + case 'i': + break; +#endif case 'L': not_inetd = 1; break_args_explicit(optarg,arg1,arg2); @@ -914,32 +1275,25 @@ } if (arg2[0]) { local_address_family = parse_address_family(arg2); - /* if only the address family was set, we may need to set the - local_host_name accordingly. since our defaults are IPv4 - this should only be necessary if we have IPv6 support raj - 2005-02-07 */ -#if defined (AF_INET6) - if (!arg1[0]) { - strncpy(local_host_name,"::0",sizeof(local_host_name)); - } -#endif } break; case 'n': shell_num_cpus = atoi(optarg); if (shell_num_cpus > MAXCPUS) { fprintf(stderr, - "netserver: This version can only support %d CPUs. Please", + "netserver: This version can only support %d CPUs. Please" + "increase MAXCPUS in netlib.h and recompile.\n", MAXCPUS); - fprintf(stderr, - " increase MAXCPUS in netlib.h and recompile.\n"); fflush(stderr); exit(1); } break; + case 'N': + suppress_debug = 1; + debug = 0; + break; case 'p': - /* we want to open a listen socket at a */ - /* specified port number */ + /* we want to open a listen socket at a specified port number */ strncpy(listen_port,optarg,sizeof(listen_port)); not_inetd = 1; break; @@ -949,7 +1303,6 @@ case '6': #if defined(AF_INET6) local_address_family = AF_INET6; - strncpy(local_host_name,"::0",sizeof(local_host_name)); #else local_address_family = AF_UNSPEC; #endif @@ -962,129 +1315,203 @@ printf("Netperf version %s\n",NETPERF_VERSION); exit(0); break; -#ifdef WIN32 -/*+*+SAF */ - case 'I': - child = TRUE; - /* This is the handle we expect to inherit. */ - /*+*+SAF server_sock = (HANDLE)atoi(optarg); */ - break; - case 'i': - /* This is a handle we should NOT inherit. */ - /*+*+SAF CloseHandle((HANDLE)atoi(optarg)); */ - break; -#endif - + } } +} + +void +daemonize() { +#if defined(HAVE_FORK) - /* +*+SAF I need a better way to find inherited handles I should close! */ - /* +*+SAF Use DuplicateHandle to force inheritable attribute (or reset it)? */ + if (debug) { + fprintf(where, + "%s: enter\n", + __FUNCTION__); + fflush(where); + } -/* unlink(DEBUG_LOG_FILE); */ + /* flush the usual suspects */ + fflush(stdin); + fflush(stdout); + fflush(stderr); - strcpy(FileName, DEBUG_LOG_FILE); - -#ifndef WIN32 - snprintf(&FileName[strlen(FileName)], sizeof(FileName) - strlen(FileName), "_%d", getpid()); - if ((where = fopen(FileName, "w")) == NULL) { - perror("netserver: debug file"); + switch (fork()) { + case -1: + fprintf(stderr, + "%s: fork() error %s (errno %d)\n", + __FUNCTION__, + strerror(errno), + errno); + fflush(stderr); exit(1); + case 0: + + /* perhaps belt and suspenders, but if we dump core, perhaps + better to do so here. we won't worry about the call being + successful though. raj 2011-07-08 */ + chdir(DEBUG_LOG_FILE_DIR); + + /* we are the child. we should get a new "where" to match our new + pid */ + + open_debug_file(); + +#ifdef HAVE_SETSID + setsid(); +#else + setpgrp(); +#endif /* HAVE_SETSID */ + + signal(SIGCLD, SIG_IGN); + + /* ok, we can start accepting control connections now */ + accept_connections(); + + default: + /* we are the parent, nothing to do but exit? */ + exit(0); } + #else - { - - if (child) { - snprintf(&FileName[strlen(FileName)], sizeof(FileName) - strlen(FileName), "_%x", getpid()); - } - - /* Hopefully, by closing stdout & stderr, the subsequent - fopen calls will get mapped to the correct std handles. */ - fclose(stdout); - - if ((where = fopen(FileName, "w")) == NULL) { - perror("netserver: fopen of debug file as new stdout failed!"); - exit(1); + fprintf(where, + "%s called on platform which cannot daemonize\n", + __FUNCTION__); + fflush(where); + exit(1); +#endif /* HAVE_FORK */ +} + +static void +check_if_inetd() { + + if (debug) { + fprintf(where, + "%s: enter\n", + __FUNCTION__); + fflush(where); + } + + if (not_inetd) { + return; + } + else { +#if !defined(WIN32) && !defined(__VMS) + struct sockaddr_storage name; + netperf_socklen_t namelen; + + namelen = sizeof(name); + if (getsockname(0, + (struct sockaddr *)&name, + &namelen) == SOCKET_ERROR) { + not_inetd = 1; } - - fclose(stderr); - - if ((where = fopen(FileName, "w")) == NULL) { - fprintf(stdout, "fopen of debug file as new stderr failed!\n"); - exit(1); + else { + not_inetd = 0; + child = 1; } - } #endif - -#ifndef WIN32 - chmod(DEBUG_LOG_FILE,0644); -#endif - -#if WIN32 - if (child) { - server_sock = (SOCKET)GetStdHandle(STD_INPUT_HANDLE); } -#endif +} + +/* OK, so how does all this work you ask? Well, we are in a maze of + twisty options, all different. Netserver can be invoked as a child + of inetd or the VMS auxiliary server process, or a parent netserver + process. In those cases, we could/should follow the "child" + path. However, there are really two "child" paths through the + netserver code. + + When this netserver is a child of a parent netserver in the + case of *nix, the child process will be created by a + spawn_child_process() in accept_connections() and will not hit the + "child" path here in main(). + + When this netserver is a child of a parent netserver in the case of + windows, the child process will have been spawned via a + Create_Process() call in spawn_child_process() in + accept_connections, but will flow through here again. We rely on + the scan_netserver_args() call to have noticed the magic option + that tells us we are a child process. + + When this netserver is launched from the command line we will first + set-up the listen endpoint(s) for the controll connection. At that + point we decide if we want to and can become our own daemon, or + stay attached to the "terminal." When this happens under *nix, we + will again take a fork() path via daemonize() and will not come + back through main(). If we ever learn how to become our own daemon + under Windows, we will undoubtedly take a Create_Process() path + again and will come through main() once again - that is what the + "daemon" case here is all about. + + It is hoped that this is all much clearer than the old spaghetti + code that netserver had become. raj 2011-07-11 */ + + +int _cdecl +main(int argc, char *argv[]) { - /* if we are not a child of an inetd or the like, then we should - open a socket and hang listens off of it. otherwise, we should go - straight into processing requests. the do_listen() routine will sit - in an infinite loop accepting connections and forking child - processes. the child processes will call process_requests */ - - /* If fd 0 is not a socket then assume we're not being called */ - /* from inetd and start server socket on the default port. */ - /* this enhancement comes from vwelch@ncsa.uiuc.edu (Von Welch) */ - if (not_inetd) { - /* the user specified a port number on the command line */ - set_up_server(local_host_name,listen_port,local_address_family); - } #ifdef WIN32 - /* OK, with Win2003 WinNT's POSIX subsystem is gone, and hence so is */ - /* fork. But hopefully the kernel support will continue to exist */ - /* for some time. We are not counting on the address space */ - /* copy_on_write support, since it isn't exposed except through the */ - /* NT native APIs (which are not public). We will try to use the */ - /* InheritHandles flag in CreateProcess though since this is public */ - /* and is used for more than just POSIX so hopefully it won't go */ - /* away. */ - else if (TRUE) { - if (child) { - process_requests(); - } else { - strncpy(listen_port,TEST_PORT,sizeof(listen_port)); - set_up_server(local_host_name,listen_port,local_address_family); - } + WSADATA wsa_data ; + + /* Initialize the winsock lib do we still want version 2.2? */ + if ( WSAStartup(MAKEWORD(2,2), &wsa_data) == SOCKET_ERROR ){ + printf("WSAStartup() failed : %lu\n", GetLastError()) ; + return -1 ; } -#endif -#if !defined(__VMS) - else if (getsockname(0, &name, &namelen) == SOCKET_ERROR) { - /* we may not be a child of inetd */ - if (errno == ENOTSOCK) { - strncpy(listen_port,TEST_PORT,sizeof(listen_port)); - set_up_server(local_host_name,listen_port,local_address_family); - } +#endif /* WIN32 */ + + /* Save away the program name */ + program = (char *)malloc(strlen(argv[0]) + 1); + if (program == NULL) { + printf("malloc for program name failed!\n"); + return -1 ; } -#endif /* !defined(__VMS) */ - else { - /* we are probably a child of inetd, or are being invoked via the - VMS auxilliarly server mechanism */ -#if !defined(__VMS) - server_sock = 0; -#else - if ( (server_sock = socket(TCPIP$C_AUXS, SOCK_STREAM, 0)) == INVALID_SOCKET ) - { - perror("Failed to grab aux server socket" ); - exit(1); - } + strcpy(program, argv[0]); + + init_netserver_globals(); + + netlib_init(); -#endif /* !defined(__VMS) */ + strncpy(local_host_name,"",sizeof(local_host_name)); + local_address_family = AF_UNSPEC; + strncpy(listen_port,TEST_PORT,sizeof(listen_port)); + + scan_netserver_args(argc, argv); + + check_if_inetd(); + + if (child) { + /* we are the child of either an inetd or parent netserver via + spawning (Windows) rather than fork()ing. if we were fork()ed + we would not be coming through this way. set_server_sock() must + be called before open_debug_file() or there is a chance that + we'll toast the descriptor when we do not wish it. */ + set_server_sock(); + open_debug_file(); process_requests(); } + else if (daemon_parent) { + /* we are the parent daemonized netserver + process. accept_connections() will decide if we want to spawn a + child process */ + accept_connections(); + } + else { + /* we are the top netserver process, so we have to create the + listen endpoint(s) and decide if we want to daemonize */ + setup_listens(local_host_name,listen_port,local_address_family); + if (want_daemonize) { + daemonize(); + } + accept_connections(); + } + + unlink_empty_debug_file(); + #ifdef WIN32 - /* Cleanup the winsock lib */ - WSACleanup(); + WSACleanup(); #endif - return(0); + return 0; + } diff -Nru netperf-2.4.5/src/NetServerDir/sources~ netperf-2.5.0/src/NetServerDir/sources~ --- netperf-2.4.5/src/NetServerDir/sources~ 2007-06-01 22:06:00.000000000 +0000 +++ netperf-2.5.0/src/NetServerDir/sources~ 1970-01-01 00:00:00.000000000 +0000 @@ -1,26 +0,0 @@ -TARGETNAME=netserver -TARGETPATH=OBJ -TARGETTYPE=PROGRAM - -LINKLIBS= \ - $(SDK_LIB_PATH)\kernel32.lib \ - $(SDK_LIB_PATH)\ws2_32.lib \ - $(SDK_LIB_PATH)\wsock32.lib - -USE_CRTDLL=1 -UMTYPE=console - -INCLUDES=$(SDK_INC_PATH);. - -MSC_WARNING_LEVEL=/W3 /WX - -C_DEFINES=$(C_DEFINES) -D_CONSOLE_ -DHAVE_GETADDRINFO -DHAVE_GETNAMEINFO -DSTDC_HEADERS - -SOURCES= \ - ..\netcpu_ntperf.c \ - ..\netlib.c \ - ..\netsh.c \ - ..\nettest_bsd.c \ - inet_ntop.c \ - ..\netserver.c - diff -Nru netperf-2.4.5/src/netsh.c netperf-2.5.0/src/netsh.c --- netperf-2.4.5/src/netsh.c 2008-10-24 23:38:57.000000000 +0000 +++ netperf-2.5.0/src/netsh.c 2011-07-19 20:26:05.000000000 +0000 @@ -1,7 +1,7 @@ #include "netperf_version.h" char netsh_id[]="\ -@(#)netsh.c (c) Copyright 1993-2007 Hewlett-Packard Company. Version 2.4.3pre"; +@(#)netsh.c (c) Copyright 1993-2011 Hewlett-Packard Company. Version 2.5.0"; /****************************************************************/ @@ -39,6 +39,12 @@ #else #include #include +/* while it is unlikely that anyone running Windows 2000 or NT 4 is + going to be trying to compile this, if they are they will want to + define DONT_IPV6 in the sources file */ +#ifndef DONT_IPV6 +#include +#endif #define netperf_socklen_t socklen_t #endif @@ -91,10 +97,11 @@ /* */ /************************************************************************/ - /* Some of the args take optional parameters. Since we are using */ - /* getopt to parse the command line, we will tell getopt that they do */ - /* not take parms, and then look for them ourselves */ -#define GLOBAL_CMD_LINE_ARGS "A:a:b:B:CcdDf:F:H:hi:I:k:K:l:L:n:NO:o:P:p:rt:T:v:VW:w:46" +/* Some of the args take optional parameters. Since we are using + getopt to parse the command line, we will tell getopt that they do + not take parms, and then look for them ourselves */ + +#define GLOBAL_CMD_LINE_ARGS "A:a:b:B:CcdDf:F:H:hi:I:jk:K:l:L:n:NO:o:P:p:rSs:t:T:v:VW:w:46" /************************************************************************/ /* */ @@ -136,7 +143,9 @@ int debug, /* debugging level */ print_headers, /* do/don't display headers */ - verbosity; /* verbosity level */ + verbosity, /* verbosity level */ + keep_histogram, + keep_statistics; /* When specified with -B, this will be displayed at the end of the line for output that does not include the test header. mostly this is @@ -186,6 +195,8 @@ remote_interval_usecs, remote_interval_burst; +int wait_time_secs; + #if defined(WANT_INTERVALS) || defined(WANT_DEMO) int demo_mode; /* are we actually in demo mode? */ @@ -215,8 +226,8 @@ double interval; - /* stuff to control the "width" of the buffer rings for sending and */ - /* receiving data */ + /* stuff to control the "width" of the buffer rings for sending and + receiving data */ int send_width; int recv_width; @@ -234,8 +245,11 @@ \n\ Options:\n\ -h Display this text\n\ + -D Do not daemonize\n\ -d Increase debugging output\n\ + -f Do not spawn chilren for each test, run serially\n\ -L name,family Use name to pick listen address and family for family\n\ + -N No debugging output, even if netperf asks\n\ -p portnum Listen for connect requests on portnum.\n\ -4 Do IPv4\n\ -6 Do IPv6\n\ @@ -266,6 +280,7 @@ -i max,min Specify the max and min number of iterations (15,1)\n\ -I lvl[,intvl] Specify confidence level (95 or 99) (99) \n\ and confidence interval in percentage (10)\n\ + -j Keep additional timing statistics\n\ -l testlen Specify test duration (>0 secs) (<0 bytes|trans)\n\ -L name|ip,fam * Specify the local ip|name and address family\n\ -o send,recv Set the local send,recv buffer offsets\n\ @@ -275,6 +290,8 @@ -p port,lport* Specify netserver port number and/or local port\n\ -P 0|1 Don't/Do display test headers\n\ -r Allow confidence to be hit on result only\n\ + -s seconds Wait seconds between test setup and test start\n\ + -S Set SO_KEEPALIVE on the data connection\n\ -t testname Specify test to perform\n\ -T lcpu,rcpu Request netperf/netserver be bound to local/remote cpu\n\ -v verbosity Specify the verbosity level\n\ @@ -296,11 +313,11 @@ comma-separated pair. This is to retain previous netperf behaviour.\n"; -/* This routine will return the two arguments to the calling routine. */ -/* If the second argument is not specified, and there is no comma, */ -/* then the value of the second argument will be the same as the */ -/* value of the first. If there is a comma, then the value of the */ -/* second argument will be the value of the second argument ;-) */ +/* This routine will return the two arguments to the calling routine. + If the second argument is not specified, and there is no comma, + then the value of the second argument will be the same as the value + of the first. If there is a comma, then the value of the second + argument will be the value of the second argument ;-) */ void break_args(char *s, char *arg1, char *arg2) @@ -321,25 +338,26 @@ while ((*arg1++ = *s++) != '\0'); } -/* break_args_explicit +/* break_args_explicit_sep this routine is somewhat like break_args in that it will separate a - pair of comma-separated values. however, if there is no comma, - this version will not ass-u-me that arg2 should be the same as - arg1. raj 2005-02-04 */ + pair of values using the given separator. however, if there is no + separator this version will not ass-u-me that arg2 should be the + same as arg1. raj 20101129 */ + void -break_args_explicit(char *s, char *arg1, char *arg2) +break_args_explicit_sep(char *s, int sep, char *arg1, char *arg2) { char *ns; - ns = strchr(s,','); + ns = strchr(s,sep); if (ns) { - /* there was a comma arg2 should be the second arg*/ + /* there was a separator arg2 should be the second arg*/ *ns++ = '\0'; while ((*arg2++ = *ns++) != '\0'); } else { - /* there was not a comma, so we should make sure that arg2 is \0 + /* there was no separator, so we should make sure that arg2 is \0 lest something become confused. raj 2005-02-04 */ *arg2 = '\0'; }; @@ -347,6 +365,18 @@ } +/* break_args_explicit - now just a wrapper around a call to + break_args_explicit_sep passing-in a ',' as the separator. raj + 20101129 */ + +void +break_args_explicit(char *s, char *arg1, char *arg2) + +{ + break_args_explicit_sep(s, ',', arg1, arg2); +} + + /* given a string with possible values for setting an address family, convert that into one of the AF_mumble values - AF_INET, AF_INET6, AF_UNSPEC as apropriate. the family_string is compared in a @@ -375,15 +405,20 @@ strstr(temp,"4")) { return(AF_INET); } +#if defined(AF_RDS) + if (strstr(temp,"af_rds") || + strstr(temp,"32")) { + return(AF_RDS); + } +#endif if (strstr(temp,"unspec") || strstr(temp,"0")) { return(AF_UNSPEC); } fprintf(where, - "WARNING! %s not recognized as an address family, using AF_UNPSEC\n", + "WARNING! %s not recognized as an address family, using AF_UNPSEC\n" + "Are you sure netperf was configured for that address family?\n", family_string); - fprintf(where, - "Are you sure netperf was configured for that address family?\n"); fflush(where); return(AF_UNSPEC); } @@ -415,6 +450,57 @@ } int +parse_direction(char direction_string[]) +{ + char arg1[BUFSIZ],arg2[BUFSIZ]; + int left, right; + + if (NULL == direction_string) { + return 0; + } + + if (direction_string[0] == '\0') { + return 0; + } + + /* allow someone to "or" break_args_explicit will split at the first + '|' in the string so we know that arg1 has no '|' in it and arg2 + might */ + break_args_explicit_sep(direction_string,'|',arg1,arg2); + + /* at this point only arg2 could contain a '|' so recurse on that */ + right = parse_direction(arg2); + + /* now we parse the "left side" or arg1 */ + if (arg1[0] == '\0') { + left = 0; + } + else if ((strcasecmp(arg1,"xmit") == 0) || + (strcasecmp(arg1,"send") == 0) || + (strcasecmp(arg1,"stream") == 0) || + (strcasecmp(arg1,"transmit") == 0)) { + left = NETPERF_XMIT; + } + else if ((strcasecmp(arg1,"recv") == 0) || + (strcasecmp(arg1,"receive") == 0) || + (strcasecmp(arg1,"maerts") == 0)) { + /* yes, another magic number... */ + left = NETPERF_RECV; + } + else if (strcasecmp(arg1,"rr") == 0) { + left = NETPERF_XMIT|NETPERF_RECV; + } + else { + /* we now "ass-u-me" it is a number that can be parsed by strtol() + */ + left = strtol(arg1,NULL,0); + } + + return (left | right); + +} + +int parse_protocol(char protocol_string[]) { char temp[10]; @@ -434,6 +520,7 @@ return IPPROTO_TCP; } #endif + #ifdef IPPROTO_UDP if (!strcasecmp(temp,"udp")) { socket_type = SOCK_DGRAM; @@ -452,12 +539,18 @@ return IPPROTO_SDP; } #endif -#ifdef IPPROTO_DCCP +#if defined(IPPROTO_DCCP) && defined(SOCK_DCCP) if (!strcasecmp(temp,"dccp")) { socket_type = SOCK_DCCP; return IPPROTO_DCCP; } #endif +#ifdef IPPROTO_UDPLITE + if (!strcasecmp(temp,"udplite")) { + socket_type = SOCK_DGRAM; + return IPPROTO_UDPLITE; + } +#endif return IPPROTO_IP; } @@ -466,37 +559,42 @@ set_defaults() { - /* stuff to say where this test is going */ + /* stuff to say where this test is going */ strcpy(host_name,""); /* remote host name or ip addr */ strcpy(local_host_name,""); /* we want it to be INADDR_ANY */ - strcpy(test_name,"TCP_STREAM"); /* which test to run */ - strncpy(test_port,"12865",PORTBUFSIZE); /* where is the test waiting */ + strcpy(test_name,"TCP_STREAM"); /* which test to run */ + strncpy(test_port,"12865",PORTBUFSIZE); /* where is the test + waiting */ strncpy(local_test_port,"0",PORTBUFSIZE);/* INPORT_ANY as it were */ address_family = AF_UNSPEC; local_address_family = AF_UNSPEC; - /* output controlling variables */ - debug = 0;/* debugging level */ - print_headers = 1;/* do print test headers */ - verbosity = 1;/* verbosity level */ + /* output controlling variables */ + debug = 0;/* debugging */ + print_headers = 1;/* do print test headers */ + verbosity = 1;/* verbosity level */ + keep_histogram = 0; + keep_statistics = 0; + /* cpu variables */ - local_cpu_usage = 0;/* measure local cpu */ - remote_cpu_usage = 0;/* what do you think ;-) */ + local_cpu_usage = 0;/* measure local cpu */ + remote_cpu_usage = 0;/* what do you think ;-) */ local_cpu_rate = (float)0.0; remote_cpu_rate = (float)0.0; - /* the end-test conditions for the tests - either transactions, bytes, */ - /* or time. different vars used for clarity - space is cheap ;-) */ - test_time = 10; /* test ends by time */ - test_bytes = 0; /* test ends on byte count */ - test_trans = 0; /* test ends on tran count */ + /* the end-test conditions for the tests - either transactions, + bytes, or time. different vars used for clarity - space is cheap + ;-) */ + test_time = 10; /* test ends by time */ + test_bytes = 0; /* test ends on byte count */ + test_trans = 0; /* test ends on tran count */ - /* the alignment conditions for the tests */ - local_recv_align = 8; /* alignment for local receives */ - local_send_align = 8; /* alignment for local sends */ + /* the alignment conditions for the tests */ + local_recv_align = 8; /* alignment for local receives */ + local_send_align = 8; /* alignment for local sends */ remote_recv_align = 8; /* alignment for remote receives*/ - remote_send_align = 8; /* alignment for remote sends */ + remote_send_align = 8; /* alignment for remote sends */ /* rate controlling stuff, taken out of the #ifdef for omni */ interval_usecs = 0; @@ -505,6 +603,10 @@ remote_interval_usecs = 0; remote_interval_burst = 0; +/* wait time between control/data connection establishment and start + of data traffic */ + wait_time_secs = 0; + #ifdef DIRTY /* dirty and clean cache stuff */ loc_dirty_count = 0; @@ -534,15 +636,31 @@ void print_netserver_usage() { - fwrite(netserver_usage, sizeof(char), strlen(netserver_usage), stderr); + fprintf(stderr, "%s", netserver_usage); } void print_netperf_usage() { - fwrite(netperf_usage1, sizeof(char), strlen(netperf_usage1), stderr); - fwrite(netperf_usage2, sizeof(char), strlen(netperf_usage2), stderr); + fprintf(stderr, "%s%s", netperf_usage1, netperf_usage2); +} + +/* convert the specified string to upper case if we know how */ +static void +convert_to_upper(char *source) +{ +#if defined(HAVE_TOUPPER) + int i,length; + + length = strlen(source); + + for (i=0; i < length; i++) { + source[i] = toupper(source[i]); + } +#endif + return; + } void @@ -561,8 +679,8 @@ program = (char *)malloc(strlen(argv[0]) + 1); if (program == NULL) { - printf("malloc(%d) failed!\n", strlen(argv[0]) + 1); - exit(1); + printf("malloc() to store program name failed!\n"); + exit(-1); } strcpy(program, argv[0]); @@ -588,11 +706,11 @@ } *--p = 0; - /* Go through all the command line arguments and break them */ - /* out. For those options that take two parms, specifying only */ - /* the first will set both to that value. Specifying only the */ - /* second will leave the first untouched. To change only the */ - /* first, use the form first, (see the routine break_args.. */ + /* Go through all the command line arguments and break them out. For + those options that take two parms, specifying only the first will + set both to that value. Specifying only the second will leave the + first untouched. To change only the first, use the form first, + (see the routine break_args.. */ while ((c= getopt(argc, argv, GLOBAL_CMD_LINE_ARGS)) != EOF) { switch (c) { @@ -619,9 +737,8 @@ remote_recv_align = convert(arg2); break; case 'c': - /* measure local cpu usage please. the user */ - /* may have specified the cpu rate as an */ - /* optional parm */ + /* measure local cpu usage please. the user may have specified + the cpu rate as an optional parm */ if (argv[optind] && isdigit((unsigned char)argv[optind][0])){ /* there was an optional parm */ local_cpu_rate = (float)atof(argv[optind]); @@ -659,9 +776,9 @@ } } #else - printf("Sorry, Demo Mode not configured into this netperf.\n"); - printf("please consider reconfiguring netperf with\n"); - printf("--enable-demo=yes and recompiling\n"); + printf("Sorry, Demo Mode not configured into this netperf.\n" + "Please consider reconfiguring netperf with\n" + "--enable-demo=yes and recompiling\n"); #endif break; case 'f': @@ -701,7 +818,7 @@ } if((confidence_level != 95) && (confidence_level != 99)){ printf("Only 95%% and 99%% confidence level is supported\n"); - exit(1); + exit(-1); } if (arg2[0] ) { /* it doesn't make much sense to use convert() here so just @@ -718,6 +835,10 @@ value */ if (interval == 0.0) interval = 0.05; /* five percent */ break; + case 'j': + keep_histogram = 1; + keep_statistics = 1; + break; case 'k': /* local dirty and clean counts */ #ifdef DIRTY @@ -779,13 +900,24 @@ meaningful if cpu util is enabled */ result_confidence_only = 1; break; + case 'S': + /* the user wishes us to set SO_KEEPALIVE */ + want_keepalive = 1; + break; + case 's': + /* the user wishes us to sleep/pause some length of time before + actually starting the test */ + wait_time_secs = convert(optarg); + break; case 't': - /* set the test name */ - strcpy(test_name,optarg); + /* set the test name and shift it to upper case so we don't have + to worry about compares on things like substrings */ + strncpy(test_name,optarg,sizeof(test_name)-1); + convert_to_upper(test_name); break; case 'T': - /* We want to set the processor on which netserver or netperf */ - /* will run */ + /* We want to set the processor on which netserver or netperf + will run */ break_args(optarg,arg1,arg2); if (arg1[0]) { local_proc_affinity = convert(arg1); @@ -797,8 +929,8 @@ cpu_binding_requested = 1; break; case 'W': - /* set the "width" of the user space data buffer ring. This will */ - /* be the number of send_size buffers malloc'd in the tests */ + /* set the "width" of the user space data buffer ring. This will + be the number of send_size buffers malloc'd in the tests */ break_args(optarg,arg1,arg2); if (arg1[0]) send_width = convert(arg1); @@ -853,10 +985,10 @@ break; case 'w': /* We want to send requests at a certain wate. Remember that - there are 1000000 usecs in a second, and that the packet rate is - expressed in packets per millisecond. shuffle the #ifdef around - a bit to deal with both netperf and netserver possibly doing - intervals with omni tests */ + there are 1000000 usecs in a second, and that the packet rate + is expressed in packets per millisecond. shuffle the #ifdef + around a bit to deal with both netperf and netserver possibly + doing intervals with omni tests */ break_args_explicit(optarg,arg1,arg2); if (arg1[0]) { #ifdef WANT_INTERVALS @@ -881,7 +1013,8 @@ if (arg1[0]) { #ifdef WANT_INTERVALS interval_burst = convert(arg1); - /* set a default in case the user does not include the -w option */ + /* set a default in case the user does not include the -w + option */ if (interval_usecs == 0) { interval_wate = 1; interval_usecs = 1000; @@ -933,10 +1066,14 @@ } /* ok, what should our default hostname and local binding info be? */ + if ('\0' == host_name[0]) { /* host_name was not set */ switch (address_family) { case AF_INET: +#if defined(AF_RDS) + case AF_RDS: +#endif strcpy(host_name,"localhost"); break; case AF_UNSPEC: @@ -945,6 +1082,9 @@ switch (local_address_family) { case AF_INET: case AF_UNSPEC: +#if defined(AF_RDS) + case AF_RDS: +#endif strcpy(host_name,"localhost"); break; #if defined(AF_INET6) @@ -968,19 +1108,38 @@ address_family); exit(-1); } + } else { + /* resolve the hostname and pull the address family from the + addrinfo */ + struct addrinfo *ai; + + ai = resolve_host(host_name, NULL, address_family); + if (!ai) { + printf("Netperf could not resolve %s as a host name\n", host_name); + exit(-1); + } + address_family = ai->ai_family; + freeaddrinfo(ai); } - + + /* now, having established the name to which the control will connect, from what should it come? */ if ('\0' == local_host_name[0]) { switch (local_address_family) { case AF_INET: +#if defined(AF_RDS) + case AF_RDS: +#endif strcpy(local_host_name,"0.0.0.0"); break; case AF_UNSPEC: switch (address_family) { case AF_INET: case AF_UNSPEC: +#if defined(AF_RDS) + case AF_RDS: +#endif strcpy(local_host_name,"0.0.0.0"); break; #if defined(AF_INET6) @@ -1019,19 +1178,28 @@ } /* parsing test-specific options used to be conditional on there - being a "--" in the option stream. however, some of the tests - have other initialization happening in their "scan" routines so we - want to call them regardless. raj 2005-02-08 */ - if ((strcasecmp(test_name,"TCP_STREAM") == 0) || + being a "--" in the option stream. however, some of the tests + have other initialization happening in their "scan" routines so + we want to call them regardless. raj 2005-02-08 */ + /* while the parsing of the command line will upshift the test name, + since we don't know that there will always be a way to do so? we + will retain for now the strcasecmp calls rather than switch to + strcmp. raj 20101220 */ + if ( +#ifndef WANT_MIGRATION + (strcasecmp(test_name,"TCP_STREAM") == 0) || + (strcasecmp(test_name,"TCP_MAERTS") == 0) || + (strcasecmp(test_name,"TCP_RR") == 0) || + (strcasecmp(test_name,"TCP_CRR") == 0) || + (strcasecmp(test_name,"UDP_STREAM") == 0) || + (strcasecmp(test_name,"UDP_RR") == 0) || +#endif #ifdef HAVE_ICSC_EXS - (strcasecmp(test_name,"EXS_TCP_STREAM") == 0) || + (strcasecmp(test_name,"EXS_TCP_STREAM") == 0) || #endif /* HAVE_ICSC_EXS */ #ifdef HAVE_SENDFILE (strcasecmp(test_name,"TCP_SENDFILE") == 0) || #endif /* HAVE_SENDFILE */ - (strcasecmp(test_name,"TCP_MAERTS") == 0) || - (strcasecmp(test_name,"TCP_RR") == 0) || - (strcasecmp(test_name,"TCP_CRR") == 0) || (strcasecmp(test_name,"TCP_CC") == 0) || (strcasecmp(test_name,"TCP_MSS") == 0) || #ifdef DO_1644 @@ -1040,8 +1208,7 @@ #ifdef DO_NBRR (strcasecmp(test_name,"TCP_TRR") == 0) || #endif /* DO_NBRR */ - (strcasecmp(test_name,"UDP_STREAM") == 0) || - (strcasecmp(test_name,"UDP_RR") == 0)) + (0)) { scan_sockets_args(argc, argv); } @@ -1097,6 +1264,14 @@ #ifdef WANT_OMNI else if ((strcasecmp(test_name,"OMNI") == 0) || +#ifdef WANT_MIGRATION + (strcasecmp(test_name,"TCP_STREAM") == 0) || + (strcasecmp(test_name,"TCP_MAERTS") == 0) || + (strcasecmp(test_name,"TCP_RR") == 0) || + (strcasecmp(test_name,"TCP_CRR") == 0) || + (strcasecmp(test_name,"UDP_STREAM") == 0) || + (strcasecmp(test_name,"UDP_RR") == 0) || +#endif (strcasecmp(test_name,"UUID") == 0)) { scan_omni_args(argc, argv); } diff -Nru netperf-2.4.5/src/netsh.h netperf-2.5.0/src/netsh.h --- netperf-2.4.5/src/netsh.h 2008-02-19 22:48:52.000000000 +0000 +++ netperf-2.5.0/src/netsh.h 2011-02-10 17:04:11.000000000 +0000 @@ -1,5 +1,5 @@ /* - Copyright (C) 1993,1995 Hewlett-Packard Company + Copyright (C) 1993-2010 Hewlett-Packard Company */ /* libraried performance include file */ @@ -28,6 +28,20 @@ #define REM_RECV_ALIGN 4 /* alignment for remote receive */ #define REM_SEND_ALIGN 4 /* alignment for remote sends */ +/* which way are we going and what are we doing in this handbasket?-) */ +#define NETPERF_XMIT 0x2 +#define NETPERF_RECV 0x4 + +#define NETPERF_IS_RR(x) (((x & NETPERF_XMIT) && (x & NETPERF_RECV)) || \ + (!((x & NETPERF_XMIT) || (x & NETPERF_RECV)))) + +#define NETPERF_RECV_ONLY(x) ((x & NETPERF_RECV) && !(x & NETPERF_XMIT)) + +#define NETPERF_XMIT_ONLY(x) ((x & NETPERF_XMIT) && !(x & NETPERF_RECV)) + +#define NETPERF_CC(x) (!(x & NETPERF_XMIT) && !(x & NETPERF_RECV)) + + /* misc defines for the hell of it */ #ifndef MAXLONG #define MAXLONG 4294967295UL @@ -35,6 +49,9 @@ #ifdef WANT_DCCP +/* include netinet/in.h to see if SOCK_DCCP and IPPROTO_DCCP are there */ +#include + #ifndef SOCK_DCCP #define DCCP_WARNING #define SOCK_DCCP 6 @@ -70,18 +87,22 @@ extern int parse_address_family(char family_string[]); extern int parse_socket_type(char socket_string[]); extern int parse_protocol(char protocol_string[]); +extern int parse_direction(char direction_string[]); extern void set_defaults(); extern void scan_cmd_line(int argc, char *argv[]); extern void dump_globals(); extern void break_args(char *s, char *arg1, char *arg2); extern void break_args_explicit(char *s, char *arg1, char *arg2); +extern void break_args_explicit_sep(char *s, int sep, char *arg1, char *arg2); extern void print_netserver_usage(); /* output controlling variables */ extern int - debug, /* debugging level */ - print_headers, /* do/don't print test headers */ - verbosity; /* verbosity level */ + debug, /* debugging level */ + print_headers, /* do/don't print test headers */ + verbosity, /* verbosity level */ + keep_histogram, /* do we keep a histogram of interesting times? */ + keep_statistics; /* do we keep/calculate expensive statistics? */ /* the end-test conditions for the tests - either transactions, bytes, */ /* or time. different vars used for clarity - space is cheap ;-) */ @@ -91,6 +112,10 @@ test_bytes, /* test ends on byte count */ test_trans; /* test ends on tran count */ +/* wait time between control/data connection establishment and start + of data traffic */ +extern int wait_time_secs; + /* the alignment conditions for the tests */ extern int local_recv_align, /* alignment for local receives */ diff -Nru netperf-2.4.5/src/netslot_linux.c netperf-2.5.0/src/netslot_linux.c --- netperf-2.4.5/src/netslot_linux.c 2008-03-06 01:22:51.000000000 +0000 +++ netperf-2.5.0/src/netslot_linux.c 2011-02-10 17:04:11.000000000 +0000 @@ -17,7 +17,7 @@ FILE *address_file; char *myfpath; char *this_tok; - char *last_tok; + char *last_tok = NULL; /* so, are we at a point in the tree where the basename is "address" ? */ @@ -69,7 +69,8 @@ { char *myfpath; char *this_tok; - char *last_tok; + char *last_tok = NULL; + if (strcmp(interface_match,fpath + ftwbuf->base) == 0) { myfpath = strdup(fpath); if (myfpath == NULL) { @@ -127,6 +128,7 @@ return ret; } + void find_interface_ids(char *interface_name, int *vendor, int *device, int *sub_vend, int *sub_dev) { @@ -135,23 +137,19 @@ char sysfile[128]; /* gotta love constants */ /* first the vendor id */ - ret = snprintf(sysfile,127,"/sys/class/net/%s/device/vendor",interface_name); - sysfile[128] = 0; + ret = snprintf(sysfile,128,"/sys/class/net/%s/device/vendor",interface_name); *vendor = get_val_from_file(sysfile); /* next the device */ - ret = snprintf(sysfile,127,"/sys/class/net/%s/device/device",interface_name); - sysfile[128] = 0; + ret = snprintf(sysfile,128,"/sys/class/net/%s/device/device",interface_name); *device = get_val_from_file(sysfile); /* next the subsystem vendor */ - ret = snprintf(sysfile,127,"/sys/class/net/%s/device/subsystem_vendor",interface_name); - sysfile[128] = 0; + ret = snprintf(sysfile,128,"/sys/class/net/%s/device/subsystem_vendor",interface_name); *sub_vend = get_val_from_file(sysfile); /* next the subsystem device */ - ret = snprintf(sysfile,127,"/sys/class/net/%s/device/subsystem_device",interface_name); - sysfile[128] = 0; + ret = snprintf(sysfile,128,"/sys/class/net/%s/device/subsystem_device",interface_name); *sub_dev = get_val_from_file(sysfile); } diff -Nru netperf-2.4.5/src/netslot_ux1131.c netperf-2.5.0/src/netslot_ux1131.c --- netperf-2.4.5/src/netslot_ux1131.c 1970-01-01 00:00:00.000000000 +0000 +++ netperf-2.5.0/src/netslot_ux1131.c 2011-02-10 17:04:11.000000000 +0000 @@ -0,0 +1,134 @@ +/* Copyright 2010, Hewlett-Packard Company */ + +#include +#include +#include +#include +#include +#include +#include + +/* + * No OLAR headerfile on target system! ;-( Yes, this means that these + * interfaces are NOT DOCUMENTED FOR PUBLIC USE, which means you don't + * really see what you are reading here, and if you attempt to use it + * elsewhere, no one will profess any knowledge of what you are doing. + * You will be utterly and completely on your own. + */ +typedef uint64_t olar_io_slot_t; + +typedef struct olar_error_info { + int oe_err; + char oe_hwpath[MAX_HW_PATH_STR]; +} olar_err_t; + +#define MAX_SLOT_ID_LEN 30 + +char * get_hw_path_from_if(char *if_name); + +char * +find_interface_slot(char *interface_name) { + + char *hw_str; + olar_io_slot_t slot_id; + olar_err_t oe; + char slot_str[MAX_SLOT_ID_LEN]; + + /* Open dev_config for libIO communication */ + if ( io_init(O_RDONLY) == IO_ERROR ) { + return strdup("io_init"); + } + + hw_str = get_hw_path_from_if(interface_name); + + /* close dev_config */ + io_end(); + + slot_id = 0; + if ( olar_path_to_id(hw_str,&slot_id,&oe) == -1 ) { + /* since the call failed, lets give them the HW path as a + consolation prize. we will ass-u-me that the caller will be + freeing the string we give him anyway. */ + if (debug) { + fprintf(where, + "%s olar_path_to_id hw_str %s oe_err %d path %s\n", + __func__, + hw_str, + oe.oe_err, + oe.oe_hwpath); + fflush(where); + } + return hw_str; + } + + if ( olar_slot_id_to_string(slot_id,slot_str,30) == -1 ) { + /* do the same thing here, give them the hw path if this call + fails */ + if (debug) { + fprintf(where, + "%s olar_slot_id_to_string slot_id %" PRId64 "\n", + slot_id); + fflush(where); + } + return hw_str; + } + + /* we can give them the honest to goodness slot id as a string now, + so let us free that which we should free */ + free(hw_str); + + return strdup(slot_str); +} + +/* + * Returns the H/W path string corresponding to the lan if name + * + * Assumption: if_name is of type lan%ppid + * Not known to work with Logical,Vlan etc.. + * + */ +char * get_hw_path_from_if(char *if_name) +{ + int instance; + io_token_t tok; + hw_path_t hw; + char *hwstr; + + sscanf(if_name,"lan%d",&instance); + + if ( (tok = io_search(NULL,S_IOTREE_EXT,0,"class", "lan", + "instance", &instance, NULL)) == NULL ) { + /* we don't want extraneous output on netserver side - at some + point we can teach it about "where" */ + /* io_error("Could not find H/w path"); */ + return(NULL); + } + + if ( io_node_to_hw_path(tok, &hw) != IO_SUCCESS ) { + /* io_error("io_node_to_hw_path failed"); */ + return NULL; + } + + hwstr = (char *) malloc (MAX_HW_PATH_STR * sizeof(char)); + if (hwstr == NULL ) { + /* perror("malloc failed in get_hw_path_from_if"); */ + return NULL; + } + + if (io_hw_path_to_str(hwstr,&hw) == IO_ERROR ) { + /* io_error("io_hw_path_to_str failed"); */ + free(hwstr); + return NULL; + } + + return hwstr; +} + +void +find_interface_ids(char *interface_name, int *vendor, int *device, int *sub_vend, int *sub_dev) { + *vendor = 0; + *device = 0; + *sub_vend = 0; + *sub_dev = 0; + return; +} diff -Nru netperf-2.4.5/src/netsys_linux.c netperf-2.5.0/src/netsys_linux.c --- netperf-2.4.5/src/netsys_linux.c 2008-03-14 00:13:27.000000000 +0000 +++ netperf-2.5.0/src/netsys_linux.c 2011-07-11 21:54:11.000000000 +0000 @@ -15,8 +15,6 @@ find_cpu_model(char **cpu_model) { char linebuf[256]; char *cret; - int ret; - int c; FILE *proccpu; @@ -41,19 +39,19 @@ target[strlen(target)-1] = 0; /* and four to go! */ *cpu_model = strdup(target+1); + fclose(proccpu); return; } } } while (!feof(proccpu)); *cpu_model = strdup("model_name"); + fclose(proccpu); } static int find_cpu_freq() { char linebuf[256]; char *cret; - int ret; - int c; FILE *proccpu; @@ -71,10 +69,12 @@ if (strstr(linebuf,"cpu MHz") != NULL) { target = strtok(linebuf,":"); target = strtok(NULL,":"); + fclose(proccpu); return rint(strtod(target+1,NULL)); } } } while (!feof(proccpu)); + fclose(proccpu); return -1; } @@ -109,7 +109,6 @@ void find_system_info(char **system_model, char **cpu_model, int *cpu_frequency) { - int ret; find_system_model(system_model); find_cpu_model(cpu_model); diff -Nru netperf-2.4.5/src/nettest_bsd.c netperf-2.5.0/src/nettest_bsd.c --- netperf-2.4.5/src/nettest_bsd.c 2009-06-04 00:31:15.000000000 +0000 +++ netperf-2.5.0/src/nettest_bsd.c 2011-07-12 22:12:46.000000000 +0000 @@ -1,6 +1,6 @@ #ifndef lint char nettest_id[]="\ -@(#)nettest_bsd.c (c) Copyright 1993-2008 Hewlett-Packard Co. Version 2.4.5"; +@(#)nettest_bsd.c (c) Copyright 1993-2011 Hewlett-Packard Co. Version 2.5.0"; #endif /* lint */ @@ -96,9 +96,6 @@ #include #endif /* NOSTDLIBH */ -#ifdef WANT_SCTP -#include -#endif #ifndef WIN32 #if !defined(__VMS) && !defined(MSDOS) @@ -107,6 +104,11 @@ #include #include #include + +#ifdef HAVE_NETINET_SCTP_H +#include +#endif + #include #include #else /* WIN32 */ @@ -214,7 +216,12 @@ rem_sndavoid, /* avoid send copies remotely */ rem_rcvavoid, /* avoid recv_copies remotely */ local_connected = 0, /* local socket type, connected/non-connected */ - remote_connected = 0; /* remote socket type, connected/non-connected */ + remote_connected = 0, /* remote socket type, connected/non-connected */ + routing_allowed = 1; /* set/clear SO_DONTROUTE on data socket */ + +int multicast_ttl = -1; /* should we set the multicast TTL to a value? */ + +int want_keepalive = 0; #ifdef WANT_HISTOGRAM #ifdef HAVE_GETHRTIME @@ -451,20 +458,22 @@ switch(nf) { case NF_INET: return AF_INET; - break; case NF_UNSPEC: return AF_UNSPEC; - break; case NF_INET6: #if defined(AF_INET6) return AF_INET6; #else return AF_UNSPEC; #endif - break; + case NF_RDS: +#if defined(AF_RDS) + return AF_RDS; +#else + return AF_UNSPEC; +#endif default: return AF_UNSPEC; - break; } } @@ -474,18 +483,18 @@ switch(af) { case AF_INET: return NF_INET; - break; case AF_UNSPEC: return NF_UNSPEC; - break; #if defined(AF_INET6) case AF_INET6: return NF_INET6; - break; +#endif +#if defined(AF_RDS) + case AF_RDS: + return NF_RDS; #endif default: return NF_UNSPEC; - break; } } @@ -513,6 +522,10 @@ return SOCK_DCCP; break; #endif +#ifdef SOCK_SEQPACKET + case NST_SEQPACKET: + return NST_SEQPACKET; +#endif default: return -1; } @@ -537,6 +550,10 @@ return NST_DCCP; break; #endif +#ifdef SOCK_SEQPACKET + case SOCK_SEQPACKET: + return NST_SEQPACKET; +#endif default: return NST_UNKN; } @@ -560,6 +577,10 @@ return "DCCP"; break; #endif +#ifdef SOCK_SEQPACKET + case SOCK_SEQPACKET: + return "Seqpacket"; +#endif default: return "Unknown"; } @@ -576,6 +597,10 @@ case IPPROTO_UDP: return "UDP"; #endif +#ifdef IPPROTO_UDPLITE + case IPPROTO_UDPLITE: + return "UDPLite"; +#endif #ifdef IPPROTO_SCTP case IPPROTO_SCTP: return "SCTP"; @@ -588,6 +613,10 @@ case IPPROTO_SDP: return "SDP"; #endif +#ifdef IPPROTO_IP + case IPPROTO_IP: + return "IP Default"; +#endif default: return "Unknown Protocol"; } @@ -674,7 +703,7 @@ hints.ai_family = family; hints.ai_socktype = type; hints.ai_protocol = protocol; - hints.ai_flags = flags|AI_CANONNAME; + hints.ai_flags = flags|AI_CANONNAME|AI_ADDRCONFIG; count = 0; do { @@ -712,7 +741,7 @@ that we did this so the code for the Solaris kludge can do the fix-up for us. also flip error over to EAI_AGAIN and make sure we don't "count" this time around the loop. */ -#if defined(IPPROTO_DCCP) +#if defined(IPPROTO_DCCP) && defined(SOCK_DCCP) /* only tweak on this one the second time around, after we've kludged the ai_protocol field */ if ((hints.ai_socktype == SOCK_DCCP) && @@ -746,12 +775,11 @@ if (error) { fprintf(where, - "complete_addrinfo: could not resolve '%s' port '%s' af %d", + "complete_addrinfo: could not resolve '%s' port '%s' af %d" + "\n\tgetaddrinfo returned %d %s\n", hostname, port, - family); - fprintf(where, - "\n\tgetaddrinfo returned %d %s\n", + family, error, gai_strerror(error)); fflush(where); @@ -802,10 +830,8 @@ !(change_warning_displayed & CHANGED_SOCK_TYPE)) { change_warning_displayed |= CHANGED_SOCK_TYPE; fprintf(where, - "WARNING! getaddrinfo returned a socket type which did not\n"); - fprintf(where, - "match the requested type. Please contact your vendor for\n"); - fprintf(where, + "WARNING! getaddrinfo returned a socket type which did not\n" + "match the requested type. Please contact your vendor for\n" "a fix to this bug in getaddrinfo()\n"); fflush(where); } @@ -817,18 +843,17 @@ this behaviour we will only emit this warning if debug is set under Solaris and will continue to emit it under any circumstance on other platforms should it arise. raj 2009-06-03 */ + /* since it has now been two years since that bug was filed, it + should be resolved by now, so the "out" given to Sun should no + longer be necessary. either folks are running with the fix or + they need to get the fix. raj 2011-07-06 */ if ((change_info & CHANGED_PROTOCOL) && !(change_warning_displayed & CHANGED_PROTOCOL) && -#ifdef __sun - (debug) && -#endif (hints.ai_protocol != 0)) { change_warning_displayed |= CHANGED_PROTOCOL; fprintf(where, - "WARNING! getaddrinfo returned a protocol other than the\n"); - fprintf(where, - "requested protocol. Please contact your vendor for\n"); - fprintf(where, + "WARNING! getaddrinfo returned a protocol other than the\n" + "requested protocol. Please contact your vendor for\n" "a fix to this bug in getaddrinfo()\n"); fflush(where); } @@ -837,8 +862,7 @@ !(change_warning_displayed & CHANGED_SCTP)) { change_warning_displayed |= CHANGED_SCTP; fprintf(where, - "WARNING! getaddrinfo on this platform does not accept IPPROTO_SCTP!\n"); - fprintf(where, + "WARNING! getaddrinfo on this platform does not accept IPPROTO_SCTP!\n" "Please contact your vendor for a fix to this bug in getaddrinfo().\n"); fflush(where); } @@ -847,8 +871,7 @@ !(change_warning_displayed & CHANGED_DCCP)) { change_warning_displayed |= CHANGED_DCCP; fprintf(where, - "WARNING! getaddrinfo on this platform does not accept IPPROTO_DCCP!\n"); - fprintf(where, + "WARNING! getaddrinfo on this platform does not accept IPPROTO_DCCP!\n" "Please contact your vendor for a fix to this bug in getaddrinfo().\n"); fflush(where); } @@ -864,6 +887,10 @@ void complete_addrinfos(struct addrinfo **remote,struct addrinfo **local, char remote_host[], int type, int protocol, int flags) { + if (remote_data_family == AF_UNSPEC) { + remote_data_family = control_family; + } + *remote = complete_addrinfo(remote_host, remote_data_address, remote_data_port, @@ -998,11 +1025,15 @@ set_port_number(struct addrinfo *res, unsigned short port) { switch(res->ai_family) { - case AF_INET: { - struct sockaddr_in *foo = (struct sockaddr_in *)res->ai_addr; - foo->sin_port = htons(port); - break; - } + case AF_INET: +#if defined(AF_RDS) + case AF_RDS: +#endif + { + struct sockaddr_in *foo = (struct sockaddr_in *)res->ai_addr; + foo->sin_port = htons(port); + break; + } #if defined(AF_INET6) case AF_INET6: { struct sockaddr_in6 *foo = (struct sockaddr_in6 *)res->ai_addr; @@ -1027,6 +1058,9 @@ memset(sockaddr,0,sizeof(struct sockaddr_storage)); switch (family) { +#if defined(AF_RDS) + case AF_RDS: +#endif case AF_INET: { struct sockaddr_in *foo = (struct sockaddr_in *)sockaddr; foo->sin_port = htons((unsigned short) port); @@ -1075,6 +1109,9 @@ } switch(family) { +#if defined(AF_RDS) + case AF_RDS: +#endif case AF_INET: { *port = ntohs(sin->sin_port); memcpy(addr,&(sin->sin_addr),sizeof(sin->sin_addr)); @@ -1246,7 +1283,7 @@ for SCTP, but just in case there is an SCTP implementation out there _without_ SCTP_NODELAY... raj 2005-03-15 */ /* change this to IPPROTO_SCTP rather than WANT_SCTP to better fit - with the modus operendi (sp) of the new "omni" tests. raj + with the modus operandi of the new "omni" tests. raj 2008-02-04 */ #if defined(IPPROTO_SCTP) && defined(SCTP_NODELAY) if (IPPROTO_SCTP == res->ai_protocol) { @@ -1280,24 +1317,52 @@ #if defined(TCP_CORK) - if (loc_tcpcork > 0) { - /* the user wishes for us to set TCP_CORK on the socket */ - int one = 1; - if (setsockopt(temp_socket, - getprotobyname("tcp")->p_proto, - TCP_CORK, - (char *)&one, - sizeof(one)) == SOCKET_ERROR) { - perror("netperf: create_data_socket: tcp_cork"); - exit(1); - } + if (loc_tcpcork > 0) { + /* the user wishes for us to set TCP_CORK on the socket */ + int one = 1; + if (setsockopt(temp_socket, + getprotobyname("tcp")->p_proto, + TCP_CORK, + (char *)&one, + sizeof(one)) == SOCKET_ERROR) { + perror("netperf: create_data_socket: tcp_cork"); + exit(1); + } + if (debug) { + fprintf(where,"create_data_socket: tcp_cork...\n"); + } + } + +#endif /* TCP_CORK */ + + /* well, after Knuth only knows how many years, I have finally + decided to enable setting SO_KEEPALIVE on the data socket. 99 + times out of 10 this should not be necessary, but that 100th time, + perhaps when netperf is being (ab)used by functional testers, may + benefit from it. And it may help clean-up some lingering + netservers from time to time. raj 2011-06-29 */ + +#if defined(SO_KEEPALIVE) + + if (want_keepalive) { + if (setsockopt(temp_socket, + SOL_SOCKET, + SO_KEEPALIVE, + (const char *)&on, + sizeof(on)) < 0) { if (debug) { - fprintf(where,"create_data_socket: tcp_cork...\n"); + fprintf(where, + "%s: unable to set SO_KEEPALIVE on data socket: %s (errno %d)\n", + __FUNCTION__, + strerror(errno), + errno); + fflush(where); } } - -#endif /* TCP_CORK */ + } +#endif /* SO_KEEPALIVE */ + /* since some of the UDP tests do not do anything to cause an implicit bind() call, we need to be rather explicit about our bind() call here. even if the address and/or the port are zero @@ -1343,7 +1408,31 @@ fflush(where); } } - + + /* this one is a slightly grudgingly added backside covering for + those folks who (ab)use netperf as a functional testing tool, and + further compound that error by running tests on systems also + connected to their site networks, and then compound it even + further compound it by running UDP_STREAM tests over links that + generate link-down events and so cause the traffic to be sent out + the default route into their corporate network... frankly such + people should not be allowed to run netperf in the first place + but there we are... raj 20091026 */ + +#if defined (SO_DONTROUTE) + if (!routing_allowed) { + if (setsockopt(temp_socket, + SOL_SOCKET, + SO_DONTROUTE, + (char *)&one, + sizeof(one)) == SOCKET_ERROR) { + fprintf(where, + "netperf: create_data_socket: so_dontroute: errno %d\n", + errno); + fflush(where); + } + } +#endif return(temp_socket); @@ -1455,7 +1544,7 @@ /* the headers. we know some of it here, but not all, so we will */ /* only print the test title here and will print the results */ /* titles after the test is finished */ - fprintf(where,test_name); + fprintf(where,"%s",test_name); address_buf[0] = '\0'; inet_ntop(source->ai_family,get_address_address(source),address_buf,sizeof(address_buf)); fprintf(where, @@ -1527,13 +1616,15 @@ } +/* if WANT_MIGRATION is defined, we will use the send_tcp_stream() + call in src/nettest_omni.c */ +#ifndef WANT_MIGRATION /* This routine implements the TCP unidirectional data transfer test */ /* (a.k.a. stream) for the sockets interface. It receives its */ /* parameters via global variables from the shell and writes its */ /* output to the standard output. */ - void send_tcp_stream(char remote_host[]) { @@ -1592,11 +1683,16 @@ int bytes_remaining; int tcp_mss = -1; /* possibly uninitialized on printf far below */ - /* with links like fddi, one can send > 32 bits worth of bytes */ - /* during a test... ;-) at some point, this should probably become a */ - /* 64bit integral type, but those are not entirely common yet */ - + /* with links like fddi, one can send > 32 bits worth of bytes + during a test... ;-) at some point, this should probably become a + 64bit integral type, but those are not entirely common + yet... time passes, and 64 bit types do indeed become common. */ +#if defined(WIN32) && _MSC_VER <= 1200 + __int64 local_bytes_sent = 0 +#else unsigned long long local_bytes_sent = 0; +#endif + double bytes_sent = 0.0; float local_cpu_utilization; @@ -2300,11 +2396,18 @@ int bytes_remaining; int tcp_mss = -1; /* possibly uninitialized on printf far below */ - /* with links like fddi, one can recv > 32 bits worth of bytes */ - /* during a test... ;-) at some point, this should probably become a */ - /* 64bit integral type, but those are not entirely common yet */ + /* with links like fddi, one can recv > 32 bits worth of bytes + during a test... ;-) at some point, this should probably become a + 64bit integral type, but those are not entirely common yet. of + course, time passes and they do become common. + */ double bytes_sent = 0.0; + +#if defined(WIN32) && (_MSC_VER < 1200) + __int64 local_bytes_recvd = 0; +#else unsigned long long local_bytes_recvd = 0; +#endif float local_cpu_utilization; float local_service_demand; @@ -2947,7 +3050,7 @@ } } - +#endif /* WANT_MIGRATION */ /* this routine implements the TCP_MSS test. All it does is pretend @@ -3126,7 +3229,7 @@ case 1: case 2: if (print_headers) { - fprintf(where,mss_title); + fprintf(where,"%s",mss_title); } fprintf(where, mss_fmt_0, /* the format string */ @@ -5469,7 +5572,7 @@ /* this routine implements the sending (netperf) side of the TCP_RR */ /* test. */ - +#ifndef WANT_MIGRATION void send_tcp_rr(char remote_host[]) { @@ -6269,7 +6372,38 @@ } } +#endif /* WANT_MIGRATION */ +#if defined(__linux) +/* + * Linux has this odd behavior where if the socket buffers are larger than + * a device's txqueuelen, the kernel will silently drop transmits which would + * not fit into the tx queue, and not pass an ENOBUFS error back to the + * application. As a result, a UDP stream test can report absurd transmit + * bandwidths (like 20Gb/s on a 1GbE NIC). This behavior can be avoided if + * you request extended error reporting on the socket. This is done by + * setting the IP_RECVERR socket option at the IP level. + */ +static void +enable_enobufs(int s) +{ + struct protoent *pr; + int on = 1; + + if ((pr = getprotobyname("ip")) == NULL) { + fprintf(where, "enable_enobufs failed: getprotobyname\n"); + fflush(where); + return; + } + if (setsockopt(s, pr->p_proto, IP_RECVERR, (char *)&on, sizeof(on)) < 0) { + fprintf(where, "enable_enobufs failed: setsockopt\n"); + fflush(where); + return; + } +} +#endif + +#ifndef WANT_MIGRATION void send_udp_stream(char remote_host[]) { @@ -6501,6 +6635,10 @@ fflush(where); } } + +#if defined (__linux) + enable_enobufs(data_socket); +#endif #ifdef WIN32 /* this is used so the timer thread can close the socket out from */ @@ -6851,6 +6989,7 @@ #endif /* WANT_HISTOGRAM */ } +#endif /* WANT_MIGRATION */ /* this routine implements the receive side (netserver) of the */ @@ -7181,6 +7320,7 @@ } +#ifndef WANT_MIGRATION void send_udp_rr(char remote_host[]) { @@ -7855,6 +7995,7 @@ #endif /* WANT_HISTOGRAM */ } } +#endif /* WANT_MIGRATION */ /* this routine implements the receive side (netserver) of a UDP_RR */ /* test. */ @@ -8596,8 +8737,9 @@ (lib_num_rem_cpus > 1) ? "cpus" : "cpu"); } - + +#ifndef WANT_MIGRATION /* this test is intended to test the performance of establishing a connection, exchanging a request/response pair, and repeating. it is expected that this would be a good starting-point for @@ -9280,7 +9422,7 @@ } } - +#endif /* WANT_MIGRATION */ void recv_tcp_conn_rr() @@ -9428,7 +9570,7 @@ /* Now, let's set-up the socket to listen for connections */ - if (listen(s_listen, 5) == SOCKET_ERROR) { + if (listen(s_listen, 128) == SOCKET_ERROR) { netperf_response.content.serv_errno = errno; close(s_listen); send_response(); @@ -9581,10 +9723,17 @@ send_response(); exit(1); } - else { + else if (request_bytes_recvd > 0) { request_bytes_remaining -= request_bytes_recvd; temp_message_ptr += request_bytes_recvd; } + else { + /* for some reason the remote closed the connection on + * us and that is unexpected so we should just close the + * socket and move-on. for that we will use an evil goto + * neener neener raj 20090622 */ + goto bail; + } } if (timed_out) { @@ -9636,8 +9785,10 @@ recv_message_ptr, 1, 0); +bail: close(s_data); #else +bail: close(s_data); #endif /* TCP_CRR_SHUTDOWN */ @@ -12738,7 +12889,7 @@ { -#define SOCKETS_ARGS "b:CDnNhH:L:m:M:p:P:r:s:S:T:Vw:W:z46" +#define SOCKETS_ARGS "b:CDnNhH:L:m:M:p:P:r:R:s:S:T:Vw:W:z46" extern char *optarg; /* pointer to option string */ @@ -12751,7 +12902,11 @@ if (debug) { int i; printf("%s called with the following argument vector\n", +#if _MSC_VER <= 1200 + "scan_sockets_args"); +#else __func__); +#endif for (i = 0; i< argc; i++) { printf("%s ",argv[i]); } @@ -12761,6 +12916,12 @@ strncpy(local_data_port,"0",sizeof(local_data_port)); strncpy(remote_data_port,"0",sizeof(remote_data_port)); + /* by default, only a UDP_STREAM test disallows routing, to cover + the backsides of incompetent testers who have bogus setups */ + if (strcasecmp(test_name,"UDP_STREAM") == 0) { + routing_allowed = 0; + } + /* Go through all the command line arguments and break them */ /* out. For those options that take two parms, specifying only */ /* the first will set both to that value. Specifying only the */ @@ -12855,6 +13016,10 @@ if (arg2[0]) rsp_size = convert(arg2); break; + case 'R': + /* enable/disable routing on the data connection*/ + routing_allowed = atoi(optarg); + break; case 'm': /* set the send size */ send_size = convert(optarg); @@ -12984,18 +13149,8 @@ strstr(test_name,"SENDFILE")) { recv_size = -1; } - else if (strstr(test_name,"RR")) { - /* I am however _certain_ that for a no control RR test the - response size must equal the request size since 99 times out - of ten we will be speaking to the echo service somewhere */ - rsp_size = req_size; - } else if (strstr(test_name,"MAERTS")) { send_size = -1; } - else { - printf("No default port known for the %s test, please set one yourself\n",test_name); - exit(-1); - } } } diff -Nru netperf-2.4.5/src/nettest_bsd.h netperf-2.5.0/src/nettest_bsd.h --- netperf-2.4.5/src/nettest_bsd.h 2008-12-12 22:18:11.000000000 +0000 +++ netperf-2.5.0/src/nettest_bsd.h 2011-06-29 23:10:50.000000000 +0000 @@ -14,18 +14,35 @@ #define NF_UNSPEC 0 #define NF_INET 4 #define NF_INET6 6 +/* since it isn't clear that AF_RDS will be the same value everywhere + we will have an NF_RDS as well and will make it "lucky 7" raj + 20091014 */ +#define NF_RDS 7 /* it would also seem that the socket type defines differ from platform to platform, which means we need to define our own values to pass between netperf and netserver so they can be translated to the local versions. NST == Netperf Socket Type raj 2008-01-14 */ -#define NST_UNKN -1 -#define NST_STREAM 1 -#define NST_DGRAM 2 -#define NST_DCCP 3 - +#define NST_UNKN -1 +#define NST_STREAM 1 +#define NST_DGRAM 2 +#define NST_DCCP 3 +#define NST_SEQPACKET 4 #ifdef WANT_OMNI +#define OMNI_NO_DELAY 0x00000001 +#define OMNI_USE_SENDFILE 0x00000002 +#define OMNI_CONNECT_TEST 0x00000004 +#define OMNI_MEASURE_CPU 0x00000008 +#define OMNI_CHECKSUM_OFF 0x00000010 +#define OMNI_ROUTING_ALLOWED 0x00000020 +#define OMNI_WANT_IFNAME 0x00000040 +#define OMNI_WANT_IFSLOT 0x00000080 +#define OMNI_WANT_IFIDS 0x00000100 +#define OMNI_WANT_DRVINFO 0x00000200 +/* room in the middle */ +#define OMNI_WANT_KEEPALIVE 0x80000000 + struct omni_request_struct { int32_t send_buf_size; /* SO_SNDBUF */ uint32_t send_size; /* bytes per send() call */ @@ -41,11 +58,10 @@ uint32_t recv_width; /* number of recv buffers to use */ int32_t response_size; /* size of a response */ - uint32_t no_delay; /* do we set mumble_NODELAY? */ - uint32_t use_sendfile; /* use sendfile rather than send? */ - uint32_t connect_test; /* does the test include connect? */ + uint32_t flags; /* to convey things that didn't + really need to burn an entire + int */ - uint32_t measure_cpu; /* do we measure CPU? */ float cpu_rate; /* do we know how fast the cpu is already? */ int32_t test_length; /* how long is the test? */ @@ -56,7 +72,6 @@ uint32_t recv_dirty_count; /* bytes to dirty before calling recv */ uint32_t recv_clean_count; /* bytes to access before calling recv */ - uint32_t checksum_off; /* should checksums be disabled? */ uint32_t data_port; /* what port number should netserver use? */ uint32_t ipfamily; /* address family of the data connection */ uint32_t socket_type; /* dgram? stream? other? */ @@ -65,7 +80,8 @@ uint32_t netperf_port; /* when netserver needs netperf's data port */ uint32_t interval_burst;/* how many things to do each interval */ uint32_t interval_usecs;/* how long each interval should be */ - uint32_t ipaddr[4]; /* when netserver needs netperf's data IP */ + uint32_t netperf_ip[4]; /* when netserver needs netperf's data IP */ + uint32_t netserver_ip[4]; /* when netperf tells netserver his IP */ }; struct omni_response_struct { @@ -77,10 +93,8 @@ uint32_t send_size; int32_t send_width; - uint32_t no_delay; - uint32_t use_sendfile; + uint32_t flags; - uint32_t measure_cpu; float cpu_rate; uint32_t test_length; @@ -92,14 +106,14 @@ uint32_t interval_burst;/* how many things to do each interval */ uint32_t interval_usecs;/* how long each interval should be */ - /* there are 16 ints above here, and we have 248 - (16*4) or 184 bytes - remaining */ /* these are here because they can be checked before actual data connections are made, and the omni_results_struct is already full */ uint32_t cpu_frequency; /* this should be megahertz */ uint32_t security_info; -#define OMNI_RESPONSE_CONV_CUTOFF 18 + /* there are 16 ints above here, and we have 248 - (16*4) or 184 bytes + remaining */ +#define OMNI_RESPONSE_CONV_CUTOFF 16 char system_model[33]; char cpu_model[80]; /* seems like an awful lot doesn't it. some clever person at Intel @@ -522,35 +536,37 @@ float elapsed_time; /* how long the test ran */ float cpu_util; /* -1 if not measured */ float serv_dem; /* -1 if not measured */ - int cpu_method; /* how was cpu util measured? */ - int num_cpus; /* how many CPUs had the remote? */ + int cpu_method; /* how was cpu util measured? */ + int num_cpus; /* how many CPUs had the remote? */ }; extern int socket_type, /* initially used by the "omni" tests */ rss_size_req, /* requested remote socket send buffer size */ rsr_size_req, /* requested remote socket recv buffer size */ - rss_size, /* remote socket send buffer size */ - rsr_size, /* remote socket recv buffer size */ + rss_size, /* remote socket send buffer size */ + rsr_size, /* remote socket recv buffer size */ rsr_size_end, rss_size_end, lss_size_req, /* requested local socket send buffer size */ lsr_size_req, /* requested local socket recv buffer size */ - lss_size, /* local socket send buffer size */ - lsr_size, /* local socket recv buffer size */ + lss_size, /* local socket send buffer size */ + lsr_size, /* local socket recv buffer size */ lss_size_end, lsr_size_end, - req_size, /* request size */ - rsp_size, /* response size */ - send_size, /* how big are individual sends */ - recv_size, /* how big are individual receives */ - loc_nodelay, /* don't/do use NODELAY locally */ - rem_nodelay, /* don't/do use NODELAY remotely */ - loc_sndavoid, /* avoid send copies locally */ - loc_rcvavoid, /* avoid recv copies locally */ - rem_sndavoid, /* avoid send copies remotely */ - rem_rcvavoid; /* avoid recv_copies remotely */ - + req_size, /* request size */ + rsp_size, /* response size */ + send_size, /* how big are individual sends */ + recv_size, /* how big are individual receives */ + loc_nodelay, /* don't/do use NODELAY locally */ + rem_nodelay, /* don't/do use NODELAY remotely */ + loc_sndavoid, /* avoid send copies locally */ + loc_rcvavoid, /* avoid recv copies locally */ + rem_sndavoid, /* avoid send copies remotely */ + rem_rcvavoid, /* avoid recv_copies remotely */ + routing_allowed, /* do we set/clear SO_DONTROUTE on data sock */ + multicast_ttl, /* what should the TTL be on mcast dgrams */ + want_keepalive; /* do we bother setting SO_KEEPALIVE? */ #ifdef WANT_OMNI extern void scan_omni_args(int argc, char *argv[]); @@ -633,3 +649,5 @@ extern void recv_tcp_nbrr(); #endif + +extern SOCKET create_data_socket(struct addrinfo *res); diff -Nru netperf-2.4.5/src/nettest_dlpi.c netperf-2.5.0/src/nettest_dlpi.c --- netperf-2.4.5/src/nettest_dlpi.c 2007-06-01 22:06:00.000000000 +0000 +++ netperf-2.5.0/src/nettest_dlpi.c 2011-02-10 17:04:11.000000000 +0000 @@ -48,6 +48,12 @@ #include "netsh.h" #include "nettest_dlpi.h" +/* some stuff for DLPI control messages */ +#define DLPI_DATA_SIZE 2048 + +unsigned long control_data[DLPI_DATA_SIZE]; +struct strbuf control_message = {DLPI_DATA_SIZE, 0, (char *)control_data}; + /* these are some variables global to all the DLPI tests. declare */ /* them static to make them global only to this file */ @@ -93,6 +99,240 @@ comma.\n"; + +/* routines that used to be in src/netlib.c but this code is the only + code that uses them. raj 20110111 */ + + +int +put_control(fd, len, pri, ack) + int fd, len, pri, ack; +{ + int error; + int flags = 0; + dl_error_ack_t *err_ack = (dl_error_ack_t *)control_data; + + control_message.len = len; + + if ((error = putmsg(fd, &control_message, 0, pri)) < 0 ) { + fprintf(where,"put_control: putmsg error %d\n",error); + fflush(where); + return(-1); + } + if ((error = getmsg(fd, &control_message, 0, &flags)) < 0) { + fprintf(where,"put_control: getsmg error %d\n",error); + fflush(where); + return(-1); + } + if (err_ack->dl_primitive != ack) { + fprintf(where,"put_control: acknowledgement error wanted %u got %u \n", + ack,err_ack->dl_primitive); + if (err_ack->dl_primitive == DL_ERROR_ACK) { + fprintf(where," dl_error_primitive: %u\n", + err_ack->dl_error_primitive); + fprintf(where," dl_errno: %u\n", + err_ack->dl_errno); + fprintf(where," dl_unix_errno %u\n", + err_ack->dl_unix_errno); + } + fflush(where); + return(-1); + } + + return(0); +} + +int +dl_open(char devfile[], int ppa) +{ + int fd; + dl_attach_req_t *attach_req = (dl_attach_req_t *)control_data; + + if ((fd = open(devfile, O_RDWR)) == -1) { + fprintf(where,"netperf: dl_open: open of %s failed, errno = %d\n", + devfile, + errno); + return(-1); + } + + attach_req->dl_primitive = DL_ATTACH_REQ; + attach_req->dl_ppa = ppa; + + if (put_control(fd, sizeof(dl_attach_req_t), 0, DL_OK_ACK) < 0) { + fprintf(where, + "netperf: dl_open: could not send control message, errno = %d\n", + errno); + return(-1); + } + return(fd); +} + +int +dl_bind(int fd, int sap, int mode, char *dlsap_ptr, int *dlsap_len) +{ + dl_bind_req_t *bind_req = (dl_bind_req_t *)control_data; + dl_bind_ack_t *bind_ack = (dl_bind_ack_t *)control_data; + + bind_req->dl_primitive = DL_BIND_REQ; + bind_req->dl_sap = sap; + bind_req->dl_max_conind = 1; + bind_req->dl_service_mode = mode; + bind_req->dl_conn_mgmt = 0; + bind_req->dl_xidtest_flg = 0; + + if (put_control(fd, sizeof(dl_bind_req_t), 0, DL_BIND_ACK) < 0) { + fprintf(where, + "netperf: dl_bind: could not send control message, errno = %d\n", + errno); + return(-1); + } + + /* at this point, the control_data portion of the control message */ + /* structure should contain a DL_BIND_ACK, which will have a full */ + /* DLSAP in it. we want to extract this and pass it up so that */ + /* it can be passed around. */ + if (*dlsap_len >= bind_ack->dl_addr_length) { + bcopy((char *)bind_ack+bind_ack->dl_addr_offset, + dlsap_ptr, + bind_ack->dl_addr_length); + *dlsap_len = bind_ack->dl_addr_length; + return(0); + } + else { + return (-1); + } +} + +int +dl_connect(int fd, unsigned char *remote_addr, int remote_addr_len) +{ + dl_connect_req_t *connection_req = (dl_connect_req_t *)control_data; + dl_connect_con_t *connection_con = (dl_connect_con_t *)control_data; + struct pollfd pinfo; + + int flags = 0; + + /* this is here on the off chance that we really want some data */ + u_long data_area[512]; + struct strbuf data_message; + + int error; + + data_message.maxlen = 2048; + data_message.len = 0; + data_message.buf = (char *)data_area; + + connection_req->dl_primitive = DL_CONNECT_REQ; + connection_req->dl_dest_addr_length = remote_addr_len; + connection_req->dl_dest_addr_offset = sizeof(dl_connect_req_t); + connection_req->dl_qos_length = 0; + connection_req->dl_qos_offset = 0; + bcopy (remote_addr, + (unsigned char *)control_data + sizeof(dl_connect_req_t), + remote_addr_len); + + /* well, I would call the put_control routine here, but the sequence */ + /* of connection stuff with DLPI is a bit screwey with all this */ + /* message passing - Toto, I don't think were in Berkeley anymore. */ + + control_message.len = sizeof(dl_connect_req_t) + remote_addr_len; + if ((error = putmsg(fd,&control_message,0,0)) !=0) { + fprintf(where,"dl_connect: putmsg failure, errno = %d, error 0x%x \n", + errno,error); + fflush(where); + return(-1); + }; + + pinfo.fd = fd; + pinfo.events = POLLIN | POLLPRI; + pinfo.revents = 0; + + if ((error = getmsg(fd,&control_message,&data_message,&flags)) != 0) { + fprintf(where,"dl_connect: getmsg failure, errno = %d, error 0x%x \n", + errno,error); + fflush(where); + return(-1); + } + while (control_data[0] == DL_TEST_CON) { + /* i suppose we spin until we get an error, or a connection */ + /* indication */ + if((error = getmsg(fd,&control_message,&data_message,&flags)) !=0) { + fprintf(where,"dl_connect: getmsg failure, errno = %d, error = 0x%x\n", + errno,error); + fflush(where); + return(-1); + } + } + + /* we are out - it either worked or it didn't - which was it? */ + if (control_data[0] == DL_CONNECT_CON) { + return(0); + } + else { + return(-1); + } +} + +int +dl_accept(fd, remote_addr, remote_addr_len) + int fd; + unsigned char *remote_addr; + int remote_addr_len; +{ + dl_connect_ind_t *connect_ind = (dl_connect_ind_t *)control_data; + dl_connect_res_t *connect_res = (dl_connect_res_t *)control_data; + int tmp_cor; + int flags = 0; + + /* hang around and wait for a connection request */ + getmsg(fd,&control_message,0,&flags); + while (control_data[0] != DL_CONNECT_IND) { + getmsg(fd,&control_message,0,&flags); + } + + /* now respond to the request. at some point, we may want to be sure */ + /* that the connection came from the correct station address, but */ + /* will assume that we do not have to worry about it just now. */ + + tmp_cor = connect_ind->dl_correlation; + + connect_res->dl_primitive = DL_CONNECT_RES; + connect_res->dl_correlation = tmp_cor; + connect_res->dl_resp_token = 0; + connect_res->dl_qos_length = 0; + connect_res->dl_qos_offset = 0; + connect_res->dl_growth = 0; + + return(put_control(fd, sizeof(dl_connect_res_t), 0, DL_OK_ACK)); + +} + +int +dl_set_window(fd, window) + int fd, window; +{ + return(0); +} + +void +dl_stats(fd) + int fd; +{ +} + +int +dl_send_disc(fd) + int fd; +{ +} + +int +dl_recv_disc(fd) + int fd; +{ +} + + /* This routine implements the CO unidirectional data transfer test */ /* (a.k.a. stream) for the sockets interface. It receives its */ /* parameters via global variables from the shell and writes its */ @@ -245,7 +485,7 @@ fprintf(where, "netperf: send_dlpi_co_stream: window sizes determined...\n"); fprintf(where," send: %d recv: %d\n",lsw_size,lrw_size); - ffluch(where); + fflush(where); } #else /* DL_HP_SET_LOCAL_WIN_REQ */ diff -Nru netperf-2.4.5/src/nettest_omni.c netperf-2.5.0/src/nettest_omni.c --- netperf-2.4.5/src/nettest_omni.c 2008-12-12 22:25:52.000000000 +0000 +++ netperf-2.5.0/src/nettest_omni.c 2011-07-18 18:45:35.000000000 +0000 @@ -4,7 +4,7 @@ #ifdef WANT_OMNI char nettest_omni_id[]="\ -@(#)nettest_omni.c (c) Copyright 2008 Hewlett-Packard Co. Version 2.5.0pre"; +@(#)nettest_omni.c (c) Copyright 2008-2011 Hewlett-Packard Co. Version 2.5.0"; #include #if HAVE_SYS_TYPES_H @@ -64,17 +64,27 @@ #include #endif /* NOSTDLIBH */ -#ifdef WANT_SCTP -#include -#endif - #ifndef WIN32 #if !defined(__VMS) #include #endif /* !defined(__VMS) */ #include #include + +/* it would seem that including both and + is not a path to happiness and joy when one wishes to grab tcp_info + stats and not get something like the compiler complaining about + either redefinitions, or missing tcpi_total_retrans. */ +#ifdef HAVE_LINUX_TCP_H +#include +#else #include +#endif + +#ifdef HAVE_NETINET_SCTP_H +#include +#endif + #include #include #else /* WIN32 */ @@ -111,27 +121,23 @@ #include "netsh.h" #include "nettest_bsd.h" -#if defined(WANT_HISTOGRAM) || defined(WANT_DEMO) +/* we only really use this once, but the initial patch to + src/nettest_bsd.c used it in several places. keep it as a macro + just for kicks and just in case we do end-up needing to use it + multiple times. */ + +#define WAIT_BEFORE_DATA_TRAFFIC() \ +{ \ + if (wait_time_secs) \ + sleep(wait_time_secs); \ +} \ + + +/* since someone can ask for latency stats, we will always include + this and do the other other things */ #include "hist.h" -#endif /* WANT_HISTOGRAM */ -#ifdef WANT_HISTOGRAM -#ifdef HAVE_GETHRTIME -static hrtime_t time_one; -static hrtime_t time_two; -#elif HAVE_GET_HRT -#include "hrt.h" -static hrt_t time_one; -static hrt_t time_two; -#elif defined(WIN32) -static LARGE_INTEGER time_one; -static LARGE_INTEGER time_two; -#else -static struct timeval time_one; -static struct timeval time_two; -#endif /* HAVE_GETHRTIME */ static HIST time_hist; -#endif /* WANT_HISTOGRAM */ #ifdef WANT_DEMO #ifdef HAVE_GETHRTIME @@ -170,37 +176,43 @@ } #define DEMO_INTERVAL(units) \ - if (demo_mode) { \ - double actual_interval; \ - units_this_tick += units; \ - if (units_this_tick >= demo_units) { \ - /* time to possibly update demo_units and maybe output an \ - interim result */ \ - HIST_timestamp(demo_two_ptr); \ - actual_interval = delta_micro(demo_one_ptr,demo_two_ptr); \ - /* we always want to fine-tune demo_units here whether we \ - emit an interim result or not. if we are short, this \ - will lengthen demo_units. if we are long, this will \ - shorten it */ \ - demo_units = demo_units * (demo_interval / actual_interval); \ - if (actual_interval >= demo_interval) { \ - /* time to emit an interim result */ \ - fprintf(where, \ - "Interim result: %7.2f %s/s over %.2f seconds\n", \ - calc_thruput_interval(units_this_tick, \ - actual_interval/1000000.0), \ - format_units(), \ - actual_interval/1000000.0); \ - units_this_tick = 0.0; \ - /* now get a new starting timestamp. we could be clever \ - and swap pointers - the math we do probably does not \ - take all that long, but for now this will suffice */ \ - temp_demo_ptr = demo_one_ptr; \ - demo_one_ptr = demo_two_ptr; \ - demo_two_ptr = temp_demo_ptr; \ - } \ - } \ - } + if (demo_mode) { \ + double actual_interval; \ + struct timeval now; \ + units_this_tick += units; \ + if (units_this_tick >= demo_units) { \ + /* time to possibly update demo_units and maybe output an \ + interim result */ \ + HIST_timestamp(demo_two_ptr); \ + actual_interval = delta_micro(demo_one_ptr,demo_two_ptr); \ + /* we always want to fine-tune demo_units here whether we \ + emit an interim result or not. if we are short, this \ + will lengthen demo_units. if we are long, this will \ + shorten it */ \ + demo_units = demo_units * (demo_interval / actual_interval); \ + if (actual_interval >= demo_interval) { \ + /* time to emit an interim result, giving the current time \ + to the millisecond for compatability with RRD */ \ + gettimeofday(&now,NULL); \ + fprintf(where, \ + "Interim result: %7.2f %s/s over %.2f seconds ending at %ld.%.3ld\n", \ + calc_thruput_interval(units_this_tick, \ + actual_interval/1000000.0), \ + format_units(), \ + actual_interval/1000000.0, \ + now.tv_sec, \ + now.tv_usec/1000); \ + fflush(where); \ + units_this_tick = 0.0; \ + /* now get a new starting timestamp. we could be clever \ + and swap pointers - the math we do probably does not \ + take all that long, but for now this will suffice */ \ + temp_demo_ptr = demo_one_ptr; \ + demo_one_ptr = demo_two_ptr; \ + demo_two_ptr = temp_demo_ptr; \ + } \ + } \ + } #define DEMO_STREAM_INTERVAL(units) DEMO_INTERVAL(units) @@ -216,6 +228,34 @@ #ifdef WANT_INTERVALS int interval_count; +unsigned int interval_wait_microseconds; + +/* hoist the timestamps up here so we can use them to factor-out the + time spent "waiting" */ +/* first out timestamp */ +#ifdef HAVE_GETHRTIME +static hrtime_t intvl_one; +static hrtime_t intvl_two; +static hrtime_t intvl_wait_start; +static hrtime_t *intvl_one_ptr = &intvl_one; +static hrtime_t *intvl_two_ptr = &intvl_two; +static hrtime_t *temp_intvl_ptr = &intvl_one; +#elif defined(WIN32) +static LARGE_INTEGER intvl_one; +static LARGE_INTEGER intvl_two; +static LARGE_INTEGER intvl_wait_start; +static LARGE_INTEGER *intvl_one_ptr = &intvl_one; +static LARGE_INTEGER *intvl_two_ptr = &intvl_two; +static LARGE_INTEGER *temp_intvl_ptr = &intvl_one; +#else +static struct timeval intvl_one; +static struct timeval intvl_two; +static struct timeval intvl_wait_start; +static struct timeval *intvl_one_ptr = &intvl_one; +static struct timeval *intvl_two_ptr = &intvl_two; +static struct timeval *temp_intvl_ptr = &intvl_one; +#endif + #ifndef WANT_SPIN sigset_t signal_set; #define INTERVALS_INIT() \ @@ -227,6 +267,7 @@ start_itimer(interval_wate); \ } \ interval_count = interval_burst; \ + interval_wait_microseconds = 0; \ /* get the signal set for the call to sigsuspend */ \ if (sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &signal_set) != 0) { \ fprintf(where, \ @@ -247,6 +288,7 @@ fprintf(where,"about to suspend\n"); \ fflush(where); \ } \ + HIST_timestamp(&intvl_wait_start); \ if (sigsuspend(&signal_set) == EFAULT) { \ fprintf(where, \ "%s: fault with sigsuspend.\n", \ @@ -254,50 +296,37 @@ fflush(where); \ exit(1); \ } \ + HIST_timestamp(&intvl_two); \ + interval_wait_microseconds += \ + delta_micro(&intvl_wait_start,&intvl_two); \ interval_count = interval_burst; \ } #else -/* first out timestamp */ -#ifdef HAVE_GETHRTIME -static hrtime_t intvl_one; -static hrtime_t intvl_two; -static hrtime_t *intvl_one_ptr = &intvl_one; -static hrtime_t *intvl_two_ptr = &intvl_two; -static hrtime_t *temp_intvl_ptr = &intvl_one; -#elif defined(WIN32) -static LARGE_INTEGER intvl_one; -static LARGE_INTEGER intvl_two; -static LARGE_INTEGER *intvl_one_ptr = &intvl_one; -static LARGE_INTEGER *intvl_two_ptr = &intvl_two; -static LARGE_INTEGER *temp_intvl_ptr = &intvl_one; -#else -static struct timeval intvl_one; -static struct timeval intvl_two; -static struct timeval *intvl_one_ptr = &intvl_one; -static struct timeval *intvl_two_ptr = &intvl_two; -static struct timeval *temp_intvl_ptr = &intvl_one; -#endif #define INTERVALS_INIT() \ if (interval_burst) { \ HIST_timestamp(intvl_one_ptr); \ } \ + interval_wait_microseconds = 0; \ interval_count = interval_burst; \ #define INTERVALS_WAIT() \ /* in this case, the interval count is the count-down couter \ to decide to sleep for a little bit */ \ if ((interval_burst) && (--interval_count == 0)) { \ - /* call sigsuspend and wait for the interval timer to get us \ + /* spin and wait for the interval timer to get us \ out */ \ if (debug > 1) { \ fprintf(where,"about to spin suspend\n"); \ fflush(where); \ } \ - HIST_timestamp(intvl_two_ptr); \ - while(delta_micro(intvl_one_ptr,intvl_two_ptr) < interval_usecs) { \ - HIST_timestamp(intvl_two_ptr); \ - } \ + \ + HIST_timestamp(&intvl_wait_start); \ + do { + HIST_timestamp(intvl_two_ptr); } \ + while(delta_micro(intvl_one_ptr,intvl_two_ptr) < interval_usecs); \ + interval_wait_microseconds += \ + delta_micro(&intvl_wait_start,&intvl_two); \ temp_intvl_ptr = intvl_one_ptr; \ intvl_one_ptr = intvl_two_ptr; \ intvl_two_ptr = temp_intvl_ptr; \ @@ -307,24 +336,11 @@ #endif #define NETPERF_WAITALL 0x1 -#define NETPERF_XMIT 0x2 -#define NETPERF_RECV 0x4 - -#define NETPERF_IS_RR(x) (((x & NETPERF_XMIT) && (x & NETPERF_RECV)) || \ - (!((x & NETPERF_XMIT) || (x & NETPERF_RECV)))) - -#define NETPERF_RECV_ONLY(x) ((x & NETPERF_RECV) && !(x & NETPERF_XMIT)) - -#define NETPERF_XMIT_ONLY(x) ((x & NETPERF_XMIT) && !(x & NETPERF_RECV)) - -#define NETPERF_CC(x) (!(x & NETPERF_XMIT) && !(x & NETPERF_RECV)) extern void get_uuid_string(char *string, size_t size); /* a boatload of globals while I settle things out */ -char *csv_selection_file = NULL; -char *human_selection_file = NULL; -char *keyword_selection_file = NULL; +char *output_selection_spec = NULL; char test_uuid[38]; @@ -359,10 +375,14 @@ int bytes_to_recv; double bytes_per_recv; int null_message_ok = 0; +int human = 0; +int was_legacy = 0; +int legacy = 0; +int implicit_direction = 0; int csv = 0; int keyword = 0; uint64_t trans_completed = 0; -uint64_t units_remaining; +int64_t units_remaining; uint64_t bytes_sent = 0; uint64_t bytes_received = 0; uint64_t local_send_calls = 0; @@ -395,6 +415,8 @@ double transaction_rate = 1.0; double rtt_latency = -1.0; int32_t transport_mss = -2; +int32_t local_transport_retrans = -2; +int32_t remote_transport_retrans = -2; char *local_interface_name=NULL; char *remote_interface_name=NULL; char local_driver_name[32]=""; @@ -433,6 +455,22 @@ char *remote_security_type; char *remote_security_specific; +/* new statistics based on code diffs from Google, with raj's own + personal twist added to make them compatible with the omni + tests... 20100913 */ + +/* min and max "latency" */ +int min_latency = -1, max_latency = -1; +/* the percentiles */ +int p50_latency = -1, p90_latency = -1, p99_latency = -1; +/* mean and stddev - while the mean is reduntant with the *_RR test we + keep it because it won't be for other tests */ +double mean_latency = -1.0, stddev_latency = -1.0; + +/* default to zero to avoid randomizing */ +int local_mask_len=0; +int remote_mask_len=0; + int printing_initialized = 0; char *sd_str; @@ -478,6 +516,7 @@ the default csv (everything) output */ enum netperf_output_name { + NETPERF_OUTPUT_UNKNOWN, OUTPUT_NONE, SOCKET_TYPE, PROTOCOL, @@ -519,6 +558,8 @@ TRANSACTION_RATE, RT_LATENCY, BURST_SIZE, + LOCAL_TRANSPORT_RETRANS, + REMOTE_TRANSPORT_RETRANS, TRANSPORT_MSS, LOCAL_SEND_THROUGHPUT, LOCAL_RECV_THROUGHPUT, @@ -624,41 +665,62 @@ REMOTE_SECURITY_SPECIFIC, RESULT_BRAND, UUID, - COMMAND_LINE, + MIN_LATENCY, + MAX_LATENCY, + P50_LATENCY, + P90_LATENCY, + P99_LATENCY, + MEAN_LATENCY, + STDDEV_LATENCY, + COMMAND_LINE, /* COMMAND_LINE should always be "last" */ OUTPUT_END, NETPERF_OUTPUT_MAX }; +/* flags for the output groups, lower 16 bits for remote, upper 16 + bits for local */ + +#define OMNI_WANT_REM_IFNAME 0X00000001 +#define OMNI_WANT_LOC_IFNAME 0X00010000 +#define OMNI_WANT_REM_IFSLOT 0X00000002 +#define OMNI_WANT_LOC_IFSLOT 0X00020000 +#define OMNI_WANT_REM_IFIDS 0X00000004 +#define OMNI_WANT_LOC_IFIDS 0X00040000 +#define OMNI_WANT_REM_DRVINFO 0X00000008 +#define OMNI_WANT_LOC_DRVINFO 0X00080000 +#define OMNI_WANT_STATS 0X00100010 + +unsigned int desired_output_groups = 0; + typedef struct netperf_output_elt { enum netperf_output_name output_name; /* belt and suspenders */ int max_line_len; /* length of the longest of the "lines" */ int tot_line_len; /* total length of all lines, including spaces */ char *line[4]; - char *brief; /* the brief name of the value */ - char *format; /* format to apply to value */ - void *display_value; /* where to find the value */ + char *brief; /* the brief name of the value */ + char *format; /* format to apply to value */ + void *display_value; /* where to find the value */ + int output_default; /* is it included in the default output */ + unsigned int output_group; /* used to avoid some lookups */ } netperf_output_elt_t; netperf_output_elt_t netperf_output_source[NETPERF_OUTPUT_MAX]; -/* the list of things we will emit for CSV output. I suppose we could - at some point try to make this a special case of output_human_list, - or at least use some of that space... but for now we won't worry - about it. that can come after things are actually working :) raj - 2008-01-23 */ -enum netperf_output_name output_csv_list[NETPERF_OUTPUT_MAX]; - -/* the list of things we will emit for "human" output. up to - NETPERF_MAX_BLOCKS of output (groups of lines) each out to - NETPERF_OUTPUT_MAX entries. that should more than cover it */ - #define NETPERF_MAX_BLOCKS 4 -enum netperf_output_name output_human_list[NETPERF_MAX_BLOCKS][NETPERF_OUTPUT_MAX]; + +/* let us simply use one, two-dimensional list, and either use or some + of the additional dimension depending on the type of output we are + doing. this should help simplify matters. raj 20110120 */ + +enum netperf_output_name output_list[NETPERF_MAX_BLOCKS][NETPERF_OUTPUT_MAX]; char *direction_to_str(int direction) { if (NETPERF_RECV_ONLY(direction)) return "Receive"; if (NETPERF_XMIT_ONLY(direction)) return "Send"; if (NETPERF_CC(direction)) return "Connection"; + else if (connection_test) { + return "Connect|Send|Recv"; + } else return "Send|Recv"; } @@ -686,6 +748,138 @@ } } +/* does this need to become conditional on the presence of the macros + or might we ass-u-me that we will not be compiled on something so + old as to not have what we use? raj 20090803 */ +static int +is_multicast_addr(struct addrinfo *res) { + switch(res->ai_family) { + case AF_INET: { + /* IPv4 multicast runs from 224.0.0.0 to 239.255.255.255 or + 0xE0000000 to 0xEFFFFFFF. Thankfully though there are macros + available to make the checks for one */ + struct in_addr bar = ((struct sockaddr_in *)res->ai_addr)->sin_addr; + /* and here I thought IN_MULTICAST would operate on things in + network byte order??? raj 20100315 */ + return IN_MULTICAST(ntohl(bar.s_addr)); + } +#if defined(AF_INET6) + case AF_INET6: { + struct in6_addr *bar = &(((struct sockaddr_in6 *)res->ai_addr)->sin6_addr); + return IN6_IS_ADDR_MULTICAST(bar); + } +#endif + default: + fprintf(where, + "Unexpected Address Family for Multicast Check %u\n", + res->ai_family); + fflush(where); + return 0; /* or should we exit? */ + } +} + +static void +set_multicast_ttl(SOCKET sock) { + int optlen = sizeof(int); + + /* now set/get the TTL */ + if (multicast_ttl >= 0) { + if (setsockopt(sock, + IPPROTO_IP, + IP_TTL, + &multicast_ttl, + sizeof(multicast_ttl)) < 0) { + fprintf(where, + "setsockopt(IP_TTL) failed errno %d\n", + errno); + } + } + if (getsockopt(sock, + IPPROTO_IP, + IP_TTL, + &multicast_ttl, + (netperf_socklen_t *)&optlen) < 0) { + fprintf(where, + "getsockopt(IP_TTL) failed errno %d\n", + errno); + multicast_ttl = -2; + } +} + +/* we presume we are only called with something which is actually a + multicast address. raj 20100315 */ +static void +join_multicast_addr(SOCKET sock, struct addrinfo *res) { + switch(res->ai_family) { + case AF_INET: { + struct ip_mreq mreq; + struct in_addr bar = ((struct sockaddr_in *)res->ai_addr)->sin_addr; + int optlen = sizeof(int); + int one = 1; + + mreq.imr_multiaddr.s_addr=bar.s_addr; + mreq.imr_interface.s_addr=htonl(INADDR_ANY); + if (setsockopt(sock, + IPPROTO_IP, + IP_ADD_MEMBERSHIP, + &mreq,sizeof(mreq)) == 0) { + + /* let others do the same */ + if (setsockopt(sock, + SOL_SOCKET, + SO_REUSEADDR, + &one, + sizeof(one)) < 0) { + if (debug) { + fprintf(where, + "join_multicast_addr SO_REUSADDR failed errno %d\n", + errno); + fflush(where); + } + } + + /* now set/get the TTL */ + if (multicast_ttl >= 0) { + if (setsockopt(sock, + IPPROTO_IP, + IP_TTL, + &multicast_ttl, + sizeof(multicast_ttl)) < 0) { + fprintf(where, + "setsockopt(IP_TTL) failed errno %d\n", + errno); + } + } + if (getsockopt(sock, + IPPROTO_IP, + IP_TTL, + &multicast_ttl, + (netperf_socklen_t *)&optlen) < 0) { + fprintf(where, + "getsockopt(IP_TTL) failed errno %d\n", + errno); + multicast_ttl = -2; + } + } + else { + if (debug) { + fprintf(where, + "setsockopt(IP_ADD_MEMBERSHIP) failed errno %d\n", + errno); + fflush(where); + } + } + break; + } + case AF_INET6: { + fprintf(where,"I do not know how to join an IPv6 multicast group\n"); + break; + } + + } + return; +} + static void extract_inet_address_and_port(struct addrinfo *res, void *addr, int len, int *port) { @@ -762,6 +956,7 @@ set_port_number(local_res, (unsigned short)myport); } +/* at some point this should become a table lookup... raj 20090813 */ char * netperf_output_enum_to_str(enum netperf_output_name output_name) { @@ -824,6 +1019,10 @@ return "TRANSACTION_RATE"; case BURST_SIZE: return "BURST_SIZE"; + case LOCAL_TRANSPORT_RETRANS: + return "LOCAL_TRANSPORT_RETRANS"; + case REMOTE_TRANSPORT_RETRANS: + return "REMOTE_TRANSPORT_RETRANS"; case TRANSPORT_MSS: return "TRANSPORT_MSS"; case REQUEST_SIZE: @@ -1060,6 +1259,20 @@ return "LOCAL_CPU_FREQUENCY"; case LOCAL_SYSTEM_MODEL: return "LOCAL_SYSTEM_MODEL"; + case MIN_LATENCY: + return "MIN_LATENCY"; + case MAX_LATENCY: + return "MAX_LATENCY"; + case P50_LATENCY: + return "P50_LATENCY"; + case P90_LATENCY: + return "P90_LATENCY"; + case P99_LATENCY: + return "P99_LATENCY"; + case MEAN_LATENCY: + return "MEAN_LATENCY"; + case STDDEV_LATENCY: + return "STDDEV_LATENCY"; case OUTPUT_END: return "OUTPUT_END"; default: @@ -1075,7 +1288,22 @@ void print_omni_init_list(); void -dump_netperf_output_list(FILE *where, int csv) { +dump_netperf_output_list(FILE *where) { + + int i,j; + + for (i = 0; i < NETPERF_MAX_BLOCKS; i++) { + fprintf(where,"Output Block %d\n",i + 1); + for (j = 0; j < NETPERF_OUTPUT_MAX; j++) { + fprintf(where,"%s ",netperf_output_enum_to_str(output_list[i][j])); + } + fprintf(where,"\n"); + } + fflush(where); +} + +void +dump_netperf_output_choices(FILE *where, int csv) { int i; print_omni_init_list(); @@ -1100,35 +1328,28 @@ /* belts and suspenders everyone... */ for (i = OUTPUT_NONE; i < NETPERF_OUTPUT_MAX; i++) { fprintf(where, - "Output Name: %s\n", - netperf_output_enum_to_str(netperf_output_source[i].output_name)); - fprintf(where, - "\tmax_line_len %d tot_line_len %d display_value %p\n", + "Output Name: %s\n" + "\tmax_line_len %d tot_line_len %d display_value %p\n" + "\tline[0]: |%s|\n" + "\tline[1]: |%s|\n" + "\tline[2]: |%s|\n" + "\tline[3]: |%s|\n" + "\tbrief: |%s|\n" + "\tformat: |%s|\n", + netperf_output_enum_to_str(netperf_output_source[i].output_name), netperf_output_source[i].max_line_len, netperf_output_source[i].tot_line_len, - netperf_output_source[i].display_value); - fprintf(where, - "\tline[0]: |%s|\n", + netperf_output_source[i].display_value, (netperf_output_source[i].line[0] == NULL) ? "" : - netperf_output_source[i].line[0]); - fprintf(where, - "\tline[1]: |%s|\n", + netperf_output_source[i].line[0], (netperf_output_source[i].line[1] == NULL) ? "" : - netperf_output_source[i].line[1]); - fprintf(where, - "\tline[2]: |%s|\n", + netperf_output_source[i].line[1], (netperf_output_source[i].line[2] == NULL) ? "" : - netperf_output_source[i].line[2]); - fprintf(where, - "\tline[3]: |%s|\n", + netperf_output_source[i].line[2], (netperf_output_source[i].line[3] == NULL) ? "" : - netperf_output_source[i].line[3]); - fprintf(where, - "\tbrief: |%s|\n", + netperf_output_source[i].line[3], (netperf_output_source[i].brief == NULL) ? "" : - netperf_output_source[i].brief); - fprintf(where, - "\tformat: |%s|\n", + netperf_output_source[i].brief, (netperf_output_source[i].format == NULL) ? "" : netperf_output_source[i].format); } @@ -1150,6 +1371,17 @@ strlen(netperf_output_source[x].line[3]) + 4 enum netperf_output_name +match_string_to_output_mnenomic(char *candidate) { + + enum netperf_output_name name; + for (name = OUTPUT_NONE; name < NETPERF_OUTPUT_MAX; name++) { + if(!strcasecmp(candidate,netperf_output_enum_to_str(name))) + return name; + } + return NETPERF_OUTPUT_UNKNOWN; +} + +enum netperf_output_name match_string_to_output(char *candidate) { char *h1,*temp; @@ -1194,91 +1426,63 @@ return OUTPUT_NONE; } + void -parse_output_csv_selection_file(char *selection_file) { - FILE *selections; - char name[81]; /* best be more than enough */ - int namepos; - int c; - int j; - enum netperf_output_name match; - int line,column; +set_output_list_all() { - selections = fopen(selection_file,"r"); - if (!selections) { - perror("Could Not Open output selection file"); - exit(-1); + int i, j; /* line, column */ + enum netperf_output_name k; + + /* Line One SOCKET_TYPE to RESPONSE_SIZE */ + i = 0; + j = 0; + for (k = SOCKET_TYPE; k <= RESPONSE_SIZE; k++) { + output_list[i][j++] = k; + desired_output_groups |= netperf_output_source[k].output_group; } - - /* should this really be necessary? */ - rewind(selections); - line = 0; - column = 1; - namepos = 0; - name[0] = 0; - name[80] = 0; + /* Line Two LOCAL_CPU_UTIL to TRANSPORT_MSS */ + i = 1; j = 0; - /* let's allow the csv to turn the four lines of a human readable - output file to be used to create a single line csv output file by - not worrying about the line count. raj 2008--02-04 */ - while ((c = fgetc(selections)) != EOF) { - if (namepos == 80) { - /* too long */ - - fprintf(where, - "Output selection starting column %d on line %d is too long\n", - line + 1, - column); - fflush(where); - exit(-1); - } - if (c == ',') { - /* time to check for a match, but only if we won't overflow the - current row of the array */ - if (j == NETPERF_OUTPUT_MAX) { - fprintf(where,"Too many output selectors on line %d\n",line); - fflush(where); - exit(-1); - } - name[namepos] = 0; - output_csv_list[j++] = match_string_to_output(name); - namepos = 0; - } - else if (c == '\n') { - /* move to the next line after checking for a match */ - name[namepos] = 0; - output_csv_list[j++] = match_string_to_output(name); - line++; - namepos = 0; - } - else if (isprint(c)) { - name[namepos++] = c; - } - column++; + for (k = LOCAL_CPU_UTIL; k <= TRANSPORT_MSS; k++) { + output_list[i][j++] = k; + desired_output_groups |= netperf_output_source[k].output_group; } - /* ok, do we need/want to do anything here? at present we will - silently ignore the rest of the file if we exit the loop on line - count */ - if ((c == EOF) && (namepos > 0)) { - name[namepos] = 0; - output_csv_list[j] = match_string_to_output(name); + /* Line Three LOCAL_SEND_THROUGHPUT throught REMOTE_CORK */ + i = 2; + j = 0; + for (k = LOCAL_SEND_THROUGHPUT; k <= REMOTE_CORK; k++) { + output_list[i][j++] = k; + desired_output_groups |= netperf_output_source[k].output_group; + } + + /* Line Four LOCAL_SYSNAME through COMMAND_LINE */ + i = 3; + j = 0; + for (k = LOCAL_SYSNAME; k <= COMMAND_LINE; k++) { + output_list[i][j++] = k; + desired_output_groups |= netperf_output_source[k].output_group; } + } + void -parse_output_human_selection_file(char *selection_file) { +parse_output_selection_file(char *selection_file) { FILE *selections; char name[81]; /* best be more than enough */ int namepos; char c; int j; - enum netperf_output_name match; int line,column; selections = fopen(selection_file,"r"); if (!selections) { - perror("Could Not Open output selection file"); + fprintf(where, + "Could not open output selection file '%s' errno %d\n", + selection_file, + errno); + fflush(where); exit(-1); } @@ -1308,13 +1512,13 @@ exit(-1); } name[namepos] = 0; - output_human_list[line][j++] = match_string_to_output(name); + output_list[line][j++] = match_string_to_output(name); namepos = 0; } else if (c == '\n') { /* move to the next line after checking for a match */ name[namepos] = 0; - output_human_list[line++][j++] = match_string_to_output(name); + output_list[line++][j++] = match_string_to_output(name); namepos = 0; j = 0; } @@ -1329,55 +1533,211 @@ count */ if ((c == EOF) && (namepos > 0)) { name[namepos] = 0; - output_human_list[line][j] = match_string_to_output(name); + output_list[line][j] = match_string_to_output(name); } } void -set_output_csv_list_default() { +parse_output_selection_line(int line, char *list) { + + char *token; + int j; + enum netperf_output_name name; - int i = 0; - enum netperf_output_name j; + /* belt and suspenders */ + if (line < 0) { + fprintf(where, + "parse_output_selection_line called with negative line number %d\n",line); + fflush(where); + exit(-1); + } - /* this should cause us to catch everything unless someone botches - adding an output name to the enum. raj 2008-02-22 */ - for (j = SOCKET_TYPE; j < OUTPUT_END; j++) { - output_csv_list[i++] = j; + /* silently ignore extra lines and only warn if debug is set */ + if (line >= NETPERF_MAX_BLOCKS) { + if (debug) { + fprintf(where, + "There can be no more than %d output selection lines." + " Ignoring output selection line %d |%s|\n", + NETPERF_MAX_BLOCKS, + line + 1, + list); + fflush(where); + } + return; } + + j=0; + token = strtok(list," ,"); + while ((token) && (j < NETPERF_OUTPUT_MAX)) { + + name = match_string_to_output_mnenomic(token); + + if ((name == NETPERF_OUTPUT_UNKNOWN) && (debug)) { + fprintf(where,"Ignoring unknown output selector %d |%s| on line %d\n", + j + 1, + token, + line +1); + fflush(where); + } + else { + output_list[line][j] = name; + desired_output_groups |= netperf_output_source[name].output_group; + j++; + } + + token = strtok(NULL," ,"); + } + if ((token) && (debug)) { + fprintf(where, + "There can be no more than %d output selectors per line. " + "Ignoring remaining selectors on line %d\n", + NETPERF_OUTPUT_MAX,line +1); + fflush(where); + } } void -set_output_human_list_default() { +parse_output_selection_direct(char *output_selection) { - int i, j; /* line, column */ - enum netperf_output_name k; + char *source,*line,*remainder,*temp; + int i,len,done; - /* Line One SOCKET_TYPE to RESPONSE_SIZE */ - i = 0; - j = 0; - for (k = SOCKET_TYPE; k <= RESPONSE_SIZE; k++) - output_human_list[i][j++] = k; + len = strlen(output_selection); - /* Line Two LOCAL_CPU_UTIL to TRANSPORT_MSS */ - i = 1; - j = 0; - for (k = LOCAL_CPU_UTIL; k <= TRANSPORT_MSS; k++) - output_human_list[i][j++] = k; + source = strdup(output_selection); + line = (char *) malloc(len); + remainder = (char *) malloc(len); - /* Line Three LOCAL_SEND_THROUGHPUT throught REMOTE_CORK */ - i = 2; - j = 0; - for (k = LOCAL_SEND_THROUGHPUT; k <= REMOTE_CORK; k++) - output_human_list[i][j++] = k; + if ((NULL == source) || + (NULL == line) || + (NULL == remainder)) { + fprintf(where,"Unable to malloc memory for output selection parsing\n"); + fflush(where); + exit(-1); + } - /* Line Four LOCAL_SYSNAME through COMMAND_LINE */ - i = 3; - j = 0; - for (k = LOCAL_SYSNAME; k <= COMMAND_LINE; k++) - output_human_list[i][j++] = k; + i = 0; + done = 0; + do { + break_args_explicit_sep(source,';',line,remainder); + if (line[0]) { + parse_output_selection_line(i,line); + } + if (remainder[0]) { + temp = source; + source = remainder; + remainder = temp; + i++; + /* + if (i == NETPERF_MAX_BLOCKS) { + fprintf(where, + "Too many output blocks requested, maximum is %d\n", + NETPERF_MAX_BLOCKS); + fflush(where); + exit(-1); + } + */ + continue; + } + else { + done = 1; + } + } while (!done); + + free(source); + free(line); + free(remainder); + +} + +/* building blocks for output selection */ +#define NETPERF_TPUT "ELAPSED_TIME,THROUGHPUT,THROUGHPUT_UNITS" +#define NETPERF_OUTPUT_STREAM "LSS_SIZE_END,LSS_SIZE_END,LOCAL_SEND_SIZE" +#define NETPERF_OUTPUT_MAERTS "RSS_SIZE_END,LSR_SIZE_END,REMOTE_SEND_SIZE" +#define NETPERF_CPU "LOCAL_CPU_UTIL,LOCAL_CPU_METHOD,REMOTE_CPU_UTIL,REMOTE_CPU_METHOD,LOCAL_SD,REMOTE_SD,SD_UNITS" +#define NETPERF_RR "LSS_SIZE_END,LSR_SIZE_END,RSR_SIZE_END,RSS_SIZE_END,REQUEST_SIZE,RESPONSE_SIZE" + +void +set_output_list_by_test() { + + char *stream_no_cpu = NETPERF_OUTPUT_STREAM "," NETPERF_TPUT; + char *stream_cpu = NETPERF_OUTPUT_STREAM "," NETPERF_TPUT "," NETPERF_CPU; + char *maerts_no_cpu = NETPERF_OUTPUT_MAERTS "," NETPERF_TPUT; + char *maerts_cpu = NETPERF_OUTPUT_MAERTS "," NETPERF_TPUT "," NETPERF_CPU; + char *rr_no_cpu = NETPERF_RR "," NETPERF_TPUT; + char *rr_cpu = NETPERF_RR "," NETPERF_TPUT "," NETPERF_CPU; + + if (debug) { + fprintf(where,"%s setting the output list by test\n", + __FUNCTION__); + fflush(where); + } + if (NETPERF_XMIT_ONLY(direction)) { + if (!(local_cpu_usage || remote_cpu_usage)) + parse_output_selection_direct(stream_no_cpu); + else + parse_output_selection_direct(stream_cpu); + } + else if (NETPERF_RECV_ONLY(direction)) { + if (!(local_cpu_usage || remote_cpu_usage)) + parse_output_selection_direct(maerts_no_cpu); + else + parse_output_selection_direct(maerts_cpu); + } + else if (NETPERF_CC(direction)) { + if (!(local_cpu_usage || remote_cpu_usage)) + parse_output_selection_direct(rr_no_cpu); + else + parse_output_selection_direct(rr_cpu); + } + else if (NETPERF_IS_RR(direction)) { + if (!(local_cpu_usage || remote_cpu_usage)) + parse_output_selection_direct(rr_no_cpu); + else + parse_output_selection_direct(rr_cpu); + } + else { + /* no idea */ + if (debug) { + fprintf(where,"Cannot determine default test output, using mins\n"); + fflush(where); + } + parse_output_selection_direct(NETPERF_TPUT "," NETPERF_CPU); + } +} + +void +parse_output_selection(char *output_selection) { + + if (debug) { + fprintf(where,"%s is parsing the output selection '%s'\n", + __FUNCTION__, + output_selection); + fflush(where); + } + + /* is it the magic keyword? */ + if (strcasecmp(output_selection,"all") == 0) { + set_output_list_all(); + } + /* do not forget the case when the output_selection is a single + mnemonic without any separators... */ + else if (strchr(output_selection,',') || + strchr(output_selection,';') || + (match_string_to_output_mnenomic(output_selection) != + NETPERF_OUTPUT_UNKNOWN)) { + parse_output_selection_direct(output_selection); + } + else { + parse_output_selection_file(output_selection); + } + if (debug > 2) { + dump_netperf_output_list(stderr); + } + return; } void @@ -1385,8 +1745,13 @@ int i; + if (debug) { + fprintf(where,"%s called\n", + __FUNCTION__); + } + /* belts and suspenders everyone... */ - for (i = OUTPUT_NONE; i < NETPERF_OUTPUT_MAX; i++) { + for (i = NETPERF_OUTPUT_UNKNOWN; i < NETPERF_OUTPUT_MAX; i++) { netperf_output_source[i].output_name = i; netperf_output_source[i].max_line_len = 0; netperf_output_source[i].tot_line_len = 0; @@ -1397,10 +1762,15 @@ netperf_output_source[i].brief = ""; netperf_output_source[i].format = ""; netperf_output_source[i].display_value = NULL; + netperf_output_source[i].output_default = 1; + netperf_output_source[i].output_group = 0; } netperf_output_source[OUTPUT_NONE].output_name = OUTPUT_NONE; netperf_output_source[OUTPUT_NONE].line[0] = " "; + netperf_output_source[OUTPUT_NONE].line[1] = ""; + netperf_output_source[OUTPUT_NONE].line[2] = ""; + netperf_output_source[OUTPUT_NONE].line[3] = ""; netperf_output_source[OUTPUT_NONE].format = "%s"; netperf_output_source[OUTPUT_NONE].display_value = &" "; netperf_output_source[OUTPUT_NONE].max_line_len = @@ -1548,45 +1918,53 @@ netperf_output_source[THROUGHPUT].tot_line_len = NETPERF_LINE_TOT(THROUGHPUT); - netperf_output_source[LOCAL_SEND_THROUGHPUT].output_name = LOCAL_SEND_THROUGHPUT; + netperf_output_source[LOCAL_SEND_THROUGHPUT].output_name = + LOCAL_SEND_THROUGHPUT; netperf_output_source[LOCAL_SEND_THROUGHPUT].line[0] = "Local"; netperf_output_source[LOCAL_SEND_THROUGHPUT].line[1] = "Send"; netperf_output_source[LOCAL_SEND_THROUGHPUT].line[2] = "Throughput"; netperf_output_source[LOCAL_SEND_THROUGHPUT].format = "%.2f"; - netperf_output_source[LOCAL_SEND_THROUGHPUT].display_value = &local_send_thruput; + netperf_output_source[LOCAL_SEND_THROUGHPUT].display_value = + &local_send_thruput; netperf_output_source[LOCAL_SEND_THROUGHPUT].max_line_len = NETPERF_LINE_MAX(LOCAL_SEND_THROUGHPUT); netperf_output_source[LOCAL_SEND_THROUGHPUT].tot_line_len = NETPERF_LINE_TOT(LOCAL_SEND_THROUGHPUT); - netperf_output_source[LOCAL_RECV_THROUGHPUT].output_name = LOCAL_RECV_THROUGHPUT; + netperf_output_source[LOCAL_RECV_THROUGHPUT].output_name = + LOCAL_RECV_THROUGHPUT; netperf_output_source[LOCAL_RECV_THROUGHPUT].line[0] = "Local"; netperf_output_source[LOCAL_RECV_THROUGHPUT].line[1] = "Recv"; netperf_output_source[LOCAL_RECV_THROUGHPUT].line[2] = "Throughput"; netperf_output_source[LOCAL_RECV_THROUGHPUT].format = "%.2f"; - netperf_output_source[LOCAL_RECV_THROUGHPUT].display_value = &local_recv_thruput; + netperf_output_source[LOCAL_RECV_THROUGHPUT].display_value = + &local_recv_thruput; netperf_output_source[LOCAL_RECV_THROUGHPUT].max_line_len = NETPERF_LINE_MAX(LOCAL_RECV_THROUGHPUT); netperf_output_source[LOCAL_RECV_THROUGHPUT].tot_line_len = NETPERF_LINE_TOT(LOCAL_RECV_THROUGHPUT); - netperf_output_source[REMOTE_SEND_THROUGHPUT].output_name = REMOTE_SEND_THROUGHPUT; + netperf_output_source[REMOTE_SEND_THROUGHPUT].output_name = + REMOTE_SEND_THROUGHPUT; netperf_output_source[REMOTE_SEND_THROUGHPUT].line[0] = "Remote"; netperf_output_source[REMOTE_SEND_THROUGHPUT].line[1] = "Send"; netperf_output_source[REMOTE_SEND_THROUGHPUT].line[2] = "Throughput"; netperf_output_source[REMOTE_SEND_THROUGHPUT].format = "%.2f"; - netperf_output_source[REMOTE_SEND_THROUGHPUT].display_value = &remote_send_thruput; + netperf_output_source[REMOTE_SEND_THROUGHPUT].display_value = + &remote_send_thruput; netperf_output_source[REMOTE_SEND_THROUGHPUT].max_line_len = NETPERF_LINE_MAX(REMOTE_SEND_THROUGHPUT); netperf_output_source[REMOTE_SEND_THROUGHPUT].tot_line_len = NETPERF_LINE_TOT(REMOTE_SEND_THROUGHPUT); - netperf_output_source[REMOTE_RECV_THROUGHPUT].output_name = REMOTE_RECV_THROUGHPUT; + netperf_output_source[REMOTE_RECV_THROUGHPUT].output_name = + REMOTE_RECV_THROUGHPUT; netperf_output_source[REMOTE_RECV_THROUGHPUT].line[0] = "Remote"; netperf_output_source[REMOTE_RECV_THROUGHPUT].line[1] = "Recv"; netperf_output_source[REMOTE_RECV_THROUGHPUT].line[2] = "Throughput"; netperf_output_source[REMOTE_RECV_THROUGHPUT].format = "%.2f"; - netperf_output_source[REMOTE_RECV_THROUGHPUT].display_value = &remote_recv_thruput; + netperf_output_source[REMOTE_RECV_THROUGHPUT].display_value = + &remote_recv_thruput; netperf_output_source[REMOTE_RECV_THROUGHPUT].max_line_len = NETPERF_LINE_MAX(REMOTE_RECV_THROUGHPUT); netperf_output_source[REMOTE_RECV_THROUGHPUT].tot_line_len = @@ -1624,12 +2002,14 @@ netperf_output_source[CONFIDENCE_INTERVAL].tot_line_len = NETPERF_LINE_TOT(CONFIDENCE_INTERVAL); - netperf_output_source[CONFIDENCE_ITERATION].output_name = CONFIDENCE_ITERATION; + netperf_output_source[CONFIDENCE_ITERATION].output_name = + CONFIDENCE_ITERATION; netperf_output_source[CONFIDENCE_ITERATION].line[0] = "Confidence"; netperf_output_source[CONFIDENCE_ITERATION].line[1] = "Iterations"; netperf_output_source[CONFIDENCE_ITERATION].line[2] = "Run"; netperf_output_source[CONFIDENCE_ITERATION].format = "%d"; - netperf_output_source[CONFIDENCE_ITERATION].display_value = &confidence_iteration; + netperf_output_source[CONFIDENCE_ITERATION].display_value = + &confidence_iteration; netperf_output_source[CONFIDENCE_ITERATION].max_line_len = NETPERF_LINE_MAX(CONFIDENCE_ITERATION); netperf_output_source[CONFIDENCE_ITERATION].tot_line_len = @@ -1704,6 +2084,32 @@ netperf_output_source[TRANSPORT_MSS].tot_line_len = NETPERF_LINE_TOT(TRANSPORT_MSS); + netperf_output_source[LOCAL_TRANSPORT_RETRANS].output_name = + LOCAL_TRANSPORT_RETRANS; + netperf_output_source[LOCAL_TRANSPORT_RETRANS].line[0] = "Local"; + netperf_output_source[LOCAL_TRANSPORT_RETRANS].line[1] = "Transport"; + netperf_output_source[LOCAL_TRANSPORT_RETRANS].line[2] = "Retransmissions"; + netperf_output_source[LOCAL_TRANSPORT_RETRANS].format = "%d"; + netperf_output_source[LOCAL_TRANSPORT_RETRANS].display_value = + &local_transport_retrans; + netperf_output_source[LOCAL_TRANSPORT_RETRANS].max_line_len = + NETPERF_LINE_MAX(LOCAL_TRANSPORT_RETRANS); + netperf_output_source[LOCAL_TRANSPORT_RETRANS].tot_line_len = + NETPERF_LINE_TOT(LOCAL_TRANSPORT_RETRANS); + + netperf_output_source[REMOTE_TRANSPORT_RETRANS].output_name = + REMOTE_TRANSPORT_RETRANS; + netperf_output_source[REMOTE_TRANSPORT_RETRANS].line[0] = "Remote"; + netperf_output_source[REMOTE_TRANSPORT_RETRANS].line[1] = "Transport"; + netperf_output_source[REMOTE_TRANSPORT_RETRANS].line[2] = "Retransmissions"; + netperf_output_source[REMOTE_TRANSPORT_RETRANS].format = "%d"; + netperf_output_source[REMOTE_TRANSPORT_RETRANS].display_value = + &remote_transport_retrans; + netperf_output_source[REMOTE_TRANSPORT_RETRANS].max_line_len = + NETPERF_LINE_MAX(REMOTE_TRANSPORT_RETRANS); + netperf_output_source[REMOTE_TRANSPORT_RETRANS].tot_line_len = + NETPERF_LINE_TOT(REMOTE_TRANSPORT_RETRANS); + netperf_output_source[REQUEST_SIZE].output_name = REQUEST_SIZE; netperf_output_source[REQUEST_SIZE].line[0] = "Request"; netperf_output_source[REQUEST_SIZE].line[1] = "Size"; @@ -1857,7 +2263,8 @@ netperf_output_source[LOCAL_RECV_CALLS].tot_line_len = NETPERF_LINE_TOT(LOCAL_RECV_CALLS); - netperf_output_source[LOCAL_BYTES_PER_RECV].output_name = LOCAL_BYTES_PER_RECV; + netperf_output_source[LOCAL_BYTES_PER_RECV].output_name = + LOCAL_BYTES_PER_RECV; netperf_output_source[LOCAL_BYTES_PER_RECV].line[0] = "Local"; netperf_output_source[LOCAL_BYTES_PER_RECV].line[1] = "Bytes"; netperf_output_source[LOCAL_BYTES_PER_RECV].line[2] = "Per"; @@ -1869,7 +2276,8 @@ netperf_output_source[LOCAL_BYTES_PER_RECV].tot_line_len = NETPERF_LINE_TOT(LOCAL_BYTES_PER_RECV); - netperf_output_source[LOCAL_BYTES_PER_SEND].output_name = LOCAL_BYTES_PER_SEND; + netperf_output_source[LOCAL_BYTES_PER_SEND].output_name = + LOCAL_BYTES_PER_SEND; netperf_output_source[LOCAL_BYTES_PER_SEND].line[0] = "Local"; netperf_output_source[LOCAL_BYTES_PER_SEND].line[1] = "Bytes"; netperf_output_source[LOCAL_BYTES_PER_SEND].line[2] = "Per"; @@ -1983,37 +2391,43 @@ netperf_output_source[LOCAL_SEND_ALIGN].tot_line_len = NETPERF_LINE_TOT(LOCAL_SEND_ALIGN); - netperf_output_source[LOCAL_SEND_DIRTY_COUNT].output_name = LOCAL_SEND_DIRTY_COUNT; + netperf_output_source[LOCAL_SEND_DIRTY_COUNT].output_name = + LOCAL_SEND_DIRTY_COUNT; netperf_output_source[LOCAL_SEND_DIRTY_COUNT].line[0] = "Local"; netperf_output_source[LOCAL_SEND_DIRTY_COUNT].line[1] = "Send"; netperf_output_source[LOCAL_SEND_DIRTY_COUNT].line[2] = "Dirty"; netperf_output_source[LOCAL_SEND_DIRTY_COUNT].line[3] = "Count"; netperf_output_source[LOCAL_SEND_DIRTY_COUNT].format = "%d"; - netperf_output_source[LOCAL_SEND_DIRTY_COUNT].display_value = &loc_dirty_count; + netperf_output_source[LOCAL_SEND_DIRTY_COUNT].display_value = + &loc_dirty_count; netperf_output_source[LOCAL_SEND_DIRTY_COUNT].max_line_len = NETPERF_LINE_MAX(LOCAL_SEND_DIRTY_COUNT); netperf_output_source[LOCAL_SEND_DIRTY_COUNT].tot_line_len = NETPERF_LINE_TOT(LOCAL_SEND_DIRTY_COUNT); - netperf_output_source[LOCAL_RECV_DIRTY_COUNT].output_name = LOCAL_RECV_DIRTY_COUNT; + netperf_output_source[LOCAL_RECV_DIRTY_COUNT].output_name = + LOCAL_RECV_DIRTY_COUNT; netperf_output_source[LOCAL_RECV_DIRTY_COUNT].line[0] = "Local"; netperf_output_source[LOCAL_RECV_DIRTY_COUNT].line[1] = "Recv"; netperf_output_source[LOCAL_RECV_DIRTY_COUNT].line[2] = "Dirty"; netperf_output_source[LOCAL_RECV_DIRTY_COUNT].line[3] = "Count"; netperf_output_source[LOCAL_RECV_DIRTY_COUNT].format = "%d"; - netperf_output_source[LOCAL_RECV_DIRTY_COUNT].display_value = &loc_dirty_count; + netperf_output_source[LOCAL_RECV_DIRTY_COUNT].display_value = + &loc_dirty_count; netperf_output_source[LOCAL_RECV_DIRTY_COUNT].max_line_len = NETPERF_LINE_MAX(LOCAL_RECV_DIRTY_COUNT); netperf_output_source[LOCAL_RECV_DIRTY_COUNT].tot_line_len = NETPERF_LINE_TOT(LOCAL_RECV_DIRTY_COUNT); - netperf_output_source[LOCAL_RECV_CLEAN_COUNT].output_name = LOCAL_RECV_CLEAN_COUNT; + netperf_output_source[LOCAL_RECV_CLEAN_COUNT].output_name = + LOCAL_RECV_CLEAN_COUNT; netperf_output_source[LOCAL_RECV_CLEAN_COUNT].line[0] = "Local"; netperf_output_source[LOCAL_RECV_CLEAN_COUNT].line[1] = "Recv"; netperf_output_source[LOCAL_RECV_CLEAN_COUNT].line[2] = "Clean"; netperf_output_source[LOCAL_RECV_CLEAN_COUNT].line[3] = "Count"; netperf_output_source[LOCAL_RECV_CLEAN_COUNT].format = "%d"; - netperf_output_source[LOCAL_RECV_CLEAN_COUNT].display_value = &loc_clean_count; + netperf_output_source[LOCAL_RECV_CLEAN_COUNT].display_value = + &loc_clean_count; netperf_output_source[LOCAL_RECV_CLEAN_COUNT].max_line_len = NETPERF_LINE_MAX(LOCAL_RECV_CLEAN_COUNT); netperf_output_source[LOCAL_RECV_CLEAN_COUNT].tot_line_len = @@ -2025,7 +2439,8 @@ netperf_output_source[LOCAL_CPU_UTIL].line[2] = "Util"; netperf_output_source[LOCAL_CPU_UTIL].line[3] = "%"; netperf_output_source[LOCAL_CPU_UTIL].format = "%.2f"; - netperf_output_source[LOCAL_CPU_UTIL].display_value = &local_cpu_utilization_double; + netperf_output_source[LOCAL_CPU_UTIL].display_value = + &local_cpu_utilization_double; netperf_output_source[LOCAL_CPU_UTIL].max_line_len = NETPERF_LINE_MAX(LOCAL_CPU_UTIL); netperf_output_source[LOCAL_CPU_UTIL].tot_line_len = @@ -2037,7 +2452,8 @@ netperf_output_source[LOCAL_CPU_PEAK_UTIL].line[2] = "Per CPU"; netperf_output_source[LOCAL_CPU_PEAK_UTIL].line[3] = "Util %"; netperf_output_source[LOCAL_CPU_PEAK_UTIL].format = "%.2f"; - netperf_output_source[LOCAL_CPU_PEAK_UTIL].display_value = &lib_local_peak_cpu_util; + netperf_output_source[LOCAL_CPU_PEAK_UTIL].display_value = + &lib_local_peak_cpu_util; netperf_output_source[LOCAL_CPU_PEAK_UTIL].max_line_len = NETPERF_LINE_MAX(LOCAL_CPU_PEAK_UTIL); netperf_output_source[LOCAL_CPU_PEAK_UTIL].tot_line_len = @@ -2049,7 +2465,8 @@ netperf_output_source[LOCAL_CPU_PEAK_ID].line[2] = "Per CPU"; netperf_output_source[LOCAL_CPU_PEAK_ID].line[3] = "ID"; netperf_output_source[LOCAL_CPU_PEAK_ID].format = "%d"; - netperf_output_source[LOCAL_CPU_PEAK_ID].display_value = &lib_local_peak_cpu_id; + netperf_output_source[LOCAL_CPU_PEAK_ID].display_value = + &lib_local_peak_cpu_id; netperf_output_source[LOCAL_CPU_PEAK_ID].max_line_len = NETPERF_LINE_MAX(LOCAL_CPU_PEAK_ID); netperf_output_source[LOCAL_CPU_PEAK_ID].tot_line_len = @@ -2251,31 +2668,36 @@ netperf_output_source[REMOTE_RECV_CALLS].line[2] = "Calls"; netperf_output_source[REMOTE_RECV_CALLS].line[3] = ""; netperf_output_source[REMOTE_RECV_CALLS].format = "%lld"; - netperf_output_source[REMOTE_RECV_CALLS].display_value = &remote_receive_calls; + netperf_output_source[REMOTE_RECV_CALLS].display_value = + &remote_receive_calls; netperf_output_source[REMOTE_RECV_CALLS].max_line_len = NETPERF_LINE_MAX(REMOTE_RECV_CALLS); netperf_output_source[REMOTE_RECV_CALLS].tot_line_len = NETPERF_LINE_TOT(REMOTE_RECV_CALLS); - netperf_output_source[REMOTE_BYTES_PER_RECV].output_name = REMOTE_BYTES_PER_RECV; + netperf_output_source[REMOTE_BYTES_PER_RECV].output_name = + REMOTE_BYTES_PER_RECV; netperf_output_source[REMOTE_BYTES_PER_RECV].line[0] = "Remote"; netperf_output_source[REMOTE_BYTES_PER_RECV].line[1] = "Bytes"; netperf_output_source[REMOTE_BYTES_PER_RECV].line[2] = "Per"; netperf_output_source[REMOTE_BYTES_PER_RECV].line[3] = "Recv"; netperf_output_source[REMOTE_BYTES_PER_RECV].format = "%.2f"; - netperf_output_source[REMOTE_BYTES_PER_RECV].display_value = &remote_bytes_per_recv; + netperf_output_source[REMOTE_BYTES_PER_RECV].display_value = + &remote_bytes_per_recv; netperf_output_source[REMOTE_BYTES_PER_RECV].max_line_len = NETPERF_LINE_MAX(REMOTE_BYTES_PER_RECV); netperf_output_source[REMOTE_BYTES_PER_RECV].tot_line_len = NETPERF_LINE_TOT(REMOTE_BYTES_PER_RECV); - netperf_output_source[REMOTE_BYTES_PER_SEND].output_name = REMOTE_BYTES_PER_SEND; + netperf_output_source[REMOTE_BYTES_PER_SEND].output_name = + REMOTE_BYTES_PER_SEND; netperf_output_source[REMOTE_BYTES_PER_SEND].line[0] = "Remote"; netperf_output_source[REMOTE_BYTES_PER_SEND].line[1] = "Bytes"; netperf_output_source[REMOTE_BYTES_PER_SEND].line[2] = "Per"; netperf_output_source[REMOTE_BYTES_PER_SEND].line[3] = "Send"; netperf_output_source[REMOTE_BYTES_PER_SEND].format = "%.2f"; - netperf_output_source[REMOTE_BYTES_PER_SEND].display_value = &remote_bytes_per_send; + netperf_output_source[REMOTE_BYTES_PER_SEND].display_value = + &remote_bytes_per_send; netperf_output_source[REMOTE_BYTES_PER_SEND].max_line_len = NETPERF_LINE_MAX(REMOTE_BYTES_PER_SEND); netperf_output_source[REMOTE_BYTES_PER_SEND].tot_line_len = @@ -2287,7 +2709,8 @@ netperf_output_source[REMOTE_BYTES_RECVD].line[2] = "Received"; netperf_output_source[REMOTE_BYTES_RECVD].line[3] = ""; netperf_output_source[REMOTE_BYTES_RECVD].format = "%lld"; - netperf_output_source[REMOTE_BYTES_RECVD].display_value = &remote_bytes_received; + netperf_output_source[REMOTE_BYTES_RECVD].display_value = + &remote_bytes_received; netperf_output_source[REMOTE_BYTES_RECVD].max_line_len = NETPERF_LINE_MAX(REMOTE_BYTES_RECVD); netperf_output_source[REMOTE_BYTES_RECVD].tot_line_len = @@ -2383,37 +2806,43 @@ netperf_output_source[REMOTE_SEND_ALIGN].tot_line_len = NETPERF_LINE_TOT(REMOTE_SEND_ALIGN); - netperf_output_source[REMOTE_SEND_DIRTY_COUNT].output_name = REMOTE_SEND_DIRTY_COUNT; + netperf_output_source[REMOTE_SEND_DIRTY_COUNT].output_name = + REMOTE_SEND_DIRTY_COUNT; netperf_output_source[REMOTE_SEND_DIRTY_COUNT].line[0] = "Remote"; netperf_output_source[REMOTE_SEND_DIRTY_COUNT].line[1] = "Send"; netperf_output_source[REMOTE_SEND_DIRTY_COUNT].line[2] = "Dirty"; netperf_output_source[REMOTE_SEND_DIRTY_COUNT].line[3] = "Count"; netperf_output_source[REMOTE_SEND_DIRTY_COUNT].format = "%d"; - netperf_output_source[REMOTE_SEND_DIRTY_COUNT].display_value = &rem_dirty_count; + netperf_output_source[REMOTE_SEND_DIRTY_COUNT].display_value = + &rem_dirty_count; netperf_output_source[REMOTE_SEND_DIRTY_COUNT].max_line_len = NETPERF_LINE_MAX(REMOTE_SEND_DIRTY_COUNT); netperf_output_source[REMOTE_SEND_DIRTY_COUNT].tot_line_len = NETPERF_LINE_TOT(REMOTE_SEND_DIRTY_COUNT); - netperf_output_source[REMOTE_RECV_DIRTY_COUNT].output_name = REMOTE_RECV_DIRTY_COUNT; + netperf_output_source[REMOTE_RECV_DIRTY_COUNT].output_name = + REMOTE_RECV_DIRTY_COUNT; netperf_output_source[REMOTE_RECV_DIRTY_COUNT].line[0] = "Remote"; netperf_output_source[REMOTE_RECV_DIRTY_COUNT].line[1] = "Recv"; netperf_output_source[REMOTE_RECV_DIRTY_COUNT].line[2] = "Dirty"; netperf_output_source[REMOTE_RECV_DIRTY_COUNT].line[3] = "Count"; netperf_output_source[REMOTE_RECV_DIRTY_COUNT].format = "%d"; - netperf_output_source[REMOTE_RECV_DIRTY_COUNT].display_value = &rem_dirty_count; + netperf_output_source[REMOTE_RECV_DIRTY_COUNT].display_value = + &rem_dirty_count; netperf_output_source[REMOTE_RECV_DIRTY_COUNT].max_line_len = NETPERF_LINE_MAX(REMOTE_RECV_DIRTY_COUNT); netperf_output_source[REMOTE_RECV_DIRTY_COUNT].tot_line_len = NETPERF_LINE_TOT(REMOTE_RECV_DIRTY_COUNT); - netperf_output_source[REMOTE_RECV_CLEAN_COUNT].output_name = REMOTE_RECV_CLEAN_COUNT; + netperf_output_source[REMOTE_RECV_CLEAN_COUNT].output_name = + REMOTE_RECV_CLEAN_COUNT; netperf_output_source[REMOTE_RECV_CLEAN_COUNT].line[0] = "Remote"; netperf_output_source[REMOTE_RECV_CLEAN_COUNT].line[1] = "Recv"; netperf_output_source[REMOTE_RECV_CLEAN_COUNT].line[2] = "Clean"; netperf_output_source[REMOTE_RECV_CLEAN_COUNT].line[3] = "Count"; netperf_output_source[REMOTE_RECV_CLEAN_COUNT].format = "%d"; - netperf_output_source[REMOTE_RECV_CLEAN_COUNT].display_value = &rem_clean_count; + netperf_output_source[REMOTE_RECV_CLEAN_COUNT].display_value = + &rem_clean_count; netperf_output_source[REMOTE_RECV_CLEAN_COUNT].max_line_len = NETPERF_LINE_MAX(REMOTE_RECV_CLEAN_COUNT); netperf_output_source[REMOTE_RECV_CLEAN_COUNT].tot_line_len = @@ -2425,19 +2854,22 @@ netperf_output_source[REMOTE_CPU_UTIL].line[2] = "Util"; netperf_output_source[REMOTE_CPU_UTIL].line[3] = "%"; netperf_output_source[REMOTE_CPU_UTIL].format = "%.2f"; - netperf_output_source[REMOTE_CPU_UTIL].display_value = &remote_cpu_utilization_double; + netperf_output_source[REMOTE_CPU_UTIL].display_value = + &remote_cpu_utilization_double; netperf_output_source[REMOTE_CPU_UTIL].max_line_len = NETPERF_LINE_MAX(REMOTE_CPU_UTIL); netperf_output_source[REMOTE_CPU_UTIL].tot_line_len = NETPERF_LINE_TOT(REMOTE_CPU_UTIL); - netperf_output_source[REMOTE_CPU_PEAK_UTIL].output_name = REMOTE_CPU_PEAK_UTIL; + netperf_output_source[REMOTE_CPU_PEAK_UTIL].output_name = + REMOTE_CPU_PEAK_UTIL; netperf_output_source[REMOTE_CPU_PEAK_UTIL].line[0] = "Remote"; netperf_output_source[REMOTE_CPU_PEAK_UTIL].line[1] = "Peak"; netperf_output_source[REMOTE_CPU_PEAK_UTIL].line[2] = "Per CPU"; netperf_output_source[REMOTE_CPU_PEAK_UTIL].line[3] = "Util %"; netperf_output_source[REMOTE_CPU_PEAK_UTIL].format = "%.2f"; - netperf_output_source[REMOTE_CPU_PEAK_UTIL].display_value = &lib_remote_peak_cpu_util; + netperf_output_source[REMOTE_CPU_PEAK_UTIL].display_value = + &lib_remote_peak_cpu_util; netperf_output_source[REMOTE_CPU_PEAK_UTIL].max_line_len = NETPERF_LINE_MAX(REMOTE_CPU_PEAK_UTIL); netperf_output_source[REMOTE_CPU_PEAK_UTIL].tot_line_len = @@ -2449,7 +2881,8 @@ netperf_output_source[REMOTE_CPU_PEAK_ID].line[2] = "Per CPU"; netperf_output_source[REMOTE_CPU_PEAK_ID].line[3] = "ID"; netperf_output_source[REMOTE_CPU_PEAK_ID].format = "%d"; - netperf_output_source[REMOTE_CPU_PEAK_ID].display_value = &lib_remote_peak_cpu_id; + netperf_output_source[REMOTE_CPU_PEAK_ID].display_value = + &lib_remote_peak_cpu_id; netperf_output_source[REMOTE_CPU_PEAK_ID].max_line_len = NETPERF_LINE_MAX(REMOTE_CPU_PEAK_ID); netperf_output_source[REMOTE_CPU_PEAK_ID].tot_line_len = @@ -2473,7 +2906,8 @@ netperf_output_source[REMOTE_SD].line[2] = "Demand"; netperf_output_source[REMOTE_SD].line[3] = ""; netperf_output_source[REMOTE_SD].format = "%.3f"; - netperf_output_source[REMOTE_SD].display_value = &remote_service_demand_double; + netperf_output_source[REMOTE_SD].display_value = + &remote_service_demand_double; netperf_output_source[REMOTE_SD].max_line_len = NETPERF_LINE_MAX(REMOTE_SD); netperf_output_source[REMOTE_SD].tot_line_len = @@ -2537,30 +2971,40 @@ NETPERF_LINE_MAX(LOCAL_DRIVER_NAME); netperf_output_source[LOCAL_DRIVER_NAME].tot_line_len = NETPERF_LINE_TOT(LOCAL_DRIVER_NAME); + netperf_output_source[LOCAL_DRIVER_NAME].output_group = + OMNI_WANT_LOC_DRVINFO; - netperf_output_source[LOCAL_DRIVER_VERSION].output_name = LOCAL_DRIVER_VERSION; + netperf_output_source[LOCAL_DRIVER_VERSION].output_name = + LOCAL_DRIVER_VERSION; netperf_output_source[LOCAL_DRIVER_VERSION].line[0] = "Local"; netperf_output_source[LOCAL_DRIVER_VERSION].line[1] = "Driver"; netperf_output_source[LOCAL_DRIVER_VERSION].line[2] = "Version"; netperf_output_source[LOCAL_DRIVER_VERSION].line[3] = ""; netperf_output_source[LOCAL_DRIVER_VERSION].format = "%s"; - netperf_output_source[LOCAL_DRIVER_VERSION].display_value = local_driver_version; + netperf_output_source[LOCAL_DRIVER_VERSION].display_value = + local_driver_version; netperf_output_source[LOCAL_DRIVER_VERSION].max_line_len = NETPERF_LINE_MAX(LOCAL_DRIVER_VERSION); netperf_output_source[LOCAL_DRIVER_VERSION].tot_line_len = NETPERF_LINE_TOT(LOCAL_DRIVER_VERSION); + netperf_output_source[LOCAL_DRIVER_VERSION].output_group = + OMNI_WANT_LOC_DRVINFO; - netperf_output_source[LOCAL_DRIVER_FIRMWARE].output_name = LOCAL_DRIVER_FIRMWARE; + netperf_output_source[LOCAL_DRIVER_FIRMWARE].output_name = + LOCAL_DRIVER_FIRMWARE; netperf_output_source[LOCAL_DRIVER_FIRMWARE].line[0] = "Local"; netperf_output_source[LOCAL_DRIVER_FIRMWARE].line[1] = "Driver"; netperf_output_source[LOCAL_DRIVER_FIRMWARE].line[2] = "Firmware"; netperf_output_source[LOCAL_DRIVER_FIRMWARE].line[3] = ""; netperf_output_source[LOCAL_DRIVER_FIRMWARE].format = "%s"; - netperf_output_source[LOCAL_DRIVER_FIRMWARE].display_value = local_driver_firmware; + netperf_output_source[LOCAL_DRIVER_FIRMWARE].display_value = + local_driver_firmware; netperf_output_source[LOCAL_DRIVER_FIRMWARE].max_line_len = NETPERF_LINE_MAX(LOCAL_DRIVER_FIRMWARE); netperf_output_source[LOCAL_DRIVER_FIRMWARE].tot_line_len = NETPERF_LINE_TOT(LOCAL_DRIVER_FIRMWARE); + netperf_output_source[LOCAL_DRIVER_FIRMWARE].output_group = + OMNI_WANT_LOC_DRVINFO; netperf_output_source[LOCAL_DRIVER_BUS].output_name = LOCAL_DRIVER_BUS; netperf_output_source[LOCAL_DRIVER_BUS].line[0] = "Local"; @@ -2573,6 +3017,8 @@ NETPERF_LINE_MAX(LOCAL_DRIVER_BUS); netperf_output_source[LOCAL_DRIVER_BUS].tot_line_len = NETPERF_LINE_TOT(LOCAL_DRIVER_BUS); + netperf_output_source[LOCAL_DRIVER_BUS].output_group = + OMNI_WANT_LOC_DRVINFO; netperf_output_source[REMOTE_DRIVER_NAME].output_name = REMOTE_DRIVER_NAME; netperf_output_source[REMOTE_DRIVER_NAME].line[0] = "Remote"; @@ -2585,30 +3031,40 @@ NETPERF_LINE_MAX(REMOTE_DRIVER_NAME); netperf_output_source[REMOTE_DRIVER_NAME].tot_line_len = NETPERF_LINE_TOT(REMOTE_DRIVER_NAME); + netperf_output_source[REMOTE_DRIVER_NAME].output_group = + OMNI_WANT_REM_DRVINFO; - netperf_output_source[REMOTE_DRIVER_VERSION].output_name = REMOTE_DRIVER_VERSION; + netperf_output_source[REMOTE_DRIVER_VERSION].output_name = + REMOTE_DRIVER_VERSION; netperf_output_source[REMOTE_DRIVER_VERSION].line[0] = "Remote"; netperf_output_source[REMOTE_DRIVER_VERSION].line[1] = "Driver"; netperf_output_source[REMOTE_DRIVER_VERSION].line[2] = "Version"; netperf_output_source[REMOTE_DRIVER_VERSION].line[3] = ""; netperf_output_source[REMOTE_DRIVER_VERSION].format = "%s"; - netperf_output_source[REMOTE_DRIVER_VERSION].display_value = remote_driver_version; + netperf_output_source[REMOTE_DRIVER_VERSION].display_value = + remote_driver_version; netperf_output_source[REMOTE_DRIVER_VERSION].max_line_len = NETPERF_LINE_MAX(REMOTE_DRIVER_VERSION); netperf_output_source[REMOTE_DRIVER_VERSION].tot_line_len = NETPERF_LINE_TOT(REMOTE_DRIVER_VERSION); + netperf_output_source[REMOTE_DRIVER_VERSION].output_group = + OMNI_WANT_REM_DRVINFO; - netperf_output_source[REMOTE_DRIVER_FIRMWARE].output_name = REMOTE_DRIVER_FIRMWARE; + netperf_output_source[REMOTE_DRIVER_FIRMWARE].output_name = + REMOTE_DRIVER_FIRMWARE; netperf_output_source[REMOTE_DRIVER_FIRMWARE].line[0] = "Remote"; netperf_output_source[REMOTE_DRIVER_FIRMWARE].line[1] = "Driver"; netperf_output_source[REMOTE_DRIVER_FIRMWARE].line[2] = "Firmware"; netperf_output_source[REMOTE_DRIVER_FIRMWARE].line[3] = ""; netperf_output_source[REMOTE_DRIVER_FIRMWARE].format = "%s"; - netperf_output_source[REMOTE_DRIVER_FIRMWARE].display_value = remote_driver_firmware; + netperf_output_source[REMOTE_DRIVER_FIRMWARE].display_value = + remote_driver_firmware; netperf_output_source[REMOTE_DRIVER_FIRMWARE].max_line_len = NETPERF_LINE_MAX(REMOTE_DRIVER_FIRMWARE); netperf_output_source[REMOTE_DRIVER_FIRMWARE].tot_line_len = NETPERF_LINE_TOT(REMOTE_DRIVER_FIRMWARE); + netperf_output_source[REMOTE_DRIVER_FIRMWARE].output_group = + OMNI_WANT_REM_DRVINFO; netperf_output_source[REMOTE_DRIVER_BUS].output_name = REMOTE_DRIVER_BUS; netperf_output_source[REMOTE_DRIVER_BUS].line[0] = "Remote"; @@ -2621,150 +3077,200 @@ NETPERF_LINE_MAX(REMOTE_DRIVER_BUS); netperf_output_source[REMOTE_DRIVER_BUS].tot_line_len = NETPERF_LINE_TOT(REMOTE_DRIVER_BUS); + netperf_output_source[REMOTE_DRIVER_BUS].output_group = + OMNI_WANT_REM_DRVINFO; - netperf_output_source[LOCAL_INTERFACE_SUBDEVICE].output_name = LOCAL_INTERFACE_SUBDEVICE; + netperf_output_source[LOCAL_INTERFACE_SUBDEVICE].output_name = + LOCAL_INTERFACE_SUBDEVICE; netperf_output_source[LOCAL_INTERFACE_SUBDEVICE].line[0] = "Local"; netperf_output_source[LOCAL_INTERFACE_SUBDEVICE].line[1] = "Interface"; netperf_output_source[LOCAL_INTERFACE_SUBDEVICE].line[2] = "Subdevice"; netperf_output_source[LOCAL_INTERFACE_SUBDEVICE].line[3] = ""; netperf_output_source[LOCAL_INTERFACE_SUBDEVICE].format = "0x%.4x"; - netperf_output_source[LOCAL_INTERFACE_SUBDEVICE].display_value = &local_interface_subdevice; + netperf_output_source[LOCAL_INTERFACE_SUBDEVICE].display_value = + &local_interface_subdevice; netperf_output_source[LOCAL_INTERFACE_SUBDEVICE].max_line_len = NETPERF_LINE_MAX(LOCAL_INTERFACE_SUBDEVICE); netperf_output_source[LOCAL_INTERFACE_SUBDEVICE].tot_line_len = NETPERF_LINE_TOT(LOCAL_INTERFACE_SUBDEVICE); + netperf_output_source[LOCAL_INTERFACE_SUBDEVICE].output_group = + OMNI_WANT_LOC_IFIDS; - netperf_output_source[LOCAL_INTERFACE_DEVICE].output_name = LOCAL_INTERFACE_DEVICE; + netperf_output_source[LOCAL_INTERFACE_DEVICE].output_name = + LOCAL_INTERFACE_DEVICE; netperf_output_source[LOCAL_INTERFACE_DEVICE].line[0] = "Local"; netperf_output_source[LOCAL_INTERFACE_DEVICE].line[1] = "Interface"; netperf_output_source[LOCAL_INTERFACE_DEVICE].line[2] = "Device"; netperf_output_source[LOCAL_INTERFACE_DEVICE].line[3] = ""; netperf_output_source[LOCAL_INTERFACE_DEVICE].format = "0x%.4x"; - netperf_output_source[LOCAL_INTERFACE_DEVICE].display_value = &local_interface_device; + netperf_output_source[LOCAL_INTERFACE_DEVICE].display_value = + &local_interface_device; netperf_output_source[LOCAL_INTERFACE_DEVICE].max_line_len = NETPERF_LINE_MAX(LOCAL_INTERFACE_DEVICE); netperf_output_source[LOCAL_INTERFACE_DEVICE].tot_line_len = NETPERF_LINE_TOT(LOCAL_INTERFACE_DEVICE); + netperf_output_source[LOCAL_INTERFACE_DEVICE].output_group = + OMNI_WANT_LOC_IFIDS; - netperf_output_source[LOCAL_INTERFACE_SUBVENDOR].output_name = LOCAL_INTERFACE_SUBVENDOR; + netperf_output_source[LOCAL_INTERFACE_SUBVENDOR].output_name = + LOCAL_INTERFACE_SUBVENDOR; netperf_output_source[LOCAL_INTERFACE_SUBVENDOR].line[0] = "Local"; netperf_output_source[LOCAL_INTERFACE_SUBVENDOR].line[1] = "Interface"; netperf_output_source[LOCAL_INTERFACE_SUBVENDOR].line[2] = "Subvendor"; netperf_output_source[LOCAL_INTERFACE_SUBVENDOR].line[3] = ""; netperf_output_source[LOCAL_INTERFACE_SUBVENDOR].format = "0x%.4x"; - netperf_output_source[LOCAL_INTERFACE_SUBVENDOR].display_value = &local_interface_subvendor; + netperf_output_source[LOCAL_INTERFACE_SUBVENDOR].display_value = + &local_interface_subvendor; netperf_output_source[LOCAL_INTERFACE_SUBVENDOR].max_line_len = NETPERF_LINE_MAX(LOCAL_INTERFACE_SUBVENDOR); netperf_output_source[LOCAL_INTERFACE_SUBVENDOR].tot_line_len = NETPERF_LINE_TOT(LOCAL_INTERFACE_SUBVENDOR); + netperf_output_source[LOCAL_INTERFACE_SUBVENDOR].output_group = + OMNI_WANT_LOC_IFIDS; - netperf_output_source[LOCAL_INTERFACE_VENDOR].output_name = LOCAL_INTERFACE_VENDOR; + netperf_output_source[LOCAL_INTERFACE_VENDOR].output_name = + LOCAL_INTERFACE_VENDOR; netperf_output_source[LOCAL_INTERFACE_VENDOR].line[0] = "Local"; netperf_output_source[LOCAL_INTERFACE_VENDOR].line[1] = "Interface"; netperf_output_source[LOCAL_INTERFACE_VENDOR].line[2] = "Vendor"; netperf_output_source[LOCAL_INTERFACE_VENDOR].line[3] = ""; netperf_output_source[LOCAL_INTERFACE_VENDOR].format = "0x%.4x"; - netperf_output_source[LOCAL_INTERFACE_VENDOR].display_value = &local_interface_vendor; + netperf_output_source[LOCAL_INTERFACE_VENDOR].display_value = + &local_interface_vendor; netperf_output_source[LOCAL_INTERFACE_VENDOR].max_line_len = NETPERF_LINE_MAX(LOCAL_INTERFACE_VENDOR); netperf_output_source[LOCAL_INTERFACE_VENDOR].tot_line_len = NETPERF_LINE_TOT(LOCAL_INTERFACE_VENDOR); + netperf_output_source[LOCAL_INTERFACE_VENDOR].output_group = + OMNI_WANT_LOC_IFIDS; - netperf_output_source[REMOTE_INTERFACE_SUBDEVICE].output_name = REMOTE_INTERFACE_SUBDEVICE; + netperf_output_source[REMOTE_INTERFACE_SUBDEVICE].output_name = + REMOTE_INTERFACE_SUBDEVICE; netperf_output_source[REMOTE_INTERFACE_SUBDEVICE].line[0] = "Remote"; netperf_output_source[REMOTE_INTERFACE_SUBDEVICE].line[1] = "Interface"; netperf_output_source[REMOTE_INTERFACE_SUBDEVICE].line[2] = "Subdevice"; netperf_output_source[REMOTE_INTERFACE_SUBDEVICE].line[3] = ""; netperf_output_source[REMOTE_INTERFACE_SUBDEVICE].format = "0x%.4x"; - netperf_output_source[REMOTE_INTERFACE_SUBDEVICE].display_value = &remote_interface_subdevice; + netperf_output_source[REMOTE_INTERFACE_SUBDEVICE].display_value = + &remote_interface_subdevice; netperf_output_source[REMOTE_INTERFACE_SUBDEVICE].max_line_len = NETPERF_LINE_MAX(REMOTE_INTERFACE_SUBDEVICE); netperf_output_source[REMOTE_INTERFACE_SUBDEVICE].tot_line_len = NETPERF_LINE_TOT(REMOTE_INTERFACE_SUBDEVICE); + netperf_output_source[REMOTE_INTERFACE_SUBDEVICE].output_group = + OMNI_WANT_REM_IFIDS; - netperf_output_source[REMOTE_INTERFACE_DEVICE].output_name = REMOTE_INTERFACE_DEVICE; + netperf_output_source[REMOTE_INTERFACE_DEVICE].output_name = + REMOTE_INTERFACE_DEVICE; netperf_output_source[REMOTE_INTERFACE_DEVICE].line[0] = "Remote"; netperf_output_source[REMOTE_INTERFACE_DEVICE].line[1] = "Interface"; netperf_output_source[REMOTE_INTERFACE_DEVICE].line[2] = "Device"; netperf_output_source[REMOTE_INTERFACE_DEVICE].line[3] = ""; netperf_output_source[REMOTE_INTERFACE_DEVICE].format = "0x%.4x"; - netperf_output_source[REMOTE_INTERFACE_DEVICE].display_value = &remote_interface_device; + netperf_output_source[REMOTE_INTERFACE_DEVICE].display_value = + &remote_interface_device; netperf_output_source[REMOTE_INTERFACE_DEVICE].max_line_len = NETPERF_LINE_MAX(REMOTE_INTERFACE_DEVICE); netperf_output_source[REMOTE_INTERFACE_DEVICE].tot_line_len = NETPERF_LINE_TOT(REMOTE_INTERFACE_DEVICE); + netperf_output_source[REMOTE_INTERFACE_DEVICE].output_group = + OMNI_WANT_REM_IFIDS; - netperf_output_source[REMOTE_INTERFACE_SUBVENDOR].output_name = REMOTE_INTERFACE_SUBVENDOR; + netperf_output_source[REMOTE_INTERFACE_SUBVENDOR].output_name = + REMOTE_INTERFACE_SUBVENDOR; netperf_output_source[REMOTE_INTERFACE_SUBVENDOR].line[0] = "Remote"; netperf_output_source[REMOTE_INTERFACE_SUBVENDOR].line[1] = "Interface"; netperf_output_source[REMOTE_INTERFACE_SUBVENDOR].line[2] = "Subvendor"; netperf_output_source[REMOTE_INTERFACE_SUBVENDOR].line[3] = ""; netperf_output_source[REMOTE_INTERFACE_SUBVENDOR].format = "0x%.4x"; - netperf_output_source[REMOTE_INTERFACE_SUBVENDOR].display_value = &remote_interface_subvendor; + netperf_output_source[REMOTE_INTERFACE_SUBVENDOR].display_value = + &remote_interface_subvendor; netperf_output_source[REMOTE_INTERFACE_SUBVENDOR].max_line_len = NETPERF_LINE_MAX(REMOTE_INTERFACE_SUBVENDOR); netperf_output_source[REMOTE_INTERFACE_SUBVENDOR].tot_line_len = NETPERF_LINE_TOT(REMOTE_INTERFACE_SUBVENDOR); + netperf_output_source[REMOTE_INTERFACE_SUBVENDOR].output_group = + OMNI_WANT_REM_IFIDS; - netperf_output_source[REMOTE_INTERFACE_VENDOR].output_name = REMOTE_INTERFACE_VENDOR; + netperf_output_source[REMOTE_INTERFACE_VENDOR].output_name = + REMOTE_INTERFACE_VENDOR; netperf_output_source[REMOTE_INTERFACE_VENDOR].line[0] = "Remote"; netperf_output_source[REMOTE_INTERFACE_VENDOR].line[1] = "Interface"; netperf_output_source[REMOTE_INTERFACE_VENDOR].line[2] = "Vendor"; netperf_output_source[REMOTE_INTERFACE_VENDOR].line[3] = ""; netperf_output_source[REMOTE_INTERFACE_VENDOR].format = "0x%.4x"; - netperf_output_source[REMOTE_INTERFACE_VENDOR].display_value = &remote_interface_vendor; + netperf_output_source[REMOTE_INTERFACE_VENDOR].display_value = + &remote_interface_vendor; netperf_output_source[REMOTE_INTERFACE_VENDOR].max_line_len = NETPERF_LINE_MAX(REMOTE_INTERFACE_VENDOR); netperf_output_source[REMOTE_INTERFACE_VENDOR].tot_line_len = NETPERF_LINE_TOT(REMOTE_INTERFACE_VENDOR); + netperf_output_source[REMOTE_INTERFACE_VENDOR].output_group = + OMNI_WANT_REM_IFIDS; - netperf_output_source[LOCAL_INTERFACE_NAME].output_name = LOCAL_INTERFACE_NAME; + netperf_output_source[LOCAL_INTERFACE_NAME].output_name = + LOCAL_INTERFACE_NAME; netperf_output_source[LOCAL_INTERFACE_NAME].line[0] = "Local"; netperf_output_source[LOCAL_INTERFACE_NAME].line[1] = "Interface"; netperf_output_source[LOCAL_INTERFACE_NAME].line[2] = "Name"; netperf_output_source[LOCAL_INTERFACE_NAME].line[3] = ""; netperf_output_source[LOCAL_INTERFACE_NAME].format = "%s"; - netperf_output_source[LOCAL_INTERFACE_NAME].display_value = local_interface_name; + netperf_output_source[LOCAL_INTERFACE_NAME].display_value = + local_interface_name; netperf_output_source[LOCAL_INTERFACE_NAME].max_line_len = NETPERF_LINE_MAX(LOCAL_INTERFACE_NAME); netperf_output_source[LOCAL_INTERFACE_NAME].tot_line_len = NETPERF_LINE_TOT(LOCAL_INTERFACE_NAME); + netperf_output_source[LOCAL_INTERFACE_NAME].output_group = + OMNI_WANT_LOC_IFNAME; - netperf_output_source[REMOTE_INTERFACE_NAME].output_name = REMOTE_INTERFACE_NAME; + netperf_output_source[REMOTE_INTERFACE_NAME].output_name = + REMOTE_INTERFACE_NAME; netperf_output_source[REMOTE_INTERFACE_NAME].line[0] = "Remote"; netperf_output_source[REMOTE_INTERFACE_NAME].line[1] = "Interface"; netperf_output_source[REMOTE_INTERFACE_NAME].line[2] = "Name"; netperf_output_source[REMOTE_INTERFACE_NAME].line[3] = ""; netperf_output_source[REMOTE_INTERFACE_NAME].format = "%s"; - netperf_output_source[REMOTE_INTERFACE_NAME].display_value = remote_interface_name; + netperf_output_source[REMOTE_INTERFACE_NAME].display_value = + remote_interface_name; netperf_output_source[REMOTE_INTERFACE_NAME].max_line_len = NETPERF_LINE_MAX(REMOTE_INTERFACE_NAME); netperf_output_source[REMOTE_INTERFACE_NAME].tot_line_len = NETPERF_LINE_TOT(REMOTE_INTERFACE_NAME); + netperf_output_source[REMOTE_INTERFACE_NAME].output_group = + OMNI_WANT_REM_IFNAME; - netperf_output_source[LOCAL_INTERFACE_SLOT].output_name = LOCAL_INTERFACE_SLOT; + netperf_output_source[LOCAL_INTERFACE_SLOT].output_name = + LOCAL_INTERFACE_SLOT; netperf_output_source[LOCAL_INTERFACE_SLOT].line[0] = "Local"; netperf_output_source[LOCAL_INTERFACE_SLOT].line[1] = "Interface"; netperf_output_source[LOCAL_INTERFACE_SLOT].line[2] = "Slot"; netperf_output_source[LOCAL_INTERFACE_SLOT].line[3] = ""; netperf_output_source[LOCAL_INTERFACE_SLOT].format = "%s"; - netperf_output_source[LOCAL_INTERFACE_SLOT].display_value = local_interface_slot; + netperf_output_source[LOCAL_INTERFACE_SLOT].display_value = + local_interface_slot; netperf_output_source[LOCAL_INTERFACE_SLOT].max_line_len = NETPERF_LINE_MAX(LOCAL_INTERFACE_SLOT); netperf_output_source[LOCAL_INTERFACE_SLOT].tot_line_len = NETPERF_LINE_TOT(LOCAL_INTERFACE_SLOT); + netperf_output_source[LOCAL_INTERFACE_SLOT].output_group = + OMNI_WANT_LOC_IFSLOT; - netperf_output_source[REMOTE_INTERFACE_SLOT].output_name = REMOTE_INTERFACE_SLOT; + netperf_output_source[REMOTE_INTERFACE_SLOT].output_name = + REMOTE_INTERFACE_SLOT; netperf_output_source[REMOTE_INTERFACE_SLOT].line[0] = "Remote"; netperf_output_source[REMOTE_INTERFACE_SLOT].line[1] = "Interface"; netperf_output_source[REMOTE_INTERFACE_SLOT].line[2] = "Slot"; netperf_output_source[REMOTE_INTERFACE_SLOT].line[3] = ""; netperf_output_source[REMOTE_INTERFACE_SLOT].format = "%s"; - netperf_output_source[REMOTE_INTERFACE_SLOT].display_value = remote_interface_slot; + netperf_output_source[REMOTE_INTERFACE_SLOT].display_value = + remote_interface_slot; netperf_output_source[REMOTE_INTERFACE_SLOT].max_line_len = NETPERF_LINE_MAX(REMOTE_INTERFACE_SLOT); netperf_output_source[REMOTE_INTERFACE_SLOT].tot_line_len = NETPERF_LINE_TOT(REMOTE_INTERFACE_SLOT); + netperf_output_source[REMOTE_INTERFACE_SLOT].output_group = + OMNI_WANT_REM_IFSLOT; netperf_output_source[REMOTE_MACHINE].output_name = REMOTE_MACHINE; netperf_output_source[REMOTE_MACHINE].line[0] = "Remote"; @@ -2862,37 +3368,43 @@ netperf_output_source[LOCAL_SYSNAME].tot_line_len = NETPERF_LINE_TOT(LOCAL_SYSNAME); - netperf_output_source[REMOTE_INTERVAL_USECS].output_name = REMOTE_INTERVAL_USECS; + netperf_output_source[REMOTE_INTERVAL_USECS].output_name = + REMOTE_INTERVAL_USECS; netperf_output_source[REMOTE_INTERVAL_USECS].line[0] = "Remote"; netperf_output_source[REMOTE_INTERVAL_USECS].line[1] = "Interval"; netperf_output_source[REMOTE_INTERVAL_USECS].line[2] = "Usecs"; netperf_output_source[REMOTE_INTERVAL_USECS].line[3] = ""; netperf_output_source[REMOTE_INTERVAL_USECS].format = "%d"; - netperf_output_source[REMOTE_INTERVAL_USECS].display_value = &remote_interval_usecs; + netperf_output_source[REMOTE_INTERVAL_USECS].display_value = + &remote_interval_usecs; netperf_output_source[REMOTE_INTERVAL_USECS].max_line_len = NETPERF_LINE_MAX(REMOTE_INTERVAL_USECS); netperf_output_source[REMOTE_INTERVAL_USECS].tot_line_len = NETPERF_LINE_TOT(REMOTE_INTERVAL_USECS); - netperf_output_source[REMOTE_INTERVAL_BURST].output_name = REMOTE_INTERVAL_BURST; + netperf_output_source[REMOTE_INTERVAL_BURST].output_name = + REMOTE_INTERVAL_BURST; netperf_output_source[REMOTE_INTERVAL_BURST].line[0] = "Remote"; netperf_output_source[REMOTE_INTERVAL_BURST].line[1] = "Interval"; netperf_output_source[REMOTE_INTERVAL_BURST].line[2] = "Burst"; netperf_output_source[REMOTE_INTERVAL_BURST].line[3] = ""; netperf_output_source[REMOTE_INTERVAL_BURST].format = "%d"; - netperf_output_source[REMOTE_INTERVAL_BURST].display_value = &remote_interval_burst; + netperf_output_source[REMOTE_INTERVAL_BURST].display_value = + &remote_interval_burst; netperf_output_source[REMOTE_INTERVAL_BURST].max_line_len = NETPERF_LINE_MAX(REMOTE_INTERVAL_BURST); netperf_output_source[REMOTE_INTERVAL_BURST].tot_line_len = NETPERF_LINE_TOT(REMOTE_INTERVAL_BURST); - netperf_output_source[LOCAL_SECURITY_ENABLED].output_name = LOCAL_SECURITY_ENABLED; + netperf_output_source[LOCAL_SECURITY_ENABLED].output_name = + LOCAL_SECURITY_ENABLED; netperf_output_source[LOCAL_SECURITY_ENABLED].line[0] = "Local"; netperf_output_source[LOCAL_SECURITY_ENABLED].line[1] = "OS"; netperf_output_source[LOCAL_SECURITY_ENABLED].line[2] = "Security"; netperf_output_source[LOCAL_SECURITY_ENABLED].line[3] = "Enabled"; netperf_output_source[LOCAL_SECURITY_ENABLED].format = "%s"; - netperf_output_source[LOCAL_SECURITY_ENABLED].display_value = local_security_enabled; + netperf_output_source[LOCAL_SECURITY_ENABLED].display_value = + local_security_enabled; netperf_output_source[LOCAL_SECURITY_ENABLED].max_line_len = NETPERF_LINE_MAX(LOCAL_SECURITY_ENABLED); netperf_output_source[LOCAL_SECURITY_ENABLED].tot_line_len = @@ -2904,109 +3416,127 @@ netperf_output_source[LOCAL_SECURITY_TYPE].line[2] = "Security"; netperf_output_source[LOCAL_SECURITY_TYPE].line[3] = "Type"; netperf_output_source[LOCAL_SECURITY_TYPE].format = "%s"; - netperf_output_source[LOCAL_SECURITY_TYPE].display_value = local_security_type; + netperf_output_source[LOCAL_SECURITY_TYPE].display_value = + local_security_type; netperf_output_source[LOCAL_SECURITY_TYPE].max_line_len = NETPERF_LINE_MAX(LOCAL_SECURITY_TYPE); netperf_output_source[LOCAL_SECURITY_TYPE].tot_line_len = NETPERF_LINE_TOT(LOCAL_SECURITY_TYPE); - netperf_output_source[LOCAL_SECURITY_SPECIFIC].output_name = LOCAL_SECURITY_SPECIFIC; + netperf_output_source[LOCAL_SECURITY_SPECIFIC].output_name = + LOCAL_SECURITY_SPECIFIC; netperf_output_source[LOCAL_SECURITY_SPECIFIC].line[0] = "Local"; netperf_output_source[LOCAL_SECURITY_SPECIFIC].line[1] = "OS"; netperf_output_source[LOCAL_SECURITY_SPECIFIC].line[2] = "Security"; netperf_output_source[LOCAL_SECURITY_SPECIFIC].line[3] = "Specific"; netperf_output_source[LOCAL_SECURITY_SPECIFIC].format = "%s"; - netperf_output_source[LOCAL_SECURITY_SPECIFIC].display_value = local_security_specific; + netperf_output_source[LOCAL_SECURITY_SPECIFIC].display_value = + local_security_specific; netperf_output_source[LOCAL_SECURITY_SPECIFIC].max_line_len = NETPERF_LINE_MAX(LOCAL_SECURITY_SPECIFIC); netperf_output_source[LOCAL_SECURITY_SPECIFIC].tot_line_len = NETPERF_LINE_TOT(LOCAL_SECURITY_SPECIFIC); - netperf_output_source[LOCAL_SECURITY_ENABLED_NUM].output_name = LOCAL_SECURITY_ENABLED_NUM; + netperf_output_source[LOCAL_SECURITY_ENABLED_NUM].output_name = + LOCAL_SECURITY_ENABLED_NUM; netperf_output_source[LOCAL_SECURITY_ENABLED_NUM].line[0] = "Local"; netperf_output_source[LOCAL_SECURITY_ENABLED_NUM].line[1] = "OS"; netperf_output_source[LOCAL_SECURITY_ENABLED_NUM].line[2] = "Security"; netperf_output_source[LOCAL_SECURITY_ENABLED_NUM].line[3] = "Enabled Num"; netperf_output_source[LOCAL_SECURITY_ENABLED_NUM].format = "%d"; - netperf_output_source[LOCAL_SECURITY_ENABLED_NUM].display_value = &local_security_enabled_num; + netperf_output_source[LOCAL_SECURITY_ENABLED_NUM].display_value = + &local_security_enabled_num; netperf_output_source[LOCAL_SECURITY_ENABLED_NUM].max_line_len = NETPERF_LINE_MAX(LOCAL_SECURITY_ENABLED_NUM); netperf_output_source[LOCAL_SECURITY_ENABLED_NUM].tot_line_len = NETPERF_LINE_TOT(LOCAL_SECURITY_ENABLED_NUM); - netperf_output_source[LOCAL_SECURITY_TYPE_ID].output_name = LOCAL_SECURITY_TYPE_ID; + netperf_output_source[LOCAL_SECURITY_TYPE_ID].output_name = + LOCAL_SECURITY_TYPE_ID; netperf_output_source[LOCAL_SECURITY_TYPE_ID].line[0] = "Local"; netperf_output_source[LOCAL_SECURITY_TYPE_ID].line[1] = "OS"; netperf_output_source[LOCAL_SECURITY_TYPE_ID].line[2] = "Security"; netperf_output_source[LOCAL_SECURITY_TYPE_ID].line[3] = "Type ID"; netperf_output_source[LOCAL_SECURITY_TYPE_ID].format = "%d"; - netperf_output_source[LOCAL_SECURITY_TYPE_ID].display_value = &local_security_type_id; + netperf_output_source[LOCAL_SECURITY_TYPE_ID].display_value = + &local_security_type_id; netperf_output_source[LOCAL_SECURITY_TYPE_ID].max_line_len = NETPERF_LINE_MAX(LOCAL_SECURITY_TYPE_ID); netperf_output_source[LOCAL_SECURITY_TYPE_ID].tot_line_len = NETPERF_LINE_TOT(LOCAL_SECURITY_TYPE_ID); - netperf_output_source[REMOTE_SECURITY_ENABLED].output_name = REMOTE_SECURITY_ENABLED; + netperf_output_source[REMOTE_SECURITY_ENABLED].output_name = + REMOTE_SECURITY_ENABLED; netperf_output_source[REMOTE_SECURITY_ENABLED].line[0] = "Remote"; netperf_output_source[REMOTE_SECURITY_ENABLED].line[1] = "OS"; netperf_output_source[REMOTE_SECURITY_ENABLED].line[2] = "Security"; netperf_output_source[REMOTE_SECURITY_ENABLED].line[3] = "Enabled"; netperf_output_source[REMOTE_SECURITY_ENABLED].format = "%s"; - netperf_output_source[REMOTE_SECURITY_ENABLED].display_value = remote_security_enabled; + netperf_output_source[REMOTE_SECURITY_ENABLED].display_value = + remote_security_enabled; netperf_output_source[REMOTE_SECURITY_ENABLED].max_line_len = NETPERF_LINE_MAX(REMOTE_SECURITY_ENABLED); netperf_output_source[REMOTE_SECURITY_ENABLED].tot_line_len = NETPERF_LINE_TOT(REMOTE_SECURITY_ENABLED); - netperf_output_source[REMOTE_SECURITY_TYPE].output_name = REMOTE_SECURITY_TYPE; + netperf_output_source[REMOTE_SECURITY_TYPE].output_name = + REMOTE_SECURITY_TYPE; netperf_output_source[REMOTE_SECURITY_TYPE].line[0] = "Remote"; netperf_output_source[REMOTE_SECURITY_TYPE].line[1] = "OS"; netperf_output_source[REMOTE_SECURITY_TYPE].line[2] = "Security"; netperf_output_source[REMOTE_SECURITY_TYPE].line[3] = "Type"; netperf_output_source[REMOTE_SECURITY_TYPE].format = "%s"; - netperf_output_source[REMOTE_SECURITY_TYPE].display_value = remote_security_type; + netperf_output_source[REMOTE_SECURITY_TYPE].display_value = + remote_security_type; netperf_output_source[REMOTE_SECURITY_TYPE].max_line_len = NETPERF_LINE_MAX(REMOTE_SECURITY_TYPE); netperf_output_source[REMOTE_SECURITY_TYPE].tot_line_len = NETPERF_LINE_TOT(REMOTE_SECURITY_TYPE); - netperf_output_source[REMOTE_SECURITY_SPECIFIC].output_name = REMOTE_SECURITY_SPECIFIC; + netperf_output_source[REMOTE_SECURITY_SPECIFIC].output_name = + REMOTE_SECURITY_SPECIFIC; netperf_output_source[REMOTE_SECURITY_SPECIFIC].line[0] = "Remote"; netperf_output_source[REMOTE_SECURITY_SPECIFIC].line[1] = "OS"; netperf_output_source[REMOTE_SECURITY_SPECIFIC].line[2] = "Security"; netperf_output_source[REMOTE_SECURITY_SPECIFIC].line[3] = "Specific"; netperf_output_source[REMOTE_SECURITY_SPECIFIC].format = "%s"; - netperf_output_source[REMOTE_SECURITY_SPECIFIC].display_value = remote_security_specific; + netperf_output_source[REMOTE_SECURITY_SPECIFIC].display_value = + remote_security_specific; netperf_output_source[REMOTE_SECURITY_SPECIFIC].max_line_len = NETPERF_LINE_MAX(REMOTE_SECURITY_SPECIFIC); netperf_output_source[REMOTE_SECURITY_SPECIFIC].tot_line_len = NETPERF_LINE_TOT(REMOTE_SECURITY_SPECIFIC); - netperf_output_source[REMOTE_SECURITY_ENABLED_NUM].output_name = REMOTE_SECURITY_ENABLED_NUM; + netperf_output_source[REMOTE_SECURITY_ENABLED_NUM].output_name = + REMOTE_SECURITY_ENABLED_NUM; netperf_output_source[REMOTE_SECURITY_ENABLED_NUM].line[0] = "Remote"; netperf_output_source[REMOTE_SECURITY_ENABLED_NUM].line[1] = "OS"; netperf_output_source[REMOTE_SECURITY_ENABLED_NUM].line[2] = "Security"; netperf_output_source[REMOTE_SECURITY_ENABLED_NUM].line[3] = "Enabled"; netperf_output_source[REMOTE_SECURITY_ENABLED_NUM].format = "%d"; - netperf_output_source[REMOTE_SECURITY_ENABLED_NUM].display_value = &remote_security_enabled_num; + netperf_output_source[REMOTE_SECURITY_ENABLED_NUM].display_value = + &remote_security_enabled_num; netperf_output_source[REMOTE_SECURITY_ENABLED_NUM].max_line_len = NETPERF_LINE_MAX(REMOTE_SECURITY_ENABLED_NUM); netperf_output_source[REMOTE_SECURITY_ENABLED_NUM].tot_line_len = NETPERF_LINE_TOT(REMOTE_SECURITY_ENABLED_NUM); - netperf_output_source[REMOTE_SECURITY_TYPE_ID].output_name = REMOTE_SECURITY_TYPE_ID; + netperf_output_source[REMOTE_SECURITY_TYPE_ID].output_name = + REMOTE_SECURITY_TYPE_ID; netperf_output_source[REMOTE_SECURITY_TYPE_ID].line[0] = "Remote"; netperf_output_source[REMOTE_SECURITY_TYPE_ID].line[1] = "OS"; netperf_output_source[REMOTE_SECURITY_TYPE_ID].line[2] = "Security"; netperf_output_source[REMOTE_SECURITY_TYPE_ID].line[3] = "Type"; netperf_output_source[REMOTE_SECURITY_TYPE_ID].format = "%d"; - netperf_output_source[REMOTE_SECURITY_TYPE_ID].display_value = &remote_security_type_id; + netperf_output_source[REMOTE_SECURITY_TYPE_ID].display_value = + &remote_security_type_id; netperf_output_source[REMOTE_SECURITY_TYPE_ID].max_line_len = NETPERF_LINE_MAX(REMOTE_SECURITY_TYPE_ID); netperf_output_source[REMOTE_SECURITY_TYPE_ID].tot_line_len = NETPERF_LINE_TOT(REMOTE_SECURITY_TYPE_ID); - netperf_output_source[LOCAL_INTERVAL_USECS].output_name = LOCAL_INTERVAL_USECS; + netperf_output_source[LOCAL_INTERVAL_USECS].output_name = + LOCAL_INTERVAL_USECS; netperf_output_source[LOCAL_INTERVAL_USECS].line[0] = "Local"; netperf_output_source[LOCAL_INTERVAL_USECS].line[1] = "Interval"; netperf_output_source[LOCAL_INTERVAL_USECS].line[2] = "Usecs"; @@ -3018,13 +3548,15 @@ netperf_output_source[LOCAL_INTERVAL_USECS].tot_line_len = NETPERF_LINE_TOT(LOCAL_INTERVAL_USECS); - netperf_output_source[LOCAL_INTERVAL_BURST].output_name = LOCAL_INTERVAL_BURST; + netperf_output_source[LOCAL_INTERVAL_BURST].output_name = + LOCAL_INTERVAL_BURST; netperf_output_source[LOCAL_INTERVAL_BURST].line[0] = "Local"; netperf_output_source[LOCAL_INTERVAL_BURST].line[1] = "Interval"; netperf_output_source[LOCAL_INTERVAL_BURST].line[2] = "Burst"; netperf_output_source[LOCAL_INTERVAL_BURST].line[3] = ""; netperf_output_source[LOCAL_INTERVAL_BURST].format = "%d"; - netperf_output_source[LOCAL_INTERVAL_BURST].display_value = &interval_burst; + netperf_output_source[LOCAL_INTERVAL_BURST].display_value = + &interval_burst; netperf_output_source[LOCAL_INTERVAL_BURST].max_line_len = NETPERF_LINE_MAX(LOCAL_INTERVAL_BURST); netperf_output_source[LOCAL_INTERVAL_BURST].tot_line_len = @@ -3036,7 +3568,8 @@ netperf_output_source[REMOTE_SYSTEM_MODEL].line[2] = "Model"; netperf_output_source[REMOTE_SYSTEM_MODEL].line[3] = ""; netperf_output_source[REMOTE_SYSTEM_MODEL].format = "%s"; - netperf_output_source[REMOTE_SYSTEM_MODEL].display_value = remote_system_model; + netperf_output_source[REMOTE_SYSTEM_MODEL].display_value = + remote_system_model; netperf_output_source[REMOTE_SYSTEM_MODEL].max_line_len = NETPERF_LINE_MAX(REMOTE_SYSTEM_MODEL); netperf_output_source[REMOTE_SYSTEM_MODEL].tot_line_len = @@ -3054,13 +3587,15 @@ netperf_output_source[REMOTE_CPU_MODEL].tot_line_len = NETPERF_LINE_TOT(REMOTE_CPU_MODEL); - netperf_output_source[REMOTE_CPU_FREQUENCY].output_name = REMOTE_CPU_FREQUENCY; + netperf_output_source[REMOTE_CPU_FREQUENCY].output_name = + REMOTE_CPU_FREQUENCY; netperf_output_source[REMOTE_CPU_FREQUENCY].line[0] = "Remote"; netperf_output_source[REMOTE_CPU_FREQUENCY].line[1] = "CPU"; netperf_output_source[REMOTE_CPU_FREQUENCY].line[2] = "Frequency"; netperf_output_source[REMOTE_CPU_FREQUENCY].line[3] = "MHz"; netperf_output_source[REMOTE_CPU_FREQUENCY].format = "%d"; - netperf_output_source[REMOTE_CPU_FREQUENCY].display_value = &remote_cpu_frequency; + netperf_output_source[REMOTE_CPU_FREQUENCY].display_value = + &remote_cpu_frequency; netperf_output_source[REMOTE_CPU_FREQUENCY].max_line_len = NETPERF_LINE_MAX(REMOTE_CPU_FREQUENCY); netperf_output_source[REMOTE_CPU_FREQUENCY].tot_line_len = @@ -3096,12 +3631,104 @@ netperf_output_source[LOCAL_CPU_FREQUENCY].line[2] = "Frequency"; netperf_output_source[LOCAL_CPU_FREQUENCY].line[3] = "MHz"; netperf_output_source[LOCAL_CPU_FREQUENCY].format = "%d"; - netperf_output_source[LOCAL_CPU_FREQUENCY].display_value = &local_cpu_frequency; + netperf_output_source[LOCAL_CPU_FREQUENCY].display_value = + &local_cpu_frequency; netperf_output_source[LOCAL_CPU_FREQUENCY].max_line_len = NETPERF_LINE_MAX(LOCAL_CPU_FREQUENCY); netperf_output_source[LOCAL_CPU_FREQUENCY].tot_line_len = NETPERF_LINE_TOT(LOCAL_CPU_FREQUENCY); + i = MIN_LATENCY; + netperf_output_source[i].output_name = MIN_LATENCY; + netperf_output_source[i].line[0] = "Minimum"; + netperf_output_source[i].line[1] = "Latency"; + netperf_output_source[i].line[2] = "Microseconds"; + netperf_output_source[i].line[3] = ""; + netperf_output_source[i].format = "%d"; + netperf_output_source[i].display_value = &min_latency; + netperf_output_source[i].max_line_len = NETPERF_LINE_MAX(i); + netperf_output_source[i].tot_line_len = NETPERF_LINE_TOT(i); + netperf_output_source[i].output_default = 0; + netperf_output_source[i].output_group = OMNI_WANT_STATS; + + i = MAX_LATENCY; + netperf_output_source[i].output_name = MAX_LATENCY; + netperf_output_source[i].line[0] = "Maximum"; + netperf_output_source[i].line[1] = "Latency"; + netperf_output_source[i].line[2] = "Microseconds"; + netperf_output_source[i].line[3] = ""; + netperf_output_source[i].format = "%d"; + netperf_output_source[i].display_value = &max_latency; + netperf_output_source[i].max_line_len = NETPERF_LINE_MAX(i); + netperf_output_source[i].tot_line_len = NETPERF_LINE_TOT(i); + netperf_output_source[i].output_default = 0; + netperf_output_source[i].output_group = OMNI_WANT_STATS; + + i = P50_LATENCY; + netperf_output_source[i].output_name = P50_LATENCY; + netperf_output_source[i].line[0] = "50th"; + netperf_output_source[i].line[1] = "Percentile"; + netperf_output_source[i].line[2] = "Latency"; + netperf_output_source[i].line[3] = "Microseconds"; + netperf_output_source[i].format = "%d"; + netperf_output_source[i].display_value = &p50_latency; + netperf_output_source[i].max_line_len = NETPERF_LINE_MAX(i); + netperf_output_source[i].tot_line_len = NETPERF_LINE_TOT(i); + netperf_output_source[i].output_default = 0; + netperf_output_source[i].output_group = OMNI_WANT_STATS; + + i = P90_LATENCY; + netperf_output_source[i].output_name = P90_LATENCY; + netperf_output_source[i].line[0] = "90th"; + netperf_output_source[i].line[1] = "Percentile"; + netperf_output_source[i].line[2] = "Latency"; + netperf_output_source[i].line[3] = "Microseconds"; + netperf_output_source[i].format = "%d"; + netperf_output_source[i].display_value = &p90_latency; + netperf_output_source[i].max_line_len = NETPERF_LINE_MAX(i); + netperf_output_source[i].tot_line_len = NETPERF_LINE_TOT(i); + netperf_output_source[i].output_default = 0; + netperf_output_source[i].output_group = OMNI_WANT_STATS; + + i = P99_LATENCY; + netperf_output_source[i].output_name = P99_LATENCY; + netperf_output_source[i].line[0] = "99th"; + netperf_output_source[i].line[1] = "Percentile"; + netperf_output_source[i].line[2] = "Latency"; + netperf_output_source[i].line[3] = "Microseconds"; + netperf_output_source[i].format = "%d"; + netperf_output_source[i].display_value = &p99_latency; + netperf_output_source[i].max_line_len = NETPERF_LINE_MAX(i); + netperf_output_source[i].tot_line_len = NETPERF_LINE_TOT(i); + netperf_output_source[i].output_default = 0; + netperf_output_source[i].output_group = OMNI_WANT_STATS; + + i = MEAN_LATENCY; + netperf_output_source[i].output_name = MEAN_LATENCY; + netperf_output_source[i].line[0] = "Mean"; + netperf_output_source[i].line[1] = "Latency"; + netperf_output_source[i].line[2] = "Microseconds"; + netperf_output_source[i].line[3] = ""; + netperf_output_source[i].format = "%.2f"; + netperf_output_source[i].display_value = &mean_latency; + netperf_output_source[i].max_line_len = NETPERF_LINE_MAX(i); + netperf_output_source[i].tot_line_len = NETPERF_LINE_TOT(i); + netperf_output_source[i].output_default = 0; + netperf_output_source[i].output_group = OMNI_WANT_STATS; + + i = STDDEV_LATENCY; + netperf_output_source[i].output_name = STDDEV_LATENCY; + netperf_output_source[i].line[0] = "Stddev"; + netperf_output_source[i].line[1] = "Latency"; + netperf_output_source[i].line[2] = "Microseconds"; + netperf_output_source[i].line[3] = ""; + netperf_output_source[i].format = "%.2f"; + netperf_output_source[i].display_value = &stddev_latency; + netperf_output_source[i].max_line_len = NETPERF_LINE_MAX(i); + netperf_output_source[i].tot_line_len = NETPERF_LINE_TOT(i); + netperf_output_source[i].output_default = 0; + netperf_output_source[i].output_group = OMNI_WANT_STATS; + netperf_output_source[OUTPUT_END].output_name = OUTPUT_END; netperf_output_source[OUTPUT_END].line[0] = "This"; netperf_output_source[OUTPUT_END].line[1] = "Is"; @@ -3115,44 +3742,44 @@ NETPERF_LINE_TOT(OUTPUT_END); } -/* lots of boring, repetitive code */ + void print_omni_init() { int i,j; + if (debug) { + fprintf(where,"%s entered\n", + __FUNCTION__); + fflush(where); + } + + /* why is this before the if you ask? because some of the output + specifiers are char * rather than char[] and when I wanted to + start setting output_group flags I was needing to call + print_omni_init() before the char * 's were malloced, which meant + the netperf_output_source got NULL pointers. there is + undoubtedly a cleaner way to do all this. raj 20110629 */ + + print_omni_init_list(); + if (printing_initialized) return; printing_initialized = 1; - print_omni_init_list(); /* belts and suspenders */ - for (i = OUTPUT_NONE; i < NETPERF_OUTPUT_MAX; i++) - output_csv_list[i] = OUTPUT_END; - for (j = 0; j < NETPERF_MAX_BLOCKS; j++) - for (i = OUTPUT_NONE; i < NETPERF_OUTPUT_MAX; i++) - output_human_list[j][i] = OUTPUT_END; - + for (i = 0; i < NETPERF_OUTPUT_MAX; i++) + output_list[j][i] = OUTPUT_END; - /* the default for csv is the kitchen-sink. ultimately it will be - possible to override by providing one's own list in a file */ - if ((csv) || (keyword)) { - if (csv_selection_file) - /* name of file, list to fill, number of rows/lines */ - parse_output_csv_selection_file(csv_selection_file); - else - set_output_csv_list_default(output_csv_list); + if (output_selection_spec) { + parse_output_selection(output_selection_spec); } else { - if (human_selection_file) - parse_output_human_selection_file(human_selection_file); - else - set_output_human_list_default(output_human_list); + set_output_list_by_test(); } - } @@ -3232,41 +3859,43 @@ print_omni_csv() { - int j,k,buflen,vallen; + int i,j,k,buflen,vallen; char *hdr1 = NULL; char *val1 = NULL; char tmpval[1024]; buflen = 0; - for (j = 0; - ((j < NETPERF_OUTPUT_MAX) && - (output_csv_list[j] != OUTPUT_END)); - j++) { - if ((netperf_output_source[output_csv_list[j]].format != NULL) && - (netperf_output_source[output_csv_list[j]].display_value != NULL)) { - vallen = - my_snprintf(tmpval, - 1024, - netperf_output_source[output_csv_list[j]].format, - (netperf_output_source[output_csv_list[j]].display_value)); - if (vallen == -1) { - fprintf(where,"my_snprintf failed on %s with format %s\n", - netperf_output_enum_to_str(j), - netperf_output_source[output_csv_list[j]].format); - fflush(where); + for (i = 0; i < NETPERF_MAX_BLOCKS; i++) { + for (j = 0; + ((j < NETPERF_OUTPUT_MAX) && + (output_list[i][j] != OUTPUT_END)); + j++) { + if ((netperf_output_source[output_list[i][j]].format != NULL) && + (netperf_output_source[output_list[i][j]].display_value != NULL)) { + vallen = + my_snprintf(tmpval, + 1024, + netperf_output_source[output_list[i][j]].format, + (netperf_output_source[output_list[i][j]].display_value)); + if (vallen == -1) { + fprintf(where,"my_snprintf failed on %s with format %s\n", + netperf_output_enum_to_str(j), + netperf_output_source[output_list[i][j]].format); + fflush(where); + } + vallen += 1; /* forget not the terminator */ } - vallen += 1; /* forget not the terminator */ + else + vallen = 0; + + if (vallen > + netperf_output_source[output_list[i][j]].tot_line_len) + netperf_output_source[output_list[i][j]].tot_line_len = vallen; + + buflen += + netperf_output_source[output_list[i][j]].tot_line_len; } - else - vallen = 0; - - if (vallen > - netperf_output_source[output_csv_list[j]].tot_line_len) - netperf_output_source[output_csv_list[j]].tot_line_len = vallen; - - buflen += - netperf_output_source[output_csv_list[j]].tot_line_len; } if (print_headers) hdr1 = malloc(buflen + 1); @@ -3286,44 +3915,46 @@ strings, and we have spaces where we want them etc */ char *h1 = hdr1; char *v1 = val1; - for (j = 0; - ((j < NETPERF_OUTPUT_MAX) && - (output_csv_list[j] != OUTPUT_END)); - j++) { - int len; - len = 0; - if (print_headers) { - for (k = 0; ((k < 4) && - (NULL != - netperf_output_source[output_csv_list[j]].line[k]) && - (strcmp("",netperf_output_source[output_csv_list[j]].line[k]))); k++) { - - len = sprintf(h1, - "%s", - netperf_output_source[output_csv_list[j]].line[k]); - *(h1 + len) = ' '; - /* now move to the next starting column. for csv we aren't worried - about alignment between the header and the value lines */ - h1 += len + 1; + for (i = 0; i < NETPERF_MAX_BLOCKS; i++) { + for (j = 0; + ((j < NETPERF_OUTPUT_MAX) && + (output_list[i][j] != OUTPUT_END)); + j++) { + int len; + len = 0; + if (print_headers) { + for (k = 0; ((k < 4) && + (NULL != + netperf_output_source[output_list[i][j]].line[k]) && + (strcmp("",netperf_output_source[output_list[i][j]].line[k]))); k++) { + + len = sprintf(h1, + "%s", + netperf_output_source[output_list[i][j]].line[k]); + *(h1 + len) = ' '; + /* now move to the next starting column. for csv we aren't worried + about alignment between the header and the value lines */ + h1 += len + 1; + } + *(h1 - 1) = ','; + } + if ((netperf_output_source[output_list[i][j]].format != NULL) && + (netperf_output_source[output_list[i][j]].display_value != NULL)) { + /* tot_line_len is bogus here, but should be "OK" ? */ + len = my_snprintf(v1, + netperf_output_source[output_list[i][j]].tot_line_len, + netperf_output_source[output_list[i][j]].format, + netperf_output_source[output_list[i][j]].display_value); + + /* nuke the trailing \n" from the string routine. */ + *(v1 + len) = ','; + v1 += len + 1; + } + else { + /* we need a ',' even if there is no value */ + *v1 = ','; + v1 += 2; } - *(h1 - 1) = ','; - } - if ((netperf_output_source[output_csv_list[j]].format != NULL) && - (netperf_output_source[output_csv_list[j]].display_value != NULL)) { - /* tot_line_len is bogus here, but should be "OK" ? */ - len = my_snprintf(v1, - netperf_output_source[output_csv_list[j]].tot_line_len, - netperf_output_source[output_csv_list[j]].format, - netperf_output_source[output_csv_list[j]].display_value); - - /* nuke the trailing \n" from the string routine. */ - *(v1 + len) = ','; - v1 += len + 1; - } - else { - /* we need a ',' even if there is no value */ - *v1 = ','; - v1 += 2; } } @@ -3333,7 +3964,7 @@ *(v1-1) = 0; /* and now spit it out, but only if it is going to have something in it. we don't want a bunch of blank lines or nulls... */ - if (output_csv_list[0] != OUTPUT_END) { + if (output_list[0][0] != OUTPUT_END) { if (print_headers) printf("%s\n",hdr1); printf("%s\n",val1); } @@ -3349,30 +3980,32 @@ /* this one should be the simplest of all - no buffers to allocate, just spit it all out. raj 20080805 */ - int j; + int i,j; char tmpval[1024]; int vallen; - for (j = 0; - ((j < NETPERF_OUTPUT_MAX) && - (output_csv_list[j] != OUTPUT_END)); - j++) { - if ((netperf_output_source[output_csv_list[j]].format != NULL) && - (netperf_output_source[output_csv_list[j]].display_value != NULL)) { - vallen = - my_snprintf(tmpval, - 1024, - netperf_output_source[output_csv_list[j]].format, - (netperf_output_source[output_csv_list[j]].display_value)); - if (vallen == -1) { - snprintf(tmpval, - 1024, - "my_snprintf failed with format %s\n", - netperf_output_source[output_csv_list[j]].format); + for (i = 0; i < NETPERF_MAX_BLOCKS; i++) { + for (j = 0; + ((j < NETPERF_OUTPUT_MAX) && + (output_list[i][j] != OUTPUT_END)); + j++) { + if ((netperf_output_source[output_list[i][j]].format != NULL) && + (netperf_output_source[output_list[i][j]].display_value != NULL)) { + vallen = + my_snprintf(tmpval, + 1024, + netperf_output_source[output_list[i][j]].format, + (netperf_output_source[output_list[i][j]].display_value)); + if (vallen == -1) { + snprintf(tmpval, + 1024, + "my_snprintf failed with format %s\n", + netperf_output_source[output_list[i][j]].format); + } + fprintf(where, + "%s=%s\n",netperf_output_enum_to_str(output_list[i][j]), + tmpval); } - fprintf(where, - "%s=%s\n",netperf_output_enum_to_str(output_csv_list[j]), - tmpval); } } fflush(where); @@ -3404,23 +4037,25 @@ buflen = 0; for (j = 0; ((j < NETPERF_OUTPUT_MAX) && - (output_human_list[i][j] != OUTPUT_END)); + (output_list[i][j] != OUTPUT_END)); j++) { - if ((netperf_output_source[output_human_list[i][j]].format != NULL) && - (netperf_output_source[output_human_list[i][j]].display_value != NULL)) + if ((netperf_output_source[output_list[i][j]].format != NULL) && + (netperf_output_source[output_list[i][j]].display_value != + NULL)) vallen = my_snprintf(tmpval, 1024, - netperf_output_source[output_human_list[i][j]].format, - (netperf_output_source[output_human_list[i][j]].display_value)) + 1; /* need to count the \n */ + netperf_output_source[output_list[i][j]]. +format, + (netperf_output_source[output_list[i][j]].display_value)) + 1; /* need to count the \n */ else vallen = 0; if (vallen > - netperf_output_source[output_human_list[i][j]].max_line_len) - netperf_output_source[output_human_list[i][j]].max_line_len = vallen; + netperf_output_source[output_list[i][j]].max_line_len) + netperf_output_source[output_list[i][j]].max_line_len = vallen; buflen += - netperf_output_source[output_human_list[i][j]].max_line_len + 1; + netperf_output_source[output_list[i][j]].max_line_len + 1; } if (buflen > buflen_max) @@ -3460,31 +4095,31 @@ for (j = 0; ((j < NETPERF_OUTPUT_MAX) && - (output_human_list[i][j] != OUTPUT_END)); + (output_list[i][j] != OUTPUT_END)); j++) { if (print_headers) { for (k = 0; k < 4; k++) { memcpy(h[k], - netperf_output_source[output_human_list[i][j]].line[k], - strlen(netperf_output_source[output_human_list[i][j]].line[k])); + netperf_output_source[output_list[i][j]].line[k], + strlen(netperf_output_source[output_list[i][j]].line[k])); } } - if ((netperf_output_source[output_human_list[i][j]].format != NULL) && - (netperf_output_source[output_human_list[i][j]].display_value != NULL)) { + if ((netperf_output_source[output_list[i][j]].format != NULL) && + (netperf_output_source[output_list[i][j]].display_value != NULL)) { int len; len = my_snprintf(v1, - netperf_output_source[output_human_list[i][j]].max_line_len, - netperf_output_source[output_human_list[i][j]].format, - netperf_output_source[output_human_list[i][j]].display_value); + netperf_output_source[output_list[i][j]].max_line_len, + netperf_output_source[output_list[i][j]].format, + netperf_output_source[output_list[i][j]].display_value); /* nuke the trailing \n" from the string routine. */ *(v1 + len) = ' '; } /* now move to the next starting column */ for (k = 0; (k < 4) && (print_headers); k++) { h[k] += - netperf_output_source[output_human_list[i][j]].max_line_len + 1; + netperf_output_source[output_list[i][j]].max_line_len + 1; } - v1 += netperf_output_source[output_human_list[i][j]].max_line_len + 1; + v1 += netperf_output_source[output_list[i][j]].max_line_len + 1; } /* ok, _now_ null terminate each line. do we have an OBOB here? */ for (k = 0; (k < 4) && (print_headers); k++) { @@ -3495,7 +4130,7 @@ in it. we don't want a bunch of blank lines or nulls... at some point we might want to work backwards collapsine whitespace from the right but for now, we won't bother */ - if (output_human_list[i][0] != OUTPUT_END) { + if (output_list[i][0] != OUTPUT_END) { if (i > 0) printf("\n"); /* we want a blank line between blocks ? */ for (k = 0; (k < 4) && (print_headers); k++) { printf("%s\n",hdr[k]); @@ -3576,7 +4211,7 @@ if (debug > 1) { fprintf(where, - "send_data sock %d ring %p bytes %d dest %p len %d\n", + "send_data sock %d, ring elt %p, bytes %d, dest %p, len %d\n", data_socket, send_ring, bytes_to_send, @@ -3620,7 +4255,7 @@ if (errno == ENOBUFS) return -2; else { - fprintf(where,"send_data: data send error: errno %d",errno); + fprintf(where,"send_data: data send error: errno %d\n",errno); return -3; } } @@ -3628,7 +4263,7 @@ } int -recv_data(SOCKET data_socket, struct ring_elt *recv_ring, uint32_t bytes_to_recv, struct sockaddr *source, int *sourcelen, uint32_t flags, uint32_t *num_receives) { +recv_data(SOCKET data_socket, struct ring_elt *recv_ring, uint32_t bytes_to_recv, struct sockaddr *source, netperf_socklen_t *sourcelen, uint32_t flags, uint32_t *num_receives) { char *temp_message_ptr; int bytes_left; @@ -3643,7 +4278,7 @@ if (debug > 1) { fprintf(where, - "recv_data sock %d, elt %p, bytes %d source %p srclen %d, flags %x num_recv %p\n", + "recv_data sock %d, ring elt %p, bytes %d, source %p, srclen %d, flags %x, num_recv %p\n", data_socket, recv_ring, bytes_to_recv, @@ -3716,13 +4351,27 @@ int -close_data_socket(SOCKET data_socket, struct sockaddr *peer, int peerlen) +close_data_socket(SOCKET data_socket, struct sockaddr *peer, int peerlen, int protocol) { int ret; char buffer[4]; + if (debug) { + fprintf(where, + "%s sock %d peer %p peerlen %d protocol %d\n", + __FUNCTION__, + data_socket, + peer, + peerlen, + protocol); + fflush(where); + } + if (protocol == IPPROTO_UDP) { + /* try to give the remote a signal. what this means if we ever + wanted to actually send zero-length messages remains to be seen + :) */ int i; for (i = 0; i < 3; i++) { if (peer) @@ -3786,7 +4435,10 @@ shutdown(data_socket, SHUT_WR); /* we are expecting to get either a return of zero indicating - connection close, or an error. */ + connection close, or an error. of course, we *may* never + receive anything from the remote which means we probably really + aught to have a select here but until we are once bitten we + will remain twice bold */ bytes_recvd = recv(data_socket, buffer, 1, @@ -3820,7 +4472,8 @@ 0); /* we only really care if the timer expired on us */ if (SOCKET_EINTR(bytes_recvd)) { - if (do_close) close(data_socket); + if (do_close) + close(data_socket); return -1; } } @@ -3832,6 +4485,69 @@ return 0; } +#ifdef HAVE_LINUX_TCP_H +static void +dump_tcp_info(struct tcp_info *tcp_info) +{ + + printf("tcpi_rto %d tcpi_ato %d tcpi_pmtu %d tcpi_rcv_ssthresh %d\n" + "tcpi_rtt %d tcpi_rttvar %d tcpi_snd_ssthresh %d tpci_snd_cwnd %d\n" + "tcpi_reordering %d tcpi_total_retrans %d\n", + tcp_info->tcpi_rto, + tcp_info->tcpi_ato, + tcp_info->tcpi_pmtu, + tcp_info->tcpi_rcv_ssthresh, + tcp_info->tcpi_rtt, + tcp_info->tcpi_rttvar, + tcp_info->tcpi_snd_ssthresh, + tcp_info->tcpi_snd_cwnd, + tcp_info->tcpi_reordering, + tcp_info->tcpi_total_retrans); + + return; +} + +#endif + +static int +get_transport_retrans(SOCKET socket, int protocol) { + +#ifdef HAVE_LINUX_TCP_H + struct tcp_info tcp_info; + + int ret; + netperf_socklen_t infosize; + + if (protocol != IPPROTO_TCP) + return -1; + + infosize = sizeof(struct tcp_info); + + if ((ret = getsockopt(socket,protocol,TCP_INFO,&tcp_info,&infosize)) == 0) { + if (debug) { + fprintf(where, + "get_tcp_retrans:getsockopt errno %d %s\n", + errno, + strerror(errno)); + fflush(where); + } + return -1; + } + else { + + if (debug > 1) { + dump_tcp_info(&tcp_info); + } + return tcp_info.tcpi_total_retrans; + } + + +#else + return -1; +#endif +} + + static void get_transport_info(SOCKET socket, int *mss, int protocol) { @@ -3868,6 +4584,31 @@ fflush(where); *mss = -1; } + +} + +/* choosing the default send size is a trifle more complicated than it + used to be as we have to account for different protocol limits */ + +#define UDP_LENGTH_MAX (0xFFFF - 28) + +static int +choose_send_size(int lss, int protocol) { + + int send_size; + + if (lss > 0) { + send_size = lss_size; + +#ifdef IPPROTO_UDP + if ((protocol == IPPROTO_UDP) && (send_size > UDP_LENGTH_MAX)) + send_size = UDP_LENGTH_MAX; +#endif + } + else { + send_size = 4096; + } + return send_size; } /* brain dead simple way to get netperf to emit a uuid. sadly, by this @@ -3885,17 +4626,12 @@ BSDish sockets. it comes about as part of a desire to shrink the code footprint of netperf and to avoid having so many blessed routines to alter as time goes by. the downside is there will be - more "ifs" than there were before. there may be some other - "complications" for things like demo mode or perhaps histograms if - we ever want to track individual RTTs when burst mode is in use - etc etc... raj 2008-01-07 */ + more "ifs" than there were before. raj 2008-01-07 */ void -send_omni(char remote_host[]) +send_omni_inner(char remote_host[], unsigned int legacy_caller, char header_str[]) { - - int len; int ret,rret; int connected = 0; int timed_out = 0; @@ -3907,12 +4643,13 @@ struct sockaddr_storage remote_addr; struct sockaddr_storage my_addr; int remote_addr_len = sizeof(remote_addr); - int my_addr_len = sizeof(my_addr); + netperf_socklen_t my_addr_len = sizeof(my_addr); SOCKET data_socket; int need_socket; - int temp_recvs; + uint32_t temp_recvs; + char tmpfmt; struct addrinfo *local_res; struct addrinfo *remote_res; @@ -3933,6 +4670,8 @@ happen that frankly, we cannot guarantee with the specification of TCP. ain't that grand?-) raj 2006-01-30 */ int requests_outstanding = 0; + int requests_this_cwnd = 0; + int request_cwnd_initial = REQUEST_CWND_INITIAL; int request_cwnd = REQUEST_CWND_INITIAL; /* we ass-u-me that having three requests outstanding at the @@ -3944,6 +4683,18 @@ the third from our regularly scheduled send */ + + /* if the user has specified a negative value for first_burst_size + via the test-specific -b option, we forgo the nicities of ramping + up the request_cwnd and go straight to burst size. raj 20110715 */ + if (first_burst_size < 0) { + first_burst_size = first_burst_size * -1; + request_cwnd_initial = first_burst_size; + } + else { + request_cwnd_initial = REQUEST_CWND_INITIAL; + } + #endif omni_request = @@ -3956,14 +4707,19 @@ /* before we start doing things with our own requests and responses lets go ahead and find-out about the remote system. at some point - we probably need to put this somewhere else... */ - get_remote_system_info(); - -#ifdef WANT_HISTOGRAM - if (verbosity > 1) { - time_hist = HIST_new(); + we probably need to put this somewhere else... however, we do + not want to do this if this is a no_control test. raj 20101220 */ + /* should we also not call this if this is a legacy test? */ + if (!no_control) { + get_remote_system_info(); + } + + if (keep_histogram) { + if (first_burst_size > 0) + time_hist = HIST_new_n(first_burst_size + 1); + else + time_hist = HIST_new_n(1); } -#endif /* WANT_HISTOGRAM */ /* since we are now disconnected from the code that established the control socket, and since we want to be able to use different @@ -3978,7 +4734,7 @@ 0); if ( print_headers ) { - print_top_test_header("OMNI TEST",local_res,remote_res); + print_top_test_header(header_str,local_res,remote_res); } /* initialize a few counters */ @@ -3989,12 +4745,12 @@ pick_next_port_number(local_res,remote_res); - /* If the user has requested cpu utilization measurements, we must */ - /* calibrate the cpu(s). We will perform this task within the tests */ - /* themselves. If the user has specified the cpu rate, then */ - /* calibrate_local_cpu will return rather quickly as it will have */ - /* nothing to do. If local_cpu_rate is zero, then we will go through */ - /* all the "normal" calibration stuff and return the rate back.*/ + /* If the user has requested cpu utilization measurements, we must + calibrate the cpu(s). We will perform this task within the tests + themselves. If the user has specified the cpu rate, then + calibrate_local_cpu will return rather quickly as it will have + nothing to do. If local_cpu_rate is zero, then we will go through + all the "normal" calibration stuff and return the rate back.*/ if (local_cpu_usage) { local_cpu_rate = calibrate_local_cpu(local_cpu_rate); @@ -4019,14 +4775,31 @@ local_send_calls = 0; local_receive_calls = 0; + /* since we are tracking the number of outstanding requests for + timestamping purposes, and since the previous iteration if + using confidence intervals may not have completed all of them, + we now need to forget about them or we will mistakenly fill our + tracking array. raj 2011-03-14 */ + if (keep_histogram) { + HIST_purge(time_hist); + } + #ifdef WANT_FIRST_BURST /* we have to remember to reset the number of transactions outstanding and the "congestion window for each new - iteration. raj 2006-01-31 */ + iteration. raj 2006-01-31. */ requests_outstanding = 0; - request_cwnd = REQUEST_CWND_INITIAL; + requests_this_cwnd = 0; + request_cwnd = request_cwnd_initial; #endif + /* if the command-line included requests to randomize the IP + addresses, then honor it. of course, this may not work all that + well for some tests... raj 20101129 */ + if (local_mask_len) + random_ip_address(local_res, local_mask_len); + if (remote_mask_len) + random_ip_address(remote_res, remote_mask_len); data_socket = create_data_socket(local_res); @@ -4041,73 +4814,82 @@ and send buffer rings. we should only need to do this once, and that would be when the relevant _ring variable is NULL. raj 2008-01-18 */ - if ((direction & NETPERF_XMIT) && (NULL == send_ring)) { - if (req_size > 0) { - /* request/response test */ - if (send_width == 0) send_width = 1; - bytes_to_send = req_size; + if (direction & NETPERF_XMIT) { + if (is_multicast_addr(remote_res)) { + set_multicast_ttl(data_socket); } - else { - /* stream test */ - if (send_size == 0) { - if (lss_size > 0) { - send_size = lss_size; - } - else { - send_size = 4096; + + if (NULL == send_ring) { + if (req_size > 0) { + /* request/response test */ + if (send_width == 0) send_width = 1; + bytes_to_send = req_size; + } + else { + /* stream test */ + if (send_size == 0) { + send_size = choose_send_size(lss_size,protocol); } + if (send_width == 0) + send_width = (lss_size/send_size) + 1; + if (send_width == 1) send_width++; + bytes_to_send = send_size; + } + + send_ring = allocate_buffer_ring(send_width, + bytes_to_send, + local_send_align, + local_send_offset); + if (debug) { + fprintf(where, + "send_omni: %d entry send_ring obtained...\n", + send_width); } - if (send_width == 0) - send_width = (lss_size/send_size) + 1; - if (send_width == 1) send_width++; - bytes_to_send = send_size; - } - - send_ring = allocate_buffer_ring(send_width, - bytes_to_send, - local_send_align, - local_send_offset); - if (debug) { - fprintf(where, - "send_omni: %d entry send_ring obtained...\n", - send_width); } } - if ((direction & NETPERF_RECV) && (NULL == recv_ring)) { - if (rsp_size > 0) { - if (recv_width == 0) recv_width = 1; - bytes_to_recv = rsp_size; + if (direction & NETPERF_RECV) { + /* do we need to join a multicast group? */ + if (is_multicast_addr(local_res)) { + join_multicast_addr(data_socket, local_res); } - else { - /* stream test */ - if (recv_size == 0) { - if (lsr_size > 0) { - recv_size = lsr_size; + + /* do we need to allocate a recv_ring? */ + if (NULL == recv_ring) { + if (rsp_size > 0) { + if (recv_width == 0) recv_width = 1; + bytes_to_recv = rsp_size; + } + else { + /* stream test */ + if (recv_size == 0) { + if (lsr_size > 0) { + recv_size = lsr_size; + } + else { + recv_size = 4096; + } } - else { - recv_size = 4096; + if (recv_width == 0) { + recv_width = (lsr_size/recv_size) + 1; + if (recv_width == 1) recv_width++; } + bytes_to_recv = recv_size; } - if (recv_width == 0) { - recv_width = (lsr_size/recv_size) + 1; - if (recv_width == 1) recv_width++; + + recv_ring = allocate_buffer_ring(recv_width, + bytes_to_recv, + local_recv_align, + local_recv_offset); + if (debug) { + fprintf(where, + "send_omni: %d entry recv_ring obtained...\n", + recv_width); } - bytes_to_recv = recv_size; - } - - recv_ring = allocate_buffer_ring(recv_width, - bytes_to_recv, - local_recv_align, - local_recv_offset); - if (debug) { - fprintf(where, - "send_omni: %d entry recv_ring obtained...\n", - recv_width); } } - if (!no_control) { /* foo */ + if (!no_control) { /* Tell the remote end to do a listen or otherwise prepare for what is to come. The server alters the socket paramters on the @@ -4120,25 +4902,56 @@ alterations. */ netperf_request.content.request_type = DO_OMNI; + omni_request->flags = 0; omni_request->send_buf_size = rss_size_req; omni_request->send_size = remote_send_size_req; omni_request->send_alignment = remote_send_align; omni_request->send_offset = remote_send_offset; - omni_request->send_width = 1; /* FIX THIS */ + omni_request->send_width = send_width; omni_request->request_size = req_size; omni_request->recv_buf_size = rsr_size_req; omni_request->receive_size = remote_recv_size_req; omni_request->recv_alignment = remote_recv_align; omni_request->recv_offset = remote_recv_offset; - omni_request->recv_width = 1; /* FIX THIS */ + omni_request->recv_width = recv_width; omni_request->response_size = rsp_size; - omni_request->no_delay = rem_nodelay; - omni_request->use_sendfile = remote_use_sendfile; - omni_request->connect_test = connection_test; + /* we have no else clauses here because we previously set flags + to zero above raj 20090803 */ + if (rem_nodelay) + omni_request->flags |= OMNI_NO_DELAY; + + if (remote_use_sendfile) + omni_request->flags |= OMNI_USE_SENDFILE; + + if (connection_test) + omni_request->flags |= OMNI_CONNECT_TEST; + + if (remote_checksum_off) + omni_request->flags |= OMNI_CHECKSUM_OFF; + + if (remote_cpu_usage) + omni_request->flags |= OMNI_MEASURE_CPU; + + if (routing_allowed) + omni_request->flags |= OMNI_ROUTING_ALLOWED; + + if (desired_output_groups & OMNI_WANT_REM_IFNAME) + omni_request->flags |= OMNI_WANT_IFNAME; + + if (desired_output_groups & OMNI_WANT_REM_IFSLOT) + omni_request->flags |= OMNI_WANT_IFSLOT; + + if (desired_output_groups & OMNI_WANT_REM_IFIDS) + omni_request->flags |= OMNI_WANT_IFIDS; - omni_request->measure_cpu = remote_cpu_usage; + if (desired_output_groups & OMNI_WANT_REM_DRVINFO) + omni_request->flags |= OMNI_WANT_DRVINFO; + + if (want_keepalive) + omni_request->flags |= OMNI_WANT_KEEPALIVE; + omni_request->cpu_rate = remote_cpu_rate; if (test_time) omni_request->test_length = test_time; @@ -4150,7 +4963,6 @@ omni_request->recv_dirty_count = rem_dirty_count; omni_request->recv_clean_count = rem_clean_count; - omni_request->checksum_off = remote_checksum_off; omni_request->data_port = atoi(remote_data_port); omni_request->ipfamily = af_to_nf(remote_res->ai_family); omni_request->socket_type = hst_to_nst(socket_type); @@ -4171,16 +4983,20 @@ tests will for the time being require that the user specify a local IP/name so we can extract them from the data_socket. */ getsockname(data_socket, (struct sockaddr *)&my_addr, &my_addr_len); + ret = get_sockaddr_family_addr_port(&my_addr, nf_to_af(omni_request->ipfamily), - omni_request->ipaddr, + omni_request->netperf_ip, &(omni_request->netperf_port)); + ret = get_sockaddr_family_addr_port((struct sockaddr_storage *)remote_res->ai_addr, + nf_to_af(omni_request->ipfamily), + omni_request->netserver_ip, + &(omni_request->data_port)); if (debug > 1) { fprintf(where,"netperf: send_omni: requesting OMNI test\n"); } - send_request(); @@ -4192,16 +5008,16 @@ recv_response_n(OMNI_RESPONSE_CONV_CUTOFF); /* brittle, but functional */ if (!netperf_response.content.serv_errno) { - rsr_size = omni_response->recv_buf_size; - remote_recv_size = omni_response->receive_size; - rss_size = omni_response->send_buf_size; - remote_send_size = omni_response->send_size; - rem_nodelay = omni_response->no_delay; - remote_use_sendfile = omni_response->use_sendfile; - remote_cpu_usage = omni_response->measure_cpu; - remote_cpu_rate = omni_response->cpu_rate; - remote_send_width = omni_response->send_width; - remote_recv_width = omni_response->recv_width; + rsr_size = omni_response->recv_buf_size; + remote_recv_size = omni_response->receive_size; + rss_size = omni_response->send_buf_size; + remote_send_size = omni_response->send_size; + rem_nodelay = omni_response->flags & OMNI_NO_DELAY; + remote_use_sendfile = omni_response->flags & OMNI_USE_SENDFILE; + remote_cpu_usage = omni_response->flags & OMNI_MEASURE_CPU; + remote_cpu_rate = omni_response->cpu_rate; + remote_send_width = omni_response->send_width; + remote_recv_width = omni_response->recv_width; /* make sure that port numbers are in network order because recv_response will have put everything into host order */ set_port_number(remote_res, @@ -4214,7 +5030,8 @@ } /* just in case the remote didn't null terminate */ if (NULL == remote_system_model) { - omni_response->system_model[sizeof(omni_response->system_model)-1] = 0; + omni_response->system_model[sizeof(omni_response->system_model)-1] = + 0; remote_system_model = strdup(omni_response->system_model); } if (NULL == remote_cpu_model) { @@ -4241,11 +5058,13 @@ netperf_response.content.serv_errno); perror(""); fflush(where); - exit(1); + exit(-1); } } else { + /* we are a no_control test so some things about the remote need + to be set accordingly */ if (NULL == remote_system_model) remote_system_model = strdup("Unknown System Model"); if (NULL == remote_cpu_model) @@ -4264,12 +5083,17 @@ some point even if we are a connectionless protocol, we may still want to "connect" for convenience raj 2008-01-14 */ need_to_connect = (protocol != IPPROTO_UDP); - + + /* possibly wait just a moment before actually starting - used + mainly when one is doing many many many concurrent netperf + tests */ + WAIT_BEFORE_DATA_TRAFFIC(); + /* Set-up the test end conditions. For tests over a "reliable/connection-oriented" transport (eg TCP, SCTP, etc) this can be either time or byte/transaction count based. for unreliable transport or connection tests it can only be time - based. having said that, we rely entirely on other code to +p based. having said that, we rely entirely on other code to enforce this before we even get here. raj 2008-01-08 */ if (test_time) { @@ -4318,26 +5142,22 @@ data. at least that is the plan :) raj 2008-01-08 */ while ((!times_up) || (units_remaining > 0)) { + + /* we need to be careful about when we snap a timestamp + depending on the test parameters. this one *should* cover + everything but the burst request/response test - famous last + words of course. raj 20110111 */ -#ifdef WANT_HISTOGRAM - /* only pull the timestamp if we are actually going to use the - results of the work. we put the call here so it can work for - any sort of test - connection, request/response, or stream. - no, it isn't "perfect" for all of them - for some it will - include a few more "if's" than a purpose-written routine, but - it _should_ be the case that the time spent up here is - epsilon compared to time spent elsewhere in the stack so it - should not be a big deal. famous last words of raj - 2008-01-08 */ - if (verbosity > 1) { - HIST_timestamp(&time_one); + if (keep_histogram) { + HIST_timestamp_start(time_hist); } -#endif /* WANT_HISTOGRAM */ - + + again: if (need_socket) { if (connection_test) + pick_next_port_number(local_res,remote_res); data_socket = create_data_socket(local_res); @@ -4366,8 +5186,10 @@ else if ((ret == -2) && connection_test) { /* transient error on a connection test means go around and try again with another local port number */ - fprintf(where,"transient! transient! torpedo in the water!\n"); - fflush(where); + if (debug) { + fprintf(where,"transient! transient! torpedo in the water!\n"); + fflush(where); + } close(data_socket); connected = 0; /* probably redundant but what the heck... */ need_socket = 1; @@ -4377,6 +5199,8 @@ allocating a new socket it will do the right thing with the bind() call */ pick_next_port_number(local_res,remote_res); + /* yes Virginia, a goto. perhaps one day we will rewrite + the code to avoid it but for now, a goto... raj */ goto again; } else { @@ -4406,13 +5230,14 @@ (requests_outstanding < first_burst_size) && (NETPERF_IS_RR(direction)) && (!connection_test)) { - if (debug) { + if (debug > 1) { fprintf(where, "injecting, req_outstanding %d req_cwnd %d burst %d\n", requests_outstanding, request_cwnd, first_burst_size); } + if ((ret = send_data(data_socket, send_ring, bytes_to_send, @@ -4425,6 +5250,17 @@ } local_send_calls += 1; requests_outstanding += 1; + + /* yes, it seems a trifle odd having this *after* the send() + just above, but really this is for the next send() or + recv() call below or in the iteration of this loop, and the + first HIST_timestamp_start() call at the top of the + outermost loop will be for the first send() call here in + the burst code. clear ain't it?-) raj 20110111 */ + + if (keep_histogram) { + HIST_timestamp_start(time_hist); + } } #endif /* WANT_FIRST_BURST */ @@ -4432,6 +5268,7 @@ /* if we should try to send something, then by all means, let us try to send something. */ if (direction & NETPERF_XMIT) { + ret = send_data(data_socket, send_ring, bytes_to_send, @@ -4539,17 +5376,21 @@ #ifdef WANT_FIRST_BURST /* so, since we've gotten a response back, update the bookkeeping accordingly. there is one less request - outstanding and we can put one more out there than before. */ + outstanding and we can put one more out there than + before. */ requests_outstanding -= 1; if ((request_cwnd < first_burst_size) && - (NETPERF_IS_RR(direction))) { + (NETPERF_IS_RR(direction)) && + (++requests_this_cwnd == request_cwnd)) { request_cwnd += 1; + requests_this_cwnd = 0; if (debug) { fprintf(where, - "incr req_cwnd to %d first_burst %d reqs_outstndng %d\n", + "incr req_cwnd to %d first_burst %d reqs_outstndng %di trans %"PRIu64"\n", request_cwnd, first_burst_size, - requests_outstanding); + requests_outstanding, + trans_completed + 1); } } #endif @@ -4566,11 +5407,15 @@ one takes the defaults at time of socket creation. if we took those defaults, we should inquire as to what the values ultimately became. raj 2008-01-15 */ - if (lsr_size_req < 0) + /* however annoying having to do this might be, it really + shouldn't be done over and over again. instead we will + assume it does not change, which is fine since we would + have only reported one of them anyway. raj 20100917 */ + if ((lsr_size_req < 0) && (-1 == lsr_size_end)) get_sock_buffer(data_socket, RECV_BUFFER, &lsr_size_end); else lsr_size_end = lsr_size; - if (lss_size_req < 0) + if ((lss_size_req < 0) && (-1 == lss_size_end)) get_sock_buffer(data_socket, SEND_BUFFER, &lss_size_end); else lss_size_end = lss_size; @@ -4582,7 +5427,7 @@ /* we will only make this call the one time - after the first call, the value will be real or -1. if this is a connection test we want to do this here because later we won't be - connected and the data may no longer be available */ + connected and the data may no longer be available. */ if (transport_mss == -2) get_transport_info(data_socket, &transport_mss, @@ -4614,12 +5459,9 @@ } -#ifdef WANT_HISTOGRAM - if (verbosity > 1) { - HIST_timestamp(&time_two); - HIST_add(time_hist,delta_micro(&time_one,&time_two)); + if (keep_histogram) { + HIST_timestamp_stop_add(time_hist); } -#endif /* WANT_HISTOGRAM */ #ifdef WANT_DEMO if (NETPERF_IS_RR(direction)) { @@ -4655,6 +5497,8 @@ get_transport_info(data_socket, &transport_mss, local_res->ai_protocol); + local_transport_retrans = get_transport_retrans(data_socket, + local_res->ai_protocol); find_security_info(&local_security_enabled_num, @@ -4714,22 +5558,60 @@ cpu_stop(local_cpu_usage,&elapsed_time); - find_system_info(&local_system_model, - &local_cpu_model, - &local_cpu_frequency); - - local_interface_name = - find_egress_interface(local_res->ai_addr,remote_res->ai_addr); + /* if this is a legacy test, there is not much point to finding + all these things since they will not be emitted. */ + if (!legacy) { + /* and even if this is not a legacy test, there is still not + much point to finding these things if they will not be + emitted */ + find_system_info(&local_system_model, + &local_cpu_model, + &local_cpu_frequency); + + if ((desired_output_groups & OMNI_WANT_LOC_IFNAME) || + (desired_output_groups & OMNI_WANT_LOC_DRVINFO) || + (desired_output_groups & OMNI_WANT_LOC_IFSLOT) || + (desired_output_groups & OMNI_WANT_LOC_IFIDS)) { + local_interface_name = + find_egress_interface(local_res->ai_addr,remote_res->ai_addr); + } + else { + local_interface_name = strdup("Bug If Seen IFNAME"); + } - find_driver_info(local_interface_name,local_driver_name,local_driver_version,local_driver_firmware,local_driver_bus,32); + if (desired_output_groups & OMNI_WANT_LOC_DRVINFO) { + find_driver_info(local_interface_name,local_driver_name, + local_driver_version,local_driver_firmware, + local_driver_bus,32); + } + else { + strncpy(local_driver_name,"Bug If Seen DRVINFO",32); + strncpy(local_driver_version, "Bug If Seen DRVINFO",32); + strncpy(local_driver_firmware,"Bug If Seen DRVINFO",32); + strncpy(local_driver_bus,"Bug If Seen DRVINFO",32); + } - local_interface_slot = find_interface_slot(local_interface_name); + if (desired_output_groups & OMNI_WANT_LOC_IFSLOT) { + local_interface_slot = find_interface_slot(local_interface_name); + } + else { + local_interface_slot = strdup("Bug If Seen IFSLOT"); + } - find_interface_ids(local_interface_name, - &local_interface_vendor, - &local_interface_device, - &local_interface_subvendor, - &local_interface_subdevice); + if (desired_output_groups & OMNI_WANT_LOC_IFIDS) { + find_interface_ids(local_interface_name, + &local_interface_vendor, + &local_interface_device, + &local_interface_subvendor, + &local_interface_subdevice); + } + else { + local_interface_vendor = -2; + local_interface_device = -2; + local_interface_subvendor = -2; + local_interface_subdevice = -2; + } + } /* if we timed-out, and had padded the timer, we need to subtract the pad_time from the elapsed time on the assumption that we @@ -4809,9 +5691,15 @@ perror(""); fflush(where); - exit(1); + exit(-1); } } + else { + /* when we are sending, in a no_control test, we have to + ass-u-me that everything we sent was received, otherwise, we + will report a transfer rate of zero. */ + remote_bytes_xferd = bytes_sent; + } /* so, what was the end result? */ local_cpu_method = format_cpu_method(cpu_method); @@ -4843,19 +5731,35 @@ thruput = calc_thruput(remote_bytes_xferd); if (NETPERF_IS_RR(direction)) { - char tmpfmt; + float rtt_elapsed_time = elapsed_time; + +#ifdef WANT_INTERVALS + /* if the test was paced, we need to subtract the time we were + sitting paced from the time we use to calculate the averate + rtt_latency. Of course, won't really know how long we were + sitting unless we bracket the sit with timing calls, which + will be additional overhead affecting CPU utilization. but, + there is no such thing as a free lunch is there :) raj + 20110121 */ + if (interval_burst) { + rtt_elapsed_time -= (float)interval_wait_microseconds / 1000000.0; + } +#endif /* WANT_INTERVALS */ + if (!connection_test) { /* calculate the round trip latency, using the transaction rate whether or not the user was asking for thruput to be in 'x' units please... however... a connection_test only ever has one transaction in flight at one time */ rtt_latency = - (((double)1.0/(trans_completed/elapsed_time)) * (double)1000000.0) * + (((double)1.0/(trans_completed/rtt_elapsed_time)) * + (double)1000000.0) * (double) (1 + ((first_burst_size > 0) ? first_burst_size : 0)); } - else - rtt_latency = - ((double)1.0/(trans_completed/elapsed_time)) * (double)1000000.0; + else { + rtt_latency = ((double)1.0/(trans_completed/rtt_elapsed_time)) * + (double)1000000.0; + } tmpfmt = libfmt; libfmt = 'x'; transaction_rate = calc_thruput(trans_completed); @@ -4887,9 +5791,6 @@ remote_cpu_utilization = omni_result->cpu_util; - /* since calc_service demand is doing ms/Kunit we will */ - /* multiply the number of transaction by 1024 to get */ - /* "good" numbers */ remote_service_demand = calc_service_demand_fmt(('x' == libfmt) ? (double) trans_completed: bytes_xferd, 0.0, @@ -4952,13 +5853,35 @@ /* at some point we need to average these during a confidence interval run, and when we do do that, we need to make sure we restore the value of libfmt correctly */ - if ('x' == libfmt) libfmt = 'm'; + tmpfmt = libfmt; + if ('x' == libfmt) { + libfmt = 'm'; + } local_send_thruput = calc_thruput(bytes_sent); local_recv_thruput = calc_thruput(bytes_received); remote_send_thruput = calc_thruput(remote_bytes_sent); remote_recv_thruput = calc_thruput(remote_bytes_received); - print_omni(); + libfmt = tmpfmt; + + /* were we tracking possibly expensive statistics? */ + if (keep_statistics) { + HIST_get_stats(time_hist, + &min_latency, + &max_latency, + &mean_latency, + &stddev_latency); + p50_latency = HIST_get_percentile(time_hist, 0.50); + p90_latency = HIST_get_percentile(time_hist, 0.90); + p99_latency = HIST_get_percentile(time_hist, 0.99); + + } + + /* if we are running a legacy test we do not do the nifty new omni + output stuff */ + if (!legacy) { + print_omni(); + } #if defined(DEBUG_OMNI_OUTPUT) { @@ -4966,16 +5889,16 @@ should be gone for "production" :) */ int i; print_omni_init(); - output_csv_list[1] = OUTPUT_END; + output_list[0][1] = OUTPUT_END; for (i = OUTPUT_NONE; i < NETPERF_OUTPUT_MAX; i++) { - output_csv_list[0] = i; + output_list[0][0] = i; print_omni_csv(); } } #endif /* likely as not we are going to do something slightly different here */ - if (verbosity > 1) { + if ((verbosity > 1) && (!legacy)) { #ifdef WANT_HISTOGRAM fprintf(where,"\nHistogram of "); @@ -4997,29 +5920,47 @@ } } fprintf(where," times\n"); - fflush(where); HIST_report(time_hist); + fflush(where); #endif /* WANT_HISTOGRAM */ } } +void +send_omni(char remote_host[]) +{ + char name_buf[32]; + snprintf(name_buf,sizeof(name_buf),"OMNI %s TEST",direction_str); + send_omni_inner(remote_host, 0, name_buf); +} + +static void +set_hostname_and_port_2(void *addr, char *hostname, char *portstr, int family, int port) +{ + + inet_ntop(family, addr, hostname, BUFSIZ); + + sprintf(portstr, "%u", port); + +} + /* the name is something of a misnomer since this test could send, or receive, or both, but it matches the historical netperf routine - naming. */ + naming convention for what runs in the netserver context. */ void recv_omni() { - - char *message; + struct addrinfo *local_res; char local_name[BUFSIZ]; char port_buffer[PORTBUFSIZE]; struct sockaddr_storage myaddr_in, peeraddr_in; + int peeraddr_set = 0; SOCKET s_listen, data_socket; netperf_socklen_t addrlen; @@ -5032,7 +5973,7 @@ int need_to_accept; int connected; int ret; - int temp_recvs; + uint32_t temp_recvs; struct omni_request_struct *omni_request; struct omni_response_struct *omni_response; @@ -5077,11 +6018,13 @@ variables, so set the globals based on the values in the request. once the socket has been created, we will set the response values based on the updated value of those globals. raj 7/94 */ - lss_size_req = omni_request->send_buf_size; - lsr_size_req = omni_request->recv_buf_size; - loc_nodelay = omni_request->no_delay; - loc_rcvavoid = omni_request->so_rcvavoid; - loc_sndavoid = omni_request->so_sndavoid; + lss_size_req = omni_request->send_buf_size; + lsr_size_req = omni_request->recv_buf_size; + loc_nodelay = (omni_request->flags) & OMNI_NO_DELAY; + loc_rcvavoid = omni_request->so_rcvavoid; + loc_sndavoid = omni_request->so_sndavoid; + routing_allowed = (omni_request->flags) & OMNI_ROUTING_ALLOWED; + want_keepalive = (omni_request->flags) & OMNI_WANT_KEEPALIVE; #ifdef WANT_INTERVALS interval_usecs = omni_request->interval_usecs; @@ -5093,13 +6036,22 @@ interval_burst = 0; #endif - connection_test = omni_request->connect_test; + connection_test = omni_request->flags & OMNI_CONNECT_TEST; direction = omni_request->direction; - set_hostname_and_port(local_name, - port_buffer, - nf_to_af(omni_request->ipfamily), - omni_request->data_port); + /* kludgy, because I have no way at present to say how many bytes + needed to be swapped around for the request from which this is + pulled, and it is probably all wrong for IPv6 :( */ + for (ret=0; ret < 4; ret++) { + omni_request->netserver_ip[ret] = htonl(omni_request->netserver_ip[ret]); + omni_request->netperf_ip[ret] = htonl(omni_request->netperf_ip[ret]); + } + + set_hostname_and_port_2(omni_request->netserver_ip, + local_name, + port_buffer, + nf_to_af(omni_request->ipfamily), + omni_request->data_port); local_res = complete_addrinfo(local_name, local_name, @@ -5118,7 +6070,7 @@ fprintf(where,"could not create data socket\n"); fflush(where); } - exit(1); + exit(-1); } /* We now alter the message_ptr variables to be at the desired */ @@ -5126,11 +6078,10 @@ if (debug) { fprintf(where, - "recv_omni: requested recv alignment of %d offset %d\n", - omni_request->recv_alignment, - omni_request->recv_offset); - fprintf(where, + "recv_omni: requested recv alignment of %d offset %d\n" "recv_omni: requested send alignment of %d offset %d\n", + omni_request->recv_alignment, + omni_request->recv_offset, omni_request->send_alignment, omni_request->send_offset); fflush(where); @@ -5139,6 +6090,15 @@ omni_response->send_size = omni_request->send_size; omni_response->send_width = omni_request->send_width; if (omni_request->direction & NETPERF_XMIT) { +#ifdef fo + /* do we need to set multicast ttl? */ + if (is_multicast_addr(remote_res)) { + /* yes, s_listen - for a UDP test we will be copying it to + data_socket but that hasn't happened yet. raj 20100315 */ + set_multicast_ttl(s_listen); + } +#endif + if (omni_request->response_size > 0) { /* request/response_test */ bytes_to_send = omni_request->response_size; @@ -5147,8 +6107,7 @@ } else { if (omni_request->send_size == -1) { - if (lss_size > 0) bytes_to_send = lss_size; - else bytes_to_send = 4096; + bytes_to_send = choose_send_size(lss_size,omni_request->protocol); } else bytes_to_send = omni_request->send_size; /* set the send_width */ @@ -5169,8 +6128,16 @@ } omni_response->receive_size = omni_request->receive_size; - omni_response->recv_width = omni_response->recv_width; + omni_response->recv_width = omni_request->recv_width; if (omni_request->direction & NETPERF_RECV) { + + /* do we need to join a multicast group? */ + if (is_multicast_addr(local_res)) { + /* yes, s_listen - for a UDP test we will be copying it to + data_socket but that hasn't happened yet. raj 20100315 */ + join_multicast_addr(s_listen, local_res); + } + if (omni_request->request_size > 0) { /* request/response test */ bytes_to_recv = omni_request->request_size; @@ -5238,7 +6205,7 @@ fprintf(where,"could not getsockname\n"); fflush(where); } - exit(1); + exit(-1); } /* Now myaddr_in contains the port and the internet address this is @@ -5265,9 +6232,9 @@ /* the initiator. */ omni_response->cpu_rate = (float)0.0; /* assume no cpu */ - omni_response->measure_cpu = 0; - if (omni_request->measure_cpu) { - omni_response->measure_cpu = 1; + omni_response->flags &= ~OMNI_MEASURE_CPU; + if (omni_request->flags & OMNI_MEASURE_CPU) { + omni_response->flags |= OMNI_MEASURE_CPU; omni_response->cpu_rate = calibrate_local_cpu(omni_request->cpu_rate); } @@ -5276,7 +6243,11 @@ /* the socket parms from the globals */ omni_response->send_buf_size = lss_size; omni_response->recv_buf_size = lsr_size; - omni_response->no_delay = loc_nodelay; + if (loc_nodelay) + omni_response->flags |= OMNI_NO_DELAY; + else + omni_response->flags &= ~OMNI_NO_DELAY; + omni_response->so_rcvavoid = loc_rcvavoid; omni_response->so_sndavoid = loc_sndavoid; omni_response->interval_usecs = interval_usecs; @@ -5311,7 +6282,7 @@ /* Now it's time to start receiving data on the connection. We will */ /* first grab the apropriate counters and then start grabbing. */ - cpu_start(omni_request->measure_cpu); + cpu_start(omni_request->flags & OMNI_MEASURE_CPU); /* if the test is timed, set a timer of suitable length. if the test is by byte/transaction count, we don't need a timer - or @@ -5362,11 +6333,13 @@ timed_out = 1; break; } + netperf_response.content.serv_errno = errno; + send_response(); fprintf(where,"recv_omni: accept: errno = %d\n",errno); fflush(where); close(s_listen); - exit(1); + exit(-1); } if (debug) { @@ -5390,12 +6363,14 @@ /* I wonder if duping would be better here? we also need to set peeraddr_in so we can send to netperf if this isn't a request/response test or if we are going to connect() the - socket */ - if (omni_request->protocol == IPPROTO_UDP) { + socket, but we only need to do it once. */ + if ((omni_request->protocol == IPPROTO_UDP) && + (!peeraddr_set)) { + peeraddr_set = 1; data_socket = s_listen; set_sockaddr_family_addr_port(&peeraddr_in, nf_to_af(omni_request->ipfamily), - omni_request->ipaddr, + omni_request->netperf_ip, omni_request->netperf_port); } } @@ -5421,7 +6396,7 @@ is why there are two routines to rule them all rather than just one :) */ if ((omni_request->direction & NETPERF_RECV) && - !times_up) { + ((!times_up) || (units_remaining > 0))) { ret = recv_data(data_socket, recv_ring, bytes_to_recv, @@ -5444,9 +6419,6 @@ something else? that is an exceedingly good question and one for which I don't presently have a good answer, but that won't stop me from guessing :) raj 2008-01-09 */ - fprintf(where,"read zero conn_test %d null_message_ok %d\n", - connection_test,null_message_ok); - fflush(where); if (!((connection_test) || (null_message_ok))) { /* if it is neither a connection_test nor null_message_ok it must be the end of the test */ @@ -5467,7 +6439,9 @@ /* presently at least, -2 and -3 are equally bad on recv */ /* we need a response message here for the control connection before we exit! */ - exit(1); + netperf_response.content.serv_errno = errno; + send_response(); + exit(-1); } recv_ring = recv_ring->next; } @@ -5475,7 +6449,7 @@ /* if we should try to send something, then by all means, let us try to send something. */ if ((omni_request->direction & NETPERF_XMIT) && - !times_up) { + ((!times_up) || (units_remaining > 0))) { ret = send_data(data_socket, send_ring, bytes_to_send, @@ -5522,7 +6496,9 @@ /* we need a response message back to netperf here before we exit */ /* NEED RESPONSE; */ - exit(1); + netperf_response.content.serv_errno = errno; + send_response(); + exit(-1); } } @@ -5534,11 +6510,15 @@ one takes the defaults at time of socket creation. if we took those defaults, we should inquire as to what the values ultimately became. raj 2008-01-15 */ - if (lsr_size_req < 0) + /* but as annoying as it is to have to make these calls, don't + penalize linux by calling them over and over again. instead + we will simply ass-u-me that it will become the same value + over and over again. raj 20100917 */ + if ((lsr_size_req < 0) && (-1 == lsr_size_end)) get_sock_buffer(data_socket, RECV_BUFFER, &lsr_size_end); else lsr_size_end = lsr_size; - if (lss_size_req < 0) + if ((lss_size_req < 0) && (-1 == lss_size_end)) get_sock_buffer(data_socket, SEND_BUFFER, &lss_size_end); else lss_size_end = lss_size; @@ -5546,16 +6526,18 @@ lsr_size_end = lsr_size; lss_size_end = lss_size; #endif - ret = close_data_socket(data_socket,NULL,0); + ret = close_data_socket(data_socket,NULL,0,omni_request->protocol); if (ret == -1) { times_up = 1; timed_out = 1; break; } else if (ret < 0) { + netperf_response.content.serv_errno = errno; + send_response(); perror("netperf: recv_omni: close_data_socket failed"); fflush(where); - exit(1); + exit(-1); } /* we will need a new connection to be established */ need_to_accept = 1; @@ -5579,9 +6561,10 @@ /* The current iteration loop now exits due to timeout or unit count being reached */ - - cpu_stop(omni_request->measure_cpu,&elapsed_time); - + stop_timer(); + cpu_stop(omni_request->flags & OMNI_MEASURE_CPU,&elapsed_time); + close(s_listen); + if (timed_out) { /* we ended the test by time, which may have been PAD_TIME seconds longer than we wanted to run. so, we want to subtract pad_time @@ -5613,10 +6596,10 @@ lsr_size_end = lsr_size; lss_size_end = lss_size; #endif - close_data_socket(data_socket,NULL,0); + close_data_socket(data_socket,NULL,0,omni_request->protocol); } else { - close_data_socket(data_socket,(struct sockaddr *)&peeraddr_in,addrlen); + close_data_socket(data_socket,(struct sockaddr *)&peeraddr_in,addrlen,omni_request->protocol); lsr_size_end = lsr_size; lss_size_end = lss_size; } @@ -5635,29 +6618,59 @@ omni_results->elapsed_time = elapsed_time; omni_results->cpu_method = cpu_method; omni_results->num_cpus = lib_num_loc_cpus; - if (omni_request->measure_cpu) { + if (omni_request->flags & OMNI_MEASURE_CPU) { omni_results->cpu_util = calc_cpu_util(elapsed_time); } omni_results->peak_cpu_util = (float)lib_local_peak_cpu_util; omni_results->peak_cpu_id = lib_local_peak_cpu_id; - local_interface_name = - find_egress_interface(local_res->ai_addr,(struct sockaddr *)&peeraddr_in); - strncpy(omni_results->ifname,local_interface_name,16); - omni_results->ifname[15] = 0; - local_interface_slot = find_interface_slot(local_interface_name); - strncpy(omni_results->ifslot,local_interface_slot,16); - omni_results->ifslot[15] = 0; - find_interface_ids(local_interface_name, - &omni_results->vendor, - &omni_results->device, - &omni_results->subvendor, - &omni_results->subdevice); - find_driver_info(local_interface_name, - omni_results->driver, - omni_results->version, - omni_results->firmware, - omni_results->bus, - 32); + if ((omni_request->flags & OMNI_WANT_IFNAME) || + (omni_request->flags & OMNI_WANT_IFSLOT) || + (omni_request->flags & OMNI_WANT_IFIDS) || + (omni_request->flags & OMNI_WANT_DRVINFO)) { + local_interface_name = + find_egress_interface(local_res->ai_addr,(struct sockaddr *)&peeraddr_in); + strncpy(omni_results->ifname,local_interface_name,16); + omni_results->ifname[15] = 0; + } + else { + strncpy(omni_results->ifname,"Bug If Seen IFNAME",16); + } + if (omni_request->flags & OMNI_WANT_IFSLOT) { + local_interface_slot = find_interface_slot(local_interface_name); + strncpy(omni_results->ifslot,local_interface_slot,16); + omni_results->ifslot[15] = 0; + } + else { + strncpy(omni_results->ifslot,"Bug If Seen IFSLOT",16); + } + if (omni_request->flags & OMNI_WANT_IFIDS) { + find_interface_ids(local_interface_name, + &omni_results->vendor, + &omni_results->device, + &omni_results->subvendor, + &omni_results->subdevice); + } + else { + omni_results->vendor = -2; + omni_results->device = -2; + omni_results->subvendor = -2; + omni_results->subdevice = -2; + } + if (omni_request->flags & OMNI_WANT_DRVINFO) { + find_driver_info(local_interface_name, + omni_results->driver, + omni_results->version, + omni_results->firmware, + omni_results->bus, + 32); + } + else { + strncpy(omni_results->driver,"Bug If Seen DRVINFO",32); + strncpy(omni_results->version,"Bug If Seen DRVINFO",32); + strncpy(omni_results->firmware,"Bug If Seen DRVINFO",32); + strncpy(omni_results->bus,"Bug If Seen DRVINFO",32); + } + if (debug) { fprintf(where, "recv_omni: test complete, sending results.\n"); @@ -5666,35 +6679,1240 @@ send_response_n(OMNI_RESULTS_CONF_CUTOFF); - /* when we implement this, it will look a little strange, but we do - it to avoid certain overheads when running aggregates and using - confidence intervals. we will post a recv_request() call to get - the next message or EOF on the control connection. either the - netperf will close the control connection, which will tell us we - are done, or the netperf will send us another "DO_OMNI" message, - which by definition should be identical to the first DO_OMNI - message we received. +} + + +#ifdef WANT_MIGRATION +void +send_tcp_stream(char remote_host[]) +{ + + char *tput_title = "\ +Recv Send Send \n\ +Socket Socket Message Elapsed \n\ +Size Size Size Time Throughput \n\ +bytes bytes bytes secs. %s/sec \n\n"; + + char *tput_fmt_0 = + "%7.2f %s\n"; + + char *tput_fmt_1 = + "%6d %6d %6d %-6.2f %7.2f %s\n"; + + char *cpu_title = "\ +Recv Send Send Utilization Service Demand\n\ +Socket Socket Message Elapsed Send Recv Send Recv\n\ +Size Size Size Time Throughput local remote local remote\n\ +bytes bytes bytes secs. %-8.8s/s %% %c %% %c us/KB us/KB\n\n"; + + char *cpu_fmt_0 = + "%6.3f %c %s\n"; + + char *cpu_fmt_1 = + "%6d %6d %6d %-6.2f %7.2f %-6.2f %-6.2f %-6.3f %-6.3f %s\n"; + + char *ksink_fmt = "\n\ +Alignment Offset %-8.8s %-8.8s Sends %-8.8s Recvs\n\ +Local Remote Local Remote Xfered Per Per\n\ +Send Recv Send Recv Send (avg) Recv (avg)\n\ +%5d %5d %5d %5d %6"PRId64" %6.2f %6"PRId64" %6.2f %6"PRId64"\n"; + + char *ksink_fmt2 = "\n\ +Maximum\n\ +Segment\n\ +Size (bytes)\n\ +%6d\n"; + + send_omni_inner(remote_host, legacy, "MIGRATED TCP STREAM TEST"); + + + if (legacy) { + + /* We are now ready to print all the information, but only if we + are truly acting as a legacy test. If the user has specified + zero-level verbosity, we will just print the local service + demand, or the remote service demand. If the user has requested + verbosity level 1, he will get the basic "streamperf" + numbers. If the user has specified a verbosity of greater than + 1, we will display a veritable plethora of background + information from outside of this block as it it not + cpu_measurement specific... */ + + if (confidence < 0) { + /* we did not hit confidence, but were we asked to look for it? */ + if (iteration_max > 1) { + display_confidence(); + } + } + + if (local_cpu_usage || remote_cpu_usage) { + + switch (verbosity) { + case 0: + if (local_cpu_usage) { + fprintf(where, + cpu_fmt_0, + local_service_demand, + local_cpu_method, + ((print_headers) || + (result_brand == NULL)) ? "" : result_brand); + } + else { + fprintf(where, + cpu_fmt_0, + remote_service_demand, + remote_cpu_method, + ((print_headers) || + (result_brand == NULL)) ? "" : result_brand); + } + break; + case 1: + case 2: + if (print_headers) { + fprintf(where, + cpu_title, + format_units(), + local_cpu_method, + remote_cpu_method); + } + + fprintf(where, + cpu_fmt_1, /* the format string */ + rsr_size, /* remote recvbuf size */ + lss_size, /* local sendbuf size */ + send_size, /* how large were the sends */ + elapsed_time, /* how long was the test */ + thruput, /* what was the xfer rate */ + local_cpu_utilization, /* local cpu */ + remote_cpu_utilization, /* remote cpu */ + local_service_demand, /* local service demand */ + remote_service_demand, /* remote service demand */ + ((print_headers) || + (result_brand == NULL)) ? "" : result_brand); + break; + } + } + else { + /* The tester did not wish to measure service demand. */ + + switch (verbosity) { + case 0: + fprintf(where, + tput_fmt_0, + thruput, + ((print_headers) || + (result_brand == NULL)) ? "" : result_brand); + break; + case 1: + case 2: + if (print_headers) { + fprintf(where,tput_title,format_units()); + } + fprintf(where, + tput_fmt_1, /* the format string */ + rsr_size, /* remote recvbuf size */ + lss_size, /* local sendbuf size */ + send_size, /* how large were the sends */ + elapsed_time, /* how long did it take */ + thruput, /* how fast did it go */ + ((print_headers) || + (result_brand == NULL)) ? "" : result_brand); + break; + } + } + + /* it would be a good thing to include information about some of the */ + /* other parameters that may have been set for this test, but at the */ + /* moment, I do not wish to figure-out all the formatting, so I will */ + /* just put this comment here to help remind me that it is something */ + /* that should be done at a later time. */ + + if (verbosity > 1) { + /* The user wanted to know it all, so we will give it to him. */ + /* This information will include as much as we can find about */ + /* TCP statistics, the alignments of the sends and receives */ + /* and all that sort of rot... */ + + /* this stuff needs to be worked-out in the presence of confidence */ + /* intervals and multiple iterations of the test... raj 11/94 */ + + fprintf(where, + ksink_fmt, + "Bytes", + "Bytes", + "Bytes", + local_send_align, + remote_recv_align, + local_send_offset, + remote_recv_offset, + bytes_sent, + bytes_sent / (double)local_send_calls, + local_send_calls, + bytes_sent / (double)remote_receive_calls, + remote_receive_calls); + fprintf(where, + ksink_fmt2, + transport_mss); +#ifdef WANT_HISTOGRAM + fprintf(where,"\n\nHistogram of time spent in send() call.\n"); + HIST_report(time_hist); +#endif /* WANT_HISTOGRAM */ + fflush(where); + } + + } +} + +void +send_tcp_maerts(char remote_host[]) +{ + + char *tput_title = "\ +Recv Send Send \n\ +Socket Socket Message Elapsed \n\ +Size Size Size Time Throughput \n\ +bytes bytes bytes secs. %s/sec \n\n"; + + char *tput_fmt_0 = + "%7.2f %s\n"; + + char *tput_fmt_1 = + "%6d %6d %6d %-6.2f %7.2f %s\n"; + + char *cpu_title = "\ +Recv Send Send Utilization Service Demand\n\ +Socket Socket Message Elapsed Recv Send Recv Send\n\ +Size Size Size Time Throughput local remote local remote\n\ +bytes bytes bytes secs. %-8.8s/s %% %c %% %c us/KB us/KB\n\n"; + + char *cpu_fmt_0 = + "%6.3f %c %s\n"; - in this way we can avoid overheads like allocating the buffer - rings and the listen socket and the like */ + char *cpu_fmt_1 = + "%6d %6d %6d %-6.2f %7.2f %-6.2f %-6.2f %-6.3f %-6.3f %s\n"; + + char *ksink_fmt = "\n\ +Alignment Offset %-8.8s %-8.8s Recvs %-8.8s Sends\n\ +Local Remote Local Remote Xfered Per Per\n\ +Recv Send Recv Send Recv (avg) Send (avg)\n\ +%5d %5d %5d %5d %6"PRId64" %6.2f %6d %6.2f %6d\n"; + + char *ksink_fmt2 = "\n\ +Maximum\n\ +Segment\n\ +Size (bytes)\n\ +%6d\n"; + + send_omni_inner(remote_host, legacy, "MIGRATED TCP MAERTS TEST"); + + + /* We are now ready to print all the information, but only if we are + truly acting as a leacy test. If the user has specified + zero-level verbosity, we will just print the local service + demand, or the remote service demand. If the user has requested + verbosity level 1, he will get the basic "streamperf" numbers. If + the user has specified a verbosity of greater than 1, we will + display a veritable plethora of background information from + outside of this block as it it not cpu_measurement + specific... */ + + if (legacy) { + + if (confidence < 0) { + /* we did not hit confidence, but were we asked to look for it? */ + if (iteration_max > 1) { + display_confidence(); + } + } + + if (local_cpu_usage || remote_cpu_usage) { + + switch (verbosity) { + case 0: + if (local_cpu_usage) { + fprintf(where, + cpu_fmt_0, + local_service_demand, + local_cpu_method, + ((print_headers) || + (result_brand == NULL)) ? "" : result_brand); + } + else { + fprintf(where, + cpu_fmt_0, + remote_service_demand, + remote_cpu_method, + ((print_headers) || + (result_brand == NULL)) ? "" : result_brand); + } + break; + case 1: + case 2: + if (print_headers) { + fprintf(where, + cpu_title, + format_units(), + local_cpu_method, + remote_cpu_method); + } + + fprintf(where, + cpu_fmt_1, /* the format string */ + rsr_size, /* remote recvbuf size */ + lss_size, /* local sendbuf size */ + send_size, /* how large were the recvs */ + elapsed_time, /* how long was the test */ + thruput, /* what was the xfer rate */ + local_cpu_utilization, /* local cpu */ + remote_cpu_utilization, /* remote cpu */ + local_service_demand, /* local service demand */ + remote_service_demand, /* remote service demand */ + ((print_headers) || + (result_brand == NULL)) ? "" : result_brand); + break; + } + } + else { + /* The tester did not wish to measure service demand. */ + + switch (verbosity) { + case 0: + fprintf(where, + tput_fmt_0, + thruput, + ((print_headers) || + (result_brand == NULL)) ? "" : result_brand); + break; + case 1: + case 2: + if (print_headers) { + fprintf(where,tput_title,format_units()); + } + fprintf(where, + tput_fmt_1, /* the format string */ + lsr_size, /* local recvbuf size */ + rss_size, /* remot sendbuf size */ + remote_send_size, /* how large were the recvs */ + elapsed_time, /* how long did it take */ + thruput, /* how fast did it go */ + ((print_headers) || + (result_brand == NULL)) ? "" : result_brand); + break; + } + } + /* it would be a good thing to include information about some of the */ + /* other parameters that may have been set for this test, but at the */ + /* moment, I do not wish to figure-out all the formatting, so I will */ + /* just put this comment here to help remind me that it is something */ + /* that should be done at a later time. */ + + if (verbosity > 1) { + /* The user wanted to know it all, so we will give it to him. */ + /* This information will include as much as we can find about */ + /* TCP statistics, the alignments of the sends and receives */ + /* and all that sort of rot... */ + + /* this stuff needs to be worked-out in the presence of confidence */ + /* intervals and multiple iterations of the test... raj 11/94 */ + + fprintf(where, + ksink_fmt, + "Bytes", + "Bytes", + "Bytes", + local_recv_align, + remote_recv_align, + local_recv_offset, + remote_recv_offset, + bytes_received, + bytes_received / (double)local_receive_calls, + local_receive_calls, + remote_bytes_sent / (double)remote_send_calls, + remote_send_calls); + fprintf(where, + ksink_fmt2, + transport_mss); + +#ifdef WANT_HISTOGRAM + fprintf(where,"\n\nHistogram of time spent in recv() call.\n"); + HIST_report(time_hist); +#endif /* WANT_HISTOGRAM */ + fflush(where); + } + } } + + +void +send_tcp_rr(char remote_host[]) { + + char *tput_title = "\ +Local /Remote\n\ +Socket Size Request Resp. Elapsed Trans.\n\ +Send Recv Size Size Time Rate \n\ +bytes Bytes bytes bytes secs. per sec \n\n"; + + char *tput_title_band = "\ +Local /Remote\n\ +Socket Size Request Resp. Elapsed \n\ +Send Recv Size Size Time Throughput \n\ +bytes Bytes bytes bytes secs. %s/sec \n\n"; + + char *tput_fmt_0 = + "%7.2f %s\n"; + + char *tput_fmt_1_line_1 = "\ +%-6d %-6d %-6d %-6d %-6.2f %7.2f %s\n"; + char *tput_fmt_1_line_2 = "\ +%-6d %-6d\n"; + + char *cpu_title = "\ +Local /Remote\n\ +Socket Size Request Resp. Elapsed Trans. CPU CPU S.dem S.dem\n\ +Send Recv Size Size Time Rate local remote local remote\n\ +bytes bytes bytes bytes secs. per sec %% %c %% %c us/Tr us/Tr\n\n"; + + char *cpu_title_tput = "\ +Local /Remote\n\ +Socket Size Request Resp. Elapsed Tput CPU CPU S.dem S.dem\n\ +Send Recv Size Size Time %-8.8s local remote local remote\n\ +bytes bytes bytes bytes secs. per sec %% %c %% %c us/KB us/KB\n\n"; + + char *cpu_title_latency = "\ +Local /Remote\n\ +Socket Size Request Resp. Elapsed Latency CPU CPU S.dem S.dem\n\ +Send Recv Size Size Time usecs local remote local remote\n\ +bytes bytes bytes bytes secs. per tran %% %c %% %c us/Tr us/Tr\n\n"; + + char *cpu_fmt_0 = + "%6.3f %c %s\n"; + + char *cpu_fmt_1_line_1 = "\ +%-6d %-6d %-6d %-6d %-6.2f %-6.2f %-6.2f %-6.2f %-6.3f %-6.3f %s\n"; + + char *cpu_fmt_1_line_2 = "\ +%-6d %-6d\n"; + + char *ksink_fmt = "\ +Alignment Offset RoundTrip Trans Throughput\n\ +Local Remote Local Remote Latency Rate %-8.8s/s\n\ +Send Recv Send Recv usec/Tran per sec Outbound Inbound\n\ +%5d %5d %5d %5d %-6.3f %-6.3f %-6.3f %-6.3f\n"; + + send_omni_inner(remote_host, legacy, "MIGRATED TCP REQUEST/RESPONSE TEST"); + + if (legacy) { + /* We are now ready to print all the information. If the user has + specified zero-level verbosity, we will just print the local + service demand, or the remote service demand. If the user has + requested verbosity level 1, he will get the basic "streamperf" + numbers. If the user has specified a verbosity of greater than 1, + we will display a veritable plethora of background information + from outside of this block as it it not cpu_measurement + specific... */ + + if (confidence < 0) { + /* we did not hit confidence, but were we asked to look for it? */ + if (iteration_max > 1) { + display_confidence(); + } + } + + if (local_cpu_usage || remote_cpu_usage) { + + switch (verbosity) { + case 0: + if (local_cpu_usage) { + fprintf(where, + cpu_fmt_0, + local_service_demand, + local_cpu_method, + ((print_headers) || + (result_brand == NULL)) ? "" : result_brand); + } + else { + fprintf(where, + cpu_fmt_0, + remote_service_demand, + remote_cpu_method, + ((print_headers) || + (result_brand == NULL)) ? "" : result_brand); + } + break; + case 1: + case 2: + if (print_headers) { + if ('x' == libfmt) { + fprintf(where, + cpu_title, + local_cpu_method, + remote_cpu_method); + } + else { + fprintf(where, + cpu_title_tput, + format_units(), + local_cpu_method, + remote_cpu_method); + } + } + + fprintf(where, + cpu_fmt_1_line_1, /* the format string */ + lss_size, /* local sendbuf size */ + lsr_size, + req_size, /* how large were the requests */ + rsp_size, /* guess */ + elapsed_time, /* how long was the test */ + thruput, + local_cpu_utilization, /* local cpu */ + remote_cpu_utilization, /* remote cpu */ + local_service_demand, /* local service demand */ + remote_service_demand, /* remote service demand */ + ((print_headers) || + (result_brand == NULL)) ? "" : result_brand); + fprintf(where, + cpu_fmt_1_line_2, + rss_size, + rsr_size); + break; + } + } + else { + /* The tester did not wish to measure service demand. */ + + switch (verbosity) { + case 0: + fprintf(where, + tput_fmt_0, + thruput, + ((print_headers) || + (result_brand == NULL)) ? "" : result_brand); + break; + case 1: + case 2: + if (print_headers) { + fprintf(where, + ('x' == libfmt) ? tput_title : tput_title_band, + format_units()); + } + + fprintf(where, + tput_fmt_1_line_1, /* the format string */ + lss_size, + lsr_size, + req_size, /* how large were the requests */ + rsp_size, /* how large were the responses */ + elapsed_time, /* how long did it take */ + /* are we trans or do we need to convert to bytes then + bits? at this point, thruput is in our "confident" + transactions per second. we can convert to a + bidirectional bitrate by multiplying that by the sum + of the req_size and rsp_size. we pass that to + calc_thruput_interval_omni with an elapsed time of + 1.0 s to get it converted to [kmg]bits/s or + [KMG]Bytes/s */ + thruput, + ((print_headers) || + (result_brand == NULL)) ? "" : result_brand); + fprintf(where, + tput_fmt_1_line_2, + rss_size, /* remote recvbuf size */ + rsr_size); + + break; + } + } + + /* it would be a good thing to include information about some of the */ + /* other parameters that may have been set for this test, but at the */ + /* moment, I do not wish to figure-out all the formatting, so I will */ + /* just put this comment here to help remind me that it is something */ + /* that should be done at a later time. */ + + /* how to handle the verbose information in the presence of */ + /* confidence intervals is yet to be determined... raj 11/94 */ + if (verbosity > 1) { + /* The user wanted to know it all, so we will give it to him. */ + /* This information will include as much as we can find about */ + /* TCP statistics, the alignments of the sends and receives */ + /* and all that sort of rot... */ + + /* normally, you might think that if we were messing about with + the value of libfmt we would need to put it back again, but + since this is basically the last thing we are going to do with + it, it does not matter. so there :) raj 2007-06-08 */ + /* if the user was asking for transactions, then we report + megabits per second for the unidirectional throughput, + otherwise we use the desired units. */ + if ('x' == libfmt) { + libfmt = 'm'; + } + + fprintf(where, + ksink_fmt, + format_units(), + local_send_align, + remote_recv_offset, + local_send_offset, + remote_recv_offset, + /* if the user has enable burst mode, we have to remember + to account for that in the number of transactions + outstanding at any one time. otherwise we will + underreport the latency of individual + transactions. learned from saf by raj 2007-06-08 */ + (((double)1.0/transaction_rate)*(double)1000000.0) * + (double) (1 + ((first_burst_size > 0) ? first_burst_size : 0)), + transaction_rate, + calc_thruput_interval_omni(transaction_rate * (double)req_size, + 1.0), + calc_thruput_interval_omni(transaction_rate * (double)rsp_size, + 1.0)); + +#ifdef WANT_HISTOGRAM + fprintf(where,"\nHistogram of request/response times\n"); + HIST_report(time_hist); +#endif /* WANT_HISTOGRAM */ + fflush(where); + } + } +} + + +void +send_tcp_conn_rr(char remote_host[]) +{ + + char *tput_title = "\ +Local /Remote\n\ +Socket Size Request Resp. Elapsed Trans.\n\ +Send Recv Size Size Time Rate \n\ +bytes Bytes bytes bytes secs. per sec \n\n"; + + char *tput_fmt_0 = + "%7.2f\n"; + + char *tput_fmt_1_line_1 = "\ +%-6d %-6d %-6d %-6d %-6.2f %7.2f \n"; + char *tput_fmt_1_line_2 = "\ +%-6d %-6d\n"; + + char *cpu_title = "\ +Local /Remote\n\ +Socket Size Request Resp. Elapsed Trans. CPU CPU S.dem S.dem\n\ +Send Recv Size Size Time Rate local remote local remote\n\ +bytes bytes bytes bytes secs. per sec %% %% us/Tr us/Tr\n\n"; + + char *cpu_fmt_0 = + "%6.3f\n"; + + char *cpu_fmt_1_line_1 = "\ +%-6d %-6d %-6d %-6d %-6.2f %-6.2f %-6.2f %-6.2f %-6.3f %-6.3f\n"; + + char *cpu_fmt_1_line_2 = "\ +%-6d %-6d\n"; + + char *ksink_fmt = "\n\ +Alignment Offset\n\ +Local Remote Local Remote\n\ +Send Recv Send Recv\n\ +%5d %5d %5d %5d\n"; + + send_omni_inner(remote_host, + legacy, + "MIGRATED TCP Connect/Request/Response TEST"); + + /* We are now ready to print all the information. If the user */ + /* has specified zero-level verbosity, we will just print the */ + /* local service demand, or the remote service demand. If the */ + /* user has requested verbosity level 1, he will get the basic */ + /* "streamperf" numbers. If the user has specified a verbosity */ + /* of greater than 1, we will display a veritable plethora of */ + /* background information from outside of this block as it it */ + /* not cpu_measurement specific... */ + + if (legacy) { + if (confidence < 0) { + /* we did not hit confidence, but were we asked to look for it? */ + if (iteration_max > 1) { + display_confidence(); + } + } + + if (local_cpu_usage || remote_cpu_usage) { + + switch (verbosity) { + case 0: + if (local_cpu_usage) { + fprintf(where, + cpu_fmt_0, + local_service_demand, + local_cpu_method); + } + else { + fprintf(where, + cpu_fmt_0, + remote_service_demand, + remote_cpu_method); + } + break; + case 1: + case 2: + if (print_headers) { + fprintf(where, + cpu_title, + local_cpu_method, + remote_cpu_method); + } + + fprintf(where, + cpu_fmt_1_line_1, /* the format string */ + lss_size, /* local sendbuf size */ + lsr_size, + req_size, /* how large were the requests */ + rsp_size, /* guess */ + elapsed_time, /* how long was the test */ + thruput, + local_cpu_utilization, /* local cpu */ + remote_cpu_utilization, /* remote cpu */ + local_service_demand, /* local service demand */ + remote_service_demand); /* remote service demand */ + fprintf(where, + cpu_fmt_1_line_2, + rss_size, + rsr_size); + break; + } + } + else { + /* The tester did not wish to measure service demand. */ + + switch (verbosity) { + case 0: + fprintf(where, + tput_fmt_0, + thruput); + break; + case 1: + case 2: + if (print_headers) { + fprintf(where,tput_title,format_units()); + } + + fprintf(where, + tput_fmt_1_line_1, /* the format string */ + lss_size, + lsr_size, + req_size, /* how large were the requests */ + rsp_size, /* how large were the responses */ + elapsed_time, /* how long did it take */ + thruput); + fprintf(where, + tput_fmt_1_line_2, + rss_size, /* remote recvbuf size */ + rsr_size); + + break; + } + } + + /* it would be a good thing to include information about some of the */ + /* other parameters that may have been set for this test, but at the */ + /* moment, I do not wish to figure-out all the formatting, so I will */ + /* just put this comment here to help remind me that it is something */ + /* that should be done at a later time. */ + + /* how to handle the verbose information in the presence of */ + /* confidence intervals is yet to be determined... raj 11/94 */ + if (verbosity > 1) { + /* The user wanted to know it all, so we will give it to him. */ + /* This information will include as much as we can find about */ + /* TCP statistics, the alignments of the sends and receives */ + /* and all that sort of rot... */ + + fprintf(where, + ksink_fmt, + local_send_align, + remote_recv_align, + local_send_offset, + remote_recv_offset); + +#ifdef WANT_HISTOGRAM + fprintf(where,"\nHistogram of request/response times\n"); + HIST_report(time_hist); +#endif /* WANT_HISTOGRAM */ + fflush(where); + } + } +} + +void +send_udp_stream(char remote_host[]) +{ + /**********************************************************************/ + /* */ + /* UDP Unidirectional Send Test */ + /* */ + /**********************************************************************/ + + char *tput_title = "\ +Socket Message Elapsed Messages \n\ +Size Size Time Okay Errors Throughput\n\ +bytes bytes secs # # %s/sec\n\n"; + + char *tput_fmt_0 = + "%7.2f\n"; + + char *tput_fmt_1 = "\ +%6d %6d %-7.2f %7d %6d %7.2f\n\ +%6d %-7.2f %7d %7.2f\n\n"; + + + char *cpu_title = "\ +Socket Message Elapsed Messages CPU Service\n\ +Size Size Time Okay Errors Throughput Util Demand\n\ +bytes bytes secs # # %s/sec %% %c%c us/KB\n\n"; + + char *cpu_fmt_0 = + "%6.2f %c\n"; + + char *cpu_fmt_1 = "\ +%6d %6d %-7.2f %7d %6d %7.1f %-6.2f %-6.3f\n\ +%6d %-7.2f %7d %7.1f %-6.2f %-6.3f\n\n"; + + + send_omni_inner(remote_host, legacy, "MIGRATED UDP STREAM TEST"); + + if (legacy) { + /* We are now ready to print all the information. If the user has + specified zero-level verbosity, we will just print the local + service demand, or the remote service demand. If the user has + requested verbosity level 1, he will get the basic "streamperf" + numbers. If the user has specified a verbosity of greater than + 1, we will display a veritable plethora of background + information from outside of this block as it it not + cpu_measurement specific... */ + + + if (confidence < 0) { + /* we did not hit confidence, but were we asked to look for it? */ + if (iteration_max > 1) { + display_confidence(); + } + } + + if (local_cpu_usage || remote_cpu_usage) { + + switch (verbosity) { + case 0: + if (local_cpu_usage) { + fprintf(where, + cpu_fmt_0, + local_service_demand, + local_cpu_method); + } + else { + fprintf(where, + cpu_fmt_0, + remote_service_demand, + local_cpu_method); + } + break; + case 1: + case 2: + if (print_headers) { + fprintf(where, + cpu_title, + format_units(), + local_cpu_method, + remote_cpu_method); + } + + fprintf(where, + cpu_fmt_1, /* the format string */ + lss_size, /* local sendbuf size */ + send_size, /* how large were the sends */ + elapsed_time, /* how long was the test */ + local_send_calls, + failed_sends, + local_send_thruput, /* what was the xfer rate */ + local_cpu_utilization, /* local cpu */ + local_service_demand, /* local service demand */ + rsr_size, + elapsed_time, + remote_receive_calls, + remote_recv_thruput, + remote_cpu_utilization, /* remote cpu */ + remote_service_demand); /* remote service demand */ + break; + } + } + else { + /* The tester did not wish to measure service demand. */ + switch (verbosity) { + case 0: + fprintf(where, + tput_fmt_0, + local_send_thruput); + break; + case 1: + case 2: + if (print_headers) { + fprintf(where,tput_title,format_units()); + } + fprintf(where, + tput_fmt_1, /* the format string */ + lss_size, /* local sendbuf size */ + send_size, /* how large were the sends */ + elapsed_time, /* how long did it take */ + local_send_calls, + failed_sends, + local_send_thruput, + rsr_size, /* remote recvbuf size */ + elapsed_time, + remote_receive_calls, + remote_recv_thruput); + break; + } + } + +#ifdef WANT_HISTOGRAM + if (verbosity > 1) { + fprintf(where,"\nHistogram of time spent in send() call\n"); + HIST_report(time_hist); + } +#endif /* WANT_HISTOGRAM */ + fflush(where); + } +} + +void +send_udp_rr(char remote_host[]) +{ + + char *tput_title = "\ +Local /Remote\n\ +Socket Size Request Resp. Elapsed Trans.\n\ +Send Recv Size Size Time Rate \n\ +bytes Bytes bytes bytes secs. per sec \n\n"; + + char *tput_title_band = "\ +Local /Remote\n\ +Socket Size Request Resp. Elapsed \n\ +Send Recv Size Size Time Throughput \n\ +bytes Bytes bytes bytes secs. %s/sec \n\n"; + + char *tput_fmt_0 = + "%7.2f %s\n"; + + char *tput_fmt_1_line_1 = "\ +%-6d %-6d %-6d %-6d %-6.2f %7.2f %s\n"; + + char *tput_fmt_1_line_2 = "\ +%-6d %-6d\n"; + + char *cpu_title = "\ +Local /Remote\n\ +Socket Size Request Resp. Elapsed Trans. CPU CPU S.dem S.dem\n\ +Send Recv Size Size Time Rate local remote local remote\n\ +bytes bytes bytes bytes secs. per sec %% %c %% %c us/Tr us/Tr\n\n"; + + char *cpu_title_tput = "\ +Local /Remote\n\ +Socket Size Request Resp. Elapsed Tput CPU CPU S.dem S.dem\n\ +Send Recv Size Size Time %-8.8s local remote local remote\n\ +bytes bytes bytes bytes secs. per sec %% %c %% %c us/KB us/KB\n\n"; + + char *cpu_fmt_0 = + "%6.3f %c %s\n"; + + char *cpu_fmt_1_line_1 = "\ +%-6d %-6d %-6d %-6d %-6.2f %-6.2f %-6.2f %-6.2f %-6.3f %-6.3f %s\n"; + + char *cpu_fmt_1_line_2 = "\ +%-6d %-6d\n"; + + send_omni_inner(remote_host, legacy, "MIGRATED UDP REQUEST/RESPONSE TEST"); + + if (legacy) { + /* We are now ready to print all the information. If the user has + specified zero-level verbosity, we will just print the local + service demand, or the remote service demand. If the user has + requested verbosity level 1, he will get the basic "streamperf" + numbers. If the user has specified a verbosity of greater than + 1, we will display a veritable plethora of background + information from outside of this block as it it not + cpu_measurement specific... */ + + if (confidence < 0) { + /* we did not hit confidence, but were we asked to look for it? */ + if (iteration_max > 1) { + display_confidence(); + } + } + + if (local_cpu_usage || remote_cpu_usage) { + + switch (verbosity) { + case 0: + if (local_cpu_usage) { + fprintf(where, + cpu_fmt_0, + local_service_demand, + local_cpu_method, + ((print_headers) || + (result_brand == NULL)) ? "" : result_brand); + + } + else { + fprintf(where, + cpu_fmt_0, + remote_service_demand, + remote_cpu_method, + ((print_headers) || + (result_brand == NULL)) ? "" : result_brand); + + } + break; + case 1: + case 2: + if (print_headers) { + if ('x' == libfmt) { + fprintf(where, + cpu_title, + local_cpu_method, + remote_cpu_method); + } + else { + fprintf(where, + cpu_title_tput, + format_units(), + local_cpu_method, + remote_cpu_method); + } + } + + fprintf(where, + cpu_fmt_1_line_1, /* the format string */ + lss_size, /* local sendbuf size */ + lsr_size, + req_size, /* how large were the requests */ + rsp_size, /* guess */ + elapsed_time, /* how long was the test */ + thruput, + local_cpu_utilization, /* local cpu */ + remote_cpu_utilization, /* remote cpu */ + local_service_demand, /* local service demand */ + remote_service_demand, /* remote service demand */ + ((print_headers) || + (result_brand == NULL)) ? "" : result_brand); + fprintf(where, + cpu_fmt_1_line_2, + rss_size, + rsr_size); + break; + } + } + else { + /* The tester did not wish to measure service demand. */ + switch (verbosity) { + case 0: + fprintf(where, + tput_fmt_0, + thruput, + ((print_headers) || + (result_brand == NULL)) ? "" : result_brand); + break; + case 1: + case 2: + if (print_headers) { + fprintf(where, + ('x' == libfmt) ? tput_title : tput_title_band, + format_units()); + } + + fprintf(where, + tput_fmt_1_line_1, /* the format string */ + lss_size, + lsr_size, + req_size, /* how large were the requests */ + rsp_size, /* how large were the responses */ + elapsed_time, /* how long did it take */ + thruput, + ((print_headers) || + (result_brand == NULL)) ? "" : result_brand); + fprintf(where, + tput_fmt_1_line_2, + rss_size, /* remote recvbuf size */ + rsr_size); + + break; + } + } + + /* it would be a good thing to include information about some of the */ + /* other parameters that may have been set for this test, but at the */ + /* moment, I do not wish to figure-out all the formatting, so I will */ + /* just put this comment here to help remind me that it is something */ + /* that should be done at a later time. */ + + /* how to handle the verbose information in the presence of */ + /* confidence intervals is yet to be determined... raj 11/94 */ + + if (verbosity > 1) { + /* The user wanted to know it all, so we will give it to him. */ + /* This information will include as much as we can find about */ + /* UDP statistics, the alignments of the sends and receives */ + /* and all that sort of rot... */ + +#ifdef WANT_HISTOGRAM + fprintf(where,"\nHistogram of request/reponse times.\n"); + HIST_report(time_hist); +#endif /* WANT_HISTOGRAM */ + } + fflush(where); + } +} + + +#endif /* WANT_MIGRATION */ + + +/* using legacy test names will cause certain default settings to be + made before we scan the test-specific arguments. raj 2010-07-20 */ +static void +set_omni_defaults_by_legacy_testname() { + + /* the uber defaults are for a unidirectional test using TCP */ + protocol = IPPROTO_TCP; + socket_type = SOCK_STREAM; + connection_test = 0; + req_size = rsp_size = -1; + was_legacy = 1; + legacy = 1; + implicit_direction = 0; /* do we allow certain options to + implicitly affect the test direction? */ + if (strcasecmp(test_name,"TCP_STREAM") == 0) { + direction = NETPERF_XMIT; + } + else if (strcasecmp(test_name,"TCP_MAERTS") == 0) { + direction = NETPERF_RECV; + } + else if (strcasecmp(test_name,"TCP_RR") == 0) { + req_size = rsp_size = 1; + direction = 0; + direction |= NETPERF_XMIT; + direction |= NETPERF_RECV; + } + else if (strcasecmp(test_name,"UDP_STREAM") == 0) { + protocol = IPPROTO_UDP; + socket_type = SOCK_DGRAM; + } + else if (strcasecmp(test_name,"UDP_RR") == 0) { + protocol = IPPROTO_UDP; + socket_type = SOCK_DGRAM; + direction = 0; + direction |= NETPERF_XMIT; + direction |= NETPERF_RECV; + req_size = rsp_size = 1; + } + else if (strcasecmp(test_name,"TCP_CC") == 0) { + direction = 0; + connection_test = 1; + } + else if (strcasecmp(test_name,"TCP_CRR") == 0) { + direction = 0; + direction |= NETPERF_XMIT; + direction |= NETPERF_RECV; + req_size = rsp_size = 1; + connection_test = 1; + } + else if (strcasecmp(test_name,"omni") == 0) { + /* there is not much to do here but clear the legacy flag */ + was_legacy = 0; + legacy = 0; + implicit_direction = 1; + } + socket_type_str = hst_to_str(socket_type); +} + +char omni_usage[] = "\n\ +Usage: netperf [global options] -- [test options] \n\ +\n\ +OMNI and Migrated BSD Sockets Test Options:\n\ + -b number Send number requests at start of _RR tests\n\ + -c Explicitly declare this a connection test such as\n\ + TCP_CRR or TCP_CC\n\ + -C Set TCP_CORK when available\n\ + -d direction Explicitly set test direction based on bitwise OR\n\ + of 0x2 for transmit and 0x4 for receive. Default:\n\ + based on test type\n\ + -D [L][,R] Set TCP_NODELAY locally and/or remotely (TCP_*)\n\ + -h Display this text\n\ + -H name[/mask],fam Use name (or IP) and family as target of data connection\n\ + A mask value will cause randomization of the IP used\n\ + -k [file] Generate keyval output optionally based on file\n\ + Use filename of '?' to get the list of choices\n\ + -L name[/mask],fam Use name (or IP) and family as source of data connection\n\ + A mask value will cause randomization of the IP used\n\ + -m bytes Set the send size (TCP_STREAM, UDP_STREAM)\n\ + -M bytes Set the recv size (TCP_STREAM, UDP_STREAM)\n\ + -n Use the connected socket for UDP locally\n\ + -N Use the connected socket for UDP remotely\n\ + -o [file] Generate CSV output optionally based on file\n\ + Use filename of '?' to get the list of choices\n\ + -O [file] Generate classic-style output based on file\n\ + Use filename of '?' to get the list of choices\n\ + -p min[,max] Set the min/max port numbers for TCP_CRR, TCP_TRR\n\ + -P local[,remote] Set the local/remote port for the data socket\n\ + -r req,[rsp] Set request/response sizes (TCP_RR, UDP_RR)\n\ + -R 0/1 Allow routing of traffic on data connection.\n\ + Default: 0 (off) for UDP_STREAM, 1 (on) otherwise\n\ + -s send[,recv] Set local socket send/recv buffer sizes\n\ + -S send[,recv] Set remote socket send/recv buffer sizes\n\ + -t type Explicitly set socket type. Default is implicit\n\ + based on other settings\n\ + -T protocol Explicitly set data connection protocol. Default is\n\ + implicit based on other settings\n\ + -u uuid Use the supplied string as the UUID for this test.\n\ + -4 Use AF_INET (eg IPv4) on both ends of the data conn\n\ + -6 Use AF_INET6 (eg IPv6) on both ends of the data conn\n\ +\n\ +For those options taking two parms, at least one must be specified;\n\ +specifying one value without a comma will set both parms to that\n\ +value, specifying a value with a leading comma will set just the second\n\ +parm, a value with a trailing comma will set just the first. To set\n\ +each parm to unique values, specify both and separate them with a\n\ +comma.\n"; + +void +print_omni_usage() +{ + + fwrite(omni_usage, sizeof(char), strlen(omni_usage), stdout); + exit(1); + +} + void scan_omni_args(int argc, char *argv[]) { -#define OMNI_ARGS "b:cCd:DnNhH:kL:m:M:oOp:P:r:s:S:t:T:u:Vw:W:46" +#define OMNI_ARGS "b:cCd:DhH:kl:L:m:M:nNoOp:P:r:R:s:S:t:T:u:Vw:W:46" extern char *optarg; /* pointer to option string */ int c; int have_uuid = 0; + int have_R_option = 0; char arg1[BUFSIZ], /* argument holders */ - arg2[BUFSIZ]; + arg2[BUFSIZ], + arg3[BUFSIZ]; if (debug) { int i; @@ -5709,32 +7927,14 @@ strncpy(local_data_port,"0",sizeof(local_data_port)); strncpy(remote_data_port,"0",sizeof(remote_data_port)); - /* default to a STREAM socket type. i wonder if this should be part - of send_omni or here... */ - socket_type = nst_to_hst(NST_STREAM); - socket_type_str = hst_to_str(socket_type); - - /* default to TCP. i wonder if this should be here or in - send_omni? */ -#ifdef IPPROTO_TCP - protocol = IPPROTO_TCP; -#endif - - /* we will check to see if this needs to remain 0 or set to - something else when we get finished scanning all the argument - values */ - direction = 0; + /* this will handle setting default settings based on test name */ + set_omni_defaults_by_legacy_testname(); - /* default is to be a stream test, so req_size and rsp_size should - be < 0) */ - - req_size = rsp_size = -1; - - /* Go through all the command line arguments and break them */ - /* out. For those options that take two parms, specifying only */ - /* the first will set both to that value. Specifying only the */ - /* second will leave the first untouched. To change only the */ - /* first, use the form "first," (see the routine break_args.. */ + /* Go through all the command line arguments and break them out. For + those options that take two parms, specifying only the first will + set both to that value. Specifying only the second will leave the + first untouched. To change only the first, use the form "first," + (see the routine break_args.. */ while ((c= getopt(argc, argv, OMNI_ARGS)) != EOF) { switch (c) { @@ -5755,7 +7955,7 @@ #endif break; case 'h': - print_sockets_usage(); + print_omni_usage(); exit(1); case 'b': #ifdef WANT_FIRST_BURST @@ -5778,8 +7978,13 @@ #endif /* TCP_CORK */ break; case 'd': - /* arbitrarily set the direction variable */ - direction = strtol(optarg,NULL,0); + /* arbitrarily set the direction variable, but only for an + actual omni test and then disable implicit setting of + direction */ + if (!was_legacy) { + direction = parse_direction(optarg); + implicit_direction = 0; + } break; case 'D': /* set the TCP nodelay flag */ @@ -5787,51 +7992,72 @@ rem_nodelay = 1; break; case 'H': - break_args_explicit(optarg,arg1,arg2); + break_args_explicit_sep(optarg,',',arg1,arg2); if (arg1[0]) { - /* make sure we leave room for the NULL termination boys and - girls. raj 2005-02-82 */ - remote_data_address = malloc(strlen(arg1)+1); - strcpy(remote_data_address,arg1); + /* check to see if there was a width, which we would want to + be arg3. for simplicities sake, we will assume the width + must follow the address and not the address family - ie + 1.2.3.4/24,inet. This means we can just pass optarg again + as the source rather than have to shuffle arg values. */ + break_args_explicit_sep(optarg,'/',arg1,arg3); + if (arg1[0]) { + remote_data_address = malloc(strlen(arg1)+1); + strcpy(remote_data_address,arg1); + } + if (arg3[0]) { + remote_mask_len = convert(arg3); + } } - if (arg2[0]) + if (arg2[0]) { remote_data_family = parse_address_family(arg2); + } break; case 'k': + human = 0; + legacy = 0; csv = 0; keyword = 1; /* obliterate any previous file name */ - if (human_selection_file) { - free(human_selection_file); - human_selection_file = NULL; - } - if (csv_selection_file) { - free(csv_selection_file); - csv_selection_file = NULL; + if (output_selection_spec) { + free(output_selection_spec); + output_selection_spec = NULL; } if (argv[optind] && ((unsigned char)argv[optind][0] != '-')) { /* we assume that what follows is the name of a file with the list of desired output values. */ - csv_selection_file = strdup(argv[optind]); + output_selection_spec = strdup(argv[optind]); optind++; /* special case - if the file name is "?" then we will emit a list of the available outputs */ - if (strcmp(csv_selection_file,"?") == 0) { - dump_netperf_output_list(stdout,1); + if (strcmp(output_selection_spec,"?") == 0) { + dump_netperf_output_choices(stdout,1); exit(1); } } break; + case 'l': + multicast_ttl = atoi(optarg); + break; case 'L': - break_args_explicit(optarg,arg1,arg2); + break_args_explicit_sep(optarg,',',arg1,arg2); if (arg1[0]) { - /* make sure we leave room for the NULL termination boys and - girls. raj 2005-02-82 */ - local_data_address = malloc(strlen(arg1)+1); - strcpy(local_data_address,arg1); + /* check to see if there was a width, which we would want to + be arg3. for simplicities sake, we will assume the width + must follow the address and not the address family - ie + 1.2.3.4/24,inet. This means we can just pass optarg again + as the source rather than have to shuffle arg values. */ + break_args_explicit_sep(optarg,'/',arg1,arg3); + if (arg1[0]) { + local_data_address = malloc(strlen(arg1)+1); + strcpy(local_data_address,arg1); + } + if (arg3[0]) { + local_mask_len = convert(arg3); + } } - if (arg2[0]) + if (arg2[0]) { local_data_family = parse_address_family(arg2); + } break; case 'm': /* set the send size. if we set the local send size it will add @@ -5841,11 +8067,13 @@ break_args_explicit(optarg,arg1,arg2); if (arg1[0]) { send_size = convert(arg1); - direction |= NETPERF_XMIT; + if (implicit_direction) + direction |= NETPERF_XMIT; } if (arg2[0]) { remote_send_size_req = convert(arg2); - direction |= NETPERF_RECV; + if (implicit_direction) + direction |= NETPERF_RECV; } break; case 'M': @@ -5855,11 +8083,13 @@ break_args_explicit(optarg,arg1,arg2); if (arg1[0]) { remote_recv_size_req = convert(arg1); - direction |= NETPERF_XMIT; + if (implicit_direction) + direction |= NETPERF_XMIT; } if (arg2[0]) { recv_size = convert(arg2); - direction |= NETPERF_RECV; + if (implicit_direction) + direction |= NETPERF_RECV; } break; case 'n': @@ -5871,49 +8101,49 @@ remote_connected = 1; break; case 'o': + human = 0; + legacy = 0; csv = 1; keyword = 0; /* obliterate any previous file name */ - if (human_selection_file) { - free(human_selection_file); - human_selection_file = NULL; - } - if (csv_selection_file) { - free(csv_selection_file); - csv_selection_file = NULL; + if (output_selection_spec) { + free(output_selection_spec); + output_selection_spec = NULL; + } + if (output_selection_spec) { + free(output_selection_spec); + output_selection_spec = NULL; } if (argv[optind] && ((unsigned char)argv[optind][0] != '-')) { /* we assume that what follows is the name of a file with the list of desired output values. */ - csv_selection_file = strdup(argv[optind]); + output_selection_spec = strdup(argv[optind]); optind++; /* special case - if the file name is "?" then we will emit a list of the available outputs */ - if (strcmp(csv_selection_file,"?") == 0) { - dump_netperf_output_list(stdout,1); + if (strcmp(output_selection_spec,"?") == 0) { + dump_netperf_output_choices(stdout,1); exit(1); } } break; case 'O': + human = 1; + legacy = 0; csv = 0; keyword = 0; /* obliterate any previous file name */ - if (human_selection_file) { - free(human_selection_file); - human_selection_file = NULL; - } - if (csv_selection_file) { - free(csv_selection_file); - csv_selection_file = NULL; + if (output_selection_spec) { + free(output_selection_spec); + output_selection_spec = NULL; } if (argv[optind] && ((unsigned char)argv[optind][0] != '-')) { /* we assume that what follows is the name of a file with the list of desired output values */ - human_selection_file = strdup(argv[optind]); + output_selection_spec = strdup(argv[optind]); optind++; - if (strcmp(human_selection_file,"?") == 0) { - dump_netperf_output_list(stdout,0); + if (strcmp(output_selection_spec,"?") == 0) { + dump_netperf_output_choices(stdout,0); exit(1); } } @@ -5940,14 +8170,20 @@ case 'r': /* set the request/response sizes. setting request/response sizes implicitly sets direction to XMIT and RECV */ - direction |= NETPERF_XMIT; - direction |= NETPERF_RECV; + if (implicit_direction) { + direction |= NETPERF_XMIT; + direction |= NETPERF_RECV; + } break_args(optarg,arg1,arg2); if (arg1[0]) req_size = convert(arg1); if (arg2[0]) rsp_size = convert(arg2); break; + case 'R': + routing_allowed = atoi(optarg); + have_R_option = 1; + break; case 's': /* set local socket sizes */ break_args(optarg,arg1,arg2); @@ -5966,11 +8202,13 @@ break; case 't': /* set the socket type */ - socket_type = parse_socket_type(optarg); + if (implicit_direction) + socket_type = parse_socket_type(optarg); break; case 'T': /* set the protocol - aka "Transport" */ - protocol = parse_protocol(optarg); + if (implicit_direction) + protocol = parse_protocol(optarg); break; case 'u': /* use the supplied string as the UUID for this test. at some @@ -6017,12 +8255,23 @@ if (!have_uuid) get_uuid_string(test_uuid,sizeof(test_uuid)); + /* to cover the backside of blithering idiots who run unidirectional + UDP tests on test setups where they might trash their corporate + WAN, we grudgingly provide a safety latch. unless explicitly + enabled, UDP_STREAM/UDP_MAERTS sockets will not allow themselves + to be routed via a gateway. raj 20091026 */ + + if ((!have_R_option) && + (protocol == IPPROTO_UDP) && + (!NETPERF_IS_RR(direction))) + routing_allowed = 0; protocol_str = protocol_to_str(protocol); /* ok, if we have gone through all that, and direction is still zero, let us see if it needs to be set to something else. */ if ((0 == direction) && (!connection_test)) direction = NETPERF_XMIT; direction_str = direction_to_str(direction); + /* some other sanity checks we need to make would include stuff when the user has set -m and -M such that both XMIT and RECV are set and has not set -r. initially we will not allow that. at some @@ -6030,20 +8279,18 @@ then the code will simply ignore the values from -m and -M when -r is set. */ -#if defined(WANT_FIRST_BURST) #if defined(WANT_HISTOGRAM) - /* if WANT_FIRST_BURST and WANT_HISTOGRAM are defined and the user - indeed wants a non-zero first burst size, and we would emit a - histogram, then we should emit a warning that the two are not - compatible. raj 2006-01-31 */ - if ((first_burst_size > 0) && (verbosity >= 2)) { - fprintf(stderr, - "WARNING! Histograms and first bursts are incompatible!\n"); - fflush(stderr); - } -#endif + if (verbosity > 1) keep_histogram = 1; #endif + /* did the user use -d 6 but not set -r? */ + if (NETPERF_IS_RR(direction) && !NETPERF_CC(direction)) { + if (req_size == -1) + req_size = 1; + if (rsp_size == -1) + rsp_size = 1; + } + /* ok, time to sanity check the output units */ if ('?' == libfmt) { /* if this is a RR test then set it to 'x' for transactions */ @@ -6070,22 +8317,21 @@ different settings for a few things */ if (no_control) { - - fprintf(where,"I don't know about no control connection tests yet\n"); - exit(1); - if (strcmp(remote_data_port,"0") == 0) { /* we need to select either the discard port, echo port or - chargen port dedepending on the test name. raj 2007-02-08 */ - if (strstr(test_name,"STREAM") || - strstr(test_name,"SENDFILE")) { + chargen port dedepending on the test direction. raj + 20101220 */ + if (NETPERF_XMIT_ONLY(direction)) { strncpy(remote_data_port,"discard",sizeof(remote_data_port)); + recv_size = -1; } - else if (strstr(test_name,"RR")) { - strncpy(remote_data_port,"echo",sizeof(remote_data_port)); - } - else if (strstr(test_name,"MAERTS")) { + else if (NETPERF_RECV_ONLY(direction)) { strncpy(remote_data_port,"chargen",sizeof(remote_data_port)); + send_size = -1; + } + else if (NETPERF_IS_RR(direction) || NETPERF_CC(direction)) { + strncpy(remote_data_port,"echo",sizeof(remote_data_port)); + rsp_size = req_size; } else { printf("No default port known for the %s test, please set one yourself\n",test_name); @@ -6104,24 +8350,16 @@ rsr_size_req = -1; rem_nodelay = -1; - if (strstr(test_name,"STREAM") || - strstr(test_name,"SENDFILE")) { - recv_size = -1; - } - else if (strstr(test_name,"RR")) { - /* I am however _certain_ that for a no control RR test the - response size must equal the request size since 99 times out - of ten we will be speaking to the echo service somewhere */ - rsp_size = req_size; - } - else if (strstr(test_name,"MAERTS")) { - send_size = -1; - } - else { - printf("No default port known for the %s test, please set one yourself\n",test_name); - exit(-1); - } } + /* so, did the user request a few things implicitly via output selection? */ + if (!legacy) + print_omni_init(); + + if (desired_output_groups & OMNI_WANT_STATS) { + keep_statistics = 1; + keep_histogram = 1; + } + } #endif /* WANT_OMNI */ diff -Nru netperf-2.4.5/src/nettest_sctp.c netperf-2.5.0/src/nettest_sctp.c --- netperf-2.4.5/src/nettest_sctp.c 2007-06-01 22:06:00.000000000 +0000 +++ netperf-2.5.0/src/nettest_sctp.c 2011-02-10 17:04:11.000000000 +0000 @@ -147,12 +147,10 @@ /* called outside of the timing loop */ static void -get_sctp_info(socket, mss) - int socket; - int *mss; +get_sctp_info( int socket, int *mss ) { - int sock_opt_len; + socklen_t sock_opt_len; if (sctp_opt_info(socket, 0, @@ -166,9 +164,7 @@ static void -sctp_enable_events(socket, ev_mask) - int socket; - int ev_mask; +sctp_enable_events( int socket, int ev_mask ) { struct sctp_event_subscribe ev; @@ -222,9 +218,7 @@ static sctp_disposition_t -sctp_process_event(socket, buf) - int socket; - void *buf; +sctp_process_event( int socket, void *buf ) { struct sctp_assoc_change *sac; @@ -322,8 +316,7 @@ void -send_sctp_stream(remote_host) -char remote_host[]; +send_sctp_stream( char remote_host[] ) { char *tput_title = "\ @@ -408,8 +401,6 @@ struct addrinfo *remote_res; struct addrinfo *local_res; - struct addrinfo *local_remote_res; - struct addrinfo *local_local_res; struct sctp_stream_request_struct *sctp_stream_request; struct sctp_stream_response_struct *sctp_stream_response; @@ -1058,13 +1049,13 @@ /* didn't feel it was necessary. */ void -recv_sctp_stream() +recv_sctp_stream( void ) { struct sockaddr_in myaddr_in; /* needed to get port number */ struct sockaddr_storage peeraddr; /* used in accept */ int s_listen,s_data; - int addrlen; + socklen_t addrlen; int len; unsigned int receive_calls; float elapsed_time; @@ -1458,8 +1449,7 @@ void -send_sctp_stream_1toMany(remote_host) -char remote_host[]; +send_sctp_stream_1toMany( char remote_host[] ) { char *tput_title = "\ @@ -1533,7 +1523,6 @@ #ifdef DIRTY int i; #endif /* DIRTY */ - int j; float local_cpu_utilization; float local_service_demand; @@ -1544,8 +1533,6 @@ struct addrinfo *remote_res; struct addrinfo *local_res; - struct addrinfo *last_remote_res; - struct addrinfo *last_local_res; struct sctp_stream_request_struct *sctp_stream_request; struct sctp_stream_response_struct *sctp_stream_response; @@ -2220,12 +2207,12 @@ /* didn't feel it was necessary. */ void -recv_sctp_stream_1toMany() +recv_sctp_stream_1toMany( void ) { struct sockaddr_in myaddr_in; int s_recv; - int addrlen; + socklen_t addrlen; int len; unsigned int receive_calls; float elapsed_time; @@ -2574,8 +2561,7 @@ /* test. */ void -send_sctp_rr(remote_host) - char remote_host[]; +send_sctp_rr( char remote_host[] ) { char *tput_title = "\ @@ -2637,7 +2623,6 @@ float remote_service_demand; double thruput; - struct sockaddr_storage peer; struct addrinfo *remote_res; struct addrinfo *local_res; @@ -3254,7 +3239,7 @@ /* this routine implements the receive (netserver) side of a TCP_RR */ /* test */ void -recv_sctp_rr() +recv_sctp_rr( void ) { struct ring_elt *send_ring; @@ -3266,7 +3251,7 @@ struct sockaddr_in myaddr_in, peeraddr_in; int s_listen, s_data; - int addrlen; + socklen_t addrlen; char *temp_message_ptr; int trans_received; int trans_remaining; @@ -3627,8 +3612,7 @@ SCTP_RR_1TOMANY test */ void -send_sctp_rr_1toMany(remote_host) - char remote_host[]; +send_sctp_rr_1toMany( char remote_host[] ) { char *tput_title = "\ @@ -3690,7 +3674,6 @@ float remote_service_demand; double thruput; - struct sockaddr_storage peer; struct addrinfo *local_res; struct addrinfo *remote_res; @@ -4306,7 +4289,7 @@ /* this routine implements the receive (netserver) side of a TCP_RR */ /* test */ void -recv_sctp_rr_1toMany() +recv_sctp_rr_1toMany( void ) { struct ring_elt *send_ring; @@ -4321,8 +4304,7 @@ int msg_flags; int s_rcv; - int addrlen; - char *temp_message_ptr; + socklen_t addrlen; int trans_received; int trans_remaining; int bytes_sent; @@ -4564,7 +4546,7 @@ /* the timer popped */ timed_out = 1; break; - } else if (non_block & errno == EAGAIN) { + } else if (non_block && errno == EAGAIN) { /* do recvmsg again */ continue; } @@ -4673,18 +4655,16 @@ void -print_sctp_usage() +print_sctp_usage( void ) { printf("%s",sctp_usage); exit(1); } -void -scan_sctp_args(argc, argv) - int argc; - char *argv[]; +void +scan_sctp_args( int argc, char *argv[] ) { #define SOCKETS_ARGS "BDhH:I:L:m:M:P:r:s:S:VN:T:46" diff -Nru netperf-2.4.5/src/nettest_sctp.h netperf-2.5.0/src/nettest_sctp.h --- netperf-2.4.5/src/nettest_sctp.h 2007-06-01 22:06:00.000000000 +0000 +++ netperf-2.5.0/src/nettest_sctp.h 2011-02-10 17:04:11.000000000 +0000 @@ -118,11 +118,17 @@ SCTP_CLOSE, } sctp_disposition_t; -extern void send_sctp_stream(); -extern void send_sctp_rr(); +extern void scan_sctp_args( int argc, char *argv[] ); -extern void recv_sctp_stream(); -extern void recv_sctp_rr(); +extern void send_sctp_stream( char remote_host[] ); +extern void send_sctp_stream_1toMany( char remote_host[] ); +extern void send_sctp_rr( char remote_host[] ); +extern void send_sctp_rr_1toMany( char remote_host[] ); + +extern void recv_sctp_stream( void ); +extern void recv_sctp_stream_1toMany( void ); +extern void recv_sctp_rr( void ); +extern void recv_sctp_rr_1toMany( void ); extern void loc_cpu_rate(); extern void rem_cpu_rate(); diff -Nru netperf-2.4.5/src/nettest_unix.c netperf-2.5.0/src/nettest_unix.c --- netperf-2.4.5/src/nettest_unix.c 2008-07-25 22:22:55.000000000 +0000 +++ netperf-2.5.0/src/nettest_unix.c 2011-02-10 17:04:11.000000000 +0000 @@ -152,7 +152,6 @@ { SOCKET temp_socket; - int sock_opt_len; /*set up the data socket */ temp_socket = socket(family, @@ -711,7 +710,7 @@ struct sockaddr_un myaddr_un, peeraddr_un; SOCKET s_listen,s_data; - int addrlen; + netperf_socklen_t addrlen; int len; int receive_calls = 0; float elapsed_time; @@ -1505,6 +1504,7 @@ /* and all that sort of rot... */ fprintf(where, + "%s", ksink_fmt); } /* The test is over. Kill the data socket */ @@ -2745,7 +2745,7 @@ struct sockaddr_un myaddr_un, peeraddr_un; SOCKET s_data; - int addrlen; + netperf_socklen_t addrlen; int trans_received = 0; int trans_remaining; float elapsed_time; @@ -3033,7 +3033,7 @@ struct sockaddr_un myaddr_un, peeraddr_un; SOCKET s_listen,s_data; - int addrlen; + netperf_socklen_t addrlen; char *temp_message_ptr; int trans_received = 0; int trans_remaining; diff -Nru netperf-2.4.5/src/net_uuid.c netperf-2.5.0/src/net_uuid.c --- netperf-2.4.5/src/net_uuid.c 2008-10-24 23:13:44.000000000 +0000 +++ netperf-2.5.0/src/net_uuid.c 2011-02-10 17:04:11.000000000 +0000 @@ -36,11 +36,21 @@ #ifdef WIN32 #include #else + +#if HAVE_SYS_TYPES_H #include +#endif + +#if HAVE_SYS_TIME_H #include +#endif + +#if HAVE_SYS_SYSINFO_H #include #endif +#endif + /* system dependent call to get the current system time. Returned as 100ns ticks since UUID epoch, but resolution may be less than 100ns. */