sipp-3.6.0/0000755000175000017500000000000013502241501012042 5ustar walterwaltersipp-3.6.0/aclocal.m40000644000175000017500000014625513502240714013724 0ustar walterwalter# generated automatically by aclocal 1.15.1 -*- Autoconf -*- # Copyright (C) 1996-2017 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, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, [m4_warning([this file was generated for autoconf 2.69. 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 pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- dnl serial 11 (pkg-config-0.29.1) dnl dnl Copyright © 2004 Scott James Remnant . dnl Copyright © 2012-2015 Dan Nicholson dnl dnl This program is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation; either version 2 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, but dnl WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU dnl General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program; if not, write to the Free Software dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA dnl 02111-1307, USA. dnl dnl As a special exception to the GNU General Public License, if you dnl distribute this file as part of a program that contains a dnl configuration script generated by Autoconf, you may include it under dnl the same distribution terms that you use for the rest of that dnl program. dnl PKG_PREREQ(MIN-VERSION) dnl ----------------------- dnl Since: 0.29 dnl dnl Verify that the version of the pkg-config macros are at least dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's dnl installed version of pkg-config, this checks the developer's version dnl of pkg.m4 when generating configure. dnl dnl To ensure that this macro is defined, also add: dnl m4_ifndef([PKG_PREREQ], dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) dnl dnl See the "Since" comment for each macro you use to see what version dnl of the macros you require. m4_defun([PKG_PREREQ], [m4_define([PKG_MACROS_VERSION], [0.29.1]) m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) ])dnl PKG_PREREQ dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) dnl ---------------------------------- dnl Since: 0.16 dnl dnl Search for the pkg-config tool and set the PKG_CONFIG variable to dnl first found in the path. Checks that the version of pkg-config found dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is dnl used since that's the first version where most current features of dnl pkg-config existed. AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])dnl PKG_PROG_PKG_CONFIG dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) dnl ------------------------------------------------------------------- dnl Since: 0.18 dnl dnl Check to see whether a particular set of modules exists. Similar to dnl PKG_CHECK_MODULES(), but does not set variables or print errors. dnl dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) dnl only at the first occurence in configure.ac, so if the first place dnl it's called might be skipped (such as if it is within an "if", you dnl have to call PKG_CHECK_EXISTS manually AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) dnl --------------------------------------------- dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting dnl pkg_failed based on the result. m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) else pkg_failed=untried fi[]dnl ])dnl _PKG_CONFIG dnl _PKG_SHORT_ERRORS_SUPPORTED dnl --------------------------- dnl Internal check to see if pkg-config supports short errors. AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])dnl _PKG_SHORT_ERRORS_SUPPORTED dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], dnl [ACTION-IF-NOT-FOUND]) dnl -------------------------------------------------------------- dnl Since: 0.4.0 dnl dnl Note that if there is a possibility the first call to dnl PKG_CHECK_MODULES might not happen, you should be sure to include an dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD m4_default([$4], [AC_MSG_ERROR( [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])[]dnl ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) $3 fi[]dnl ])dnl PKG_CHECK_MODULES dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], dnl [ACTION-IF-NOT-FOUND]) dnl --------------------------------------------------------------------- dnl Since: 0.29 dnl dnl Checks for existence of MODULES and gathers its build flags with dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags dnl and VARIABLE-PREFIX_LIBS from --libs. dnl dnl Note that if there is a possibility the first call to dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to dnl include an explicit call to PKG_PROG_PKG_CONFIG in your dnl configure.ac. AC_DEFUN([PKG_CHECK_MODULES_STATIC], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl _save_PKG_CONFIG=$PKG_CONFIG PKG_CONFIG="$PKG_CONFIG --static" PKG_CHECK_MODULES($@) PKG_CONFIG=$_save_PKG_CONFIG[]dnl ])dnl PKG_CHECK_MODULES_STATIC dnl PKG_INSTALLDIR([DIRECTORY]) dnl ------------------------- dnl Since: 0.27 dnl dnl Substitutes the variable pkgconfigdir as the location where a module dnl should install pkg-config .pc files. By default the directory is dnl $libdir/pkgconfig, but the default can be changed by passing dnl DIRECTORY. The user can override through the --with-pkgconfigdir dnl parameter. AC_DEFUN([PKG_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([pkgconfigdir], [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, [with_pkgconfigdir=]pkg_default) AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ])dnl PKG_INSTALLDIR dnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) dnl -------------------------------- dnl Since: 0.27 dnl dnl Substitutes the variable noarch_pkgconfigdir as the location where a dnl module should install arch-independent pkg-config .pc files. By dnl default the directory is $datadir/pkgconfig, but the default can be dnl changed by passing DIRECTORY. The user can override through the dnl --with-noarch-pkgconfigdir parameter. AC_DEFUN([PKG_NOARCH_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([noarch-pkgconfigdir], [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, [with_noarch_pkgconfigdir=]pkg_default) AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ])dnl PKG_NOARCH_INSTALLDIR dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) dnl ------------------------------------------- dnl Since: 0.28 dnl dnl Retrieves the value of the pkg-config variable for the given module. AC_DEFUN([PKG_CHECK_VAR], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl _PKG_CONFIG([$1], [variable="][$3]["], [$2]) AS_VAR_COPY([$1], [pkg_cv_][$1]) AS_VAR_IF([$1], [""], [$5], [$4])dnl ])dnl PKG_CHECK_VAR # Copyright (C) 2002-2017 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. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.15' 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.15.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 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.15.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_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001-2017 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. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2017 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_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$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])]) # Copyright (C) 1999-2017 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. # 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, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" 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=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none 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 # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > 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. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | 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 if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $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 $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 # 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 fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999-2017 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_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf 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"` # 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'`; 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 } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each '.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2017 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 macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC]) [_AM_PROG_CC_C_O ]) # 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.65])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], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) 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], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [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([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target (and possibly the TAP driver). 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])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro 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 # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi fi dnl The trailing newline in this macro's definition is deliberate, for dnl backward compatibility and to allow trailing 'dnl'-style comments dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. ]) 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-2017 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+set}" != 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-2017 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. # 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-2017 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_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # 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 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]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2017 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_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 is modern enough. # If it is, 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 --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2017 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_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])]) # Copyright (C) 1999-2017 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_CC_C_O # --------------- # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC # to automatically call this. AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl AC_LANG_PUSH([C])dnl AC_CACHE_CHECK( [whether $CC understands -c and -o together], [am_cv_prog_cc_c_o], [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i]) if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) # Copyright (C) 2001-2017 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_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2017 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_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # 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 ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file 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 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 if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done 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]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2017 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_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001-2017 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 # --------------------- # 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])]) # Copyright (C) 2006-2017 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_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($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004-2017 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_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. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar], [# The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) if test $am_uid -le $am_max_uid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) if test $am_gid -le $am_max_gid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi], [pax], [], [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_$1-$_am_tools} 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 sipp-3.6.0/configure0000755000175000017500000121602013502240715013761 0ustar walterwalter#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for SIPp see-include/version.h. # # Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 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. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh 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 case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi 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 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 export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # 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 # IFS # We need space, tab and new line, in precisely that order. Quoting is # 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.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= 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 IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # 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. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # 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. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then 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 case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " 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 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 test -x / || 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 as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else 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=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # 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 if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # 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. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 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 and $0: sipp-users@lists.sourceforge.net 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 fi 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 ## --------------------- ## ## 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 () { 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 # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_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 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 # 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 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 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi 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_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/= ' <$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" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # 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 } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac 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 2>/dev/null fi 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 -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # 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` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='SIPp' PACKAGE_TARNAME='sipp' PACKAGE_VERSION='see-include/version.h' PACKAGE_STRING='SIPp see-include/version.h' PACKAGE_BUGREPORT='sipp-users@lists.sourceforge.net' PACKAGE_URL='' ac_unique_file="src/sipp.cpp" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS ALLOCA HAVE_EPOLL_FALSE HAVE_EPOLL_TRUE HAVE_GSL_FALSE HAVE_GSL_TRUE GSL_LIBS GSL_CXXFLAGS GSL_CFLAGS HAVE_RTP_FALSE HAVE_RTP_TRUE HAVE_PCAP_FALSE HAVE_PCAP_TRUE HAVE_SCTP_FALSE HAVE_SCTP_TRUE HAVE_OPENSSL_FALSE HAVE_OPENSSL_TRUE curses_LIBS curses_CFLAGS ncurses_LIBS ncurses_CFLAGS PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG have_pkgconfig HAVE_CXX11 EGREP GREP CPP am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE ac_ct_CXX CXXFLAGS CXX am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC HAVE_HELP2MAN_FALSE HAVE_HELP2MAN_TRUE HELP2MAN AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V am__untar am__tar AMTAR am__leading_dot 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 runstatedir 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='AM_GIT_VERSION' ac_user_opts=' enable_option_checking enable_silent_rules with_openssl with_pcap with_sctp with_gsl with_rtpstream enable_epoll enable_dependency_tracking ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CXX CXXFLAGS CCC CPP PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR ncurses_CFLAGS ncurses_LIBS curses_CFLAGS curses_LIBS' # 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 exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. 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 ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. 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- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -runstatedir | --runstatedir | --runstatedi | --runstated \ | --runstate | --runstat | --runsta | --runst | --runs \ | --run | --ru | --r) ac_prev=runstatedir ;; -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ | --run=* | --ru=* | --r=*) runstatedir=$ac_optarg ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. 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_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. 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. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) 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. 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. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` 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 # 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 runstatedir 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 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' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || 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 -- "$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 } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." 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" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # 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 SIPp see-include/version.h to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --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 --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 --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. 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] --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --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/sipp] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] --target=TARGET configure for building compilers for TARGET [HOST] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of SIPp see-include/version.h:";; 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] --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") --enable-epoll build with epoll backend --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --enable-epoll This platform supports epoll(7) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-openssl build with OpenSSL support --with-pcap build with pcap support --with-sctp build with SCTP support --with-gsl build with GSL (GNU Scientific Library) support --without-rtpstream build without RTP streaming support Some influential environment variables: CC C compiler command CFLAGS C compiler flags 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 (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CXX C++ compiler command CXXFLAGS C++ compiler flags CPP C preprocessor PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path ncurses_CFLAGS C compiler flags for ncurses, overriding pkg-config ncurses_LIBS linker flags for ncurses, overriding pkg-config curses_CFLAGS C compiler flags for curses, overriding pkg-config curses_LIBS linker flags for curses, overriding pkg-config 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 . _ACEOF ac_status=$? fi 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" || { 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=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. 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/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF SIPp configure see-include/version.h generated by GNU Autoconf 2.69 Copyright (C) 2012 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 ## ------------------------ ## ## 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; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_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_cxx_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; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile # 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; ${as_lineno_stack:+:} 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; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { 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 || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 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; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # 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 \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; 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;} ( $as_echo "## ----------------------------------------------- ## ## Report this to sipp-users@lists.sourceforge.net ## ## ----------------------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; 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; ${as_lineno_stack:+:} 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 \${$3+:} false; 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; ${as_lineno_stack:+:} 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 \${$3+:} false; 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; ${as_lineno_stack:+:} 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 \${$3+:} false; 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; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES # --------------------------------------------- # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR # accordingly. ac_fn_c_check_decl () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack as_decl_name=`echo $2|sed 's/ *(.*//'` as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 $as_echo_n "checking whether $as_decl_name is declared... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { #ifndef $as_decl_name #ifdef __cplusplus (void) $as_decl_use; #else (void) $as_decl_name; #endif #endif ; return 0; } _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; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_decl 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 SIPp $as_me see-include/version.h, which was generated by GNU Autoconf 2.69. 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` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) 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 case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { 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 # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_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) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $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'; 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 an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # 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 ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do 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" \ || { { $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. 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 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $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) { $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 # 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=`$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. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $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' 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 # Load non-standard m4 files from ./m4/*.m4. # AC_CONFIG_MACRO_DIR([m4]) does not work on pre-1.13 aclocal, so we # have to include all files by hand. AM_GIT_VERSION=$srcdir/m4/am_git_version.mh # =========================================================================== # http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html # =========================================================================== # # SYNOPSIS # # AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT]) # # DESCRIPTION # # Check whether the given FLAG works with the current language's compiler # or gives an error. (Warnings, however, are ignored) # # ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on # success/failure. # # If EXTRA-FLAGS is defined, it is added to the current language's default # flags (e.g. CFLAGS) when the check is done. The check is thus made with # the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to # force the compiler to issue an error when a bad flag is given. # # INPUT gives an alternative input source to AC_COMPILE_IFELSE. # # NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this # macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG. # # LICENSE # # Copyright (c) 2008 Guido U. Draheim # Copyright (c) 2011 Maarten Bosmans # # 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 3 of the License, or (at your # option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General # Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see . # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure # scripts that are the output of Autoconf when processing the Macro. You # need not follow the terms of the GNU General Public License when using # or distributing such scripts, even though portions of the text of the # Macro appear in them. The GNU General Public License (GPL) does govern # all other use of the material that constitutes the Autoconf Macro. # # This special exception to the GPL applies to versions of the Autoconf # Macro released by the Autoconf Archive. When you make and distribute a # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. #serial 4 # =========================================================================== # http://www.gnu.org/software/autoconf-archive/ax_config_feature.html # =========================================================================== # # SYNOPSIS # # AX_CONFIG_FEATURE(FEATURE-NAME, FEATURE-DESCRIPTION, DEFINE, DEFINE-DESCRIPTION, [ACTION-IF-ENABLED [, ACTION-IF-NOT-ENABLED]]) # # DESCRIPTION # # AX_CONFIG_FEATURE is a simple wrapper for AC_ARG_ENABLE, it enables the # feature FEATURE-NAME and AC_DEFINEs the passed DEFINE, depending on the # user choice. DESCRIPTION will be used for AC_DEFINEs. ACTION-IF-ENABLED # and ACTION-IF-NOT-ENABLED are the actions that will be run. A feature is # enabled by default, in order to change this behaviour use the # AX_CONFIG_FEATURE_DEFAULT_ENABLED and AX_CONFIG_FEATURE_DEFAULT_DISABLED # macros. # # A simple example: # # AX_CONFIG_FEATURE_DEFAULT_ENABLED # AX_CONFIG_FEATURE(feature_xxxxx, [turns on/off XXXXX support], # HAVE_XXXXX, [Define if you want XXXXX support]) # # ... # # AX_CONFIG_FEATURE_DEFAULT_DISABLED # AX_CONFIG_FEATURE(feature_yyyyy, [turns on/off YYYYY support], # HAVE_YYYYY, [Define if you want YYYYY support], # [enable_yyyyy="yes"], [enable_yyyyy="no"]) # AM_CONDITIONAL(YYYYY, [test "$enable_yyyyy" = "yes"]) # # AX_CONFIG_FEATURE_DEFAULT_ENABLED # AX_CONFIG_FEATURE(...) # # ... # # If you have lot of features and you want a verbose dumping of each user # selection use AX_CONFIG_FEATURE_VERBOSE. Use AX_CONFIG_FEATURE_SILENT in # order to remove a previously AX_CONFIG_FEATURE_VERBOSE. By default # features are silent. # # Use AX_CONFIG_FEATURE_ENABLE or AX_CONFIG_FEATURE_DISABLE in order to # enable or disable a specific feature. # # Another simple example: # # AS_IF([some_test_here],[AX_CONFIG_FEATURE_ENABLE(feature_xxxxx)],[]) # # AX_CONFIG_FEATURE(feature_xxxxx, [turns on/off XXXXX support], # HAVE_XXXXX, [Define if you want XXXXX support]) # AX_CONFIG_FEATURE(feature_yyyyy, [turns on/off YYYYY support], # HAVE_YYYYY, [Define if you want YYYYY support], # [enable_yyyyy="yes"], [enable_yyyyy="no"]) # # ... # # NOTE: AX_CONFIG_FEATURE_ENABLE() must be placed first of the relative # AX_CONFIG_FEATURE() macro ... # # LICENSE # # Copyright (c) 2008 Francesco Salvestrini # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation; either version 2 of the License, or (at your # option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General # Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see . # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure # scripts that are the output of Autoconf when processing the Macro. You # need not follow the terms of the GNU General Public License when using # or distributing such scripts, even though portions of the text of the # Macro appear in them. The GNU General Public License (GPL) does govern # all other use of the material that constitutes the Autoconf Macro. # # This special exception to the GPL applies to versions of the Autoconf # Macro released by the Autoconf Archive. When you make and distribute a # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. #serial 10 # =========================================================================== # http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html # =========================================================================== # # SYNOPSIS # # AX_CXX_COMPILE_STDCXX(VERSION, [ext|noext], [mandatory|optional]) # # DESCRIPTION # # Check for baseline language coverage in the compiler for the specified # version of the C++ standard. If necessary, add switches to CXX and # CXXCPP to enable support. VERSION may be '11' (for the C++11 standard) # or '14' (for the C++14 standard). # # The second argument, if specified, indicates whether you insist on an # extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g. # -std=c++11). If neither is specified, you get whatever works, with # preference for an extended mode. # # The third argument, if specified 'mandatory' or if left unspecified, # indicates that baseline support for the specified C++ standard is # required and that the macro should error out if no mode with that # support is found. If specified 'optional', then configuration proceeds # regardless, after defining HAVE_CXX${VERSION} if and only if a # supporting mode is found. # # LICENSE # # Copyright (c) 2008 Benjamin Kosnik # Copyright (c) 2012 Zack Weinberg # Copyright (c) 2013 Roy Stogner # Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov # Copyright (c) 2015 Paul Norman # Copyright (c) 2015 Moritz Klammler # # Copying and distribution of this file, with or without modification, are # permitted in any medium without royalty provided the copyright notice # and this notice are preserved. This file is offered as-is, without any # warranty. #serial 4 # ============================================================================ # http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html # ============================================================================ # # SYNOPSIS # # AX_CXX_COMPILE_STDCXX_11([ext|noext], [mandatory|optional]) # # DESCRIPTION # # Check for baseline language coverage in the compiler for the C++11 # standard; if necessary, add switches to CXX and CXXCPP to enable # support. # # This macro is a convenience alias for calling the AX_CXX_COMPILE_STDCXX # macro with the version set to C++11. The two optional arguments are # forwarded literally as the second and third argument respectively. # Please see the documentation for the AX_CXX_COMPILE_STDCXX macro for # more information. If you want to use this macro, you also need to # download the ax_cxx_compile_stdcxx.m4 file. # # LICENSE # # Copyright (c) 2008 Benjamin Kosnik # Copyright (c) 2012 Zack Weinberg # Copyright (c) 2013 Roy Stogner # Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov # Copyright (c) 2015 Paul Norman # Copyright (c) 2015 Moritz Klammler # # Copying and distribution of this file, with or without modification, are # permitted in any medium without royalty provided the copyright notice # and this notice are preserved. This file is offered as-is, without any # warranty. #serial 16 #include([ax_cxx_compile_stdcxx.m4]) # =========================================================================== # http://www.gnu.org/software/autoconf-archive/ax_have_epoll.html # =========================================================================== # # SYNOPSIS # # AX_HAVE_EPOLL([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # AX_HAVE_EPOLL_PWAIT([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # DESCRIPTION # # This macro determines whether the system supports the epoll I/O event # interface. A neat usage example would be: # # AX_HAVE_EPOLL( # [AX_CONFIG_FEATURE_ENABLE(epoll)], # [AX_CONFIG_FEATURE_DISABLE(epoll)]) # AX_CONFIG_FEATURE( # [epoll], [This platform supports epoll(7)], # [HAVE_EPOLL], [This platform supports epoll(7).]) # # The epoll interface was added to the Linux kernel in version 2.5.45, and # the macro verifies that a kernel newer than this is installed. This # check is somewhat unreliable if doesn't match the # running kernel, but it is necessary regardless, because glibc comes with # stubs for the epoll_create(), epoll_wait(), etc. that allow programs to # compile and link even if the kernel is too old; the problem would then # be detected only at runtime. # # Linux kernel version 2.6.19 adds the epoll_pwait() call in addition to # epoll_wait(). The availability of that function can be tested with the # second macro. Generally speaking, it is safe to assume that # AX_HAVE_EPOLL would succeed if AX_HAVE_EPOLL_PWAIT has, but not the # other way round. # # LICENSE # # Copyright (c) 2008 Peter Simons # # Copying and distribution of this file, with or without modification, are # permitted in any medium without royalty provided the copyright notice # and this notice are preserved. This file is offered as-is, without any # warranty. #serial 10 ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then 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, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || 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 ${ac_cv_build+:} false; 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 && 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` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; 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` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 $as_echo_n "checking target system type... " >&6; } if ${ac_cv_target+:} false; 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` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 $as_echo "$ac_cv_target" >&6; } case $ac_cv_target in *-*-*) ;; *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; esac target=$ac_cv_target ac_save_IFS=$IFS; IFS='-' set x $ac_cv_target shift target_cpu=$1 target_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: target_os=$* IFS=$ac_save_IFS case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac # The aliases save the names the user supplied, while $host etc. # will get canonicalized. test -n "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && program_prefix=${target_alias}- ac_config_headers="$ac_config_headers include/config.h" am__api_version='1.15' # 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: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # 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. # 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 ${ac_cv_path_install+:} false; 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]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else 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 IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL 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. INSTALL=$ac_install_sh fi fi { $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. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # 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 ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file 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 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". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file 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 $. # By default was `s,x,x', remove it if useless. 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` 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 --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { $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 if test x"${install_sh+set}" != 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 ${ac_cv_prog_STRIP+:} false; 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 as_fn_executable_p "$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 ${ac_cv_prog_ac_ct_STRIP+:} false; 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 as_fn_executable_p "$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 ${ac_cv_path_mkdir+:} false; 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 as_fn_executable_p "$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; } 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 ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $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 AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $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 \${ac_cv_prog_make_${ac_make}_set+:} false; 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. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi 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 # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' 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 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 # Define the identity of the package. PACKAGE='sipp' VERSION='see-include/version.h' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi fi # Check whether --with-openssl was given. if test "${with_openssl+set}" = set; then : withval=$with_openssl; openssl="$withval" else openssl="no" fi # Check whether --with-pcap was given. if test "${with_pcap+set}" = set; then : withval=$with_pcap; pcap="$withval" else pcap="no" fi # Check whether --with-sctp was given. if test "${with_sctp+set}" = set; then : withval=$with_sctp; sctp="$withval" else sctp="no" fi # Check whether --with-gsl was given. if test "${with_gsl+set}" = set; then : withval=$with_gsl; gsl="$withval" else gsl="no" fi # Check whether --with-rtpstream was given. if test "${with_rtpstream+set}" = set; then : withval=$with_rtpstream; rtp="$withval" else rtp="yes" fi # Check whether --enable-epoll was given. if test "${enable_epoll+set}" = set; then : enableval=$enable_epoll; case "$enableval" in yes | no) epoll="$enableval" ;; *) as_fn_error $? "bad value $enableval for --enable-epoll" "$LINENO" 5 ;; esac else epoll="yes" fi # Extract the first word of "help2man", so it can be a program name with args. set dummy help2man; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_HELP2MAN+:} false; then : $as_echo_n "(cached) " >&6 else case $HELP2MAN in [\\/]* | ?:[\\/]*) ac_cv_path_HELP2MAN="$HELP2MAN" # Let the user override the test with a path. ;; *) 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_HELP2MAN="$as_dir/$ac_word$ac_exec_ext" $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 ;; esac fi HELP2MAN=$ac_cv_path_HELP2MAN if test -n "$HELP2MAN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HELP2MAN" >&5 $as_echo "$HELP2MAN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -n "$HELP2MAN"; then HAVE_HELP2MAN_TRUE= HAVE_HELP2MAN_FALSE='#' else HAVE_HELP2MAN_TRUE='#' HAVE_HELP2MAN_FALSE= fi if test x"$HELP2MAN" = x; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find help2man, you will not be able to generate manpages" >&5 $as_echo "$as_me: WARNING: cannot find help2man, you will not be able to generate manpages" >&2;} fi # ==================== basic compiler settings ========================== ac_ext=c ac_cpp='$CPP $CPPFLAGS' 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 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $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 CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; 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. 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $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_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" 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 CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $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 CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no 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 as_fn_executable_p "$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" $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 if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $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 CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe 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 ${ac_cv_prog_ac_ct_CC+:} false; 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. 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $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_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" 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 CC=$ac_ct_CC fi fi fi 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. $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 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=$? 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files 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. { $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 | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" 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_default") 2>&5 ac_status=$? $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, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$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; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' 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 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $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 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; }; 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 # `rm'. 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 | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done 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 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 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 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 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; } 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 { $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 ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF 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 ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $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 $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 $? "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 ${ac_cv_c_compiler_gnu+:} false; 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 { $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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=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 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $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 if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $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 ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $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' 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 ac_ext=c ac_cpp='$CPP $CPPFLAGS' 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' 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 DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $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 # 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 case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $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 : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; 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 # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none 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 # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > 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. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | 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 if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $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 $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 # 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 fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $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 test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $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 CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC 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 ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" $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_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" 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 CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $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 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=$? 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 { $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 ${ac_cv_cxx_compiler_gnu+:} false; 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_cxx_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_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=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 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' 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 depcc="$CXX" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CXX_dependencies_compiler_type+:} false; 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 # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none 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 # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > 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. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | 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 if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $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 $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 # 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_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' 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 { $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 ${ac_cv_prog_CPP+:} false; 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" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $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 # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi 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 confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : 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 $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' 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 { $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 ${ac_cv_path_GREP+:} false; 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 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" as_fn_executable_p "$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 $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" $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 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" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS 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 { $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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; 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 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 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" as_fn_executable_p "$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 $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" $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 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" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS 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 { $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" { $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 ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else 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 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 : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. 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 : else ac_cv_header_stdc=no fi rm -f conftest* fi 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 : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $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 $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # Prefer ext (gnu++11) over noext (c++11) because on some platforms the # noext (stricter) mode disables non-posix features like stdio fileno(). ax_cxx_compile_cxx11_required=false ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_success=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5 $as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; } if ${ax_cv_cxx_compile_cxx11+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ // If the compiler admits that it is not ready for C++11, why torture it? // Hopefully, this will speed up the test. #ifndef __cplusplus #error "This is not a C++ compiler" #elif __cplusplus < 201103L #error "This is not a C++11 compiler" #else namespace cxx11 { namespace test_static_assert { template struct check { static_assert(sizeof(int) <= sizeof(T), "not big enough"); }; } namespace test_final_override { struct Base { virtual void f() {} }; struct Derived : public Base { virtual void f() override {} }; } namespace test_double_right_angle_brackets { template < typename T > struct check {}; typedef check single_type; typedef check> double_type; typedef check>> triple_type; typedef check>>> quadruple_type; } namespace test_decltype { int f() { int a = 1; decltype(a) b = 2; return a + b; } } namespace test_type_deduction { template < typename T1, typename T2 > struct is_same { static const bool value = false; }; template < typename T > struct is_same { static const bool value = true; }; template < typename T1, typename T2 > auto add(T1 a1, T2 a2) -> decltype(a1 + a2) { return a1 + a2; } int test(const int c, volatile int v) { static_assert(is_same::value == true, ""); static_assert(is_same::value == false, ""); static_assert(is_same::value == false, ""); auto ac = c; auto av = v; auto sumi = ac + av + 'x'; auto sumf = ac + av + 1.0; static_assert(is_same::value == true, ""); static_assert(is_same::value == true, ""); static_assert(is_same::value == true, ""); static_assert(is_same::value == false, ""); static_assert(is_same::value == true, ""); return (sumf > 0.0) ? sumi : add(c, v); } } namespace test_noexcept { int f() { return 0; } int g() noexcept { return 0; } static_assert(noexcept(f()) == false, ""); static_assert(noexcept(g()) == true, ""); } namespace test_constexpr { template < typename CharT > unsigned long constexpr strlen_c_r(const CharT *const s, const unsigned long acc) noexcept { return *s ? strlen_c_r(s + 1, acc + 1) : acc; } template < typename CharT > unsigned long constexpr strlen_c(const CharT *const s) noexcept { return strlen_c_r(s, 0UL); } static_assert(strlen_c("") == 0UL, ""); static_assert(strlen_c("1") == 1UL, ""); static_assert(strlen_c("example") == 7UL, ""); static_assert(strlen_c("another\0example") == 7UL, ""); } namespace test_rvalue_references { template < int N > struct answer { static constexpr int value = N; }; answer<1> f(int&) { return answer<1>(); } answer<2> f(const int&) { return answer<2>(); } answer<3> f(int&&) { return answer<3>(); } void test() { int i = 0; const int c = 0; static_assert(decltype(f(i))::value == 1, ""); static_assert(decltype(f(c))::value == 2, ""); static_assert(decltype(f(0))::value == 3, ""); } } namespace test_uniform_initialization { struct test { static const int zero {}; static const int one {1}; }; static_assert(test::zero == 0, ""); static_assert(test::one == 1, ""); } namespace test_lambdas { void test1() { auto lambda1 = [](){}; auto lambda2 = lambda1; lambda1(); lambda2(); } int test2() { auto a = [](int i, int j){ return i + j; }(1, 2); auto b = []() -> int { return '0'; }(); auto c = [=](){ return a + b; }(); auto d = [&](){ return c; }(); auto e = [a, &b](int x) mutable { const auto identity = [](int y){ return y; }; for (auto i = 0; i < a; ++i) a += b--; return x + identity(a + b); }(0); return a + b + c + d + e; } int test3() { const auto nullary = [](){ return 0; }; const auto unary = [](int x){ return x; }; using nullary_t = decltype(nullary); using unary_t = decltype(unary); const auto higher1st = [](nullary_t f){ return f(); }; const auto higher2nd = [unary](nullary_t f1){ return [unary, f1](unary_t f2){ return f2(unary(f1())); }; }; return higher1st(nullary) + higher2nd(nullary)(unary); } } namespace test_variadic_templates { template struct sum; template struct sum { static constexpr auto value = N0 + sum::value; }; template <> struct sum<> { static constexpr auto value = 0; }; static_assert(sum<>::value == 0, ""); static_assert(sum<1>::value == 1, ""); static_assert(sum<23>::value == 23, ""); static_assert(sum<1, 2>::value == 3, ""); static_assert(sum<5, 5, 11>::value == 21, ""); static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); } // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function // because of this. namespace test_template_alias_sfinae { struct foo {}; template using member = typename T::member_type; template void func(...) {} template void func(member*) {} void test(); void test() { func(0); } } } // namespace cxx11 #endif // __cplusplus >= 201103L _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ax_cv_cxx_compile_cxx11=yes else ax_cv_cxx_compile_cxx11=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5 $as_echo "$ax_cv_cxx_compile_cxx11" >&6; } if test x$ax_cv_cxx_compile_cxx11 = xyes; then ac_success=yes fi if test x$ac_success = xno; then for switch in -std=gnu++11 -std=gnu++0x; do cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5 $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; } if eval \${$cachevar+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_CXX="$CXX" CXX="$CXX $switch" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ // If the compiler admits that it is not ready for C++11, why torture it? // Hopefully, this will speed up the test. #ifndef __cplusplus #error "This is not a C++ compiler" #elif __cplusplus < 201103L #error "This is not a C++11 compiler" #else namespace cxx11 { namespace test_static_assert { template struct check { static_assert(sizeof(int) <= sizeof(T), "not big enough"); }; } namespace test_final_override { struct Base { virtual void f() {} }; struct Derived : public Base { virtual void f() override {} }; } namespace test_double_right_angle_brackets { template < typename T > struct check {}; typedef check single_type; typedef check> double_type; typedef check>> triple_type; typedef check>>> quadruple_type; } namespace test_decltype { int f() { int a = 1; decltype(a) b = 2; return a + b; } } namespace test_type_deduction { template < typename T1, typename T2 > struct is_same { static const bool value = false; }; template < typename T > struct is_same { static const bool value = true; }; template < typename T1, typename T2 > auto add(T1 a1, T2 a2) -> decltype(a1 + a2) { return a1 + a2; } int test(const int c, volatile int v) { static_assert(is_same::value == true, ""); static_assert(is_same::value == false, ""); static_assert(is_same::value == false, ""); auto ac = c; auto av = v; auto sumi = ac + av + 'x'; auto sumf = ac + av + 1.0; static_assert(is_same::value == true, ""); static_assert(is_same::value == true, ""); static_assert(is_same::value == true, ""); static_assert(is_same::value == false, ""); static_assert(is_same::value == true, ""); return (sumf > 0.0) ? sumi : add(c, v); } } namespace test_noexcept { int f() { return 0; } int g() noexcept { return 0; } static_assert(noexcept(f()) == false, ""); static_assert(noexcept(g()) == true, ""); } namespace test_constexpr { template < typename CharT > unsigned long constexpr strlen_c_r(const CharT *const s, const unsigned long acc) noexcept { return *s ? strlen_c_r(s + 1, acc + 1) : acc; } template < typename CharT > unsigned long constexpr strlen_c(const CharT *const s) noexcept { return strlen_c_r(s, 0UL); } static_assert(strlen_c("") == 0UL, ""); static_assert(strlen_c("1") == 1UL, ""); static_assert(strlen_c("example") == 7UL, ""); static_assert(strlen_c("another\0example") == 7UL, ""); } namespace test_rvalue_references { template < int N > struct answer { static constexpr int value = N; }; answer<1> f(int&) { return answer<1>(); } answer<2> f(const int&) { return answer<2>(); } answer<3> f(int&&) { return answer<3>(); } void test() { int i = 0; const int c = 0; static_assert(decltype(f(i))::value == 1, ""); static_assert(decltype(f(c))::value == 2, ""); static_assert(decltype(f(0))::value == 3, ""); } } namespace test_uniform_initialization { struct test { static const int zero {}; static const int one {1}; }; static_assert(test::zero == 0, ""); static_assert(test::one == 1, ""); } namespace test_lambdas { void test1() { auto lambda1 = [](){}; auto lambda2 = lambda1; lambda1(); lambda2(); } int test2() { auto a = [](int i, int j){ return i + j; }(1, 2); auto b = []() -> int { return '0'; }(); auto c = [=](){ return a + b; }(); auto d = [&](){ return c; }(); auto e = [a, &b](int x) mutable { const auto identity = [](int y){ return y; }; for (auto i = 0; i < a; ++i) a += b--; return x + identity(a + b); }(0); return a + b + c + d + e; } int test3() { const auto nullary = [](){ return 0; }; const auto unary = [](int x){ return x; }; using nullary_t = decltype(nullary); using unary_t = decltype(unary); const auto higher1st = [](nullary_t f){ return f(); }; const auto higher2nd = [unary](nullary_t f1){ return [unary, f1](unary_t f2){ return f2(unary(f1())); }; }; return higher1st(nullary) + higher2nd(nullary)(unary); } } namespace test_variadic_templates { template struct sum; template struct sum { static constexpr auto value = N0 + sum::value; }; template <> struct sum<> { static constexpr auto value = 0; }; static_assert(sum<>::value == 0, ""); static_assert(sum<1>::value == 1, ""); static_assert(sum<23>::value == 23, ""); static_assert(sum<1, 2>::value == 3, ""); static_assert(sum<5, 5, 11>::value == 21, ""); static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); } // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function // because of this. namespace test_template_alias_sfinae { struct foo {}; template using member = typename T::member_type; template void func(...) {} template void func(member*) {} void test(); void test() { func(0); } } } // namespace cxx11 #endif // __cplusplus >= 201103L _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : eval $cachevar=yes else eval $cachevar=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CXX="$ac_save_CXX" fi eval ac_res=\$$cachevar { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test x\$$cachevar = xyes; then CXX="$CXX $switch" if test -n "$CXXCPP" ; then CXXCPP="$CXXCPP $switch" fi ac_success=yes break fi done fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' 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 if test x$ax_cxx_compile_cxx11_required = xtrue; then if test x$ac_success = xno; then as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5 fi fi if test x$ac_success = xno; then HAVE_CXX11=0 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5 $as_echo "$as_me: No compiler with C++11 support was found" >&6;} else HAVE_CXX11=1 $as_echo "#define HAVE_CXX11 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -std=gnu11" >&5 $as_echo_n "checking whether C compiler accepts -std=gnu11... " >&6; } if ${ax_cv_check_cflags___std_gnu11+:} false; then : $as_echo_n "(cached) " >&6 else ax_check_save_flags=$CFLAGS CFLAGS="$CFLAGS -std=gnu11" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ax_cv_check_cflags___std_gnu11=yes else ax_cv_check_cflags___std_gnu11=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$ax_check_save_flags fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___std_gnu11" >&5 $as_echo "$ax_cv_check_cflags___std_gnu11" >&6; } if test "x$ax_cv_check_cflags___std_gnu11" = xyes; then : CFLAGS+=" -std=gnu11" else : fi case "$host" in *-linux*) CFLAGS="$CFLAGS -D__LINUX" CPPFLAGS="$CPPFLAGS -D__LINUX" ;; *-darwin*) CFLAGS="$CFLAGS -D__DARWIN" CPPFLAGS="$CPPFLAGS -D__DARWIN" ;; *-hpux*) CFLAGS="$CFLAGS -D__HPUX" CPPFLAGS="$CPPFLAGS -D__HPUX" ;; *-freebsd*) CFLAGS="$CFLAGS -D__LINUX -I/usr/local/include" CPPFLAGS="$CPPFLAGS -D__LINUX -I/usr/local/include" LDFLAGS="$LDFLAGS -L/usr/local/lib" ;; *-sunos*|*-solaris2*) CFLAGS="$CFLAGS -D__SUNOS" CPPFLAGS="$CPPFLAGS -D__SUNOS" ;; *-cygwin*) CFLAGS="$CFLAGS -D__CYGWIN -I /usr/include/ncurses -I /usr/lib/WpdPack/Include -I /usr/include/SctpDrv" CPPFLAGS="$CPPFLAGS -D__CYGWIN -I /usr/include/ncurses -I /usr/lib/WpdPack/Include -I /usr/include/SctpDrv" LDFLAGS="$LDFLAGS -L /usr/lib/WpdPack/Lib -L /usr/lib/SctpDrv" ;; *-tru64*) CFLAGS="$CFLAGS -D__OSF1" CPPFLAGS="$CPPFLAGS -D__OSF1" ;; esac # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_have_pkgconfig+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$have_pkgconfig"; then ac_cv_prog_have_pkgconfig="$have_pkgconfig" # 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_have_pkgconfig="yes" $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 test -z "$ac_cv_prog_have_pkgconfig" && ac_cv_prog_have_pkgconfig="no" fi fi have_pkgconfig=$ac_cv_prog_have_pkgconfig if test -n "$have_pkgconfig"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_pkgconfig" >&5 $as_echo "$have_pkgconfig" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # ==================== checks for libraries ============================= if test "$have_pkgconfig" = "yes"; then # Use pkg-config when available if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $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 ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) 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 as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $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 ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" 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 PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ncurses" >&5 $as_echo_n "checking for ncurses... " >&6; } if test -n "$ncurses_CFLAGS"; then pkg_cv_ncurses_CFLAGS="$ncurses_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ncurses\""; } >&5 ($PKG_CONFIG --exists --print-errors "ncurses") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_ncurses_CFLAGS=`$PKG_CONFIG --cflags "ncurses" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$ncurses_LIBS"; then pkg_cv_ncurses_LIBS="$ncurses_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ncurses\""; } >&5 ($PKG_CONFIG --exists --print-errors "ncurses") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_ncurses_LIBS=`$PKG_CONFIG --libs "ncurses" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then ncurses_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "ncurses" 2>&1` else ncurses_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "ncurses" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$ncurses_PKG_ERRORS" >&5 pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for curses" >&5 $as_echo_n "checking for curses... " >&6; } if test -n "$curses_CFLAGS"; then pkg_cv_curses_CFLAGS="$curses_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"curses\""; } >&5 ($PKG_CONFIG --exists --print-errors "curses") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_curses_CFLAGS=`$PKG_CONFIG --cflags "curses" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$curses_LIBS"; then pkg_cv_curses_LIBS="$curses_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"curses\""; } >&5 ($PKG_CONFIG --exists --print-errors "curses") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_curses_LIBS=`$PKG_CONFIG --libs "curses" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then curses_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "curses" 2>&1` else curses_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "curses" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$curses_PKG_ERRORS" >&5 # On OSX we don't get pkg-config for (n)curses. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing initscr" >&5 $as_echo_n "checking for library containing initscr... " >&6; } if ${ac_cv_search_initscr+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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 initscr (); int main () { return initscr (); ; return 0; } _ACEOF for ac_lib in '' ncurses curses; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_initscr=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_initscr+:} false; then : break fi done if ${ac_cv_search_initscr+:} false; then : else ac_cv_search_initscr=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_initscr" >&5 $as_echo "$ac_cv_search_initscr" >&6; } ac_res=$ac_cv_search_initscr if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else as_fn_error $? "Missing (n)curses library" "$LINENO" 5 fi elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # On OSX we don't get pkg-config for (n)curses. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing initscr" >&5 $as_echo_n "checking for library containing initscr... " >&6; } if ${ac_cv_search_initscr+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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 initscr (); int main () { return initscr (); ; return 0; } _ACEOF for ac_lib in '' ncurses curses; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_initscr=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_initscr+:} false; then : break fi done if ${ac_cv_search_initscr+:} false; then : else ac_cv_search_initscr=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_initscr" >&5 $as_echo "$ac_cv_search_initscr" >&6; } ac_res=$ac_cv_search_initscr if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else as_fn_error $? "Missing (n)curses library" "$LINENO" 5 fi else curses_CFLAGS=$pkg_cv_curses_CFLAGS curses_LIBS=$pkg_cv_curses_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } LIBS="$LIBS $curses_LIBS" fi elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for curses" >&5 $as_echo_n "checking for curses... " >&6; } if test -n "$curses_CFLAGS"; then pkg_cv_curses_CFLAGS="$curses_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"curses\""; } >&5 ($PKG_CONFIG --exists --print-errors "curses") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_curses_CFLAGS=`$PKG_CONFIG --cflags "curses" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$curses_LIBS"; then pkg_cv_curses_LIBS="$curses_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"curses\""; } >&5 ($PKG_CONFIG --exists --print-errors "curses") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_curses_LIBS=`$PKG_CONFIG --libs "curses" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then curses_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "curses" 2>&1` else curses_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "curses" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$curses_PKG_ERRORS" >&5 # On OSX we don't get pkg-config for (n)curses. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing initscr" >&5 $as_echo_n "checking for library containing initscr... " >&6; } if ${ac_cv_search_initscr+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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 initscr (); int main () { return initscr (); ; return 0; } _ACEOF for ac_lib in '' ncurses curses; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_initscr=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_initscr+:} false; then : break fi done if ${ac_cv_search_initscr+:} false; then : else ac_cv_search_initscr=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_initscr" >&5 $as_echo "$ac_cv_search_initscr" >&6; } ac_res=$ac_cv_search_initscr if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else as_fn_error $? "Missing (n)curses library" "$LINENO" 5 fi elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # On OSX we don't get pkg-config for (n)curses. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing initscr" >&5 $as_echo_n "checking for library containing initscr... " >&6; } if ${ac_cv_search_initscr+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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 initscr (); int main () { return initscr (); ; return 0; } _ACEOF for ac_lib in '' ncurses curses; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_initscr=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_initscr+:} false; then : break fi done if ${ac_cv_search_initscr+:} false; then : else ac_cv_search_initscr=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_initscr" >&5 $as_echo "$ac_cv_search_initscr" >&6; } ac_res=$ac_cv_search_initscr if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else as_fn_error $? "Missing (n)curses library" "$LINENO" 5 fi else curses_CFLAGS=$pkg_cv_curses_CFLAGS curses_LIBS=$pkg_cv_curses_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } LIBS="$LIBS $curses_LIBS" fi else ncurses_CFLAGS=$pkg_cv_ncurses_CFLAGS ncurses_LIBS=$pkg_cv_ncurses_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } LIBS="$LIBS $ncurses_LIBS" fi else # Olden ways { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing initscr" >&5 $as_echo_n "checking for library containing initscr... " >&6; } if ${ac_cv_search_initscr+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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 initscr (); int main () { return initscr (); ; return 0; } _ACEOF for ac_lib in '' ncurses curses; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_initscr=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_initscr+:} false; then : break fi done if ${ac_cv_search_initscr+:} false; then : else ac_cv_search_initscr=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_initscr" >&5 $as_echo "$ac_cv_search_initscr" >&6; } ac_res=$ac_cv_search_initscr if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else as_fn_error $? "Missing (n)curses library" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing stdscr" >&5 $as_echo_n "checking for library containing stdscr... " >&6; } if ${ac_cv_search_stdscr+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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 stdscr (); int main () { return stdscr (); ; return 0; } _ACEOF for ac_lib in '' tinfo ncurses curses; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_stdscr=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_stdscr+:} false; then : break fi done if ${ac_cv_search_stdscr+:} false; then : else ac_cv_search_stdscr=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_stdscr" >&5 $as_echo "$ac_cv_search_stdscr" >&6; } ac_res=$ac_cv_search_stdscr if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else as_fn_error $? "Missing (n)curses/tinfo library" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthread" >&5 $as_echo_n "checking for pthread_mutex_init in -lpthread... " >&6; } if ${ac_cv_lib_pthread_pthread_mutex_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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 pthread_mutex_init (); int main () { return pthread_mutex_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread_pthread_mutex_init=yes else ac_cv_lib_pthread_pthread_mutex_init=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_pthread_pthread_mutex_init" >&5 $as_echo "$ac_cv_lib_pthread_pthread_mutex_init" >&6; } if test "x$ac_cv_lib_pthread_pthread_mutex_init" = xyes; then : THREAD_LIBS="-lpthread" else as_fn_error $? "pthread library needed!" "$LINENO" 5 fi # For Linux and SunOS { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 $as_echo_n "checking for library containing dlopen... " >&6; } if ${ac_cv_search_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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 dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF for ac_lib in '' dl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_dlopen=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_dlopen+:} false; then : break fi done if ${ac_cv_search_dlopen+:} false; then : else ac_cv_search_dlopen=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 $as_echo "$ac_cv_search_dlopen" >&6; } ac_res=$ac_cv_search_dlopen if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlerror" >&5 $as_echo_n "checking for library containing dlerror... " >&6; } if ${ac_cv_search_dlerror+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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 dlerror (); int main () { return dlerror (); ; return 0; } _ACEOF for ac_lib in '' dl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_dlerror=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_dlerror+:} false; then : break fi done if ${ac_cv_search_dlerror+:} false; then : else ac_cv_search_dlerror=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlerror" >&5 $as_echo "$ac_cv_search_dlerror" >&6; } ac_res=$ac_cv_search_dlerror if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5 $as_echo_n "checking for library containing dlsym... " >&6; } if ${ac_cv_search_dlsym+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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 dlsym (); int main () { return dlsym (); ; return 0; } _ACEOF for ac_lib in '' dl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_dlsym=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_dlsym+:} false; then : break fi done if ${ac_cv_search_dlsym+:} false; then : else ac_cv_search_dlsym=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5 $as_echo "$ac_cv_search_dlsym" >&6; } ac_res=$ac_cv_search_dlsym if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi # For glibc pre-2.17 we need -rt { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5 $as_echo_n "checking for library containing clock_gettime... " >&6; } if ${ac_cv_search_clock_gettime+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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 clock_gettime (); int main () { return clock_gettime (); ; return 0; } _ACEOF for ac_lib in '' rt; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_clock_gettime=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_clock_gettime+:} false; then : break fi done if ${ac_cv_search_clock_gettime+:} false; then : else ac_cv_search_clock_gettime=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5 $as_echo "$ac_cv_search_clock_gettime" >&6; } ac_res=$ac_cv_search_clock_gettime if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi # For SunOS { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_addr" >&5 $as_echo_n "checking for library containing inet_addr... " >&6; } if ${ac_cv_search_inet_addr+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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 inet_addr (); int main () { return inet_addr (); ; return 0; } _ACEOF for ac_lib in '' nsl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_inet_addr=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_inet_addr+:} false; then : break fi done if ${ac_cv_search_inet_addr+:} false; then : else ac_cv_search_inet_addr=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_addr" >&5 $as_echo "$ac_cv_search_inet_addr" >&6; } ac_res=$ac_cv_search_inet_addr if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntoa" >&5 $as_echo_n "checking for library containing inet_ntoa... " >&6; } if ${ac_cv_search_inet_ntoa+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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 inet_ntoa (); int main () { return inet_ntoa (); ; return 0; } _ACEOF for ac_lib in '' nsl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_inet_ntoa=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_inet_ntoa+:} false; then : break fi done if ${ac_cv_search_inet_ntoa+:} false; then : else ac_cv_search_inet_ntoa=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntoa" >&5 $as_echo "$ac_cv_search_inet_ntoa" >&6; } ac_res=$ac_cv_search_inet_ntoa if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_mutex_init" >&5 $as_echo_n "checking for library containing pthread_mutex_init... " >&6; } if ${ac_cv_search_pthread_mutex_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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 pthread_mutex_init (); int main () { return pthread_mutex_init (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_mutex_init=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_mutex_init+:} false; then : break fi done if ${ac_cv_search_pthread_mutex_init+:} false; then : else ac_cv_search_pthread_mutex_init=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_mutex_init" >&5 $as_echo "$ac_cv_search_pthread_mutex_init" >&6; } ac_res=$ac_cv_search_pthread_mutex_init if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_mutex_destroy" >&5 $as_echo_n "checking for library containing pthread_mutex_destroy... " >&6; } if ${ac_cv_search_pthread_mutex_destroy+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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 pthread_mutex_destroy (); int main () { return pthread_mutex_destroy (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_mutex_destroy=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_mutex_destroy+:} false; then : break fi done if ${ac_cv_search_pthread_mutex_destroy+:} false; then : else ac_cv_search_pthread_mutex_destroy=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_mutex_destroy" >&5 $as_echo "$ac_cv_search_pthread_mutex_destroy" >&6; } ac_res=$ac_cv_search_pthread_mutex_destroy if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_mutex_lock" >&5 $as_echo_n "checking for library containing pthread_mutex_lock... " >&6; } if ${ac_cv_search_pthread_mutex_lock+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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 pthread_mutex_lock (); int main () { return pthread_mutex_lock (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_mutex_lock=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_mutex_lock+:} false; then : break fi done if ${ac_cv_search_pthread_mutex_lock+:} false; then : else ac_cv_search_pthread_mutex_lock=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_mutex_lock" >&5 $as_echo "$ac_cv_search_pthread_mutex_lock" >&6; } ac_res=$ac_cv_search_pthread_mutex_lock if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_mutex_unlock" >&5 $as_echo_n "checking for library containing pthread_mutex_unlock... " >&6; } if ${ac_cv_search_pthread_mutex_unlock+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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 pthread_mutex_unlock (); int main () { return pthread_mutex_unlock (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_mutex_unlock=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_mutex_unlock+:} false; then : break fi done if ${ac_cv_search_pthread_mutex_unlock+:} false; then : else ac_cv_search_pthread_mutex_unlock=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_mutex_unlock" >&5 $as_echo "$ac_cv_search_pthread_mutex_unlock" >&6; } ac_res=$ac_cv_search_pthread_mutex_unlock if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_self" >&5 $as_echo_n "checking for library containing pthread_self... " >&6; } if ${ac_cv_search_pthread_self+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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 pthread_self (); int main () { return pthread_self (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_self=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_self+:} false; then : break fi done if ${ac_cv_search_pthread_self+:} false; then : else ac_cv_search_pthread_self=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_self" >&5 $as_echo "$ac_cv_search_pthread_self" >&6; } ac_res=$ac_cv_search_pthread_self if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_cancel" >&5 $as_echo_n "checking for library containing pthread_cancel... " >&6; } if ${ac_cv_search_pthread_cancel+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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 pthread_cancel (); int main () { return pthread_cancel (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_cancel=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_cancel+:} false; then : break fi done if ${ac_cv_search_pthread_cancel+:} false; then : else ac_cv_search_pthread_cancel=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_cancel" >&5 $as_echo "$ac_cv_search_pthread_cancel" >&6; } ac_res=$ac_cv_search_pthread_cancel if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_join" >&5 $as_echo_n "checking for library containing pthread_join... " >&6; } if ${ac_cv_search_pthread_join+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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 pthread_join (); int main () { return pthread_join (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_join=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_join+:} false; then : break fi done if ${ac_cv_search_pthread_join+:} false; then : else ac_cv_search_pthread_join=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_join" >&5 $as_echo "$ac_cv_search_pthread_join" >&6; } ac_res=$ac_cv_search_pthread_join if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_attr_init" >&5 $as_echo_n "checking for library containing pthread_attr_init... " >&6; } if ${ac_cv_search_pthread_attr_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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 pthread_attr_init (); int main () { return pthread_attr_init (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_attr_init=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_attr_init+:} false; then : break fi done if ${ac_cv_search_pthread_attr_init+:} false; then : else ac_cv_search_pthread_attr_init=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_attr_init" >&5 $as_echo "$ac_cv_search_pthread_attr_init" >&6; } ac_res=$ac_cv_search_pthread_attr_init if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_attr_setstacksize" >&5 $as_echo_n "checking for library containing pthread_attr_setstacksize... " >&6; } if ${ac_cv_search_pthread_attr_setstacksize+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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 pthread_attr_setstacksize (); int main () { return pthread_attr_setstacksize (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_attr_setstacksize=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_attr_setstacksize+:} false; then : break fi done if ${ac_cv_search_pthread_attr_setstacksize+:} false; then : else ac_cv_search_pthread_attr_setstacksize=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_attr_setstacksize" >&5 $as_echo "$ac_cv_search_pthread_attr_setstacksize" >&6; } ac_res=$ac_cv_search_pthread_attr_setstacksize if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_create" >&5 $as_echo_n "checking for library containing pthread_create... " >&6; } if ${ac_cv_search_pthread_create+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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 pthread_create (); int main () { return pthread_create (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_create=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_create+:} false; then : break fi done if ${ac_cv_search_pthread_create+:} false; then : else ac_cv_search_pthread_create=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_create" >&5 $as_echo "$ac_cv_search_pthread_create" >&6; } ac_res=$ac_cv_search_pthread_create if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_attr_destroy" >&5 $as_echo_n "checking for library containing pthread_attr_destroy... " >&6; } if ${ac_cv_search_pthread_attr_destroy+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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 pthread_attr_destroy (); int main () { return pthread_attr_destroy (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_attr_destroy=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_attr_destroy+:} false; then : break fi done if ${ac_cv_search_pthread_attr_destroy+:} false; then : else ac_cv_search_pthread_attr_destroy=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_attr_destroy" >&5 $as_echo "$ac_cv_search_pthread_attr_destroy" >&6; } ac_res=$ac_cv_search_pthread_attr_destroy if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_setschedparam" >&5 $as_echo_n "checking for library containing pthread_setschedparam... " >&6; } if ${ac_cv_search_pthread_setschedparam+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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 pthread_setschedparam (); int main () { return pthread_setschedparam (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_setschedparam=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_setschedparam+:} false; then : break fi done if ${ac_cv_search_pthread_setschedparam+:} false; then : else ac_cv_search_pthread_setschedparam=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_setschedparam" >&5 $as_echo "$ac_cv_search_pthread_setschedparam" >&6; } ac_res=$ac_cv_search_pthread_setschedparam if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_setcancelstate" >&5 $as_echo_n "checking for library containing pthread_setcancelstate... " >&6; } if ${ac_cv_search_pthread_setcancelstate+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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 pthread_setcancelstate (); int main () { return pthread_setcancelstate (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_setcancelstate=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_setcancelstate+:} false; then : break fi done if ${ac_cv_search_pthread_setcancelstate+:} false; then : else ac_cv_search_pthread_setcancelstate=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_setcancelstate" >&5 $as_echo "$ac_cv_search_pthread_setcancelstate" >&6; } ac_res=$ac_cv_search_pthread_setcancelstate if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_setcanceltype" >&5 $as_echo_n "checking for library containing pthread_setcanceltype... " >&6; } if ${ac_cv_search_pthread_setcanceltype+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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 pthread_setcanceltype (); int main () { return pthread_setcanceltype (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_setcanceltype=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_setcanceltype+:} false; then : break fi done if ${ac_cv_search_pthread_setcanceltype+:} false; then : else ac_cv_search_pthread_setcanceltype=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_setcanceltype" >&5 $as_echo "$ac_cv_search_pthread_setcanceltype" >&6; } ac_res=$ac_cv_search_pthread_setcanceltype if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_exit" >&5 $as_echo_n "checking for library containing pthread_exit... " >&6; } if ${ac_cv_search_pthread_exit+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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 pthread_exit (); int main () { return pthread_exit (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_exit=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_exit+:} false; then : break fi done if ${ac_cv_search_pthread_exit+:} false; then : else ac_cv_search_pthread_exit=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_exit" >&5 $as_echo "$ac_cv_search_pthread_exit" >&6; } ac_res=$ac_cv_search_pthread_exit if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_sigmask" >&5 $as_echo_n "checking for library containing pthread_sigmask... " >&6; } if ${ac_cv_search_pthread_sigmask+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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 pthread_sigmask (); int main () { return pthread_sigmask (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_sigmask=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_sigmask+:} false; then : break fi done if ${ac_cv_search_pthread_sigmask+:} false; then : else ac_cv_search_pthread_sigmask=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_sigmask" >&5 $as_echo "$ac_cv_search_pthread_sigmask" >&6; } ac_res=$ac_cv_search_pthread_sigmask if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi #AC_SEARCH_LIBS([pthread_cleanup_push], [pthread]) <- macro #AC_SEARCH_LIBS([pthread_cleanup_pop], [pthread]) <- macro { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing floor" >&5 $as_echo_n "checking for library containing floor... " >&6; } if ${ac_cv_search_floor+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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 floor (); int main () { return floor (); ; return 0; } _ACEOF for ac_lib in '' m; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_floor=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_floor+:} false; then : break fi done if ${ac_cv_search_floor+:} false; then : else ac_cv_search_floor=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_floor" >&5 $as_echo "$ac_cv_search_floor" >&6; } ac_res=$ac_cv_search_floor if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pow" >&5 $as_echo_n "checking for library containing pow... " >&6; } if ${ac_cv_search_pow+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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 pow (); int main () { return pow (); ; return 0; } _ACEOF for ac_lib in '' m; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pow=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pow+:} false; then : break fi done if ${ac_cv_search_pow+:} false; then : else ac_cv_search_pow=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pow" >&5 $as_echo "$ac_cv_search_pow" >&6; } ac_res=$ac_cv_search_pow if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi # For SunOS { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing htons" >&5 $as_echo_n "checking for library containing htons... " >&6; } if ${ac_cv_search_htons+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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 htons (); int main () { return htons (); ; return 0; } _ACEOF for ac_lib in '' socket; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_htons=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_htons+:} false; then : break fi done if ${ac_cv_search_htons+:} false; then : else ac_cv_search_htons=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_htons" >&5 $as_echo "$ac_cv_search_htons" >&6; } ac_res=$ac_cv_search_htons if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ntohs" >&5 $as_echo_n "checking for library containing ntohs... " >&6; } if ${ac_cv_search_ntohs+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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 ntohs (); int main () { return ntohs (); ; return 0; } _ACEOF for ac_lib in '' socket; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_ntohs=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_ntohs+:} false; then : break fi done if ${ac_cv_search_ntohs+:} false; then : else ac_cv_search_ntohs=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ntohs" >&5 $as_echo "$ac_cv_search_ntohs" >&6; } ac_res=$ac_cv_search_ntohs if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind" >&5 $as_echo_n "checking for library containing bind... " >&6; } if ${ac_cv_search_bind+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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 bind (); int main () { return bind (); ; return 0; } _ACEOF for ac_lib in '' socket; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_bind=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_bind+:} false; then : break fi done if ${ac_cv_search_bind+:} false; then : else ac_cv_search_bind=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind" >&5 $as_echo "$ac_cv_search_bind" >&6; } ac_res=$ac_cv_search_bind if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing freeaddrinfo" >&5 $as_echo_n "checking for library containing freeaddrinfo... " >&6; } if ${ac_cv_search_freeaddrinfo+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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 freeaddrinfo (); int main () { return freeaddrinfo (); ; return 0; } _ACEOF for ac_lib in '' socket; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_freeaddrinfo=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_freeaddrinfo+:} false; then : break fi done if ${ac_cv_search_freeaddrinfo+:} false; then : else ac_cv_search_freeaddrinfo=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_freeaddrinfo" >&5 $as_echo "$ac_cv_search_freeaddrinfo" >&6; } ac_res=$ac_cv_search_freeaddrinfo if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getaddrinfo" >&5 $as_echo_n "checking for library containing getaddrinfo... " >&6; } if ${ac_cv_search_getaddrinfo+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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 getaddrinfo (); int main () { return getaddrinfo (); ; return 0; } _ACEOF for ac_lib in '' socket; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_getaddrinfo=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_getaddrinfo+:} false; then : break fi done if ${ac_cv_search_getaddrinfo+:} false; then : else ac_cv_search_getaddrinfo=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getaddrinfo" >&5 $as_echo "$ac_cv_search_getaddrinfo" >&6; } ac_res=$ac_cv_search_getaddrinfo if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing listen" >&5 $as_echo_n "checking for library containing listen... " >&6; } if ${ac_cv_search_listen+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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 listen (); int main () { return listen (); ; return 0; } _ACEOF for ac_lib in '' socket; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_listen=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_listen+:} false; then : break fi done if ${ac_cv_search_listen+:} false; then : else ac_cv_search_listen=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_listen" >&5 $as_echo "$ac_cv_search_listen" >&6; } ac_res=$ac_cv_search_listen if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing recvfrom" >&5 $as_echo_n "checking for library containing recvfrom... " >&6; } if ${ac_cv_search_recvfrom+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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 recvfrom (); int main () { return recvfrom (); ; return 0; } _ACEOF for ac_lib in '' socket; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_recvfrom=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_recvfrom+:} false; then : break fi done if ${ac_cv_search_recvfrom+:} false; then : else ac_cv_search_recvfrom=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_recvfrom" >&5 $as_echo "$ac_cv_search_recvfrom" >&6; } ac_res=$ac_cv_search_recvfrom if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shutdown" >&5 $as_echo_n "checking for library containing shutdown... " >&6; } if ${ac_cv_search_shutdown+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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 shutdown (); int main () { return shutdown (); ; return 0; } _ACEOF for ac_lib in '' socket; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_shutdown=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_shutdown+:} false; then : break fi done if ${ac_cv_search_shutdown+:} false; then : else ac_cv_search_shutdown=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shutdown" >&5 $as_echo "$ac_cv_search_shutdown" >&6; } ac_res=$ac_cv_search_shutdown if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi # For Linux, SunOS and Cygwin #AC_CHECK_LIB(stdc++,main,,[AC_MSG_ERROR([stdc++ library missing])]) # Conditional build with OpenSSL if test "$openssl" = 'yes'; then # 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=`$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 `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in openssl/bio.h do : ac_fn_c_check_header_mongrel "$LINENO" "openssl/bio.h" "ac_cv_header_openssl_bio_h" "$ac_includes_default" if test "x$ac_cv_header_openssl_bio_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_OPENSSL_BIO_H 1 _ACEOF else as_fn_error $? " header missing" "$LINENO" 5 fi done for ac_header in openssl/err.h do : ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default" if test "x$ac_cv_header_openssl_err_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_OPENSSL_ERR_H 1 _ACEOF else as_fn_error $? " header missing" "$LINENO" 5 fi done for ac_header in openssl/rand.h do : ac_fn_c_check_header_mongrel "$LINENO" "openssl/rand.h" "ac_cv_header_openssl_rand_h" "$ac_includes_default" if test "x$ac_cv_header_openssl_rand_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_OPENSSL_RAND_H 1 _ACEOF else as_fn_error $? " header missing" "$LINENO" 5 fi done for ac_header in openssl/ssl.h do : ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default" if test "x$ac_cv_header_openssl_ssl_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_OPENSSL_SSL_H 1 _ACEOF else as_fn_error $? " header missing" "$LINENO" 5 fi done for ac_header in openssl/x509v3.h do : ac_fn_c_check_header_mongrel "$LINENO" "openssl/x509v3.h" "ac_cv_header_openssl_x509v3_h" "$ac_includes_default" if test "x$ac_cv_header_openssl_x509v3_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_OPENSSL_X509V3_H 1 _ACEOF else as_fn_error $? " header missing" "$LINENO" 5 fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_CTX_new in -lssl" >&5 $as_echo_n "checking for SSL_CTX_new in -lssl... " >&6; } if ${ac_cv_lib_ssl_SSL_CTX_new+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lssl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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 SSL_CTX_new (); int main () { return SSL_CTX_new (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ssl_SSL_CTX_new=yes else ac_cv_lib_ssl_SSL_CTX_new=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_ssl_SSL_CTX_new" >&5 $as_echo "$ac_cv_lib_ssl_SSL_CTX_new" >&6; } if test "x$ac_cv_lib_ssl_SSL_CTX_new" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBSSL 1 _ACEOF LIBS="-lssl $LIBS" else as_fn_error $? "ssl library missing" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_free in -lcrypto" >&5 $as_echo_n "checking for CRYPTO_free in -lcrypto... " >&6; } if ${ac_cv_lib_crypto_CRYPTO_free+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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 CRYPTO_free (); int main () { return CRYPTO_free (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_crypto_CRYPTO_free=yes else ac_cv_lib_crypto_CRYPTO_free=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_crypto_CRYPTO_free" >&5 $as_echo "$ac_cv_lib_crypto_CRYPTO_free" >&6; } if test "x$ac_cv_lib_crypto_CRYPTO_free" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBCRYPTO 1 _ACEOF LIBS="-lcrypto $LIBS" else as_fn_error $? "crypto library missing" "$LINENO" 5 fi fi # For Makefile.am if test "$openssl" = "yes"; then HAVE_OPENSSL_TRUE= HAVE_OPENSSL_FALSE='#' else HAVE_OPENSSL_TRUE='#' HAVE_OPENSSL_FALSE= fi # Conditional build with SCTP if test "$sctp" = 'yes'; then for ac_header in netinet/sctp.h do : ac_fn_c_check_header_mongrel "$LINENO" "netinet/sctp.h" "ac_cv_header_netinet_sctp_h" "$ac_includes_default" if test "x$ac_cv_header_netinet_sctp_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_NETINET_SCTP_H 1 _ACEOF else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: header missing, but this is acceptable on Mac OS X Lion" >&5 $as_echo "$as_me: WARNING: header missing, but this is acceptable on Mac OS X Lion" >&2;} fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sctp_send" >&5 $as_echo_n "checking for library containing sctp_send... " >&6; } if ${ac_cv_search_sctp_send+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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 sctp_send (); int main () { return sctp_send (); ; return 0; } _ACEOF for ac_lib in '' sctp sctpsp; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_sctp_send=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_sctp_send+:} false; then : break fi done if ${ac_cv_search_sctp_send+:} false; then : else ac_cv_search_sctp_send=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sctp_send" >&5 $as_echo "$ac_cv_search_sctp_send" >&6; } ac_res=$ac_cv_search_sctp_send if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else as_fn_error $? "SCTP library missing" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sctp_freepaddrs" >&5 $as_echo_n "checking for library containing sctp_freepaddrs... " >&6; } if ${ac_cv_search_sctp_freepaddrs+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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 sctp_freepaddrs (); int main () { return sctp_freepaddrs (); ; return 0; } _ACEOF for ac_lib in '' sctp sctpsp; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_sctp_freepaddrs=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_sctp_freepaddrs+:} false; then : break fi done if ${ac_cv_search_sctp_freepaddrs+:} false; then : else ac_cv_search_sctp_freepaddrs=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sctp_freepaddrs" >&5 $as_echo "$ac_cv_search_sctp_freepaddrs" >&6; } ac_res=$ac_cv_search_sctp_freepaddrs if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else as_fn_error $? "SCTP library missing" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sctp_bindx" >&5 $as_echo_n "checking for library containing sctp_bindx... " >&6; } if ${ac_cv_search_sctp_bindx+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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 sctp_bindx (); int main () { return sctp_bindx (); ; return 0; } _ACEOF for ac_lib in '' sctp sctpsp; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_sctp_bindx=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_sctp_bindx+:} false; then : break fi done if ${ac_cv_search_sctp_bindx+:} false; then : else ac_cv_search_sctp_bindx=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sctp_bindx" >&5 $as_echo "$ac_cv_search_sctp_bindx" >&6; } ac_res=$ac_cv_search_sctp_bindx if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else as_fn_error $? "SCTP library missing" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sctp_recvmsg" >&5 $as_echo_n "checking for library containing sctp_recvmsg... " >&6; } if ${ac_cv_search_sctp_recvmsg+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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 sctp_recvmsg (); int main () { return sctp_recvmsg (); ; return 0; } _ACEOF for ac_lib in '' sctp sctpsp; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_sctp_recvmsg=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_sctp_recvmsg+:} false; then : break fi done if ${ac_cv_search_sctp_recvmsg+:} false; then : else ac_cv_search_sctp_recvmsg=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sctp_recvmsg" >&5 $as_echo "$ac_cv_search_sctp_recvmsg" >&6; } ac_res=$ac_cv_search_sctp_recvmsg if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else as_fn_error $? "SCTP library missing" "$LINENO" 5 fi fi # For Makefile.am if test "$sctp" = "yes"; then HAVE_SCTP_TRUE= HAVE_SCTP_FALSE='#' else HAVE_SCTP_TRUE='#' HAVE_SCTP_FALSE= fi # Conditional build with pcap if test "$pcap" = 'yes'; then for ac_header in pcap.h do : ac_fn_c_check_header_mongrel "$LINENO" "pcap.h" "ac_cv_header_pcap_h" "$ac_includes_default" if test "x$ac_cv_header_pcap_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_PCAP_H 1 _ACEOF else as_fn_error $? " header missing" "$LINENO" 5 fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pcap_open_offline" >&5 $as_echo_n "checking for library containing pcap_open_offline... " >&6; } if ${ac_cv_search_pcap_open_offline+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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 pcap_open_offline (); int main () { return pcap_open_offline (); ; return 0; } _ACEOF for ac_lib in '' pcap wpcap; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pcap_open_offline=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pcap_open_offline+:} false; then : break fi done if ${ac_cv_search_pcap_open_offline+:} false; then : else ac_cv_search_pcap_open_offline=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pcap_open_offline" >&5 $as_echo "$ac_cv_search_pcap_open_offline" >&6; } ac_res=$ac_cv_search_pcap_open_offline if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else as_fn_error $? "pcap library missing" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pcap_next" >&5 $as_echo_n "checking for library containing pcap_next... " >&6; } if ${ac_cv_search_pcap_next+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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 pcap_next (); int main () { return pcap_next (); ; return 0; } _ACEOF for ac_lib in '' pcap wpcap; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pcap_next=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pcap_next+:} false; then : break fi done if ${ac_cv_search_pcap_next+:} false; then : else ac_cv_search_pcap_next=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pcap_next" >&5 $as_echo "$ac_cv_search_pcap_next" >&6; } ac_res=$ac_cv_search_pcap_next if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else as_fn_error $? "pcap library missing" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pcap_close" >&5 $as_echo_n "checking for library containing pcap_close... " >&6; } if ${ac_cv_search_pcap_close+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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 pcap_close (); int main () { return pcap_close (); ; return 0; } _ACEOF for ac_lib in '' pcap wpcap; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pcap_close=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pcap_close+:} false; then : break fi done if ${ac_cv_search_pcap_close+:} false; then : else ac_cv_search_pcap_close=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pcap_close" >&5 $as_echo "$ac_cv_search_pcap_close" >&6; } ac_res=$ac_cv_search_pcap_close if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else as_fn_error $? "pcap library missing" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcap_next_ex in -lpcap" >&5 $as_echo_n "checking for pcap_next_ex in -lpcap... " >&6; } if ${ac_cv_lib_pcap_pcap_next_ex+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpcap $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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 pcap_next_ex (); int main () { return pcap_next_ex (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pcap_pcap_next_ex=yes else ac_cv_lib_pcap_pcap_next_ex=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_pcap_pcap_next_ex" >&5 $as_echo "$ac_cv_lib_pcap_pcap_next_ex" >&6; } if test "x$ac_cv_lib_pcap_pcap_next_ex" = xyes; then : $as_echo "#define HAVE_PCAP_NEXT_EX 1" >>confdefs.h fi fi # For Makefile.am if test "$pcap" = "yes"; then HAVE_PCAP_TRUE= HAVE_PCAP_FALSE='#' else HAVE_PCAP_TRUE='#' HAVE_PCAP_FALSE= fi if test "$rtp" = "yes"; then HAVE_RTP_TRUE= HAVE_RTP_FALSE='#' else HAVE_RTP_TRUE='#' HAVE_RTP_FALSE= fi # Conditional build with gsl if test "$gsl" = "yes"; then if test "$have_pkgconfig" != "yes" ; then as_fn_error $? "Please install pkg-config to use the gsl libraries" "$LINENO" 5 fi for ac_header in gsl/gsl_randist.h do : ac_fn_c_check_header_mongrel "$LINENO" "gsl/gsl_randist.h" "ac_cv_header_gsl_gsl_randist_h" "$ac_includes_default" if test "x$ac_cv_header_gsl_gsl_randist_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_GSL_RANDIST_H 1 _ACEOF else as_fn_error $? " header missing" "$LINENO" 5 fi done for ac_header in gsl/gsl_rng.h do : ac_fn_c_check_header_mongrel "$LINENO" "gsl/gsl_rng.h" "ac_cv_header_gsl_gsl_rng_h" "$ac_includes_default" if test "x$ac_cv_header_gsl_gsl_rng_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_GSL_RNG_H 1 _ACEOF else as_fn_error $? " header missing" "$LINENO" 5 fi done for ac_header in gsl/gsl_cdf.h do : ac_fn_c_check_header_mongrel "$LINENO" "gsl/gsl_cdf.h" "ac_cv_header_gsl_gsl_cdf_h" "$ac_includes_default" if test "x$ac_cv_header_gsl_gsl_cdf_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_GSL_CDF_H 1 _ACEOF else as_fn_error $? " header missing" "$LINENO" 5 fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 $as_echo_n "checking for cos in -lm... " >&6; } if ${ac_cv_lib_m_cos+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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 cos (); int main () { return cos (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_cos=yes else ac_cv_lib_m_cos=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_m_cos" >&5 $as_echo "$ac_cv_lib_m_cos" >&6; } if test "x$ac_cv_lib_m_cos" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF LIBS="-lm $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cblas_dgemm in -lgslcblas" >&5 $as_echo_n "checking for cblas_dgemm in -lgslcblas... " >&6; } if ${ac_cv_lib_gslcblas_cblas_dgemm+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgslcblas $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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 cblas_dgemm (); int main () { return cblas_dgemm (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_gslcblas_cblas_dgemm=yes else ac_cv_lib_gslcblas_cblas_dgemm=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_gslcblas_cblas_dgemm" >&5 $as_echo "$ac_cv_lib_gslcblas_cblas_dgemm" >&6; } if test "x$ac_cv_lib_gslcblas_cblas_dgemm" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBGSLCBLAS 1 _ACEOF LIBS="-lgslcblas $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gsl_rng_alloc in -lgsl" >&5 $as_echo_n "checking for gsl_rng_alloc in -lgsl... " >&6; } if ${ac_cv_lib_gsl_gsl_rng_alloc+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgsl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* 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 gsl_rng_alloc (); int main () { return gsl_rng_alloc (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_gsl_gsl_rng_alloc=yes else ac_cv_lib_gsl_gsl_rng_alloc=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_gsl_gsl_rng_alloc" >&5 $as_echo "$ac_cv_lib_gsl_gsl_rng_alloc" >&6; } if test "x$ac_cv_lib_gsl_gsl_rng_alloc" = xyes; then : GSL_CFLAGS=`pkg-config gsl --cflags` GSL_CXXFLAGS=`pkg-config gsl --cflags` GSL_LIBS=`pkg-config gsl --libs` else as_fn_error $? "gsl library missing" "$LINENO" 5 fi fi # For Makefile.am if test "$gsl" = "yes"; then HAVE_GSL_TRUE= HAVE_GSL_FALSE='#' else HAVE_GSL_TRUE='#' HAVE_GSL_FALSE= fi if test "$epoll" = 'yes'; then ax_have_epoll_cppflags="${CPPFLAGS}" ac_fn_c_check_header_mongrel "$LINENO" "linux/version.h" "ac_cv_header_linux_version_h" "$ac_includes_default" if test "x$ac_cv_header_linux_version_h" = xyes; then : CPPFLAGS="${CPPFLAGS} -DHAVE_LINUX_VERSION_H" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Linux epoll(7) interface" >&5 $as_echo_n "checking for Linux epoll(7) interface... " >&6; } if ${ax_cv_have_epoll+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef HAVE_LINUX_VERSION_H # include # if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,45) # error linux kernel version is too old to have epoll # endif #endif int main () { int fd, rc; struct epoll_event ev; fd = epoll_create(128); rc = epoll_wait(fd, &ev, 1, 0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ax_cv_have_epoll=yes else ax_cv_have_epoll=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CPPFLAGS="${ax_have_epoll_cppflags}" if test "${ax_cv_have_epoll}" = "yes"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ax_config_feature_epoll=yes else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ax_config_feature_epoll=no fi # Check whether --enable-epoll was given. if test "${enable_epoll+set}" = set; then : enableval=$enable_epoll; case "${enableval}" in yes) ax_config_feature_epoll="yes" ;; no) ax_config_feature_epoll="no" ;; *) as_fn_error $? "bad value ${enableval} for feature --epoll" "$LINENO" 5 ;; esac fi if test "$ax_config_feature_epoll" = yes; then : $as_echo "#define HAVE_EPOLL 1" >>confdefs.h epoll="yes" if test "$ax_config_feature_verbose" = yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: Feature epoll is enabled" >&5 $as_echo "$as_me: Feature epoll is enabled" >&6;} fi else epoll="no" if test "$ax_config_feature_verbose" = yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: Feature epoll is disabled" >&5 $as_echo "$as_me: Feature epoll is disabled" >&6;} fi fi fi if test "$epoll" = "yes"; then HAVE_EPOLL_TRUE= HAVE_EPOLL_FALSE='#' else HAVE_EPOLL_TRUE='#' HAVE_EPOLL_FALSE= fi # ==================== checks for header files ========================== ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 $as_echo_n "checking for working alloca.h... " >&6; } if ${ac_cv_working_alloca_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { char *p = (char *) alloca (2 * sizeof (int)); if (p) return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_working_alloca_h=yes else ac_cv_working_alloca_h=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 $as_echo "$ac_cv_working_alloca_h" >&6; } if test $ac_cv_working_alloca_h = yes; then $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 $as_echo_n "checking for alloca... " >&6; } if ${ac_cv_func_alloca_works+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __GNUC__ # define alloca __builtin_alloca #else # ifdef _MSC_VER # include # define alloca _alloca # else # ifdef HAVE_ALLOCA_H # include # else # ifdef _AIX #pragma alloca # else # ifndef alloca /* predefined by HP cc +Olibcalls */ void *alloca (size_t); # endif # endif # endif # endif #endif int main () { char *p = (char *) alloca (1); if (p) return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_func_alloca_works=yes else ac_cv_func_alloca_works=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 $as_echo "$ac_cv_func_alloca_works" >&6; } if test $ac_cv_func_alloca_works = yes; then $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h else # The SVR3 libPW and SVR4 libucb both contain incompatible functions # that cause trouble. Some versions do not even contain alloca or # contain a buggy version. If you still want to use their alloca, # use ar to extract alloca.o from them instead of compiling alloca.c. ALLOCA=\${LIBOBJDIR}alloca.$ac_objext $as_echo "#define C_ALLOCA 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } if ${ac_cv_os_cray+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined CRAY && ! defined CRAY2 webecray #else wenotbecray #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "webecray" >/dev/null 2>&1; then : ac_cv_os_cray=yes else ac_cv_os_cray=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 $as_echo "$ac_cv_os_cray" >&6; } if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; 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 CRAY_STACKSEG_END $ac_func _ACEOF break fi done fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 $as_echo_n "checking stack direction for C alloca... " >&6; } if ${ac_cv_c_stack_direction+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_c_stack_direction=0 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int find_stack_direction (int *addr, int depth) { int dir, dummy = 0; if (! addr) addr = &dummy; *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; dir = depth ? find_stack_direction (addr, depth - 1) : 0; return dir + dummy; } int main (int argc, char **argv) { return find_stack_direction (0, argc + !argv + 20) < 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_stack_direction=1 else ac_cv_c_stack_direction=-1 fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 $as_echo "$ac_cv_c_stack_direction" >&6; } cat >>confdefs.h <<_ACEOF #define STACK_DIRECTION $ac_cv_c_stack_direction _ACEOF fi for ac_header in arpa/inet.h endian.h fcntl.h limits.h netdb.h netinet/in.h stdlib.h string.h sys/endian.h sys/socket.h sys/time.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 `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done # ===== checks for typedefs, structures and compiler characteristics ==== { $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 ${ac_cv_header_stdbool_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifndef bool "error: bool is not defined" #endif #ifndef false "error: false is not defined" #endif #if false "error: false is not 0" #endif #ifndef true "error: true is not defined" #endif #if true != 1 "error: true is not 1" #endif #ifndef __bool_true_false_are_defined "error: __bool_true_false_are_defined is not defined" #endif struct s { _Bool s: 1; _Bool t; } s; char a[true == 1 ? 1 : -1]; char b[false == 0 ? 1 : -1]; char c[__bool_true_false_are_defined == 1 ? 1 : -1]; char d[(bool) 0.5 == true ? 1 : -1]; /* See body of main program for 'e'. */ char f[(_Bool) 0.0 == false ? 1 : -1]; char g[true]; 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]; /* Catch a bug in an HP-UX C compiler. See http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html */ _Bool q = true; _Bool *pq = &q; int main () { bool e = &s; *pq |= q; *pq |= ! q; /* Refer to every declared value, to avoid compiler optimizations. */ return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l + !m + !n + !o + !p + !q + !pq); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdbool_h=yes else ac_cv_header_stdbool_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $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" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE__BOOL 1 _ACEOF fi if test $ac_cv_header_stdbool_h = yes; then $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } if ${ac_cv_c_inline+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #endif _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_inline=$ac_kw fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 $as_echo "$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; *) case $ac_cv_c_inline in no) ac_val=;; *) ac_val=$ac_cv_c_inline;; esac cat >>confdefs.h <<_ACEOF #ifndef __cplusplus #define inline $ac_val #endif _ACEOF ;; esac ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" if test "x$ac_cv_type_pid_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define pid_t int _ACEOF 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" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" if test "x$ac_cv_type_ssize_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define ssize_t int _ACEOF fi # These conflict with netinet/in.h typedefs. #AC_TYPE_UINT16_T #AC_TYPE_UINT32_T #AC_TYPE_UINT8_T # ==================== checks for library functions ===================== for ac_header in vfork.h 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" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_VFORK_H 1 _ACEOF fi done 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 fi done 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 ${ac_cv_func_fork_works+:} false; 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 () { /* By Ruediger Kuhlmann. */ return fork () < 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_fork_works=yes else ac_cv_func_fork_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $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 fi if test "x$ac_cv_func_fork_works" = xcross; then case $host in *-*-amigaos* | *-*-msdosdjgpp*) # Override, as these systems have only a dummy fork() stub ac_cv_func_fork_works=no ;; *) ac_cv_func_fork_works=yes ;; esac { $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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 $as_echo_n "checking for working vfork... " >&6; } if ${ac_cv_func_vfork_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_vfork_works=cross else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Thanks to Paul Eggert for this test. */ $ac_includes_default #include #ifdef HAVE_VFORK_H # include #endif /* On some sparc systems, changes by the child to local and incoming argument registers are propagated back to the parent. The compiler is told about this with #include , but some compilers (e.g. gcc -O) don't grok . Test for this by using a static variable whose address is put into a register that is clobbered by the vfork. */ static void #ifdef __cplusplus sparc_address_test (int arg) # else sparc_address_test (arg) int arg; #endif { static pid_t child; if (!child) { child = vfork (); if (child < 0) { perror ("vfork"); _exit(2); } if (!child) { arg = getpid(); write(-1, "", 0); _exit (arg); } } } int main () { pid_t parent = getpid (); pid_t child; sparc_address_test (0); child = vfork (); if (child == 0) { /* Here is another test for sparc vfork register problems. This test uses lots of local variables, at least as many local variables as main has allocated so far including compiler temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should reuse the register of parent for one of the local variables, since it will think that parent can't possibly be used any more in this routine. Assigning to the local variable will thus munge parent in the parent process. */ pid_t p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); /* Convince the compiler that p..p7 are live; otherwise, it might use the same hardware register for all 8 local variables. */ if (p != p1 || p != p2 || p != p3 || p != p4 || p != p5 || p != p6 || p != p7) _exit(1); /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent from child file descriptors. If the child closes a descriptor before it execs or exits, this munges the parent's descriptor as well. Test for this by closing stdout in the child. */ _exit(close(fileno(stdout)) != 0); } else { int status; struct stat st; while (wait(&status) != child) ; return ( /* Was there some problem with vforking? */ child < 0 /* Did the child fail? (This shouldn't happen.) */ || status /* Did the vfork/compiler bug occur? */ || parent != getpid() /* Did the file descriptor bug occur? */ || fstat(fileno(stdout), &st) != 0 ); } } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_vfork_works=yes else ac_cv_func_vfork_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $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 { $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 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h else $as_echo "#define vfork fork" >>confdefs.h fi if test "x$ac_cv_func_fork_works" = xyes; then $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h fi #AC_FUNC_MALLOC #AC_FUNC_REALLOC #AC_FUNC_STRTOD for ac_func in alarm dup2 floor gethostname gettimeofday inet_ntoa memmove memset pow regcomp socket sqrt strcasecmp strchr strcspn strdup strerror strncasecmp strrchr strstr strtol strtoul strtoull 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 fi done # Check for le16toh in both endian.h and sys/endian.h (for BSD). ac_fn_c_check_decl "$LINENO" "le16toh" "ac_cv_have_decl_le16toh" "#ifdef HAVE_ENDIAN_H # include #endif #ifdef HAVE_SYS_ENDIAN_H # include #endif " if test "x$ac_cv_have_decl_le16toh" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_LE16TOH $ac_have_decl _ACEOF # ==================== check for clang/gmock workaround ================= # clang++ falls over the use of is_default_constructible, suggesting # is_nothrow_constructible instead. # # ./gmock/include/gmock/gmock-actions.h:107:19: error: no template named # 'is_default_constructible' in namespace 'std'; did you mean # 'is_nothrow_constructible'? # T, ::std::is_default_constructible::value>::Get(); # ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ # is_nothrow_constructible # /usr/include/c++/4.6/type_traits:705:12: note: # 'is_nothrow_constructible' declared here # ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_success=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports is_default_constructible (used by gmock)" >&5 $as_echo_n "checking whether $CXX supports is_default_constructible (used by gmock)... " >&6; } if ${ax_cv_cxx_has_is_default_constructible+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include template void test_is_default_constructible() { static_assert(std::is_default_constructible::value, ""); } int main() { test_is_default_constructible(); return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ax_cv_cxx_has_is_default_constructible=yes else ax_cv_cxx_has_is_default_constructible=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_has_is_default_constructible" >&5 $as_echo "$ax_cv_cxx_has_is_default_constructible" >&6; } if test x$ax_cv_cxx_has_is_default_constructible = xno; then CPPFLAGS="$CPPFLAGS -Dis_default_constructible=is_nothrow_constructible" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' 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 # ==================== generate files =================================== ac_config_files="$ac_config_files Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_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) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (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 \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $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 test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H 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=`$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. 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${HAVE_HELP2MAN_TRUE}" && test -z "${HAVE_HELP2MAN_FALSE}"; then as_fn_error $? "conditional \"HAVE_HELP2MAN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then 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 as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_OPENSSL_TRUE}" && test -z "${HAVE_OPENSSL_FALSE}"; then as_fn_error $? "conditional \"HAVE_OPENSSL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_SCTP_TRUE}" && test -z "${HAVE_SCTP_FALSE}"; then as_fn_error $? "conditional \"HAVE_SCTP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_PCAP_TRUE}" && test -z "${HAVE_PCAP_FALSE}"; then as_fn_error $? "conditional \"HAVE_PCAP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_RTP_TRUE}" && test -z "${HAVE_RTP_FALSE}"; then as_fn_error $? "conditional \"HAVE_RTP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_GSL_TRUE}" && test -z "${HAVE_GSL_FALSE}"; then as_fn_error $? "conditional \"HAVE_GSL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_EPOLL_TRUE}" && test -z "${HAVE_EPOLL_FALSE}"; then as_fn_error $? "conditional \"HAVE_EPOLL\" 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" { $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. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false 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 : 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 case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi 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 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 export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # 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 # IFS # We need space, tab and new line, in precisely that order. Quoting is # 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.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= 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 IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # 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. 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 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 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi 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 ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac 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 2>/dev/null fi 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 -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' 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='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 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 SIPp $as_me see-include/version.h, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _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" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$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 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --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 Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ SIPp config.status see-include/version.h configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 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 || 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 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $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 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 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 as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $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. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then 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 "\$@" fi _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 $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "include/config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # 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 if $AWK 'BEGIN { getline <"/dev/null" }' /dev/null; then ac_cs_awk_getline=: ac_cs_awk_pipe_init= ac_cs_awk_read_file=' while ((getline aline < (F[key])) > 0) print(aline) close(F[key])' ac_cs_awk_pipe_fini= else ac_cs_awk_getline=false ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\"" ac_cs_awk_read_file=' print "|#_!!_#|" print "cat " F[key] " &&" '$ac_cs_awk_pipe_init # The final `:' finishes the AND list. ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }' fi 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 {' >"$ac_tmp/subs1.awk" && _ACEOF # Create commands to substitute file output variables. { echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" && echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' && echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' && echo "_ACAWK" && echo "_ACEOF" } >conf$$files.sh && . ./conf$$files.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 rm -f conf$$files.sh { 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 . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 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 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 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_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 >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" \$ac_cs_awk_pipe_init } { 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 } if (nfields == 3 && !substed) { key = field[2] if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) { \$ac_cs_awk_read_file next } } print line } \$ac_cs_awk_pipe_fini _ACAWK _ACEOF 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 < "$ac_tmp/subs1.awk" > "$ac_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 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[ ]*=[ ]*/{ 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 || 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 >"$ac_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_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; 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" 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*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac 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 '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $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 >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$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 || $as_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"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. 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/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) 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 || 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= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $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 || 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' ;; 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 || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b 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 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t 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 " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | if $ac_cs_awk_getline; then $AWK -f "$ac_tmp/subs.awk" else $AWK -f "$ac_tmp/subs.awk" | $SHELL fi \ >$ac_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' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $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 "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_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 "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # 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 $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done 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 } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :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"" || { # Older Autoconf 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 || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` 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"` # 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'`; 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 || $as_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; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; esac done # for ac_tag as_fn_exit 0 _ACEOF 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. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false 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 || 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 sipp-3.6.0/depcomp0000755000175000017500000005601713502240715013436 0ustar walterwalter#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2016-01-11.22; # UTC # Copyright (C) 1999-2017 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, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by 'PROGRAMS ARGS'. object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac # Get the directory component of the given path, and save it in the # global variables '$dir'. Note that this directory component will # be either empty or ending with a '/' character. This is deliberate. set_dir_from () { case $1 in */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; *) dir=;; esac } # Get the suffix-stripped basename of the given path, and save it the # global variable '$base'. set_base_from () { base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` } # If no dependency file was actually created by the compiler invocation, # we still have to create a dummy depfile, to avoid errors with the # Makefile "include basename.Plo" scheme. make_dummy_depfile () { echo "#dummy" > "$depfile" } # Factor out some common post-processing of the generated depfile. # Requires the auxiliary global variable '$tmpdepfile' to be set. aix_post_process_depfile () { # If the compiler actually managed to produce a dependency file, # post-process it. if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependency.h'. # Do two passes, one to just change these to # $object: dependency.h # and one to simply output # dependency.h: # which is needed to avoid the deleted-header problem. { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" } > "$depfile" rm -f "$tmpdepfile" else make_dummy_depfile fi } # A tabulation character. tab=' ' # A newline character. nl=' ' # Character ranges might be problematic outside the C locale. # These definitions help. upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ lower=abcdefghijklmnopqrstuvwxyz digits=0123456789 alpha=${upper}${lower} if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Avoid interferences from the environment. gccflag= dashmflag= # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi if test "$depmode" = xlc; then # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. gccflag=-qmakedep=gcc,-MF depmode=gcc fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. ## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). Also, it might not be ## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The second -e expression handles DOS-style file names with drive # letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. ## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ | tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" ;; xlc) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done aix_post_process_depfile ;; tcc) # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 # FIXME: That version still under development at the moment of writing. # Make that this statement remains true also for stable, released # versions. # It will wrap lines (doesn't matter whether long or short) with a # trailing '\', as in: # # foo.o : \ # foo.c \ # foo.h \ # # It will put a trailing '\' even on the last line, and will use leading # spaces rather than leading tabs (at least since its commit 0394caf7 # "Emit spaces for -MD"). "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. # We have to change lines of the first kind to '$object: \'. sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" # And for each line of the second kind, we have to emit a 'dep.h:' # dummy dependency, to avoid the deleted-header problem. sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; ## The order of this option in the case statement is important, since the ## shell code in configure will try each of these formats in the order ## listed in this file. A plain '-MD' option would be understood by many ## compilers, so we must ensure this comes after the gcc and icc options. pgcc) # Portland's C compiler understands '-MD'. # Will always output deps to 'file.d' where file is the root name of the # source file under compilation, even if file resides in a subdirectory. # The object file name does not affect the name of the '.d' file. # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... set_dir_from "$object" # Use the source, not the object, to determine the base name, since # that's sadly what pgcc will do too. set_base_from "$source" tmpdepfile=$base.d # For projects that build the same source file twice into different object # files, the pgcc approach of using the *source* file root name can cause # problems in parallel builds. Use a locking strategy to avoid stomping on # the same $tmpdepfile. lockdir=$base.d-lock trap " echo '$0: caught signal, cleaning up...' >&2 rmdir '$lockdir' exit 1 " 1 2 13 15 numtries=100 i=$numtries while test $i -gt 0; do # mkdir is a portable test-and-set. if mkdir "$lockdir" 2>/dev/null; then # This process acquired the lock. "$@" -MD stat=$? # Release the lock. rmdir "$lockdir" break else # If the lock is being held by a different process, wait # until the winning process is done or we timeout. while test -d "$lockdir" && test $i -gt 0; do sleep 1 i=`expr $i - 1` done fi i=`expr $i - 1` done trap - 1 2 13 15 if test $i -le 0; then echo "$0: failed to acquire lock after $numtries attempts" >&2 echo "$0: check lockdir '$lockdir'" >&2 exit 1 fi if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then # Libtool generates 2 separate objects for the 2 libraries. These # two compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir$base.o.d # libtool 1.5 tmpdepfile2=$dir.libs/$base.o.d # Likewise. tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d "$@" -MD fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done # Same post-processing that is required for AIX mode. aix_post_process_depfile ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/'"$tab"'/ G p }' >> "$depfile" echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this sed invocation # correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process the last invocation # correctly. Breaking it into two sed invocations is a workaround. sed '1,2d' "$tmpdepfile" \ | tr ' ' "$nl" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E \ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: sipp-3.6.0/Makefile.am0000644000175000017500000000735413475544015014126 0ustar walterwalter@AM_GIT_VERSION@ bin_PROGRAMS = sipp TESTS = sipp_unittest check_PROGRAMS = $(TESTS) AM_CFLAGS=-I$(srcdir)/include -Wall -pedantic AM_CXXFLAGS=-I$(srcdir)/include -Wall -pedantic # For BSD-style elements in udphdr struct (uh_dport instead of dest) # among others. AM_CPPFLAGS=-D_BSD_SOURCE -D_DEFAULT_SOURCE CLEANFILES = EXTRA_DIST = \ $(srcdir)/example/fortune.cpp \ $(srcdir)/LICENSE.txt \ $(srcdir)/README.md \ $(srcdir)/THANKS \ $(srcdir)/sipp.dtd \ $(srcdir)/cpplint.py if HAVE_OPENSSL DEFS += -DUSE_TLS -DUSE_OPENSSL ssl_incl = \ include/sslsocket.hpp ssl_SOURCES = \ $(ssl_incl) \ src/sslsocket.cpp endif if HAVE_PCAP DEFS += -DPCAPPLAY pcap_incl = \ include/prepare_pcap.h \ include/send_packets.h pcap_SOURCES = \ $(pcap_incl) \ src/prepare_pcap.c \ src/send_packets.c endif if HAVE_RTP DEFS += -DRTP_STREAM rtp_SOURCES = \ src/rtpstream.cpp \ include/rtpstream.hpp endif if HAVE_SCTP DEFS += -DUSE_SCTP endif if HAVE_GSL DEFS += -DHAVE_GSL endif if HAVE_EPOLL DEFS += -DHAVE_EPOLL endif common_incl = \ include/comp.h \ include/infile.hpp \ include/listener.hpp \ include/logger.hpp \ include/md5.h \ include/message.hpp \ include/milenage.h \ include/call_generation_task.hpp \ include/ratetask.hpp \ include/reporttask.hpp \ include/rijndael.h \ include/scenario.hpp \ include/sip_parser.hpp \ include/screen.hpp \ include/socket.hpp \ include/socketowner.hpp \ include/stat.hpp \ include/strings.hpp \ include/task.hpp \ include/time.hpp \ include/variables.hpp \ include/watchdog.hpp \ include/xp_parser.h \ include/actions.hpp \ include/call.hpp \ include/auth.hpp \ include/deadcall.hpp common_SOURCES = \ src/actions.cpp \ src/auth.cpp \ src/comp.c \ src/call.cpp \ src/deadcall.cpp \ src/infile.cpp \ src/listener.cpp \ src/logger.cpp \ src/md5.c \ src/message.cpp \ src/milenage.c \ src/call_generation_task.cpp \ src/ratetask.cpp \ src/reporttask.cpp \ src/rijndael.c \ src/scenario.cpp \ src/sip_parser.cpp \ src/screen.cpp \ src/socket.cpp \ src/socketowner.cpp \ src/stat.cpp \ src/strings.cpp \ src/task.cpp \ src/time.cpp \ src/variables.cpp \ src/watchdog.cpp \ src/xp_parser.c \ $(common_incl) \ $(ssl_SOURCES) \ $(pcap_SOURCES) \ $(rtp_SOURCES) sipp_SOURCES = \ $(common_SOURCES) \ src/sipp.cpp \ include/sipp.hpp sipp_CFLAGS = $(AM_CFLAGS) @GSL_CFLAGS@ sipp_CXXFLAGS = $(AM_CXXFLAGS) @GSL_CXXFLAGS@ sipp_LDADD = @LIBOBJS@ @GSL_LIBS@ # call.cpp and sipp.cpp use version.h; see AM_GIT_VERSION. src/call.cpp: include/version.h src/sipp.cpp: include/version.h gtest_SOURCES = \ gtest/src/gtest-death-test.cc \ gtest/src/gtest-filepath.cc \ gtest/src/gtest-internal-inl.h \ gtest/src/gtest-port.cc \ gtest/src/gtest-printers.cc \ gtest/src/gtest-test-part.cc \ gtest/src/gtest-typed-test.cc \ gtest/src/gtest.cc \ gmock/src/gmock-internal-utils.cc \ gmock/src/gmock-matchers.cc sipp_unittest_SOURCES = \ $(common_SOURCES) \ src/sipp_unittest.cpp \ src/xp_parser_ut.cpp \ $(gtest_SOURCES) sipp_unittest_CFLAGS = $(AM_CFLAGS) -DGTEST=1 \ -I$(srcdir)/gtest/include \ -I$(srcdir)/gmock/include \ -I$(srcdir)/gtest \ -I$(srcdir)/gmock \ @GSL_CFLAGS@ sipp_unittest_CXXFLAGS = $(AM_CXXFLAGS) -DGTEST=1 \ -I$(srcdir)/gtest/include \ -I$(srcdir)/gmock/include \ -I$(srcdir)/gtest \ -I$(srcdir)/gmock \ @GSL_CXXFLAGS@ sipp_unittest_LDADD = @LIBOBJS@ @GSL_LIBS@ # Ensure that after a reconfigure the source is cleaned. .autoclean: Makefile make clean echo > .autoclean BUILT_SOURCES = .autoclean if HAVE_HELP2MAN man_MANS = sipp.1 CLEANFILES += $(man_MANS) sipp.1: ./sipp $(sipp_SOURCES) $(HELP2MAN) --output=$@ -v "-v" --no-info \ --name='SIP testing tool and traffic generator' \ ./sipp else sipp.1: @echo "Warning: help2man not available, no man page is created." endif sipp-3.6.0/build.sh0000755000175000017500000000153013475544015013516 0ustar walterwalter#!/bin/sh set -e # abort on error MAKE=`which gmake make 2>/dev/null | head -n1` # prefer GNU make test -z "$MAKE" && echo "No (g)make found" >&2 && exit 1 CPUCOUNT=$(nproc --all 2>/dev/null || echo 1) MAKEFLAGS="-j$CPUCOUNT" if test -z "$*"; then echo "build.sh: Please specify configure options," \ "--none for defaults, or --full for all" >&2 exit 1 elif test "$*" = "--help" || test "$*" = "-h"; then ./configure --help exit 1 fi ./autogen.sh if test "$*" = "--none"; then ./configure elif test "$*" = "--full"; then ./configure \ --with-gsl \ --with-openssl \ --with-pcap \ --with-rtpstream \ --with-sctp else ./configure "$@" fi # For git checkout, run unit tests. if test -e gtest/.git; then "$MAKE" $MAKEFLAGS sipp_unittest ./sipp_unittest fi "$MAKE" $MAKEFLAGS sipp-3.6.0/cpplint.py0000644000175000017500000046622113475544015014117 0ustar walterwalter#!/usr/bin/python # # Copyright (c) 2009 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above # copyright notice, this list of conditions and the following disclaimer # in the documentation and/or other materials provided with the # distribution. # * Neither the name of Google Inc. nor the names of its # contributors may be used to endorse or promote products derived from # this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # Here are some issues that I've had people identify in my code during reviews, # that I think are possible to flag automatically in a lint tool. If these were # caught by lint, it would save time both for myself and that of my reviewers. # Most likely, some of these are beyond the scope of the current lint framework, # but I think it is valuable to retain these wish-list items even if they cannot # be immediately implemented. # # Suggestions # ----------- # - Check for no 'explicit' for multi-arg ctor # - Check for boolean assign RHS in parens # - Check for ctor initializer-list colon position and spacing # - Check that if there's a ctor, there should be a dtor # - Check accessors that return non-pointer member variables are # declared const # - Check accessors that return non-const pointer member vars are # *not* declared const # - Check for using public includes for testing # - Check for spaces between brackets in one-line inline method # - Check for no assert() # - Check for spaces surrounding operators # - Check for 0 in pointer context (should be NULL) # - Check for 0 in char context (should be '\0') # - Check for camel-case method name conventions for methods # that are not simple inline getters and setters # - Do not indent namespace contents # - Avoid inlining non-trivial constructors in header files # - Check for old-school (void) cast for call-sites of functions # ignored return value # - Check gUnit usage of anonymous namespace # - Check for class declaration order (typedefs, consts, enums, # ctor(s?), dtor, friend declarations, methods, member vars) # """Does google-lint on c++ files. The goal of this script is to identify places in the code that *may* be in non-compliance with google style. It does not attempt to fix up these problems -- the point is to educate. It does also not attempt to find all problems, or to ensure that everything it does find is legitimately a problem. In particular, we can get very confused by /* and // inside strings! We do a small hack, which is to ignore //'s with "'s after them on the same line, but it is far from perfect (in either direction). """ import codecs import copy import getopt import math # for log import os import re import sre_compile import string import sys import unicodedata _USAGE = """ Syntax: cpplint.py [--verbose=#] [--output=vs7] [--filter=-x,+y,...] [--counting=total|toplevel|detailed] [file] ... The style guidelines this tries to follow are those in http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml Every problem is given a confidence score from 1-5, with 5 meaning we are certain of the problem, and 1 meaning it could be a legitimate construct. This will miss some errors, and is not a substitute for a code review. To suppress false-positive errors of a certain category, add a 'NOLINT(category)' comment to the line. NOLINT or NOLINT(*) suppresses errors of all categories on that line. The files passed in will be linted; at least one file must be provided. Linted extensions are .cc, .cpp, and .h. Other file types will be ignored. Flags: output=vs7 By default, the output is formatted to ease emacs parsing. Visual Studio compatible output (vs7) may also be used. Other formats are unsupported. verbose=# Specify a number 0-5 to restrict errors to certain verbosity levels. filter=-x,+y,... Specify a comma-separated list of category-filters to apply: only error messages whose category names pass the filters will be printed. (Category names are printed with the message and look like "[whitespace/indent]".) Filters are evaluated left to right. "-FOO" and "FOO" means "do not print categories that start with FOO". "+FOO" means "do print categories that start with FOO". Examples: --filter=-whitespace,+whitespace/braces --filter=whitespace,runtime/printf,+runtime/printf_format --filter=-,+build/include_what_you_use To see a list of all the categories used in cpplint, pass no arg: --filter= counting=total|toplevel|detailed The total number of errors found is always printed. If 'toplevel' is provided, then the count of errors in each of the top-level categories like 'build' and 'whitespace' will also be printed. If 'detailed' is provided, then a count is provided for each category like 'build/class'. root=subdir The root directory used for deriving header guard CPP variable. By default, the header guard CPP variable is calculated as the relative path to the directory that contains .git, .hg, or .svn. When this flag is specified, the relative path is calculated from the specified directory. If the specified directory does not exist, this flag is ignored. Examples: Assuing that src/.git exists, the header guard CPP variables for src/chrome/browser/ui/browser.h are: No flag => CHROME_BROWSER_UI_BROWSER_H_ --root=chrome => BROWSER_UI_BROWSER_H_ --root=chrome/browser => UI_BROWSER_H_ """ # We categorize each error message we print. Here are the categories. # We want an explicit list so we can list them all in cpplint --filter=. # If you add a new error message with a new category, add it to the list # here! cpplint_unittest.py should tell you if you forget to do this. # \ used for clearer layout -- pylint: disable-msg=C6013 _ERROR_CATEGORIES = [ 'build/class', 'build/deprecated', 'build/endif_comment', 'build/explicit_make_pair', 'build/forward_decl', 'build/header_guard', 'build/include', 'build/include_alpha', 'build/include_order', 'build/include_what_you_use', 'build/namespaces', 'build/printf_format', 'build/storage_class', 'legal/copyright', 'readability/alt_tokens', 'readability/braces', 'readability/casting', 'readability/check', 'readability/constructors', 'readability/fn_size', 'readability/function', 'readability/multiline_comment', 'readability/multiline_string', 'readability/namespace', 'readability/nolint', 'readability/streams', 'readability/todo', 'readability/utf8', 'runtime/arrays', 'runtime/casting', 'runtime/explicit', 'runtime/int', 'runtime/init', 'runtime/invalid_increment', 'runtime/member_string_references', 'runtime/memset', 'runtime/operator', 'runtime/printf', 'runtime/printf_format', 'runtime/references', 'runtime/rtti', 'runtime/sizeof', 'runtime/string', 'runtime/threadsafe_fn', 'whitespace/blank_line', 'whitespace/braces', 'whitespace/comma', 'whitespace/comments', 'whitespace/empty_loop_body', 'whitespace/end_of_line', 'whitespace/ending_newline', 'whitespace/forcolon', 'whitespace/indent', 'whitespace/labels', 'whitespace/line_length', 'whitespace/newline', 'whitespace/operators', 'whitespace/parens', 'whitespace/semicolon', 'whitespace/tab', 'whitespace/todo' ] # The default state of the category filter. This is overrided by the --filter= # flag. By default all errors are on, so only add here categories that should be # off by default (i.e., categories that must be enabled by the --filter= flags). # All entries here should start with a '-' or '+', as in the --filter= flag. _DEFAULT_FILTERS = ['-build/include_alpha'] # We used to check for high-bit characters, but after much discussion we # decided those were OK, as long as they were in UTF-8 and didn't represent # hard-coded international strings, which belong in a separate i18n file. # Headers that we consider STL headers. _STL_HEADERS = frozenset([ 'algobase.h', 'algorithm', 'alloc.h', 'bitset', 'deque', 'exception', 'function.h', 'functional', 'hash_map', 'hash_map.h', 'hash_set', 'hash_set.h', 'iterator', 'list', 'list.h', 'map', 'memory', 'new', 'pair.h', 'pthread_alloc', 'queue', 'set', 'set.h', 'sstream', 'stack', 'stl_alloc.h', 'stl_relops.h', 'type_traits.h', 'utility', 'vector', 'vector.h', ]) # Non-STL C++ system headers. _CPP_HEADERS = frozenset([ 'algo.h', 'builtinbuf.h', 'bvector.h', 'cassert', 'cctype', 'cerrno', 'cfloat', 'ciso646', 'climits', 'clocale', 'cmath', 'complex', 'complex.h', 'csetjmp', 'csignal', 'cstdarg', 'cstddef', 'cstdio', 'cstdlib', 'cstring', 'ctime', 'cwchar', 'cwctype', 'defalloc.h', 'deque.h', 'editbuf.h', 'exception', 'fstream', 'fstream.h', 'hashtable.h', 'heap.h', 'indstream.h', 'iomanip', 'iomanip.h', 'ios', 'iosfwd', 'iostream', 'iostream.h', 'istream', 'istream.h', 'iterator.h', 'limits', 'map.h', 'multimap.h', 'multiset.h', 'numeric', 'ostream', 'ostream.h', 'parsestream.h', 'pfstream.h', 'PlotFile.h', 'procbuf.h', 'pthread_alloc.h', 'rope', 'rope.h', 'ropeimpl.h', 'SFile.h', 'slist', 'slist.h', 'stack.h', 'stdexcept', 'stdiostream.h', 'streambuf', 'streambuf.h', 'stream.h', 'strfile.h', 'string', 'strstream', 'strstream.h', 'tempbuf.h', 'tree.h', 'typeinfo', 'valarray', ]) # Assertion macros. These are defined in base/logging.h and # testing/base/gunit.h. Note that the _M versions need to come first # for substring matching to work. _CHECK_MACROS = [ 'DCHECK', 'CHECK', 'EXPECT_TRUE_M', 'EXPECT_TRUE', 'ASSERT_TRUE_M', 'ASSERT_TRUE', 'EXPECT_FALSE_M', 'EXPECT_FALSE', 'ASSERT_FALSE_M', 'ASSERT_FALSE', ] # Replacement macros for CHECK/DCHECK/EXPECT_TRUE/EXPECT_FALSE _CHECK_REPLACEMENT = dict([(m, {}) for m in _CHECK_MACROS]) for op, replacement in [('==', 'EQ'), ('!=', 'NE'), ('>=', 'GE'), ('>', 'GT'), ('<=', 'LE'), ('<', 'LT')]: _CHECK_REPLACEMENT['DCHECK'][op] = 'DCHECK_%s' % replacement _CHECK_REPLACEMENT['CHECK'][op] = 'CHECK_%s' % replacement _CHECK_REPLACEMENT['EXPECT_TRUE'][op] = 'EXPECT_%s' % replacement _CHECK_REPLACEMENT['ASSERT_TRUE'][op] = 'ASSERT_%s' % replacement _CHECK_REPLACEMENT['EXPECT_TRUE_M'][op] = 'EXPECT_%s_M' % replacement _CHECK_REPLACEMENT['ASSERT_TRUE_M'][op] = 'ASSERT_%s_M' % replacement for op, inv_replacement in [('==', 'NE'), ('!=', 'EQ'), ('>=', 'LT'), ('>', 'LE'), ('<=', 'GT'), ('<', 'GE')]: _CHECK_REPLACEMENT['EXPECT_FALSE'][op] = 'EXPECT_%s' % inv_replacement _CHECK_REPLACEMENT['ASSERT_FALSE'][op] = 'ASSERT_%s' % inv_replacement _CHECK_REPLACEMENT['EXPECT_FALSE_M'][op] = 'EXPECT_%s_M' % inv_replacement _CHECK_REPLACEMENT['ASSERT_FALSE_M'][op] = 'ASSERT_%s_M' % inv_replacement # Alternative tokens and their replacements. For full list, see section 2.5 # Alternative tokens [lex.digraph] in the C++ standard. # # Digraphs (such as '%:') are not included here since it's a mess to # match those on a word boundary. _ALT_TOKEN_REPLACEMENT = { 'and': '&&', 'bitor': '|', 'or': '||', 'xor': '^', 'compl': '~', 'bitand': '&', 'and_eq': '&=', 'or_eq': '|=', 'xor_eq': '^=', 'not': '!', 'not_eq': '!=' } # Compile regular expression that matches all the above keywords. The "[ =()]" # bit is meant to avoid matching these keywords outside of boolean expressions. # # False positives include C-style multi-line comments (http://go/nsiut ) # and multi-line strings (http://go/beujw ), but those have always been # troublesome for cpplint. _ALT_TOKEN_REPLACEMENT_PATTERN = re.compile( r'[ =()](' + ('|'.join(_ALT_TOKEN_REPLACEMENT.keys())) + r')(?=[ (]|$)') # These constants define types of headers for use with # _IncludeState.CheckNextIncludeOrder(). _C_SYS_HEADER = 1 _CPP_SYS_HEADER = 2 _LIKELY_MY_HEADER = 3 _POSSIBLE_MY_HEADER = 4 _OTHER_HEADER = 5 # These constants define the current inline assembly state _NO_ASM = 0 # Outside of inline assembly block _INSIDE_ASM = 1 # Inside inline assembly block _END_ASM = 2 # Last line of inline assembly block _BLOCK_ASM = 3 # The whole block is an inline assembly block # Match start of assembly blocks _MATCH_ASM = re.compile(r'^\s*(?:asm|_asm|__asm|__asm__)' r'(?:\s+(volatile|__volatile__))?' r'\s*[{(]') _regexp_compile_cache = {} # Finds occurrences of NOLINT or NOLINT(...). _RE_SUPPRESSION = re.compile(r'\bNOLINT\b(\([^)]*\))?') # {str, set(int)}: a map from error categories to sets of linenumbers # on which those errors are expected and should be suppressed. _error_suppressions = {} # The root directory used for deriving header guard CPP variable. # This is set by --root flag. _root = None def ParseNolintSuppressions(filename, raw_line, linenum, error): """Updates the global list of error-suppressions. Parses any NOLINT comments on the current line, updating the global error_suppressions store. Reports an error if the NOLINT comment was malformed. Args: filename: str, the name of the input file. raw_line: str, the line of input text, with comments. linenum: int, the number of the current line. error: function, an error handler. """ # FIXME(adonovan): "NOLINT(" is misparsed as NOLINT(*). matched = _RE_SUPPRESSION.search(raw_line) if matched: category = matched.group(1) if category in (None, '(*)'): # => "suppress all" _error_suppressions.setdefault(None, set()).add(linenum) else: if category.startswith('(') and category.endswith(')'): category = category[1:-1] if category in _ERROR_CATEGORIES: _error_suppressions.setdefault(category, set()).add(linenum) else: error(filename, linenum, 'readability/nolint', 5, 'Unknown NOLINT error category: %s' % category) def ResetNolintSuppressions(): "Resets the set of NOLINT suppressions to empty." _error_suppressions.clear() def IsErrorSuppressedByNolint(category, linenum): """Returns true if the specified error category is suppressed on this line. Consults the global error_suppressions map populated by ParseNolintSuppressions/ResetNolintSuppressions. Args: category: str, the category of the error. linenum: int, the current line number. Returns: bool, True iff the error should be suppressed due to a NOLINT comment. """ return (linenum in _error_suppressions.get(category, set()) or linenum in _error_suppressions.get(None, set())) def Match(pattern, s): """Matches the string with the pattern, caching the compiled regexp.""" # The regexp compilation caching is inlined in both Match and Search for # performance reasons; factoring it out into a separate function turns out # to be noticeably expensive. if not pattern in _regexp_compile_cache: _regexp_compile_cache[pattern] = sre_compile.compile(pattern) return _regexp_compile_cache[pattern].match(s) def Search(pattern, s): """Searches the string for the pattern, caching the compiled regexp.""" if not pattern in _regexp_compile_cache: _regexp_compile_cache[pattern] = sre_compile.compile(pattern) return _regexp_compile_cache[pattern].search(s) class _IncludeState(dict): """Tracks line numbers for includes, and the order in which includes appear. As a dict, an _IncludeState object serves as a mapping between include filename and line number on which that file was included. Call CheckNextIncludeOrder() once for each header in the file, passing in the type constants defined above. Calls in an illegal order will raise an _IncludeError with an appropriate error message. """ # self._section will move monotonically through this set. If it ever # needs to move backwards, CheckNextIncludeOrder will raise an error. _INITIAL_SECTION = 0 _MY_H_SECTION = 1 _C_SECTION = 2 _CPP_SECTION = 3 _OTHER_H_SECTION = 4 _TYPE_NAMES = { _C_SYS_HEADER: 'C system header', _CPP_SYS_HEADER: 'C++ system header', _LIKELY_MY_HEADER: 'header this file implements', _POSSIBLE_MY_HEADER: 'header this file may implement', _OTHER_HEADER: 'other header', } _SECTION_NAMES = { _INITIAL_SECTION: "... nothing. (This can't be an error.)", _MY_H_SECTION: 'a header this file implements', _C_SECTION: 'C system header', _CPP_SECTION: 'C++ system header', _OTHER_H_SECTION: 'other header', } def __init__(self): dict.__init__(self) # The name of the current section. self._section = self._INITIAL_SECTION # The path of last found header. self._last_header = '' def CanonicalizeAlphabeticalOrder(self, header_path): """Returns a path canonicalized for alphabetical comparison. - replaces "-" with "_" so they both cmp the same. - removes '-inl' since we don't require them to be after the main header. - lowercase everything, just in case. Args: header_path: Path to be canonicalized. Returns: Canonicalized path. """ return header_path.replace('-inl.h', '.h').replace('-', '_').lower() def IsInAlphabeticalOrder(self, header_path): """Check if a header is in alphabetical order with the previous header. Args: header_path: Header to be checked. Returns: Returns true if the header is in alphabetical order. """ canonical_header = self.CanonicalizeAlphabeticalOrder(header_path) if self._last_header > canonical_header: return False self._last_header = canonical_header return True def CheckNextIncludeOrder(self, header_type): """Returns a non-empty error message if the next header is out of order. This function also updates the internal state to be ready to check the next include. Args: header_type: One of the _XXX_HEADER constants defined above. Returns: The empty string if the header is in the right order, or an error message describing what's wrong. """ error_message = ('Found %s after %s' % (self._TYPE_NAMES[header_type], self._SECTION_NAMES[self._section])) last_section = self._section if header_type == _C_SYS_HEADER: if self._section <= self._C_SECTION: self._section = self._C_SECTION else: self._last_header = '' return error_message elif header_type == _CPP_SYS_HEADER: if self._section <= self._CPP_SECTION: self._section = self._CPP_SECTION else: self._last_header = '' return error_message elif header_type == _LIKELY_MY_HEADER: if self._section <= self._MY_H_SECTION: self._section = self._MY_H_SECTION else: self._section = self._OTHER_H_SECTION elif header_type == _POSSIBLE_MY_HEADER: if self._section <= self._MY_H_SECTION: self._section = self._MY_H_SECTION else: # This will always be the fallback because we're not sure # enough that the header is associated with this file. self._section = self._OTHER_H_SECTION else: assert header_type == _OTHER_HEADER self._section = self._OTHER_H_SECTION if last_section != self._section: self._last_header = '' return '' class _CppLintState(object): """Maintains module-wide state..""" def __init__(self): self.verbose_level = 1 # global setting. self.error_count = 0 # global count of reported errors # filters to apply when emitting error messages self.filters = _DEFAULT_FILTERS[:] self.counting = 'total' # In what way are we counting errors? self.errors_by_category = {} # string to int dict storing error counts # output format: # "emacs" - format that emacs can parse (default) # "vs7" - format that Microsoft Visual Studio 7 can parse self.output_format = 'emacs' def SetOutputFormat(self, output_format): """Sets the output format for errors.""" self.output_format = output_format def SetVerboseLevel(self, level): """Sets the module's verbosity, and returns the previous setting.""" last_verbose_level = self.verbose_level self.verbose_level = level return last_verbose_level def SetCountingStyle(self, counting_style): """Sets the module's counting options.""" self.counting = counting_style def SetFilters(self, filters): """Sets the error-message filters. These filters are applied when deciding whether to emit a given error message. Args: filters: A string of comma-separated filters (eg "+whitespace/indent"). Each filter should start with + or -; else we die. Raises: ValueError: The comma-separated filters did not all start with '+' or '-'. E.g. "-,+whitespace,-whitespace/indent,whitespace/badfilter" """ # Default filters always have less priority than the flag ones. self.filters = _DEFAULT_FILTERS[:] for filt in filters.split(','): clean_filt = filt.strip() if clean_filt: self.filters.append(clean_filt) for filt in self.filters: if not (filt.startswith('+') or filt.startswith('-')): raise ValueError('Every filter in --filters must start with + or -' ' (%s does not)' % filt) def ResetErrorCounts(self): """Sets the module's error statistic back to zero.""" self.error_count = 0 self.errors_by_category = {} def IncrementErrorCount(self, category): """Bumps the module's error statistic.""" self.error_count += 1 if self.counting in ('toplevel', 'detailed'): if self.counting != 'detailed': category = category.split('/')[0] if category not in self.errors_by_category: self.errors_by_category[category] = 0 self.errors_by_category[category] += 1 def PrintErrorCounts(self): """Print a summary of errors by category, and the total.""" for category, count in self.errors_by_category.iteritems(): sys.stderr.write('Category \'%s\' errors found: %d\n' % (category, count)) sys.stderr.write('Total errors found: %d\n' % self.error_count) _cpplint_state = _CppLintState() def _OutputFormat(): """Gets the module's output format.""" return _cpplint_state.output_format def _SetOutputFormat(output_format): """Sets the module's output format.""" _cpplint_state.SetOutputFormat(output_format) def _VerboseLevel(): """Returns the module's verbosity setting.""" return _cpplint_state.verbose_level def _SetVerboseLevel(level): """Sets the module's verbosity, and returns the previous setting.""" return _cpplint_state.SetVerboseLevel(level) def _SetCountingStyle(level): """Sets the module's counting options.""" _cpplint_state.SetCountingStyle(level) def _Filters(): """Returns the module's list of output filters, as a list.""" return _cpplint_state.filters def _SetFilters(filters): """Sets the module's error-message filters. These filters are applied when deciding whether to emit a given error message. Args: filters: A string of comma-separated filters (eg "whitespace/indent"). Each filter should start with + or -; else we die. """ _cpplint_state.SetFilters(filters) class _FunctionState(object): """Tracks current function name and the number of lines in its body.""" _NORMAL_TRIGGER = 250 # for --v=0, 500 for --v=1, etc. _TEST_TRIGGER = 400 # about 50% more than _NORMAL_TRIGGER. def __init__(self): self.in_a_function = False self.lines_in_function = 0 self.current_function = '' def Begin(self, function_name): """Start analyzing function body. Args: function_name: The name of the function being tracked. """ self.in_a_function = True self.lines_in_function = 0 self.current_function = function_name def Count(self): """Count line in current function body.""" if self.in_a_function: self.lines_in_function += 1 def Check(self, error, filename, linenum): """Report if too many lines in function body. Args: error: The function to call with any errors found. filename: The name of the current file. linenum: The number of the line to check. """ if Match(r'T(EST|est)', self.current_function): base_trigger = self._TEST_TRIGGER else: base_trigger = self._NORMAL_TRIGGER trigger = base_trigger * 2**_VerboseLevel() if self.lines_in_function > trigger: error_level = int(math.log(self.lines_in_function / base_trigger, 2)) # 50 => 0, 100 => 1, 200 => 2, 400 => 3, 800 => 4, 1600 => 5, ... if error_level > 5: error_level = 5 error(filename, linenum, 'readability/fn_size', error_level, 'Small and focused functions are preferred:' ' %s has %d non-comment lines' ' (error triggered by exceeding %d lines).' % ( self.current_function, self.lines_in_function, trigger)) def End(self): """Stop analyzing function body.""" self.in_a_function = False class _IncludeError(Exception): """Indicates a problem with the include order in a file.""" pass class FileInfo: """Provides utility functions for filenames. FileInfo provides easy access to the components of a file's path relative to the project root. """ def __init__(self, filename): self._filename = filename def FullName(self): """Make Windows paths like Unix.""" return os.path.abspath(self._filename).replace('\\', '/') def RepositoryName(self): """FullName after removing the local path to the repository. If we have a real absolute path name here we can try to do something smart: detecting the root of the checkout and truncating /path/to/checkout from the name so that we get header guards that don't include things like "C:\Documents and Settings\..." or "/home/username/..." in them and thus people on different computers who have checked the source out to different locations won't see bogus errors. """ fullname = self.FullName() if os.path.exists(fullname): project_dir = os.path.dirname(fullname) if os.path.exists(os.path.join(project_dir, ".svn")): # If there's a .svn file in the current directory, we recursively look # up the directory tree for the top of the SVN checkout root_dir = project_dir one_up_dir = os.path.dirname(root_dir) while os.path.exists(os.path.join(one_up_dir, ".svn")): root_dir = os.path.dirname(root_dir) one_up_dir = os.path.dirname(one_up_dir) prefix = os.path.commonprefix([root_dir, project_dir]) return fullname[len(prefix) + 1:] # Not SVN <= 1.6? Try to find a git, hg, or svn top level directory by # searching up from the current path. root_dir = os.path.dirname(fullname) while (root_dir != os.path.dirname(root_dir) and not os.path.exists(os.path.join(root_dir, ".git")) and not os.path.exists(os.path.join(root_dir, ".hg")) and not os.path.exists(os.path.join(root_dir, ".svn"))): root_dir = os.path.dirname(root_dir) if (os.path.exists(os.path.join(root_dir, ".git")) or os.path.exists(os.path.join(root_dir, ".hg")) or os.path.exists(os.path.join(root_dir, ".svn"))): prefix = os.path.commonprefix([root_dir, project_dir]) return fullname[len(prefix) + 1:] # Don't know what to do; header guard warnings may be wrong... return fullname def Split(self): """Splits the file into the directory, basename, and extension. For 'chrome/browser/browser.cc', Split() would return ('chrome/browser', 'browser', '.cc') Returns: A tuple of (directory, basename, extension). """ googlename = self.RepositoryName() project, rest = os.path.split(googlename) return (project,) + os.path.splitext(rest) def BaseName(self): """File base name - text after the final slash, before the final period.""" return self.Split()[1] def Extension(self): """File extension - text following the final period.""" return self.Split()[2] def NoExtension(self): """File has no source file extension.""" return '/'.join(self.Split()[0:2]) def IsSource(self): """File has a source file extension.""" return self.Extension()[1:] in ('c', 'cc', 'cpp', 'cxx') def _ShouldPrintError(category, confidence, linenum): """If confidence >= verbose, category passes filter and is not suppressed.""" # There are three ways we might decide not to print an error message: # a "NOLINT(category)" comment appears in the source, # the verbosity level isn't high enough, or the filters filter it out. if IsErrorSuppressedByNolint(category, linenum): return False if confidence < _cpplint_state.verbose_level: return False is_filtered = False for one_filter in _Filters(): if one_filter.startswith('-'): if category.startswith(one_filter[1:]): is_filtered = True elif one_filter.startswith('+'): if category.startswith(one_filter[1:]): is_filtered = False else: assert False # should have been checked for in SetFilter. if is_filtered: return False return True def Error(filename, linenum, category, confidence, message): """Logs the fact we've found a lint error. We log where the error was found, and also our confidence in the error, that is, how certain we are this is a legitimate style regression, and not a misidentification or a use that's sometimes justified. False positives can be suppressed by the use of "cpplint(category)" comments on the offending line. These are parsed into _error_suppressions. Args: filename: The name of the file containing the error. linenum: The number of the line containing the error. category: A string used to describe the "category" this bug falls under: "whitespace", say, or "runtime". Categories may have a hierarchy separated by slashes: "whitespace/indent". confidence: A number from 1-5 representing a confidence score for the error, with 5 meaning that we are certain of the problem, and 1 meaning that it could be a legitimate construct. message: The error message. """ if _ShouldPrintError(category, confidence, linenum): _cpplint_state.IncrementErrorCount(category) if _cpplint_state.output_format == 'vs7': sys.stderr.write('%s(%s): %s [%s] [%d]\n' % ( filename, linenum, message, category, confidence)) elif _cpplint_state.output_format == 'eclipse': sys.stderr.write('%s:%s: warning: %s [%s] [%d]\n' % ( filename, linenum, message, category, confidence)) else: sys.stderr.write('%s:%s: %s [%s] [%d]\n' % ( filename, linenum, message, category, confidence)) # Matches standard C++ escape esequences per 2.13.2.3 of the C++ standard. _RE_PATTERN_CLEANSE_LINE_ESCAPES = re.compile( r'\\([abfnrtv?"\\\']|\d+|x[0-9a-fA-F]+)') # Matches strings. Escape codes should already be removed by ESCAPES. _RE_PATTERN_CLEANSE_LINE_DOUBLE_QUOTES = re.compile(r'"[^"]*"') # Matches characters. Escape codes should already be removed by ESCAPES. _RE_PATTERN_CLEANSE_LINE_SINGLE_QUOTES = re.compile(r"'.'") # Matches multi-line C++ comments. # This RE is a little bit more complicated than one might expect, because we # have to take care of space removals tools so we can handle comments inside # statements better. # The current rule is: We only clear spaces from both sides when we're at the # end of the line. Otherwise, we try to remove spaces from the right side, # if this doesn't work we try on left side but only if there's a non-character # on the right. _RE_PATTERN_CLEANSE_LINE_C_COMMENTS = re.compile( r"""(\s*/\*.*\*/\s*$| /\*.*\*/\s+| \s+/\*.*\*/(?=\W)| /\*.*\*/)""", re.VERBOSE) def IsCppString(line): """Does line terminate so, that the next symbol is in string constant. This function does not consider single-line nor multi-line comments. Args: line: is a partial line of code starting from the 0..n. Returns: True, if next character appended to 'line' is inside a string constant. """ line = line.replace(r'\\', 'XX') # after this, \\" does not match to \" return ((line.count('"') - line.count(r'\"') - line.count("'\"'")) & 1) == 1 def FindNextMultiLineCommentStart(lines, lineix): """Find the beginning marker for a multiline comment.""" while lineix < len(lines): if lines[lineix].strip().startswith('/*'): # Only return this marker if the comment goes beyond this line if lines[lineix].strip().find('*/', 2) < 0: return lineix lineix += 1 return len(lines) def FindNextMultiLineCommentEnd(lines, lineix): """We are inside a comment, find the end marker.""" while lineix < len(lines): if lines[lineix].strip().endswith('*/'): return lineix lineix += 1 return len(lines) def RemoveMultiLineCommentsFromRange(lines, begin, end): """Clears a range of lines for multi-line comments.""" # Having // dummy comments makes the lines non-empty, so we will not get # unnecessary blank line warnings later in the code. for i in range(begin, end): lines[i] = '// dummy' def RemoveMultiLineComments(filename, lines, error): """Removes multiline (c-style) comments from lines.""" lineix = 0 while lineix < len(lines): lineix_begin = FindNextMultiLineCommentStart(lines, lineix) if lineix_begin >= len(lines): return lineix_end = FindNextMultiLineCommentEnd(lines, lineix_begin) if lineix_end >= len(lines): error(filename, lineix_begin + 1, 'readability/multiline_comment', 5, 'Could not find end of multi-line comment') return RemoveMultiLineCommentsFromRange(lines, lineix_begin, lineix_end + 1) lineix = lineix_end + 1 def CleanseComments(line): """Removes //-comments and single-line C-style /* */ comments. Args: line: A line of C++ source. Returns: The line with single-line comments removed. """ commentpos = line.find('//') if commentpos != -1 and not IsCppString(line[:commentpos]): line = line[:commentpos].rstrip() # get rid of /* ... */ return _RE_PATTERN_CLEANSE_LINE_C_COMMENTS.sub('', line) class CleansedLines(object): """Holds 3 copies of all lines with different preprocessing applied to them. 1) elided member contains lines without strings and comments, 2) lines member contains lines without comments, and 3) raw_lines member contains all the lines without processing. All these three members are of , and of the same length. """ def __init__(self, lines): self.elided = [] self.lines = [] self.raw_lines = lines self.num_lines = len(lines) for linenum in range(len(lines)): self.lines.append(CleanseComments(lines[linenum])) elided = self._CollapseStrings(lines[linenum]) self.elided.append(CleanseComments(elided)) def NumLines(self): """Returns the number of lines represented.""" return self.num_lines @staticmethod def _CollapseStrings(elided): """Collapses strings and chars on a line to simple "" or '' blocks. We nix strings first so we're not fooled by text like '"http://"' Args: elided: The line being processed. Returns: The line with collapsed strings. """ if not _RE_PATTERN_INCLUDE.match(elided): # Remove escaped characters first to make quote/single quote collapsing # basic. Things that look like escaped characters shouldn't occur # outside of strings and chars. elided = _RE_PATTERN_CLEANSE_LINE_ESCAPES.sub('', elided) elided = _RE_PATTERN_CLEANSE_LINE_SINGLE_QUOTES.sub("''", elided) elided = _RE_PATTERN_CLEANSE_LINE_DOUBLE_QUOTES.sub('""', elided) return elided def FindEndOfExpressionInLine(line, startpos, depth, startchar, endchar): """Find the position just after the matching endchar. Args: line: a CleansedLines line. startpos: start searching at this position. depth: nesting level at startpos. startchar: expression opening character. endchar: expression closing character. Returns: Index just after endchar. """ for i in xrange(startpos, len(line)): if line[i] == startchar: depth += 1 elif line[i] == endchar: depth -= 1 if depth == 0: return i + 1 return -1 def CloseExpression(clean_lines, linenum, pos): """If input points to ( or { or [, finds the position that closes it. If lines[linenum][pos] points to a '(' or '{' or '[', finds the linenum/pos that correspond to the closing of the expression. Args: clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. pos: A position on the line. Returns: A tuple (line, linenum, pos) pointer *past* the closing brace, or (line, len(lines), -1) if we never find a close. Note we ignore strings and comments when matching; and the line we return is the 'cleansed' line at linenum. """ line = clean_lines.elided[linenum] startchar = line[pos] if startchar not in '({[': return (line, clean_lines.NumLines(), -1) if startchar == '(': endchar = ')' if startchar == '[': endchar = ']' if startchar == '{': endchar = '}' # Check first line end_pos = FindEndOfExpressionInLine(line, pos, 0, startchar, endchar) if end_pos > -1: return (line, linenum, end_pos) tail = line[pos:] num_open = tail.count(startchar) - tail.count(endchar) while linenum < clean_lines.NumLines() - 1: linenum += 1 line = clean_lines.elided[linenum] delta = line.count(startchar) - line.count(endchar) if num_open + delta <= 0: return (line, linenum, FindEndOfExpressionInLine(line, 0, num_open, startchar, endchar)) num_open += delta # Did not find endchar before end of file, give up return (line, clean_lines.NumLines(), -1) def CheckForCopyright(filename, lines, error): """Logs an error if no Copyright message appears at the top of the file.""" # We'll say it should occur by line 10. Don't forget there's a # dummy line at the front. for line in xrange(1, min(len(lines), 11)): if re.search(r'Copyright', lines[line], re.I): break else: # means no copyright line was found error(filename, 0, 'legal/copyright', 5, 'No copyright message found. ' 'You should have a line: "Copyright [year] "') def GetHeaderGuardCPPVariable(filename): """Returns the CPP variable that should be used as a header guard. Args: filename: The name of a C++ header file. Returns: The CPP variable that should be used as a header guard in the named file. """ # Restores original filename in case that cpplint is invoked from Emacs's # flymake. filename = re.sub(r'_flymake\.h$', '.h', filename) filename = re.sub(r'/\.flymake/([^/]*)$', r'/\1', filename) fileinfo = FileInfo(filename) file_path_from_root = fileinfo.RepositoryName() if _root: file_path_from_root = re.sub('^' + _root + os.sep, '', file_path_from_root) return re.sub(r'[-./\s]', '_', file_path_from_root).upper() + '_' def CheckForHeaderGuard(filename, lines, error): """Checks that the file contains a header guard. Logs an error if no #ifndef header guard is present. For other headers, checks that the full pathname is used. Args: filename: The name of the C++ header file. lines: An array of strings, each representing a line of the file. error: The function to call with any errors found. """ cppvar = GetHeaderGuardCPPVariable(filename) ifndef = None ifndef_linenum = 0 define = None endif = None endif_linenum = 0 for linenum, line in enumerate(lines): linesplit = line.split() if len(linesplit) >= 2: # find the first occurrence of #ifndef and #define, save arg if not ifndef and linesplit[0] == '#ifndef': # set ifndef to the header guard presented on the #ifndef line. ifndef = linesplit[1] ifndef_linenum = linenum if not define and linesplit[0] == '#define': define = linesplit[1] # find the last occurrence of #endif, save entire line if line.startswith('#endif'): endif = line endif_linenum = linenum if not ifndef: error(filename, 0, 'build/header_guard', 5, 'No #ifndef header guard found, suggested CPP variable is: %s' % cppvar) return if not define: error(filename, 0, 'build/header_guard', 5, 'No #define header guard found, suggested CPP variable is: %s' % cppvar) return # The guard should be PATH_FILE_H_, but we also allow PATH_FILE_H__ # for backward compatibility. if ifndef != cppvar: error_level = 0 if ifndef != cppvar + '_': error_level = 5 ParseNolintSuppressions(filename, lines[ifndef_linenum], ifndef_linenum, error) error(filename, ifndef_linenum, 'build/header_guard', error_level, '#ifndef header guard has wrong style, please use: %s' % cppvar) if define != ifndef: error(filename, 0, 'build/header_guard', 5, '#ifndef and #define don\'t match, suggested CPP variable is: %s' % cppvar) return if endif != ('#endif // %s' % cppvar): error_level = 0 if endif != ('#endif // %s' % (cppvar + '_')): error_level = 5 ParseNolintSuppressions(filename, lines[endif_linenum], endif_linenum, error) error(filename, endif_linenum, 'build/header_guard', error_level, '#endif line should be "#endif // %s"' % cppvar) def CheckForUnicodeReplacementCharacters(filename, lines, error): """Logs an error for each line containing Unicode replacement characters. These indicate that either the file contained invalid UTF-8 (likely) or Unicode replacement characters (which it shouldn't). Note that it's possible for this to throw off line numbering if the invalid UTF-8 occurred adjacent to a newline. Args: filename: The name of the current file. lines: An array of strings, each representing a line of the file. error: The function to call with any errors found. """ for linenum, line in enumerate(lines): if u'\ufffd' in line: error(filename, linenum, 'readability/utf8', 5, 'Line contains invalid UTF-8 (or Unicode replacement character).') def CheckForNewlineAtEOF(filename, lines, error): """Logs an error if there is no newline char at the end of the file. Args: filename: The name of the current file. lines: An array of strings, each representing a line of the file. error: The function to call with any errors found. """ # The array lines() was created by adding two newlines to the # original file (go figure), then splitting on \n. # To verify that the file ends in \n, we just have to make sure the # last-but-two element of lines() exists and is empty. if len(lines) < 3 or lines[-2]: error(filename, len(lines) - 2, 'whitespace/ending_newline', 5, 'Could not find a newline character at the end of the file.') def CheckForMultilineCommentsAndStrings(filename, clean_lines, linenum, error): """Logs an error if we see /* ... */ or "..." that extend past one line. /* ... */ comments are legit inside macros, for one line. Otherwise, we prefer // comments, so it's ok to warn about the other. Likewise, it's ok for strings to extend across multiple lines, as long as a line continuation character (backslash) terminates each line. Although not currently prohibited by the C++ style guide, it's ugly and unnecessary. We don't do well with either in this lint program, so we warn about both. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. error: The function to call with any errors found. """ line = clean_lines.elided[linenum] # Remove all \\ (escaped backslashes) from the line. They are OK, and the # second (escaped) slash may trigger later \" detection erroneously. line = line.replace('\\\\', '') if line.count('/*') > line.count('*/'): error(filename, linenum, 'readability/multiline_comment', 5, 'Complex multi-line /*...*/-style comment found. ' 'Lint may give bogus warnings. ' 'Consider replacing these with //-style comments, ' 'with #if 0...#endif, ' 'or with more clearly structured multi-line comments.') if (line.count('"') - line.count('\\"')) % 2: error(filename, linenum, 'readability/multiline_string', 5, 'Multi-line string ("...") found. This lint script doesn\'t ' 'do well with such strings, and may give bogus warnings. They\'re ' 'ugly and unnecessary, and you should use concatenation instead".') threading_list = ( ('asctime(', 'asctime_r('), ('ctime(', 'ctime_r('), ('getgrgid(', 'getgrgid_r('), ('getgrnam(', 'getgrnam_r('), ('getlogin(', 'getlogin_r('), ('getpwnam(', 'getpwnam_r('), ('getpwuid(', 'getpwuid_r('), ('gmtime(', 'gmtime_r('), ('localtime(', 'localtime_r('), ('rand(', 'rand_r('), ('readdir(', 'readdir_r('), ('strtok(', 'strtok_r('), ('ttyname(', 'ttyname_r('), ) def CheckPosixThreading(filename, clean_lines, linenum, error): """Checks for calls to thread-unsafe functions. Much code has been originally written without consideration of multi-threading. Also, engineers are relying on their old experience; they have learned posix before threading extensions were added. These tests guide the engineers to use thread-safe functions (when using posix directly). Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. error: The function to call with any errors found. """ line = clean_lines.elided[linenum] for single_thread_function, multithread_safe_function in threading_list: ix = line.find(single_thread_function) # Comparisons made explicit for clarity -- pylint: disable-msg=C6403 if ix >= 0 and (ix == 0 or (not line[ix - 1].isalnum() and line[ix - 1] not in ('_', '.', '>'))): error(filename, linenum, 'runtime/threadsafe_fn', 2, 'Consider using ' + multithread_safe_function + '...) instead of ' + single_thread_function + '...) for improved thread safety.') # Matches invalid increment: *count++, which moves pointer instead of # incrementing a value. _RE_PATTERN_INVALID_INCREMENT = re.compile( r'^\s*\*\w+(\+\+|--);') def CheckInvalidIncrement(filename, clean_lines, linenum, error): """Checks for invalid increment *count++. For example following function: void increment_counter(int* count) { *count++; } is invalid, because it effectively does count++, moving pointer, and should be replaced with ++*count, (*count)++ or *count += 1. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. error: The function to call with any errors found. """ line = clean_lines.elided[linenum] if _RE_PATTERN_INVALID_INCREMENT.match(line): error(filename, linenum, 'runtime/invalid_increment', 5, 'Changing pointer instead of value (or unused value of operator*).') class _BlockInfo(object): """Stores information about a generic block of code.""" def __init__(self, seen_open_brace): self.seen_open_brace = seen_open_brace self.open_parentheses = 0 self.inline_asm = _NO_ASM def CheckBegin(self, filename, clean_lines, linenum, error): """Run checks that applies to text up to the opening brace. This is mostly for checking the text after the class identifier and the "{", usually where the base class is specified. For other blocks, there isn't much to check, so we always pass. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. error: The function to call with any errors found. """ pass def CheckEnd(self, filename, clean_lines, linenum, error): """Run checks that applies to text after the closing brace. This is mostly used for checking end of namespace comments. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. error: The function to call with any errors found. """ pass class _ClassInfo(_BlockInfo): """Stores information about a class.""" def __init__(self, name, class_or_struct, clean_lines, linenum): _BlockInfo.__init__(self, False) self.name = name self.starting_linenum = linenum self.is_derived = False if class_or_struct == 'struct': self.access = 'public' else: self.access = 'private' # Try to find the end of the class. This will be confused by things like: # class A { # } *x = { ... # # But it's still good enough for CheckSectionSpacing. self.last_line = 0 depth = 0 for i in range(linenum, clean_lines.NumLines()): line = clean_lines.elided[i] depth += line.count('{') - line.count('}') if not depth: self.last_line = i break def CheckBegin(self, filename, clean_lines, linenum, error): # Look for a bare ':' if Search('(^|[^:]):($|[^:])', clean_lines.elided[linenum]): self.is_derived = True class _NamespaceInfo(_BlockInfo): """Stores information about a namespace.""" def __init__(self, name, linenum): _BlockInfo.__init__(self, False) self.name = name or '' self.starting_linenum = linenum def CheckEnd(self, filename, clean_lines, linenum, error): """Check end of namespace comments.""" line = clean_lines.raw_lines[linenum] # Check how many lines is enclosed in this namespace. Don't issue # warning for missing namespace comments if there aren't enough # lines. However, do apply checks if there is already an end of # namespace comment and it's incorrect. # # TODO(unknown): We always want to check end of namespace comments # if a namespace is large, but sometimes we also want to apply the # check if a short namespace contained nontrivial things (something # other than forward declarations). There is currently no logic on # deciding what these nontrivial things are, so this check is # triggered by namespace size only, which works most of the time. if (linenum - self.starting_linenum < 10 and not Match(r'};*\s*(//|/\*).*\bnamespace\b', line)): return # Look for matching comment at end of namespace. # # Note that we accept C style "/* */" comments for terminating # namespaces, so that code that terminate namespaces inside # preprocessor macros can be cpplint clean. Example: http://go/nxpiz # # We also accept stuff like "// end of namespace ." with the # period at the end. # # Besides these, we don't accept anything else, otherwise we might # get false negatives when existing comment is a substring of the # expected namespace. Example: http://go/ldkdc, http://cl/23548205 if self.name: # Named namespace if not Match((r'};*\s*(//|/\*).*\bnamespace\s+' + re.escape(self.name) + r'[\*/\.\\\s]*$'), line): error(filename, linenum, 'readability/namespace', 5, 'Namespace should be terminated with "// namespace %s"' % self.name) else: # Anonymous namespace if not Match(r'};*\s*(//|/\*).*\bnamespace[\*/\.\\\s]*$', line): error(filename, linenum, 'readability/namespace', 5, 'Namespace should be terminated with "// namespace"') class _PreprocessorInfo(object): """Stores checkpoints of nesting stacks when #if/#else is seen.""" def __init__(self, stack_before_if): # The entire nesting stack before #if self.stack_before_if = stack_before_if # The entire nesting stack up to #else self.stack_before_else = [] # Whether we have already seen #else or #elif self.seen_else = False class _NestingState(object): """Holds states related to parsing braces.""" def __init__(self): # Stack for tracking all braces. An object is pushed whenever we # see a "{", and popped when we see a "}". Only 3 types of # objects are possible: # - _ClassInfo: a class or struct. # - _NamespaceInfo: a namespace. # - _BlockInfo: some other type of block. self.stack = [] # Stack of _PreprocessorInfo objects. self.pp_stack = [] def SeenOpenBrace(self): """Check if we have seen the opening brace for the innermost block. Returns: True if we have seen the opening brace, False if the innermost block is still expecting an opening brace. """ return (not self.stack) or self.stack[-1].seen_open_brace def InNamespaceBody(self): """Check if we are currently one level inside a namespace body. Returns: True if top of the stack is a namespace block, False otherwise. """ return self.stack and isinstance(self.stack[-1], _NamespaceInfo) def UpdatePreprocessor(self, line): """Update preprocessor stack. We need to handle preprocessors due to classes like this: #ifdef SWIG struct ResultDetailsPageElementExtensionPoint { #else struct ResultDetailsPageElementExtensionPoint : public Extension { #endif (see http://go/qwddn for original example) We make the following assumptions (good enough for most files): - Preprocessor condition evaluates to true from #if up to first #else/#elif/#endif. - Preprocessor condition evaluates to false from #else/#elif up to #endif. We still perform lint checks on these lines, but these do not affect nesting stack. Args: line: current line to check. """ if Match(r'^\s*#\s*(if|ifdef|ifndef)\b', line): # Beginning of #if block, save the nesting stack here. The saved # stack will allow us to restore the parsing state in the #else case. self.pp_stack.append(_PreprocessorInfo(copy.deepcopy(self.stack))) elif Match(r'^\s*#\s*(else|elif)\b', line): # Beginning of #else block if self.pp_stack: if not self.pp_stack[-1].seen_else: # This is the first #else or #elif block. Remember the # whole nesting stack up to this point. This is what we # keep after the #endif. self.pp_stack[-1].seen_else = True self.pp_stack[-1].stack_before_else = copy.deepcopy(self.stack) # Restore the stack to how it was before the #if self.stack = copy.deepcopy(self.pp_stack[-1].stack_before_if) else: # TODO(unknown): unexpected #else, issue warning? pass elif Match(r'^\s*#\s*endif\b', line): # End of #if or #else blocks. if self.pp_stack: # If we saw an #else, we will need to restore the nesting # stack to its former state before the #else, otherwise we # will just continue from where we left off. if self.pp_stack[-1].seen_else: # Here we can just use a shallow copy since we are the last # reference to it. self.stack = self.pp_stack[-1].stack_before_else # Drop the corresponding #if self.pp_stack.pop() else: # TODO(unknown): unexpected #endif, issue warning? pass def Update(self, filename, clean_lines, linenum, error): """Update nesting state with current line. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. error: The function to call with any errors found. """ line = clean_lines.elided[linenum] # Update pp_stack first self.UpdatePreprocessor(line) # Count parentheses. This is to avoid adding struct arguments to # the nesting stack. if self.stack: inner_block = self.stack[-1] depth_change = line.count('(') - line.count(')') inner_block.open_parentheses += depth_change # Also check if we are starting or ending an inline assembly block. if inner_block.inline_asm in (_NO_ASM, _END_ASM): if (depth_change != 0 and inner_block.open_parentheses == 1 and _MATCH_ASM.match(line)): # Enter assembly block inner_block.inline_asm = _INSIDE_ASM else: # Not entering assembly block. If previous line was _END_ASM, # we will now shift to _NO_ASM state. inner_block.inline_asm = _NO_ASM elif (inner_block.inline_asm == _INSIDE_ASM and inner_block.open_parentheses == 0): # Exit assembly block inner_block.inline_asm = _END_ASM # Consume namespace declaration at the beginning of the line. Do # this in a loop so that we catch same line declarations like this: # namespace proto2 { namespace bridge { class MessageSet; } } while True: # Match start of namespace. The "\b\s*" below catches namespace # declarations even if it weren't followed by a whitespace, this # is so that we don't confuse our namespace checker. The # missing spaces will be flagged by CheckSpacing. namespace_decl_match = Match(r'^\s*namespace\b\s*([:\w]+)?(.*)$', line) if not namespace_decl_match: break new_namespace = _NamespaceInfo(namespace_decl_match.group(1), linenum) self.stack.append(new_namespace) line = namespace_decl_match.group(2) if line.find('{') != -1: new_namespace.seen_open_brace = True line = line[line.find('{') + 1:] # Look for a class declaration in whatever is left of the line # after parsing namespaces. The regexp accounts for decorated classes # such as in: # class LOCKABLE API Object { # }; # # Templates with class arguments may confuse the parser, for example: # template , # class Vector = vector > # class HeapQueue { # # Because this parser has no nesting state about templates, by the # time it saw "class Comparator", it may think that it's a new class. # Nested templates have a similar problem: # template < # typename ExportedType, # typename TupleType, # template class ImplTemplate> # # To avoid these cases, we ignore classes that are followed by '=' or '>' class_decl_match = Match( r'\s*(template\s*<[\w\s<>,:]*>\s*)?' '(class|struct)\s+([A-Z_]+\s+)*(\w+(?:::\w+)*)' '(([^=>]|<[^<>]*>)*)$', line) if (class_decl_match and (not self.stack or self.stack[-1].open_parentheses == 0)): self.stack.append(_ClassInfo( class_decl_match.group(4), class_decl_match.group(2), clean_lines, linenum)) line = class_decl_match.group(5) # If we have not yet seen the opening brace for the innermost block, # run checks here. if not self.SeenOpenBrace(): self.stack[-1].CheckBegin(filename, clean_lines, linenum, error) # Update access control if we are inside a class/struct if self.stack and isinstance(self.stack[-1], _ClassInfo): access_match = Match(r'\s*(public|private|protected)\s*:', line) if access_match: self.stack[-1].access = access_match.group(1) # Consume braces or semicolons from what's left of the line while True: # Match first brace, semicolon, or closed parenthesis. matched = Match(r'^[^{;)}]*([{;)}])(.*)$', line) if not matched: break token = matched.group(1) if token == '{': # If namespace or class hasn't seen a opening brace yet, mark # namespace/class head as complete. Push a new block onto the # stack otherwise. if not self.SeenOpenBrace(): self.stack[-1].seen_open_brace = True else: self.stack.append(_BlockInfo(True)) if _MATCH_ASM.match(line): self.stack[-1].inline_asm = _BLOCK_ASM elif token == ';' or token == ')': # If we haven't seen an opening brace yet, but we already saw # a semicolon, this is probably a forward declaration. Pop # the stack for these. # # Similarly, if we haven't seen an opening brace yet, but we # already saw a closing parenthesis, then these are probably # function arguments with extra "class" or "struct" keywords. # Also pop these stack for these. if not self.SeenOpenBrace(): self.stack.pop() else: # token == '}' # Perform end of block checks and pop the stack. if self.stack: self.stack[-1].CheckEnd(filename, clean_lines, linenum, error) self.stack.pop() line = matched.group(2) def InnermostClass(self): """Get class info on the top of the stack. Returns: A _ClassInfo object if we are inside a class, or None otherwise. """ for i in range(len(self.stack), 0, -1): classinfo = self.stack[i - 1] if isinstance(classinfo, _ClassInfo): return classinfo return None def CheckClassFinished(self, filename, error): """Checks that all classes have been completely parsed. Call this when all lines in a file have been processed. Args: filename: The name of the current file. error: The function to call with any errors found. """ # Note: This test can result in false positives if #ifdef constructs # get in the way of brace matching. See the testBuildClass test in # cpplint_unittest.py for an example of this. for obj in self.stack: if isinstance(obj, _ClassInfo): error(filename, obj.starting_linenum, 'build/class', 5, 'Failed to find complete declaration of class %s' % obj.name) def CheckForNonStandardConstructs(filename, clean_lines, linenum, nesting_state, error): """Logs an error if we see certain non-ANSI constructs ignored by gcc-2. Complain about several constructs which gcc-2 accepts, but which are not standard C++. Warning about these in lint is one way to ease the transition to new compilers. - put storage class first (e.g. "static const" instead of "const static"). - "%lld" instead of %qd" in printf-type functions. - "%1$d" is non-standard in printf-type functions. - "\%" is an undefined character escape sequence. - text after #endif is not allowed. - invalid inner-style forward declaration. - >? and ?= and )\?=?\s*(\w+|[+-]?\d+)(\.\d*)?', line): error(filename, linenum, 'build/deprecated', 3, '>? and ))?' # r'\s*const\s*' + type_name + '\s*&\s*\w+\s*;' error(filename, linenum, 'runtime/member_string_references', 2, 'const string& members are dangerous. It is much better to use ' 'alternatives, such as pointers or simple constants.') # Everything else in this function operates on class declarations. # Return early if the top of the nesting stack is not a class, or if # the class head is not completed yet. classinfo = nesting_state.InnermostClass() if not classinfo or not classinfo.seen_open_brace: return # The class may have been declared with namespace or classname qualifiers. # The constructor and destructor will not have those qualifiers. base_classname = classinfo.name.split('::')[-1] # Look for single-argument constructors that aren't marked explicit. # Technically a valid construct, but against style. args = Match(r'\s+(?:inline\s+)?%s\s*\(([^,()]+)\)' % re.escape(base_classname), line) if (args and args.group(1) != 'void' and not Match(r'(const\s+)?%s\s*(?:<\w+>\s*)?&' % re.escape(base_classname), args.group(1).strip())): error(filename, linenum, 'runtime/explicit', 5, 'Single-argument constructors should be marked explicit.') def CheckSpacingForFunctionCall(filename, line, linenum, error): """Checks for the correctness of various spacing around function calls. Args: filename: The name of the current file. line: The text of the line to check. linenum: The number of the line to check. error: The function to call with any errors found. """ # Since function calls often occur inside if/for/while/switch # expressions - which have their own, more liberal conventions - we # first see if we should be looking inside such an expression for a # function call, to which we can apply more strict standards. fncall = line # if there's no control flow construct, look at whole line for pattern in (r'\bif\s*\((.*)\)\s*{', r'\bfor\s*\((.*)\)\s*{', r'\bwhile\s*\((.*)\)\s*[{;]', r'\bswitch\s*\((.*)\)\s*{'): match = Search(pattern, line) if match: fncall = match.group(1) # look inside the parens for function calls break # Except in if/for/while/switch, there should never be space # immediately inside parens (eg "f( 3, 4 )"). We make an exception # for nested parens ( (a+b) + c ). Likewise, there should never be # a space before a ( when it's a function argument. I assume it's a # function argument when the char before the whitespace is legal in # a function name (alnum + _) and we're not starting a macro. Also ignore # pointers and references to arrays and functions coz they're too tricky: # we use a very simple way to recognize these: # " (something)(maybe-something)" or # " (something)(maybe-something," or # " (something)[something]" # Note that we assume the contents of [] to be short enough that # they'll never need to wrap. if ( # Ignore control structures. not Search(r'\b(if|for|while|switch|return|delete)\b', fncall) and # Ignore pointers/references to functions. not Search(r' \([^)]+\)\([^)]*(\)|,$)', fncall) and # Ignore pointers/references to arrays. not Search(r' \([^)]+\)\[[^\]]+\]', fncall)): if Search(r'\w\s*\(\s(?!\s*\\$)', fncall): # a ( used for a fn call error(filename, linenum, 'whitespace/parens', 4, 'Extra space after ( in function call') elif Search(r'\(\s+(?!(\s*\\)|\()', fncall): error(filename, linenum, 'whitespace/parens', 2, 'Extra space after (') if (Search(r'\w\s+\(', fncall) and not Search(r'#\s*define|typedef', fncall) and not Search(r'\w\s+\((\w+::)?\*\w+\)\(', fncall)): error(filename, linenum, 'whitespace/parens', 4, 'Extra space before ( in function call') # If the ) is followed only by a newline or a { + newline, assume it's # part of a control statement (if/while/etc), and don't complain if Search(r'[^)]\s+\)\s*[^{\s]', fncall): # If the closing parenthesis is preceded by only whitespaces, # try to give a more descriptive error message. if Search(r'^\s+\)', fncall): error(filename, linenum, 'whitespace/parens', 2, 'Closing ) should be moved to the previous line') else: error(filename, linenum, 'whitespace/parens', 2, 'Extra space before )') def IsBlankLine(line): """Returns true if the given line is blank. We consider a line to be blank if the line is empty or consists of only white spaces. Args: line: A line of a string. Returns: True, if the given line is blank. """ return not line or line.isspace() def CheckForFunctionLengths(filename, clean_lines, linenum, function_state, error): """Reports for long function bodies. For an overview why this is done, see: http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#Write_Short_Functions Uses a simplistic algorithm assuming other style guidelines (especially spacing) are followed. Only checks unindented functions, so class members are unchecked. Trivial bodies are unchecked, so constructors with huge initializer lists may be missed. Blank/comment lines are not counted so as to avoid encouraging the removal of vertical space and comments just to get through a lint check. NOLINT *on the last line of a function* disables this check. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. function_state: Current function name and lines in body so far. error: The function to call with any errors found. """ lines = clean_lines.lines line = lines[linenum] raw = clean_lines.raw_lines raw_line = raw[linenum] joined_line = '' starting_func = False regexp = r'(\w(\w|::|\*|\&|\s)*)\(' # decls * & space::name( ... match_result = Match(regexp, line) if match_result: # If the name is all caps and underscores, figure it's a macro and # ignore it, unless it's TEST or TEST_F. function_name = match_result.group(1).split()[-1] if function_name == 'TEST' or function_name == 'TEST_F' or ( not Match(r'[A-Z_]+$', function_name)): starting_func = True if starting_func: body_found = False for start_linenum in xrange(linenum, clean_lines.NumLines()): start_line = lines[start_linenum] joined_line += ' ' + start_line.lstrip() if Search(r'(;|})', start_line): # Declarations and trivial functions body_found = True break # ... ignore elif Search(r'{', start_line): body_found = True function = Search(r'((\w|:)*)\(', line).group(1) if Match(r'TEST', function): # Handle TEST... macros parameter_regexp = Search(r'(\(.*\))', joined_line) if parameter_regexp: # Ignore bad syntax function += parameter_regexp.group(1) else: function += '()' function_state.Begin(function) break if not body_found: # No body for the function (or evidence of a non-function) was found. error(filename, linenum, 'readability/fn_size', 5, 'Lint failed to find start of function body.') elif Match(r'^\}\s*$', line): # function end function_state.Check(error, filename, linenum) function_state.End() elif not Match(r'^\s*$', line): function_state.Count() # Count non-blank/non-comment lines. _RE_PATTERN_TODO = re.compile(r'^//(\s*)TODO(\(.+?\))?:?(\s|$)?') def CheckComment(comment, filename, linenum, error): """Checks for common mistakes in TODO comments. Args: comment: The text of the comment from the line in question. filename: The name of the current file. linenum: The number of the line to check. error: The function to call with any errors found. """ match = _RE_PATTERN_TODO.match(comment) if match: # One whitespace is correct; zero whitespace is handled elsewhere. leading_whitespace = match.group(1) if len(leading_whitespace) > 1: error(filename, linenum, 'whitespace/todo', 2, 'Too many spaces before TODO') username = match.group(2) if not username: error(filename, linenum, 'readability/todo', 2, 'Missing username in TODO; it should look like ' '"// TODO(my_username): Stuff."') middle_whitespace = match.group(3) # Comparisons made explicit for correctness -- pylint: disable-msg=C6403 if middle_whitespace != ' ' and middle_whitespace != '': error(filename, linenum, 'whitespace/todo', 2, 'TODO(my_username) should be followed by a space') def CheckAccess(filename, clean_lines, linenum, nesting_state, error): """Checks for improper use of DISALLOW* macros. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. nesting_state: A _NestingState instance which maintains information about the current stack of nested blocks being parsed. error: The function to call with any errors found. """ line = clean_lines.elided[linenum] # get rid of comments and strings matched = Match((r'\s*(DISALLOW_COPY_AND_ASSIGN|' r'DISALLOW_EVIL_CONSTRUCTORS|' r'DISALLOW_IMPLICIT_CONSTRUCTORS)'), line) if not matched: return if nesting_state.stack and isinstance(nesting_state.stack[-1], _ClassInfo): if nesting_state.stack[-1].access != 'private': error(filename, linenum, 'readability/constructors', 3, '%s must be in the private: section' % matched.group(1)) else: # Found DISALLOW* macro outside a class declaration, or perhaps it # was used inside a function when it should have been part of the # class declaration. We could issue a warning here, but it # probably resulted in a compiler error already. pass def FindNextMatchingAngleBracket(clean_lines, linenum, init_suffix): """Find the corresponding > to close a template. Args: clean_lines: A CleansedLines instance containing the file. linenum: Current line number. init_suffix: Remainder of the current line after the initial <. Returns: True if a matching bracket exists. """ line = init_suffix nesting_stack = ['<'] while True: # Find the next operator that can tell us whether < is used as an # opening bracket or as a less-than operator. We only want to # warn on the latter case. # # We could also check all other operators and terminate the search # early, e.g. if we got something like this "a(),;\[\]]*([<>(),;\[\]])(.*)$', line) if match: # Found an operator, update nesting stack operator = match.group(1) line = match.group(2) if nesting_stack[-1] == '<': # Expecting closing angle bracket if operator in ('<', '(', '['): nesting_stack.append(operator) elif operator == '>': nesting_stack.pop() if not nesting_stack: # Found matching angle bracket return True elif operator == ',': # Got a comma after a bracket, this is most likely a template # argument. We have not seen a closing angle bracket yet, but # it's probably a few lines later if we look for it, so just # return early here. return True else: # Got some other operator. return False else: # Expecting closing parenthesis or closing bracket if operator in ('<', '(', '['): nesting_stack.append(operator) elif operator in (')', ']'): # We don't bother checking for matching () or []. If we got # something like (] or [), it would have been a syntax error. nesting_stack.pop() else: # Scan the next line linenum += 1 if linenum >= len(clean_lines.elided): break line = clean_lines.elided[linenum] # Exhausted all remaining lines and still no matching angle bracket. # Most likely the input was incomplete, otherwise we should have # seen a semicolon and returned early. return True def FindPreviousMatchingAngleBracket(clean_lines, linenum, init_prefix): """Find the corresponding < that started a template. Args: clean_lines: A CleansedLines instance containing the file. linenum: Current line number. init_prefix: Part of the current line before the initial >. Returns: True if a matching bracket exists. """ line = init_prefix nesting_stack = ['>'] while True: # Find the previous operator match = Search(r'^(.*)([<>(),;\[\]])[^<>(),;\[\]]*$', line) if match: # Found an operator, update nesting stack operator = match.group(2) line = match.group(1) if nesting_stack[-1] == '>': # Expecting opening angle bracket if operator in ('>', ')', ']'): nesting_stack.append(operator) elif operator == '<': nesting_stack.pop() if not nesting_stack: # Found matching angle bracket return True elif operator == ',': # Got a comma before a bracket, this is most likely a # template argument. The opening angle bracket is probably # there if we look for it, so just return early here. return True else: # Got some other operator. return False else: # Expecting opening parenthesis or opening bracket if operator in ('>', ')', ']'): nesting_stack.append(operator) elif operator in ('(', '['): nesting_stack.pop() else: # Scan the previous line linenum -= 1 if linenum < 0: break line = clean_lines.elided[linenum] # Exhausted all earlier lines and still no matching angle bracket. return False def CheckSpacing(filename, clean_lines, linenum, nesting_state, error): """Checks for the correctness of various spacing issues in the code. Things we check for: spaces around operators, spaces after if/for/while/switch, no spaces around parens in function calls, two spaces between code and comment, don't start a block with a blank line, don't end a function with a blank line, don't add a blank line after public/protected/private, don't have too many blank lines in a row. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. nesting_state: A _NestingState instance which maintains information about the current stack of nested blocks being parsed. error: The function to call with any errors found. """ raw = clean_lines.raw_lines line = raw[linenum] # Before nixing comments, check if the line is blank for no good # reason. This includes the first line after a block is opened, and # blank lines at the end of a function (ie, right before a line like '}' # # Skip all the blank line checks if we are immediately inside a # namespace body. In other words, don't issue blank line warnings # for this block: # namespace { # # } # # A warning about missing end of namespace comments will be issued instead. if IsBlankLine(line) and not nesting_state.InNamespaceBody(): elided = clean_lines.elided prev_line = elided[linenum - 1] prevbrace = prev_line.rfind('{') # TODO(unknown): Don't complain if line before blank line, and line after, # both start with alnums and are indented the same amount. # This ignores whitespace at the start of a namespace block # because those are not usually indented. if prevbrace != -1 and prev_line[prevbrace:].find('}') == -1: # OK, we have a blank line at the start of a code block. Before we # complain, we check if it is an exception to the rule: The previous # non-empty line has the parameters of a function header that are indented # 4 spaces (because they did not fit in a 80 column line when placed on # the same line as the function name). We also check for the case where # the previous line is indented 6 spaces, which may happen when the # initializers of a constructor do not fit into a 80 column line. exception = False if Match(r' {6}\w', prev_line): # Initializer list? # We are looking for the opening column of initializer list, which # should be indented 4 spaces to cause 6 space indentation afterwards. search_position = linenum-2 while (search_position >= 0 and Match(r' {6}\w', elided[search_position])): search_position -= 1 exception = (search_position >= 0 and elided[search_position][:5] == ' :') else: # Search for the function arguments or an initializer list. We use a # simple heuristic here: If the line is indented 4 spaces; and we have a # closing paren, without the opening paren, followed by an opening brace # or colon (for initializer lists) we assume that it is the last line of # a function header. If we have a colon indented 4 spaces, it is an # initializer list. exception = (Match(r' {4}\w[^\(]*\)\s*(const\s*)?(\{\s*$|:)', prev_line) or Match(r' {4}:', prev_line)) if not exception: error(filename, linenum, 'whitespace/blank_line', 2, 'Blank line at the start of a code block. Is this needed?') # Ignore blank lines at the end of a block in a long if-else # chain, like this: # if (condition1) { # // Something followed by a blank line # # } else if (condition2) { # // Something else # } if linenum + 1 < clean_lines.NumLines(): next_line = raw[linenum + 1] if (next_line and Match(r'\s*}', next_line) and next_line.find('} else ') == -1): error(filename, linenum, 'whitespace/blank_line', 3, 'Blank line at the end of a code block. Is this needed?') matched = Match(r'\s*(public|protected|private):', prev_line) if matched: error(filename, linenum, 'whitespace/blank_line', 3, 'Do not leave a blank line after "%s:"' % matched.group(1)) # Next, we complain if there's a comment too near the text commentpos = line.find('//') if commentpos != -1: # Check if the // may be in quotes. If so, ignore it # Comparisons made explicit for clarity -- pylint: disable-msg=C6403 if (line.count('"', 0, commentpos) - line.count('\\"', 0, commentpos)) % 2 == 0: # not in quotes # Allow one space for new scopes, two spaces otherwise: if (not Match(r'^\s*{ //', line) and ((commentpos >= 1 and line[commentpos-1] not in string.whitespace) or (commentpos >= 2 and line[commentpos-2] not in string.whitespace))): error(filename, linenum, 'whitespace/comments', 2, 'At least two spaces is best between code and comments') # There should always be a space between the // and the comment commentend = commentpos + 2 if commentend < len(line) and not line[commentend] == ' ': # but some lines are exceptions -- e.g. if they're big # comment delimiters like: # //---------------------------------------------------------- # or are an empty C++ style Doxygen comment, like: # /// # or they begin with multiple slashes followed by a space: # //////// Header comment match = (Search(r'[=/-]{4,}\s*$', line[commentend:]) or Search(r'^/$', line[commentend:]) or Search(r'^/+ ', line[commentend:])) if not match: error(filename, linenum, 'whitespace/comments', 4, 'Should have a space between // and comment') CheckComment(line[commentpos:], filename, linenum, error) line = clean_lines.elided[linenum] # get rid of comments and strings # Don't try to do spacing checks for operator methods line = re.sub(r'operator(==|!=|<|<<|<=|>=|>>|>)\(', 'operator\(', line) # We allow no-spaces around = within an if: "if ( (a=Foo()) == 0 )". # Otherwise not. Note we only check for non-spaces on *both* sides; # sometimes people put non-spaces on one side when aligning ='s among # many lines (not that this is behavior that I approve of...) if Search(r'[\w.]=[\w.]', line) and not Search(r'\b(if|while) ', line): error(filename, linenum, 'whitespace/operators', 4, 'Missing spaces around =') # It's ok not to have spaces around binary operators like + - * /, but if # there's too little whitespace, we get concerned. It's hard to tell, # though, so we punt on this one for now. TODO. # You should always have whitespace around binary operators. # # Check <= and >= first to avoid false positives with < and >, then # check non-include lines for spacing around < and >. match = Search(r'[^<>=!\s](==|!=|<=|>=)[^<>=!\s]', line) if match: error(filename, linenum, 'whitespace/operators', 3, 'Missing spaces around %s' % match.group(1)) # We allow no-spaces around << when used like this: 10<<20, but # not otherwise (particularly, not when used as streams) match = Search(r'(\S)(?:L|UL|ULL|l|ul|ull)?<<(\S)', line) if match and not (match.group(1).isdigit() and match.group(2).isdigit()): error(filename, linenum, 'whitespace/operators', 3, 'Missing spaces around <<') elif not Match(r'#.*include', line): # Avoid false positives on -> reduced_line = line.replace('->', '') # Look for < that is not surrounded by spaces. This is only # triggered if both sides are missing spaces, even though # technically should should flag if at least one side is missing a # space. This is done to avoid some false positives with shifts. match = Search(r'[^\s<]<([^\s=<].*)', reduced_line) if (match and not FindNextMatchingAngleBracket(clean_lines, linenum, match.group(1))): error(filename, linenum, 'whitespace/operators', 3, 'Missing spaces around <') # Look for > that is not surrounded by spaces. Similar to the # above, we only trigger if both sides are missing spaces to avoid # false positives with shifts. match = Search(r'^(.*[^\s>])>[^\s=>]', reduced_line) if (match and not FindPreviousMatchingAngleBracket(clean_lines, linenum, match.group(1))): error(filename, linenum, 'whitespace/operators', 3, 'Missing spaces around >') # We allow no-spaces around >> for almost anything. This is because # C++11 allows ">>" to close nested templates, which accounts for # most cases when ">>" is not followed by a space. # # We still warn on ">>" followed by alpha character, because that is # likely due to ">>" being used for right shifts, e.g.: # value >> alpha # # When ">>" is used to close templates, the alphanumeric letter that # follows would be part of an identifier, and there should still be # a space separating the template type and the identifier. # type> alpha match = Search(r'>>[a-zA-Z_]', line) if match: error(filename, linenum, 'whitespace/operators', 3, 'Missing spaces around >>') # There shouldn't be space around unary operators match = Search(r'(!\s|~\s|[\s]--[\s;]|[\s]\+\+[\s;])', line) if match: error(filename, linenum, 'whitespace/operators', 4, 'Extra space for operator %s' % match.group(1)) # A pet peeve of mine: no spaces after an if, while, switch, or for match = Search(r' (if\(|for\(|while\(|switch\()', line) if match: error(filename, linenum, 'whitespace/parens', 5, 'Missing space before ( in %s' % match.group(1)) # For if/for/while/switch, the left and right parens should be # consistent about how many spaces are inside the parens, and # there should either be zero or one spaces inside the parens. # We don't want: "if ( foo)" or "if ( foo )". # Exception: "for ( ; foo; bar)" and "for (foo; bar; )" are allowed. match = Search(r'\b(if|for|while|switch)\s*' r'\(([ ]*)(.).*[^ ]+([ ]*)\)\s*{\s*$', line) if match: if len(match.group(2)) != len(match.group(4)): if not (match.group(3) == ';' and len(match.group(2)) == 1 + len(match.group(4)) or not match.group(2) and Search(r'\bfor\s*\(.*; \)', line)): error(filename, linenum, 'whitespace/parens', 5, 'Mismatching spaces inside () in %s' % match.group(1)) if not len(match.group(2)) in [0, 1]: error(filename, linenum, 'whitespace/parens', 5, 'Should have zero or one spaces inside ( and ) in %s' % match.group(1)) # You should always have a space after a comma (either as fn arg or operator) if Search(r',[^\s]', line): error(filename, linenum, 'whitespace/comma', 3, 'Missing space after ,') # You should always have a space after a semicolon # except for few corner cases # TODO(unknown): clarify if 'if (1) { return 1;}' is requires one more # space after ; if Search(r';[^\s};\\)/]', line): error(filename, linenum, 'whitespace/semicolon', 3, 'Missing space after ;') # Next we will look for issues with function calls. CheckSpacingForFunctionCall(filename, line, linenum, error) # Except after an opening paren, or after another opening brace (in case of # an initializer list, for instance), you should have spaces before your # braces. And since you should never have braces at the beginning of a line, # this is an easy test. if Search(r'[^ ({]{', line): error(filename, linenum, 'whitespace/braces', 5, 'Missing space before {') # Make sure '} else {' has spaces. if Search(r'}else', line): error(filename, linenum, 'whitespace/braces', 5, 'Missing space before else') # You shouldn't have spaces before your brackets, except maybe after # 'delete []' or 'new char * []'. if Search(r'\w\s+\[', line) and not Search(r'delete\s+\[', line): error(filename, linenum, 'whitespace/braces', 5, 'Extra space before [') # You shouldn't have a space before a semicolon at the end of the line. # There's a special case for "for" since the style guide allows space before # the semicolon there. if Search(r':\s*;\s*$', line): error(filename, linenum, 'whitespace/semicolon', 5, 'Semicolon defining empty statement. Use {} instead.') elif Search(r'^\s*;\s*$', line): error(filename, linenum, 'whitespace/semicolon', 5, 'Line contains only semicolon. If this should be an empty statement, ' 'use {} instead.') elif (Search(r'\s+;\s*$', line) and not Search(r'\bfor\b', line)): error(filename, linenum, 'whitespace/semicolon', 5, 'Extra space before last semicolon. If this should be an empty ' 'statement, use {} instead.') # In range-based for, we wanted spaces before and after the colon, but # not around "::" tokens that might appear. if (Search('for *\(.*[^:]:[^: ]', line) or Search('for *\(.*[^: ]:[^:]', line)): error(filename, linenum, 'whitespace/forcolon', 2, 'Missing space around colon in range-based for loop') def CheckSectionSpacing(filename, clean_lines, class_info, linenum, error): """Checks for additional blank line issues related to sections. Currently the only thing checked here is blank line before protected/private. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. class_info: A _ClassInfo objects. linenum: The number of the line to check. error: The function to call with any errors found. """ # Skip checks if the class is small, where small means 25 lines or less. # 25 lines seems like a good cutoff since that's the usual height of # terminals, and any class that can't fit in one screen can't really # be considered "small". # # Also skip checks if we are on the first line. This accounts for # classes that look like # class Foo { public: ... }; # # If we didn't find the end of the class, last_line would be zero, # and the check will be skipped by the first condition. if (class_info.last_line - class_info.starting_linenum <= 24 or linenum <= class_info.starting_linenum): return matched = Match(r'\s*(public|protected|private):', clean_lines.lines[linenum]) if matched: # Issue warning if the line before public/protected/private was # not a blank line, but don't do this if the previous line contains # "class" or "struct". This can happen two ways: # - We are at the beginning of the class. # - We are forward-declaring an inner class that is semantically # private, but needed to be public for implementation reasons. # Also ignores cases where the previous line ends with a backslash as can be # common when defining classes in C macros. prev_line = clean_lines.lines[linenum - 1] if (not IsBlankLine(prev_line) and not Search(r'\b(class|struct)\b', prev_line) and not Search(r'\\$', prev_line)): # Try a bit harder to find the beginning of the class. This is to # account for multi-line base-specifier lists, e.g.: # class Derived # : public Base { end_class_head = class_info.starting_linenum for i in range(class_info.starting_linenum, linenum): if Search(r'\{\s*$', clean_lines.lines[i]): end_class_head = i break if end_class_head < linenum - 1: error(filename, linenum, 'whitespace/blank_line', 3, '"%s:" should be preceded by a blank line' % matched.group(1)) def GetPreviousNonBlankLine(clean_lines, linenum): """Return the most recent non-blank line and its line number. Args: clean_lines: A CleansedLines instance containing the file contents. linenum: The number of the line to check. Returns: A tuple with two elements. The first element is the contents of the last non-blank line before the current line, or the empty string if this is the first non-blank line. The second is the line number of that line, or -1 if this is the first non-blank line. """ prevlinenum = linenum - 1 while prevlinenum >= 0: prevline = clean_lines.elided[prevlinenum] if not IsBlankLine(prevline): # if not a blank line... return (prevline, prevlinenum) prevlinenum -= 1 return ('', -1) def CheckBraces(filename, clean_lines, linenum, error): """Looks for misplaced braces (e.g. at the end of line). Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. error: The function to call with any errors found. """ line = clean_lines.elided[linenum] # get rid of comments and strings if Match(r'\s*{\s*$', line): # We allow an open brace to start a line in the case where someone # is using braces in a block to explicitly create a new scope, # which is commonly used to control the lifetime of # stack-allocated variables. We don't detect this perfectly: we # just don't complain if the last non-whitespace character on the # previous non-blank line is ';', ':', '{', or '}', or if the previous # line starts a preprocessor block. prevline = GetPreviousNonBlankLine(clean_lines, linenum)[0] if (not Search(r'[;:}{]\s*$', prevline) and not Match(r'\s*#', prevline)): error(filename, linenum, 'whitespace/braces', 4, '{ should almost always be at the end of the previous line') # An else clause should be on the same line as the preceding closing brace. if Match(r'\s*else\s*', line): prevline = GetPreviousNonBlankLine(clean_lines, linenum)[0] if Match(r'\s*}\s*$', prevline): error(filename, linenum, 'whitespace/newline', 4, 'An else should appear on the same line as the preceding }') # If braces come on one side of an else, they should be on both. # However, we have to worry about "else if" that spans multiple lines! if Search(r'}\s*else[^{]*$', line) or Match(r'[^}]*else\s*{', line): if Search(r'}\s*else if([^{]*)$', line): # could be multi-line if # find the ( after the if pos = line.find('else if') pos = line.find('(', pos) if pos > 0: (endline, _, endpos) = CloseExpression(clean_lines, linenum, pos) if endline[endpos:].find('{') == -1: # must be brace after if error(filename, linenum, 'readability/braces', 5, 'If an else has a brace on one side, it should have it on both') else: # common case: else not followed by a multi-line if error(filename, linenum, 'readability/braces', 5, 'If an else has a brace on one side, it should have it on both') # Likewise, an else should never have the else clause on the same line if Search(r'\belse [^\s{]', line) and not Search(r'\belse if\b', line): error(filename, linenum, 'whitespace/newline', 4, 'Else clause should never be on same line as else (use 2 lines)') # In the same way, a do/while should never be on one line if Match(r'\s*do [^\s{]', line): error(filename, linenum, 'whitespace/newline', 4, 'do/while clauses should not be on a single line') # Braces shouldn't be followed by a ; unless they're defining a struct # or initializing an array. # We can't tell in general, but we can for some common cases. prevlinenum = linenum while True: (prevline, prevlinenum) = GetPreviousNonBlankLine(clean_lines, prevlinenum) if Match(r'\s+{.*}\s*;', line) and not prevline.count(';'): line = prevline + line else: break if (Search(r'{.*}\s*;', line) and line.count('{') == line.count('}') and not Search(r'struct|class|enum|\s*=\s*{', line)): error(filename, linenum, 'readability/braces', 4, "You don't need a ; after a }") def CheckEmptyLoopBody(filename, clean_lines, linenum, error): """Loop for empty loop body with only a single semicolon. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. error: The function to call with any errors found. """ # Search for loop keywords at the beginning of the line. Because only # whitespaces are allowed before the keywords, this will also ignore most # do-while-loops, since those lines should start with closing brace. line = clean_lines.elided[linenum] if Match(r'\s*(for|while)\s*\(', line): # Find the end of the conditional expression (end_line, end_linenum, end_pos) = CloseExpression( clean_lines, linenum, line.find('(')) # Output warning if what follows the condition expression is a semicolon. # No warning for all other cases, including whitespace or newline, since we # have a separate check for semicolons preceded by whitespace. if end_pos >= 0 and Match(r';', end_line[end_pos:]): error(filename, end_linenum, 'whitespace/empty_loop_body', 5, 'Empty loop bodies should use {} or continue') def ReplaceableCheck(operator, macro, line): """Determine whether a basic CHECK can be replaced with a more specific one. For example suggest using CHECK_EQ instead of CHECK(a == b) and similarly for CHECK_GE, CHECK_GT, CHECK_LE, CHECK_LT, CHECK_NE. Args: operator: The C++ operator used in the CHECK. macro: The CHECK or EXPECT macro being called. line: The current source line. Returns: True if the CHECK can be replaced with a more specific one. """ # This matches decimal and hex integers, strings, and chars (in that order). match_constant = r'([-+]?(\d+|0[xX][0-9a-fA-F]+)[lLuU]{0,3}|".*"|\'.*\')' # Expression to match two sides of the operator with something that # looks like a literal, since CHECK(x == iterator) won't compile. # This means we can't catch all the cases where a more specific # CHECK is possible, but it's less annoying than dealing with # extraneous warnings. match_this = (r'\s*' + macro + r'\((\s*' + match_constant + r'\s*' + operator + r'[^<>].*|' r'.*[^<>]' + operator + r'\s*' + match_constant + r'\s*\))') # Don't complain about CHECK(x == NULL) or similar because # CHECK_EQ(x, NULL) won't compile (requires a cast). # Also, don't complain about more complex boolean expressions # involving && or || such as CHECK(a == b || c == d). return Match(match_this, line) and not Search(r'NULL|&&|\|\|', line) def CheckCheck(filename, clean_lines, linenum, error): """Checks the use of CHECK and EXPECT macros. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. error: The function to call with any errors found. """ # Decide the set of replacement macros that should be suggested raw_lines = clean_lines.raw_lines current_macro = '' for macro in _CHECK_MACROS: if raw_lines[linenum].find(macro) >= 0: current_macro = macro break if not current_macro: # Don't waste time here if line doesn't contain 'CHECK' or 'EXPECT' return line = clean_lines.elided[linenum] # get rid of comments and strings # Encourage replacing plain CHECKs with CHECK_EQ/CHECK_NE/etc. for operator in ['==', '!=', '>=', '>', '<=', '<']: if ReplaceableCheck(operator, current_macro, line): error(filename, linenum, 'readability/check', 2, 'Consider using %s instead of %s(a %s b)' % ( _CHECK_REPLACEMENT[current_macro][operator], current_macro, operator)) break def CheckAltTokens(filename, clean_lines, linenum, error): """Check alternative keywords being used in boolean expressions. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. error: The function to call with any errors found. """ line = clean_lines.elided[linenum] # Avoid preprocessor lines if Match(r'^\s*#', line): return # Last ditch effort to avoid multi-line comments. This will not help # if the comment started before the current line or ended after the # current line, but it catches most of the false positives. At least, # it provides a way to workaround this warning for people who use # multi-line comments in preprocessor macros. # # TODO(unknown): remove this once cpplint has better support for # multi-line comments. if line.find('/*') >= 0 or line.find('*/') >= 0: return for match in _ALT_TOKEN_REPLACEMENT_PATTERN.finditer(line): error(filename, linenum, 'readability/alt_tokens', 2, 'Use operator %s instead of %s' % ( _ALT_TOKEN_REPLACEMENT[match.group(1)], match.group(1))) def GetLineWidth(line): """Determines the width of the line in column positions. Args: line: A string, which may be a Unicode string. Returns: The width of the line in column positions, accounting for Unicode combining characters and wide characters. """ if isinstance(line, unicode): width = 0 for uc in unicodedata.normalize('NFC', line): if unicodedata.east_asian_width(uc) in ('W', 'F'): width += 2 elif not unicodedata.combining(uc): width += 1 return width else: return len(line) def CheckStyle(filename, clean_lines, linenum, file_extension, nesting_state, error): """Checks rules from the 'C++ style rules' section of cppguide.html. Most of these rules are hard to test (naming, comment style), but we do what we can. In particular we check for 2-space indents, line lengths, tab usage, spaces inside code, etc. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. file_extension: The extension (without the dot) of the filename. nesting_state: A _NestingState instance which maintains information about the current stack of nested blocks being parsed. error: The function to call with any errors found. """ raw_lines = clean_lines.raw_lines line = raw_lines[linenum] if line.find('\t') != -1: error(filename, linenum, 'whitespace/tab', 1, 'Tab found; better to use spaces') # One or three blank spaces at the beginning of the line is weird; it's # hard to reconcile that with 2-space indents. # NOTE: here are the conditions rob pike used for his tests. Mine aren't # as sophisticated, but it may be worth becoming so: RLENGTH==initial_spaces # if(RLENGTH > 20) complain = 0; # if(match($0, " +(error|private|public|protected):")) complain = 0; # if(match(prev, "&& *$")) complain = 0; # if(match(prev, "\\|\\| *$")) complain = 0; # if(match(prev, "[\",=><] *$")) complain = 0; # if(match($0, " <<")) complain = 0; # if(match(prev, " +for \\(")) complain = 0; # if(prevodd && match(prevprev, " +for \\(")) complain = 0; initial_spaces = 0 cleansed_line = clean_lines.elided[linenum] while initial_spaces < len(line) and line[initial_spaces] == ' ': initial_spaces += 1 if line and line[-1].isspace(): error(filename, linenum, 'whitespace/end_of_line', 4, 'Line ends in whitespace. Consider deleting these extra spaces.') # There are certain situations we allow one space, notably for labels elif ((initial_spaces == 1 or initial_spaces == 3) and not Match(r'\s*\w+\s*:\s*$', cleansed_line)): error(filename, linenum, 'whitespace/indent', 3, 'Weird number of spaces at line-start. ' 'Are you using a 2-space indent?') # Labels should always be indented at least one space. elif not initial_spaces and line[:2] != '//' and Search(r'[^:]:\s*$', line): error(filename, linenum, 'whitespace/labels', 4, 'Labels should always be indented at least one space. ' 'If this is a member-initializer list in a constructor or ' 'the base class list in a class definition, the colon should ' 'be on the following line.') # Check if the line is a header guard. is_header_guard = False if file_extension == 'h': cppvar = GetHeaderGuardCPPVariable(filename) if (line.startswith('#ifndef %s' % cppvar) or line.startswith('#define %s' % cppvar) or line.startswith('#endif // %s' % cppvar)): is_header_guard = True # #include lines and header guards can be long, since there's no clean way to # split them. # # URLs can be long too. It's possible to split these, but it makes them # harder to cut&paste. # # The "$Id:...$" comment may also get very long without it being the # developers fault. if (not line.startswith('#include') and not is_header_guard and not Match(r'^\s*//.*http(s?)://\S*$', line) and not Match(r'^// \$Id:.*#[0-9]+ \$$', line)): line_width = GetLineWidth(line) if line_width > 100: error(filename, linenum, 'whitespace/line_length', 4, 'Lines should very rarely be longer than 100 characters') elif line_width > 80: error(filename, linenum, 'whitespace/line_length', 2, 'Lines should be <= 80 characters long') if (cleansed_line.count(';') > 1 and # for loops are allowed two ;'s (and may run over two lines). cleansed_line.find('for') == -1 and (GetPreviousNonBlankLine(clean_lines, linenum)[0].find('for') == -1 or GetPreviousNonBlankLine(clean_lines, linenum)[0].find(';') != -1) and # It's ok to have many commands in a switch case that fits in 1 line not ((cleansed_line.find('case ') != -1 or cleansed_line.find('default:') != -1) and cleansed_line.find('break;') != -1)): error(filename, linenum, 'whitespace/newline', 0, 'More than one command on the same line') # Some more style checks CheckBraces(filename, clean_lines, linenum, error) CheckEmptyLoopBody(filename, clean_lines, linenum, error) CheckAccess(filename, clean_lines, linenum, nesting_state, error) CheckSpacing(filename, clean_lines, linenum, nesting_state, error) CheckCheck(filename, clean_lines, linenum, error) CheckAltTokens(filename, clean_lines, linenum, error) classinfo = nesting_state.InnermostClass() if classinfo: CheckSectionSpacing(filename, clean_lines, classinfo, linenum, error) _RE_PATTERN_INCLUDE_NEW_STYLE = re.compile(r'#include +"[^/]+\.h"') _RE_PATTERN_INCLUDE = re.compile(r'^\s*#\s*include\s*([<"])([^>"]*)[>"].*$') # Matches the first component of a filename delimited by -s and _s. That is: # _RE_FIRST_COMPONENT.match('foo').group(0) == 'foo' # _RE_FIRST_COMPONENT.match('foo.cc').group(0) == 'foo' # _RE_FIRST_COMPONENT.match('foo-bar_baz.cc').group(0) == 'foo' # _RE_FIRST_COMPONENT.match('foo_bar-baz.cc').group(0) == 'foo' _RE_FIRST_COMPONENT = re.compile(r'^[^-_.]+') def _DropCommonSuffixes(filename): """Drops common suffixes like _test.cc or -inl.h from filename. For example: >>> _DropCommonSuffixes('foo/foo-inl.h') 'foo/foo' >>> _DropCommonSuffixes('foo/bar/foo.cc') 'foo/bar/foo' >>> _DropCommonSuffixes('foo/foo_internal.h') 'foo/foo' >>> _DropCommonSuffixes('foo/foo_unusualinternal.h') 'foo/foo_unusualinternal' Args: filename: The input filename. Returns: The filename with the common suffix removed. """ for suffix in ('test.cc', 'regtest.cc', 'unittest.cc', 'inl.h', 'impl.h', 'internal.h'): if (filename.endswith(suffix) and len(filename) > len(suffix) and filename[-len(suffix) - 1] in ('-', '_')): return filename[:-len(suffix) - 1] return os.path.splitext(filename)[0] def _IsTestFilename(filename): """Determines if the given filename has a suffix that identifies it as a test. Args: filename: The input filename. Returns: True if 'filename' looks like a test, False otherwise. """ if (filename.endswith('_test.cc') or filename.endswith('_unittest.cc') or filename.endswith('_regtest.cc')): return True else: return False def _ClassifyInclude(fileinfo, include, is_system): """Figures out what kind of header 'include' is. Args: fileinfo: The current file cpplint is running over. A FileInfo instance. include: The path to a #included file. is_system: True if the #include used <> rather than "". Returns: One of the _XXX_HEADER constants. For example: >>> _ClassifyInclude(FileInfo('foo/foo.cc'), 'stdio.h', True) _C_SYS_HEADER >>> _ClassifyInclude(FileInfo('foo/foo.cc'), 'string', True) _CPP_SYS_HEADER >>> _ClassifyInclude(FileInfo('foo/foo.cc'), 'foo/foo.h', False) _LIKELY_MY_HEADER >>> _ClassifyInclude(FileInfo('foo/foo_unknown_extension.cc'), ... 'bar/foo_other_ext.h', False) _POSSIBLE_MY_HEADER >>> _ClassifyInclude(FileInfo('foo/foo.cc'), 'foo/bar.h', False) _OTHER_HEADER """ # This is a list of all standard c++ header files, except # those already checked for above. is_stl_h = include in _STL_HEADERS is_cpp_h = is_stl_h or include in _CPP_HEADERS if is_system: if is_cpp_h: return _CPP_SYS_HEADER else: return _C_SYS_HEADER # If the target file and the include we're checking share a # basename when we drop common extensions, and the include # lives in . , then it's likely to be owned by the target file. target_dir, target_base = ( os.path.split(_DropCommonSuffixes(fileinfo.RepositoryName()))) include_dir, include_base = os.path.split(_DropCommonSuffixes(include)) if target_base == include_base and ( include_dir == target_dir or include_dir == os.path.normpath(target_dir + '/../public')): return _LIKELY_MY_HEADER # If the target and include share some initial basename # component, it's possible the target is implementing the # include, so it's allowed to be first, but we'll never # complain if it's not there. target_first_component = _RE_FIRST_COMPONENT.match(target_base) include_first_component = _RE_FIRST_COMPONENT.match(include_base) if (target_first_component and include_first_component and target_first_component.group(0) == include_first_component.group(0)): return _POSSIBLE_MY_HEADER return _OTHER_HEADER def CheckIncludeLine(filename, clean_lines, linenum, include_state, error): """Check rules that are applicable to #include lines. Strings on #include lines are NOT removed from elided line, to make certain tasks easier. However, to prevent false positives, checks applicable to #include lines in CheckLanguage must be put here. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. include_state: An _IncludeState instance in which the headers are inserted. error: The function to call with any errors found. """ fileinfo = FileInfo(filename) line = clean_lines.lines[linenum] # "include" should use the new style "foo/bar.h" instead of just "bar.h" if _RE_PATTERN_INCLUDE_NEW_STYLE.search(line): error(filename, linenum, 'build/include', 4, 'Include the directory when naming .h files') # we shouldn't include a file more than once. actually, there are a # handful of instances where doing so is okay, but in general it's # not. match = _RE_PATTERN_INCLUDE.search(line) if match: include = match.group(2) is_system = (match.group(1) == '<') if include in include_state: error(filename, linenum, 'build/include', 4, '"%s" already included at %s:%s' % (include, filename, include_state[include])) else: include_state[include] = linenum # We want to ensure that headers appear in the right order: # 1) for foo.cc, foo.h (preferred location) # 2) c system files # 3) cpp system files # 4) for foo.cc, foo.h (deprecated location) # 5) other google headers # # We classify each include statement as one of those 5 types # using a number of techniques. The include_state object keeps # track of the highest type seen, and complains if we see a # lower type after that. error_message = include_state.CheckNextIncludeOrder( _ClassifyInclude(fileinfo, include, is_system)) if error_message: error(filename, linenum, 'build/include_order', 4, '%s. Should be: %s.h, c system, c++ system, other.' % (error_message, fileinfo.BaseName())) if not include_state.IsInAlphabeticalOrder(include): error(filename, linenum, 'build/include_alpha', 4, 'Include "%s" not in alphabetical order' % include) # Look for any of the stream classes that are part of standard C++. match = _RE_PATTERN_INCLUDE.match(line) if match: include = match.group(2) if Match(r'(f|ind|io|i|o|parse|pf|stdio|str|)?stream$', include): # Many unit tests use cout, so we exempt them. if not _IsTestFilename(filename): error(filename, linenum, 'readability/streams', 3, 'Streams are highly discouraged.') def _GetTextInside(text, start_pattern): """Retrieves all the text between matching open and close parentheses. Given a string of lines and a regular expression string, retrieve all the text following the expression and between opening punctuation symbols like (, [, or {, and the matching close-punctuation symbol. This properly nested occurrences of the punctuations, so for the text like printf(a(), b(c())); a call to _GetTextInside(text, r'printf\(') will return 'a(), b(c())'. start_pattern must match string having an open punctuation symbol at the end. Args: text: The lines to extract text. Its comments and strings must be elided. It can be single line and can span multiple lines. start_pattern: The regexp string indicating where to start extracting the text. Returns: The extracted text. None if either the opening string or ending punctuation could not be found. """ # TODO(sugawarayu): Audit cpplint.py to see what places could be profitably # rewritten to use _GetTextInside (and use inferior regexp matching today). # Give opening punctuations to get the matching close-punctuations. matching_punctuation = {'(': ')', '{': '}', '[': ']'} closing_punctuation = set(matching_punctuation.itervalues()) # Find the position to start extracting text. match = re.search(start_pattern, text, re.M) if not match: # start_pattern not found in text. return None start_position = match.end(0) assert start_position > 0, ( 'start_pattern must ends with an opening punctuation.') assert text[start_position - 1] in matching_punctuation, ( 'start_pattern must ends with an opening punctuation.') # Stack of closing punctuations we expect to have in text after position. punctuation_stack = [matching_punctuation[text[start_position - 1]]] position = start_position while punctuation_stack and position < len(text): if text[position] == punctuation_stack[-1]: punctuation_stack.pop() elif text[position] in closing_punctuation: # A closing punctuation without matching opening punctuations. return None elif text[position] in matching_punctuation: punctuation_stack.append(matching_punctuation[text[position]]) position += 1 if punctuation_stack: # Opening punctuations left without matching close-punctuations. return None # punctuations match. return text[start_position:position - 1] def CheckLanguage(filename, clean_lines, linenum, file_extension, include_state, error): """Checks rules from the 'C++ language rules' section of cppguide.html. Some of these rules are hard to test (function overloading, using uint32 inappropriately), but we do the best we can. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. file_extension: The extension (without the dot) of the filename. include_state: An _IncludeState instance in which the headers are inserted. error: The function to call with any errors found. """ # If the line is empty or consists of entirely a comment, no need to # check it. line = clean_lines.elided[linenum] if not line: return match = _RE_PATTERN_INCLUDE.search(line) if match: CheckIncludeLine(filename, clean_lines, linenum, include_state, error) return # Create an extended_line, which is the concatenation of the current and # next lines, for more effective checking of code that may span more than one # line. if linenum + 1 < clean_lines.NumLines(): extended_line = line + clean_lines.elided[linenum + 1] else: extended_line = line # Make Windows paths like Unix. fullname = os.path.abspath(filename).replace('\\', '/') # TODO(unknown): figure out if they're using default arguments in fn proto. # Check for non-const references in functions. This is tricky because & # is also used to take the address of something. We allow <> for templates, # (ignoring whatever is between the braces) and : for classes. # These are complicated re's. They try to capture the following: # paren (for fn-prototype start), typename, &, varname. For the const # version, we're willing for const to be before typename or after # Don't check the implementation on same line. fnline = line.split('{', 1)[0] if (len(re.findall(r'\([^()]*\b(?:[\w:]|<[^()]*>)+(\s?&|&\s?)\w+', fnline)) > len(re.findall(r'\([^()]*\bconst\s+(?:typename\s+)?(?:struct\s+)?' r'(?:[\w:]|<[^()]*>)+(\s?&|&\s?)\w+', fnline)) + len(re.findall(r'\([^()]*\b(?:[\w:]|<[^()]*>)+\s+const(\s?&|&\s?)[\w]+', fnline))): # We allow non-const references in a few standard places, like functions # called "swap()" or iostream operators like "<<" or ">>". We also filter # out for loops, which lint otherwise mistakenly thinks are functions. if not Search( r'(for|swap|Swap|operator[<>][<>])\s*\(\s*' r'(?:(?:typename\s*)?[\w:]|<.*>)+\s*&', fnline): error(filename, linenum, 'runtime/references', 2, 'Is this a non-const reference? ' 'If so, make const or use a pointer.') # Check to see if they're using an conversion function cast. # I just try to capture the most common basic types, though there are more. # Parameterless conversion functions, such as bool(), are allowed as they are # probably a member operator declaration or default constructor. match = Search( r'(\bnew\s+)?\b' # Grab 'new' operator, if it's there r'(int|float|double|bool|char|int32|uint32|int64|uint64)\([^)]', line) if match: # gMock methods are defined using some variant of MOCK_METHODx(name, type) # where type may be float(), int(string), etc. Without context they are # virtually indistinguishable from int(x) casts. Likewise, gMock's # MockCallback takes a template parameter of the form return_type(arg_type), # which looks much like the cast we're trying to detect. if (match.group(1) is None and # If new operator, then this isn't a cast not (Match(r'^\s*MOCK_(CONST_)?METHOD\d+(_T)?\(', line) or Match(r'^\s*MockCallback<.*>', line))): # Try a bit harder to catch gmock lines: the only place where # something looks like an old-style cast is where we declare the # return type of the mocked method, and the only time when we # are missing context is if MOCK_METHOD was split across # multiple lines (for example http://go/hrfhr ), so we only need # to check the previous line for MOCK_METHOD. if (linenum == 0 or not Match(r'^\s*MOCK_(CONST_)?METHOD\d+(_T)?\(\S+,\s*$', clean_lines.elided[linenum - 1])): error(filename, linenum, 'readability/casting', 4, 'Using deprecated casting style. ' 'Use static_cast<%s>(...) instead' % match.group(2)) CheckCStyleCast(filename, linenum, line, clean_lines.raw_lines[linenum], 'static_cast', r'\((int|float|double|bool|char|u?int(16|32|64))\)', error) # This doesn't catch all cases. Consider (const char * const)"hello". # # (char *) "foo" should always be a const_cast (reinterpret_cast won't # compile). if CheckCStyleCast(filename, linenum, line, clean_lines.raw_lines[linenum], 'const_cast', r'\((char\s?\*+\s?)\)\s*"', error): pass else: # Check pointer casts for other than string constants CheckCStyleCast(filename, linenum, line, clean_lines.raw_lines[linenum], 'reinterpret_cast', r'\((\w+\s?\*+\s?)\)', error) # In addition, we look for people taking the address of a cast. This # is dangerous -- casts can assign to temporaries, so the pointer doesn't # point where you think. if Search( r'(&\([^)]+\)[\w(])|(&(static|dynamic|reinterpret)_cast\b)', line): error(filename, linenum, 'runtime/casting', 4, ('Are you taking an address of a cast? ' 'This is dangerous: could be a temp var. ' 'Take the address before doing the cast, rather than after')) # Check for people declaring static/global STL strings at the top level. # This is dangerous because the C++ language does not guarantee that # globals with constructors are initialized before the first access. match = Match( r'((?:|static +)(?:|const +))string +([a-zA-Z0-9_:]+)\b(.*)', line) # Make sure it's not a function. # Function template specialization looks like: "string foo(...". # Class template definitions look like: "string Foo::Method(...". if match and not Match(r'\s*(<.*>)?(::[a-zA-Z0-9_]+)?\s*\(([^"]|$)', match.group(3)): error(filename, linenum, 'runtime/string', 4, 'For a static/global string constant, use a C style string instead: ' '"%schar %s[]".' % (match.group(1), match.group(2))) # Check that we're not using RTTI outside of testing code. if Search(r'\bdynamic_cast<', line) and not _IsTestFilename(filename): error(filename, linenum, 'runtime/rtti', 5, 'Do not use dynamic_cast<>. If you need to cast within a class ' "hierarchy, use static_cast<> to upcast. Google doesn't support " 'RTTI.') if Search(r'\b([A-Za-z0-9_]*_)\(\1\)', line): error(filename, linenum, 'runtime/init', 4, 'You seem to be initializing a member variable with itself.') if file_extension == 'h': # TODO(unknown): check that 1-arg constructors are explicit. # How to tell it's a constructor? # (handled in CheckForNonStandardConstructs for now) # TODO(unknown): check that classes have DISALLOW_EVIL_CONSTRUCTORS # (level 1 error) pass # Check if people are using the verboten C basic types. The only exception # we regularly allow is "unsigned short port" for port. if Search(r'\bshort port\b', line): if not Search(r'\bunsigned short port\b', line): error(filename, linenum, 'runtime/int', 4, 'Use "unsigned short" for ports, not "short"') else: match = Search(r'\b(short|long(?! +double)|long long)\b', line) if match: error(filename, linenum, 'runtime/int', 4, 'Use int16/int64/etc, rather than the C type %s' % match.group(1)) # When snprintf is used, the second argument shouldn't be a literal. match = Search(r'snprintf\s*\(([^,]*),\s*([0-9]*)\s*,', line) if match and match.group(2) != '0': # If 2nd arg is zero, snprintf is used to calculate size. error(filename, linenum, 'runtime/printf', 3, 'If you can, use sizeof(%s) instead of %s as the 2nd arg ' 'to snprintf.' % (match.group(1), match.group(2))) # Check if some verboten C functions are being used. if Search(r'\bsprintf\b', line): error(filename, linenum, 'runtime/printf', 5, 'Never use sprintf. Use snprintf instead.') match = Search(r'\b(strcpy|strcat)\b', line) if match: error(filename, linenum, 'runtime/printf', 4, 'Almost always, snprintf is better than %s' % match.group(1)) if Search(r'\bsscanf\b', line): error(filename, linenum, 'runtime/printf', 1, 'sscanf can be ok, but is slow and can overflow buffers.') # Check if some verboten operator overloading is going on # TODO(unknown): catch out-of-line unary operator&: # class X {}; # int operator&(const X& x) { return 42; } // unary operator& # The trick is it's hard to tell apart from binary operator&: # class Y { int operator&(const Y& x) { return 23; } }; // binary operator& if Search(r'\boperator\s*&\s*\(\s*\)', line): error(filename, linenum, 'runtime/operator', 4, 'Unary operator& is dangerous. Do not use it.') # Check for suspicious usage of "if" like # } if (a == b) { if Search(r'\}\s*if\s*\(', line): error(filename, linenum, 'readability/braces', 4, 'Did you mean "else if"? If not, start a new line for "if".') # Check for potential format string bugs like printf(foo). # We constrain the pattern not to pick things like DocidForPrintf(foo). # Not perfect but it can catch printf(foo.c_str()) and printf(foo->c_str()) # TODO(sugawarayu): Catch the following case. Need to change the calling # convention of the whole function to process multiple line to handle it. # printf( # boy_this_is_a_really_long_variable_that_cannot_fit_on_the_prev_line); printf_args = _GetTextInside(line, r'(?i)\b(string)?printf\s*\(') if printf_args: match = Match(r'([\w.\->()]+)$', printf_args) if match and match.group(1) != '__VA_ARGS__': function_name = re.search(r'\b((?:string)?printf)\s*\(', line, re.I).group(1) error(filename, linenum, 'runtime/printf', 4, 'Potential format string bug. Do %s("%%s", %s) instead.' % (function_name, match.group(1))) # Check for potential memset bugs like memset(buf, sizeof(buf), 0). match = Search(r'memset\s*\(([^,]*),\s*([^,]*),\s*0\s*\)', line) if match and not Match(r"^''|-?[0-9]+|0x[0-9A-Fa-f]$", match.group(2)): error(filename, linenum, 'runtime/memset', 4, 'Did you mean "memset(%s, 0, %s)"?' % (match.group(1), match.group(2))) if Search(r'\busing namespace\b', line): error(filename, linenum, 'build/namespaces', 5, 'Do not use namespace using-directives. ' 'Use using-declarations instead.') # Detect variable-length arrays. match = Match(r'\s*(.+::)?(\w+) [a-z]\w*\[(.+)];', line) if (match and match.group(2) != 'return' and match.group(2) != 'delete' and match.group(3).find(']') == -1): # Split the size using space and arithmetic operators as delimiters. # If any of the resulting tokens are not compile time constants then # report the error. tokens = re.split(r'\s|\+|\-|\*|\/|<<|>>]', match.group(3)) is_const = True skip_next = False for tok in tokens: if skip_next: skip_next = False continue if Search(r'sizeof\(.+\)', tok): continue if Search(r'arraysize\(\w+\)', tok): continue tok = tok.lstrip('(') tok = tok.rstrip(')') if not tok: continue if Match(r'\d+', tok): continue if Match(r'0[xX][0-9a-fA-F]+', tok): continue if Match(r'k[A-Z0-9]\w*', tok): continue if Match(r'(.+::)?k[A-Z0-9]\w*', tok): continue if Match(r'(.+::)?[A-Z][A-Z0-9_]*', tok): continue # A catch all for tricky sizeof cases, including 'sizeof expression', # 'sizeof(*type)', 'sizeof(const type)', 'sizeof(struct StructName)' # requires skipping the next token because we split on ' ' and '*'. if tok.startswith('sizeof'): skip_next = True continue is_const = False break if not is_const: error(filename, linenum, 'runtime/arrays', 1, 'Do not use variable-length arrays. Use an appropriately named ' "('k' followed by CamelCase) compile-time constant for the size.") # If DISALLOW_EVIL_CONSTRUCTORS, DISALLOW_COPY_AND_ASSIGN, or # DISALLOW_IMPLICIT_CONSTRUCTORS is present, then it should be the last thing # in the class declaration. match = Match( (r'\s*' r'(DISALLOW_(EVIL_CONSTRUCTORS|COPY_AND_ASSIGN|IMPLICIT_CONSTRUCTORS))' r'\(.*\);$'), line) if match and linenum + 1 < clean_lines.NumLines(): next_line = clean_lines.elided[linenum + 1] # We allow some, but not all, declarations of variables to be present # in the statement that defines the class. The [\w\*,\s]* fragment of # the regular expression below allows users to declare instances of # the class or pointers to instances, but not less common types such # as function pointers or arrays. It's a tradeoff between allowing # reasonable code and avoiding trying to parse more C++ using regexps. if not Search(r'^\s*}[\w\*,\s]*;', next_line): error(filename, linenum, 'readability/constructors', 3, match.group(1) + ' should be the last thing in the class') # Check for use of unnamed namespaces in header files. Registration # macros are typically OK, so we allow use of "namespace {" on lines # that end with backslashes. if (file_extension == 'h' and Search(r'\bnamespace\s*{', line) and line[-1] != '\\'): error(filename, linenum, 'build/namespaces', 4, 'Do not use unnamed namespaces in header files. See ' 'http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#Namespaces' ' for more information.') def CheckCStyleCast(filename, linenum, line, raw_line, cast_type, pattern, error): """Checks for a C-style cast by looking for the pattern. This also handles sizeof(type) warnings, due to similarity of content. Args: filename: The name of the current file. linenum: The number of the line to check. line: The line of code to check. raw_line: The raw line of code to check, with comments. cast_type: The string for the C++ cast to recommend. This is either reinterpret_cast, static_cast, or const_cast, depending. pattern: The regular expression used to find C-style casts. error: The function to call with any errors found. Returns: True if an error was emitted. False otherwise. """ match = Search(pattern, line) if not match: return False # e.g., sizeof(int) sizeof_match = Match(r'.*sizeof\s*$', line[0:match.start(1) - 1]) if sizeof_match: error(filename, linenum, 'runtime/sizeof', 1, 'Using sizeof(type). Use sizeof(varname) instead if possible') return True # operator++(int) and operator--(int) if (line[0:match.start(1) - 1].endswith(' operator++') or line[0:match.start(1) - 1].endswith(' operator--')): return False remainder = line[match.end(0):] # The close paren is for function pointers as arguments to a function. # eg, void foo(void (*bar)(int)); # The semicolon check is a more basic function check; also possibly a # function pointer typedef. # eg, void foo(int); or void foo(int) const; # The equals check is for function pointer assignment. # eg, void *(*foo)(int) = ... # The > is for MockCallback<...> ... # # Right now, this will only catch cases where there's a single argument, and # it's unnamed. It should probably be expanded to check for multiple # arguments with some unnamed. function_match = Match(r'\s*(\)|=|(const)?\s*(;|\{|throw\(\)|>))', remainder) if function_match: if (not function_match.group(3) or function_match.group(3) == ';' or ('MockCallback<' not in raw_line and '/*' not in raw_line)): error(filename, linenum, 'readability/function', 3, 'All parameters should be named in a function') return True # At this point, all that should be left is actual casts. error(filename, linenum, 'readability/casting', 4, 'Using C-style cast. Use %s<%s>(...) instead' % (cast_type, match.group(1))) return True _HEADERS_CONTAINING_TEMPLATES = ( ('', ('deque',)), ('', ('unary_function', 'binary_function', 'plus', 'minus', 'multiplies', 'divides', 'modulus', 'negate', 'equal_to', 'not_equal_to', 'greater', 'less', 'greater_equal', 'less_equal', 'logical_and', 'logical_or', 'logical_not', 'unary_negate', 'not1', 'binary_negate', 'not2', 'bind1st', 'bind2nd', 'pointer_to_unary_function', 'pointer_to_binary_function', 'ptr_fun', 'mem_fun_t', 'mem_fun', 'mem_fun1_t', 'mem_fun1_ref_t', 'mem_fun_ref_t', 'const_mem_fun_t', 'const_mem_fun1_t', 'const_mem_fun_ref_t', 'const_mem_fun1_ref_t', 'mem_fun_ref', )), ('', ('numeric_limits',)), ('', ('list',)), ('', ('map', 'multimap',)), ('', ('allocator',)), ('', ('queue', 'priority_queue',)), ('', ('set', 'multiset',)), ('', ('stack',)), ('', ('char_traits', 'basic_string',)), ('', ('pair',)), ('', ('vector',)), # gcc extensions. # Note: std::hash is their hash, ::hash is our hash ('', ('hash_map', 'hash_multimap',)), ('', ('hash_set', 'hash_multiset',)), ('', ('slist',)), ) _RE_PATTERN_STRING = re.compile(r'\bstring\b') _re_pattern_algorithm_header = [] for _template in ('copy', 'max', 'min', 'min_element', 'sort', 'swap', 'transform'): # Match max(..., ...), max(..., ...), but not foo->max, foo.max or # type::max(). _re_pattern_algorithm_header.append( (re.compile(r'[^>.]\b' + _template + r'(<.*?>)?\([^\)]'), _template, '')) _re_pattern_templates = [] for _header, _templates in _HEADERS_CONTAINING_TEMPLATES: for _template in _templates: _re_pattern_templates.append( (re.compile(r'(\<|\b)' + _template + r'\s*\<'), _template + '<>', _header)) def FilesBelongToSameModule(filename_cc, filename_h): """Check if these two filenames belong to the same module. The concept of a 'module' here is a as follows: foo.h, foo-inl.h, foo.cc, foo_test.cc and foo_unittest.cc belong to the same 'module' if they are in the same directory. some/path/public/xyzzy and some/path/internal/xyzzy are also considered to belong to the same module here. If the filename_cc contains a longer path than the filename_h, for example, '/absolute/path/to/base/sysinfo.cc', and this file would include 'base/sysinfo.h', this function also produces the prefix needed to open the header. This is used by the caller of this function to more robustly open the header file. We don't have access to the real include paths in this context, so we need this guesswork here. Known bugs: tools/base/bar.cc and base/bar.h belong to the same module according to this implementation. Because of this, this function gives some false positives. This should be sufficiently rare in practice. Args: filename_cc: is the path for the .cc file filename_h: is the path for the header path Returns: Tuple with a bool and a string: bool: True if filename_cc and filename_h belong to the same module. string: the additional prefix needed to open the header file. """ if not filename_cc.endswith('.cc'): return (False, '') filename_cc = filename_cc[:-len('.cc')] if filename_cc.endswith('_unittest'): filename_cc = filename_cc[:-len('_unittest')] elif filename_cc.endswith('_test'): filename_cc = filename_cc[:-len('_test')] filename_cc = filename_cc.replace('/public/', '/') filename_cc = filename_cc.replace('/internal/', '/') if not filename_h.endswith('.h'): return (False, '') filename_h = filename_h[:-len('.h')] if filename_h.endswith('-inl'): filename_h = filename_h[:-len('-inl')] filename_h = filename_h.replace('/public/', '/') filename_h = filename_h.replace('/internal/', '/') files_belong_to_same_module = filename_cc.endswith(filename_h) common_path = '' if files_belong_to_same_module: common_path = filename_cc[:-len(filename_h)] return files_belong_to_same_module, common_path def UpdateIncludeState(filename, include_state, io=codecs): """Fill up the include_state with new includes found from the file. Args: filename: the name of the header to read. include_state: an _IncludeState instance in which the headers are inserted. io: The io factory to use to read the file. Provided for testability. Returns: True if a header was succesfully added. False otherwise. """ headerfile = None try: headerfile = io.open(filename, 'r', 'utf8', 'replace') except IOError: return False linenum = 0 for line in headerfile: linenum += 1 clean_line = CleanseComments(line) match = _RE_PATTERN_INCLUDE.search(clean_line) if match: include = match.group(2) # The value formatting is cute, but not really used right now. # What matters here is that the key is in include_state. include_state.setdefault(include, '%s:%d' % (filename, linenum)) return True def CheckForIncludeWhatYouUse(filename, clean_lines, include_state, error, io=codecs): """Reports for missing stl includes. This function will output warnings to make sure you are including the headers necessary for the stl containers and functions that you use. We only give one reason to include a header. For example, if you use both equal_to<> and less<> in a .h file, only one (the latter in the file) of these will be reported as a reason to include the . Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. include_state: An _IncludeState instance. error: The function to call with any errors found. io: The IO factory to use to read the header file. Provided for unittest injection. """ required = {} # A map of header name to linenumber and the template entity. # Example of required: { '': (1219, 'less<>') } for linenum in xrange(clean_lines.NumLines()): line = clean_lines.elided[linenum] if not line or line[0] == '#': continue # String is special -- it is a non-templatized type in STL. matched = _RE_PATTERN_STRING.search(line) if matched: # Don't warn about strings in non-STL namespaces: # (We check only the first match per line; good enough.) prefix = line[:matched.start()] if prefix.endswith('std::') or not prefix.endswith('::'): required[''] = (linenum, 'string') for pattern, template, header in _re_pattern_algorithm_header: if pattern.search(line): required[header] = (linenum, template) # The following function is just a speed up, no semantics are changed. if not '<' in line: # Reduces the cpu time usage by skipping lines. continue for pattern, template, header in _re_pattern_templates: if pattern.search(line): required[header] = (linenum, template) # The policy is that if you #include something in foo.h you don't need to # include it again in foo.cc. Here, we will look at possible includes. # Let's copy the include_state so it is only messed up within this function. include_state = include_state.copy() # Did we find the header for this file (if any) and succesfully load it? header_found = False # Use the absolute path so that matching works properly. abs_filename = FileInfo(filename).FullName() # For Emacs's flymake. # If cpplint is invoked from Emacs's flymake, a temporary file is generated # by flymake and that file name might end with '_flymake.cc'. In that case, # restore original file name here so that the corresponding header file can be # found. # e.g. If the file name is 'foo_flymake.cc', we should search for 'foo.h' # instead of 'foo_flymake.h' abs_filename = re.sub(r'_flymake\.cc$', '.cc', abs_filename) # include_state is modified during iteration, so we iterate over a copy of # the keys. header_keys = include_state.keys() for header in header_keys: (same_module, common_path) = FilesBelongToSameModule(abs_filename, header) fullpath = common_path + header if same_module and UpdateIncludeState(fullpath, include_state, io): header_found = True # If we can't find the header file for a .cc, assume it's because we don't # know where to look. In that case we'll give up as we're not sure they # didn't include it in the .h file. # TODO(unknown): Do a better job of finding .h files so we are confident that # not having the .h file means there isn't one. if filename.endswith('.cc') and not header_found: return # All the lines have been processed, report the errors found. for required_header_unstripped in required: template = required[required_header_unstripped][1] if required_header_unstripped.strip('<>"') not in include_state: error(filename, required[required_header_unstripped][0], 'build/include_what_you_use', 4, 'Add #include ' + required_header_unstripped + ' for ' + template) _RE_PATTERN_EXPLICIT_MAKEPAIR = re.compile(r'\bmake_pair\s*<') def CheckMakePairUsesDeduction(filename, clean_lines, linenum, error): """Check that make_pair's template arguments are deduced. G++ 4.6 in C++0x mode fails badly if make_pair's template arguments are specified explicitly, and such use isn't intended in any case. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. error: The function to call with any errors found. """ raw = clean_lines.raw_lines line = raw[linenum] match = _RE_PATTERN_EXPLICIT_MAKEPAIR.search(line) if match: error(filename, linenum, 'build/explicit_make_pair', 4, # 4 = high confidence 'For C++11-compatibility, omit template arguments from make_pair' ' OR use pair directly OR if appropriate, construct a pair directly') def ProcessLine(filename, file_extension, clean_lines, line, include_state, function_state, nesting_state, error, extra_check_functions=[]): """Processes a single line in the file. Args: filename: Filename of the file that is being processed. file_extension: The extension (dot not included) of the file. clean_lines: An array of strings, each representing a line of the file, with comments stripped. line: Number of line being processed. include_state: An _IncludeState instance in which the headers are inserted. function_state: A _FunctionState instance which counts function lines, etc. nesting_state: A _NestingState instance which maintains information about the current stack of nested blocks being parsed. error: A callable to which errors are reported, which takes 4 arguments: filename, line number, error level, and message extra_check_functions: An array of additional check functions that will be run on each source line. Each function takes 4 arguments: filename, clean_lines, line, error """ raw_lines = clean_lines.raw_lines ParseNolintSuppressions(filename, raw_lines[line], line, error) nesting_state.Update(filename, clean_lines, line, error) if nesting_state.stack and nesting_state.stack[-1].inline_asm != _NO_ASM: return CheckForFunctionLengths(filename, clean_lines, line, function_state, error) CheckForMultilineCommentsAndStrings(filename, clean_lines, line, error) CheckStyle(filename, clean_lines, line, file_extension, nesting_state, error) CheckLanguage(filename, clean_lines, line, file_extension, include_state, error) CheckForNonStandardConstructs(filename, clean_lines, line, nesting_state, error) CheckPosixThreading(filename, clean_lines, line, error) CheckInvalidIncrement(filename, clean_lines, line, error) CheckMakePairUsesDeduction(filename, clean_lines, line, error) for check_fn in extra_check_functions: check_fn(filename, clean_lines, line, error) def ProcessFileData(filename, file_extension, lines, error, extra_check_functions=[]): """Performs lint checks and reports any errors to the given error function. Args: filename: Filename of the file that is being processed. file_extension: The extension (dot not included) of the file. lines: An array of strings, each representing a line of the file, with the last element being empty if the file is terminated with a newline. error: A callable to which errors are reported, which takes 4 arguments: filename, line number, error level, and message extra_check_functions: An array of additional check functions that will be run on each source line. Each function takes 4 arguments: filename, clean_lines, line, error """ lines = (['// marker so line numbers and indices both start at 1'] + lines + ['// marker so line numbers end in a known way']) include_state = _IncludeState() function_state = _FunctionState() nesting_state = _NestingState() ResetNolintSuppressions() CheckForCopyright(filename, lines, error) if file_extension == 'h': CheckForHeaderGuard(filename, lines, error) RemoveMultiLineComments(filename, lines, error) clean_lines = CleansedLines(lines) for line in xrange(clean_lines.NumLines()): ProcessLine(filename, file_extension, clean_lines, line, include_state, function_state, nesting_state, error, extra_check_functions) nesting_state.CheckClassFinished(filename, error) CheckForIncludeWhatYouUse(filename, clean_lines, include_state, error) # We check here rather than inside ProcessLine so that we see raw # lines rather than "cleaned" lines. CheckForUnicodeReplacementCharacters(filename, lines, error) CheckForNewlineAtEOF(filename, lines, error) def ProcessFile(filename, vlevel, extra_check_functions=[]): """Does google-lint on a single file. Args: filename: The name of the file to parse. vlevel: The level of errors to report. Every error of confidence >= verbose_level will be reported. 0 is a good default. extra_check_functions: An array of additional check functions that will be run on each source line. Each function takes 4 arguments: filename, clean_lines, line, error """ _SetVerboseLevel(vlevel) try: # Support the UNIX convention of using "-" for stdin. Note that # we are not opening the file with universal newline support # (which codecs doesn't support anyway), so the resulting lines do # contain trailing '\r' characters if we are reading a file that # has CRLF endings. # If after the split a trailing '\r' is present, it is removed # below. If it is not expected to be present (i.e. os.linesep != # '\r\n' as in Windows), a warning is issued below if this file # is processed. if filename == '-': lines = codecs.StreamReaderWriter(sys.stdin, codecs.getreader('utf8'), codecs.getwriter('utf8'), 'replace').read().split('\n') else: lines = codecs.open(filename, 'r', 'utf8', 'replace').read().split('\n') carriage_return_found = False # Remove trailing '\r'. for linenum in range(len(lines)): if lines[linenum].endswith('\r'): lines[linenum] = lines[linenum].rstrip('\r') carriage_return_found = True except IOError: sys.stderr.write( "Skipping input '%s': Can't open for reading\n" % filename) return # Note, if no dot is found, this will give the entire filename as the ext. file_extension = filename[filename.rfind('.') + 1:] # When reading from stdin, the extension is unknown, so no cpplint tests # should rely on the extension. if filename != '-' and file_extension not in ('cc', 'h', 'cpp', 'hpp'): sys.stderr.write('Ignoring %s; not a .cc or .h file\n' % filename) else: ProcessFileData(filename, file_extension, lines, Error, extra_check_functions) if carriage_return_found and os.linesep != '\r\n': # Use 0 for linenum since outputting only one error for potentially # several lines. Error(filename, 0, 'whitespace/newline', 1, 'One or more unexpected \\r (^M) found;' 'better to use only a \\n') sys.stderr.write('Done processing %s\n' % filename) def PrintUsage(message): """Prints a brief usage string and exits, optionally with an error message. Args: message: The optional error message. """ sys.stderr.write(_USAGE) if message: sys.exit('\nFATAL ERROR: ' + message) else: sys.exit(1) def PrintCategories(): """Prints a list of all the error-categories used by error messages. These are the categories used to filter messages via --filter. """ sys.stderr.write(''.join(' %s\n' % cat for cat in _ERROR_CATEGORIES)) sys.exit(0) def ParseArguments(args): """Parses the command line arguments. This may set the output format and verbosity level as side-effects. Args: args: The command line arguments: Returns: The list of filenames to lint. """ try: (opts, filenames) = getopt.getopt(args, '', ['help', 'output=', 'verbose=', 'counting=', 'filter=', 'root=']) except getopt.GetoptError: PrintUsage('Invalid arguments.') verbosity = _VerboseLevel() output_format = _OutputFormat() filters = '' counting_style = '' for (opt, val) in opts: if opt == '--help': PrintUsage(None) elif opt == '--output': if not val in ('emacs', 'vs7', 'eclipse'): PrintUsage('The only allowed output formats are emacs, vs7 and eclipse.') output_format = val elif opt == '--verbose': verbosity = int(val) elif opt == '--filter': filters = val if not filters: PrintCategories() elif opt == '--counting': if val not in ('total', 'toplevel', 'detailed'): PrintUsage('Valid counting options are total, toplevel, and detailed') counting_style = val elif opt == '--root': global _root _root = val if not filenames: PrintUsage('No files were specified.') _SetOutputFormat(output_format) _SetVerboseLevel(verbosity) _SetFilters(filters) _SetCountingStyle(counting_style) return filenames def main(): filenames = ParseArguments(sys.argv[1:]) # Change stderr to write with replacement characters so we don't die # if we try to print something containing non-ASCII characters. sys.stderr = codecs.StreamReaderWriter(sys.stderr, codecs.getreader('utf8'), codecs.getwriter('utf8'), 'replace') _cpplint_state.ResetErrorCounts() for filename in filenames: ProcessFile(filename, _cpplint_state.verbose_level) _cpplint_state.PrintErrorCounts() sys.exit(_cpplint_state.error_count > 0) if __name__ == '__main__': main() sipp-3.6.0/src/0000755000175000017500000000000013475544015012650 5ustar walterwaltersipp-3.6.0/src/call_generation_task.cpp0000644000175000017500000002113413475544015017525 0ustar walterwalter/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Richard GAYRAUD - 04 Nov 2003 * Marc LAMBERTON * Olivier JACQUES * Herve PELLAN * David MANSUTTI * Francois-Xavier Kowalski * Gerard Lyonnaz * From Hewlett Packard Company. * F. Tarek Rogers * Peter Higginson * Vincent Luba * Shriram Natarajan * Guillaume Teissier from FTR&D * Clement Chen * Wolfgang Beck * Charles P Wright from IBM Research */ #include "sipp.hpp" class CallGenerationTask *CallGenerationTask::instance = NULL; unsigned long CallGenerationTask::calls_since_last_rate_change = 0; unsigned long CallGenerationTask::last_rate_change_time = 0; void CallGenerationTask::initialize() { assert(instance == NULL); instance = new CallGenerationTask(); } CallGenerationTask::CallGenerationTask() { setRunning(); } CallGenerationTask::~CallGenerationTask() { instance = NULL; } void CallGenerationTask::dump() { WARNING("Uniform rate call generation task: %f", rate); } unsigned int CallGenerationTask::wake() { int retval; if (paused || (users >= 0)) { // When paused or when we're doing user-based rather than // rate-based calls, return a sentinel value to indicate that // this task should wait forever before rescheduling. retval = DONT_RESCHEDULE; } else { float ms_per_call = rate_period_ms/MAX(rate, 1); /* We need to compute when the next call is going to be * opened. The current time is the time when the rate last * changed, plus the number of calls since then multiplied by * the number of milliseconds between each call. * * We then add the number of milliseconds between each call to that * figure. */ retval = (unsigned long) last_rate_change_time + (calls_since_last_rate_change * ms_per_call) + ms_per_call; /* On startup, when last_rate_change_time is 0, this calculation can be 0 (if we're opening multiple calls per ms). But 0 indicates that we should wait forever, so avoid that and return 1 instead. */ if (retval == 0 /* DONT_RESCHEDULE */) { retval = 1; } } return retval; } bool CallGenerationTask::run() { int calls_to_open = 0; if (quitting) { delete this; return false; } if (paused) { setPaused(); return true; } unsigned long long current_calls = main_scenario->stats->GetStat(CStat::CPT_C_CurrentCall); unsigned long long total_calls = main_scenario->stats->GetStat(CStat::CPT_C_IncomingCallCreated) + main_scenario->stats->GetStat(CStat::CPT_C_OutgoingCallCreated); if (users >= 0) { calls_to_open = users - current_calls; } else { float calls_per_ms = rate/rate_period_ms; unsigned int ms_since_last_rate_change = clock_tick - last_rate_change_time; unsigned int expected_total_calls = ms_since_last_rate_change * calls_per_ms; calls_to_open = expected_total_calls - calls_since_last_rate_change; } if (total_calls + calls_to_open > stop_after) { calls_to_open = stop_after - total_calls; } /* We base our scheduling on the number of calls made since the last rate * change, but if we reduce the number of calls we open in order to keep * within the limit, that throws this calculation off and brings CPU% up to * 100%. To avoid this, we increment calls_since_last_rate_change here. */ calls_since_last_rate_change += calls_to_open; if (open_calls_allowed && (current_calls + calls_to_open > open_calls_allowed)) { calls_to_open = open_calls_allowed - current_calls; } if (calls_to_open <= 0) { calls_to_open = 0; } unsigned int start_clock = getmilliseconds(); while(calls_to_open--) { /* Associate a user with this call, if we are in users mode. */ int userid = 0; if (users >= 0) { userid = freeUsers.back(); freeUsers.pop_back(); } // Adding a new outgoing call main_scenario->stats->computeStat(CStat::E_CREATE_OUTGOING_CALL); call* call_ptr = call::add_call(userid, local_ip_is_ipv6, use_remote_sending_addr ? &remote_sending_sockaddr : &remote_sockaddr); if(!call_ptr) { ERROR("Out of memory allocating call!"); } outbound_congestion = false; if (!multisocket) { switch(transport) { case T_UDP: call_ptr->associate_socket(main_socket); main_socket->ss_count++; break; case T_TCP: case T_SCTP: case T_TLS: call_ptr->associate_socket(tcp_multiplex); tcp_multiplex->ss_count++; break; } } // We shouldn't run for more than 1ms, so as not to tie up the scheduler if (getmilliseconds() > start_clock) { break; } } if (calls_to_open <= 0) { setPaused(); } else { // We stopped before opening all the calls we needed to so as // not to tie up the scheduler - don't pause this task, so // that it gets rescheduled ASAP and can continue. } // Quit after asked number of calls is reached if(total_calls >= stop_after) { quitting = 1; return false; } return true; } void CallGenerationTask::set_paused(bool new_paused) { if (!instance) { /* Doesn't do anything, we must be in server mode. */ return; } if (new_paused) { instance->setPaused(); } else { instance->setRunning(); if (users >= 0) { set_users(users); } else { set_rate(rate); } } paused = new_paused; } void CallGenerationTask::set_rate(double new_rate) { if (!instance) { /* Doesn't do anything, we must be in server mode. */ } rate = new_rate; if(rate < 0) { rate = 0; } last_rate_change_time = getmilliseconds(); calls_since_last_rate_change = 0; if(!open_calls_user_setting) { // Calculate the maximum number of open calls from the rate // and the call duration, unless the user has set a fixed value. int call_duration_min = main_scenario->duration; if (duration > call_duration_min) { call_duration_min = duration; } if (call_duration_min < 1000) { call_duration_min = 1000; } open_calls_allowed = (int)((3.0 * rate * call_duration_min) / (double)rate_period_ms); if(!open_calls_allowed) { open_calls_allowed = 1; } } } void CallGenerationTask::set_users(int new_users) { if (!instance) { /* Doesn't do anything, we must be in server mode. */ return; } if (new_users < 0) { new_users = 0; } assert(users >= 0); while (users < new_users) { int userid; if (!retiredUsers.empty()) { userid = retiredUsers.back(); retiredUsers.pop_back(); } else { userid = users + 1; userVarMap[userid] = new VariableTable(userVariables); } freeUsers.push_front(userid); users++; } users = open_calls_allowed = new_users; last_rate_change_time = clock_tick; calls_since_last_rate_change = 0; assert(open_calls_user_setting); instance->setRunning(); } void CallGenerationTask::free_user(int userId) { if (main_scenario->stats->GetStat(CStat::CPT_C_CurrentCall) > open_calls_allowed) { retiredUsers.push_front(userId); } else { freeUsers.push_front(userId); /* Wake up the call creation thread. */ if (instance) { instance->setRunning(); } } } sipp-3.6.0/src/stat.cpp0000644000175000017500000023332213475544015014334 0ustar walterwalter/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Authors : Benjamin GAUTHIER - 24 Mar 2004 * Joseph BANINO * Olivier JACQUES * Richard GAYRAUD * From Hewlett Packard Company. * Wolfgang Beck * */ #include #include #include #include #include "sipp.hpp" #include "scenario.hpp" #include "screen.hpp" #ifdef HAVE_GSL #include #include #include #endif /* ** Local definitions (macros) */ /* ** Warning! All DISPLAY_ macros must be called where f FILE is ** defined. This is to allow printing to stdout or a file. */ #define DISPLAY_LINE() \ fprintf(f," ------------------------------------------------------------------------------ \r\n") #define DISPLAY_DLINE() \ fprintf(f,"================================================================================\r\n") #define DISPLAY_CROSS_LINE() \ fprintf(f,"-------------------------+---------------------------+--------------------------\r\n") #define DISPLAY_HEADER() \ fprintf(f," Counter Name | Periodic value | Cumulative value\r\n") #define DISPLAY_TXT_COL(T1, V1, V2) \ fprintf(f," %-22.22s | %-25.25s |", T1, V1); fprintf(f," %-24.24s \r\n", V2) #define DISPLAY_VAL_RATEF_COL(T1, V1, V2) \ fprintf(f," %-22.22s | %8.3f cps | %8.3f cps \r\n", T1, V1, V2) #define DISPLAY_2VAL(T1, V1, V2) \ fprintf(f," %-22.22s | %8llu | %8llu \r\n", T1, V1, V2) #define DISPLAY_CUMUL(T1, V1) \ fprintf(f," %-22.22s | | %8llu \r\n", T1, V1) #define DISPLAY_PERIO(T1, V1) \ fprintf(f," %-22.22s | %8llu | \r\n", T1, V1) #define DISPLAY_VALF(T1, V1) \ fprintf(f," %-22.22s | %8.3f ms \r\n", T1, V1) #define DISPLAY_VAL_RATEF(T1, V1) \ fprintf(f," %-22.22s | %8.3f cps \r\n", T1, V1) #define DISPLAY_VAL_RATE(T1, V1) \ fprintf(f," %-22.22s | %8d cps \r\n", T1, V1) #define DISPLAY_VAL(T1, V1) \ fprintf(f," %-22.22s : %8d \r\n", T1, V1) #define DISPLAY_2VALF(T1, V1, T2, V2) \ fprintf(f," %-22.22s : %8.2f | %-7.7s : %8.2f \r\n", T1, V1, T2, V2) #define DISPLAY_3VAL(T1, V1, T2, V2, T3, V3) \ fprintf(f," %-22.22s : %8d | %-7.7s : %8d | %-12.12s : %5d \r\n", T1, V1, T2, V2, T3, V3) #define DISPLAY_3VALF(T1, V1, T2, V2, T3, V3) \ fprintf(f," %-22.22s : %8.3f | %-7.7s : %8.3f | %-12.12s : %5.1f \r\n", T1, V1, T2, V2, T3, V3) #define DISPLAY_TXT(T1, V1) \ fprintf(f," %-22.22s | %-52.52s \r\n", T1, V1) #define DISPLAY_INFO(T1) \ fprintf(f," %-77.77s \r\n", T1) #define DISPLAY_REPART(T1, T2, V1) \ fprintf(f," %8d ms <= n < %8d ms : %10lu %-29.29s \r\n", T1, T2, V1, "") #define DISPLAY_LAST_REPART(T1, V1) \ fprintf(f," %14.14s n >= %8d ms : %10lu %-29.29s \r\n", "", T1, V1, "") #define RESET_COUNTERS(PT) \ memset (PT, 0, CStat::E_NB_COUNTER * sizeof(unsigned long long)) #define RESET_C_COUNTERS \ { \ int i; \ for (i = CStat::CPT_G_C_OutOfCallMsgs; \ i <= CStat::CPT_G_C_AutoAnswered; \ i++) { \ M_G_counters[i - E_NB_COUNTER - 1] = (unsigned long)0; \ } \ for (i = CStat::CPT_C_IncomingCallCreated; \ i <= CStat::CPT_C_Retransmissions; \ i++) { \ M_counters[i] = (unsigned long)0; \ } \ for (unsigned int j = 0; j < M_genericMap.size(); j++) { \ M_genericCounters[j * GENERIC_TYPES + GENERIC_C] = 0; \ } \ for (unsigned int j = 0; j < M_rtdMap.size(); j++) { \ M_rtdInfo[(j * GENERIC_TYPES * RTD_TYPES) + (GENERIC_C * RTD_TYPES) + RTD_COUNT] = 0; \ M_rtdInfo[(j * GENERIC_TYPES * RTD_TYPES) + (GENERIC_C * RTD_TYPES) + RTD_SUM] = 0; \ M_rtdInfo[(j * GENERIC_TYPES * RTD_TYPES) + (GENERIC_C * RTD_TYPES) + RTD_SUMSQ] = 0; \ } \ } #define RESET_PD_COUNTERS \ { \ int i; \ for (i = CStat::CPT_G_PD_OutOfCallMsgs; \ i <= CStat::CPT_G_PD_AutoAnswered; \ i++) { \ M_G_counters[i - E_NB_COUNTER - 1] = (unsigned long)0; \ } \ for (i = CStat::CPT_PD_IncomingCallCreated; \ i <= CStat::CPT_PD_Retransmissions; \ i++) { \ M_counters[i] = (unsigned long)0; \ } \ for (unsigned int j = 0; j < M_genericMap.size(); j++) { \ M_genericCounters[j * GENERIC_TYPES + GENERIC_PD] = 0; \ } \ for (unsigned int j = 0; j < M_rtdMap.size(); j++) { \ M_rtdInfo[(j * GENERIC_TYPES * RTD_TYPES) + (GENERIC_PD * RTD_TYPES) + RTD_COUNT] = 0; \ M_rtdInfo[(j * GENERIC_TYPES * RTD_TYPES) + (GENERIC_PD * RTD_TYPES) + RTD_SUM] = 0; \ M_rtdInfo[(j * GENERIC_TYPES * RTD_TYPES) + (GENERIC_PD * RTD_TYPES) + RTD_SUMSQ] = 0; \ } \ } #define RESET_PL_COUNTERS \ { \ int i; \ for (i = CStat::CPT_G_PL_OutOfCallMsgs; \ i <= CStat::CPT_G_PL_AutoAnswered; \ i++) { \ M_G_counters[i - E_NB_COUNTER - 1] = (unsigned long)0; \ } \ for (i = CStat::CPT_PL_IncomingCallCreated; \ i <= CStat::CPT_PL_Retransmissions; \ i++) { \ M_counters[i] = (unsigned long)0; \ } \ for (unsigned int j = 0; j < M_genericMap.size(); j++) { \ M_genericCounters[j * GENERIC_TYPES + GENERIC_PL] = 0; \ } \ for (unsigned int j = 0; j < M_rtdMap.size(); j++) { \ M_rtdInfo[(j * GENERIC_TYPES * RTD_TYPES) + (GENERIC_PL * RTD_TYPES) + RTD_COUNT] = 0; \ M_rtdInfo[(j * GENERIC_TYPES * RTD_TYPES) + (GENERIC_PL * RTD_TYPES) + RTD_SUM] = 0; \ M_rtdInfo[(j * GENERIC_TYPES * RTD_TYPES) + (GENERIC_PL * RTD_TYPES) + RTD_SUMSQ] = 0; \ } \ } /* __________________________________________________________________________ C L A S S CS t a t __________________________________________________________________________ */ unsigned long long CStat::M_G_counters[E_NB_G_COUNTER - E_NB_COUNTER]; CStat::~CStat() { int i; for (i = 0; i < nRtds(); i++) { if (M_ResponseTimeRepartition[i] != NULL) { delete [] M_ResponseTimeRepartition[i]; } } free(M_ResponseTimeRepartition); if (M_CallLengthRepartition != NULL) delete [] M_CallLengthRepartition; if(M_outputStream != NULL) { M_outputStream->close(); delete M_outputStream; } if(M_fileName != NULL) delete [] M_fileName; if(M_outputStreamRtt != NULL) { M_outputStreamRtt->close(); delete M_outputStreamRtt; } if(M_fileNameRtt != NULL) delete [] M_fileNameRtt; if(M_dumpRespTime != NULL) delete [] M_dumpRespTime ; free(M_rtdInfo); for (int_str_map::iterator i = M_revRtdMap.begin(); i != M_revRtdMap.end(); ++i) { free(i->second); } M_SizeOfResponseTimeRepartition = 0; M_SizeOfCallLengthRepartition = 0; M_CallLengthRepartition = NULL; M_fileName = NULL; M_outputStream = NULL; M_outputStreamRtt = NULL; M_fileNameRtt = NULL; M_dumpRespTime = NULL; } int CStat::init () { // reset of all counter RESET_COUNTERS(M_counters); GET_TIME (&M_startTime); memcpy (&M_pdStartTime, &M_startTime, sizeof (struct timeval)); memcpy (&M_plStartTime, &M_startTime, sizeof (struct timeval)); M_outputStream = NULL; M_headerAlreadyDisplayed = false; M_outputStreamRtt = NULL; M_headerAlreadyDisplayedRtt = false; std::vector error_codes(0); return(1); } int CStat::isWellFormed(char * P_listeStr, int * nombre) { char * ptr = P_listeStr; int sizeOf; bool isANumber; (*nombre) = 0; sizeOf = strlen(P_listeStr); // getting the number if(sizeOf > 0) { // is the string well formed ? [0-9] [,] isANumber = false; for(int i=0; i<=sizeOf; i++) { switch(ptr[i]) { case ',': if(isANumber == false) { return(0); } else { (*nombre)++; } isANumber = false; break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': isANumber = true; break; case '\t': case ' ' : break; case '\0': if(isANumber == false) { return(0); } else { (*nombre)++; } break; default: return(0); } } // enf for } return(1); } int CStat::createIntegerTable(char * P_listeStr, unsigned int ** listeInteger, int * sizeOfList) { int nb=0; char * ptr = P_listeStr; char * ptr_prev = P_listeStr; unsigned int current_int; if(isWellFormed(P_listeStr, sizeOfList) == 1) { (*listeInteger) = new unsigned int[(*sizeOfList)]; while((*ptr) != ('\0')) { if((*ptr) == ',') { sscanf(ptr_prev, "%u", ¤t_int); if (nb<(*sizeOfList)) (*listeInteger)[nb] = current_int; nb++; ptr_prev = ptr+1; } ptr++; } // on lit le dernier sscanf(ptr_prev, "%u", ¤t_int); if (nb<(*sizeOfList)) (*listeInteger)[nb] = current_int; nb++; return(1); } return(0); } void CStat::setFileName(const char* P_name, const char* P_extension) { int sizeOf, sizeOfExtension; if(P_name != NULL) { // +6 for PID sizeOf = strlen(P_name) + 6; if(sizeOf > 0) { if(P_extension != NULL) { sizeOfExtension = strlen(P_extension); if(sizeOfExtension > 0) { if(M_fileName != NULL) delete [] M_fileName; M_fileName = new char[MAX_PATH]; sprintf(M_fileName, "%s_%ld_", P_name, (long) getpid()); strcat(M_fileName, P_extension); } else { if(M_fileName != NULL) delete [] M_fileName; M_fileName = new char[MAX_PATH]; sprintf(M_fileName, "%s_%ld_", P_name, (long) getpid()); strcat(M_fileName, DEFAULT_EXTENSION); } } else { if(M_fileName != NULL) delete [] M_fileName; M_fileName = new char[MAX_PATH]; sprintf(M_fileName, "%s_%ld_", P_name, (long) getpid()); strcat(M_fileName, DEFAULT_EXTENSION); } } else { cerr << "new file name length is null - " << "keeping the default filename : " << DEFAULT_FILE_NAME << endl; } } else { cerr << "new file name is NULL ! - keeping the default filename : " << DEFAULT_FILE_NAME << endl; } } void CStat::setFileName(const char* P_name) { int sizeOf; if(P_name != NULL) { sizeOf = strlen(P_name); if(sizeOf > 0) { if(M_fileName != NULL) delete [] M_fileName; M_fileName = new char[sizeOf+1]; strcpy(M_fileName, P_name); } else { cerr << "new file name length is null - " "keeping the default filename : " << DEFAULT_FILE_NAME << endl; } } else { cerr << "new file name is NULL ! - keeping the default filename : " << DEFAULT_FILE_NAME << endl; } } void CStat::initRtt(const char* P_name, const char* P_extension, unsigned long P_report_freq_dumpRtt) { int sizeOf, sizeOfExtension; if(P_name != NULL) { sizeOf = strlen(P_name) ; if(sizeOf > 0) { // 4 for '_rtt' and 6 for pid sizeOf += 10 ; sizeOfExtension = strlen(P_extension); if(M_fileNameRtt != NULL) delete [] M_fileNameRtt; sizeOf += sizeOfExtension; M_fileNameRtt = new char[sizeOf+1]; sprintf (M_fileNameRtt, "%s_%ld_rtt%s", P_name, (long) getpid(),P_extension); } else { cerr << "new file name length is null - " << "keeping the default filename : " << DEFAULT_FILE_NAME << endl; } } else { cerr << "new file name is NULL ! - keeping the default filename : " << DEFAULT_FILE_NAME << endl; } // initiate the table dump response time M_report_freq_dumpRtt = P_report_freq_dumpRtt ; M_dumpRespTime = new T_value_rtt [P_report_freq_dumpRtt] ; if ( M_dumpRespTime == NULL ) { cerr << "Memory allocation failure" << endl; exit(EXIT_FATAL_ERROR); } for (unsigned L_i = 0 ; L_i < P_report_freq_dumpRtt; L_i ++) { M_dumpRespTime[L_i].date = 0.0; M_dumpRespTime[L_i].rtd_no = 0; M_dumpRespTime[L_i].rtt = 0.0; } } void CStat::setRepartitionCallLength(char * P_listeStr) { unsigned int * listeInteger; int sizeOfListe; if(createIntegerTable(P_listeStr, &listeInteger, &sizeOfListe) == 1) { initRepartition(listeInteger, sizeOfListe, &M_CallLengthRepartition, &M_SizeOfCallLengthRepartition); } else { ERROR("Could not create table for call length repartition '%s'", P_listeStr); } delete [] listeInteger; listeInteger = NULL; } void CStat::setRepartitionResponseTime (char * P_listeStr) { unsigned int * listeInteger; int sizeOfListe; int i; for (i = 0; i < nRtds(); i++) { if(createIntegerTable(P_listeStr, &listeInteger, &sizeOfListe) == 1) { initRepartition(listeInteger, sizeOfListe, &M_ResponseTimeRepartition[i], &M_SizeOfResponseTimeRepartition); } else { ERROR("Could not create table for response time repartition '%s'", P_listeStr); } delete [] listeInteger; listeInteger = NULL; } } void CStat::setRepartitionCallLength(unsigned int* repartition, int nombre) { initRepartition(repartition, nombre, &M_CallLengthRepartition, &M_SizeOfCallLengthRepartition); } void CStat::setRepartitionResponseTime(unsigned int* repartition, int nombre) { for (int i = 0; i < nRtds(); i++) { initRepartition(repartition, nombre, &M_ResponseTimeRepartition[i], &M_SizeOfResponseTimeRepartition); } } void CStat::initRepartition(unsigned int* repartition, int nombre, T_dynamicalRepartition ** tabRepartition, int* tabNb) { bool sortDone; int i; unsigned int swap; if((nombre <= 0) || (repartition == NULL) ) { (*tabNb) = 0; (*tabRepartition) = NULL; return; } (*tabNb) = nombre + 1; (*tabRepartition) = new T_dynamicalRepartition[(*tabNb)]; // copying the repartition table in the local table for(i=0; i (*tabRepartition)[i+1].borderMax) { // swapping this two value and setting sortDone to false swap = (*tabRepartition)[i].borderMax; (*tabRepartition)[i].borderMax = (*tabRepartition)[i+1].borderMax; (*tabRepartition)[i+1].borderMax = swap; sortDone = false; } } } // setting the range for max <= value < infinity (*tabRepartition)[nombre].borderMax = (*tabRepartition)[nombre-1].borderMax; (*tabRepartition)[nombre].nbInThisBorder = 0; } int CStat::computeStat (E_Action P_action) { switch (P_action) { case E_CREATE_OUTGOING_CALL : M_counters [CPT_C_OutgoingCallCreated]++; M_counters [CPT_PD_OutgoingCallCreated]++; M_counters [CPT_PL_OutgoingCallCreated]++; M_counters [CPT_C_CurrentCall]++; if (M_counters[CPT_C_CurrentCall] > M_counters[CPT_C_CurrentCallPeak]) { M_counters [CPT_C_CurrentCallPeak] = M_counters[CPT_C_CurrentCall]; M_counters [CPT_C_CurrentCallPeakTime] = clock_tick / 1000; } if (M_counters[CPT_C_CurrentCall] > M_counters[CPT_PD_CurrentCallPeak]) { M_counters [CPT_PD_CurrentCallPeak] = M_counters[CPT_C_CurrentCall]; M_counters [CPT_PD_CurrentCallPeakTime] = clock_tick / 1000; } if (M_counters[CPT_C_CurrentCall] > M_counters[CPT_PL_CurrentCallPeak]) { M_counters [CPT_PL_CurrentCallPeak] = M_counters[CPT_C_CurrentCall]; M_counters [CPT_PL_CurrentCallPeakTime] = clock_tick / 1000; } break; case E_CREATE_INCOMING_CALL : M_counters [CPT_C_IncomingCallCreated]++; M_counters [CPT_PD_IncomingCallCreated]++; M_counters [CPT_PL_IncomingCallCreated]++; M_counters [CPT_C_CurrentCall]++; if (M_counters[CPT_C_CurrentCall] > M_counters[CPT_C_CurrentCallPeak]) { M_counters [CPT_C_CurrentCallPeak] = M_counters[CPT_C_CurrentCall]; M_counters [CPT_C_CurrentCallPeakTime] = clock_tick / 1000; } if (M_counters[CPT_C_CurrentCall] > M_counters[CPT_PD_CurrentCallPeak]) { M_counters [CPT_PD_CurrentCallPeak] = M_counters[CPT_C_CurrentCall]; M_counters [CPT_PD_CurrentCallPeakTime] = clock_tick / 1000; } if (M_counters[CPT_C_CurrentCall] > M_counters[CPT_PL_CurrentCallPeak]) { M_counters [CPT_PL_CurrentCallPeak] = M_counters[CPT_C_CurrentCall]; M_counters [CPT_PL_CurrentCallPeakTime] = clock_tick / 1000; } break; case E_CALL_FAILED : M_counters [CPT_C_FailedCall]++; M_counters [CPT_PD_FailedCall]++; M_counters [CPT_PL_FailedCall]++; M_counters [CPT_C_CurrentCall]--; break; case E_CALL_SUCCESSFULLY_ENDED : M_counters [CPT_C_SuccessfulCall]++; M_counters [CPT_PD_SuccessfulCall]++; M_counters [CPT_PL_SuccessfulCall]++; M_counters [CPT_C_CurrentCall]--; break; case E_FAILED_CANNOT_SEND_MSG : M_counters [CPT_C_FailedCallCannotSendMessage]++; M_counters [CPT_PD_FailedCallCannotSendMessage]++; M_counters [CPT_PL_FailedCallCannotSendMessage]++; break; case E_FAILED_MAX_UDP_RETRANS : M_counters [CPT_C_FailedCallMaxUdpRetrans]++; M_counters [CPT_PD_FailedCallMaxUdpRetrans]++; M_counters [CPT_PL_FailedCallMaxUdpRetrans]++; break; case E_FAILED_TCP_CONNECT : M_counters [CPT_C_FailedCallTcpConnect]++; M_counters [CPT_PD_FailedCallTcpConnect]++; M_counters [CPT_PL_FailedCallTcpConnect]++; break; case E_FAILED_TCP_CLOSED : M_counters [CPT_C_FailedCallTcpClosed]++; M_counters [CPT_PD_FailedCallTcpClosed]++; M_counters [CPT_PL_FailedCallTcpClosed]++; break; case E_FAILED_UNEXPECTED_MSG : M_counters [CPT_C_FailedCallUnexpectedMessage]++; M_counters [CPT_PD_FailedCallUnexpectedMessage]++; M_counters [CPT_PL_FailedCallUnexpectedMessage]++; break; case E_FAILED_CALL_REJECTED : M_counters [CPT_C_FailedCallCallRejected]++; M_counters [CPT_PD_FailedCallCallRejected]++; M_counters [CPT_PL_FailedCallCallRejected]++; break; case E_FAILED_CMD_NOT_SENT : M_counters [CPT_C_FailedCallCmdNotSent]++; M_counters [CPT_PD_FailedCallCmdNotSent]++; M_counters [CPT_PL_FailedCallCmdNotSent]++; break; case E_FAILED_REGEXP_DOESNT_MATCH : M_counters [CPT_C_FailedCallRegexpDoesntMatch]++; M_counters [CPT_PD_FailedCallRegexpDoesntMatch]++; M_counters [CPT_PL_FailedCallRegexpDoesntMatch]++; break; case E_FAILED_REGEXP_SHOULDNT_MATCH : M_counters [CPT_C_FailedCallRegexpShouldntMatch]++; M_counters [CPT_PD_FailedCallRegexpShouldntMatch]++; M_counters [CPT_PL_FailedCallRegexpShouldntMatch]++; break; case E_FAILED_REGEXP_HDR_NOT_FOUND : M_counters [CPT_C_FailedCallRegexpHdrNotFound]++; M_counters [CPT_PD_FailedCallRegexpHdrNotFound]++; M_counters [CPT_PL_FailedCallRegexpHdrNotFound]++; break; case E_FAILED_OUTBOUND_CONGESTION : M_counters [CPT_C_FailedOutboundCongestion]++; M_counters [CPT_PD_FailedOutboundCongestion]++; M_counters [CPT_PL_FailedOutboundCongestion]++; break; case E_FAILED_TIMEOUT_ON_RECV : M_counters [CPT_C_FailedTimeoutOnRecv]++; M_counters [CPT_PD_FailedTimeoutOnRecv]++; M_counters [CPT_PL_FailedTimeoutOnRecv]++; break; case E_FAILED_TEST_DOESNT_MATCH : M_counters [CPT_C_FailedCallTestDoesntMatch]++; M_counters [CPT_PD_FailedCallTestDoesntMatch]++; M_counters [CPT_PL_FailedCallTestDoesntMatch]++; break; case E_FAILED_TEST_SHOULDNT_MATCH : M_counters [CPT_C_FailedCallTestShouldntMatch]++; M_counters [CPT_PD_FailedCallTestShouldntMatch]++; M_counters [CPT_PL_FailedCallTestShouldntMatch]++; break; case E_FAILED_STRCMP_DOESNT_MATCH : M_counters [CPT_C_FailedCallStrcmpDoesntMatch]++; M_counters [CPT_PD_FailedCallStrcmpDoesntMatch]++; M_counters [CPT_PL_FailedCallStrcmpDoesntMatch]++; break; case E_FAILED_STRCMP_SHOULDNT_MATCH : M_counters [CPT_C_FailedCallStrcmpShouldntMatch]++; M_counters [CPT_PD_FailedCallStrcmpShouldntMatch]++; M_counters [CPT_PL_FailedCallStrcmpShouldntMatch]++; break; case E_FAILED_TIMEOUT_ON_SEND : M_counters [CPT_C_FailedTimeoutOnSend]++; M_counters [CPT_PD_FailedTimeoutOnSend]++; M_counters [CPT_PL_FailedTimeoutOnSend]++; break; case E_RETRANSMISSION : M_counters [CPT_C_Retransmissions]++; M_counters [CPT_PD_Retransmissions]++; M_counters [CPT_PL_Retransmissions]++; break; case E_RESET_C_COUNTERS : RESET_C_COUNTERS; GET_TIME (&M_startTime); break; case E_RESET_PD_COUNTERS : //DEBUG (C_Debug::E_LEVEL_4, "ENTER CASE", "%s", // "CStat::computeStat : RESET_PD_COUNTERS"); RESET_PD_COUNTERS; GET_TIME (&M_pdStartTime); break; case E_RESET_PL_COUNTERS : //DEBUG (C_Debug::E_LEVEL_4, "ENTER CASE", "%s", // "C_Stat::computeStat : RESET_PL_COUNTERS"); RESET_PL_COUNTERS; GET_TIME (&M_plStartTime); if (periodic_rtd) { resetRepartition(M_CallLengthRepartition, M_SizeOfCallLengthRepartition); for (int i = 0; i < nRtds(); i++) { resetRepartition(M_ResponseTimeRepartition[i], M_SizeOfResponseTimeRepartition); } } break; default : ERROR("CStat::ComputeStat() - Unrecognized Action %d", P_action); return (-1); } /* end switch */ return (0); } int CStat::globalStat (E_Action P_action) { switch (P_action) { case E_OUT_OF_CALL_MSGS : M_G_counters [CPT_G_C_OutOfCallMsgs - E_NB_COUNTER - 1]++; M_G_counters [CPT_G_PD_OutOfCallMsgs - E_NB_COUNTER - 1]++; M_G_counters [CPT_G_PL_OutOfCallMsgs - E_NB_COUNTER - 1]++; break; case E_WATCHDOG_MAJOR : M_G_counters [CPT_G_C_WatchdogMajor - E_NB_COUNTER - 1]++; M_G_counters [CPT_G_PD_WatchdogMajor - E_NB_COUNTER - 1]++; M_G_counters [CPT_G_PL_WatchdogMajor - E_NB_COUNTER - 1]++; break; case E_WATCHDOG_MINOR : M_G_counters [CPT_G_C_WatchdogMinor - E_NB_COUNTER - 1]++; M_G_counters [CPT_G_PD_WatchdogMinor - E_NB_COUNTER - 1]++; M_G_counters [CPT_G_PL_WatchdogMinor - E_NB_COUNTER - 1]++; break; case E_DEAD_CALL_MSGS : M_G_counters [CPT_G_C_DeadCallMsgs - E_NB_COUNTER - 1]++; M_G_counters [CPT_G_PD_DeadCallMsgs - E_NB_COUNTER - 1]++; M_G_counters [CPT_G_PL_DeadCallMsgs - E_NB_COUNTER - 1]++; break; case E_FATAL_ERRORS : M_G_counters [CPT_G_C_FatalErrors - E_NB_COUNTER - 1]++; M_G_counters [CPT_G_PD_FatalErrors - E_NB_COUNTER - 1]++; M_G_counters [CPT_G_PL_FatalErrors - E_NB_COUNTER - 1]++; break; case E_WARNING : M_G_counters [CPT_G_C_Warnings - E_NB_COUNTER - 1]++; M_G_counters [CPT_G_PD_Warnings - E_NB_COUNTER - 1]++; M_G_counters [CPT_G_PL_Warnings - E_NB_COUNTER - 1]++; break; case E_AUTO_ANSWERED : // Let's count the automatic answered calls M_G_counters [CPT_G_C_AutoAnswered - E_NB_COUNTER - 1]++; M_G_counters [CPT_G_PD_AutoAnswered - E_NB_COUNTER - 1]++; M_G_counters [CPT_G_PL_AutoAnswered - E_NB_COUNTER - 1]++; break; default : ERROR("CStat::ComputeStat() - Unrecognized Action %d", P_action); return (-1); } /* end switch */ return (0); } void CStat::computeRtt (unsigned long long P_start_time, unsigned long long P_stop_time, int which) { M_dumpRespTime[M_counterDumpRespTime].date = (double)P_stop_time / (double)1000; M_dumpRespTime[M_counterDumpRespTime].rtd_no = which; M_dumpRespTime[M_counterDumpRespTime].rtt = ((double)(P_stop_time - P_start_time)) / (double)1000; M_counterDumpRespTime++ ; if (M_counterDumpRespTime > (M_report_freq_dumpRtt - 1)) { dumpDataRtt () ; } } unsigned long long CStat::GetStat (E_CounterName P_counter) { if (P_counter < E_NB_COUNTER) { return M_counters [P_counter]; } else { return M_G_counters [P_counter - E_NB_COUNTER - 1]; } } /* Get the current start time. */ void CStat::getStartTime(struct timeval *t) { memcpy(t, &M_startTime, sizeof(M_startTime)); } /* Use the short form standard deviation formula given the sum of the squares * and the sum. */ double CStat::computeStdev(E_CounterName P_SumCounter, E_CounterName P_NbOfCallUsed, E_CounterName P_Squares) { if (M_counters[P_NbOfCallUsed] <= 0) return 0.0; double numerator = ((double)(M_counters[P_NbOfCallUsed]) * (double)(M_counters[P_Squares])) - ((double)(M_counters[P_SumCounter] * M_counters[P_SumCounter])); double denominator = (double)(M_counters[P_NbOfCallUsed]) * (((double)(M_counters[P_NbOfCallUsed])) - 1.0); return sqrt(numerator/denominator); } double CStat::computeMean(E_CounterName P_SumCounter, E_CounterName P_NbOfCallUsed) { if (M_counters[P_NbOfCallUsed] == 0) return 0.0; return ((double)(M_counters[P_SumCounter]) / (double)(M_counters[P_NbOfCallUsed])); } double CStat::computeRtdMean(int which, int type) { unsigned long long count = M_rtdInfo[((which - 1) * RTD_TYPES * GENERIC_TYPES) + (type * RTD_TYPES) + RTD_COUNT]; unsigned long long sum = M_rtdInfo[((which - 1) * RTD_TYPES * GENERIC_TYPES) + (type * RTD_TYPES) + RTD_SUM]; if (count == 0) return 0.0; return ((double)(sum) / (double)(count)); } double CStat::computeRtdStdev(int which, int type) { unsigned long long count = M_rtdInfo[((which - 1) * RTD_TYPES * GENERIC_TYPES) + (type * RTD_TYPES) + RTD_COUNT]; unsigned long long sum = M_rtdInfo[((which - 1) * RTD_TYPES * GENERIC_TYPES) + (type * RTD_TYPES) + RTD_SUM]; unsigned long long sumsq = M_rtdInfo[((which - 1) * RTD_TYPES * GENERIC_TYPES) + (type * RTD_TYPES) + RTD_SUMSQ]; if (count <= 1) return 0.0; double numerator = ((double)count * (double)sumsq) - (double)(sum * sum); double denominator = (double)(count) * ((double)(count) - 1.0); return sqrt(numerator/denominator); } void CStat::updateAverageCounter(E_CounterName P_SumCounter, E_CounterName P_NbOfCallUsed, E_CounterName P_Squares, unsigned long P_value) { if (M_counters [P_NbOfCallUsed] <= 0) { M_counters [P_NbOfCallUsed] ++; M_counters [P_SumCounter] = P_value; M_counters [P_Squares] = (P_value * P_value); } else { M_counters [P_SumCounter] += P_value; M_counters [P_Squares] += (P_value * P_value); M_counters [P_NbOfCallUsed] ++; } } int CStat::computeStat (E_Action P_action, unsigned long P_value) { return computeStat(P_action, P_value, 0); } int CStat::findCounter(const char *counter, bool alloc) { str_int_map::iterator it = M_genericMap.find(str_int_map::key_type(counter)); if (it != M_genericMap.end()) { return it->second; } if (!alloc) { return -1; } int ret = M_genericMap.size() + 1; M_genericMap[str_int_map::key_type(counter)] = ret; bool numeric = true; const char *p = counter; while (*p) { if (!isdigit(*p)) { numeric = false; break; } p++; } if (numeric) { char *s = new char[20]; snprintf(s, 20, "GenericCounter%s", counter); M_revGenericMap[ret] = s; M_genericDisplay[ret] = strdup(counter); } else { M_revGenericMap[ret] = strdup(counter); M_genericDisplay[ret] = strdup(counter); } M_genericCounters = (unsigned long long *)realloc(M_genericCounters, sizeof(unsigned long long) * GENERIC_TYPES * M_genericMap.size()); if (!M_genericCounters) { ERROR("Could not allocate generic counters!"); } M_genericCounters[(ret - 1) * GENERIC_TYPES + GENERIC_C] = 0; M_genericCounters[(ret - 1) * GENERIC_TYPES + GENERIC_PD] = 0; M_genericCounters[(ret - 1)* GENERIC_TYPES + GENERIC_PL] = 0; return ret; } int CStat::findRtd(const char *name, bool start) { str_int_map::iterator it = M_rtdMap.find(str_int_map::key_type(name)); if (it != M_rtdMap.end()) { if (start) { rtd_started[it->first] = true; } else { rtd_stopped[it->first] = true; } return it->second; } int ret = M_rtdMap.size() + 1; M_rtdMap[str_int_map::key_type(name)] = ret; M_revRtdMap[ret] = strdup(name); M_rtdInfo = (unsigned long long *)realloc(M_rtdInfo, sizeof(unsigned long long) * RTD_TYPES * GENERIC_TYPES * M_rtdMap.size()); if (!M_rtdInfo) { ERROR("Could not allocate RTD info!"); } M_rtdInfo[((ret - 1) * RTD_TYPES * GENERIC_TYPES) + (GENERIC_C * RTD_TYPES) + RTD_COUNT] = 0; M_rtdInfo[((ret - 1) * RTD_TYPES * GENERIC_TYPES) + (GENERIC_C * RTD_TYPES) + RTD_SUM] = 0; M_rtdInfo[((ret - 1) * RTD_TYPES * GENERIC_TYPES) + (GENERIC_C * RTD_TYPES) + RTD_SUMSQ] = 0; M_rtdInfo[((ret - 1) * RTD_TYPES * GENERIC_TYPES) + (GENERIC_PD * RTD_TYPES) + RTD_COUNT] = 0; M_rtdInfo[((ret - 1) * RTD_TYPES * GENERIC_TYPES) + (GENERIC_PD * RTD_TYPES) + RTD_SUM] = 0; M_rtdInfo[((ret - 1) * RTD_TYPES * GENERIC_TYPES) + (GENERIC_PD * RTD_TYPES) + RTD_SUMSQ] = 0; M_rtdInfo[((ret - 1) * RTD_TYPES * GENERIC_TYPES) + (GENERIC_PL * RTD_TYPES) + RTD_COUNT] = 0; M_rtdInfo[((ret - 1) * RTD_TYPES * GENERIC_TYPES) + (GENERIC_PL * RTD_TYPES) + RTD_SUM] = 0; M_rtdInfo[((ret - 1) * RTD_TYPES * GENERIC_TYPES) + (GENERIC_PL * RTD_TYPES) + RTD_SUMSQ] = 0; M_ResponseTimeRepartition = (T_dynamicalRepartition **)realloc(M_ResponseTimeRepartition, sizeof(T_dynamicalRepartition *) * M_rtdMap.size()); if (!M_ResponseTimeRepartition) { ERROR("Could not allocate RTD info!"); } M_ResponseTimeRepartition[ret - 1] = NULL; if (start) { rtd_started[name] = true; } else { rtd_stopped[name] = true; } return ret; } int CStat::nRtds() { return M_rtdMap.size(); } /* If you start an RTD, then you should be interested in collecting statistics for it. */ void CStat::validateRtds() { for (str_int_map::iterator it = rtd_started.begin(); it != rtd_started.end(); it++) { str_int_map::iterator stopit = rtd_stopped.find(it->first); if (stopit == rtd_stopped.end() || !stopit->second) { ERROR("You have started Response Time Duration %s, but have never stopped it!", it->first.c_str()); } } } int CStat::computeStat (E_Action P_action, unsigned long P_value, int which) { switch (P_action) { case E_ADD_CALL_DURATION : // Updating Cumulative Counter updateAverageCounter(CPT_C_AverageCallLength_Sum, CPT_C_NbOfCallUsedForAverageCallLength, CPT_C_AverageCallLength_Squares, P_value); updateRepartition(M_CallLengthRepartition, M_SizeOfCallLengthRepartition, P_value); // Updating Periodical Diplayed counter updateAverageCounter(CPT_PD_AverageCallLength_Sum, CPT_PD_NbOfCallUsedForAverageCallLength, CPT_PD_AverageCallLength_Squares, P_value); // Updating Periodical Logging counter updateAverageCounter(CPT_PL_AverageCallLength_Sum, CPT_PL_NbOfCallUsedForAverageCallLength, CPT_PL_AverageCallLength_Squares, P_value); break; case E_ADD_GENERIC_COUNTER : M_genericCounters[which * GENERIC_TYPES + GENERIC_C] += P_value; M_genericCounters[which * GENERIC_TYPES + GENERIC_PD] += P_value; M_genericCounters[which * GENERIC_TYPES + GENERIC_PL] += P_value; break; case E_ADD_RESPONSE_TIME_DURATION : // Updating Cumulative Counter M_rtdInfo[(which * RTD_TYPES * GENERIC_TYPES) + (GENERIC_C * RTD_TYPES) + RTD_COUNT]++; M_rtdInfo[(which * RTD_TYPES * GENERIC_TYPES) + (GENERIC_C * RTD_TYPES) + RTD_SUM] += P_value; M_rtdInfo[(which * RTD_TYPES * GENERIC_TYPES) + (GENERIC_C * RTD_TYPES) + RTD_SUMSQ] += (P_value * P_value); updateRepartition(M_ResponseTimeRepartition[which], M_SizeOfResponseTimeRepartition, P_value); // Updating Periodical Diplayed counter M_rtdInfo[(which * RTD_TYPES * GENERIC_TYPES) + (GENERIC_PD * RTD_TYPES) + RTD_COUNT]++; M_rtdInfo[(which * RTD_TYPES * GENERIC_TYPES) + (GENERIC_PD * RTD_TYPES) + RTD_SUM] += P_value; M_rtdInfo[(which * RTD_TYPES * GENERIC_TYPES) + (GENERIC_PD * RTD_TYPES) + RTD_SUMSQ] += (P_value * P_value); // Updating Periodical Logging counter M_rtdInfo[(which * RTD_TYPES * GENERIC_TYPES) + (GENERIC_PL * RTD_TYPES) + RTD_COUNT]++; M_rtdInfo[(which * RTD_TYPES * GENERIC_TYPES) + (GENERIC_PL * RTD_TYPES) + RTD_SUM] += P_value; M_rtdInfo[(which * RTD_TYPES * GENERIC_TYPES) + (GENERIC_PL * RTD_TYPES) + RTD_SUMSQ] += (P_value * P_value); break; default : ERROR("CStat::ComputeStat() - Unrecognized Action %d", P_action); return (-1); } /* end switch */ return (0); } void CStat::updateRepartition(T_dynamicalRepartition* P_tabReport, int P_sizeOfTab, unsigned long P_value) { if(P_tabReport == NULL) { return; } for (int i = 0; i < P_sizeOfTab - 1; i++) { if (P_value < P_tabReport[i].borderMax) { P_tabReport[i].nbInThisBorder++; return; } } /* If this is not true, we never should have gotten here. */ assert(P_value >= P_tabReport[P_sizeOfTab-1].borderMax); P_tabReport[P_sizeOfTab-1].nbInThisBorder ++; } void CStat::resetRepartition(T_dynamicalRepartition* P_tabReport, int P_sizeOfTab) { if(P_tabReport == NULL) { return; } for (int i = 0; i < P_sizeOfTab; i++) { P_tabReport[i].nbInThisBorder = 0; } } CStat::CStat () { size_t L_size = 0; L_size += strlen(DEFAULT_FILE_NAME) ; L_size += strlen(DEFAULT_EXTENSION) ; L_size += 1 ; M_fileName = new char[L_size]; strcpy(M_fileName, DEFAULT_FILE_NAME); strcat(M_fileName, DEFAULT_EXTENSION); M_ResponseTimeRepartition = NULL; M_CallLengthRepartition = NULL; M_SizeOfResponseTimeRepartition = 0; M_SizeOfCallLengthRepartition = 0; M_fileNameRtt = NULL; M_genericCounters = NULL; M_time_ref = 0.0 ; M_dumpRespTime = NULL ; M_counterDumpRespTime = 0 ; M_dumpRespTime = NULL; M_fileNameRtt = NULL; M_rtdInfo = NULL; init(); } char* CStat::sRepartitionHeader(T_dynamicalRepartition * tabRepartition, int sizeOfTab, const char * P_repartitionName) { static char *repartitionHeader = NULL; char buffer[MAX_CHAR_BUFFER_SIZE]; int dlen = strlen(stat_delimiter); if(tabRepartition != NULL) { repartitionHeader = (char *)realloc(repartitionHeader, strlen(P_repartitionName) + dlen + 1); sprintf(repartitionHeader, "%s%s", P_repartitionName, stat_delimiter); for(int i=0; i<(sizeOfTab-1); i++) { sprintf(buffer, "%s_<%d%s", P_repartitionName, tabRepartition[i].borderMax, stat_delimiter); repartitionHeader = (char *)realloc(repartitionHeader, strlen(repartitionHeader) + strlen(buffer) + 1); strcat(repartitionHeader, buffer); } sprintf(buffer, "%s_>=%d%s", P_repartitionName, tabRepartition[sizeOfTab-1].borderMax, stat_delimiter); repartitionHeader = (char *)realloc(repartitionHeader, strlen(repartitionHeader) + strlen(buffer) + 1); strcat(repartitionHeader, buffer); } else { repartitionHeader = (char *)realloc(repartitionHeader, 2); strcpy(repartitionHeader, ""); } return(repartitionHeader); } char* CStat::sRepartitionInfo(T_dynamicalRepartition * tabRepartition, int sizeOfTab) { static char *repartitionInfo; char buffer[MAX_CHAR_BUFFER_SIZE]; int dlen = strlen(stat_delimiter); if(tabRepartition != NULL) { // if a repartition is present, this field match the repartition name repartitionInfo = (char *)realloc(repartitionInfo, dlen + 1); sprintf(repartitionInfo, "%s", stat_delimiter); for(int i=0; i<(sizeOfTab-1); i++) { sprintf(buffer, "%lu%s", tabRepartition[i].nbInThisBorder, stat_delimiter); repartitionInfo = (char *)realloc(repartitionInfo, strlen(repartitionInfo) + strlen(buffer) + 1); strcat(repartitionInfo, buffer); } sprintf(buffer, "%lu%s", tabRepartition[sizeOfTab-1].nbInThisBorder, stat_delimiter); repartitionInfo = (char *)realloc(repartitionInfo, strlen(repartitionInfo) + strlen(buffer) + 1); strcat(repartitionInfo, buffer); } else { repartitionInfo = (char *)realloc(repartitionInfo, 2); repartitionInfo[0] = '\0'; } return(repartitionInfo); } void CStat::displayRepartition(FILE *f, T_dynamicalRepartition * tabRepartition, int sizeOfTab) { if(tabRepartition != NULL) { for(int i=0; i<(sizeOfTab-1); i++) { if(i==0) { DISPLAY_REPART(0, tabRepartition[i].borderMax, tabRepartition[i].nbInThisBorder); } else { DISPLAY_REPART(tabRepartition[i-1].borderMax, tabRepartition[i].borderMax, tabRepartition[i].nbInThisBorder); } } DISPLAY_LAST_REPART (tabRepartition[sizeOfTab-1].borderMax, tabRepartition[sizeOfTab-1].nbInThisBorder); } else { DISPLAY_INFO (" "); } } void CStat::displayData (FILE *f) { long localElapsedTime, globalElapsedTime ; struct timeval currentTime; float averageCallRate; float realInstantCallRate; unsigned long numberOfCall; GET_TIME (¤tTime); // computing the real call rate globalElapsedTime = computeDiffTimeInMs (¤tTime, &M_startTime); localElapsedTime = computeDiffTimeInMs (¤tTime, &M_pdStartTime); // the call rate is for all the call : incoming and outgoing numberOfCall = M_counters[CPT_C_IncomingCallCreated] + M_counters[CPT_C_OutgoingCallCreated]; averageCallRate = (globalElapsedTime > 0 ? 1000*(float)numberOfCall/(float)globalElapsedTime : 0.0); numberOfCall = (M_counters[CPT_PD_IncomingCallCreated] + M_counters[CPT_PD_OutgoingCallCreated]); realInstantCallRate = (localElapsedTime > 0 ? 1000*(float)numberOfCall / (float)localElapsedTime : 0.0); // display info DISPLAY_DLINE (); // build and display header info DISPLAY_TXT ("Start Time ", formatTime(&M_startTime)); DISPLAY_TXT ("Last Reset Time", formatTime(&M_pdStartTime)); DISPLAY_TXT ("Current Time", formatTime(¤tTime)); // printing the header in the middle DISPLAY_CROSS_LINE(); DISPLAY_HEADER(); DISPLAY_CROSS_LINE(); DISPLAY_TXT_COL ("Elapsed Time", msToHHMMSSus(localElapsedTime), msToHHMMSSus(globalElapsedTime)); DISPLAY_VAL_RATEF_COL ("Call Rate", realInstantCallRate, averageCallRate); DISPLAY_CROSS_LINE (); DISPLAY_2VAL ("Incoming call created", M_counters[CPT_PD_IncomingCallCreated], M_counters[CPT_C_IncomingCallCreated]); DISPLAY_2VAL ("OutGoing call created", M_counters[CPT_PD_OutgoingCallCreated], M_counters[CPT_C_OutgoingCallCreated]); DISPLAY_CUMUL ("Total Call created", M_counters[CPT_C_IncomingCallCreated] + M_counters[CPT_C_OutgoingCallCreated]); DISPLAY_PERIO ("Current Call", M_counters[CPT_C_CurrentCall]); if (M_genericMap.size()) { DISPLAY_CROSS_LINE (); } for (unsigned int i = 1; i < M_genericMap.size() + 1; i++) { char *s = (char *)malloc(20 + strlen(M_genericDisplay[i])); sprintf(s, "Counter %s", M_genericDisplay[i]); DISPLAY_2VAL(s, M_genericCounters[(i - 1) * GENERIC_TYPES + GENERIC_PD], M_genericCounters[(i - 1) * GENERIC_TYPES + GENERIC_C]); free(s); } DISPLAY_CROSS_LINE (); DISPLAY_2VAL ("Successful call", M_counters[CPT_PD_SuccessfulCall], M_counters[CPT_C_SuccessfulCall]); DISPLAY_2VAL ("Failed call", M_counters[CPT_PD_FailedCall], M_counters[CPT_C_FailedCall]); // DISPLAY_2VAL ("Unexpected msg", // M_counters[CPT_PD_UnexpectedMessage], // M_counters[CPT_C_UnexpectedMessage]); DISPLAY_CROSS_LINE (); for (int i = 1; i <= nRtds(); i++) { char s[80]; /* Skip if we aren't stopped. */ assert(rtd_stopped[M_revRtdMap[i]] == true); sprintf(s, "Response Time %s", M_revRtdMap[i]); DISPLAY_TXT_COL (s, msToHHMMSSus( (unsigned long)computeRtdMean(i, GENERIC_PD)), msToHHMMSSus( (unsigned long)computeRtdMean(i, GENERIC_C))); } /* I Broke this! DISPLAY_TXT_COL ("Call Length", msToHHMMSSus( (unsigned long)computeMean(CPT_PD_AverageCallLength_Sum, CPT_PD_NbOfCallUsedForAverageCallLength)), msToHHMMSSus( (unsigned long)computeMean(CPT_C_AverageCallLength_Sum, CPT_C_NbOfCallUsedForAverageCallLength) )); */ DISPLAY_CROSS_LINE (); for (int i = 1; i <= nRtds(); i++) { displayRtdRepartition(f, i); } DISPLAY_INFO("Average Call Length Repartition"); displayRepartition(f, M_CallLengthRepartition, M_SizeOfCallLengthRepartition); // DISPLAY_VAL ("NbCall Average RT(P)", // M_counters[CPT_PD_NbOfCallUsedForAverageResponseTime]); // DISPLAY_VAL ("NbCall Average RT", // M_counters[CPT_C_NbOfCallUsedForAverageResponseTime]); // DISPLAY_VAL ("NbCall Average CL", // M_counters[CPT_C_NbOfCallUsedForAverageCallLength]); // DISPLAY_VAL ("NbCall Average CL(P)", // M_counters[CPT_PD_NbOfCallUsedForAverageCallLength]); DISPLAY_DLINE (); fflush(f); } /* end of displayData () */ void CStat::displayStat (FILE *f) { long localElapsedTime, globalElapsedTime ; struct timeval currentTime; float averageCallRate; float realInstantCallRate; unsigned long numberOfCall; GET_TIME (¤tTime); // computing the real call rate globalElapsedTime = computeDiffTimeInMs (¤tTime, &M_startTime); localElapsedTime = computeDiffTimeInMs (¤tTime, &M_pdStartTime); // the call rate is for all the call : incoming and outgoing numberOfCall = (M_counters[CPT_C_IncomingCallCreated] + M_counters[CPT_C_OutgoingCallCreated]); averageCallRate = (globalElapsedTime > 0 ? 1000*(float)numberOfCall/(float)globalElapsedTime : 0.0); numberOfCall = (M_counters[CPT_PD_IncomingCallCreated] + M_counters[CPT_PD_OutgoingCallCreated]); realInstantCallRate = (localElapsedTime > 0 ? 1000*(float)numberOfCall / (float)localElapsedTime : 0.0); // build and display header info DISPLAY_TXT ("Start Time ", formatTime(&M_startTime)); DISPLAY_TXT ("Last Reset Time", formatTime(&M_pdStartTime)); DISPLAY_TXT ("Current Time", formatTime(¤tTime)); // printing the header in the middle DISPLAY_CROSS_LINE(); DISPLAY_HEADER(); DISPLAY_CROSS_LINE(); DISPLAY_TXT_COL ("Elapsed Time", msToHHMMSSus(localElapsedTime), msToHHMMSSus(globalElapsedTime)); DISPLAY_VAL_RATEF_COL ("Call Rate", realInstantCallRate, averageCallRate); DISPLAY_CROSS_LINE (); DISPLAY_2VAL ("Incoming call created", M_counters[CPT_PD_IncomingCallCreated], M_counters[CPT_C_IncomingCallCreated]); DISPLAY_2VAL ("OutGoing call created", M_counters[CPT_PD_OutgoingCallCreated], M_counters[CPT_C_OutgoingCallCreated]); DISPLAY_CUMUL ("Total Call created", M_counters[CPT_C_IncomingCallCreated] + M_counters[CPT_C_OutgoingCallCreated]); DISPLAY_PERIO ("Current Call", M_counters[CPT_C_CurrentCall]); if (M_genericMap.size()) { DISPLAY_CROSS_LINE (); } for (unsigned int i = 1; i < M_genericMap.size() + 1; i++) { char *s = (char *)malloc(20 + strlen(M_genericDisplay[i])); sprintf(s, "Counter %s", M_genericDisplay[i]); DISPLAY_2VAL(s, M_genericCounters[(i - 1)* GENERIC_TYPES + GENERIC_PD], M_genericCounters[(i - 1) * GENERIC_TYPES + GENERIC_C]); free(s); } DISPLAY_CROSS_LINE (); DISPLAY_2VAL ("Successful call", M_counters[CPT_PD_SuccessfulCall], M_counters[CPT_C_SuccessfulCall]); DISPLAY_2VAL ("Failed call", M_counters[CPT_PD_FailedCall], M_counters[CPT_C_FailedCall]); //DISPLAY_2VAL ("Unexpected msg", // M_counters[CPT_PD_UnexpectedMessage], // M_counters[CPT_C_UnexpectedMessage]); DISPLAY_CROSS_LINE (); for (int i = 1; i <= nRtds(); i++) { char s[80]; sprintf(s, "Response Time %s", M_revRtdMap[i]); DISPLAY_TXT_COL (s, msToHHMMSSus( (unsigned long)computeRtdMean(i, GENERIC_PD)), msToHHMMSSus( (unsigned long)computeRtdMean(i, GENERIC_C))); } DISPLAY_TXT_COL ("Call Length", msToHHMMSSus( (unsigned long)computeMean(CPT_PD_AverageCallLength_Sum, CPT_PD_NbOfCallUsedForAverageCallLength ) ), msToHHMMSSus( (unsigned long)computeMean(CPT_C_AverageCallLength_Sum, CPT_C_NbOfCallUsedForAverageCallLength) )); fflush(f); } void CStat::displayRepartition (FILE *f) { displayRtdRepartition(f, 1); DISPLAY_INFO("Average Call Length Repartition"); displayRepartition(f, M_CallLengthRepartition, M_SizeOfCallLengthRepartition); } void CStat::displayRtdRepartition (FILE *f, int which) { if (which > nRtds()) { DISPLAY_INFO (" "); return; } char s[80]; snprintf(s, sizeof(s), "Average Response Time Repartition %s", M_revRtdMap[which]); DISPLAY_INFO(s); displayRepartition(f, M_ResponseTimeRepartition[which - 1], M_SizeOfResponseTimeRepartition); } void CStat::dumpData () { long localElapsedTime, globalElapsedTime ; struct timeval currentTime; float averageCallRate; float realInstantCallRate; unsigned long numberOfCall; // computing the real call rate GET_TIME (¤tTime); globalElapsedTime = computeDiffTimeInMs (¤tTime, &M_startTime); localElapsedTime = computeDiffTimeInMs (¤tTime, &M_plStartTime); // the call rate is for all the call : incoming and outgoing numberOfCall = (M_counters[CPT_C_IncomingCallCreated] + M_counters[CPT_C_OutgoingCallCreated]); averageCallRate = (globalElapsedTime > 0 ? 1000*(float)numberOfCall/(float)globalElapsedTime : 0.0); numberOfCall = (M_counters[CPT_PL_IncomingCallCreated] + M_counters[CPT_PL_OutgoingCallCreated]); realInstantCallRate = (localElapsedTime > 0 ? 1000*(float)numberOfCall / (float)localElapsedTime : 0.0); if(M_outputStream == NULL) { // if the file is still not opened, we opened it now M_outputStream = new ofstream(M_fileName); M_headerAlreadyDisplayed = false; if(M_outputStream == NULL) { cerr << "Unable to open stat file '" << M_fileName << "' !" << endl; exit(EXIT_FATAL_ERROR); } #ifndef __osf__ if(!M_outputStream->is_open()) { cerr << "Unable to open stat file '" << M_fileName << "' !" << endl; exit(EXIT_FATAL_ERROR); } #endif } if(M_headerAlreadyDisplayed == false) { // header - it's dump in file only one time at the beginning of the file (*M_outputStream) << "StartTime" << stat_delimiter << "LastResetTime" << stat_delimiter << "CurrentTime" << stat_delimiter << "ElapsedTime(P)" << stat_delimiter << "ElapsedTime(C)" << stat_delimiter << "TargetRate" << stat_delimiter << "CallRate(P)" << stat_delimiter << "CallRate(C)" << stat_delimiter << "IncomingCall(P)" << stat_delimiter << "IncomingCall(C)" << stat_delimiter << "OutgoingCall(P)" << stat_delimiter << "OutgoingCall(C)" << stat_delimiter << "TotalCallCreated" << stat_delimiter << "CurrentCall" << stat_delimiter << "SuccessfulCall(P)" << stat_delimiter << "SuccessfulCall(C)" << stat_delimiter << "FailedCall(P)" << stat_delimiter << "FailedCall(C)" << stat_delimiter << "FailedCannotSendMessage(P)" << stat_delimiter << "FailedCannotSendMessage(C)" << stat_delimiter << "FailedMaxUDPRetrans(P)" << stat_delimiter << "FailedMaxUDPRetrans(C)" << stat_delimiter << "FailedTcpConnect(P)" << stat_delimiter << "FailedTcpConnect(C)" << stat_delimiter << "FailedTcpClosed(P)" << stat_delimiter << "FailedTcpClosed(C)" << stat_delimiter << "FailedUnexpectedMessage(P)" << stat_delimiter << "FailedUnexpectedMessage(C)" << stat_delimiter << "FailedCallRejected(P)" << stat_delimiter << "FailedCallRejected(C)" << stat_delimiter << "FailedCmdNotSent(P)" << stat_delimiter << "FailedCmdNotSent(C)" << stat_delimiter << "FailedRegexpDoesntMatch(P)" << stat_delimiter << "FailedRegexpDoesntMatch(C)" << stat_delimiter << "FailedRegexpShouldntMatch(P)" << stat_delimiter << "FailedRegexpShouldntMatch(C)" << stat_delimiter << "FailedRegexpHdrNotFound(P)" << stat_delimiter << "FailedRegexpHdrNotFound(C)" << stat_delimiter << "FailedOutboundCongestion(P)" << stat_delimiter << "FailedOutboundCongestion(C)" << stat_delimiter << "FailedTimeoutOnRecv(P)" << stat_delimiter << "FailedTimeoutOnRecv(C)" << stat_delimiter << "FailedTimeoutOnSend(P)" << stat_delimiter << "FailedTimeoutOnSend(C)" << stat_delimiter << "FailedTestDoesntMatch(P)" << stat_delimiter << "FailedTestDoesntMatch(C)" << stat_delimiter << "FailedTestShouldntMatch(P)" << stat_delimiter << "FailedTestShouldntMatch(C)" << stat_delimiter << "FailedStrcmpDoesntMatch(P)" << stat_delimiter << "FailedStrcmpDoesntMatch(C)" << stat_delimiter << "FailedStrcmpShouldntMatch(P)" << stat_delimiter << "FailedStrcmpShouldntMatch(C)" << stat_delimiter << "OutOfCallMsgs(P)" << stat_delimiter << "OutOfCallMsgs(C)" << stat_delimiter << "DeadCallMsgs(P)" << stat_delimiter << "DeadCallMsgs(C)" << stat_delimiter << "Retransmissions(P)" << stat_delimiter << "Retransmissions(C)" << stat_delimiter << "AutoAnswered(P)" << stat_delimiter << "AutoAnswered(C)" << stat_delimiter << "Warnings(P)" << stat_delimiter << "Warnings(C)" << stat_delimiter << "FatalErrors(P)" << stat_delimiter << "FatalErrors(C)" << stat_delimiter << "WatchdogMajor(P)" << stat_delimiter << "WatchdogMajor(C)" << stat_delimiter << "WatchdogMinor(P)" << stat_delimiter << "WatchdogMinor(C)" << stat_delimiter; for (int i = 1; i <= nRtds(); i++) { char s_P[80]; char s_C[80]; sprintf(s_P, "ResponseTime%s(P)%s", M_revRtdMap[i], stat_delimiter); sprintf(s_C, "ResponseTime%s(C)%s", M_revRtdMap[i], stat_delimiter); (*M_outputStream) << s_P << s_C; sprintf(s_P, "ResponseTime%sStDev(P)%s", M_revRtdMap[i], stat_delimiter); sprintf(s_C, "ResponseTime%sStDev(C)%s", M_revRtdMap[i], stat_delimiter); (*M_outputStream) << s_P << s_C; } (*M_outputStream) << "CallLength(P)" << stat_delimiter << "CallLength(C)" << stat_delimiter; (*M_outputStream) << "CallLengthStDev(P)" << stat_delimiter << "CallLengthStDev(C)" << stat_delimiter; for (unsigned int i = 1; i < M_genericMap.size() + 1; i++) { (*M_outputStream) << M_revGenericMap[i] << "(P)" << stat_delimiter; (*M_outputStream) << M_revGenericMap[i] << "(C)" << stat_delimiter; } for (int i = 1; i <= nRtds(); i++) { char s[80]; sprintf(s, "ResponseTimeRepartition%s", M_revRtdMap[i]); (*M_outputStream) << sRepartitionHeader(M_ResponseTimeRepartition[i - 1], M_SizeOfResponseTimeRepartition, s); } (*M_outputStream) << sRepartitionHeader(M_CallLengthRepartition, M_SizeOfCallLengthRepartition, "CallLengthRepartition"); (*M_outputStream) << endl; M_headerAlreadyDisplayed = true; } // content (*M_outputStream) << formatTime(&M_startTime) << stat_delimiter; (*M_outputStream) << formatTime(&M_plStartTime) << stat_delimiter; (*M_outputStream) << formatTime(¤tTime) << stat_delimiter << msToHHMMSS(localElapsedTime) << stat_delimiter; (*M_outputStream) << msToHHMMSS(globalElapsedTime) << stat_delimiter; if (users >= 0) { (*M_outputStream) << users << stat_delimiter; } else { (*M_outputStream) << rate << stat_delimiter; } (*M_outputStream) << realInstantCallRate << stat_delimiter << averageCallRate << stat_delimiter << M_counters[CPT_PL_IncomingCallCreated] << stat_delimiter << M_counters[CPT_C_IncomingCallCreated] << stat_delimiter << M_counters[CPT_PL_OutgoingCallCreated] << stat_delimiter << M_counters[CPT_C_OutgoingCallCreated] << stat_delimiter << (M_counters[CPT_C_IncomingCallCreated]+ M_counters[CPT_C_OutgoingCallCreated])<< stat_delimiter << M_counters[CPT_C_CurrentCall] << stat_delimiter << M_counters[CPT_PL_SuccessfulCall] << stat_delimiter << M_counters[CPT_C_SuccessfulCall] << stat_delimiter << M_counters[CPT_PL_FailedCall] << stat_delimiter << M_counters[CPT_C_FailedCall] << stat_delimiter << M_counters[CPT_PL_FailedCallCannotSendMessage] << stat_delimiter << M_counters[CPT_C_FailedCallCannotSendMessage] << stat_delimiter << M_counters[CPT_PL_FailedCallMaxUdpRetrans] << stat_delimiter << M_counters[CPT_C_FailedCallMaxUdpRetrans ] << stat_delimiter << M_counters[CPT_PL_FailedCallTcpConnect] << stat_delimiter << M_counters[CPT_C_FailedCallTcpConnect] << stat_delimiter << M_counters[CPT_PL_FailedCallTcpClosed] << stat_delimiter << M_counters[CPT_C_FailedCallTcpClosed] << stat_delimiter << M_counters[CPT_PL_FailedCallUnexpectedMessage] << stat_delimiter << M_counters[CPT_C_FailedCallUnexpectedMessage] << stat_delimiter << M_counters[CPT_PL_FailedCallCallRejected] << stat_delimiter << M_counters[CPT_C_FailedCallCallRejected] << stat_delimiter << M_counters[CPT_PL_FailedCallCmdNotSent] << stat_delimiter << M_counters[CPT_C_FailedCallCmdNotSent] << stat_delimiter << M_counters[CPT_PL_FailedCallRegexpDoesntMatch] << stat_delimiter << M_counters[CPT_C_FailedCallRegexpDoesntMatch] << stat_delimiter << M_counters[CPT_PL_FailedCallRegexpShouldntMatch] << stat_delimiter << M_counters[CPT_C_FailedCallRegexpShouldntMatch] << stat_delimiter << M_counters[CPT_PL_FailedCallRegexpHdrNotFound] << stat_delimiter << M_counters[CPT_C_FailedCallRegexpHdrNotFound] << stat_delimiter << M_counters[CPT_PL_FailedOutboundCongestion] << stat_delimiter << M_counters[CPT_C_FailedOutboundCongestion] << stat_delimiter << M_counters[CPT_PL_FailedTimeoutOnRecv] << stat_delimiter << M_counters[CPT_C_FailedTimeoutOnRecv] << stat_delimiter << M_counters[CPT_PL_FailedTimeoutOnSend] << stat_delimiter << M_counters[CPT_C_FailedTimeoutOnSend] << stat_delimiter << M_counters[CPT_PL_FailedCallTestDoesntMatch] << stat_delimiter << M_counters[CPT_C_FailedCallTestDoesntMatch] << stat_delimiter << M_counters[CPT_PL_FailedCallTestShouldntMatch] << stat_delimiter << M_counters[CPT_C_FailedCallTestShouldntMatch] << stat_delimiter << M_counters[CPT_PL_FailedCallStrcmpDoesntMatch] << stat_delimiter << M_counters[CPT_C_FailedCallStrcmpDoesntMatch] << stat_delimiter << M_counters[CPT_PL_FailedCallStrcmpShouldntMatch] << stat_delimiter << M_counters[CPT_C_FailedCallStrcmpShouldntMatch] << stat_delimiter << M_G_counters[CPT_G_PL_OutOfCallMsgs - E_NB_COUNTER - 1] << stat_delimiter << M_G_counters[CPT_G_C_OutOfCallMsgs - E_NB_COUNTER - 1] << stat_delimiter << M_G_counters[CPT_G_PL_DeadCallMsgs - E_NB_COUNTER - 1] << stat_delimiter << M_G_counters[CPT_G_C_DeadCallMsgs - E_NB_COUNTER - 1] << stat_delimiter << M_counters[CPT_PL_Retransmissions] << stat_delimiter << M_counters[CPT_C_Retransmissions] << stat_delimiter << M_G_counters[CPT_G_PL_AutoAnswered - E_NB_COUNTER - 1] << stat_delimiter << M_G_counters[CPT_G_C_AutoAnswered - E_NB_COUNTER - 1] << stat_delimiter << M_G_counters[CPT_G_PL_Warnings - E_NB_COUNTER - 1] << stat_delimiter << M_G_counters[CPT_G_C_Warnings - E_NB_COUNTER - 1] << stat_delimiter << M_G_counters[CPT_G_PL_FatalErrors - E_NB_COUNTER - 1] << stat_delimiter << M_G_counters[CPT_G_C_FatalErrors - E_NB_COUNTER - 1] << stat_delimiter << M_G_counters[CPT_G_PL_WatchdogMajor - E_NB_COUNTER - 1] << stat_delimiter << M_G_counters[CPT_G_C_WatchdogMajor - E_NB_COUNTER - 1] << stat_delimiter << M_G_counters[CPT_G_PL_WatchdogMinor - E_NB_COUNTER - 1] << stat_delimiter << M_G_counters[CPT_G_C_WatchdogMinor - E_NB_COUNTER - 1] << stat_delimiter; // SF917289 << M_counters[CPT_C_UnexpectedMessage] << stat_delimiter; for (int i = 1; i <= nRtds(); i++) { (*M_outputStream) << msToHHMMSSus( (unsigned long)computeRtdMean(i, GENERIC_PL)) << stat_delimiter; (*M_outputStream) << msToHHMMSSus( (unsigned long)computeRtdMean(i, GENERIC_C)) << stat_delimiter; (*M_outputStream) << msToHHMMSSus( (unsigned long)computeRtdStdev(i, GENERIC_PL)) << stat_delimiter; (*M_outputStream) << msToHHMMSSus( (unsigned long)computeRtdStdev(i, GENERIC_C)) << stat_delimiter; } (*M_outputStream) << msToHHMMSSus( (unsigned long)computeMean(CPT_PL_AverageCallLength_Sum, CPT_PL_NbOfCallUsedForAverageCallLength) ) << stat_delimiter; (*M_outputStream) << msToHHMMSSus( (unsigned long)computeMean(CPT_C_AverageCallLength_Sum, CPT_C_NbOfCallUsedForAverageCallLength) ) << stat_delimiter; (*M_outputStream) << msToHHMMSSus( (unsigned long)computeStdev(CPT_PL_AverageCallLength_Sum, CPT_PL_NbOfCallUsedForAverageCallLength, CPT_PL_AverageCallLength_Squares )) << stat_delimiter; (*M_outputStream) << msToHHMMSSus( (unsigned long)computeStdev(CPT_C_AverageCallLength_Sum, CPT_C_NbOfCallUsedForAverageCallLength, CPT_C_AverageCallLength_Squares )) << stat_delimiter; for (unsigned int i = 0; i < M_genericMap.size(); i++) { (*M_outputStream) << M_genericCounters[GENERIC_TYPES * i + GENERIC_PL] << stat_delimiter; (*M_outputStream) << M_genericCounters[GENERIC_TYPES * i + GENERIC_C] << stat_delimiter; } for (int i = 0; i < nRtds(); i++) { (*M_outputStream) << sRepartitionInfo(M_ResponseTimeRepartition[i], M_SizeOfResponseTimeRepartition); } (*M_outputStream) << sRepartitionInfo(M_CallLengthRepartition, M_SizeOfCallLengthRepartition); (*M_outputStream) << endl; // flushing the output file to let the tail -f working ! (*M_outputStream).flush(); } /* end of logData () */ void CStat::dumpDataRtt () { if(M_outputStreamRtt == NULL) { // if the file is still not opened, we opened it now M_outputStreamRtt = new ofstream(M_fileNameRtt); M_headerAlreadyDisplayedRtt = false; if(M_outputStreamRtt == NULL) { cerr << "Unable to open rtt file '" << M_fileNameRtt << "' !" << endl; exit(EXIT_FATAL_ERROR); } #ifndef __osf__ if(!M_outputStreamRtt->is_open()) { cerr << "Unable to open rtt file '" << M_fileNameRtt << "' !" << endl; exit(EXIT_FATAL_ERROR); } #endif } if(M_headerAlreadyDisplayedRtt == false) { (*M_outputStreamRtt) << "Date_ms" << stat_delimiter << "response_time_ms" << stat_delimiter << "rtd_no" << endl; M_headerAlreadyDisplayedRtt = true; } for (unsigned int L_i = 0; L_i < M_counterDumpRespTime ; L_i ++) { (*M_outputStreamRtt) << M_dumpRespTime[L_i].date << stat_delimiter ; (*M_outputStreamRtt) << M_dumpRespTime[L_i].rtt << stat_delimiter ; (*M_outputStreamRtt) << M_revRtdMap[M_dumpRespTime[L_i].rtd_no] << endl; (*M_outputStreamRtt).flush(); M_dumpRespTime[L_i].date = 0.0; M_dumpRespTime[L_i].rtt = 0.0; M_dumpRespTime[L_i].rtd_no = 0; } // flushing the output file (*M_outputStreamRtt).flush(); M_counterDumpRespTime = 0; } /* Time Gestion */ char* CStat::msToHHMMSS (unsigned long P_ms) { static char L_time [TIME_LENGTH]; unsigned long hh, mm, ss; P_ms = P_ms / 1000; hh = P_ms / 3600; mm = (P_ms - hh * 3600) / 60; ss = P_ms - (hh * 3600) - (mm * 60); sprintf (L_time, "%2.2lu:%2.2lu:%2.2lu", hh, mm, ss); return (L_time); } /* end of msToHHMMSS */ char* CStat::msToHHMMSSus (unsigned long P_ms) { static char L_time [TIME_LENGTH]; unsigned long sec, hh, mm, ss, us; sec = P_ms / 1000; hh = sec / 3600; mm = (sec - hh * 3600) / 60; ss = sec - (hh * 3600) - (mm * 60); us = 1000*(P_ms - (hh * 3600000) - (mm * 60000) - (ss*1000)); sprintf (L_time, "%2.2lu:%2.2lu:%2.2lu:%06lu", hh, mm, ss, us); return (L_time); } /* end of msToHHMMSSus */ char* CStat::formatTime (struct timeval* P_tv, bool with_epoch) { static char L_time [TIME_LENGTH]; struct tm * L_currentDate; // Get the current date and time L_currentDate = localtime ((const time_t *)&P_tv->tv_sec); // Format the time if (L_currentDate == NULL) { memset (L_time, 0, TIME_LENGTH); } else { if (with_epoch) { sprintf(L_time, "%4.4d-%2.2d-%2.2d %2.2d:%2.2d:%2.2d.%06ld", L_currentDate->tm_year + 1900, L_currentDate->tm_mon + 1, L_currentDate->tm_mday, L_currentDate->tm_hour, L_currentDate->tm_min, L_currentDate->tm_sec, (long)P_tv->tv_usec); } else { sprintf(L_time, "%4.4d-%2.2d-%2.2d\t%2.2d:%2.2d:%2.2d.%06ld\t%10.10ld.%06ld", L_currentDate->tm_year + 1900, L_currentDate->tm_mon + 1, L_currentDate->tm_mday, L_currentDate->tm_hour, L_currentDate->tm_min, L_currentDate->tm_sec, (long)P_tv->tv_usec, (long)P_tv->tv_sec, /* time_t is int on some bsds */ (long)P_tv->tv_usec); } } return (L_time); } /* end of formatTime */ long CStat::computeDiffTimeInMs (struct timeval* tf, struct timeval* ti) { long v1, v2; v1 = tf->tv_sec - ti->tv_sec; v2 = tf->tv_usec - ti->tv_usec; if (v2 < 0) v2 += 1000000, v1--; return (v1*1000 + v2/1000); } CSample::~CSample() { } /* Implementation of a fixed distribution. */ CFixed::CFixed(double value) { this->value = value; } double CFixed::sample() { return value; } int CFixed::textDescr(char *s, int len) { return snprintf(s, len, "%lf", value); } int CFixed::timeDescr(char *s, int len) { return time_string(value, s, len); } double CFixed::cdfInv(double /*percentile*/) { return value; } /* Implementation of the default pause time. */ CDefaultPause::CDefaultPause() { } double CDefaultPause::sample() { return (double)duration; } int CDefaultPause::textDescr(char *s, int len) { return snprintf(s, len, "%d", duration); } int CDefaultPause::timeDescr(char *s, int len) { return time_string(duration, s, len); } double CDefaultPause::cdfInv(double /*percentile*/) { return duration; } /* Implementation of a uniform distribution. */ static bool uniform_init = false; CUniform::CUniform(double min, double max) { if (!uniform_init) { uniform_init = true; srand(time(NULL)); } this->min = min; this->max = max; } double CUniform::sample() { double rval = ((double)rand())/((double)RAND_MAX); return min + (rval * (max - min)); } int CUniform::textDescr(char *s, int len) { return snprintf(s, len, "%lf/%lf", min, max); } int CUniform::timeDescr(char *s, int len) { int used = time_string(min, s, len); used += snprintf(s + used, len - used, "/"); used += time_string(max, s + used, len - used); return used; } double CUniform::cdfInv(double percentile) { return min + (max * percentile); } #ifdef HAVE_GSL gsl_rng *gsl_init() { static gsl_rng *rng = NULL; if (rng) { return rng; } gsl_rng_env_setup(); rng = gsl_rng_alloc(gsl_rng_default); if (!rng) { ERROR("Could not initialize GSL random number generator"); } return rng; } /* Normal distribution. */ CNormal::CNormal(double mean, double stdev) { this->mean = mean; this->stdev = stdev; rng = gsl_init(); } double CNormal::sample() { double val = gsl_ran_gaussian(rng, stdev); return val + mean; } int CNormal::textDescr(char *s, int len) { return snprintf(s, len, "N(%.3lf,%.3lf)", mean, stdev); } int CNormal::timeDescr(char *s, int len) { int used = 0; used += snprintf(s, len, "N("); used += time_string(mean, s + used, len - used); used += snprintf(s + used, len - used, ","); used += time_string(stdev, s + used, len - used); used += snprintf(s + used, len - used, ")"); return used; } double CNormal::cdfInv(double percentile) { return mean + gsl_cdf_gaussian_Pinv(percentile, stdev); } /* Lognormal distribution. */ double CLogNormal::sample() { return gsl_ran_lognormal(rng, mean, stdev); } int CLogNormal::textDescr(char *s, int len) { if (len == 0) return 0; s[0] = 'L'; return 1 + this->CNormal::textDescr(s + 1, len - 1); } int CLogNormal::timeDescr(char *s, int len) { if (len == 0) return 0; s[0] = 'L'; return 1 + this->CNormal::timeDescr(s + 1, len - 1); } double CLogNormal::cdfInv(double percentile) { return gsl_cdf_lognormal_Pinv(percentile, mean, stdev); } /* Exponential distribution. */ CExponential::CExponential(double mean) { this->mean = mean; rng = gsl_init(); } double CExponential::sample() { return gsl_ran_exponential(rng, mean); } int CExponential::textDescr(char *s, int len) { return snprintf(s, len, "Exp(%lf)", mean); } int CExponential::timeDescr(char *s, int len) { int used = snprintf(s, len, "Exp("); used += time_string(mean, s + used, len - used); used += snprintf(s + used, len - used, ")"); return used; } double CExponential::cdfInv(double percentile) { return gsl_cdf_exponential_Pinv(percentile, mean); } /* Weibull distribution. */ CWeibull::CWeibull(double lambda, double k) { this->lambda = lambda; this->k = k; rng = gsl_init(); } double CWeibull::sample() { return gsl_ran_weibull(rng, lambda, k); } int CWeibull::textDescr(char *s, int len) { return snprintf(s, len, "Wb(%.3lf,%.3lf)", lambda, k); } int CWeibull::timeDescr(char *s, int len) { int used = 0; used += snprintf(s, len, "Wb("); used += time_string(lambda, s + used, len - used); used += snprintf(s + used, len - used, ","); used += time_string(k, s + used, len - used); used += snprintf(s + used, len - used, ")"); return used; } double CWeibull::cdfInv(double percentile) { return gsl_cdf_weibull_Pinv(percentile, lambda, k); } /* Pareto distribution. */ CPareto::CPareto(double k, double xsubm) { this->k = k; this->xsubm = xsubm; rng = gsl_init(); } double CPareto::sample() { return gsl_ran_pareto(rng, k, xsubm); } int CPareto::textDescr(char *s, int len) { return snprintf(s, len, "P(%.3lf,%.3lf)", k, xsubm); } int CPareto::timeDescr(char *s, int len) { int used = 0; used += snprintf(s, len, "P("); used += time_string(k, s + used, len - used); used += snprintf(s + used, len - used, ","); used += time_string(xsubm, s + used, len - used); used += snprintf(s + used, len - used, ")"); return used; } double CPareto::cdfInv(double percentile) { return gsl_cdf_pareto_Pinv(percentile, k, xsubm); } /* Generalized Pareto distribution. */ CGPareto::CGPareto(double shape, double scale, double location) { this->shape = shape; this->scale = scale; this->location = location; rng = gsl_init(); } double CGPareto::sample() { return cdfInv(gsl_ran_flat(rng, 0.0, 1.0)); } int CGPareto::textDescr(char *s, int len) { return snprintf(s, len, "P(%.3lf,%.3lf,%.3f)", shape, scale, location); } int CGPareto::timeDescr(char *s, int len) { int used = 0; used += snprintf(s, len, "P("); used += time_string(shape, s + used, len - used); used += snprintf(s + used, len - used, ","); used += time_string(scale, s + used, len - used); used += snprintf(s + used, len - used, ","); used += time_string(location, s + used, len - used); used += snprintf(s + used, len - used, ")"); return used; } double CGPareto::cdfInv(double percentile) { return location + ((scale * (pow(percentile, -shape) - 1))/shape); } /* Gamma distribution. */ CGamma::CGamma(double k, double theta) { this->k = k; this->theta = theta; rng = gsl_init(); } double CGamma::sample() { return gsl_ran_gamma(rng, k, theta); } int CGamma::textDescr(char *s, int len) { return snprintf(s, len, "G(%.3lf,%.3lf)", k, theta); } int CGamma::timeDescr(char *s, int len) { int used = 0; used += snprintf(s, len, "G("); used += time_string(k, s + used, len - used); used += snprintf(s + used, len - used, ","); used += time_string(theta, s + used, len - used); used += snprintf(s + used, len - used, ")"); return used; } double CGamma::cdfInv(double percentile) { return gsl_cdf_gamma_Pinv(percentile, k, theta); } /* NegBin distribution. */ CNegBin::CNegBin(double p, double n) { this->p = p; this->n = n; rng = gsl_init(); } double CNegBin::sample() { return gsl_ran_negative_binomial(rng, n, p); } int CNegBin::textDescr(char *s, int len) { return snprintf(s, len, "NB(%.3lf,%.3lf)", p, n); } int CNegBin::timeDescr(char *s, int len) { int used = 0; used += snprintf(s, len, "NB("); used += time_string(p, s + used, len - used); used += snprintf(s + used, len - used, ","); used += time_string(n, s + used, len - used); used += snprintf(s + used, len - used, ")"); return used; } /* We really don't implement this, but should so that sanity checking will * work. For now, just return zero. */ double CNegBin::cdfInv(double percentile) { return 0; } #endif sipp-3.6.0/src/milenage.c0000644000175000017500000001721013475544015014576 0ustar walterwalter/*------------------------------------------------------------------- * Example algorithms f1, f1*, f2, f3, f4, f5, f5* *------------------------------------------------------------------- * * A sample implementation of the example 3GPP authentication and * key agreement functions f1, f1*, f2, f3, f4, f5 and f5*. This is * a byte-oriented implementation of the functions, and of the block * cipher kernel function Rijndael. * * This has been coded for clarity, not necessarily for efficiency. * * The functions f2, f3, f4 and f5 share the same inputs and have * been coded together as a single function. f1, f1* and f5* are * all coded separately. * *-----------------------------------------------------------------*/ #include "milenage.h" #include "rijndael.h" #include /*--------------------------- prototypes --------------------------*/ /*------------------------------------------------------------------- * Algorithm f1 *------------------------------------------------------------------- * * Computes network authentication code MAC-A from key K, random * challenge RAND, sequence number SQN and authentication management * field AMF. * *-----------------------------------------------------------------*/ void f1(uint8_t k[16], uint8_t rand[16], uint8_t sqn[6], uint8_t amf[2], uint8_t mac_a[8], uint8_t op[16]) { uint8_t op_c[16]; uint8_t temp[16]; uint8_t in1[16]; uint8_t out1[16]; uint8_t rijndaelInput[16]; uint8_t i; RijndaelKeySchedule( k ); ComputeOPc( op_c, op ); for (i=0; i<16; i++) rijndaelInput[i] = rand[i] ^ op_c[i]; RijndaelEncrypt( rijndaelInput, temp ); for (i=0; i<6; i++) { in1[i] = sqn[i]; in1[i+8] = sqn[i]; } for (i=0; i<2; i++) { in1[i+6] = amf[i]; in1[i+14] = amf[i]; } /* XOR op_c and in1, rotate by r1=64, and XOR * * on the constant c1 (which is all zeroes) */ for (i=0; i<16; i++) rijndaelInput[(i+8) % 16] = in1[i] ^ op_c[i]; /* XOR on the value temp computed before */ for (i=0; i<16; i++) rijndaelInput[i] ^= temp[i]; RijndaelEncrypt( rijndaelInput, out1 ); for (i=0; i<16; i++) out1[i] ^= op_c[i]; for (i=0; i<8; i++) mac_a[i] = out1[i]; return; } /* end of function f1 */ /*------------------------------------------------------------------- * Algorithms f2-f5 *------------------------------------------------------------------- * * Takes key K and random challenge RAND, and returns response RES, * confidentiality key CK, integrity key IK and anonymity key AK. * *-----------------------------------------------------------------*/ void f2345(uint8_t k[16], uint8_t rand[16], uint8_t res[8], uint8_t ck[16], uint8_t ik[16], uint8_t ak[6], uint8_t op[16]) { uint8_t op_c[16]; uint8_t temp[16]; uint8_t out[16]; uint8_t rijndaelInput[16]; uint8_t i; RijndaelKeySchedule( k ); ComputeOPc( op_c, op ); for (i=0; i<16; i++) rijndaelInput[i] = rand[i] ^ op_c[i]; RijndaelEncrypt( rijndaelInput, temp ); /* To obtain output block OUT2: XOR OPc and TEMP, * * rotate by r2=0, and XOR on the constant c2 (which * * is all zeroes except that the last bit is 1). */ for (i=0; i<16; i++) rijndaelInput[i] = temp[i] ^ op_c[i]; rijndaelInput[15] ^= 1; RijndaelEncrypt( rijndaelInput, out ); for (i=0; i<16; i++) out[i] ^= op_c[i]; for (i=0; i<8; i++) res[i] = out[i+8]; for (i=0; i<6; i++) ak[i] = out[i]; /* To obtain output block OUT3: XOR OPc and TEMP, * * rotate by r3=32, and XOR on the constant c3 (which * * is all zeroes except that the next to last bit is 1). */ for (i=0; i<16; i++) rijndaelInput[(i+12) % 16] = temp[i] ^ op_c[i]; rijndaelInput[15] ^= 2; RijndaelEncrypt( rijndaelInput, out ); for (i=0; i<16; i++) out[i] ^= op_c[i]; for (i=0; i<16; i++) ck[i] = out[i]; /* To obtain output block OUT4: XOR OPc and TEMP, * * rotate by r4=64, and XOR on the constant c4 (which * * is all zeroes except that the 2nd from last bit is 1). */ for (i=0; i<16; i++) rijndaelInput[(i+8) % 16] = temp[i] ^ op_c[i]; rijndaelInput[15] ^= 4; RijndaelEncrypt( rijndaelInput, out ); for (i=0; i<16; i++) out[i] ^= op_c[i]; for (i=0; i<16; i++) ik[i] = out[i]; return; } /* end of function f2345 */ /*------------------------------------------------------------------- * Algorithm f1* *------------------------------------------------------------------- * * Computes resynch authentication code MAC-S from key K, random * challenge RAND, sequence number SQN and authentication management * field AMF. * *-----------------------------------------------------------------*/ void f1star(uint8_t k[16], uint8_t rand[16], uint8_t sqn[6], uint8_t amf[2], uint8_t mac_s[8], uint8_t op[16]) { uint8_t op_c[16]; uint8_t temp[16]; uint8_t in1[16]; uint8_t out1[16]; uint8_t rijndaelInput[16]; uint8_t i; RijndaelKeySchedule( k ); ComputeOPc( op_c, op ); for (i=0; i<16; i++) rijndaelInput[i] = rand[i] ^ op_c[i]; RijndaelEncrypt( rijndaelInput, temp ); for (i=0; i<6; i++) { in1[i] = sqn[i]; in1[i+8] = sqn[i]; } for (i=0; i<2; i++) { in1[i+6] = amf[i]; in1[i+14] = amf[i]; } /* XOR op_c and in1, rotate by r1=64, and XOR * * on the constant c1 (which is all zeroes) */ for (i=0; i<16; i++) rijndaelInput[(i+8) % 16] = in1[i] ^ op_c[i]; /* XOR on the value temp computed before */ for (i=0; i<16; i++) rijndaelInput[i] ^= temp[i]; RijndaelEncrypt( rijndaelInput, out1 ); for (i=0; i<16; i++) out1[i] ^= op_c[i]; for (i=0; i<8; i++) mac_s[i] = out1[i+8]; return; } /* end of function f1star */ /*------------------------------------------------------------------- * Algorithm f5* *------------------------------------------------------------------- * * Takes key K and random challenge RAND, and returns resynch * anonymity key AK. * *-----------------------------------------------------------------*/ void f5star(uint8_t k[16], uint8_t rand[16], uint8_t ak[6], uint8_t op[16]) { uint8_t op_c[16]; uint8_t temp[16]; uint8_t out[16]; uint8_t rijndaelInput[16]; uint8_t i; RijndaelKeySchedule( k ); ComputeOPc( op_c, op ); for (i=0; i<16; i++) rijndaelInput[i] = rand[i] ^ op_c[i]; RijndaelEncrypt( rijndaelInput, temp ); /* To obtain output block OUT5: XOR OPc and TEMP, * * rotate by r5=96, and XOR on the constant c5 (which * * is all zeroes except that the 3rd from last bit is 1). */ for (i=0; i<16; i++) rijndaelInput[(i+4) % 16] = temp[i] ^ op_c[i]; rijndaelInput[15] ^= 8; RijndaelEncrypt( rijndaelInput, out ); for (i=0; i<16; i++) out[i] ^= op_c[i]; for (i=0; i<6; i++) ak[i] = out[i]; return; } /* end of function f5star */ /*------------------------------------------------------------------- * Function to compute OPc from OP and K. Assumes key schedule has already been performed. *-----------------------------------------------------------------*/ void ComputeOPc(uint8_t op_c[16], uint8_t op[16]) { uint8_t i; RijndaelEncrypt( op, op_c ); for (i=0; i<16; i++) op_c[i] ^= op[i]; return; } /* end of function ComputeOPc */ sipp-3.6.0/src/comp.c0000644000175000017500000000323713475544015013757 0ustar walterwalter/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright (C) 2003 - The Authors * * Author : Richard GAYRAUD - 04 Nov 2003 * From Hewlett Packard Company. * */ #define COMP_MAIN #include "comp.h" #include #include char * comp_load(void) { void *handle; char *error; comp_error[0] = 0; handle = dlopen(COMP_PLUGGIN, RTLD_LAZY); if (!handle) { strcpy(comp_error, dlerror()); return comp_error; } *(void **)(&comp_compress) = dlsym(handle, "comp_compress"); if((error = (char *) dlerror())) { strcpy(comp_error, error); return comp_error; } *(void **)(&comp_uncompress) = dlsym(handle, "comp_uncompress"); if((error = (char *) dlerror())) { strcpy(comp_error, error); return comp_error; } *(void **)(&comp_free) = dlsym(handle, "comp_free"); if((error = (char *) dlerror())) { strcpy(comp_error, error); return comp_error; } return 0; } sipp-3.6.0/src/sslsocket.cpp0000644000175000017500000002432113475544015015370 0ustar walterwalter/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Gundu RAO - 16 Jul 2004 * From Hewlett Packard Company. */ #include "sipp.hpp" #include "sslsocket.hpp" #ifdef USE_OPENSSL #define MUTEX_TYPE pthread_mutex_t #define MUTEX_SETUP(x) pthread_mutex_init(&(x), NULL) #define MUTEX_CLEANUP(x) pthread_mutex_destroy(&(x)) #define MUTEX_LOCK(x) pthread_mutex_lock(&(x)) #define MUTEX_UNLOCK(x) pthread_mutex_unlock(&(x)) #define THREAD_ID pthread_self() #define CALL_BACK_USER_DATA "ksgr" static SSL_CTX* sip_trp_ssl_ctx = NULL; /* For SSL cserver context */ static SSL_CTX* sip_trp_ssl_ctx_client = NULL; /* For SSL cserver context */ static MUTEX_TYPE *mutex_buf = NULL; #if OPENSSL_VERSION_NUMBER < 0x10100000 static void locking_function(int mode, int n, const char *file, int line) { (void)file; /* unused, avoid warnings */ (void)line; /* unused, avoid warnings */ if (mode & CRYPTO_LOCK) MUTEX_LOCK(mutex_buf[n]); else MUTEX_UNLOCK(mutex_buf[n]); } #endif #if !defined(WIN32) && OPENSSL_VERSION_NUMBER < 0x10000000 static unsigned long id_function() { return (unsigned long)THREAD_ID; } #endif static int thread_setup() { int i; mutex_buf = (MUTEX_TYPE *)malloc(sizeof(MUTEX_TYPE) * CRYPTO_num_locks()); if (!mutex_buf) return 0; for (i = 0; i < CRYPTO_num_locks(); ++i) MUTEX_SETUP(mutex_buf[i]); #if !defined(WIN32) && OPENSSL_VERSION_NUMBER < 0x10000000 /* For openssl>=1.0 it uses the address of errno for thread id. * Works for us. */ CRYPTO_set_id_callback(id_function); #endif #if OPENSSL_VERSION_NUMBER < 0x10100000 /* > All OpenSSL code has now been transferred to use the new * > threading API, so the old one is no longer used and can be * > removed. [...] There is now no longer a need to set locking * > callbacks!! * https://github.com/openssl/openssl/commit/ * 2e52e7df518d80188c865ea3f7bb3526d14b0c08 */ CRYPTO_set_locking_callback(locking_function); #endif return 1; } static int passwd_call_back_routine(char *buf, int size, int /*flag*/, void *passwd) { strncpy(buf, (char *)(passwd), size); buf[size - 1] = '\0'; return(strlen(buf)); } /****** SSL error handling *************/ const char *SSL_error_string(int ssl_error, int orig_ret) { switch (ssl_error) { case SSL_ERROR_NONE: return "No error"; case SSL_ERROR_ZERO_RETURN: return "SSL connection has been closed. SSL returned: SSL_ERROR_ZERO_RETURN"; case SSL_ERROR_WANT_WRITE: return "SSL I/O function returned SSL_ERROR_WANT_WRITE"; case SSL_ERROR_WANT_READ: return "SSL I/O function returned SSL_ERROR_WANT_READ"; case SSL_ERROR_WANT_CONNECT: return "SSL I/O function returned SSL_ERROR_WANT_CONNECT"; case SSL_ERROR_WANT_ACCEPT: return "SSL I/O function returned SSL_ERROR_WANT_ACCEPT"; case SSL_ERROR_WANT_X509_LOOKUP: return "SSL I/O function returned SSL_ERROR_WANT_X509_LOOKUP"; case SSL_ERROR_SSL: return "SSL protocol error. SSL I/O function returned SSL_ERROR_SSL"; case SSL_ERROR_SYSCALL: if (orig_ret < 0) { /* not EOF */ return strerror(errno); } else { /* EOF */ return "Non-recoverable I/O error occurred. SSL I/O function returned SSL_ERROR_SYSCALL"; } } return "Unknown SSL Error."; } SSL* SSL_new_client() { return SSL_new(sip_trp_ssl_ctx_client); } SSL* SSL_new_server() { return SSL_new(sip_trp_ssl_ctx); } /****** Certificate Verification Callback FACILITY *************/ static int sip_tls_verify_callback(int ok , X509_STORE_CTX *store) { char data[512]; if (!ok) { X509 *cert = X509_STORE_CTX_get_current_cert(store); X509_NAME_oneline(X509_get_issuer_name(cert), data, 512); WARNING("TLS verification error for issuer: '%s'", data); X509_NAME_oneline(X509_get_subject_name(cert), data, 512); WARNING("TLS verification error for subject: '%s'", data); } return ok; } /*********** Load the CRL's into SSL_CTX **********************/ static int sip_tls_load_crls(SSL_CTX* ctx , const char* crlfile) { X509_STORE *store; X509_LOOKUP *lookup; /* Get the X509_STORE from SSL context */ if (!(store = SSL_CTX_get_cert_store(ctx))) { return (-1); } /* Add lookup file to X509_STORE */ if (!(lookup = X509_STORE_add_lookup(store, X509_LOOKUP_file()))) { return (-1); } /* Add the CRLS to the lookpup object */ if (X509_load_crl_file(lookup, crlfile, X509_FILETYPE_PEM) != 1) { return (-1); } /* Set the flags of the store so that CRLS's are consulted */ #if OPENSSL_VERSION_NUMBER >= 0x00907000L X509_STORE_set_flags(store, X509_V_FLAG_CRL_CHECK | X509_V_FLAG_CRL_CHECK_ALL); #else #warning This version of OpenSSL (<0.9.7) cannot handle CRL files in capath ERROR("This version of OpenSSL (<0.9.7) cannot handle CRL files in capath"); #endif return (1); } static SSL_CTX* instantiate_ssl_context(const char* context_name) { SSL_CTX* ssl_ctx = NULL; if (tls_version == 0.0) { #if OPENSSL_VERSION_NUMBER >= 0x10100000 /* >= 1.1 */ ssl_ctx = SSL_CTX_new(TLS_method()); #else ssl_ctx = SSL_CTX_new(SSLv23_method()); #endif } else if (tls_version == 1.0) { ssl_ctx = SSL_CTX_new(TLSv1_method()); } else if (tls_version == 1.1) { ssl_ctx = SSL_CTX_new(TLSv1_1_method()); } else if (tls_version == 1.2) { ssl_ctx = SSL_CTX_new(TLSv1_2_method()); } else { ERROR("Unrecognized TLS version for [%s] context: %1.1f", context_name, tls_version); ssl_ctx = NULL; } #if OPENSSL_VERSION_NUMBER >= 0x10100000 /* >= 1.1 */ SSL_CTX_set_min_proto_version(ssl_ctx, TLS1_VERSION); #endif return ssl_ctx; } #endif //USE_OPENSSL /************* Prepare the SSL context ************************/ enum tls_init_status TLS_init_context(void) { sip_trp_ssl_ctx = instantiate_ssl_context("generic"); if (sip_trp_ssl_ctx == NULL) { ERROR("TLS_init_context: SSL_CTX_new with TLS_method failed for generic context"); return TLS_INIT_ERROR; } sip_trp_ssl_ctx_client = instantiate_ssl_context("client"); if (sip_trp_ssl_ctx_client == NULL) { ERROR("TLS_init_context: SSL_CTX_new with TLS_method failed for client context"); return TLS_INIT_ERROR; } /* Load the trusted CA's */ if (strlen(tls_ca_name) != 0) { SSL_CTX_load_verify_locations(sip_trp_ssl_ctx, tls_ca_name, NULL); SSL_CTX_load_verify_locations(sip_trp_ssl_ctx_client, tls_ca_name, NULL); } /* TLS Verification only makes sense if an CA is specified or * we require CRL validation. */ if (strlen(tls_ca_name) != 0 || strlen(tls_crl_name) != 0) { if (sip_tls_load_crls(sip_trp_ssl_ctx, tls_crl_name) == -1) { ERROR("TLS_init_context: Unable to load CRL file (%s)", tls_crl_name); return TLS_INIT_ERROR; } if (sip_tls_load_crls(sip_trp_ssl_ctx_client, tls_crl_name) == -1) { ERROR("TLS_init_context: Unable to load CRL (client) file (%s)", tls_crl_name); return TLS_INIT_ERROR; } /* The following call forces to process the certificates with * the initialised SSL_CTX */ SSL_CTX_set_verify(sip_trp_ssl_ctx, SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT, sip_tls_verify_callback); SSL_CTX_set_verify(sip_trp_ssl_ctx_client, SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT, sip_tls_verify_callback); } /* Selection Cipher suits - load the application specified ciphers */ SSL_CTX_set_default_passwd_cb_userdata(sip_trp_ssl_ctx, (void *)CALL_BACK_USER_DATA); SSL_CTX_set_default_passwd_cb_userdata(sip_trp_ssl_ctx_client, (void *)CALL_BACK_USER_DATA); SSL_CTX_set_default_passwd_cb(sip_trp_ssl_ctx, passwd_call_back_routine); SSL_CTX_set_default_passwd_cb(sip_trp_ssl_ctx_client, passwd_call_back_routine); if (SSL_CTX_use_certificate_file(sip_trp_ssl_ctx, tls_cert_name, SSL_FILETYPE_PEM) != 1) { ERROR("TLS_init_context: SSL_CTX_use_certificate_file failed"); return TLS_INIT_ERROR; } if (SSL_CTX_use_certificate_file(sip_trp_ssl_ctx_client, tls_cert_name, SSL_FILETYPE_PEM) != 1) { ERROR("TLS_init_context: SSL_CTX_use_certificate_file (client) failed"); return TLS_INIT_ERROR; } if (SSL_CTX_use_PrivateKey_file(sip_trp_ssl_ctx, tls_key_name, SSL_FILETYPE_PEM) != 1) { ERROR("TLS_init_context: SSL_CTX_use_PrivateKey_file failed"); return TLS_INIT_ERROR; } if (SSL_CTX_use_PrivateKey_file(sip_trp_ssl_ctx_client, tls_key_name, SSL_FILETYPE_PEM) != 1) { ERROR("TLS_init_context: SSL_CTX_use_PrivateKey_file (client) failed"); return TLS_INIT_ERROR; } return TLS_INIT_NORMAL; } int TLS_init() { if (!thread_setup() || !SSL_library_init()) { return -1; } SSL_load_error_strings(); return 1; } sipp-3.6.0/src/ratetask.cpp0000644000175000017500000000424713475544015015201 0ustar walterwalter/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Richard GAYRAUD - 04 Nov 2003 * Marc LAMBERTON * Olivier JACQUES * Herve PELLAN * David MANSUTTI * Francois-Xavier Kowalski * Gerard Lyonnaz * From Hewlett Packard Company. * F. Tarek Rogers * Peter Higginson * Vincent Luba * Shriram Natarajan * Guillaume Teissier from FTR&D * Clement Chen * Wolfgang Beck * Charles P Wright from IBM Research */ #include "sipp.hpp" class ratetask *ratetask::instance = NULL; void ratetask::initialize() { assert(instance == NULL); if (rate_increase) { instance = new ratetask(); } } void ratetask::dump() { WARNING("Increasing call rate task."); } bool ratetask::run() { if (quitting >= 10) { delete this; return false; } /* Statistics Logs. */ if ((getmilliseconds() - last_rate_increase_time) >= rate_increase_freq) { if (rate_increase) { rate += rate_increase; if (rate_max && (rate > rate_max)) { rate = rate_max; if (rate_quit) { quitting += 10; } } CallGenerationTask::set_rate(rate); last_rate_increase_time = clock_tick; } } setPaused(); return true; } unsigned int ratetask::wake() { return last_rate_increase_time + rate_increase_freq; } sipp-3.6.0/src/listener.cpp0000644000175000017500000000367013475544015015207 0ustar walterwalter/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Richard GAYRAUD - 04 Nov 2003 * From Hewlett Packard Company. * Charles P. Wright from IBM Research */ #include #include #include #include #include #include #include "sipp.hpp" listener_map listeners; listener::listener(const char *id, bool listening) { this->id = strdup(id); this->listening = false; if (listening) { startListening(); } } void listener::startListening() { assert(!listening); listeners.insert(pair(listener_map::key_type(id),this)); listening = true; } void listener::stopListening() { assert(listening); listener_map::iterator listener_it; listener_it = listeners.find(listener_map::key_type(id)); listeners.erase(listener_it); listening = false; } char *listener::getId() { return id; } listener::~listener() { if (listening) { stopListening(); } free(id); id = NULL; } listener *get_listener(const char *id) { listener_map::iterator listener_it = listeners.find(listener_map::key_type(id)); if (listener_it == listeners.end()) { return NULL; } return listener_it->second; } sipp-3.6.0/src/task.cpp0000644000175000017500000002127613475544015014326 0ustar walterwalter/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Richard GAYRAUD - 04 Nov 2003 * Olivier Jacques * From Hewlett Packard Company. * Shriram Natarajan * Peter Higginson * Eric Miller * Venkatesh * Enrico Hartung * Nasir Khan * Lee Ballard * Guillaume Teissier from FTR&D * Wolfgang Beck * Venkatesh * Vlad Troyanker * Charles P Wright from IBM Research * Amit On from Followap * Jan Andres from Freenet * Ben Evans from Open Cloud * Marc Van Diest from Belgacom * Michael Dwyer from Cibation */ #include #include #include #include #include #include #include #include "sipp.hpp" task_list all_tasks; task_list running_tasks; timewheel paused_tasks; /* Get the overall list of running tasks. */ task_list* get_running_tasks() { return &running_tasks; } void abort_all_tasks() { for (task_list::iterator task_it = all_tasks.begin(); task_it != all_tasks.end(); task_it = all_tasks.begin()) { (*task_it)->abort(); } } void dump_tasks() { WARNING("---- %zu Active Tasks ----", all_tasks.size()); for (task_list::iterator task_it = all_tasks.begin(); task_it != all_tasks.end(); task_it++) { (*task_it)->dump(); } } int expire_paused_tasks() { return paused_tasks.expire_paused_tasks(); } int paused_tasks_count() { return paused_tasks.size(); } // Methods for the task class task::task() { this->taskit = all_tasks.insert(all_tasks.end(), this); add_to_runqueue(); } task::~task() { if (running) { remove_from_runqueue(); } else { paused_tasks.remove_paused_task(this); } all_tasks.erase(taskit); } /* Put this task in the run queue. */ void task::add_to_runqueue() { this->runit = running_tasks.insert(running_tasks.end(), this); this->running = true; } void task::add_to_paused_tasks(bool increment) { paused_tasks.add_paused_task(this, increment); } void task::recalculate_wheel() { add_to_paused_tasks(false); } /* Remove this task from the run queue. */ bool task::remove_from_runqueue() { if (!this->running) { return false; } running_tasks.erase(this->runit); this->running = false; return true; } void task::setRunning() { if (!running) { paused_tasks.remove_paused_task(this); add_to_runqueue(); } } void task::setPaused() { if (running) { if (!remove_from_runqueue()) { WARNING("Tried to remove a running call that wasn't running!"); assert(0); } } else { paused_tasks.remove_paused_task(this); } assert(running == false); add_to_paused_tasks(true); } void task::abort() { delete this; } // Methods for the timewheel class // Based on the time a given task should next be woken up, finds the // correct time wheel for it and returns a list of other tasks // occuring at that point. task_list *timewheel::task2list(task *task) { unsigned int wake = task->wake(); if (wake == 0) { return &forever_list; } assert(wake >= wheel_base); if (wheel_base > clock_tick) { ERROR("wheel_base is %lu, clock_tick is %lu - expected wheel_base to be less than or equal to clock_tick", wheel_base, clock_tick); assert(wheel_base <= clock_tick); } unsigned int slot_in_first_wheel = wake % LEVEL_ONE_SLOTS; unsigned int slot_in_second_wheel = (wake / LEVEL_ONE_SLOTS) % LEVEL_TWO_SLOTS; unsigned int slot_in_third_wheel = (wake / (LEVEL_ONE_SLOTS * LEVEL_TWO_SLOTS)); bool fits_in_first_wheel = ((wake / LEVEL_ONE_SLOTS) == (wheel_base / LEVEL_ONE_SLOTS)); bool fits_in_second_wheel = ((wake / (LEVEL_ONE_SLOTS * LEVEL_TWO_SLOTS)) == (wheel_base / (LEVEL_ONE_SLOTS * LEVEL_TWO_SLOTS))); bool fits_in_third_wheel = (slot_in_third_wheel < LEVEL_THREE_SLOTS); if (fits_in_first_wheel) { return &wheel_one[slot_in_first_wheel]; } else if (fits_in_second_wheel) { return &wheel_two[slot_in_second_wheel]; } else if (fits_in_third_wheel) { return &wheel_three[slot_in_third_wheel]; } else{ ERROR("Attempted to schedule a task too far in the future"); return NULL; } } /* Iterate through our sorted set of paused tasks, removing those that * should no longer be paused, and adding them to the run queue. */ int timewheel::expire_paused_tasks() { int found = 0; // This while loop counts up from the wheel_base (i.e. the time // this function last ran) to the current scheduler time (i.e. clock_tick). while (wheel_base < clock_tick) { int slot1 = wheel_base % LEVEL_ONE_SLOTS; /* If slot1 is 0 (i.e. wheel_base is a multiple of 4096ms), * we need to repopulate the first timer wheel with the * contents of the first available slot of the second wheel. */ if (slot1 == 0) { /* slot2 represents the slot in the second timer wheel * containing the tasks for the next ~4s. So when * wheel_base is 4096, wheel2[1] will be moved into wheel 1, * when wheel_base of 8192 wheel2[2] will be moved into * wheel 1, etc. */ int slot2 = (wheel_base / LEVEL_ONE_SLOTS) % LEVEL_TWO_SLOTS; /* If slot2 is also zero, we must migrate tasks from slot3 into slot2. */ if (slot2 == 0) { /* Same logic above, except that each slot of wheel3 contains the next 69 minutes of tasks, enough to completely fill wheel 2. */ int slot3 = ((wheel_base / LEVEL_ONE_SLOTS) / LEVEL_TWO_SLOTS); assert(slot3 < LEVEL_THREE_SLOTS); for (task_list::iterator l3it = wheel_three[slot3].begin(); l3it != wheel_three[slot3].end(); l3it++) { /* Migrate this task to wheel two. */ (*l3it)->recalculate_wheel(); } wheel_three[slot3].clear(); } /* Repopulate wheel 1 from wheel 2 (which will now be full of the tasks pulled from wheel 3, if that was necessary) */ for (task_list::iterator l2it = wheel_two[slot2].begin(); l2it != wheel_two[slot2].end(); l2it++) { /* Migrate this task to wheel one. */ (*l2it)->recalculate_wheel(); } wheel_two[slot2].clear(); } /* Move tasks from the current slot of wheel 1 (i.e. the tasks scheduled to fire in the 1ms interval represented by wheel_base) onto a run queue. */ found += wheel_one[slot1].size(); for(task_list::iterator it = wheel_one[slot1].begin(); it != wheel_one[slot1].end(); it++) { (*it)->add_to_runqueue(); // Decrement the total number of tasks in this wheel. count--; } wheel_one[slot1].clear(); wheel_base++; // Move wheel_base to the next 1ms interval } return found; } // Adds a task to the correct timewheel. When increment is false, does // not increment the count of tasks owned by this timewheel, and so // can be used for recalculating the wheel of an existing task. void timewheel::add_paused_task(task *task, bool increment) { task_list::iterator task_it; if (task->wake() && task->wake() < wheel_base) { task->add_to_runqueue(); return; } task_list *list = task2list(task); task_it = list->insert(list->end(), task); task->pauselist = list; task->pauseit = task_it; if (increment) { count++; } } void timewheel::remove_paused_task(task *task) { task_list *list = task->pauselist; list->erase(task->pauseit); count--; } timewheel::timewheel() { count = 0; wheel_base = clock_tick; } int timewheel::size() { return count; } sipp-3.6.0/src/prepare_pcap.c0000644000175000017500000004621413475544015015464 0ustar walterwalter/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Guillaume TEISSIER from FTR&D 02/02/2006 */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include #include #include #include "defines.h" #include "endianshim.h" #include "prepare_pcap.h" /* Helpful RFCs for DTMF generation. * https://tools.ietf.org/html/rfc4733 * https://tools.ietf.org/html/rfc3550 */ /* We only need the fields, which are necessary to determine the type of the next header. * we could also define our own structures for UDP and IPv4. We currently use the structures * made available by the platform, as we had no problems to get them on all supported platforms. */ typedef struct _ether_type_hdr { uint16_t ether_type; /* we only need the type, so we can determine, if the next header is IPv4 or IPv6 */ } ether_type_hdr; int check(uint16_t *buffer, int len) { int sum; int i; sum = 0; for (i=0; i<(len&~1); i+= 2) sum += *buffer++; if (len & 1) { sum += htons((*(const uint8_t*)buffer) << 8); } return sum; } uint16_t checksum_carry(int s) { int s_c = (s >> 16) + (s & 0xffff); return (~(s_c + (s_c >> 16)) & 0xffff); } char errbuf[PCAP_ERRBUF_SIZE]; /* get octet offset to EtherType block in 802.11 frame */ size_t get_802_11_ethertype_offset(int link, const uint8_t* pktdata) { size_t offset = 0; uint8_t frame_type = 0; /* 2 bits */ uint8_t frame_sub_type = 0; /* 4 bits */ uint16_t frame_ctl_fld; /* Frame Control Field */ /* get RadioTap header length */ if (link == DLT_IEEE802_11_RADIO) { uint16_t rdtap_hdr_len = 0; /* http://www.radiotap.org */ /* rdtap_version[1], pad[1], rdtap_hdr_len[2], rdtap_flds[4] */ memcpy(&rdtap_hdr_len, pktdata + 2, sizeof(rdtap_hdr_len)); /* http://radiotap.org */ /* all data fields in the radiotap header are to be specified * in little-endian order */ rdtap_hdr_len = le16toh(rdtap_hdr_len); offset += rdtap_hdr_len; } memcpy(&frame_ctl_fld, pktdata + offset, sizeof(frame_ctl_fld)); /* extract frame type and subtype from Frame Control Field */ frame_type = frame_sub_type = frame_ctl_fld>>8; frame_type = frame_type>>2 & 0x03; frame_sub_type >>= 4; if (frame_type < 0x02) { /* Control or Management frame, so ignore it and try to get * EtherType from next one */ offset = 0; } else if (frame_type == 0x02) { /* only Data frames carry the relevant payload and EtherType */ if (frame_sub_type < 0x04 || (frame_sub_type > 0x07 && frame_sub_type < 0x0c)) { /* MAC header of a Data frame is at least 24 and at most 36 * octets long */ size_t mac_hdr_len = 24; uint8_t llc_hdr[8] = { 0x00 }; while (mac_hdr_len <= 36) { /* attempt to get Logical-Link Control header */ /* dsap[1],ssap[1],ctrl_fld[1],org_code[3],ethertype[2] */ memcpy(llc_hdr, pktdata + offset + mac_hdr_len, sizeof(llc_hdr)); /* check if Logical-Link Control header */ if (llc_hdr[0] == 0xaa && llc_hdr[1] == 0xaa && llc_hdr[2] == 0x03) { /* get EtherType and convert to host byte-order. * (reduce by sizeof(eth_type)) */ offset += mac_hdr_len + (sizeof(llc_hdr) - sizeof(uint16_t)); break; } mac_hdr_len++; } } else { /* could be Null Data frame, so ignore it and try to get * EtherType from next one */ offset = 0; } } else { ERROR("Unsupported frame type %d", frame_type); } return offset; } /* get octet offset to EtherType block */ size_t get_ethertype_offset(int link, const uint8_t* pktdata) { int is_le_encoded = 0; /* little endian */ uint16_t eth_type = 0; size_t offset = 0; /* http://www.tcpdump.org/linktypes.html */ if (link == DLT_EN10MB) { /* srcmac[6], dstmac[6], ethertype[2] */ offset = 12; } else if (link == DLT_LINUX_SLL) { /* http://www.tcpdump.org/linktypes/LINKTYPE_LINUX_SLL.html */ /* pkttype[2], arphrd_type[2], lladdrlen[2], lladdr[8], ethertype[2] */ offset = 14; } else if (link == DLT_IEEE802_11 || link == DLT_IEEE802_11_RADIO) { offset = get_802_11_ethertype_offset(link, pktdata); /* multi-octet fields in 802.11 frame are to be specified in * little-endian order */ is_le_encoded = 1; } else { ERROR("Unsupported link-type %d", link); } if (offset) { /* get EtherType and convert to host byte order */ memcpy(ð_type, pktdata + offset, sizeof(eth_type)); eth_type = (is_le_encoded) ? le16toh(eth_type) : ntohs(eth_type); if (eth_type != 0x0800 && eth_type != 0x86dd) { /* check if Ethernet 802.1Q VLAN */ if (eth_type == 0x8100) { /* vlan_tag[4] */ offset += 4; } else { ERROR("Unsupported ethernet type %d", eth_type); } } } return offset; } /* prepare a pcap file */ int prepare_pkts(const char* file, pcap_pkts* pkts) { pcap_t* pcap; #ifdef HAVE_PCAP_NEXT_EX struct pcap_pkthdr* pkthdr = NULL; #else struct pcap_pkthdr pkthdr_storage; struct pcap_pkthdr* pkthdr = &pkthdr_storage; #endif const uint8_t* pktdata = NULL; int n_pkts = 0; u_long max_length = 0; size_t ether_type_offset = 0; uint16_t base = 0xffff; u_long pktlen; pcap_pkt* pkt_index; ether_type_hdr* ethhdr; struct ip* iphdr; struct ip6_hdr* ip6hdr; struct udphdr* udphdr; pkts->pkts = NULL; pcap = pcap_open_offline(file, errbuf); if (!pcap) ERROR("Can't open PCAP file '%s': %s", file, errbuf); #ifdef HAVE_PCAP_NEXT_EX while (pcap_next_ex(pcap, &pkthdr, &pktdata) == 1) { #else while ((pktdata = pcap_next(pcap, pkthdr)) != NULL) { #endif if (pkthdr->len != pkthdr->caplen) { ERROR("You got truncated packets. Please create a new dump with -s0"); } /* Determine offset from packet to ether type only once. */ if (!ether_type_offset) { int datalink = pcap_datalink(pcap); ether_type_offset = get_ethertype_offset(datalink, pktdata); } ethhdr = (ether_type_hdr *)(pktdata + ether_type_offset); if (ntohs(ethhdr->ether_type) != 0x0800 /* IPv4 */ && ntohs(ethhdr->ether_type) != 0x86dd) { /* IPv6 */ fprintf(stderr, "Ignoring non IP{4,6} packet, got ether_type %hu!\n", ntohs(ethhdr->ether_type)); continue; } iphdr = (struct ip*)((char*)ethhdr + sizeof(*ethhdr)); if (iphdr && iphdr->ip_v == 6) { /* ipv6 */ ip6hdr = (struct ip6_hdr*)(void*)iphdr; if (ip6hdr->ip6_nxt != IPPROTO_UDP) { fprintf(stderr, "prepare_pcap.c: Ignoring non UDP packet!\n"); continue; } udphdr = (struct udphdr*)((char*)ip6hdr + sizeof(*ip6hdr)); } else { /* ipv4 */ if (iphdr->ip_p != IPPROTO_UDP) { fprintf(stderr, "prepare_pcap.c: Ignoring non UDP packet!\n"); continue; } udphdr = (struct udphdr*)((char*)iphdr + (iphdr->ip_hl << 2)); } pktlen = ntohs(udphdr->uh_ulen); if (pktlen > PCAP_MAXPACKET) { ERROR("Packet %d with size 0x%lx is too big! " "Recompile with bigger PCAP_MAXPACKET in prepare_pcap.h", n_pkts, pktlen); } /* BUG: inefficient */ pkts->pkts = (pcap_pkt *)realloc(pkts->pkts, sizeof(*(pkts->pkts)) * (n_pkts + 1)); if (!pkts->pkts) ERROR("Can't re-allocate memory for pcap pkt"); pkt_index = pkts->pkts + n_pkts; pkt_index->pktlen = pktlen; pkt_index->ts = pkthdr->ts; pkt_index->data = (unsigned char *) malloc(pktlen); /* BUG: inefficient */ if (!pkt_index->data) ERROR("Can't allocate memory for pcap pkt data"); memcpy(pkt_index->data, udphdr, pktlen); udphdr->uh_sum = 0; /* compute a partial udp checksum */ /* not including port that will be changed */ /* when sending RTP */ pkt_index->partial_check = check((uint16_t*)&udphdr->uh_ulen, pktlen - 4) + ntohs(IPPROTO_UDP + pktlen); if (max_length < pktlen) max_length = pktlen; if (base > ntohs(udphdr->uh_dport)) base = ntohs(udphdr->uh_dport); n_pkts++; } pkts->max = pkts->pkts + n_pkts; pkts->max_length = max_length; pkts->base = base; fprintf(stderr, "In pcap %s, npkts %d\nmax pkt length %lu\nbase port %d\n", file, n_pkts, max_length, base); pcap_close(pcap); return 0; } struct rtphdr { /* Bit-fields are always assigned to the first available bit, possibly * constrained by other factors, such as alignment. That means that they * start at the low order bit for little-endian, and the high order bit * for big-endian. This is the "right" way to do things. It is very * unusual for a compiler to do this differently. */ #if BYTE_ORDER == LITTLE_ENDIAN uint8_t csicnt:4; uint8_t extension:1; uint8_t padding:1; uint8_t version:2; uint8_t payload_type:7; uint8_t marker:1; #elif BYTE_ORDER == BIG_ENDIAN uint8_t version:2; uint8_t padding:1; uint8_t extension:1; uint8_t csicnt:4; uint8_t marker:1; uint8_t payload_type:7; #else #error "Please fix endian macros" #endif uint16_t seqno; uint32_t timestamp; uint32_t ssrcid; }; struct rtpevent { uint8_t event_id; #if BYTE_ORDER == LITTLE_ENDIAN uint8_t volume:6; uint8_t reserved:1; uint8_t end_of_event:1; #elif BYTE_ORDER == BIG_ENDIAN uint8_t end_of_event:1; uint8_t reserved:1; uint8_t volume:6; #else #error "Please fix endian macros" #endif uint16_t duration; }; struct dtmfpacket { struct udphdr udp; struct rtphdr rtp; struct rtpevent dtmf; }; struct rtpnoop { #if BYTE_ORDER == LITTLE_ENDIAN uint32_t reserved:31; uint32_t request_rtcp:1; #elif BYTE_ORDER == BIG_ENDIAN uint32_t request_rtcp:1; uint32_t reserved:31; #else #error "Please fix endian macros" #endif }; struct nooppacket { struct udphdr udp; struct rtphdr rtp; struct rtpnoop noop; }; static u_long dtmf_ssrcid = 0x01020304; /* bug, should be random/unique */ static void fill_default_udphdr(struct udphdr* udp, u_long pktlen) { udp->uh_ulen = htons(pktlen); udp->uh_sum = 0; udp->uh_sport = 0; udp->uh_dport = 0; } static void fill_default_rtphdr(struct rtphdr* rtp, int marker, int seqno, int ts) { rtp->version = 2; rtp->padding = 0; rtp->extension = 0; rtp->csicnt = 0; rtp->marker = marker; rtp->payload_type = 0x60; /* 96 as in the SDP */ rtp->seqno = htons(seqno); rtp->timestamp = htonl(ts); rtp->ssrcid = htonl(dtmf_ssrcid); } static void fill_default_dtmf(struct dtmfpacket* dtmfpacket, int marker, int seqno, int ts, char digit, int eoe, int duration) { const u_long pktlen = sizeof(*dtmfpacket); fill_default_udphdr(&dtmfpacket->udp, pktlen); fill_default_rtphdr(&dtmfpacket->rtp, marker, seqno, ts); dtmfpacket->dtmf.event_id = digit; dtmfpacket->dtmf.end_of_event = eoe; dtmfpacket->dtmf.volume = 10; dtmfpacket->dtmf.duration = htons(duration * 8); } static void fill_default_noop(struct nooppacket* nooppacket, int seqno, int ts) { const u_long pktlen = sizeof(*nooppacket); fill_default_udphdr(&nooppacket->udp, pktlen); fill_default_rtphdr(&nooppacket->rtp, 0, seqno, ts); nooppacket->rtp.payload_type = 0x61; /* 97 for noop */ nooppacket->noop.request_rtcp = 0; nooppacket->noop.reserved = 0; } static void prepare_dtmf_digit_start( pcap_pkts* pkts, int* n_pkts, uint16_t start_seq_no, int n_digits, unsigned char uc_digit, int tone_len, unsigned long ts_offset, unsigned timestamp_start) { const u_long pktlen = sizeof(struct dtmfpacket); unsigned long cur_tone_len = 0; int marked = 0; while (cur_tone_len < tone_len) { unsigned long ts = ts_offset + (n_digits + 1) * tone_len * 2 + cur_tone_len; pcap_pkt* pkt_index; struct dtmfpacket* dtmfpacket; /* BUG: inefficient */ pkts->pkts = realloc(pkts->pkts, sizeof(*pkts->pkts) * (*n_pkts + 1)); if (!pkts->pkts) { ERROR("Can't re-allocate memory for dtmf pcap pkt"); } pkt_index = pkts->pkts + *n_pkts; pkt_index->pktlen = pktlen; pkt_index->ts.tv_sec = ts / 1000; pkt_index->ts.tv_usec = (ts % 1000) * 1000; pkt_index->data = malloc(pktlen); /* BUG: inefficient */ if (!pkt_index->data) { ERROR("Can't allocate memory for pcap pkt data"); } dtmfpacket = (struct dtmfpacket*)pkt_index->data; fill_default_dtmf(dtmfpacket, !marked, *n_pkts + start_seq_no, n_digits * tone_len * 2 + timestamp_start, uc_digit, 0, cur_tone_len); marked = 1; /* set marker once per event */ pkt_index->partial_check = check(&dtmfpacket->udp.uh_ulen, pktlen - 4) + ntohs(IPPROTO_UDP + pktlen); (*n_pkts)++; cur_tone_len += 20; } } static void prepare_dtmf_digit_end( pcap_pkts* pkts, int* n_pkts, uint16_t start_seq_no, int n_digits, unsigned char uc_digit, int tone_len, unsigned long ts_offset, unsigned timestamp_start) { const u_long pktlen = sizeof(struct dtmfpacket); int i; for (i = 0; i < 3; i++) { unsigned long ts = ts_offset + (n_digits + 1) * tone_len * 2 + tone_len + i + 1; pcap_pkt* pkt_index; struct dtmfpacket* dtmfpacket; /* BUG: inefficient */ pkts->pkts = realloc(pkts->pkts, sizeof(*pkts->pkts) * (*n_pkts + 1)); if (!pkts->pkts) { ERROR("Can't re-allocate memory for dtmf pcap pkt"); } pkt_index = pkts->pkts + *n_pkts; pkt_index->pktlen = pktlen; pkt_index->ts.tv_sec = ts / 1000; pkt_index->ts.tv_usec = (ts % 1000) * 1000; pkt_index->data = malloc(pktlen); if (!pkt_index->data) { ERROR("Can't allocate memory for pcap pkt data"); } dtmfpacket = (struct dtmfpacket*)pkt_index->data; fill_default_dtmf(dtmfpacket, 0, *n_pkts + start_seq_no, n_digits * tone_len * 2 + timestamp_start, uc_digit, 1, tone_len); pkt_index->partial_check = check(&dtmfpacket->udp.uh_ulen, pktlen - 4) + ntohs(IPPROTO_UDP + pktlen); (*n_pkts)++; } } static void prepare_noop( pcap_pkts* pkts, int* n_pkts, uint16_t* start_seq_no, unsigned long *ts_offset, unsigned *timestamp_start) { const u_long pktlen = sizeof(struct nooppacket); /* not dtmfpacket */ int i; for (i = 0; i < 20; i++) { /* 400ms of nothingness */ unsigned long ts = *ts_offset; pcap_pkt* pkt_index; struct nooppacket* nooppacket; *ts_offset += 20; /* BUG: inefficient */ pkts->pkts = realloc(pkts->pkts, sizeof(*pkts->pkts) * (*n_pkts + 1)); if (!pkts->pkts) { ERROR("Can't re-allocate memory for noop pcap pkt"); } pkt_index = pkts->pkts + *n_pkts; pkt_index->pktlen = pktlen; pkt_index->ts.tv_sec = ts / 1000; pkt_index->ts.tv_usec = (ts % 1000) * 1000; pkt_index->data = malloc(pktlen); if (!pkt_index->data) { ERROR("Can't allocate memory for pcap pkt data"); } nooppacket = (struct nooppacket*)pkt_index->data; fill_default_noop(nooppacket, *n_pkts + *start_seq_no, *timestamp_start + ts); pkt_index->partial_check = check(&nooppacket->udp.uh_ulen, pktlen - 4) + ntohs(IPPROTO_UDP + pktlen); (*n_pkts)++; (*start_seq_no)++; } *timestamp_start += *ts_offset; } /* prepare a dtmf pcap */ int prepare_dtmf(const char* digits, pcap_pkts* pkts, uint16_t start_seq_no) { unsigned long tone_len = 200; const u_long pktlen = sizeof(struct dtmfpacket); int n_pkts = 0; int n_digits = 0; int needs_filler = 0; /* warm up the stream */ const char* digit; unsigned long ts_offset = 0; /* packet timestamp */ unsigned timestamp_start = 24000; /* RTP timestamp, should be random */ /* If we see the DTMF as part of the entire audio stream, we'd need * to reuse the SSRC, but it's legal to start a new stream (new * SSRC) like we do. Note that the new SSRC that will cause some * devices to not pick up on the first event as quickly: we can work * around that by adding a few empty RTP packets with this SSRC * first. */ dtmf_ssrcid++; /* Because we need to warm up the stream (puncture NAT, make phone * accept the SSRC(?)), we add a few filler packets first. */ needs_filler = 1; pkts->pkts = NULL; char* comma = strchr(digits, ','); if (comma) { tone_len = atol(comma + 1); if (tone_len < 50 || tone_len > 2000) { tone_len = 200; } *comma = '\0'; } for (digit = digits; *digit; digit++) { unsigned char uc_digit; if (*digit >= '0' && *digit <= '9') { uc_digit = *digit - '0'; } else if (*digit == '*') { uc_digit = 10; } else if (*digit == '#') { uc_digit = 11; } else if (*digit == 'A') { uc_digit = 12; } else if (*digit == 'B') { uc_digit = 13; } else if (*digit == 'C') { uc_digit = 14; } else if (*digit == 'D') { uc_digit = 15; } else { continue; } if (needs_filler) { prepare_noop(pkts, &n_pkts, &start_seq_no, &ts_offset, ×tamp_start); needs_filler = 0; } prepare_dtmf_digit_start(pkts, &n_pkts, start_seq_no, n_digits, uc_digit, tone_len, ts_offset, timestamp_start); prepare_dtmf_digit_end(pkts, &n_pkts, start_seq_no, n_digits, uc_digit, tone_len, ts_offset, timestamp_start); n_digits++; } pkts->max = pkts->pkts + n_pkts; pkts->max_length = pktlen; pkts->base = 0; return n_pkts; } sipp-3.6.0/src/time.cpp0000644000175000017500000000635313475544015014321 0ustar walterwalter/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Richard GAYRAUD - 04 Nov 2003 * Olivier Jacques * From Hewlett Packard Company. * Shriram Natarajan * Peter Higginson * Eric Miller * Venkatesh * Enrico Hartung * Nasir Khan * Lee Ballard * Guillaume Teissier from FTR&D * Wolfgang Beck * Venkatesh * Vlad Troyanker * Charles P Wright from IBM Research * Amit On from Followap * Jan Andres from Freenet * Ben Evans from Open Cloud * Marc Van Diest from Belgacom * Stefan Esser * Andy Aicken */ #include #include #include #ifdef __MACH__ #include #include #endif #include "time.hpp" #include "sipp.hpp" #define MICROSECONDS_PER_SECOND 1000000LL #define MICROSECONDS_PER_MILLISECOND 1000LL #define NANOSECONDS_PER_MICROSECOND 1000LL // Returns the number of microseconds that have passed since SIPp // started. Also updates the current clock_tick. unsigned long long getmicroseconds() { struct timespec time; unsigned long long microseconds; static unsigned long long start_time = 0; #ifdef __MACH__ // OS X does not have clock_gettime, use clock_get_time clock_serv_t cclock; mach_timespec_t mts; host_get_clock_service(mach_host_self(), SYSTEM_CLOCK, &cclock); clock_get_time(cclock, &mts); mach_port_deallocate(mach_task_self(), cclock); time.tv_sec = mts.tv_sec; time.tv_nsec = mts.tv_nsec; #else #if defined(CLOCK_MONOTONIC_COARSE) clock_gettime(CLOCK_MONOTONIC_COARSE, &time); #else clock_gettime(CLOCK_MONOTONIC, &time); #endif #endif microseconds = (MICROSECONDS_PER_SECOND * time.tv_sec) + (time.tv_nsec / NANOSECONDS_PER_MICROSECOND); if (start_time == 0) { start_time = microseconds - 1; } microseconds = microseconds - start_time; // Static global from sipp.hpp clock_tick = microseconds / MICROSECONDS_PER_MILLISECOND; return microseconds; } // Returns the number of milliseconds that have passed since SIPp // started. Also updates the current clock_tick. unsigned long getmilliseconds() { return getmicroseconds() / MICROSECONDS_PER_MILLISECOND; } // Sleeps for the given number of microseconds. Avoids the potential // EINVAL when using usleep() to sleep for a second or more. void sipp_usleep(unsigned long usec) { if (usec >= 1000000) { sleep(usec / 1000000); } usec %= 1000000; usleep(usec); } sipp-3.6.0/src/message.cpp0000644000175000017500000005001613475544015015002 0ustar walterwalter/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Richard GAYRAUD - 04 Nov 2003 * Olivier Jacques * From Hewlett Packard Company. * Shriram Natarajan * Peter Higginson * Eric Miller * Venkatesh * Enrico Hartung * Nasir Khan * Lee Ballard * Guillaume Teissier from FTR&D * Wolfgang Beck * Venkatesh * Vlad Troyanker * Charles P Wright from IBM Research * Amit On from Followap * Jan Andres from Freenet * Ben Evans from Open Cloud * Marc Van Diest from Belgacom * Stefan Esser * Andy Aicken */ #include "sipp.hpp" #include "message.hpp" struct KeywordMap { const char *keyword; MessageCompType type; }; typedef std::map kw_map; kw_map keyword_map; /* These keywords take no parameters. */ struct KeywordMap SimpleKeywords[] = { {"remote_ip", E_Message_Remote_IP }, {"remote_host", E_Message_Remote_Host }, {"remote_port", E_Message_Remote_Port }, {"transport", E_Message_Transport }, {"local_ip", E_Message_Local_IP }, {"local_ip_type", E_Message_Local_IP_Type }, {"local_port", E_Message_Local_Port }, {"server_ip", E_Message_Server_IP }, {"media_ip", E_Message_Media_IP }, #ifdef PCAPPLAY {"auto_media_port", E_Message_Auto_Media_Port }, #endif #ifdef RTP_STREAM /* Legacy since 3.6-dev. Actually uses media_port. */ {"rtpstream_audio_port", E_Message_RTPStream_Audio_Port }, {"rtpstream_video_port", E_Message_RTPStream_Video_Port }, #endif {"media_port", E_Message_Media_Port }, {"media_ip_type", E_Message_Media_IP_Type }, {"call_number", E_Message_Call_Number }, {"dynamic_id", E_Message_DynamicId }, // wrapping global counter {"call_id", E_Message_Call_ID }, {"cseq", E_Message_CSEQ }, {"pid", E_Message_PID }, {"service", E_Message_Service }, {"branch", E_Message_Branch }, {"msg_index", E_Message_Index }, {"next_url", E_Message_Next_Url }, {"len", E_Message_Len }, {"peer_tag_param", E_Message_Peer_Tag_Param }, {"last_Request_URI", E_Message_Last_Request_URI }, {"last_cseq_number", E_Message_Last_CSeq_Number }, {"last_message", E_Message_Last_Message }, {"routes", E_Message_Routes }, {"tdmmap", E_Message_TDM_Map }, {"clock_tick", E_Message_ClockTick }, {"users", E_Message_Users }, {"userid", E_Message_UserID }, {"timestamp", E_Message_Timestamp }, {"date", E_Message_Date }, {"sipp_version", E_Message_SippVersion }, }; #define KEYWORD_SIZE 256 static char* quoted_strchr(const char* s, int c) { const char* p; for (p = s; *p && *p != c; p++) { if (*p == '"') { p++; p += strcspn(p, "\""); } } return *p == c ? const_cast(p) : NULL; } SendingMessage::SendingMessage(scenario* msg_scenario, const char* const_src, bool skip_sanity) { char * src = strdup(const_src); char * osrc = src; char * literal; int literalLen; char * dest; char * key; char current_line[MAX_HEADER_LEN]; char * line_mark = NULL; char * tsrc; int num_cr = get_cr_number(src); this->msg_scenario = msg_scenario; dest = literal = (char *)malloc(strlen(src) + num_cr + 1); current_line[0] = '\0'; *dest = 0; while(*src) { if (current_line[0] == '\0') { line_mark = strchr(src, '\n'); if (line_mark) { int header_len = line_mark - src; if (header_len > MAX_HEADER_LEN-1) header_len = MAX_HEADER_LEN-1; memcpy(current_line, src, header_len); current_line[header_len] = '\0'; } } /* This hex encoding could be done in XML parsing, allowing us to skip * these conditionals and branches. */ if ((*src == '\\') && (*(src+1) == 'x')) { /* Allows any hex coded char like '\x5B' ([) */ src += 2; if (isxdigit(*src)) { int val = get_decimal_from_hex(*src); src++; if (isxdigit(*src)) { val = (val << 4) + get_decimal_from_hex(*src); } *dest++ = val & 0xff; } src++; } else if (*src == '\n') { *dest++ = '\r'; *dest++ = *src++; current_line[0] = '\0'; } else if (*src != '[') { *dest++ = *src++; } else { /* We have found a keyword, store the literal that we have been generating. */ literalLen = dest - literal; if (literalLen) { *dest = '\0'; literal = (char *)realloc(literal, literalLen + 1); if (!literal) { ERROR("Out of memory!"); } MessageComponent *newcomp = (MessageComponent *)calloc(1, sizeof(MessageComponent)); if (!newcomp) { ERROR("Out of memory!"); } newcomp->type = E_Message_Literal; newcomp->literal = literal; newcomp->literalLen = literalLen; // length without the terminator messageComponents.push_back(newcomp); } else { free(literal); } dest = literal = (char *)malloc(strlen(src) + num_cr + 1); *dest = '\0'; /* Now lets determine which keyword we have. */ MessageComponent *newcomp = (MessageComponent *)calloc(1, sizeof(MessageComponent)); if (!newcomp) { ERROR("Out of memory!"); } char keyword [KEYWORD_SIZE+1]; src++; tsrc = quoted_strchr(src, '['); key = quoted_strchr(src, ']'); if ((tsrc) && (tsrc KEYWORD_SIZE) || (!(key - src))) { ERROR("Syntax error or invalid [keyword] in scenario while parsing '%s'", current_line); } memcpy(keyword, src, key - src); keyword[key - src] = 0; src = key + 1; // allow +/-n for numeric variables newcomp->offset = 0; if ((strncmp(keyword, "authentication", strlen("authentication")) && strncmp(keyword, "tdmmap", strlen("tdmmap"))) && ((key = strchr(keyword,'+')) || (key = strchr(keyword,'-')))) { if (isdigit(*(key+1))) { newcomp->offset = atoi(key); *key = 0; } } char *spc = NULL; char ospc; if ((spc = strchr(keyword, ' '))) { ospc = *spc; *spc = '\0'; } kw_map::iterator it = keyword_map.find(keyword); if (spc) { *spc = ospc; } if (it != keyword_map.end()) { newcomp->type = E_Message_Custom; newcomp->comp_param.fxn = it->second; messageComponents.push_back(newcomp); continue; } bool simple_keyword = false; for (unsigned int i = 0; i < sizeof(SimpleKeywords)/sizeof(SimpleKeywords[0]); i++) { if (!strcmp(keyword, SimpleKeywords[i].keyword)) { newcomp->type = SimpleKeywords[i].type; simple_keyword = true; break; } } if (simple_keyword) { messageComponents.push_back(newcomp); continue; } if(!strncmp(keyword, "field", strlen("field"))) { newcomp->type = E_Message_Injection; /* Parse out the interesting things like file and number. */ newcomp->comp_param.field_param.field = atoi(keyword + strlen("field")); char fileName[KEYWORD_SIZE]; getKeywordParam(keyword, "file=", fileName); if (fileName[0] == '\0') { if (!default_file) { ERROR("No injection file was specified!"); } newcomp->comp_param.field_param.filename = strdup(default_file); } else { newcomp->comp_param.field_param.filename = strdup(fileName); } if (inFiles.find(newcomp->comp_param.field_param.filename) == inFiles.end()) { ERROR("Invalid injection file: %s", fileName); } char line[KEYWORD_SIZE]; getKeywordParam(keyword, "line=", line); if (line[0]) { /* Turn this into a new message component. */ newcomp->comp_param.field_param.line = new SendingMessage(msg_scenario, line, true); } } else if(!strncmp(keyword, "file", strlen("file"))) { newcomp->type = E_Message_File; /* Parse out the interesting things like file and number. */ char fileName[KEYWORD_SIZE]; getKeywordParam(keyword, "name=", fileName); if (fileName[0] == '\0') { ERROR("No name specified for 'file' keyword!"); } /* Turn this into a new message component. */ newcomp->comp_param.filename = new SendingMessage(msg_scenario, fileName, true); } else if(*keyword == '$') { newcomp->type = E_Message_Variable; if (!msg_scenario) { ERROR("SendingMessage with variable usage outside of scenario!"); } newcomp->varId = msg_scenario->get_var(keyword + 1, "Variable keyword"); } else if(!strncmp(keyword, "fill", strlen("fill"))) { newcomp->type = E_Message_Fill; char filltext[KEYWORD_SIZE]; char varName[KEYWORD_SIZE]; getKeywordParam(keyword, "text=", filltext); if (filltext[0] == '\0') { strcpy(filltext, "X"); } getKeywordParam(keyword, "variable=", varName); newcomp->literal = strdup(filltext); newcomp->literalLen = strlen(newcomp->literal); if (!msg_scenario) { ERROR("SendingMessage with variable usage outside of scenario!"); } newcomp->varId = msg_scenario->get_var(varName, "Fill Variable"); } else if(!strncmp(keyword, "last_", strlen("last_"))) { newcomp->type = E_Message_Last_Header; newcomp->literal = strdup(keyword + strlen("last_")); newcomp->literalLen = strlen(newcomp->literal); } else if(!strncmp(keyword, "authentication", strlen("authentication"))) { parseAuthenticationKeyword(msg_scenario, newcomp, keyword); } #ifndef PCAPPLAY else if(!strcmp(keyword, "auto_media_port")) { ERROR("The %s keyword requires PCAPPLAY", keyword); } #endif else { // scan for the generic parameters - must be last test int i = 0; while (generic[i]) { char *msg1 = *generic[i]; char *msg2 = *(generic[i] + 1); if(!strcmp(keyword, msg1)) { newcomp->type = E_Message_Literal; newcomp->literal = strdup(msg2); newcomp->literalLen = strlen(newcomp->literal); break; } ++i; } if (!generic[i]) { ERROR("Unsupported keyword '%s' in xml scenario file", keyword); } } messageComponents.push_back(newcomp); } } if (literal[0]) { *dest++ = '\0'; literalLen = dest - literal; literal = (char *)realloc(literal, literalLen); if (!literal) { ERROR("Out of memory!"); } MessageComponent *newcomp = (MessageComponent *)calloc(1, sizeof(MessageComponent)); if (!newcomp) { ERROR("Out of memory!"); } newcomp->type = E_Message_Literal; newcomp->literal = literal; newcomp->literalLen = literalLen-1; messageComponents.push_back(newcomp); } else { free(literal); } if (skip_sanity) { cancel = response = ack = false; method = NULL; free(osrc); return; } if (numComponents() < 1) { ERROR("Can not create a message that is empty!"); } if (getComponent(0)->type != E_Message_Literal) { ERROR("You can not use a keyword for the METHOD or to generate \"SIP/2.0\" to ensure proper [cseq] operation!\n%s\n", osrc); } char *p = method = strdup(getComponent(0)->literal); char *q; while (isspace(*p)) { p++; } if (!(q = strchr(method, ' '))) { ERROR("You can not use a keyword for the METHOD or to generate \"SIP/2.0\" to ensure proper [cseq] operation!\n%s\n", osrc); } *q++ = '\0'; while (isspace(*q)) { q++; } if (!strcmp(method, "SIP/2.0")) { char *endptr; code = strtol(q, &endptr, 10); if (*endptr && !isspace(*endptr)) { ERROR("Invalid reply code: %s", q); } if (code < 100 || code >= 700) { ERROR("Response codes must be in the range of 100-700"); } response = true; ack = false; cancel = false; free(method); method = NULL; } else { if (p != method) { memmove(method, p, strlen(p) + 1); } method = (char *)realloc(method, strlen(method) + 1); if (!method) { ERROR("Out of memory"); } ack = (!strcmp(method, "ACK")); cancel = (!strcmp(method, "CANCEL")); response = false; }; free(osrc); } SendingMessage::~SendingMessage() { for (int i = 0; i < numComponents(); i++) { freeMessageComponent(messageComponents[i]); } free(method); } bool SendingMessage::isAck() { return ack; } bool SendingMessage::isCancel() { return cancel; } bool SendingMessage::isResponse() { return response; } char *SendingMessage::getMethod() { return method; } int SendingMessage::getCode() { return code; } void SendingMessage::getQuotedParam(char * dest, char * src, int * len) { *len=0; /* Allows any hex coded string like '0x5B07F6' */ while (char c = *src++) { switch(c) { case '"': (*len)++; *dest = '\0'; return; case '\\': c = *src++; (*len)++; if (c == 0) { *dest = '\0'; return; } /* Fall-Through. */ default: *dest++ = c; (*len)++; } } *dest = '\0'; } void SendingMessage::getHexStringParam(char * dest, char * src, int * len) { *len=0; /* Allows any hex coded string like '0x5B07F6' */ while (isxdigit(*src)) { int val = get_decimal_from_hex(*src); src++; if (isxdigit(*src)) { val = (val << 4) + get_decimal_from_hex(*src); src++; } *dest++ = val & 0xff; (*len)++; } } void SendingMessage::getKeywordParam(char * src, const char * param, char * output) { char *key, *tmp; int len; len = 0; key = NULL; if ((tmp = strstr(src, param))) { tmp += strlen(param); key = tmp; if ((*key == '0') && (*(key+1) == 'x')) { key += 2; getHexStringParam(output, key, &len); } else if (*key == '\"') { key++; getQuotedParam(output, key, &len); } else { while (*key) { if (((key - src) > KEYWORD_SIZE) || (!(key - src))) { ERROR("Syntax error parsing '%s' parameter", param); } else if (*key == ']' || *key < 33 || *key > 126) { break; } key++; } strncpy(output, tmp, key-tmp); output[key-tmp] = '\0'; } } else { output[0] = '\0'; } } void SendingMessage::parseAuthenticationKeyword(scenario *msg_scenario, struct MessageComponent *dst, char *keyword) { char my_auth_user[KEYWORD_SIZE + 1]; char my_auth_pass[KEYWORD_SIZE + 1]; char my_aka[KEYWORD_SIZE + 1]; dst->type = E_Message_Authentication; memset(my_auth_user,0,KEYWORD_SIZE); memset(my_auth_pass,0,KEYWORD_SIZE); /* Look for optional username and password parameters */ getKeywordParam(keyword, "username=", my_auth_user); getKeywordParam(keyword, "password=", my_auth_pass); if(*my_auth_user == '\0') { strncpy(my_auth_user, auth_username ? auth_username : service, sizeof(my_auth_user) - 1); } if(*my_auth_pass == '\0') { strncpy(my_auth_pass, auth_password, sizeof(my_auth_pass) - 1); } dst->comp_param.auth_param.auth_user = new SendingMessage(msg_scenario, my_auth_user, true /* skip sanity */); dst->comp_param.auth_param.auth_pass = new SendingMessage(msg_scenario, my_auth_pass, true); /* add aka_OP, aka_AMF, aka_K */ getKeywordParam(keyword, "aka_K=", my_aka); if (my_aka[0]==0) { memcpy(my_aka,my_auth_pass,16); my_aka[16]=0; } dst->comp_param.auth_param.aka_K = new SendingMessage(msg_scenario, my_aka, true); getKeywordParam(keyword, "aka_OP=", my_aka); dst->comp_param.auth_param.aka_OP = new SendingMessage(msg_scenario, my_aka, true); getKeywordParam(keyword, "aka_AMF=", my_aka); dst->comp_param.auth_param.aka_AMF = new SendingMessage(msg_scenario, my_aka, true); } void SendingMessage::freeMessageComponent(struct MessageComponent *comp) { free(comp->literal); if (comp->type == E_Message_Authentication) { if (comp->comp_param.auth_param.auth_user) { delete comp->comp_param.auth_param.auth_user; } if (comp->comp_param.auth_param.auth_pass) { delete comp->comp_param.auth_param.auth_pass; } if (comp->comp_param.auth_param.aka_K) { delete comp->comp_param.auth_param.aka_K; } if (comp->comp_param.auth_param.aka_AMF) { delete comp->comp_param.auth_param.aka_AMF; } if (comp->comp_param.auth_param.aka_OP) { delete comp->comp_param.auth_param.aka_OP; } } else if (comp->type == E_Message_Injection) { free(comp->comp_param.field_param.filename); } free(comp); } int SendingMessage::numComponents() { return messageComponents.size(); } struct MessageComponent *SendingMessage::getComponent(int i) { return messageComponents[i]; } /* This is very simplistic and does not yet allow any arguments, but it is a start. */ int registerKeyword(char *keyword, customKeyword fxn) { if (keyword_map.find(keyword) != keyword_map.end()) { ERROR("Can not register keyword '%s', already registered!", keyword); } keyword_map[keyword] = fxn; return 0; } sipp-3.6.0/src/deadcall.cpp0000644000175000017500000000567013475544015015115 0ustar walterwalter/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Richard GAYRAUD - 04 Nov 2003 * Olivier Jacques * From Hewlett Packard Company. * Shriram Natarajan * Peter Higginson * Eric Miller * Venkatesh * Enrico Hartung * Nasir Khan * Lee Ballard * Guillaume Teissier from FTR&D * Wolfgang Beck * Venkatesh * Vlad Troyanker * Charles P Wright from IBM Research * Amit On from Followap * Jan Andres from Freenet * Ben Evans from Open Cloud * Marc Van Diest from Belgacom * Michael Dwyer from Cibation */ #include #include #include #include #include #include #include "sipp.hpp" #include "deadcall.hpp" #include "assert.h" /* Defined in call.cpp. */ extern timewheel paused_calls; deadcall::deadcall(const char *id, const char *reason) : listener(id, true) { this->expiration = clock_tick + deadcall_wait; this->reason = strdup(reason); setPaused(); } deadcall::~deadcall() { free(reason); } bool deadcall::process_incoming(const char* msg, const struct sockaddr_storage* /*src*/) { char buffer[MAX_HEADER_LEN]; CStat::globalStat(CStat::E_DEAD_CALL_MSGS); setRunning(); snprintf(buffer, MAX_HEADER_LEN, "Dead call %s (%s)", id, reason); WARNING("%s, received '%s'", buffer, msg); TRACE_MSG("-----------------------------------------------\n" "Dead call %s received a %s message:\n\n%s\n", id, TRANSPORT_TO_STRING(transport), msg); expiration = clock_tick + deadcall_wait; return run(); } bool deadcall::process_twinSippCom(char * msg) { CStat::globalStat(CStat::E_DEAD_CALL_MSGS); TRACE_MSG("Received twin message for dead (%s) call %s:%s\n", reason, id, msg); return true; } bool deadcall::run() { if (clock_tick > expiration) { delete this; return false; } else { setPaused(); return true; } } unsigned int deadcall::wake() { return expiration; } /* Dump call info to error log. */ void deadcall::dump() { WARNING("%s: Dead Call (%s) expiring at %lu", id, reason, expiration); } sipp-3.6.0/src/strings.cpp0000644000175000017500000001445213475544015015053 0ustar walterwalter/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Richard GAYRAUD - 04 Nov 2003 * Marc LAMBERTON * Olivier JACQUES * Herve PELLAN * David MANSUTTI * Francois-Xavier Kowalski * Gerard Lyonnaz * Francois Draperi (for dynamic_id) * From Hewlett Packard Company. * F. Tarek Rogers * Peter Higginson * Vincent Luba * Shriram Natarajan * Guillaume Teissier from FTR&D * Clement Chen * Wolfgang Beck * Charles P Wright from IBM Research * Martin Van Leeuwen * Andy Aicken * Michael Hirschbichler */ #include "strings.hpp" #include #include #include #include void get_host_and_port(const char * addr, char * host, int * port) { /* Separate the port number (if any) from the host name. * Thing is, the separator is a colon (':'). The colon may also exist * in the host portion if the host is specified as an IPv6 address (see * RFC 2732). If that's the case, then we need to skip past the IPv6 * address, which should be contained within square brackets ('[',']'). */ const char *has_brackets; int len; int port_result = 0; has_brackets = strchr(addr, '['); if (has_brackets != NULL) { has_brackets = strchr(has_brackets, ']'); } if (has_brackets == NULL) { /* addr is not a []-enclosed IPv6 address, but might still be IPv6 (without * a port), or IPv4 or a hostname (with or without a port) */ char *first_colon_location; char *second_colon_location; len = strlen(addr) + 1; memmove(host, addr, len); first_colon_location = strchr(host, ':'); if (first_colon_location == NULL) { /* No colon - just set the port to 0 */ port_result = 0; } else { second_colon_location = strchr(first_colon_location + 1, ':'); if (second_colon_location != NULL) { /* Found a second colon in addr - so this is an IPv6 address * without a port. Set the port to 0 */ port_result = 0; } else { /* IPv4 address or hostname with a colon in it - convert the colon to * a NUL terminator, and set the value after it as the port */ *first_colon_location = '\0'; port_result = atol(first_colon_location + 1); } } } else { /* If '['..']' found, */ const char *initial_bracket; /* extract the remote_host */ char *second_bracket; char *colon_before_port; initial_bracket = strchr( addr, '[' ); initial_bracket++; /* Step forward one character */ len = strlen(initial_bracket) + 1; memmove(host, initial_bracket, len); second_bracket = strchr( host, ']' ); *second_bracket = '\0'; /* Check for a port specified after the ] */ colon_before_port = strchr(second_bracket + 1, ':'); if (colon_before_port != NULL) { port_result = atol(colon_before_port + 1); } else { port_result = 0; } } // Set the port argument if it wasn't NULL if (port != NULL) { *port = port_result; } } int get_decimal_from_hex(char hex) { if (isdigit(hex)) return hex - '0'; else return tolower(hex) - 'a' + 10; } void trim(char *s) { char *p = s; while(isspace(*p)) { p++; } int l = strlen(p); for (int i = l - 1; i >= 0 && isspace(p[i]); i--) { p[i] = '\0'; } memmove(s, p, l + 1); } #ifdef GTEST #include "gtest/gtest.h" TEST(GetHostAndPort, IPv6) { int port_result = -1; char host_result[255]; get_host_and_port("fe80::92a4:deff:fe74:7af5", host_result, &port_result); EXPECT_EQ(0, port_result); EXPECT_STREQ("fe80::92a4:deff:fe74:7af5", host_result); } TEST(GetHostAndPort, IPv6Brackets) { int port_result = -1; char host_result[255]; get_host_and_port("[fe80::92a4:deff:fe74:7af5]", host_result, &port_result); EXPECT_EQ(0, port_result); EXPECT_STREQ("fe80::92a4:deff:fe74:7af5", host_result); } TEST(GetHostAndPort, IPv6BracketsAndPort) { int port_result = -1; char host_result[255]; get_host_and_port("[fe80::92a4:deff:fe74:7af5]:999", host_result, &port_result); EXPECT_EQ(999, port_result); EXPECT_STREQ("fe80::92a4:deff:fe74:7af5", host_result); } TEST(GetHostAndPort, IPv4) { int port_result = -1; char host_result[255]; get_host_and_port("127.0.0.1", host_result, &port_result); EXPECT_EQ(0, port_result); EXPECT_STREQ("127.0.0.1", host_result); } TEST(GetHostAndPort, IPv4AndPort) { int port_result = -1; char host_result[255]; get_host_and_port("127.0.0.1:999", host_result, &port_result); EXPECT_EQ(999, port_result); EXPECT_STREQ("127.0.0.1", host_result); } TEST(GetHostAndPort, IgnorePort) { char host_result[255]; get_host_and_port("127.0.0.1", host_result, NULL); EXPECT_STREQ("127.0.0.1", host_result); } TEST(GetHostAndPort, DNS) { int port_result = -1; char host_result[255]; get_host_and_port("sipp.sf.net", host_result, &port_result); EXPECT_EQ(0, port_result); EXPECT_STREQ("sipp.sf.net", host_result); } TEST(GetHostAndPort, DNSAndPort) { int port_result = -1; char host_result[255]; get_host_and_port("sipp.sf.net:999", host_result, &port_result); EXPECT_EQ(999, port_result); EXPECT_STREQ("sipp.sf.net", host_result); } #endif //GTEST sipp-3.6.0/src/call.cpp0000644000175000017500000045127513475544015014305 0ustar walterwalter/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Richard GAYRAUD - 04 Nov 2003 * Olivier Jacques * From Hewlett Packard Company. * Shriram Natarajan * Peter Higginson * Eric Miller * Venkatesh * Enrico Hartung * Nasir Khan * Lee Ballard * Guillaume Teissier from FTR&D * Wolfgang Beck * Venkatesh * Vlad Troyanker * Charles P Wright from IBM Research * Amit On from Followap * Jan Andres from Freenet * Ben Evans from Open Cloud * Marc Van Diest from Belgacom * Michael Dwyer from Cibation * Roland Meub * Andy Aicken * Martin H. VanLeeuwen */ #include #include #include #include #include #include #include #include #include #include #include #ifdef PCAPPLAY #include "send_packets.h" #endif #include "sipp.hpp" #include "auth.hpp" #include "deadcall.hpp" #include "config.h" #include "version.h" template void split(const std::string &s, char delim, Out result) { std::stringstream ss; ss.str(s); std::string item; while (std::getline(ss, item, delim)) { *(result++) = item; } } std::vector split(const std::string &s, char delim) { std::vector elems; split(s, delim, std::back_inserter(elems)); return elems; } std::string join(const std::vector &s, const char* delim) { std::ostringstream imploded; std::copy(s.begin(), s.end(), std::ostream_iterator(imploded, delim)); std::string ret = imploded.str(); if (ret.length()) { ret.resize(ret.length() - strlen(delim)); } return ret; } std::string trim(const std::string &s) { size_t first = s.find_first_not_of(' '); if (first == string::npos) { return s; } size_t last = s.find_last_not_of(' '); return s.substr(first, (last - first + 1)); } #define callDebug(...) do { if (useCallDebugf) { _callDebug( __VA_ARGS__ ); } } while (0) extern map map_perip_fd; #ifdef PCAPPLAY /* send_packets pthread wrapper */ void *send_wrapper(void *); #endif int call::dynamicId = 0; int call::maxDynamicId = 10000+2000*4; // FIXME both param to be in command line !!!! int call::startDynamicId = 10000; // FIXME both param to be in command line !!!! int call::stepDynamicId = 4; // FIXME both param to be in command line !!!! /************** Call map and management routines **************/ static unsigned int next_number = 1; static unsigned int get_tdm_map_number() { unsigned int nb = 0; unsigned int i=0; unsigned int interval=0; unsigned int random=0; bool found = false; /* Find a number in the tdm_map which is not in use */ interval = (tdm_map_a+1) * (tdm_map_b+1) * (tdm_map_c+1); random = rand() % interval; while ((iss_ipv6, false /* Not Auto. */, false); } call::call(scenario * call_scenario, SIPpSocket *socket, struct sockaddr_storage *dest, const char * p_id, int userId, bool ipv6, bool isAutomatic, bool isInitialization) : listener(p_id, true) { init(call_scenario, socket, dest, p_id, userId, ipv6, isAutomatic, isInitialization); } call *call::add_call(int userId, bool ipv6, struct sockaddr_storage *dest) { static char call_id[MAX_HEADER_LEN]; const char * src = call_id_string; int count = 0; if(!next_number) { next_number ++; } while (*src && count < MAX_HEADER_LEN-1) { if (*src == '%') { ++src; switch(*src++) { case 'u': count += snprintf(&call_id[count], MAX_HEADER_LEN-count-1,"%u", next_number); break; case 'p': count += snprintf(&call_id[count], MAX_HEADER_LEN-count-1,"%u", pid); break; case 's': count += snprintf(&call_id[count], MAX_HEADER_LEN-count-1,"%s", local_ip); break; default: // treat all unknown sequences as %% call_id[count++] = '%'; break; } } else { call_id[count++] = *src++; } } call_id[count] = 0; return new call(main_scenario, NULL, dest, call_id, userId, ipv6, false /* Not Auto. */, false); } void call::init(scenario * call_scenario, SIPpSocket *socket, struct sockaddr_storage *dest, const char * p_id, int userId, bool ipv6, bool isAutomatic, bool isInitCall) { this->call_scenario = call_scenario; zombie = false; debugBuffer = NULL; debugLength = 0; msg_index = 0; last_send_index = 0; last_send_msg = NULL; last_send_len = 0; last_recv_hash = 0; last_recv_index = -1; last_recv_msg = NULL; recv_retrans_hash = 0; recv_retrans_recv_index = -1; recv_retrans_send_index = -1; dialog_route_set = NULL; next_req_url = NULL; cseq = 0; next_retrans = 0; nb_retrans = 0; nb_last_delay = 0; paused_until = 0; call_port = 0; comp_state = NULL; start_time = clock_tick; call_established=false ; ack_is_pending=false ; last_recv_msg = NULL; cseq = base_cseq; nb_last_delay = 0; use_ipv6 = ipv6; queued_msg = NULL; dialog_authentication = NULL; dialog_challenge_type = 0; #ifdef RTP_STREAM /* check and warn on rtpstream_new_call result? -> error alloc'ing mem */ rtpstream_new_call(&rtpstream_callinfo); #endif #ifdef PCAPPLAY hasMediaInformation = 0; play_args_a.last_seq_no = 1200; play_args_v.last_seq_no = 2400; #endif call_remote_socket = NULL; if (socket) { associate_socket(socket); socket->ss_count++; } else { call_socket = NULL; } if (dest) { memcpy(&call_peer, dest, sizeof(call_peer)); } else { memset(&call_peer, 0, sizeof(call_peer)); } // initialising the CallVariable with the Scenario variable int i; VariableTable *userVars = NULL; bool putUserVars = false; if (userId) { int_vt_map::iterator it = userVarMap.find(userId); if (it != userVarMap.end()) { userVars = it->second; } } else { userVars = new VariableTable(userVariables); /* Creating this table creates a reference to it, but if it is really used, * then the refcount will be increased. */ putUserVars = true; } if (call_scenario->allocVars->size > 0) { M_callVariableTable = new VariableTable(userVars, call_scenario->allocVars->size); } else if (userVars && userVars->size > 0) { M_callVariableTable = userVars->getTable(); } else if (globalVariables->size > 0) { M_callVariableTable = globalVariables->getTable(); } else { M_callVariableTable = NULL; } if (putUserVars) { userVars->putTable(); } if (call_scenario->transactions.size() > 0) { transactions = (struct txnInstanceInfo *)malloc(sizeof(txnInstanceInfo) * call_scenario->transactions.size()); memset(transactions, 0, sizeof(struct txnInstanceInfo) * call_scenario->transactions.size()); } else { transactions = NULL; } // If not updated by a message we use the start time // information to compute rtd information start_time_rtd = (unsigned long long *)malloc(sizeof(unsigned long long) * call_scenario->stats->nRtds()); if (!start_time_rtd) { ERROR("Could not allocate RTD times!"); } rtd_done = (bool *)malloc(sizeof(bool) * call_scenario->stats->nRtds()); if (!start_time_rtd) { ERROR("Could not allocate RTD done!"); } for (i = 0; i < call_scenario->stats->nRtds(); i++) { start_time_rtd[i] = getmicroseconds(); rtd_done[i] = false; } // by default, last action result is NO_ERROR last_action_result = call::E_AR_NO_ERROR; this->userId = userId; /* For automatic answer calls to an out of call request, we must not */ /* increment the input files line numbers to not disturb */ /* the input files read mechanism (otherwise some lines risk */ /* to be systematically skipped */ if (!isAutomatic) { m_lineNumber = new file_line_map(); for (file_map::iterator file_it = inFiles.begin(); file_it != inFiles.end(); file_it++) { (*m_lineNumber)[file_it->first] = file_it->second->nextLine(userId); } } else { m_lineNumber = NULL; } this->initCall = isInitCall; #ifdef PCAPPLAY memset(&(play_args_a.to), 0, sizeof(struct sockaddr_storage)); memset(&(play_args_i.to), 0, sizeof(struct sockaddr_storage)); memset(&(play_args_v.to), 0, sizeof(struct sockaddr_storage)); memset(&(play_args_a.from), 0, sizeof(struct sockaddr_storage)); memset(&(play_args_i.from), 0, sizeof(struct sockaddr_storage)); memset(&(play_args_v.from), 0, sizeof(struct sockaddr_storage)); hasMediaInformation = 0; media_thread = 0; #endif peer_tag = NULL; recv_timeout = 0; send_timeout = 0; timewait = false; if (!isAutomatic) { /* Not advancing the number is safe, because for automatic calls we do not * assign the identifier, the only other place it is used is for the auto * media port. */ number = next_number++; if (use_tdmmap) { tdm_map_number = get_tdm_map_number(); if (tdm_map_number == 0) { /* Can't create the new call */ WARNING("Can't create new outgoing call: all tdm_map circuits busy"); computeStat(CStat::E_CALL_FAILED); computeStat(CStat::E_FAILED_OUTBOUND_CONGESTION); this->zombie = true; return; } /* Mark the entry in the list as busy */ tdm_map[tdm_map_number - 1] = true; } else { tdm_map_number = 0; } } callDebug("Starting call %s\n", id); setRunning(); } int call::_callDebug(const char *fmt, ...) { va_list ap; if (!useCallDebugf) { return 0; } /* First we figure out how much to allocate. */ va_start(ap, fmt); int ret = vsnprintf(NULL, 0, fmt, ap); va_end(ap); debugBuffer = (char *)realloc(debugBuffer, debugLength + ret + TIME_LENGTH + 2); if (!debugBuffer) { ERROR("Could not allocate buffer (%d bytes) for callDebug file!", debugLength + ret + TIME_LENGTH + 2); } struct timeval now; gettimeofday(&now, NULL); debugLength += snprintf(debugBuffer + debugLength, TIME_LENGTH + 2, "%s ", CStat::formatTime(&now)); va_start(ap, fmt); debugLength += vsnprintf(debugBuffer + debugLength, ret + 1, fmt, ap); va_end(ap); return ret; } call::~call() { computeStat(CStat::E_ADD_CALL_DURATION, clock_tick - start_time); if(comp_state) { comp_free(&comp_state); } if (call_remote_socket && (call_remote_socket != main_remote_socket)) { call_remote_socket->close(); } /* Deletion of the call variable */ if(M_callVariableTable) { M_callVariableTable->putTable(); } if (m_lineNumber) { delete m_lineNumber; } if (userId) { CallGenerationTask::free_user(userId); } if (transactions) { for (unsigned int i = 0; i < call_scenario->transactions.size(); i++) { free(transactions[i].txnID); } free(transactions); } if (last_recv_msg) { free(last_recv_msg); } if (last_send_msg) { free(last_send_msg); } if (peer_tag) { free(peer_tag); } if (dialog_route_set) { free(dialog_route_set); } if (next_req_url) { free(next_req_url); } #ifdef RTP_STREAM rtpstream_end_call(&rtpstream_callinfo); #endif if (dialog_authentication) { free(dialog_authentication); } if (use_tdmmap) { tdm_map[tdm_map_number] = false; } # ifdef PCAPPLAY if (media_thread != 0) { pthread_cancel(media_thread); pthread_join(media_thread, NULL); } #endif free(start_time_rtd); free(rtd_done); free(debugBuffer); } void call::computeStat (CStat::E_Action P_action) { if (initCall) { return; } call_scenario->stats->computeStat(P_action); } void call::computeStat (CStat::E_Action P_action, unsigned long P_value) { if (initCall) { return; } call_scenario->stats->computeStat(P_action, P_value); } void call::computeStat (CStat::E_Action P_action, unsigned long P_value, int which) { if (initCall) { return; } call_scenario->stats->computeStat(P_action, P_value, which); } /* Dump call info to error log. */ void call::dump() { char s[MAX_HEADER_LEN]; char tmpbuf[MAX_HEADER_LEN]; sprintf(s, "%s: State %d", id, msg_index); if (next_retrans) { snprintf(tmpbuf, 64, "%s (next retrans %u)", s, next_retrans); strcat(s, tmpbuf); } if (paused_until) { snprintf(tmpbuf, 64, "%s (paused until %u)", s, paused_until); strcat(s, tmpbuf); } if (recv_timeout) { snprintf(tmpbuf, 64, "%s (recv timeout %u)", s, recv_timeout); strcat(s, tmpbuf); } if (send_timeout) { snprintf(tmpbuf, 64, "%s (send timeout %u)", s, send_timeout); strcat(s, tmpbuf); } WARNING("%s", s); } bool call::connect_socket_if_needed() { bool existing; if(call_socket) return true; if(!multisocket) return true; if(transport == T_UDP) { struct sockaddr_storage saddr; if(sendMode != MODE_CLIENT) return true; char peripaddr[256]; if (!peripsocket) { if ((associate_socket(SIPpSocket::new_sipp_call_socket(use_ipv6, transport, &existing))) == NULL) { ERROR_NO("Unable to get a UDP socket (1)"); } } else { char *tmp = peripaddr; getFieldFromInputFile(ip_file, peripfield, NULL, tmp); map::iterator i; i = map_perip_fd.find(peripaddr); if (i == map_perip_fd.end()) { // Socket does not exist if ((associate_socket(SIPpSocket::new_sipp_call_socket(use_ipv6, transport, &existing))) == NULL) { ERROR_NO("Unable to get a UDP socket (2)"); } else { /* Ensure that it stays persistent, because it is recorded in the map. */ call_socket->ss_count++; map_perip_fd[peripaddr] = call_socket; } } else { // Socket exists already associate_socket(i->second); existing = true; i->second->ss_count++; } } if (existing) { return true; } memcpy(&saddr, &local_addr_storage, sizeof(struct sockaddr_storage)); if (use_ipv6) { saddr.ss_family = AF_INET6; } else { saddr.ss_family = AF_INET; } if (peripsocket) { gai_getsockaddr(&saddr, peripaddr, local_port, AI_PASSIVE, AF_UNSPEC); } if (sipp_bind_socket(call_socket, &saddr, &call_port)) { ERROR_NO("Unable to bind UDP socket"); } } else { /* TCP, SCTP or TLS. */ struct sockaddr_storage *L_dest = &remote_sockaddr; if ((associate_socket(SIPpSocket::new_sipp_call_socket(use_ipv6, transport, &existing))) == NULL) { ERROR_NO("Unable to get a TCP/SCTP/TLS socket"); } if (existing) { return true; } sipp_customize_socket(call_socket); if (use_remote_sending_addr) { L_dest = &remote_sending_sockaddr; } if (call_socket->connect(L_dest)) { if (reconnect_allowed()) { if(errno == EINVAL) { /* This occurs sometime on HPUX but is not a true INVAL */ WARNING("Unable to connect a TCP/SCTP/TLS socket, remote peer error"); } else { WARNING("Unable to connect a TCP/SCTP/TLS socket"); } /* This connection failed. We must be in multisocket mode, because * otherwise we would already have a call_socket. This call can not * succeed, but does not affect any of our other calls. We do decrement * the reconnection counter however. */ if (reset_number != -1) { reset_number--; } computeStat(CStat::E_CALL_FAILED); computeStat(CStat::E_FAILED_TCP_CONNECT); delete this; return false; } else { if(errno == EINVAL) { /* This occurs sometime on HPUX but is not a true INVAL */ ERROR("Unable to connect a TCP/SCTP/TLS socket, remote peer error"); } else { ERROR_NO("Unable to connect a TCP/SCTP/TLS socket"); } } } call_port = call_socket->ss_port; } return true; } bool call::lost(int index) { static int inited = 0; double percent = global_lost; if(!lose_packets) return false; if (call_scenario->messages[index]->lost >= 0) { percent = call_scenario->messages[index]->lost; } if (percent == 0) { return false; } if(!inited) { srand((unsigned int) time(NULL)); inited = 1; } return (((double)rand() / (double)RAND_MAX) < (percent / 100.0)); } int call::send_raw(const char * msg, int index, int len) { SIPpSocket *sock; int rc; callDebug("Sending %s message for call %s (index %d, hash %lu):\n%s\n\n", TRANSPORT_TO_STRING(transport), id, index, hash(msg), msg); if((index!=-1) && (lost(index))) { TRACE_MSG("%s message voluntary lost (while sending).", TRANSPORT_TO_STRING(transport)); callDebug("%s message voluntary lost (while sending) (index %d, hash %lu).\n", TRANSPORT_TO_STRING(transport), index, hash(msg)); if(comp_state) { comp_free(&comp_state); } call_scenario->messages[index] -> nb_lost++; return 0; } sock = call_socket; if ((use_remote_sending_addr) && (sendMode == MODE_SERVER)) { if (!call_remote_socket) { if (multisocket || !main_remote_socket) { struct sockaddr_storage *L_dest = &remote_sending_sockaddr; if((call_remote_socket= new_sipp_socket(use_ipv6, transport)) == NULL) { ERROR_NO("Unable to get a socket for rsa option"); } sipp_customize_socket(call_remote_socket); if(transport != T_UDP) { if (call_remote_socket->connect(L_dest)) { if(errno == EINVAL) { /* This occurs sometime on HPUX but is not a true INVAL */ ERROR("Unable to connect a %s socket for rsa option, remote peer error", TRANSPORT_TO_STRING(transport)); } else { ERROR_NO("Unable to connect a socket for rsa option"); } } } if (!multisocket) { main_remote_socket = call_remote_socket; } } if (!multisocket) { call_remote_socket = main_remote_socket; main_remote_socket->ss_count++; } } sock=call_remote_socket ; } // If the length hasn't been explicitly specified, treat the message as a string if (len==0) { len = strlen(msg); } assert(sock); rc = sock->write(msg, len, WS_BUFFER, &call_peer); if(rc < 0 && errno == EWOULDBLOCK) { return rc; } if(rc < 0) { computeStat(CStat::E_CALL_FAILED); computeStat(CStat::E_FAILED_CANNOT_SEND_MSG); delete this; } return rc; /* OK */ } /* This method is used to send messages that are not */ /* part of the XML scenario */ void call::sendBuffer(char * msg, int len) { /* call send_raw but with a special scenario index */ if (send_raw(msg, -1, len) < 0) { if (sendbuffer_warn) { ERROR_NO("Error sending raw message"); } else { WARNING_NO("Error sending raw message"); } } } char * call::get_header_field_code(const char *msg, const char * name) { static char code[MAX_HEADER_LEN]; const char * last_header; int i; last_header = NULL; i = 0; /* If we find the field in msg */ last_header = get_header_content(msg, name); if(last_header) { /* Extract the integer value of the field */ while(isspace(*last_header)) last_header++; sscanf(last_header,"%d", &i); sprintf(code, "%s %d", name, i); } return code; } char * call::get_last_header(const char * name) { int len; if((!last_recv_msg) || (!strlen(last_recv_msg))) { return NULL; } len = strlen(name); /* Ideally this check should be moved to the XML parser so that it is not * along a critical path. We could also handle lowercasing there. */ if (len > MAX_HEADER_LEN) { ERROR("call::get_last_header: Header to parse bigger than %d (%zu)", MAX_HEADER_LEN, strlen(name)); } if (name[len - 1] == ':') { return get_header(last_recv_msg, name, false); } else { char with_colon[MAX_HEADER_LEN]; sprintf(with_colon, "%s:", name); return get_header(last_recv_msg, with_colon, false); } } /* Return the last request URI from the To header. On any error returns the * empty string. The caller must free the result. */ char * call::get_last_request_uri() { char * tmp; char * tmp2; char * last_request_uri; int tmp_len; char * last_To = get_last_header("To:"); if (!last_To) { return strdup(""); } tmp = strchr(last_To, '<'); if (!tmp) { return strdup(""); } tmp++; tmp2 = strchr(last_To, '>'); if (!tmp2) { return strdup(""); } tmp_len = strlen(tmp) - strlen(tmp2); if (tmp_len < 0) { return strdup(""); } if (!(last_request_uri = (char *)malloc(tmp_len + 1))) { ERROR("Cannot allocate!"); } last_request_uri[0] = '\0'; if (tmp && (tmp_len > 0)) { strncpy(last_request_uri, tmp, tmp_len); } last_request_uri[tmp_len] = '\0'; return last_request_uri; } char * call::send_scene(int index, int *send_status, int *len) { #define MAX_MSG_NAME_SIZE 30 static char msg_name[MAX_MSG_NAME_SIZE]; char *L_ptr1 ; char *L_ptr2 ; int uselen = 0; assert(send_status); /* Socket port must be known before string substitution */ if (!connect_socket_if_needed()) { *send_status = -2; return NULL; } assert(call_socket); assert(call_scenario->messages[index]->send_scheme); if (!len) { len = &uselen; } char * dest; dest = createSendingMessage(call_scenario->messages[index] -> send_scheme, index, len); if (!dest) { *send_status = -2; return NULL; } L_ptr1=msg_name ; L_ptr2=dest ; while ((*L_ptr2 != ' ') && (*L_ptr2 != '\n') && (*L_ptr2 != '\t')) { *L_ptr1 = *L_ptr2; L_ptr1 ++; L_ptr2 ++; } *L_ptr1 = '\0' ; if (strcmp(msg_name,"ACK") == 0) { call_established = true ; ack_is_pending = false ; } *send_status = send_raw(dest, index, *len); return dest; } void call::do_bookkeeping(message *curmsg) { /* If this message increments a counter, do it now. */ if (curmsg -> counter) { computeStat(CStat::E_ADD_GENERIC_COUNTER, 1, curmsg->counter - 1); } /* If this message can be used to compute RTD, do it now */ if (curmsg->start_rtd) { start_time_rtd[curmsg->start_rtd - 1] = getmicroseconds(); } if (curmsg->stop_rtd) { int rtd = curmsg->stop_rtd; if (!rtd_done[rtd - 1]) { unsigned long long start = start_time_rtd[rtd - 1]; unsigned long long end = getmicroseconds(); if (dumpInRtt) { call_scenario->stats->computeRtt(start, end, rtd); } computeStat(CStat::E_ADD_RESPONSE_TIME_DURATION, (end - start) / 1000, rtd - 1); if (!curmsg->repeat_rtd) { rtd_done[rtd - 1] = true; } } } } void call::tcpClose() { terminate(CStat::E_FAILED_TCP_CLOSED); } void call::terminate(CStat::E_Action reason) { char reason_str[100]; stopListening(); // Call end -> was it successful? if(call::last_action_result != call::E_AR_NO_ERROR) { switch(call::last_action_result) { case call::E_AR_REGEXP_DOESNT_MATCH: computeStat(CStat::E_CALL_FAILED); computeStat(CStat::E_FAILED_REGEXP_DOESNT_MATCH); if (deadcall_wait && !initCall) { sprintf(reason_str, "regexp match failure at index %d", msg_index); new deadcall(id, reason_str); } break; case call::E_AR_REGEXP_SHOULDNT_MATCH: computeStat(CStat::E_CALL_FAILED); computeStat(CStat::E_FAILED_REGEXP_SHOULDNT_MATCH); if (deadcall_wait && !initCall) { sprintf(reason_str, "regexp matched, but shouldn't at index %d", msg_index); new deadcall(id, reason_str); } break; case call::E_AR_HDR_NOT_FOUND: computeStat(CStat::E_CALL_FAILED); computeStat(CStat::E_FAILED_REGEXP_HDR_NOT_FOUND); if (deadcall_wait && !initCall) { sprintf(reason_str, "regexp header not found at index %d", msg_index); new deadcall(id, reason_str); } break; case E_AR_CONNECT_FAILED: computeStat(CStat::E_CALL_FAILED); computeStat(CStat::E_FAILED_TCP_CONNECT); if (deadcall_wait && !initCall) { sprintf(reason_str, "connection failed %d", msg_index); new deadcall(id, reason_str); } break; case call::E_AR_NO_ERROR: case call::E_AR_STOP_CALL: /* Do nothing. */ break; case call::E_AR_TEST_DOESNT_MATCH: computeStat(CStat::E_CALL_FAILED); computeStat(CStat::E_FAILED_TEST_DOESNT_MATCH); if (deadcall_wait && !initCall) { sprintf(reason_str, "test failure at index %d", msg_index); new deadcall(id, reason_str); } break; case call::E_AR_TEST_SHOULDNT_MATCH: computeStat(CStat::E_CALL_FAILED); computeStat(CStat::E_FAILED_TEST_SHOULDNT_MATCH); if (deadcall_wait && !initCall) { sprintf(reason_str, "test succeeded, but shouldn't at index %d", msg_index); new deadcall(id, reason_str); } break; case call::E_AR_STRCMP_DOESNT_MATCH: computeStat(CStat::E_CALL_FAILED); computeStat(CStat::E_FAILED_STRCMP_DOESNT_MATCH); if (deadcall_wait && !initCall) { sprintf(reason_str, "test failure at index %d", msg_index); new deadcall(id, reason_str); } break; case call::E_AR_STRCMP_SHOULDNT_MATCH: computeStat(CStat::E_CALL_FAILED); computeStat(CStat::E_FAILED_STRCMP_SHOULDNT_MATCH); if (deadcall_wait && !initCall) { sprintf(reason_str, "test succeeded, but shouldn't at index %d", msg_index); new deadcall(id, reason_str); } break; } } else { if (reason == CStat::E_CALL_SUCCESSFULLY_ENDED || timewait) { computeStat(CStat::E_CALL_SUCCESSFULLY_ENDED); if (deadcall_wait && !initCall) { new deadcall(id, "successful"); } } else { computeStat(CStat::E_CALL_FAILED); if (reason != CStat::E_NO_ACTION) { computeStat(reason); } if (deadcall_wait && !initCall) { sprintf(reason_str, "failed at index %d", msg_index); new deadcall(id, reason_str); } } } delete this; } bool call::next() { msgvec * msgs = &call_scenario->messages; if (initCall) { msgs = &call_scenario->initmessages; } int test; /* What is the next message index? */ /* Default without branching: use the next message */ int new_msg_index = msg_index + 1; /* If branch needed, overwrite this default */ if (msg_index >= 0 && ((*msgs)[msg_index]->next >= 0) && (((test = ((*msgs)[msg_index]->test)) == -1) || M_callVariableTable->getVar(test)->isSet())) { /* Branching possible, check the probability */ int chance = (*msgs)[msg_index]->chance; if ((chance <= 0) || (rand() > chance )) { /* Branch == overwrite with the 'next' attribute value */ new_msg_index = (*msgs)[msg_index]->next; } } msg_index = new_msg_index; recv_timeout = 0; if (msg_index >= (int)((*msgs).size())) { terminate(CStat::E_CALL_SUCCESSFULLY_ENDED); return false; } return true; } bool call::executeMessage(message *curmsg) { if (curmsg->pause_distribution || curmsg->pause_variable != -1) { unsigned int pause; if (curmsg->pause_distribution) { double actualpause = curmsg->pause_distribution->sample(); if (actualpause < 1) { // Protect against distribution samples that give // negative results (and so pause for ~50 hours when // cast to a unsigned int). pause = 0; } else { pause = (unsigned int)actualpause; }; } else { int varId = curmsg->pause_variable; pause = (int) M_callVariableTable->getVar(varId)->getDouble(); } if (pause > INT_MAX) { pause = INT_MAX; } paused_until = clock_tick + pause; /* This state is used as the last message of a scenario, just for handling * final retransmissions. If the connection closes, we do not mark it is * failed. */ this->timewait = curmsg->timewait; /* Increment the number of sessions in pause state */ curmsg->sessions++; do_bookkeeping(curmsg); executeAction(NULL, curmsg); callDebug("Pausing call until %d (is now %ld).\n", paused_until, clock_tick); setPaused(); return true; } else if(curmsg -> M_type == MSG_TYPE_SENDCMD) { int send_status; if(next_retrans) { return true; } send_status = sendCmdMessage(curmsg); if(send_status != 0) { /* Send error */ return false; /* call deleted */ } curmsg -> M_nbCmdSent++; next_retrans = 0; do_bookkeeping(curmsg); executeAction(NULL, curmsg); return(next()); } else if(curmsg -> M_type == MSG_TYPE_NOP) { callDebug("Executing NOP at index %d.\n", curmsg->index); do_bookkeeping(curmsg); executeAction(NULL, curmsg); return(next()); } else if(curmsg -> send_scheme) { char * msg_snd; int msgLen; int send_status; /* Do not send a new message until the previous one which had * retransmission enabled is acknowledged */ if(next_retrans) { setPaused(); return true; } /* Handle counters and RTDs for this message. */ do_bookkeeping(curmsg); /* decide whether to increment cseq or not * basically increment for anything except response, ACK or CANCEL * Note that cseq is only used by the [cseq] keyword, and * not by default */ int incr_cseq = 0; if (!curmsg->send_scheme->isAck() && !curmsg->send_scheme->isCancel() && !curmsg->send_scheme->isResponse()) { ++cseq; incr_cseq = 1; } msg_snd = send_scene(msg_index, &send_status, &msgLen); if (!msg_snd) { /* This will hit connect_if_needed, and if it fails, the entire call is deleted... */ ERROR("Call failed, cannot continue safely..."); } if(send_status < 0 && errno == EWOULDBLOCK) { if (incr_cseq) --cseq; /* Have we set the timeout yet? */ if (send_timeout) { /* If we have actually timed out. */ if (clock_tick > send_timeout) { WARNING("Call-Id: %s, send timeout on message %s:%d: aborting call", id, curmsg->desc, curmsg->index); computeStat(CStat::E_CALL_FAILED); computeStat(CStat::E_FAILED_TIMEOUT_ON_SEND); if (default_behaviors & DEFAULT_BEHAVIOR_BYE) { return (abortCall(true)); } else { delete this; return false; } } } else if (curmsg->timeout) { /* Initialize the send timeout to the per message timeout. */ send_timeout = clock_tick + curmsg->timeout; } else if (defl_send_timeout) { /* Initialize the send timeout to the global timeout. */ send_timeout = clock_tick + defl_send_timeout; } return true; /* No step, nothing done, retry later */ } else if(send_status < 0) { /* Send error */ /* The call was already deleted by connect_socket_if_needed or send_raw, * so we should no longer access members. */ return false; } /* We have sent the message, so the timeout is no longer needed. */ send_timeout = 0; last_send_index = curmsg->index; last_send_len = msgLen; realloc_ptr = (char *) realloc(last_send_msg, msgLen+1); if (realloc_ptr) { last_send_msg = realloc_ptr; } else { free(last_send_msg); ERROR("Out of memory!"); return false; } memcpy(last_send_msg, msg_snd, msgLen); last_send_msg[msgLen] = '\0'; if (curmsg->start_txn) { transactions[curmsg->start_txn - 1].txnID = (char *)realloc(transactions[curmsg->start_txn - 1].txnID, MAX_HEADER_LEN); extract_transaction(transactions[curmsg->start_txn - 1].txnID, last_send_msg); } if (curmsg->ack_txn) { transactions[curmsg->ack_txn - 1].ackIndex = curmsg->index; } if(last_recv_index >= 0) { /* We are sending just after msg reception. There is a great * chance that we will be asked to retransmit this message */ recv_retrans_hash = last_recv_hash; recv_retrans_recv_index = last_recv_index; recv_retrans_send_index = curmsg->index; callDebug("Set Retransmission Hash: %lu (recv index %d, send index %d)\n", recv_retrans_hash, recv_retrans_recv_index, recv_retrans_send_index); /* Prevent from detecting the cause relation between send and recv * in the next valid send */ last_recv_hash = 0; } /* Update retransmission information */ if(curmsg -> retrans_delay) { if((transport == T_UDP) && (retrans_enabled)) { next_retrans = clock_tick + curmsg -> retrans_delay; nb_retrans = 0; nb_last_delay = curmsg->retrans_delay; } } else { next_retrans = 0; } executeAction(msg_snd, curmsg); /* Update scenario statistics */ curmsg -> nb_sent++; return next(); } else if (curmsg->M_type == MSG_TYPE_RECV || curmsg->M_type == MSG_TYPE_RECVCMD ) { if (queued_msg) { char *msg = queued_msg; queued_msg = NULL; bool ret = process_incoming(msg); free(msg); return ret; } else if (recv_timeout) { if(recv_timeout > getmilliseconds()) { setPaused(); return true; } recv_timeout = 0; curmsg->nb_timeout++; if (curmsg->on_timeout < 0) { // if you set a timeout but not a label, the call is aborted WARNING("Call-Id: %s, receive timeout on message %s:%d without label to jump to (ontimeout attribute): aborting call", id, curmsg->desc, curmsg->index); computeStat(CStat::E_CALL_FAILED); computeStat(CStat::E_FAILED_TIMEOUT_ON_RECV); if (default_behaviors & DEFAULT_BEHAVIOR_BYE) { return (abortCall(true)); } else { delete this; return false; } } WARNING("Call-Id: %s, receive timeout on message %s:%d, jumping to label %d", id, curmsg->desc, curmsg->index, curmsg->on_timeout); /* FIXME: We should do something like set index here, but it probably * does not matter too much as only nops are allowed in the init stanza. */ msg_index = curmsg->on_timeout; recv_timeout = 0; if (msg_index < (int)call_scenario->messages.size()) return true; // special case - the label points to the end - finish the call computeStat(CStat::E_CALL_FAILED); computeStat(CStat::E_FAILED_TIMEOUT_ON_RECV); if (default_behaviors & DEFAULT_BEHAVIOR_BYE) { return (abortCall(true)); } else { delete this; return false; } } else if (curmsg->timeout || defl_recv_timeout) { if (curmsg->timeout) // If timeout is specified on message receive, use it recv_timeout = getmilliseconds() + curmsg->timeout; else // Else use the default timeout if specified recv_timeout = getmilliseconds() + defl_recv_timeout; return true; } else { /* We are going to wait forever. */ setPaused(); } } else { WARNING("Unknown message type at %s:%d: %d", curmsg->desc, curmsg->index, curmsg->M_type); } return true; } bool call::run() { bool bInviteTransaction = false; assert(running); if (zombie) { delete this; return false; } getmilliseconds(); message *curmsg; if (initCall) { if(msg_index >= (int)call_scenario->initmessages.size()) { ERROR("Scenario initialization overrun for call %s (%p) (index = %d)", id, _RCAST(void*, this), msg_index); } curmsg = call_scenario->initmessages[msg_index]; } else { if(msg_index >= (int)call_scenario->messages.size()) { ERROR("Scenario overrun for call %s (%p) (index = %d)", id, _RCAST(void*, this), msg_index); } curmsg = call_scenario->messages[msg_index]; } callDebug("Processing message %d of type %d for call %s at %lu.\n", msg_index, curmsg->M_type, id, clock_tick); if (curmsg->condexec != -1) { bool exec = M_callVariableTable->getVar(curmsg->condexec)->isSet(); if (curmsg->condexec_inverse) { exec = !exec; } if (!exec) { callDebug("Conditional variable %s %s set, so skipping message %d.\n", call_scenario->allocVars->getName(curmsg->condexec), curmsg->condexec_inverse ? "" : "not", msg_index); return next(); } } /* Manages retransmissions or delete if max retrans reached */ if(next_retrans && (next_retrans < clock_tick)) { nb_retrans++; if ( (0 == strncmp (last_send_msg, "INVITE", 6)) ) { bInviteTransaction = true; } int rtAllowed = min(bInviteTransaction ? max_invite_retrans : max_non_invite_retrans, max_udp_retrans); callDebug("Retransmisison required (%d retransmissions, max %d)\n", nb_retrans, rtAllowed); if(nb_retrans > rtAllowed) { call_scenario->messages[last_send_index] -> nb_timeout ++; if (call_scenario->messages[last_send_index]->on_timeout >= 0) { // action on timeout WARNING("Call-Id: %s, timeout on max UDP retrans for message %d, jumping to label %d ", id, msg_index, call_scenario->messages[last_send_index]->on_timeout); msg_index = call_scenario->messages[last_send_index]->on_timeout; next_retrans = 0; recv_timeout = 0; if (msg_index < (int)call_scenario->messages.size()) { return true; } // here if asked to go to the last label delete the call computeStat(CStat::E_CALL_FAILED); computeStat(CStat::E_FAILED_MAX_UDP_RETRANS); if (default_behaviors & DEFAULT_BEHAVIOR_BYE) { // Abort the call by sending proper SIP message return(abortCall(true)); } else { // Just delete existing call delete this; return false; } } computeStat(CStat::E_CALL_FAILED); computeStat(CStat::E_FAILED_MAX_UDP_RETRANS); if (default_behaviors & DEFAULT_BEHAVIOR_BYE) { // Abort the call by sending proper SIP message WARNING("Aborting call on UDP retransmission timeout for Call-ID '%s'", id); return(abortCall(true)); } else { // Just delete existing call delete this; return false; } } else { nb_last_delay *= 2; if (global_t2 < nb_last_delay) { if (!bInviteTransaction) { nb_last_delay = global_t2; } } if(send_raw(last_send_msg, last_send_index, last_send_len) < -1) { return false; } call_scenario->messages[last_send_index] -> nb_sent_retrans++; computeStat(CStat::E_RETRANSMISSION); next_retrans = clock_tick + nb_last_delay; } } if(paused_until) { /* Process a pending pause instruction until delay expiration */ if(paused_until > clock_tick) { callDebug("Call is paused until %d (now %ld).\n", paused_until, clock_tick); setPaused(); callDebug("Running: %d (wake %d).\n", running, wake()); return true; } /* Our pause is over. */ callDebug("Pause complete, waking up.\n"); paused_until = 0; return next(); } return executeMessage(curmsg); } const char *default_message_names[] = { "3pcc_abort", "ack", "ack2", "bye", "cancel", "200", }; const char *default_message_strings[] = { /* 3pcc_abort */ "call-id: [call_id]\ninternal-cmd: abort_call\n\n", /* ack */ "ACK [last_Request_URI] SIP/2.0\n" "[last_Via]\n" "[last_From]\n" "[last_To]\n" "Call-ID: [call_id]\n" "CSeq: [last_cseq_number] ACK\n" "Contact: \n" "Max-Forwards: 70\n" "Subject: Performance Test\n" "Content-Length: 0\n\n", /* ack2, the only difference is Via, I don't quite know why. */ "ACK [last_Request_URI] SIP/2.0\n" "Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]\n" "[last_From]\n" "[last_To]\n" "Call-ID: [call_id]\n" "CSeq: [last_cseq_number] ACK\n" "Contact: \n" "Max-Forwards: 70\n" "Subject: Performance Test\n" "Content-Length: 0\n\n", /* bye */ "BYE [last_Request_URI] SIP/2.0\n" "Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]\n" "[last_From]\n" "[last_To]\n" "Call-ID: [call_id]\n" "CSeq: [last_cseq_number+1] BYE\n" "Max-Forwards: 70\n" "Contact: \n" "Content-Length: 0\n\n", /* cancel */ "CANCEL [last_Request_URI] SIP/2.0\n" "[last_Via]\n" "[last_From]\n" "[last_To]\n" "Call-ID: [call_id]\n" "CSeq: [last_cseq_number] CANCEL\n" "Max-Forwards: 70\n" "Contact: \n" "Content-Length: 0\n\n", /* 200 */ "SIP/2.0 200 OK\n" "[last_Via:]\n" "[last_From:]\n" "[last_To:]\n" "[last_Call-ID:]\n" "[last_CSeq:]\n" "Contact: \n" "Content-Length: 0\n\n" }; SendingMessage **default_messages; void init_default_messages() { int messages = sizeof(default_message_strings)/sizeof(default_message_strings[0]); default_messages = new SendingMessage* [messages]; for (int i = 0; i < messages; i++) { default_messages[i] = new SendingMessage(main_scenario, const_cast(default_message_strings[i])); } } void free_default_messages() { int messages = sizeof(default_message_strings)/sizeof(default_message_strings[0]); if (!default_messages) { return; } for (int i = 0; i < messages; i++) { delete default_messages[i]; } delete [] default_messages; } SendingMessage *get_default_message(const char *which) { int messages = sizeof(default_message_names)/sizeof(default_message_names[0]); for (int i = 0; i < messages; i++) { if (!strcmp(which, default_message_names[i])) { return default_messages[i]; } } ERROR("Internal Error: Unknown default message: %s!", which); } void set_default_message(const char *which, char *msg) { int messages = sizeof(default_message_names)/sizeof(default_message_names[0]); for (int i = 0; i < messages; i++) { if (!strcmp(which, default_message_names[i])) { default_message_strings[i] = msg; return; } } ERROR("Internal Error: Unknown default message: %s!", which); } bool call::process_unexpected(const char* msg) { char buffer[MAX_HEADER_LEN]; char *desc = buffer; int res = 0; message *curmsg = call_scenario->messages[msg_index]; curmsg->nb_unexp++; if (default_behaviors & DEFAULT_BEHAVIOR_ABORTUNEXP) { desc += snprintf(desc, MAX_HEADER_LEN - (desc - buffer), "Aborting "); } else { desc += snprintf(desc, MAX_HEADER_LEN - (desc - buffer), "Continuing "); } desc += snprintf(desc, MAX_HEADER_LEN - (desc - buffer), "call on unexpected message for Call-Id '%s': ", id); if (curmsg -> M_type == MSG_TYPE_RECV) { if (curmsg -> recv_request) { desc += snprintf(desc, MAX_HEADER_LEN - (desc - buffer), "while expecting '%s' ", curmsg -> recv_request); } else { desc += snprintf(desc, MAX_HEADER_LEN - (desc - buffer), "while expecting '%d' ", curmsg -> recv_response); } } else if (curmsg -> M_type == MSG_TYPE_SEND) { desc += snprintf(desc, MAX_HEADER_LEN - (desc - buffer), "while sending "); } else if (curmsg -> M_type == MSG_TYPE_PAUSE) { desc += snprintf(desc, MAX_HEADER_LEN - (desc - buffer), "while pausing "); } else if (curmsg -> M_type == MSG_TYPE_SENDCMD) { desc += snprintf(desc, MAX_HEADER_LEN - (desc - buffer), "while sending command "); } else if (curmsg -> M_type == MSG_TYPE_RECVCMD) { desc += snprintf(desc, MAX_HEADER_LEN - (desc - buffer), "while expecting command "); } else { desc += snprintf(desc, MAX_HEADER_LEN - (desc - buffer), "while in message type %d ", curmsg->M_type); } snprintf(desc, MAX_HEADER_LEN - (desc - buffer), "(index %d)", msg_index); WARNING("%s, received '%s'", buffer, msg); TRACE_MSG("-----------------------------------------------\n" "Unexpected %s message received:\n\n%s\n", TRANSPORT_TO_STRING(transport), msg); callDebug("Unexpected %s message received (index %d, hash %lu):\n\n%s\n", TRANSPORT_TO_STRING(transport), msg_index, hash(msg), msg); if (get_reply_code(msg)) { this->call_scenario->stats->error_codes.push_back(get_reply_code(msg)); } if (default_behaviors & DEFAULT_BEHAVIOR_ABORTUNEXP) { // if twin socket call => reset the other part here if (twinSippSocket && (msg_index > 0)) { res = sendCmdBuffer(createSendingMessage(get_default_message("3pcc_abort"), -1)); if (res < 0) { WARNING("sendCmdBuffer returned %d", res); return false; } } // usage of last_ keywords => for call aborting realloc_ptr = (char *) realloc(last_recv_msg, strlen(msg) + 1); if (realloc_ptr) { last_recv_msg = realloc_ptr; } else { free(last_recv_msg); ERROR("Out of memory!"); return false; } strcpy(last_recv_msg, msg); computeStat(CStat::E_CALL_FAILED); computeStat(CStat::E_FAILED_UNEXPECTED_MSG); if (default_behaviors & DEFAULT_BEHAVIOR_BYE) { return (abortCall(true)); } else { delete this; return false; } } else { // Do not abort call nor send anything in reply if default behavior is disabled return false; } } void call::abort() { WARNING("Aborted call with Call-ID '%s'", id); abortCall(false); } bool call::abortCall(bool writeLog) { int is_inv; char * src_recv = NULL ; callDebug("Aborting call %s (index %d).\n", id, msg_index); if (last_send_msg != NULL) { is_inv = !strncmp(last_send_msg, "INVITE", 6); } else { is_inv = false; } if ((creationMode != MODE_SERVER) && (msg_index > 0)) { if ((call_established == false) && (is_inv)) { src_recv = last_recv_msg ; // Answer unexpected errors (4XX, 5XX and beyond) with an ACK // Contributed by F. Tarek Rogers if((src_recv) && (get_reply_code(src_recv) >= 400)) { sendBuffer(createSendingMessage(get_default_message("ack"), -2)); } else if (src_recv) { /* Call is not established and the reply is not a 4XX, 5XX */ /* And we already received a message. */ if (ack_is_pending == true) { /* If an ACK is expected from the other side, send it * and send a BYE afterwards */ ack_is_pending = false; /* Send an ACK */ sendBuffer(createSendingMessage(get_default_message("ack"), -1)); /* Send the BYE */ sendBuffer(createSendingMessage(get_default_message("bye"), -1)); } else { /* Send a CANCEL */ sendBuffer(createSendingMessage(get_default_message("cancel"), -1)); } } else { /* Call is not established and the reply is not a 4XX, 5XX */ /* and we didn't received any message. This is the case when */ /* we are aborting after having send an INVITE and not received */ /* any answer. */ /* Do nothing ! */ } } else if (last_recv_msg) { /* The call may not be established, if we haven't yet received a message, * because the earlier check depends on the first message being an INVITE * (although it could be something like a message message, therefore we * check that we received a message. */ sendBuffer(createSendingMessage(get_default_message("bye"), -1)); } } if (writeLog && useCallDebugf) { TRACE_CALLDEBUG ("-------------------------------------------------------------------------------\n"); TRACE_CALLDEBUG ("Call debugging information for call %s:\n", id); TRACE_CALLDEBUG("%s", debugBuffer); } stopListening(); if (deadcall_wait && !initCall) { char reason[100]; sprintf(reason, "aborted at index %d", msg_index); new deadcall(id, reason); } delete this; return false; } bool call::rejectCall() { computeStat(CStat::E_CALL_FAILED); computeStat(CStat::E_FAILED_CALL_REJECTED); delete this; return false; } int call::sendCmdMessage(message *curmsg) { char * dest; char delimitor[2]; delimitor[0]=27; delimitor[1]=0; /* 3pcc extended mode */ char * peer_dest; SIPpSocket **peer_socket; if(curmsg -> M_sendCmdData) { // WARNING("---PREPARING_TWIN_CMD---%s---", scenario[index] -> M_sendCmdData); dest = createSendingMessage(curmsg -> M_sendCmdData, -1); strcat(dest, delimitor); //WARNING("---SEND_TWIN_CMD---%s---", dest); int rc; /* 3pcc extended mode */ peer_dest = curmsg->peer_dest; if(peer_dest) { peer_socket = get_peer_socket(peer_dest); rc = (*peer_socket)->write(dest, strlen(dest), WS_BUFFER, &call_peer); } else { rc = twinSippSocket->write(dest, strlen(dest), WS_BUFFER, &call_peer); } if(rc < 0) { computeStat(CStat::E_CALL_FAILED); computeStat(CStat::E_FAILED_CMD_NOT_SENT); delete this; return(-1); } return(0); } else return(-1); } int call::sendCmdBuffer(char* cmd) { char * dest; char delimitor[2]; int rc; delimitor[0]=27; delimitor[1]=0; dest = cmd ; strcat(dest, delimitor); rc = twinSippSocket->write(dest, strlen(dest), WS_BUFFER, &twinSippSocket->ss_dest); if(rc < 0) { computeStat(CStat::E_CALL_FAILED); computeStat(CStat::E_FAILED_CMD_NOT_SENT); delete this; return(-1); } return(0); } char* call::createSendingMessage(SendingMessage *src, int P_index, int *msgLen) { static char msg_buffer[SIPP_MAX_MSG_SIZE+2]; return createSendingMessage(src, P_index, msg_buffer, sizeof(msg_buffer), msgLen); } char* call::createSendingMessage(SendingMessage *src, int P_index, char *msg_buffer, int buf_len, int *msgLen) { char * length_marker = NULL; char * auth_marker = NULL; MessageComponent *auth_comp = NULL; bool auth_comp_allocated = false; int len_offset = 0; char *dest = msg_buffer; bool suppresscrlf = false; *dest = '\0'; for (int i = 0; i < src->numComponents(); i++) { MessageComponent *comp = src->getComponent(i); int left = buf_len - (dest - msg_buffer); switch(comp->type) { case E_Message_Literal: if (suppresscrlf) { char *ptr = comp->literal; while (isspace(*ptr)) ptr++; dest += snprintf(dest, left, "%s", ptr); suppresscrlf = false; } else { memcpy(dest, comp->literal, comp->literalLen); dest += comp->literalLen; *dest = '\0'; } break; case E_Message_Remote_IP: dest += snprintf(dest, left, "%s", remote_ip_escaped); break; case E_Message_Remote_Host: dest += snprintf(dest, left, "%s", remote_host); break; case E_Message_Remote_Port: dest += snprintf(dest, left, "%d", remote_port + comp->offset); break; case E_Message_Local_IP: dest += snprintf(dest, left, "%s", local_ip_escaped); break; case E_Message_Local_Port: int port; if((multisocket) && (sendMode != MODE_SERVER)) { port = call_port; } else { port = local_port; } dest += snprintf(dest, left, "%d", port + comp->offset); break; case E_Message_Transport: dest += snprintf(dest, left, "%s", TRANSPORT_TO_STRING(transport)); break; case E_Message_Local_IP_Type: dest += snprintf(dest, left, "%s", (local_ip_is_ipv6 ? "6" : "4")); break; case E_Message_Server_IP: { /* We should do this conversion once per socket creation, rather than * repeating it every single time. */ struct sockaddr_storage server_sockaddr; sipp_socklen_t len = sizeof(server_sockaddr); getsockname(call_socket->ss_fd, (sockaddr *)(void *)&server_sockaddr, &len); char address[INET6_ADDRSTRLEN]; if (getnameinfo(_RCAST(sockaddr*, &server_sockaddr), len, address, sizeof(address), NULL, 0, NI_NUMERICHOST) < 0) { ERROR_NO("Unable to get socket name information"); } dest += snprintf(dest, left, "%s", address); } break; case E_Message_Media_IP: dest += snprintf(dest, left, "%s", media_ip); break; case E_Message_Media_Port: case E_Message_Auto_Media_Port: { int port = media_port + comp->offset; if (comp->type == E_Message_Auto_Media_Port) { port = media_port + (4 * (number - 1)) % 10000 + comp->offset; } #ifdef PCAPPLAY char *begin = dest; while (begin > msg_buffer) { if (*begin == '\n') { break; } begin--; } if (begin == msg_buffer) { ERROR("Can not find beginning of a line for the media port!"); } play_args_t* play_args = NULL; if (strstr(begin, "audio")) { play_args = &play_args_a; } else if (strstr(begin, "image")) { play_args = &play_args_i; } else if (strstr(begin, "video")) { play_args = &play_args_v; } else { ERROR("media_port keyword with no audio or video on the current line (%s)", begin); } if (media_ip_is_ipv6) { (_RCAST(struct sockaddr_in6 *, &(play_args->from)))->sin6_port = htons(port); } else { (_RCAST(struct sockaddr_in *, &(play_args->from)))->sin_port = htons(port); } #endif dest += sprintf(dest, "%u", port); break; } #ifdef RTP_STREAM case E_Message_RTPStream_Audio_Port: /* DEPRECATED */ case E_Message_RTPStream_Video_Port: /* DEPRECATED */ dest += sprintf(dest, "%u", media_port); break; #endif case E_Message_Media_IP_Type: dest += snprintf(dest, left, "%s", (media_ip_is_ipv6 ? "6" : "4")); break; case E_Message_Call_Number: dest += snprintf(dest, left, "%u", number); break; case E_Message_DynamicId: dest += snprintf(dest, left, "%u", call::dynamicId); // increment at each request dynamicId += stepDynamicId; if ( this->dynamicId > maxDynamicId ) { call::dynamicId = call::startDynamicId; } ; break; case E_Message_Call_ID: dest += snprintf(dest, left, "%s", id); break; case E_Message_CSEQ: dest += snprintf(dest, left, "%u", cseq + comp->offset); break; case E_Message_PID: dest += snprintf(dest, left, "%d", pid); break; case E_Message_Service: dest += snprintf(dest, left, "%s", service); break; case E_Message_Branch: /* Branch is magic cookie + call number + message index in scenario */ if(P_index == -2) { dest += snprintf(dest, left, "z9hG4bK-%u-%u-%d", pid, number, msg_index-1 + comp->offset); } else { dest += snprintf(dest, left, "z9hG4bK-%u-%u-%d", pid, number, P_index + comp->offset); } break; case E_Message_Index: dest += snprintf(dest, left, "%d", P_index); break; case E_Message_Next_Url: if (next_req_url) { dest += sprintf(dest, "%s", next_req_url); } break; case E_Message_Len: length_marker = dest; dest += snprintf(dest, left, " "); len_offset = comp->offset; break; case E_Message_Authentication: if (auth_marker) { ERROR("Only one [authentication] keyword is currently supported!"); } auth_marker = dest; dest += snprintf(dest, left, "[authentication place holder]"); auth_comp = comp; break; case E_Message_Peer_Tag_Param: if(peer_tag) { dest += snprintf(dest, left, ";tag=%s", peer_tag); } break; case E_Message_Routes: if (dialog_route_set) { dest += sprintf(dest, "Route: %s", dialog_route_set); } else if (*(dest - 1) == '\n') { suppresscrlf = true; } break; case E_Message_ClockTick: dest += snprintf(dest, left, "%lu", clock_tick); break; case E_Message_Timestamp: struct timeval currentTime; gettimeofday(¤tTime, NULL); dest += snprintf(dest, left, "%s", CStat::formatTime(¤tTime)); break; case E_Message_Date: char buf[256]; time_t t; struct tm *tm; t = time(NULL); tm = gmtime(&t); strftime(buf, 256, "%a, %d %b %Y %T %Z", tm); dest += snprintf(dest, left, "%s", buf); break; case E_Message_Users: dest += snprintf(dest, left, "%d", users); break; case E_Message_UserID: dest += snprintf(dest, left, "%d", userId); break; case E_Message_SippVersion: /* Drop the initial "v" from the VERSION string for legacy reasons. */ dest += snprintf(dest, left, "%s", (const char*)VERSION + 1); break; case E_Message_Variable: { int varId = comp->varId; CCallVariable *var = M_callVariableTable->getVar(varId); if(var->isSet()) { if (var->isRegExp()) { dest += sprintf(dest, "%s", var->getMatchingValue()); } else if (var->isDouble()) { dest += sprintf(dest, "%lf", var->getDouble()); } else if (var->isString()) { dest += sprintf(dest, "%s", var->getString()); } else if (var->isBool()) { dest += sprintf(dest, "true"); } } else if (var->isBool()) { dest += sprintf(dest, "false"); } if (*(dest - 1) == '\n') { suppresscrlf = true; } break; } case E_Message_Fill: { int varId = comp->varId; int length = (int) M_callVariableTable->getVar(varId)->getDouble(); if (length < 0) { length = 0; } char *filltext = comp->literal; int filllen = strlen(filltext); if (filllen == 0) { ERROR("Internal error: [fill] keyword has zero-length text."); } for (int i = 0, j = 0; i < length; i++, j++) { *dest++ = filltext[j % filllen]; } *dest = '\0'; break; } case E_Message_File: { char buffer[MAX_HEADER_LEN]; createSendingMessage(comp->comp_param.filename, -2, buffer, sizeof(buffer)); FILE *f = fopen(buffer, "r"); if (!f) { ERROR("Could not open '%s': %s", buffer, strerror(errno)); } int ret; while ((ret = fread(dest, 1, left, f)) > 0) { left -= ret; dest += ret; } if (ret < 0) { ERROR("Error reading '%s': %s", buffer, strerror(errno)); } fclose(f); break; } case E_Message_Injection: { char *orig_dest = dest; getFieldFromInputFile(comp->comp_param.field_param.filename, comp->comp_param.field_param.field, comp->comp_param.field_param.line, dest); /* We are injecting an authentication line. */ if (char *tmp = strstr(orig_dest, "[authentication")) { if (auth_marker) { ERROR("Only one [authentication] keyword is currently supported!"); } auth_marker = tmp; auth_comp = (struct MessageComponent *)calloc(1, sizeof(struct MessageComponent)); if (!auth_comp) { ERROR("Out of memory!"); } auth_comp_allocated = true; tmp = strchr(auth_marker, ']'); char c = *tmp; *tmp = '\0'; SendingMessage::parseAuthenticationKeyword(call_scenario, auth_comp, auth_marker); *tmp = c; } if (*(dest - 1) == '\n') { suppresscrlf = true; } break; } case E_Message_Last_Header: { char * last_header = get_last_header(comp->literal); if(last_header) { dest += sprintf(dest, "%s", last_header); } if (*(dest - 1) == '\n') { suppresscrlf = true; } break; } case E_Message_Custom: { dest += comp->comp_param.fxn(this, comp, dest, left); break; } case E_Message_Last_Message: if(last_recv_msg && strlen(last_recv_msg)) { dest += sprintf(dest, "%s", last_recv_msg); } break; case E_Message_Last_Request_URI: { char * last_request_uri = get_last_request_uri(); dest += sprintf(dest, "%s", last_request_uri); free(last_request_uri); break; } case E_Message_Last_CSeq_Number: { int last_cseq = 0; char *last_header = get_last_header("CSeq:"); if(last_header) { last_header += 5; /* Extract the integer value of the field */ while(isspace(*last_header)) last_header++; sscanf(last_header,"%d", &last_cseq); } dest += sprintf(dest, "%d", last_cseq + comp->offset); break; } case E_Message_TDM_Map: if (!use_tdmmap) ERROR("[tdmmap] keyword without -tdmmap parameter on command line"); dest += snprintf(dest, left, "%d.%d.%d/%d", tdm_map_x+(int((tdm_map_number)/((tdm_map_b+1)*(tdm_map_c+1))))%(tdm_map_a+1), tdm_map_h, tdm_map_y+(int((tdm_map_number)/(tdm_map_c+1)))%(tdm_map_b+1), tdm_map_z+(tdm_map_number)%(tdm_map_c+1) ); break; } } /* Need the body for length and auth-int calculation */ char *body; const char *auth_body = NULL; if (length_marker || auth_marker) { body = strstr(msg_buffer, "\r\n\r\n"); if (body) { auth_body = body; auth_body += strlen("\r\n\r\n"); } } if (!auth_body) { auth_body = ""; } /* Fix up the length. */ if (length_marker) { if (auth_marker > body) { ERROR("The authentication keyword should appear in the message header, not the body!"); } if (body && dest - body > 4 && dest - body < 100004) { char tmp = length_marker[5]; sprintf(length_marker, "%5u", (unsigned)(dest - body - 4 + len_offset)); length_marker[5] = tmp; } else { // Other cases: Content-Length is 0 sprintf(length_marker, " 0\r\n\r\n"); } } if (msgLen) { *msgLen = dest - msg_buffer; } /* * The authentication substitution must be done outside the above * loop because auth-int will use the body (which must have already * been keyword substituted) to build the md5 hash */ if (auth_marker) { if (!dialog_authentication) { ERROR("Authentication keyword without dialog_authentication!"); } int auth_marker_len; char * tmp; int authlen; auth_marker_len = (strchr(auth_marker, ']') + 1) - auth_marker; /* Need the Method name from the CSeq of the Challenge */ char method[MAX_HEADER_LEN]; tmp = get_last_header("CSeq:"); if(!tmp) { ERROR("Could not extract method from cseq of challenge"); } tmp += 5; while(isspace(*tmp) || isdigit(*tmp)) tmp++; sscanf(tmp,"%s", method); /* Determine the type of credentials. */ char result[MAX_HEADER_LEN]; if (dialog_challenge_type == 401) { /* Registrars use Authorization */ authlen = sprintf(result, "Authorization: "); } else { /* Proxies use Proxy-Authorization */ authlen = sprintf(result, "Proxy-Authorization: "); } /* Build the auth credenticals */ char uri[MAX_HEADER_LEN]; sprintf (uri, "%s:%d", remote_ip, remote_port); /* These cause this function to not be reentrant. */ static char my_auth_user[MAX_HEADER_LEN + 2]; static char my_auth_pass[MAX_HEADER_LEN + 2]; static char my_aka_OP[MAX_HEADER_LEN + 2]; static char my_aka_AMF[MAX_HEADER_LEN + 2]; static char my_aka_K[MAX_HEADER_LEN + 2]; createSendingMessage(auth_comp->comp_param.auth_param.auth_user, -2, my_auth_user, sizeof(my_auth_user)); createSendingMessage(auth_comp->comp_param.auth_param.auth_pass, -2, my_auth_pass, sizeof(my_auth_pass)); createSendingMessage(auth_comp->comp_param.auth_param.aka_K, -2, my_aka_K, sizeof(my_aka_K)); createSendingMessage(auth_comp->comp_param.auth_param.aka_AMF, -2, my_aka_AMF, sizeof(my_aka_AMF)); createSendingMessage(auth_comp->comp_param.auth_param.aka_OP, -2, my_aka_OP, sizeof(my_aka_OP)); if (createAuthHeader(my_auth_user, my_auth_pass, method, uri, auth_body, dialog_authentication, my_aka_OP, my_aka_AMF, my_aka_K, result + authlen) == 0) { ERROR("%s", result + authlen); } authlen = strlen(result); /* Shift the end of the message to its rightful place. */ memmove(auth_marker + authlen, auth_marker + auth_marker_len, strlen(auth_marker + auth_marker_len) + 1); /* Copy our result into the hole. */ memcpy(auth_marker, result, authlen); if (msgLen) { *msgLen += (authlen - auth_marker_len); } } if (auth_comp_allocated) { SendingMessage::freeMessageComponent(auth_comp); } return msg_buffer; } bool call::process_twinSippCom(char * msg) { int search_index; bool found = false; T_ActionResult actionResult; callDebug("Processing incoming command for call-ID %s:\n%s\n\n", id, msg); setRunning(); if (checkInternalCmd(msg) == false) { for(search_index = msg_index; search_index < (int)call_scenario->messages.size(); search_index++) { if(call_scenario->messages[search_index] -> M_type != MSG_TYPE_RECVCMD) { if ((call_scenario->messages[search_index] -> optional) || (call_scenario->messages[search_index] -> M_type == MSG_TYPE_NOP)) { continue; } /* The received message is different from the expected one */ TRACE_MSG("Unexpected control message received (I was expecting a different type of message):\n%s\n", msg); callDebug("Unexpected control message received (I was expecting a different type of message):\n%s\n\n", msg); return rejectCall(); } else { if(extendedTwinSippMode) { // 3pcc extended mode if(check_peer_src(msg, search_index)) { found = true; break; } else { WARNING("Unexpected sender for the received peer message\n%s\n", msg); return rejectCall(); } } else { found = true; break; } } } if (found) { call_scenario->messages[search_index]->M_nbCmdRecv ++; do_bookkeeping(call_scenario->messages[search_index]); // variable treatment // Remove \r, \n at the end of a received command // (necessary for transport, to be removed for usage) while ( (msg[strlen(msg)-1] == '\n') && (msg[strlen(msg)-2] == '\r') ) { msg[strlen(msg)-2] = 0; } actionResult = executeAction(msg, call_scenario->messages[search_index]); if(actionResult != call::E_AR_NO_ERROR) { // Store last action result if it is an error // and go on with the scenario call::last_action_result = actionResult; if (actionResult == E_AR_STOP_CALL) { return rejectCall(); } else if (actionResult == E_AR_CONNECT_FAILED) { terminate(CStat::E_FAILED_TCP_CONNECT); return false; } } } else { TRACE_MSG("Unexpected control message received (no such message found):\n%s\n", msg); callDebug("Unexpected control message received (no such message found):\n%s\n\n", msg); return rejectCall(); } msg_index = search_index; //update the state machine return(next()); } else { return (false); } } bool call::checkInternalCmd(char * cmd) { char * L_ptr1, * L_ptr2, L_backup; L_ptr1 = strstr(cmd, "internal-cmd:"); if (!L_ptr1) { return (false); } L_ptr1 += 13 ; while((*L_ptr1 == ' ') || (*L_ptr1 == '\t')) { L_ptr1++; } if (!(*L_ptr1)) { return (false); } L_ptr2 = L_ptr1; while((*L_ptr2) && (*L_ptr2 != ' ') && (*L_ptr2 != '\t') && (*L_ptr2 != '\r') && (*L_ptr2 != '\n')) { L_ptr2 ++; } if(!*L_ptr2) { return (false); } L_backup = *L_ptr2; *L_ptr2 = 0; if (strcmp(L_ptr1, "abort_call") == 0) { *L_ptr2 = L_backup; computeStat(CStat::E_CALL_FAILED); abortCall(true); return (true); } *L_ptr2 = L_backup; return (false); } bool call::check_peer_src(char * msg, int search_index) { char * L_ptr1, * L_ptr2, L_backup ; L_ptr1 = strstr(msg, "From:"); if (!L_ptr1) { return (false); } L_ptr1 += 5 ; while((*L_ptr1 == ' ') || (*L_ptr1 == '\t')) { L_ptr1++; } if (!(*L_ptr1)) { return (false); } L_ptr2 = L_ptr1; while((*L_ptr2) && (*L_ptr2 != ' ') && (*L_ptr2 != '\t') && (*L_ptr2 != '\r') && (*L_ptr2 != '\n')) { L_ptr2 ++; } if(!*L_ptr2) { return (false); } L_backup = *L_ptr2; *L_ptr2 = 0; if (strcmp(L_ptr1, call_scenario->messages[search_index] -> peer_src) == 0) { *L_ptr2 = L_backup; return(true); } *L_ptr2 = L_backup; return (false); } void call::extract_cseq_method(char* method, const char* msg) { const char* cseq; if ((cseq = strstr (msg, "CSeq"))) { const char* value; if ((value = strchr(cseq, ':'))) { value++; while (isspace(*value)) value++; // ignore any white spaces after the : while (!isspace(*value)) value++; // ignore the CSEQ number while (isspace(*value)) value++; // ignore spaces after CSEQ number const char* end = value; int nbytes = 0; /* A '\r' terminates the line, so we want to catch that too. */ while ((*end != '\r') && (*end != '\n')) { end++; nbytes++; } if (nbytes > 0) strncpy (method, value, nbytes); method[nbytes] = '\0'; } } } void call::extract_transaction(char* txn, const char* msg) { char *via = get_header_content(msg, "via:"); if (!via) { txn[0] = '\0'; return; } char *branch = strstr(via, ";branch="); if (!branch) { txn[0] = '\0'; return; } branch += strlen(";branch="); while (*branch && *branch != ';' && *branch != ',' && !isspace(*branch)) { *txn++ = *branch++; } *txn = '\0'; } void call::formatNextReqUrl(const char* contact) { /* clean up the next_req_url */ while (*contact != '\0' && (*contact == ' ' || *contact == '\t')) { ++contact; } if (*contact == '<') { contact += 1; const char* end = strchr(contact, '>'); if (end) { next_req_url[0] = '\0'; strncat(next_req_url, contact, min(MAX_HEADER_LEN - 1, (int)(end - contact))); /* fits MAX_HEADER_LEN */ } } else { next_req_url[0] = '\0'; strncat(next_req_url, contact, MAX_HEADER_LEN - 1); } } void call::computeRouteSetAndRemoteTargetUri(const char* rr, const char* contact, bool bRequestIncoming) { if (!*contact) { WARNING("Cannot record route set if there is no Contact"); return; } if (!*rr) { /* There are no RR headers. Simply set up the contact as our * target uri. Note that this is only called if there was no * dialog_route_set at the moment. And in either case, we * wouldn't want to clear the dialog_route_set because changing * RR mid-dialog is not allowed. */ formatNextReqUrl(contact); return; } std::vector headers = split(rr, ','); std::vector::iterator it; std::vector::iterator end; int direction; if (bRequestIncoming) { it = headers.begin(); end = headers.end(); direction = 1; } else { it = headers.end() - 1; end = headers.begin() - 1; direction = -1; } std::vector routes; std::string targetUri; bool first = true; for (; it != end; it += direction) { const std::string& header = *it; if (first && header.find(";lr") == std::string::npos) { /* If the next hop is a static router, set target URI to * that router. We'll push the original contact onto the end * of the route set. We won't need to record this route, * because we've set the target to it. */ targetUri = header; } else { first = false; routes.push_back(trim(header)); } } /* If target URI is set, the first hop is a strict router. Add the * Contact as tailing route. */ if (targetUri.length()) { routes.push_back(trim(contact)); } else { targetUri = contact; } if (routes.size()) { dialog_route_set = strdup(join(routes, ", ").c_str()); } formatNextReqUrl(targetUri.c_str()); } bool call::matches_scenario(unsigned int index, int reply_code, char * request, char * responsecseqmethod, char *txn) { message *curmsg = call_scenario->messages[index]; if ((curmsg->recv_request)) { if (curmsg->regexp_match) { if (curmsg->regexp_compile == NULL) { regex_t *re = new regex_t; /* No regex match position needed (NOSUB), we're simply * looking for the * regex. */ if (regcomp(re, curmsg->recv_request, REGCOMP_PARAMS|REG_NOSUB)) { ERROR("Invalid regular expression for index %d: %s", index, curmsg->recv_request); } curmsg->regexp_compile = re; } return !regexec(curmsg->regexp_compile, request, (size_t)0, NULL, REGEXEC_PARAMS); } else { return !strcmp(curmsg->recv_request, request); } } else if (curmsg->recv_response && (curmsg->recv_response == reply_code)) { /* This is a potential candidate, we need to match transactions. */ if (curmsg->response_txn) { if (transactions[curmsg->response_txn - 1].txnID && !strcmp(transactions[curmsg->response_txn - 1].txnID, txn)) { return true; } else { return false; } } else if (index == 0) { /* Always true for the first message. */ return true; } else if (curmsg->recv_response_for_cseq_method_list && strstr(curmsg->recv_response_for_cseq_method_list, responsecseqmethod)) { /* If we do not have a transaction defined, we just check the CSEQ method. */ return true; } else { return false; } } return false; } void call::queue_up(const char* msg) { free(queued_msg); queued_msg = strdup(msg); } bool call::process_incoming(const char* msg, const struct sockaddr_storage* src) { int reply_code = 0; static char request[65]; char responsecseqmethod[65]; char txn[MAX_HEADER_LEN]; unsigned long cookie = 0; const char* ptr; int search_index; bool found = false; T_ActionResult actionResult; getmilliseconds(); callDebug("Processing %zu byte incoming message for call-ID %s (hash %lu):\n%s\n\n", strlen(msg), id, hash(msg), msg); setRunning(); message *curmsg = call_scenario->messages[msg_index]; /* Ignore the messages received during a pause if -pause_msg_ign is set */ if (curmsg->M_type == MSG_TYPE_PAUSE && pause_msg_ign) { return true; } /* Get our destination if we have none. */ if (call_peer.ss_family == AF_UNSPEC && src) { memcpy(&call_peer, src, sizeof(call_peer)); } /* Authorize nop as a first command, even in server mode */ if (msg_index == 0 && curmsg->M_type == MSG_TYPE_NOP) { queue_up(msg); paused_until = 0; return run(); } responsecseqmethod[0] = '\0'; txn[0] = '\0'; /* Check that we have a To:-header */ if (!get_header(msg, "To:", false)[0] && !process_unexpected(msg)) { return false; } if ((transport == T_UDP) && (retrans_enabled)) { /* Detects retransmissions from peer and retransmit the * message which was sent just after this one was received */ cookie = hash(msg); if((recv_retrans_recv_index >= 0) && (recv_retrans_hash == cookie)) { int status; if(lost(recv_retrans_recv_index)) { TRACE_MSG("%s message (retrans) lost (recv).", TRANSPORT_TO_STRING(transport)); callDebug("%s message (retrans) lost (recv) (hash %lu)\n", TRANSPORT_TO_STRING(transport), hash(msg)); if(comp_state) { comp_free(&comp_state); } call_scenario->messages[recv_retrans_recv_index] -> nb_lost++; return true; } call_scenario->messages[recv_retrans_recv_index] -> nb_recv_retrans++; send_scene(recv_retrans_send_index, &status, NULL); if(status >= 0) { call_scenario->messages[recv_retrans_send_index] -> nb_sent_retrans++; computeStat(CStat::E_RETRANSMISSION); } else if(status < 0) { return false; } return true; } if((last_recv_index >= 0) && (last_recv_hash == cookie)) { /* This one has already been received, but not processed * yet => (has not triggered something yet) so we can discard. * * This case appears when the UAS has send a 200 but not received * a ACK yet. Thus, the UAS retransmit the 200 (invite transaction) * until it receives a ACK. In this case, it nevers sends the 200 * from the BYE, until it has reveiced the previous 200. Thus, * the UAC retransmit the BYE, and this BYE is considered as an * unexpected. * * This case can also appear in case of message duplication by * the network. This should not be considered as an unexpected. */ call_scenario->messages[last_recv_index]->nb_recv_retrans++; return true; } } #ifdef RTP_STREAM /* Check if message has a SDP in it; and extract media information. */ if (!strcmp(get_header_content(msg, "Content-Type:"), "application/sdp") && hasMedia == 1 && !curmsg->ignoresdp) { extract_rtp_remote_addr(msg); } #endif /* Is it a response ? */ if ((msg[0] == 'S') && (msg[1] == 'I') && (msg[2] == 'P') && (msg[3] == '/') && (msg[4] == '2') && (msg[5] == '.') && (msg[6] == '0') ) { reply_code = get_reply_code(msg); if (!reply_code) { if (!process_unexpected(msg)) { return false; // Call aborted by unexpected message handling } #ifdef PCAPPLAY } else if (hasMedia == 1 && !curmsg->ignoresdp && *(strstr(msg, "\r\n\r\n") + 4) != '\0') { /* Get media info if we find something like an SDP */ get_remote_media_addr(msg); #endif } /* It is a response: update peer_tag */ ptr = get_peer_tag(msg); if (ptr) { if(strlen(ptr) > (MAX_HEADER_LEN - 1)) { ERROR("Peer tag too long. Change MAX_HEADER_LEN and recompile sipp"); } if(peer_tag) { free(peer_tag); } peer_tag = strdup(ptr); if (!peer_tag) { ERROR("Out of memory allocating peer tag."); } } request[0]=0; // extract the cseq method from the response extract_cseq_method (responsecseqmethod, msg); extract_transaction (txn, msg); } else if ((ptr = strchr(msg, ' '))) { if ((ptr - msg) < 64) { memcpy(request, msg, ptr - msg); request[ptr - msg] = 0; // Check if we received an ACK => call established if (strcmp(request,"ACK") == 0) { call_established = true; } #ifdef PCAPPLAY /* In case of INVITE or re-INVITE, ACK or PRACK get the media info if needed (= we got a pcap play action) */ if (((strncmp(request, "INVITE", 6) == 0) || (strncmp(request, "ACK", 3) == 0) || (strncmp(request, "PRACK", 5) == 0)) && hasMedia == 1 && !curmsg->ignoresdp) { get_remote_media_addr(msg); } #endif reply_code = 0; } else { ERROR("SIP method too long in received message '%s'", msg); } } else { ERROR("Invalid sip message received '%s'", msg); } /* Try to find it in the expected non mandatory responses * until the first mandatory response in the scenario */ for (search_index = msg_index; search_index < (int)call_scenario->messages.size(); search_index++) { if (!matches_scenario(search_index, reply_code, request, responsecseqmethod, txn)) { if (call_scenario->messages[search_index]->optional) { continue; } /* The received message is different for the expected one */ break; } found = true; /* TODO : this is a little buggy: If a 100 trying from an INVITE * is delayed by the network until the BYE is sent, it may * stop BYE transmission erroneously, if the BYE also expects * a 100 trying. */ break; } /* Try to find it in the old non-mandatory receptions */ if (!found) { bool contig = true; for(search_index = msg_index - 1; search_index >= 0; search_index--) { if (call_scenario->messages[search_index]->optional == OPTIONAL_FALSE) { contig = false; } if (matches_scenario(search_index, reply_code, request, responsecseqmethod, txn)) { if (contig || call_scenario->messages[search_index]->optional == OPTIONAL_GLOBAL) { found = true; break; } else { if (int checkTxn = call_scenario->messages[search_index]->response_txn) { /* This is a reply to an old transaction. */ if (!strcmp(transactions[checkTxn - 1].txnID, txn)) { /* This reply is provisional, so it should have no effect if we recieve it out-of-order. */ if (reply_code >= 100 && reply_code <= 199) { TRACE_MSG("-----------------------------------------------\n" "Ignoring provisional %s message for transaction %s:\n\n%s\n", TRANSPORT_TO_STRING(transport), call_scenario->transactions[checkTxn - 1].name, msg); callDebug("Ignoring provisional %s message for transaction %s (hash %lu):\n\n%s\n", TRANSPORT_TO_STRING(transport), call_scenario->transactions[checkTxn - 1].name, hash(msg), msg); return true; } else if (int ackIndex = transactions[checkTxn - 1].ackIndex) { /* This is the message before an ACK, so verify that this is an invite transaction. */ assert (call_scenario->transactions[checkTxn - 1].isInvite); sendBuffer(createSendingMessage(call_scenario->messages[ackIndex] -> send_scheme, ackIndex)); return true; } else { assert (!call_scenario->transactions[checkTxn - 1].isInvite); /* This is a non-provisional message for the transaction, and * we have already gotten our allowable response. Just make sure * that it is not a retransmission of the final response. */ if (transactions[checkTxn - 1].txnResp == hash(msg)) { /* We have gotten this retransmission out-of-order, let's just ignore it. */ TRACE_MSG("-----------------------------------------------\n" "Ignoring final %s message for transaction %s:\n\n%s\n", TRANSPORT_TO_STRING(transport), call_scenario->transactions[checkTxn - 1].name, msg); callDebug("Ignoring final %s message for transaction %s (hash %lu):\n\n%s\n", TRANSPORT_TO_STRING(transport), call_scenario->transactions[checkTxn - 1].name, hash(msg), msg); WARNING("Ignoring final %s message for transaction %s (hash %lu):\n\n%s", TRANSPORT_TO_STRING(transport), call_scenario->transactions[checkTxn - 1].name, hash(msg), msg); return true; } } } } else { /* * we received a non mandatory msg for an old transaction (this could be due to a retransmit. * If this response is for an INVITE transaction, retransmit the ACK to quench retransmits. */ if ( (reply_code) && (0 == strncmp (responsecseqmethod, "INVITE", strlen(responsecseqmethod)) ) && (call_scenario->messages[search_index+1]->M_type == MSG_TYPE_SEND) && (call_scenario->messages[search_index+1]->send_scheme->isAck()) ) { sendBuffer(createSendingMessage(call_scenario->messages[search_index+1] -> send_scheme, (search_index+1))); return true; } } } } } } /* If it is still not found, process an unexpected message */ if(!found) { if (call_scenario->unexpected_jump >= 0) { bool recursive = false; if (call_scenario->retaddr >= 0) { if (M_callVariableTable->getVar(call_scenario->retaddr)->getDouble() != 0) { /* We are already in a jump! */ recursive = true; } else { M_callVariableTable->getVar(call_scenario->retaddr)->setDouble(msg_index); } } if (!recursive) { if (call_scenario->pausedaddr >= 0) { M_callVariableTable->getVar(call_scenario->pausedaddr)->setDouble(paused_until); } msg_index = call_scenario->unexpected_jump; queue_up(msg); paused_until = 0; return run(); } else { if (!process_unexpected(msg)) { return false; // Call aborted by unexpected message handling } } } else { T_AutoMode L_case; if ((L_case = checkAutomaticResponseMode(request)) == 0) { if (!process_unexpected(msg)) { return false; // Call aborted by unexpected message handling } } else { // call aborted by automatic response mode if needed return automaticResponseMode(L_case, msg); } } } int test = (!found) ? -1 : call_scenario->messages[search_index]->test; /* test==0: No branching" * test==-1 branching without testing" * test>0 branching with testing */ /* Simulate loss of messages */ if(lost(search_index)) { TRACE_MSG("%s message lost (recv).", TRANSPORT_TO_STRING(transport)); callDebug("%s message lost (recv) (hash %lu).\n", TRANSPORT_TO_STRING(transport), hash(msg)); if(comp_state) { comp_free(&comp_state); } call_scenario->messages[search_index] -> nb_lost++; return true; } /* If we are part of a transaction, mark this as the final response. */ if (int checkTxn = call_scenario->messages[search_index]->response_txn) { transactions[checkTxn - 1].txnResp = hash(msg); } /* Handle counters and RTDs for this message. */ do_bookkeeping(call_scenario->messages[search_index]); /* Increment the recv counter */ call_scenario->messages[search_index] -> nb_recv++; // Action treatment if (found) { //WARNING("---EXECUTE_ACTION_ON_MSG---%s---", msg); actionResult = executeAction(msg, call_scenario->messages[search_index]); if(actionResult != call::E_AR_NO_ERROR) { // Store last action result if it is an error // and go on with the scenario call::last_action_result = actionResult; if (actionResult == E_AR_STOP_CALL) { return rejectCall(); } else if (actionResult == E_AR_CONNECT_FAILED) { terminate(CStat::E_FAILED_TCP_CONNECT); return false; } } } if (*request) { // update [cseq] with received CSeq unsigned long int rcseq = get_cseq_value(msg); if (rcseq > cseq) cseq = rcseq; } /* This is an ACK/PRACK or a response, and its index is greater than the * current active retransmission message, so we stop the retrans timer. * True also for CANCEL and BYE that we also want to answer to */ if(((reply_code) || ((!strcmp(request, "ACK")) || (!strcmp(request, "CANCEL")) || (!strcmp(request, "BYE")) || (!strcmp(request, "PRACK")))) && (search_index > last_send_index)) { /* * We should stop any retransmission timers on receipt of a provisional response only for INVITE * transactions. Non INVITE transactions continue to retransmit at T2 until a final response is * received */ if ( (0 == reply_code) || // means this is a request. (200 <= reply_code) || // final response ((0 != reply_code) && (0 == strncmp (responsecseqmethod, "INVITE", strlen(responsecseqmethod)))) ) { // prov for INVITE next_retrans = 0; } else { /* * We are here due to a provisional response for non INVITE. Update our next retransmit. */ next_retrans = clock_tick + global_t2; nb_last_delay = global_t2; } } /* This is a response with 200 so set the flag indicating that an * ACK is pending (used to prevent from release a call with CANCEL * when an ACK+BYE should be sent instead) */ if (reply_code == 200) { ack_is_pending = true; } /* store the route set only once. TODO: does not support target refreshes!! */ if (call_scenario->messages[search_index]->bShouldRecordRoutes && dialog_route_set == NULL) { realloc_ptr = (char*)realloc(next_req_url, MAX_HEADER_LEN); if (realloc_ptr) { next_req_url = realloc_ptr; } else { free(next_req_url); ERROR("Out of memory!"); return false; } /* cache the route set and the contact */ char rr[MAX_HEADER_LEN], contact[MAX_HEADER_LEN]; rr[0] = contact[0] = '\0'; /* yuck, get_header_content returns a static buffer :( */ strncat(rr, get_header_content(msg, "Record-Route:"), MAX_HEADER_LEN - 1); strncat(contact, get_header_content(msg, "Contact:"), MAX_HEADER_LEN - 1); computeRouteSetAndRemoteTargetUri(rr, contact, !reply_code); // WARNING("next_req_url is [%s]", next_req_url); } /* store the authentication info */ if ((call_scenario->messages[search_index] -> bShouldAuthenticate) && (reply_code == 401 || reply_code == 407)) { /* is a challenge */ char auth[MAX_HEADER_LEN]; memset(auth, 0, sizeof(auth)); strncpy(auth, get_header_content(msg, (char*)"Proxy-Authenticate:"), sizeof(auth) - 1); if (auth[0] == 0) { strncpy(auth, get_header_content(msg, (char*)"WWW-Authenticate:"), sizeof(auth) - 1); } if (auth[0] == 0) { ERROR("Couldn't find 'Proxy-Authenticate' or 'WWW-Authenticate' in 401 or 407!"); } realloc_ptr = (char *) realloc(dialog_authentication, strlen(auth) + 2); if (realloc_ptr) { dialog_authentication = realloc_ptr; } else { free(dialog_authentication); ERROR("Out of memory!"); return false; } sprintf(dialog_authentication, "%s", auth); /* Store the code of the challenge for building the proper header */ dialog_challenge_type = reply_code; } /* If we are not advancing state, we should quite before we change this stuff. */ if (!call_scenario->messages[search_index]->advance_state) { return true; } /* Store last received message information for all messages so that we can * correctly identify retransmissions, and use its body for inclusion * in our messages. */ last_recv_index = search_index; last_recv_hash = cookie; callDebug("Set Last Recv Hash: %lu (recv index %d)\n", last_recv_hash, last_recv_index); realloc_ptr = (char *) realloc(last_recv_msg, strlen(msg) + 1); if (realloc_ptr) { last_recv_msg = realloc_ptr; } else { free(last_recv_msg); ERROR("Out of memory!"); return false; } strcpy(last_recv_msg, msg); /* If this was a mandatory message, or if there is an explicit next label set * we must update our state machine. */ if (!call_scenario->messages[search_index]->optional || (call_scenario->messages[search_index]->next && (test == -1 || M_callVariableTable->getVar(test)->isSet()))) { /* If we are paused, then we need to wake up so that we properly go through the state machine. */ paused_until = 0; msg_index = search_index; return next(); } else { unsigned int timeout = wake(); unsigned int candidate; if (call_scenario->messages[search_index]->next && M_callVariableTable->getVar(test)->isSet()) { WARNING("Last message generates an error and will not be used for next sends (for last_ variables):\n%s\n", msg); } /* We are just waiting for a message to be received, if any of the * potential messages have a timeout we set it as our timeout. We * start from the next message and go until any non-receives. */ for(search_index++; search_index < (int)call_scenario->messages.size(); search_index++) { if(call_scenario->messages[search_index] -> M_type != MSG_TYPE_RECV) { break; } candidate = call_scenario->messages[search_index] -> timeout; if (candidate == 0) { if (defl_recv_timeout == 0) { continue; } candidate = defl_recv_timeout; } if (!timeout || (clock_tick + candidate < timeout)) { timeout = clock_tick + candidate; } } setPaused(); } return true; } double call::get_rhs(CAction *currentAction) { if (currentAction->getVarInId()) { return M_callVariableTable->getVar(currentAction->getVarInId())->getDouble(); } else { return currentAction->getDoubleValue(); } } call::T_ActionResult call::executeAction(const char* msg, message* curmsg) { CActions* actions; CAction* currentAction; actions = curmsg->M_actions; // looking for action to do on this message if (actions == NULL) { return(call::E_AR_NO_ERROR); } for (int i = 0; i < actions->getActionSize(); i++) { currentAction = actions->getAction(i); if(currentAction == NULL) { continue; } if(currentAction->getActionType() == CAction::E_AT_ASSIGN_FROM_REGEXP) { char msgPart[MAX_SUB_MESSAGE_LENGTH]; /* Where to look. */ const char* haystack = nullptr; if(currentAction->getLookingPlace() == CAction::E_LP_HDR) { extractSubMessage (msg, currentAction->getLookingChar(), msgPart, currentAction->getCaseIndep(), currentAction->getOccurrence(), currentAction->getHeadersOnly()); if(currentAction->getCheckIt() == true && (strlen(msgPart) == 0)) { // the sub message is not found and the checking action say it // MUST match --> Call will be marked as failed but will go on WARNING("Failed regexp match: header %s not found in message\n%s\n", currentAction->getLookingChar(), msg); return(call::E_AR_HDR_NOT_FOUND); } haystack = msgPart; } else if(currentAction->getLookingPlace() == CAction::E_LP_BODY) { haystack = strstr(msg, "\r\n\r\n"); if (!haystack) { if (currentAction->getCheckIt() == true) { WARNING("Failed regexp match: body not found in message\n%s\n", msg); return(call::E_AR_HDR_NOT_FOUND); } msgPart[0] = '\0'; haystack = msgPart; } haystack += strlen("\r\n\r\n"); } else if(currentAction->getLookingPlace() == CAction::E_LP_MSG) { haystack = msg; } else if(currentAction->getLookingPlace() == CAction::E_LP_VAR) { /* Get the input variable. */ haystack = M_callVariableTable->getVar(currentAction->getVarInId())->getString(); if (!haystack) { if (currentAction->getCheckIt() == true) { WARNING("Failed regexp match: variable $%d not set", currentAction->getVarInId()); return(call::E_AR_HDR_NOT_FOUND); } } } else { ERROR("Invalid looking place: %d", currentAction->getLookingPlace()); } bool did_match = (currentAction->executeRegExp(haystack, M_callVariableTable) > 0); if (!did_match && currentAction->getCheckIt()) { // the message doesn't match and the checkit action say it MUST match // Allow easier regexp debugging WARNING("Failed regexp match: looking in '%s', with regexp '%s'", haystack, currentAction->getRegularExpression()); return(call::E_AR_REGEXP_DOESNT_MATCH); } else if (did_match && currentAction->getCheckItInverse()) { // The inverse of the above WARNING("Regexp matched but should not: looking in '%s', with regexp '%s'", haystack, currentAction->getRegularExpression()); return(call::E_AR_REGEXP_SHOULDNT_MATCH); } } else if (currentAction->getActionType() == CAction::E_AT_ASSIGN_FROM_VALUE) { double operand = get_rhs(currentAction); M_callVariableTable->getVar(currentAction->getVarId())->setDouble(operand); } else if (currentAction->getActionType() == CAction::E_AT_ASSIGN_FROM_INDEX) { M_callVariableTable->getVar(currentAction->getVarId())->setDouble(msg_index); } else if (currentAction->getActionType() == CAction::E_AT_ASSIGN_FROM_GETTIMEOFDAY) { struct timeval tv; gettimeofday(&tv, NULL); M_callVariableTable->getVar(currentAction->getVarId())->setDouble((double)tv.tv_sec); M_callVariableTable->getVar(currentAction->getSubVarId(0))->setDouble((double)tv.tv_usec); } else if (currentAction->getActionType() == CAction::E_AT_LOOKUP) { /* Create strings from the sending messages. */ char *file = strdup(createSendingMessage(currentAction->getMessage(0), -2)); char *key = strdup(createSendingMessage(currentAction->getMessage(1), -2)); if (inFiles.find(file) == inFiles.end()) { ERROR("Invalid injection file for insert: %s", file); } double value = inFiles[file]->lookup(key); M_callVariableTable->getVar(currentAction->getVarId())->setDouble(value); free(file); free(key); } else if (currentAction->getActionType() == CAction::E_AT_INSERT) { /* Create strings from the sending messages. */ char *file = strdup(createSendingMessage(currentAction->getMessage(0), -2)); char *value = strdup(createSendingMessage(currentAction->getMessage(1), -2)); if (inFiles.find(file) == inFiles.end()) { ERROR("Invalid injection file for insert: %s", file); } inFiles[file]->insert(value); free(file); free(value); } else if (currentAction->getActionType() == CAction::E_AT_REPLACE) { /* Create strings from the sending messages. */ char *file = strdup(createSendingMessage(currentAction->getMessage(0), -2)); char *line = strdup(createSendingMessage(currentAction->getMessage(1), -2)); char *value = strdup(createSendingMessage(currentAction->getMessage(2), -2)); if (inFiles.find(file) == inFiles.end()) { ERROR("Invalid injection file for replace: %s", file); } char *endptr; int lineNum = (int)strtod(line, &endptr); if (*endptr) { ERROR("Invalid line number for replace: %s", line); } inFiles[file]->replace(lineNum, value); free(file); free(line); free(value); } else if (currentAction->getActionType() == CAction::E_AT_CLOSE_CON) { if (call_socket) { call_socket->close(); call_socket = NULL; } } else if (currentAction->getActionType() == CAction::E_AT_SET_DEST) { /* Change the destination for this call. */ char *str_host = strdup(createSendingMessage(currentAction->getMessage(0), -2)); char *str_port = strdup(createSendingMessage(currentAction->getMessage(1), -2)); char *str_protocol = strdup(createSendingMessage(currentAction->getMessage(2), -2)); char *endptr; int port = (int)strtod(str_port, &endptr); if (*endptr) { ERROR("Invalid port for setdest: %s", str_port); } int protocol = 0; if (!strcmp(str_protocol, "udp") || !strcmp(str_protocol, "UDP")) { protocol = T_UDP; } else if (!strcmp(str_protocol, "tcp") || !strcmp(str_protocol, "TCP")) { protocol = T_TCP; } else if (!strcmp(str_protocol, "tls") || !strcmp(str_protocol, "TLS")) { protocol = T_TLS; } else if (!strcmp(str_protocol, "sctp") || !strcmp(str_protocol, "SCTP")) { protocol = T_SCTP; } else { ERROR("Unknown transport for setdest: '%s'", str_protocol); } if (!call_socket && ((protocol == T_TCP && transport == T_TCP) || (protocol == T_SCTP && transport == T_SCTP))) { bool existing; if ((associate_socket(SIPpSocket::new_sipp_call_socket(use_ipv6, transport, &existing))) == NULL) { switch (protocol) { case T_SCTP: ERROR_NO("Unable to get a SCTP socket"); break; default: ERROR_NO("Unable to get a TCP socket"); } } if (!existing) { sipp_customize_socket(call_socket); } } if (!call_socket) { ERROR("Unable to get a socket"); } if (protocol != call_socket->ss_transport) { ERROR("Can not switch protocols during setdest."); } if (protocol == T_UDP) { /* Nothing to do. */ } else if (protocol == T_TLS) { ERROR("Changing destinations is not supported for TLS."); } else if (protocol == T_TCP || protocol == T_SCTP) { if (!multisocket) { ERROR("Changing destinations for TCP or SCTP requires multisocket mode."); } if (call_socket->ss_count > 1) { ERROR("Can not change destinations for a TCP/SCTP socket that has more than one user."); } } if (gai_getsockaddr(&call_peer, str_host, port, AI_PASSIVE, AF_UNSPEC) != 0) { ERROR("Unknown host '%s' for setdest", str_host); } memcpy(&call_socket->ss_dest, &call_peer, sizeof(call_peer)); free(str_host); free(str_port); free(str_protocol); if (protocol == T_TCP || protocol == T_SCTP) { close(call_socket->ss_fd); call_socket->ss_fd = -1; call_socket->ss_changed_dest = true; if (call_socket->reconnect()) { if (reconnect_allowed()) { if(errno == EINVAL) { /* This occurs sometime on HPUX but is not a true INVAL */ WARNING("Unable to connect a TCP/SCTP/TLS socket, remote peer error"); } else { WARNING("Unable to connect a TCP/SCTP/TLS socket"); } /* This connection failed. We must be in multisocket mode, because * otherwise we would already have a call_socket. This call can not * succeed, but does not affect any of our other calls. We do decrement * the reconnection counter however. */ if (reset_number != -1) { reset_number--; } return E_AR_CONNECT_FAILED; } else { if(errno == EINVAL) { /* This occurs sometime on HPUX but is not a true INVAL */ ERROR("Unable to connect a TCP/SCTP/TLS socket, remote peer error"); } else { ERROR_NO("Unable to connect a TCP/SCTP/TLS socket"); } } } } } else if (currentAction->getActionType() == CAction::E_AT_VERIFY_AUTH) { bool result; const char* lf; const char* end; lf = strchr(msg, '\n'); end = strchr(msg, ' '); if (!lf || !end) { result = false; } else if (lf < end) { result = false; } else { char *auth = get_header(msg, "Authorization:", true); char *method = (char *)malloc(end - msg + 1); strncpy(method, msg, end - msg); method[end - msg] = '\0'; /* Generate the username to verify it against. */ char *tmp = createSendingMessage(currentAction->getMessage(0), -2 /* do not add crlf*/); char *username = strdup(tmp); /* Generate the password to verify it against. */ tmp= createSendingMessage(currentAction->getMessage(1), -2 /* do not add crlf*/); char *password = strdup(tmp); /* Need the body for length and auth-int calculation */ const char *body; const char *auth_body = NULL; body = strstr(msg, "\r\n\r\n"); if (body) { auth_body = body; auth_body += strlen("\r\n\r\n"); } else { auth_body = ""; } result = verifyAuthHeader(username, password, method, auth, auth_body); free(username); free(password); free(method); } M_callVariableTable->getVar(currentAction->getVarId())->setBool(result); } else if (currentAction->getActionType() == CAction::E_AT_JUMP) { double operand = get_rhs(currentAction); if (msg_index == ((int)operand)) { ERROR("Jump statement at index %d jumps to itself and causes an infinite loop", msg_index); } msg_index = (int)operand - 1; /* -1 is allowed to go to the first label, but watch out * when using msg_index. */ if (msg_index < -1 || msg_index >= (int)call_scenario->messages.size()) { ERROR("Jump statement out of range (not 0 <= %d <= %zu)", msg_index + 1, call_scenario->messages.size()); } } else if (currentAction->getActionType() == CAction::E_AT_PAUSE_RESTORE) { double operand = get_rhs(currentAction); paused_until = (int)operand; } else if (currentAction->getActionType() == CAction::E_AT_VAR_ADD) { double value = M_callVariableTable->getVar(currentAction->getVarId())->getDouble(); double operand = get_rhs(currentAction); M_callVariableTable->getVar(currentAction->getVarId())->setDouble(value + operand); } else if (currentAction->getActionType() == CAction::E_AT_VAR_SUBTRACT) { double value = M_callVariableTable->getVar(currentAction->getVarId())->getDouble(); double operand = get_rhs(currentAction); M_callVariableTable->getVar(currentAction->getVarId())->setDouble(value - operand); } else if (currentAction->getActionType() == CAction::E_AT_VAR_MULTIPLY) { double value = M_callVariableTable->getVar(currentAction->getVarId())->getDouble(); double operand = get_rhs(currentAction); M_callVariableTable->getVar(currentAction->getVarId())->setDouble(value * operand); } else if (currentAction->getActionType() == CAction::E_AT_VAR_DIVIDE) { double value = M_callVariableTable->getVar(currentAction->getVarId())->getDouble(); double operand = get_rhs(currentAction); if (operand == 0) { WARNING("Action failure: Can not divide by zero ($%d/$%d)!\n", currentAction->getVarId(), currentAction->getVarInId()); } else { M_callVariableTable->getVar(currentAction->getVarId())->setDouble(value / operand); } } else if (currentAction->getActionType() == CAction::E_AT_VAR_TEST) { bool value = currentAction->compare(M_callVariableTable); if ((currentAction->getCheckIt() && !value) || (currentAction->getCheckItInverse() && value) ) { double lhs = M_callVariableTable->getVar(currentAction->getVarInId())->getDouble(); double rhs = currentAction->getVarIn2Id() ? M_callVariableTable->getVar(currentAction->getVarIn2Id())->getDouble() : currentAction->getDoubleValue(); char *lhsName = call_scenario->allocVars->getName(currentAction->getVarInId()); const char *rhsName = ""; if (currentAction->getVarIn2Id()) { rhsName = call_scenario->allocVars->getName(currentAction->getVarIn2Id()); } const char *_inverse = currentAction->getCheckIt() ? "" : "_inverse"; call::T_ActionResult result = currentAction->getCheckIt() ? call::E_AR_TEST_DOESNT_MATCH : call::E_AR_TEST_SHOULDNT_MATCH; WARNING("test \"%s:%f %s %s:%f\" with check_it%s failed", lhsName, lhs, currentAction->comparatorToString(currentAction->getComparator()), rhsName, rhs, _inverse ); return(result); } // "assign_to" is optional when "check_it" or "check_it_inverse" set if (currentAction->getVarId() || (!currentAction->getCheckIt() && !currentAction->getCheckItInverse()) ) { M_callVariableTable->getVar(currentAction->getVarId())->setBool(value); } } else if (currentAction->getActionType() == CAction::E_AT_VAR_STRCMP) { char *lhs = M_callVariableTable->getVar(currentAction->getVarInId())->getString(); char *rhs = currentAction->getVarIn2Id() ? M_callVariableTable->getVar(currentAction->getVarIn2Id())->getString() : currentAction->getStringValue(); int value = strcmp(lhs, rhs); if ((currentAction->getCheckIt() && value) || (currentAction->getCheckItInverse() && !value) ) { char *lhsName = call_scenario->allocVars->getName(currentAction->getVarInId()); const char *rhsName = ""; if (currentAction->getVarIn2Id()) { rhsName = call_scenario->allocVars->getName(currentAction->getVarIn2Id()); } const char *_inverse = currentAction->getCheckIt() ? "" : "_inverse"; call::T_ActionResult result = currentAction->getCheckIt() ? call::E_AR_STRCMP_DOESNT_MATCH : call::E_AR_STRCMP_SHOULDNT_MATCH; WARNING("strcmp %s:\"%s\" and %s:\"%s\" with check_it%s returned %d", lhsName, lhs, rhsName, rhs, _inverse, value ); return(result); } // "assign_to" is optional when "check_it" or "check_it_inverse" set if (currentAction->getVarId() || (!currentAction->getCheckIt() && !currentAction->getCheckItInverse()) ) { M_callVariableTable->getVar(currentAction->getVarId())->setDouble((double)value); } } else if (currentAction->getActionType() == CAction::E_AT_VAR_TRIM) { CCallVariable *var = M_callVariableTable->getVar(currentAction->getVarId()); char *in = var->getString(); char *p = in; while (isspace(*p)) { p++; } char *q = strdup(p); var->setString(q); int l = strlen(q); for (int i = l - 1; (i >= 0) && isspace(q[i]); i--) { q[i] = '\0'; } } else if (currentAction->getActionType() == CAction::E_AT_VAR_TO_DOUBLE) { double value; if (M_callVariableTable->getVar(currentAction->getVarInId())->toDouble(&value)) { M_callVariableTable->getVar(currentAction->getVarId())->setDouble(value); } else { WARNING("Invalid double conversion from $%d to $%d", currentAction->getVarInId(), currentAction->getVarId()); } } else if (currentAction->getActionType() == CAction::E_AT_ASSIGN_FROM_SAMPLE) { double value = currentAction->getDistribution()->sample(); M_callVariableTable->getVar(currentAction->getVarId())->setDouble(value); } else if (currentAction->getActionType() == CAction::E_AT_ASSIGN_FROM_STRING) { char* x = createSendingMessage(currentAction->getMessage(), -2 /* do not add crlf*/); char *str = strdup(x); if (!str) { ERROR("Out of memory duplicating string for assignment!"); } M_callVariableTable->getVar(currentAction->getVarId())->setString(str); } else if (currentAction->getActionType() == CAction::E_AT_LOG_TO_FILE) { char* x = createSendingMessage(currentAction->getMessage(), -2 /* do not add crlf*/); LOG_MSG("%s\n", x); } else if (currentAction->getActionType() == CAction::E_AT_LOG_WARNING) { char* x = createSendingMessage(currentAction->getMessage(), -2 /* do not add crlf*/); WARNING("%s", x); } else if (currentAction->getActionType() == CAction::E_AT_LOG_ERROR) { char* x = createSendingMessage(currentAction->getMessage(), -2 /* do not add crlf*/); ERROR("%s", x); } else if (currentAction->getActionType() == CAction::E_AT_EXECUTE_CMD) { char* x = createSendingMessage(currentAction->getMessage(), -2 /* do not add crlf*/); // TRACE_MSG("Trying to execute [%s]", x); pid_t l_pid; switch(l_pid = fork()) { case -1: // error when forking ! ERROR_NO("Forking error main"); break; case 0: // first child process - execute the command if((l_pid = fork()) < 0) { ERROR_NO("Forking error child"); } else { if( l_pid == 0) { int ret; ret = system(x); // second child runs if(ret == -1) { WARNING("system call error for %s", x); } } exit(EXIT_OTHER); } break; default: // parent process continue // reap first child immediately pid_t ret; while ((ret=waitpid(l_pid, NULL, 0)) != l_pid) { if (ret != -1) { ERROR("waitpid returns %1ld for child %1ld", (long) ret, (long) l_pid); } } break; } } else if (currentAction->getActionType() == CAction::E_AT_EXEC_INTCMD) { switch (currentAction->getIntCmd()) { case CAction::E_INTCMD_STOP_ALL: quitting = 1; break; case CAction::E_INTCMD_STOP_NOW: sipp_exit(EXIT_TEST_RES_INTERNAL); break; case CAction::E_INTCMD_STOPCALL: default: return(call::E_AR_STOP_CALL); break; } #ifdef PCAPPLAY } else if ((currentAction->getActionType() == CAction::E_AT_PLAY_PCAP_AUDIO) || (currentAction->getActionType() == CAction::E_AT_PLAY_PCAP_IMAGE) || (currentAction->getActionType() == CAction::E_AT_PLAY_PCAP_VIDEO) || (currentAction->getActionType() == CAction::E_AT_PLAY_DTMF)) { play_args_t* play_args = 0; if ((currentAction->getActionType() == CAction::E_AT_PLAY_PCAP_AUDIO) || (currentAction->getActionType() == CAction::E_AT_PLAY_DTMF)) { play_args = &(this->play_args_a); } else if (currentAction->getActionType() == CAction::E_AT_PLAY_PCAP_IMAGE) { play_args = &(this->play_args_i); } else if (currentAction->getActionType() == CAction::E_AT_PLAY_PCAP_VIDEO) { play_args = &(this->play_args_v); } else { ERROR("Can't find pcap data to play"); } // existing media thread could be using play_args, so we have to kill it before modifying parameters if (media_thread != 0) { // If a media_thread is already active, kill it before starting a new one pthread_cancel(media_thread); pthread_join(media_thread, NULL); media_thread = 0; } if (currentAction->getActionType() == CAction::E_AT_PLAY_DTMF) { char* digits = createSendingMessage(currentAction->getMessage(), -2 /* do not add crlf */); play_args->pcap = (pcap_pkts *) malloc(sizeof(pcap_pkts)); play_args->last_seq_no += parse_dtmf_play_args(digits, play_args->pcap, play_args->last_seq_no); play_args->free_pcap_when_done = 1; } else { play_args->pcap = currentAction->getPcapPkts(); play_args->free_pcap_when_done = 0; } /* port number is set in [auto_]media_port interpolation */ if (media_ip_is_ipv6) { struct sockaddr_in6* from = (struct sockaddr_in6*) &(play_args->from); from->sin6_family = AF_INET6; inet_pton(AF_INET6, media_ip, &(from->sin6_addr)); } else { struct sockaddr_in* from = (struct sockaddr_in*) &(play_args->from); from->sin_family = AF_INET; from->sin_addr.s_addr = inet_addr(media_ip); } /* Create a thread to send RTP or UDPTL packets */ pthread_attr_t attr; pthread_attr_init(&attr); #ifndef PTHREAD_STACK_MIN #define PTHREAD_STACK_MIN 16384 #endif int ret = pthread_create(&media_thread, &attr, send_wrapper, play_args); if (ret) { ERROR("Can't create thread to send RTP packets"); } pthread_attr_destroy(&attr); #endif #ifdef RTP_STREAM } else if (currentAction->getActionType() == CAction::E_AT_RTP_ECHO) { rtp_echo_state = (currentAction->getDoubleValue() != 0); } else if (currentAction->getActionType() == CAction::E_AT_RTP_STREAM_PAUSE) { rtpstream_pause(&rtpstream_callinfo); } else if (currentAction->getActionType() == CAction::E_AT_RTP_STREAM_RESUME) { rtpstream_resume(&rtpstream_callinfo); } else if (currentAction->getActionType() == CAction::E_AT_RTP_STREAM_PLAY) { rtpstream_play(&rtpstream_callinfo, currentAction->getRTPStreamActInfo()); #endif } else { ERROR("call::executeAction unknown action"); } } // end for return(call::E_AR_NO_ERROR); } void call::extractSubMessage(const char* msg, char* matchingString, char* result, bool case_indep, int occurrence, bool headers) { const char *ptr, *ptr1; int sizeOf; int i = 0; int len = strlen(matchingString); char mat1 = tolower(*matchingString); char mat2 = toupper(*matchingString); ptr = msg; while (*ptr) { if (!case_indep) { ptr = strstr(ptr, matchingString); if (ptr == NULL) break; if (headers == true && ptr != msg && *(ptr-1) != '\n') { ++ptr; continue; } } else { if (headers) { if (ptr != msg) { ptr = strchr(ptr, '\n'); if (ptr == NULL) break; ++ptr; if (*ptr == 0) break; } } else { ptr1 = strchr(ptr, mat1); ptr = strchr(ptr, mat2); if (ptr == NULL) { if (ptr1 == NULL) break; ptr = ptr1; } else { if (ptr1 != NULL && ptr1 < ptr) ptr = ptr1; } } if (strncasecmp(ptr, matchingString, len) != 0) { ++ptr; continue; } } // here with ptr pointing to a matching string if (occurrence <= 1) break; --occurrence; ++ptr; } if(ptr != NULL && *ptr != 0) { strncpy(result, ptr+len, MAX_SUB_MESSAGE_LENGTH); sizeOf = strlen(result); if(sizeOf >= MAX_SUB_MESSAGE_LENGTH) sizeOf = MAX_SUB_MESSAGE_LENGTH-1; while((i inFiles[fileName]->numLines()) { line = -1; } } if (line < 0) { return; } dest += inFiles[fileName]->getField(line, field, dest, SIPP_MAX_MSG_SIZE); } call::T_AutoMode call::checkAutomaticResponseMode(char* P_recv) { if (strcmp(P_recv, "BYE")==0) { return E_AM_UNEXP_BYE; } else if (strcmp(P_recv, "CANCEL") == 0) { return E_AM_UNEXP_CANCEL; } else if (strcmp(P_recv, "PING") == 0) { return E_AM_PING; } else if (auto_answer && ((strcmp(P_recv, "INFO") == 0) || (strcmp(P_recv, "NOTIFY") == 0) || (strcmp(P_recv, "OPTIONS") == 0) || (strcmp(P_recv, "UPDATE") == 0))) { return E_AM_AA; } else { return E_AM_DEFAULT; } } void call::setLastMsg(const char *msg) { realloc_ptr = (char *) realloc(last_recv_msg, strlen(msg) + 1); if (realloc_ptr) { last_recv_msg = realloc_ptr; } else { free(last_recv_msg); ERROR("Out of memory!"); return; } strcpy(last_recv_msg, msg); } bool call::automaticResponseMode(T_AutoMode P_case, const char* P_recv) { int res ; char * old_last_recv_msg = NULL; bool last_recv_msg_saved = false; switch (P_case) { case E_AM_UNEXP_BYE: // response for an unexpected BYE // usage of last_ keywords realloc_ptr = (char *) realloc(last_recv_msg, strlen(P_recv) + 1); if (realloc_ptr) { last_recv_msg = realloc_ptr; } else { free(last_recv_msg); ERROR("Out of memory!"); return false; } strcpy(last_recv_msg, P_recv); // The BYE is unexpected, count it call_scenario->messages[msg_index] -> nb_unexp++; if (default_behaviors & DEFAULT_BEHAVIOR_ABORTUNEXP) { WARNING("Aborting call on an unexpected BYE for call: %s", (id==NULL)?"none":id); if (default_behaviors & DEFAULT_BEHAVIOR_BYE) { sendBuffer(createSendingMessage(get_default_message("200"), -1)); } // if twin socket call => reset the other part here if (twinSippSocket && (msg_index > 0)) { res = sendCmdBuffer(createSendingMessage(get_default_message("3pcc_abort"), -1)); if (res) { WARNING("sendCmdBuffer returned %d", res); return false; } } computeStat(CStat::E_CALL_FAILED); computeStat(CStat::E_FAILED_UNEXPECTED_MSG); delete this; } else { WARNING("Continuing call on an unexpected BYE for call: %s", (id==NULL)?"none":id); } break ; case E_AM_UNEXP_CANCEL: // response for an unexpected cancel // usage of last_ keywords realloc_ptr = (char *) realloc(last_recv_msg, strlen(P_recv) + 1); if (realloc_ptr) { last_recv_msg = realloc_ptr; } else { free(last_recv_msg); ERROR("Out of memory!"); return false; } strcpy(last_recv_msg, P_recv); // The CANCEL is unexpected, count it call_scenario->messages[msg_index] -> nb_unexp++; if (default_behaviors & DEFAULT_BEHAVIOR_ABORTUNEXP) { WARNING("Aborting call on an unexpected CANCEL for call: %s", (id==NULL)?"none":id); if (default_behaviors & DEFAULT_BEHAVIOR_BYE) { sendBuffer(createSendingMessage(get_default_message("200"), -1)); } // if twin socket call => reset the other part here if (twinSippSocket && (msg_index > 0)) { res = sendCmdBuffer(createSendingMessage(get_default_message("3pcc_abort"), -1)); if (res) { WARNING("sendCmdBuffer returned %d", res); return false; } } computeStat(CStat::E_CALL_FAILED); computeStat(CStat::E_FAILED_UNEXPECTED_MSG); delete this; } else { WARNING("Continuing call on unexpected CANCEL for call: %s", (id==NULL)?"none":id); } break ; case E_AM_PING: // response for a random ping // usage of last_ keywords realloc_ptr = (char *) realloc(last_recv_msg, strlen(P_recv) + 1); if (realloc_ptr) { last_recv_msg = realloc_ptr; } else { free(last_recv_msg); ERROR("Out of memory!"); return false; } strcpy(last_recv_msg, P_recv); if (default_behaviors & DEFAULT_BEHAVIOR_PINGREPLY) { WARNING("Automatic response mode for an unexpected PING for call: %s", (id==NULL)?"none":id); sendBuffer(createSendingMessage(get_default_message("200"), -1)); // Note: the call ends here but it is not marked as bad. PING is a // normal message. // if twin socket call => reset the other part here if (twinSippSocket && (msg_index > 0)) { res = sendCmdBuffer(createSendingMessage(get_default_message("3pcc_abort"), -1)); if (res) { WARNING("sendCmdBuffer returned %d", res); return false; } } CStat::globalStat(CStat::E_AUTO_ANSWERED); delete this; } else { WARNING("Do not answer on an unexpected PING for call: %s", (id==NULL)?"none":id); } break ; case E_AM_AA: // response for a random INFO, NOTIFY, OPTIONS or UPDATE // store previous last msg if msg is INFO, NOTIFY, OPTIONS or UPDATE // restore last_recv_msg to previous one // after sending ok old_last_recv_msg = NULL; if (last_recv_msg != NULL) { last_recv_msg_saved = true; old_last_recv_msg = (char *) malloc(strlen(last_recv_msg)+1); strcpy(old_last_recv_msg, last_recv_msg); } // usage of last_ keywords realloc_ptr = (char *) realloc(last_recv_msg, strlen(P_recv) + 1); if (realloc_ptr) { last_recv_msg = realloc_ptr; } else { free(last_recv_msg); free(old_last_recv_msg); ERROR("Out of memory!"); return false; } strcpy(last_recv_msg, P_recv); WARNING("Automatic response mode for an unexpected INFO, NOTIFY, OPTIONS or UPDATE for call: %s", (id == NULL) ? "none" : id); sendBuffer(createSendingMessage(get_default_message("200"), -1)); // restore previous last msg if (last_recv_msg_saved == true) { realloc_ptr = (char *) realloc(last_recv_msg, strlen(old_last_recv_msg) + 1); if (realloc_ptr) { last_recv_msg = realloc_ptr; } else { free(last_recv_msg); ERROR("Out of memory!"); return false; } strcpy(last_recv_msg, old_last_recv_msg); if (old_last_recv_msg != NULL) { free(old_last_recv_msg); old_last_recv_msg = NULL; } } CStat::globalStat(CStat::E_AUTO_ANSWERED); return true; break; default: ERROR("Internal error for automaticResponseMode - mode %d is not implemented!", P_case); break ; } return false; } #ifdef PCAPPLAY void *send_wrapper(void *arg) { play_args_t *s = (play_args_t *) arg; //struct sched_param param; //int ret; //param.sched_priority = 10; //ret = pthread_setschedparam(pthread_self(), SCHED_RR, ¶m); //if(ret) // ERROR("Can't set RTP play thread realtime parameters"); pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, NULL); send_packets(s); pthread_exit(NULL); return NULL; } #endif #ifdef GTEST #include "gtest/gtest.h" #include "gtest/gtest.h" class mockcall : public call { public: mockcall(bool is_ipv6) : listener("//testing", true), call("///testing", is_ipv6, 0, NULL) {} /* Helpers to poke at protected internals */ void parse_media_addr(std::string const& msg) { get_remote_media_addr(msg); } #ifdef PCAPPLAY bool has_media() { return hasMediaInformation; } template T get_audio_addr() { T sa; std::memcpy(&sa, &play_args_a.to, sizeof(T)); return sa; } #endif }; bool operator==(const struct sockaddr_in& a, const struct sockaddr_in &b) { return a.sin_family == b.sin_family && a.sin_port == b.sin_port && std::memcmp(&a.sin_addr, &b.sin_addr, sizeof(in_addr)) == 0; } bool operator==(const struct sockaddr_in6& a, const struct sockaddr_in6 &b) { return a.sin6_family == b.sin6_family && a.sin6_port == b.sin6_port && std::memcmp(&a.sin6_addr, &b.sin6_addr, sizeof(in_addr)) == 0; } const std::string test_sdp_v4 = "v=0\r\n" "o=user1 53655765 2353687637 IN IP4 127.0.0.1\r\n" "s=-\r\n" "c=IN IP4 127.0.0.1\r\n" "t=0 0\r\n" "m=audio 12345 RTP/AVP 0\r\n" "a=rtpmap:0 PCMU/8000\r\n"; const std::string test_sdp_v6 = "v=0\r\n" "o=user1 53655765 2353687637 IN IP6 ::1\r\n" "s=-\r\n" "c=IN IP6 ::1\r\n" "t=0 0\r\n" "m=audio 12345 RTP/AVP 0\r\n" "a=rtpmap:0 PCMU/8000\r\n"; TEST(sdp, parse_valid_sdp_msg) { ASSERT_EQ(find_in_sdp("c=IN IP4 ", test_sdp_v4), "127.0.0.1"); ASSERT_EQ(find_in_sdp("c=IN IP6 ", test_sdp_v6), "::1"); ASSERT_EQ(find_in_sdp("m=audio ", test_sdp_v4), "12345"); ASSERT_EQ(find_in_sdp("m=audio ", test_sdp_v6), "12345"); } TEST(sdp, parse_invalid_sdp_msg) { ASSERT_EQ(find_in_sdp("c=IN IP4 ", test_sdp_v6), ""); ASSERT_EQ(find_in_sdp("c=IN IP6 ", test_sdp_v4), ""); ASSERT_EQ(find_in_sdp("m=video ", test_sdp_v6), ""); ASSERT_EQ(find_in_sdp("m=video ", test_sdp_v4), ""); } #ifdef PCAPPLAY TEST(sdp, good_remote_media_addr_v4) { media_ip_is_ipv6 = false; struct sockaddr_in reference; reference.sin_family = AF_INET; reference.sin_port = htons(12345); inet_pton(AF_INET, "127.0.0.1", &reference.sin_addr); mockcall call(false); call.parse_media_addr(test_sdp_v4); ASSERT_EQ(call.has_media(), true); ASSERT_EQ(reference, call.get_audio_addr()); } TEST(sdp, good_remote_media_addr_v6) { media_ip_is_ipv6 = true; struct sockaddr_in6 reference; reference.sin6_family = AF_INET6; reference.sin6_port = htons(12345); inet_pton(AF_INET6, "::1", &reference.sin6_addr); mockcall call(true); call.parse_media_addr(test_sdp_v6); ASSERT_EQ(call.has_media(), true); ASSERT_EQ(reference, call.get_audio_addr()); } #endif /* PCAP_PLAY */ #endif sipp-3.6.0/src/watchdog.cpp0000644000175000017500000001162513475544015015161 0ustar walterwalter/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Richard GAYRAUD - 04 Nov 2003 * Marc LAMBERTON * Olivier JACQUES * Herve PELLAN * David MANSUTTI * Francois-Xavier Kowalski * Gerard Lyonnaz * From Hewlett Packard Company. * F. Tarek Rogers * Peter Higginson * Vincent Luba * Shriram Natarajan * Guillaume Teissier from FTR&D * Clement Chen * Wolfgang Beck * Charles P Wright from IBM Research */ #include "sipp.hpp" void watchdog::dump() { WARNING("Watchdog Task: interval = %d, major_threshold = %d (%d triggers left), minor_threshold = %d (%d triggers left)", interval, major_threshold, major_maxtriggers, minor_threshold, minor_maxtriggers); } watchdog::watchdog(int interval, int reset_interval, int major_threshold, int major_maxtriggers, int minor_threshold, int minor_maxtriggers) { this->interval = interval; this->reset_interval = reset_interval; this->major_threshold = major_threshold; this->major_maxtriggers = major_maxtriggers; this->minor_threshold = minor_threshold; this->minor_maxtriggers = minor_maxtriggers; major_triggers = 0; minor_triggers = 0; last_trigger = last_fire = getmilliseconds(); } bool watchdog::run() { getmilliseconds(); unsigned expected_major_trigger_time = last_fire + this->major_threshold; unsigned expected_minor_trigger_time = last_fire + this->minor_threshold; bool major_watchdog_tripped = clock_tick > expected_major_trigger_time; bool minor_watchdog_tripped = clock_tick > expected_minor_trigger_time; // Check if either watchdog has taken longer than expected to run, // and if so, warn that we are overloaded. if (major_watchdog_tripped) { major_triggers++; CStat::globalStat(CStat::E_WATCHDOG_MAJOR); last_trigger = clock_tick; WARNING("Overload warning: the major watchdog timer %dms has been tripped (%lu), %d trips remaining.", major_threshold, clock_tick - last_fire, major_maxtriggers - major_triggers); } else if (minor_watchdog_tripped) { minor_triggers++; last_trigger = clock_tick; CStat::globalStat(CStat::E_WATCHDOG_MINOR); WARNING("Overload warning: the minor watchdog timer %dms has been tripped (%lu), %d trips remaining.", minor_threshold, clock_tick - last_fire, minor_maxtriggers - minor_triggers); } bool major_watchdog_failure = ((this->major_maxtriggers != -1) && (major_triggers > this->major_maxtriggers)); bool minor_watchdog_failure = ((this->minor_maxtriggers != -1) && (minor_triggers > this->minor_maxtriggers)); // If the watchdogs have tripped too many times, end the SIPp run. if (major_watchdog_failure) { ERROR("Overload error: the watchdog timer has tripped the major threshold of %dms too many times (%d out of %d allowed) (%d out of %d minor %dms timeouts tripped)", major_threshold, major_triggers, major_maxtriggers, minor_triggers, minor_maxtriggers, minor_threshold); } else if (minor_watchdog_failure) { ERROR("Overload error: the watchdog timer has tripped the minor threshold of %dms too many times (%d out of %d allowed) (%d out of %d major %dms timeouts tripped)", minor_threshold, minor_triggers, minor_maxtriggers, major_triggers, major_maxtriggers, major_threshold); } if ((reset_interval > 0) && (major_triggers || minor_triggers) && (clock_tick > (last_trigger + reset_interval))) { WARNING("Resetting watchdog timer trigger counts, as it has not been triggered in over %lums.", clock_tick - last_trigger); major_triggers = minor_triggers = 0; } last_fire = clock_tick; setPaused(); // Return this task to a paused state return true; } // Returns the clock_tick when this task should next run unsigned int watchdog::wake() { return last_fire + interval; } sipp-3.6.0/src/rtpstream.cpp0000644000175000017500000007116013475544015015402 0ustar walterwalter/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA * * Author : Deon van der Westhuysen - June 2012 - Vodacom PTY LTD */ #include #include #include #include #include "sipp.hpp" #include #include #include #include #include #include "rtpstream.hpp" /* stub to add extra debugging/logging... */ static void debugprint(const char* format, ...) { } #define RTPSTREAM_FILESPERBLOCK 16 #define BIND_MAX_TRIES 100 #define RTPSTREAM_THREADBLOCKSIZE 16 #define MAX_UDP_RECV_BUFFER 8192 #define TI_NULL_AUDIOIP 0x01 #define TI_NULLIP (TI_NULL_AUDIOIP) #define TI_PAUSERTP 0x04 #define TI_ECHORTP 0x08 /* Not currently implemented */ #define TI_KILLTASK 0x10 #define TI_PLAYFILE 0x40 #define TI_CONFIGFLAGS (TI_KILLTASK|TI_PLAYFILE) struct rtp_header_t { uint16_t flags; uint16_t seq; uint32_t timestamp; uint32_t ssrc_id; }; struct taskentry_t { threaddata_t *parent_thread; unsigned long nextwake_ms; volatile int flags; /* rtp stream information */ unsigned long long last_timestamp; unsigned short seq; char payload_type; unsigned int ssrc_id; /* current playback information */ int loop_count; char *file_bytes_start; char *current_file_bytes; int file_num_bytes; int file_bytes_left; /* playback timing information */ int ms_per_packet; int bytes_per_packet; int timeticks_per_packet; int timeticks_per_ms; /* new file playback information */ char new_payload_type; int new_loop_count; int new_file_size; char *new_file_bytes; int new_ms_per_packet; int new_bytes_per_packet; int new_timeticks_per_packet; /* sockets for audio/video rtp_rtcp */ int audio_rtp_socket; /* rtp peer address structures */ struct sockaddr_storage remote_audio_rtp_addr; /* we will have a mutex per call. should we consider refactoring to */ /* share mutexes across calls? makes the per-call code more complex */ /* thread mananagment structures */ pthread_mutex_t mutex; }; struct threaddata_t { pthread_mutex_t tasklist_mutex; int busy_list_index; int max_tasks; volatile int num_tasks; volatile int del_pending; volatile int exit_flag; taskentry_t *tasklist; }; struct cached_file_t { char filename[RTPSTREAM_MAX_FILENAMELEN]; char *bytes; int filesize; }; cached_file_t *cached_files = NULL; int num_cached_files = 0; int next_rtp_port = 0; threaddata_t **ready_threads = NULL; threaddata_t **busy_threads = NULL; int num_busy_threads = 0; int num_ready_threads = 0; int busy_threads_max = 0; int ready_threads_max = 0; unsigned int global_ssrc_id = 0xCA110000; //=================================================================================================== /* code checked */ static void rtpstream_free_taskinfo(taskentry_t* taskinfo) { if (taskinfo) { /* cleanup pthread library structure */ pthread_mutex_destroy(&(taskinfo->mutex)); free(taskinfo); } } /* code checked */ static void rtpstream_process_task_flags(taskentry_t* taskinfo) { if (taskinfo->flags & TI_PLAYFILE) { /* copy playback information */ taskinfo->loop_count = taskinfo->new_loop_count; taskinfo->file_bytes_start = taskinfo->new_file_bytes; taskinfo->current_file_bytes = taskinfo->new_file_bytes; taskinfo->file_num_bytes = taskinfo->new_file_size; taskinfo->file_bytes_left = taskinfo->new_file_size; taskinfo->payload_type = taskinfo->new_payload_type; taskinfo->ms_per_packet = taskinfo->new_ms_per_packet; taskinfo->bytes_per_packet = taskinfo->new_bytes_per_packet; taskinfo->timeticks_per_packet = taskinfo->new_timeticks_per_packet; taskinfo->timeticks_per_ms = taskinfo->timeticks_per_packet/taskinfo->ms_per_packet; taskinfo->last_timestamp = getmilliseconds()*taskinfo->timeticks_per_ms; taskinfo->flags &= ~TI_PLAYFILE; } } /**** todo - check code ****/ static unsigned long rtpstream_playrtptask(taskentry_t* taskinfo, unsigned long timenow_ms) { int rc; unsigned long next_wake; unsigned long long target_timestamp; union { rtp_header_t hdr; char buffer[MAX_UDP_RECV_BUFFER]; } udp; /* OK, now to play - sockets are supposed to be non-blocking */ /* no support for video stream at this stage. will need some work */ next_wake = timenow_ms + 100; /* default next wakeup time */ if (taskinfo->audio_rtp_socket != -1) { /* if/when we include echo functionality, we'll have to read * from the audio_rtp_socket too, and check by peer address if * it is "our" traffic */ /* are we playing back an audio file? */ if (taskinfo->loop_count) { target_timestamp = timenow_ms * taskinfo->timeticks_per_ms; next_wake = timenow_ms + taskinfo->ms_per_packet - timenow_ms % taskinfo->ms_per_packet; if (taskinfo->flags & (TI_NULL_AUDIOIP | TI_PAUSERTP)) { /* when paused, set timestamp so stream appears to be up to date */ taskinfo->last_timestamp = target_timestamp; } if (taskinfo->last_timestamp < target_timestamp) { /* need to send rtp payload - build rtp packet header... */ udp.hdr.flags = htons(0x8000 | taskinfo->payload_type); udp.hdr.seq = htons(taskinfo->seq); udp.hdr.timestamp = htonl((uint32_t)(taskinfo->last_timestamp & 0xFFFFFFFF)); udp.hdr.ssrc_id = htonl(taskinfo->ssrc_id); /* add payload data to the packet - handle buffer wraparound */ if (taskinfo->file_bytes_left >= taskinfo->bytes_per_packet) { /* no need for fancy acrobatics */ memcpy(udp.buffer + sizeof(rtp_header_t), taskinfo->current_file_bytes, taskinfo->bytes_per_packet); } else { /* copy from end and then begining of file. does not handle the */ /* case where file is shorter than the packet length!! */ memcpy(udp.buffer + sizeof(rtp_header_t), taskinfo->current_file_bytes, taskinfo->file_bytes_left); memcpy(udp.buffer + sizeof(rtp_header_t) + taskinfo->file_bytes_left, taskinfo->file_bytes_start, taskinfo->bytes_per_packet - taskinfo->file_bytes_left); } /* now send the actual packet */ size_t packet_len = taskinfo->bytes_per_packet + sizeof(rtp_header_t); socklen_t remote_addr_len = (media_ip_is_ipv6 ? sizeof(struct sockaddr_in6) : sizeof(struct sockaddr_in)); rc = sendto(taskinfo->audio_rtp_socket, udp.buffer, packet_len, 0, (struct sockaddr*)&taskinfo->remote_audio_rtp_addr, remote_addr_len); if (rc < 0) { /* handle sending errors */ if (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR) { next_wake = timenow_ms + 2; /* retry after short sleep */ } else { /* this looks like a permanent error - should we ignore ENETUNREACH? */ debugprint("closing rtp socket %d due to error %d in rtpstream_new_call taskinfo=%p\n", taskinfo->audio_rtp_socket, errno, taskinfo); close(taskinfo->audio_rtp_socket); taskinfo->audio_rtp_socket = -1; } } else { /* statistics - only count successful sends */ rtpstream_bytes_out += taskinfo->bytes_per_packet + sizeof(rtp_header_t); rtpstream_pckts++; /* advance playback pointer to next packet */ taskinfo->seq++; /* must change if timer ticks per packet can be fractional */ taskinfo->last_timestamp += taskinfo->timeticks_per_packet; taskinfo->file_bytes_left -= taskinfo->bytes_per_packet; if (taskinfo->file_bytes_left > 0) { taskinfo->current_file_bytes += taskinfo->bytes_per_packet; } else { taskinfo->current_file_bytes = taskinfo->file_bytes_start - taskinfo->file_bytes_left; taskinfo->file_bytes_left += taskinfo->file_num_bytes; if (taskinfo->loop_count > 0) { /* one less loop to play. -1 (infinite loops) will stay as is */ taskinfo->loop_count--; } } if (taskinfo->last_timestamp < target_timestamp) { /* no sleep if we are behind */ next_wake = timenow_ms; } } } } else { /* not busy playing back a file - put possible rtp echo code here. */ } } return next_wake; } /*********************************************************************************/ /*********************************************************************************/ /*********************************************************************************/ /* code checked */ static void* rtpstream_playback_thread(void* params) { threaddata_t *threaddata = (threaddata_t *) params; taskentry_t *taskinfo; int taskindex; unsigned long timenow_ms; unsigned long waketime_ms; int sleeptime_us; rtpstream_numthreads++; /* perhaps wrap this in a mutex? */ while (!threaddata->exit_flag) { timenow_ms = getmilliseconds(); waketime_ms = timenow_ms + 100; /* default sleep 100ms */ /* iterate through tasks and handle playback and other actions */ for (taskindex = 0; taskindex < threaddata->num_tasks; taskindex++) { taskinfo = (&threaddata->tasklist)[taskindex]; if (taskinfo->flags & TI_CONFIGFLAGS) { if (taskinfo->flags & TI_KILLTASK) { /* remove this task entry and release its resources */ pthread_mutex_lock (&(threaddata->tasklist_mutex)); (&threaddata->tasklist)[taskindex--] = (&threaddata->tasklist)[--threaddata->num_tasks]; threaddata->del_pending--; /* must decrease del_pending after num_tasks */ pthread_mutex_unlock(&(threaddata->tasklist_mutex)); rtpstream_free_taskinfo(taskinfo); continue; } /* handle any other config related flags */ rtpstream_process_task_flags(taskinfo); } /* should we update current time inbetween tasks? */ if (taskinfo->nextwake_ms <= timenow_ms) { /* task needs to execute now */ taskinfo->nextwake_ms = rtpstream_playrtptask(taskinfo, timenow_ms); } if (waketime_ms > taskinfo->nextwake_ms) { waketime_ms = taskinfo->nextwake_ms; } } /* sleep until next iteration of playback loop */ sleeptime_us = (waketime_ms - getmilliseconds()) * 1000; if (sleeptime_us > 0) { usleep(sleeptime_us); } } /* Free all task and thread resources and exit the thread */ for (taskindex = 0; taskindex < threaddata->num_tasks; taskindex++) { /* check if we should delete this thread, else let owner call clear it */ /* small chance of race condition in this code */ taskinfo = (&threaddata->tasklist)[taskindex]; if (taskinfo->flags & TI_KILLTASK) { rtpstream_free_taskinfo(taskinfo); } else { taskinfo->parent_thread = NULL; /* no longer associated with a thread */ } } pthread_mutex_destroy(&(threaddata->tasklist_mutex)); free(threaddata); rtpstream_numthreads--; /* perhaps wrap this in a mutex? */ return NULL; } /* code checked */ static int rtpstream_start_task(rtpstream_callinfo_t* callinfo) { int ready_index; int allocsize; threaddata_t **threadlist; threaddata_t *threaddata; pthread_t newthread; /* safety check... */ if (!callinfo->taskinfo) { return 0; } /* we count on the fact that only one thread can add/remove playback tasks */ /* thus we don't have mutexes to protect the thread list objects. */ for (ready_index = 0; ready_index < num_ready_threads; ready_index++) { /* ready threads have a spare task slot or should have one very shortly */ /* if we find a task with no spare slots, just skip to the next one. */ if (ready_threads[ready_index]->num_tasks < ready_threads[ready_index]->max_tasks) { /* we found a thread with an open task slot. */ break; } } if (ready_index == num_ready_threads) { /* did not find a thread with spare task slots, thus we create one here */ if (num_ready_threads >= ready_threads_max) { /* need to allocate more memory for thread list */ ready_threads_max += RTPSTREAM_THREADBLOCKSIZE; threadlist = (threaddata_t **) realloc(ready_threads, sizeof(*ready_threads) * ready_threads_max); if (!threadlist) { /* could not allocate bigger block... worry [about it later] */ ready_threads_max -= RTPSTREAM_THREADBLOCKSIZE; return 0; } ready_threads = threadlist; } /* create and initialise data structure for new thread */ allocsize = sizeof(*threaddata) + sizeof(threaddata->tasklist) * (rtp_tasks_per_thread - 1); threaddata = (threaddata_t *) malloc(allocsize); if (!threaddata) { return 0; } memset(threaddata, 0, allocsize); threaddata->max_tasks = rtp_tasks_per_thread; threaddata->busy_list_index = -1; pthread_mutex_init(&(threaddata->tasklist_mutex), NULL); /* create the thread itself */ if (pthread_create(&newthread, NULL, rtpstream_playback_thread, threaddata)) { /* error creating the thread */ free(threaddata); return 0; } /* Add thread to list of ready (spare capacity) threads */ ready_threads[num_ready_threads++] = threaddata; } /* now add new task to a spare slot in our thread tasklist */ threaddata = ready_threads[ready_index]; callinfo->taskinfo->parent_thread = threaddata; pthread_mutex_lock(&(threaddata->tasklist_mutex)); (&threaddata->tasklist)[threaddata->num_tasks++] = callinfo->taskinfo; pthread_mutex_unlock(&(threaddata->tasklist_mutex)); /* this check relies on playback thread to decrement num_tasks before */ /* decrementing del_pending -- else we need to lock before this test */ if ((threaddata->del_pending == 0) && (threaddata->num_tasks >= threaddata->max_tasks)) { /* move this thread to the busy list - no free task slots */ /* first check if the busy list is big enough to hold new thread */ if (num_busy_threads >= busy_threads_max) { /* need to allocate more memory for thread list */ busy_threads_max += RTPSTREAM_THREADBLOCKSIZE; threadlist = (threaddata_t **) realloc(busy_threads, sizeof(*busy_threads) * busy_threads_max); if (!threadlist) { /* could not allocate bigger block... leave thread in ready list */ busy_threads_max -= RTPSTREAM_THREADBLOCKSIZE; return 1; /* success, sort of */ } busy_threads = threadlist; } /* add to busy list */ threaddata->busy_list_index = num_busy_threads; busy_threads[num_busy_threads++] = threaddata; /* remove from ready list */ ready_threads[ready_index] = ready_threads[--num_ready_threads]; } return 1; /* done! */ } /* code checked */ static void rtpstream_stop_task(rtpstream_callinfo_t* callinfo) { threaddata_t **threadlist; taskentry_t *taskinfo = callinfo->taskinfo; int busy_index; if (taskinfo) { if (taskinfo->parent_thread) { /* this call's task is registered with an executing thread */ /* first move owning thread to the ready list - will be ready soon */ busy_index = taskinfo->parent_thread->busy_list_index; if (busy_index >= 0) { /* make sure we have enough entries in ready list */ if (num_ready_threads >= ready_threads_max) { /* need to allocate more memory for thread list */ ready_threads_max += RTPSTREAM_THREADBLOCKSIZE; threadlist = (threaddata_t **) realloc(ready_threads, sizeof(*ready_threads) * ready_threads_max); if (!threadlist) { /* could not allocate bigger block... reset max threads */ /* this is a problem - ready thread gets "lost" on busy list */ ready_threads_max -= RTPSTREAM_THREADBLOCKSIZE; } else { ready_threads = threadlist; } } if (num_ready_threads < ready_threads_max) { /* OK, got space on ready list, move to ready list */ busy_threads[busy_index]->busy_list_index = -1; ready_threads[num_ready_threads++] = busy_threads[busy_index]; num_busy_threads--; /* fill up gap in the busy thread list */ if (busy_index != num_busy_threads) { busy_threads[busy_index] = busy_threads[num_busy_threads]; busy_threads[busy_index]->busy_list_index = busy_index; } } } /* then ask the thread to destory this task (and its memory) */ pthread_mutex_lock(&(taskinfo->parent_thread->tasklist_mutex)); taskinfo->parent_thread->del_pending++; taskinfo->flags |= TI_KILLTASK; pthread_mutex_unlock(&(taskinfo->parent_thread->tasklist_mutex)); } else { /* no playback thread owner, just free it */ rtpstream_free_taskinfo(taskinfo); } callinfo->taskinfo = NULL; } } /* code checked */ int rtpstream_new_call(rtpstream_callinfo_t* callinfo) { debugprint("rtpstream_new_call callinfo=%p\n", callinfo); taskentry_t* taskinfo; /* general init */ memset(callinfo, 0, sizeof(*callinfo)); taskinfo= (taskentry_t *) malloc(sizeof(*taskinfo)); if (!taskinfo) { /* cannot allocate taskinfo memory - bubble error up */ return 0; } callinfo->taskinfo = taskinfo; memset(taskinfo, 0, sizeof(*taskinfo)); taskinfo->flags = TI_NULLIP; /* socket descriptors */ taskinfo->audio_rtp_socket = -1; /* rtp stream members */ taskinfo->ssrc_id = global_ssrc_id++; /* pthread mutexes */ pthread_mutex_init(&(callinfo->taskinfo->mutex), NULL); return 1; } /* code checked */ void rtpstream_end_call(rtpstream_callinfo_t* callinfo) { debugprint("rtpstream_end_call callinfo=%p\n", callinfo); /* stop playback thread(s) for this call */ rtpstream_stop_task(callinfo); } /* code checked */ int rtpstream_cache_file(char* filename) { int count = 0; cached_file_t *newcachelist; char *filecontents; struct stat statbuffer; FILE *f; debugprint ("rtpstream_cache_file filename=%s\n", filename); /* cached file entries are stored in a dynamically grown array. */ /* could use a binary (or avl) tree but number of files should */ /* be small and doesn't really justify the effort. */ while (count < num_cached_files) { if (!strcmp(cached_files[count].filename, filename)) { /* found the file already loaded. just return index */ return count; } count++; } /* Allocate memory and load file */ if (stat(filename, &statbuffer)) { /* could not get file information */ return -1; } f = fopen(filename, "rb"); if (!f) { /* could not open file */ return -1; } filecontents = (char *)malloc(statbuffer.st_size); if (!filecontents) { /* could not alloc mem */ return -1; } if (!fread(filecontents, statbuffer.st_size, 1, f)) { /* could not read file */ free(filecontents); return -1; } fclose(f); if (!(num_cached_files % RTPSTREAM_FILESPERBLOCK)) { /* Time to allocate more memory for the next block of files */ newcachelist = (cached_file_t*) realloc(cached_files, sizeof(*cached_files) * (num_cached_files + RTPSTREAM_FILESPERBLOCK)); if (!newcachelist) { /* out of memory */ free(filecontents); return -1; } cached_files = newcachelist; } cached_files[num_cached_files].bytes = filecontents; strncpy(cached_files[num_cached_files].filename, filename, sizeof(cached_files[num_cached_files].filename) - 1); cached_files[num_cached_files].filesize = statbuffer.st_size; return num_cached_files++; } /* code checked */ void rtpstream_set_remote(rtpstream_callinfo_t* callinfo, int ip_ver, const char* ip_addr, int audio_port, int video_port) { struct sockaddr_storage address; struct in_addr *ip4_addr; struct in6_addr *ip6_addr; taskentry_t *taskinfo; unsigned count; int nonzero_ip; /* observe that we rely on ip_ver being in sync with media_ip_is_ipv6 */ /* we never alloc a socket here, we reuse the global media socket */ debugprint("rtpstream_set_remote callinfo=%p, ip_ver %d ip_addr %s audio %d video %d\n", callinfo, ip_ver, ip_addr, audio_port, video_port); taskinfo = callinfo->taskinfo; if (!taskinfo) { /* no task info found - cannot set remote data. just return */ return; } nonzero_ip = 0; taskinfo->flags |= TI_NULLIP; /// TODO: this (may) cause a gap in playback, if playback thread gets to exec while this is set and before new IP is checked. /* test that media ip address version match remote ip address version? */ /* initialise address family and IP address for remote socket */ memset(&address, 0, sizeof(address)); if (media_ip_is_ipv6) { /* process ipv6 address */ address.ss_family = AF_INET6; ip6_addr = &((_RCAST(struct sockaddr_in6 *, &address))->sin6_addr); if (inet_pton(AF_INET6, ip_addr, ip6_addr) == 1) { for (count = 0; count < sizeof(*ip6_addr); count++) { if (((char*)ip6_addr)[count]) { nonzero_ip = 1; break; } } } } else { /* process ipv4 address */ address.ss_family = AF_INET; ip4_addr = &((_RCAST(struct sockaddr_in *, &address))->sin_addr); if (inet_pton(AF_INET, ip_addr, ip4_addr) == 1) { for (count = 0; count < sizeof(*ip4_addr); count++) { if (((char*)ip4_addr)[count]) { nonzero_ip = 1; break; } } } } if (!nonzero_ip) { return; } /* enter critical section to lock address updates */ /* may want to leave this out -- low chance of race condition */ pthread_mutex_lock(&(taskinfo->mutex)); /* clear out existing addresses */ memset(&(taskinfo->remote_audio_rtp_addr), 0, sizeof(taskinfo->remote_audio_rtp_addr)); /* Audio */ if (audio_port) { sockaddr_update_port(&address, audio_port); memcpy(&(taskinfo->remote_audio_rtp_addr), &address, sizeof(address)); taskinfo->flags &= ~TI_NULL_AUDIOIP; } /* ok, we are done with the shared memory objects. let go mutex */ pthread_mutex_unlock (&(taskinfo->mutex)); /* may want to start a playback (listen) task here if no task running? */ /* only makes sense if we decide to send 0-filled packets on idle */ } /* code checked */ void rtpstream_play(rtpstream_callinfo_t* callinfo, rtpstream_actinfo_t* actioninfo) { debugprint("rtpstream_play callinfo=%p filename %s loop %d bytes %d payload %d ptime %d tick %d\n", callinfo, actioninfo->filename, actioninfo->loop_count, actioninfo->bytes_per_packet, actioninfo->payload_type, actioninfo->ms_per_packet, actioninfo->ticks_per_packet); int file_index = rtpstream_cache_file(actioninfo->filename); taskentry_t *taskinfo = callinfo->taskinfo; if (file_index < 0) { return; /* cannot find file to play */ } if (!taskinfo) { return; /* no task data structure */ } /* make sure we have an open socket from which to play the audio file */ taskinfo->audio_rtp_socket = media_socket_audio; /* start playback task if not already started */ if (!taskinfo->parent_thread) { if (!rtpstream_start_task(callinfo)) { /* error starting playback task */ return; } } /* save file parameter in taskinfo structure */ taskinfo->new_loop_count = actioninfo->loop_count; taskinfo->new_bytes_per_packet = actioninfo->bytes_per_packet; taskinfo->new_file_size = cached_files[file_index].filesize; taskinfo->new_file_bytes = cached_files[file_index].bytes; taskinfo->new_ms_per_packet = actioninfo->ms_per_packet; taskinfo->new_timeticks_per_packet = actioninfo->ticks_per_packet; taskinfo->new_payload_type = actioninfo->payload_type; /* set flag that we have a new file to play */ taskinfo->flags |= TI_PLAYFILE; } /* code checked */ void rtpstream_pause(rtpstream_callinfo_t* callinfo) { debugprint("rtpstream_pause callinfo=%p\n", callinfo); if (callinfo->taskinfo) { callinfo->taskinfo->flags |= TI_PAUSERTP; } } /* code checked */ void rtpstream_resume(rtpstream_callinfo_t* callinfo) { debugprint("rtpstream_resume callinfo=%p\n", callinfo); if (callinfo->taskinfo) { callinfo->taskinfo->flags &= ~TI_PAUSERTP; } } /* code checked */ void rtpstream_shutdown(void) { int count = 0; debugprint("rtpstream_shutdown\n"); /* signal all playback threads that they should exit */ if (ready_threads) { for (count = 0; count < num_ready_threads; count++) { ready_threads[count]->exit_flag = 1; } free(ready_threads); ready_threads = NULL; } if (busy_threads) { for (count = 0; count < num_busy_threads; count++) { busy_threads[count]->exit_flag = 1; } free(busy_threads); busy_threads = NULL; } /* first make sure no playback threads are accessing the file buffers */ /* else small chance the playback thread tries to access freed memory */ while (rtpstream_numthreads) { usleep(50000); } /* now free cached file bytes and structure */ for (count = 0; count < num_cached_files; count++) { free(cached_files[count].bytes); } if (cached_files) { free(cached_files); cached_files = NULL; } } sipp-3.6.0/src/xp_parser_ut.cpp0000644000175000017500000001566713475544015016106 0ustar walterwalter/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Walter Doekes - 24 Sep 2014 */ /* This is a separate file because xp_parser.c is a C file, and GTEST * only works with C++ files. */ #include "xp_parser.h" #ifdef GTEST #include "gtest/gtest.h" TEST(xp_parser, set_xml_buffer_from_string__good) { int res; int i; const char *buffers[] = { ("\r\n" "\r\n" "\r\n" "\r\n" " \r\n" "\r\n"), // 1 ("" "" "" "" " " ""), // 2 ("" "" "" " " ""), // 3 ("" "" " " ""), // 4 NULL }; for (i = 0; buffers[i]; ++i) { const char *elem, *prop; res = xp_set_xml_buffer_from_string(buffers[i]); EXPECT_EQ(i + 1, res * (i + 1)); // res == 1 if (!res) continue; elem = xp_open_element(0); EXPECT_STREQ("scenario", elem); prop = xp_get_value("name"); EXPECT_STREQ("Some Scenario", prop); } } TEST(xp_parser, set_xml_buffer_from_string__bad) { int res; int i; const char *buffers[] = { // No " "" "" " " ""), // -1 // Missing ?> ("" "" " " ""), // -2 // Not even a DOCTYPE. ("" " " ""), // -3 NULL }; for (i = 0; buffers[i]; ++i) { const char *elem, *prop; res = xp_set_xml_buffer_from_string(buffers[i]); EXPECT_EQ(-1 - i, (res - 1) * (i + 1)); // res == 0 if (!res) continue; elem = xp_open_element(0); EXPECT_STREQ("scenario", elem); prop = xp_get_value("name"); EXPECT_STREQ("Some Scenario", prop); } } static void xp_traverse_stack() { const char *elem; int i = 0; while ((elem = xp_open_element(i++))) { xp_traverse_stack(); xp_close_element(); } } TEST(xp_parser, detect_unclosed_xml) { int res; int i; const char *buffers[] = { ("\r\n" "\r\n" "\r\n" " \r\n" " \r\n" " \r\n" " \r\n" " \r\n" " \r\n" " \r\n" " \r\n" " \r\n" "\r\n"), /* 0th */ ("\r\n" "\r\n" "\r\n" " \r\n" /* missing slash */ " \r\n" " \r\n" " \r\n" "\r\n"), /* 1st */ ("\r\n" "\r\n" "\r\n" " \r\n" /* with slash */ " \r\n" /* and extra /recv */ " \r\n" " \r\n" " \r\n" "\r\n"), /* 2nd */ NULL }; for (i = 0; buffers[i]; ++i) { const char *elem; res = xp_set_xml_buffer_from_string(buffers[i]); EXPECT_EQ(1, res); elem = xp_open_element(0); EXPECT_STREQ("scenario", elem); xp_traverse_stack(); xp_close_element(); /* scenario */ EXPECT_EQ(!!i, xp_is_invalid()); /* all except 0 are invalid */ } } TEST(xp_unescape, empty) { char buffer[] = ""; char dst[sizeof(buffer)]; xp_unescape(buffer, dst); EXPECT_STREQ("", dst); } TEST(xp_unescape, noop) { char buffer[] = "no escape sequences"; char dst[sizeof(buffer)]; xp_unescape(buffer, dst); EXPECT_STREQ("no escape sequences", dst); } TEST(xp_unescape, begin_and_end) { char buffer[] = "<xml>this && thatthis && that", dst); } TEST(xp_unescape, single_double_quote) { char buffer[] = """; char dst[sizeof(buffer)]; xp_unescape(buffer, dst); EXPECT_STREQ("\"", dst); } TEST(xp_unescape, escaped_escape) { char buffer[] = "&amp;"; char dst[sizeof(buffer)]; xp_unescape(buffer, dst); EXPECT_STREQ("&", dst); } TEST(xp_unescape, unclosed_escape) { char buffer[] = "< & &"; char dst[sizeof(buffer)]; xp_unescape(buffer, dst); EXPECT_STREQ("< & &", dst); } TEST(xp_unescape, late_closed_escape) { char buffer[] = "< & & >"; char dst[sizeof(buffer)]; xp_unescape(buffer, dst); EXPECT_STREQ("< & & >", dst); } TEST(xp_unescape, unknown_escape) { char buffer[] = "<&garbage;>"; char dst[sizeof(buffer)]; xp_unescape(buffer, dst); EXPECT_STREQ("<&garbage;>", dst); } #endif //GTEST sipp-3.6.0/src/md5.c0000644000175000017500000003131413475544015013503 0ustar walterwalter/* * Copyright (C) 1999, 2000, 2002 Aladdin Enterprises. All rights reserved. * * This software is provided 'as-is', without any express or implied * warranty. In no event will the authors be held liable for any damages * arising from the use of this software. * * Permission is granted to anyone to use this software for any purpose, * including commercial applications, and to alter it and redistribute it * freely, subject to the following restrictions: * * 1. The origin of this software must not be misrepresented; you must not * claim that you wrote the original software. If you use this software * in a product, an acknowledgment in the product documentation would be * appreciated but is not required. * 2. Altered source versions must be plainly marked as such, and must not be * misrepresented as being the original software. * 3. This notice may not be removed or altered from any source distribution. * * L. Peter Deutsch * ghost@aladdin.com */ /* $Id: md5.c,v 1.6 2002/04/13 19:20:28 lpd Exp $ */ /* * Independent implementation of MD5 (RFC 1321). * * This code implements the MD5 Algorithm defined in RFC 1321, whose * text is available at * http://www.ietf.org/rfc/rfc1321.txt * The code is derived from the text of the RFC, including the test suite * (section A.5) but excluding the rest of Appendix A. It does not include * any code or documentation that is identified in the RFC as being * copyrighted. * * The original and principal author of md5.c is L. Peter Deutsch * . Other authors are noted in the change history * that follows (in reverse chronological order): * * 2002-04-13 lpd Clarified derivation from RFC 1321; now handles byte order * either statically or dynamically; added missing #include * in library. * 2002-03-11 lpd Corrected argument list for main(), and added int return * type, in test program and T value program. * 2002-02-21 lpd Added missing #include in test program. * 2000-07-03 lpd Patched to eliminate warnings about "constant is * unsigned in ANSI C, signed in traditional"; made test program * self-checking. * 1999-11-04 lpd Edited comments slightly for automatic TOC extraction. * 1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5). * 1999-05-03 lpd Original version. */ #include "md5.h" #include #undef BYTE_ORDER /* 1 = big-endian, -1 = little-endian, 0 = unknown */ #ifdef ARCH_IS_BIG_ENDIAN # define BYTE_ORDER (ARCH_IS_BIG_ENDIAN ? 1 : -1) #else # define BYTE_ORDER 0 #endif #define T_MASK ((md5_word_t)~0) #define T1 /* 0xd76aa478 */ (T_MASK ^ 0x28955b87) #define T2 /* 0xe8c7b756 */ (T_MASK ^ 0x173848a9) #define T3 0x242070db #define T4 /* 0xc1bdceee */ (T_MASK ^ 0x3e423111) #define T5 /* 0xf57c0faf */ (T_MASK ^ 0x0a83f050) #define T6 0x4787c62a #define T7 /* 0xa8304613 */ (T_MASK ^ 0x57cfb9ec) #define T8 /* 0xfd469501 */ (T_MASK ^ 0x02b96afe) #define T9 0x698098d8 #define T10 /* 0x8b44f7af */ (T_MASK ^ 0x74bb0850) #define T11 /* 0xffff5bb1 */ (T_MASK ^ 0x0000a44e) #define T12 /* 0x895cd7be */ (T_MASK ^ 0x76a32841) #define T13 0x6b901122 #define T14 /* 0xfd987193 */ (T_MASK ^ 0x02678e6c) #define T15 /* 0xa679438e */ (T_MASK ^ 0x5986bc71) #define T16 0x49b40821 #define T17 /* 0xf61e2562 */ (T_MASK ^ 0x09e1da9d) #define T18 /* 0xc040b340 */ (T_MASK ^ 0x3fbf4cbf) #define T19 0x265e5a51 #define T20 /* 0xe9b6c7aa */ (T_MASK ^ 0x16493855) #define T21 /* 0xd62f105d */ (T_MASK ^ 0x29d0efa2) #define T22 0x02441453 #define T23 /* 0xd8a1e681 */ (T_MASK ^ 0x275e197e) #define T24 /* 0xe7d3fbc8 */ (T_MASK ^ 0x182c0437) #define T25 0x21e1cde6 #define T26 /* 0xc33707d6 */ (T_MASK ^ 0x3cc8f829) #define T27 /* 0xf4d50d87 */ (T_MASK ^ 0x0b2af278) #define T28 0x455a14ed #define T29 /* 0xa9e3e905 */ (T_MASK ^ 0x561c16fa) #define T30 /* 0xfcefa3f8 */ (T_MASK ^ 0x03105c07) #define T31 0x676f02d9 #define T32 /* 0x8d2a4c8a */ (T_MASK ^ 0x72d5b375) #define T33 /* 0xfffa3942 */ (T_MASK ^ 0x0005c6bd) #define T34 /* 0x8771f681 */ (T_MASK ^ 0x788e097e) #define T35 0x6d9d6122 #define T36 /* 0xfde5380c */ (T_MASK ^ 0x021ac7f3) #define T37 /* 0xa4beea44 */ (T_MASK ^ 0x5b4115bb) #define T38 0x4bdecfa9 #define T39 /* 0xf6bb4b60 */ (T_MASK ^ 0x0944b49f) #define T40 /* 0xbebfbc70 */ (T_MASK ^ 0x4140438f) #define T41 0x289b7ec6 #define T42 /* 0xeaa127fa */ (T_MASK ^ 0x155ed805) #define T43 /* 0xd4ef3085 */ (T_MASK ^ 0x2b10cf7a) #define T44 0x04881d05 #define T45 /* 0xd9d4d039 */ (T_MASK ^ 0x262b2fc6) #define T46 /* 0xe6db99e5 */ (T_MASK ^ 0x1924661a) #define T47 0x1fa27cf8 #define T48 /* 0xc4ac5665 */ (T_MASK ^ 0x3b53a99a) #define T49 /* 0xf4292244 */ (T_MASK ^ 0x0bd6ddbb) #define T50 0x432aff97 #define T51 /* 0xab9423a7 */ (T_MASK ^ 0x546bdc58) #define T52 /* 0xfc93a039 */ (T_MASK ^ 0x036c5fc6) #define T53 0x655b59c3 #define T54 /* 0x8f0ccc92 */ (T_MASK ^ 0x70f3336d) #define T55 /* 0xffeff47d */ (T_MASK ^ 0x00100b82) #define T56 /* 0x85845dd1 */ (T_MASK ^ 0x7a7ba22e) #define T57 0x6fa87e4f #define T58 /* 0xfe2ce6e0 */ (T_MASK ^ 0x01d3191f) #define T59 /* 0xa3014314 */ (T_MASK ^ 0x5cfebceb) #define T60 0x4e0811a1 #define T61 /* 0xf7537e82 */ (T_MASK ^ 0x08ac817d) #define T62 /* 0xbd3af235 */ (T_MASK ^ 0x42c50dca) #define T63 0x2ad7d2bb #define T64 /* 0xeb86d391 */ (T_MASK ^ 0x14792c6e) static void md5_process(md5_state_t *pms, const md5_byte_t *data /*[64]*/) { md5_word_t a = pms->abcd[0], b = pms->abcd[1], c = pms->abcd[2], d = pms->abcd[3]; md5_word_t t; #if BYTE_ORDER > 0 /* Define storage only for big-endian CPUs. */ md5_word_t X[16]; #else /* Define storage for little-endian or both types of CPUs. */ md5_word_t xbuf[16]; const md5_word_t *X; #endif { #if BYTE_ORDER == 0 /* * Determine dynamically whether this is a big-endian or * little-endian machine, since we can use a more efficient * algorithm on the latter. */ static const int w = 1; if (*((const md5_byte_t *)&w)) /* dynamic little-endian */ #endif #if BYTE_ORDER <= 0 /* little-endian */ { /* * On little-endian machines, we can process properly aligned * data without copying it. */ if (!((data - (const md5_byte_t *)0) & 3)) { /* data are properly aligned */ X = (const md5_word_t *)data; } else { /* not aligned */ memcpy(xbuf, data, 64); X = xbuf; } } #endif #if BYTE_ORDER == 0 else /* dynamic big-endian */ #endif #if BYTE_ORDER >= 0 /* big-endian */ { /* * On big-endian machines, we must arrange the bytes in the * right order. */ const md5_byte_t *xp = data; int i; # if BYTE_ORDER == 0 X = xbuf; /* (dynamic only) */ # else # define xbuf X /* (static only) */ # endif for (i = 0; i < 16; ++i, xp += 4) xbuf[i] = xp[0] + (xp[1] << 8) + (xp[2] << 16) + (xp[3] << 24); } #endif } #define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32 - (n)))) /* Round 1. */ /* Let [abcd k s i] denote the operation a = b + ((a + F(b,c,d) + X[k] + T[i]) <<< s). */ #define F(x, y, z) (((x) & (y)) | (~(x) & (z))) #define SET(a, b, c, d, k, s, Ti) \ t = a + F(b,c,d) + X[k] + Ti; \ a = ROTATE_LEFT(t, s) + b /* Do the following 16 operations. */ SET(a, b, c, d, 0, 7, T1); SET(d, a, b, c, 1, 12, T2); SET(c, d, a, b, 2, 17, T3); SET(b, c, d, a, 3, 22, T4); SET(a, b, c, d, 4, 7, T5); SET(d, a, b, c, 5, 12, T6); SET(c, d, a, b, 6, 17, T7); SET(b, c, d, a, 7, 22, T8); SET(a, b, c, d, 8, 7, T9); SET(d, a, b, c, 9, 12, T10); SET(c, d, a, b, 10, 17, T11); SET(b, c, d, a, 11, 22, T12); SET(a, b, c, d, 12, 7, T13); SET(d, a, b, c, 13, 12, T14); SET(c, d, a, b, 14, 17, T15); SET(b, c, d, a, 15, 22, T16); #undef SET /* Round 2. */ /* Let [abcd k s i] denote the operation a = b + ((a + G(b,c,d) + X[k] + T[i]) <<< s). */ #define G(x, y, z) (((x) & (z)) | ((y) & ~(z))) #define SET(a, b, c, d, k, s, Ti) \ t = a + G(b,c,d) + X[k] + Ti; \ a = ROTATE_LEFT(t, s) + b /* Do the following 16 operations. */ SET(a, b, c, d, 1, 5, T17); SET(d, a, b, c, 6, 9, T18); SET(c, d, a, b, 11, 14, T19); SET(b, c, d, a, 0, 20, T20); SET(a, b, c, d, 5, 5, T21); SET(d, a, b, c, 10, 9, T22); SET(c, d, a, b, 15, 14, T23); SET(b, c, d, a, 4, 20, T24); SET(a, b, c, d, 9, 5, T25); SET(d, a, b, c, 14, 9, T26); SET(c, d, a, b, 3, 14, T27); SET(b, c, d, a, 8, 20, T28); SET(a, b, c, d, 13, 5, T29); SET(d, a, b, c, 2, 9, T30); SET(c, d, a, b, 7, 14, T31); SET(b, c, d, a, 12, 20, T32); #undef SET /* Round 3. */ /* Let [abcd k s t] denote the operation a = b + ((a + H(b,c,d) + X[k] + T[i]) <<< s). */ #define H(x, y, z) ((x) ^ (y) ^ (z)) #define SET(a, b, c, d, k, s, Ti) \ t = a + H(b,c,d) + X[k] + Ti; \ a = ROTATE_LEFT(t, s) + b /* Do the following 16 operations. */ SET(a, b, c, d, 5, 4, T33); SET(d, a, b, c, 8, 11, T34); SET(c, d, a, b, 11, 16, T35); SET(b, c, d, a, 14, 23, T36); SET(a, b, c, d, 1, 4, T37); SET(d, a, b, c, 4, 11, T38); SET(c, d, a, b, 7, 16, T39); SET(b, c, d, a, 10, 23, T40); SET(a, b, c, d, 13, 4, T41); SET(d, a, b, c, 0, 11, T42); SET(c, d, a, b, 3, 16, T43); SET(b, c, d, a, 6, 23, T44); SET(a, b, c, d, 9, 4, T45); SET(d, a, b, c, 12, 11, T46); SET(c, d, a, b, 15, 16, T47); SET(b, c, d, a, 2, 23, T48); #undef SET /* Round 4. */ /* Let [abcd k s t] denote the operation a = b + ((a + I(b,c,d) + X[k] + T[i]) <<< s). */ #define I(x, y, z) ((y) ^ ((x) | ~(z))) #define SET(a, b, c, d, k, s, Ti) \ t = a + I(b,c,d) + X[k] + Ti; \ a = ROTATE_LEFT(t, s) + b /* Do the following 16 operations. */ SET(a, b, c, d, 0, 6, T49); SET(d, a, b, c, 7, 10, T50); SET(c, d, a, b, 14, 15, T51); SET(b, c, d, a, 5, 21, T52); SET(a, b, c, d, 12, 6, T53); SET(d, a, b, c, 3, 10, T54); SET(c, d, a, b, 10, 15, T55); SET(b, c, d, a, 1, 21, T56); SET(a, b, c, d, 8, 6, T57); SET(d, a, b, c, 15, 10, T58); SET(c, d, a, b, 6, 15, T59); SET(b, c, d, a, 13, 21, T60); SET(a, b, c, d, 4, 6, T61); SET(d, a, b, c, 11, 10, T62); SET(c, d, a, b, 2, 15, T63); SET(b, c, d, a, 9, 21, T64); #undef SET /* Then perform the following additions. (That is increment each of the four registers by the value it had before this block was started.) */ pms->abcd[0] += a; pms->abcd[1] += b; pms->abcd[2] += c; pms->abcd[3] += d; } void md5_init(md5_state_t *pms) { pms->count[0] = pms->count[1] = 0; pms->abcd[0] = 0x67452301; pms->abcd[1] = /*0xefcdab89*/ T_MASK ^ 0x10325476; pms->abcd[2] = /*0x98badcfe*/ T_MASK ^ 0x67452301; pms->abcd[3] = 0x10325476; } void md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes) { const md5_byte_t *p = data; int left = nbytes; int offset = (pms->count[0] >> 3) & 63; md5_word_t nbits = (md5_word_t)(nbytes << 3); if (nbytes <= 0) return; /* Update the message length. */ pms->count[1] += nbytes >> 29; pms->count[0] += nbits; if (pms->count[0] < nbits) pms->count[1]++; /* Process an initial partial block. */ if (offset) { int copy = (offset + nbytes > 64 ? 64 - offset : nbytes); memcpy(pms->buf + offset, p, copy); if (offset + copy < 64) return; p += copy; left -= copy; md5_process(pms, pms->buf); } /* Process full blocks. */ for (; left >= 64; p += 64, left -= 64) md5_process(pms, p); /* Process a final partial block. */ if (left) memcpy(pms->buf, p, left); } void md5_finish(md5_state_t *pms, md5_byte_t digest[16]) { static const md5_byte_t pad[64] = { 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; md5_byte_t data[8]; int i; /* Save the length before padding. */ for (i = 0; i < 8; ++i) data[i] = (md5_byte_t)(pms->count[i >> 2] >> ((i & 3) << 3)); /* Pad to 56 bytes mod 64. */ md5_append(pms, pad, ((55 - (pms->count[0] >> 3)) & 63) + 1); /* Append the length. */ md5_append(pms, data, 8); for (i = 0; i < 16; ++i) digest[i] = (md5_byte_t)(pms->abcd[i >> 2] >> ((i & 3) << 3)); } sipp-3.6.0/src/auth.cpp0000644000175000017500000006247213475544015014330 0ustar walterwalter/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : F. Tarek Rogers - 01 Sept 2004 * Russell Roy * Wolfgang Beck * Dragos Vingarzan - 02 February 2006 vingarzan@gmail.com * - split in the auth architecture * - introduced AKAv1-MD5 * Frederique Aurouet */ #if defined( __FreeBSD__) || defined(__DARWIN) || defined(__SUNOS) #include #endif #include #include #include #include #include "md5.h" #include "milenage.h" #include "screen.hpp" #include "logger.hpp" #include "auth.hpp" #define MAX_HEADER_LEN 2049 #define MD5_HASH_SIZE 16 #define HASH_HEX_SIZE 2*MD5_HASH_SIZE /* AKA */ #define KLEN 16 typedef u_char K[KLEN]; #define RANDLEN 16 typedef u_char RAND[RANDLEN]; #define AUTNLEN 16 typedef u_char AUTN[AUTNLEN]; #define AKLEN 6 typedef u_char AK[AKLEN]; #define AMFLEN 2 typedef u_char AMF[AMFLEN]; #define MACLEN 8 typedef u_char MAC[MACLEN]; #define CKLEN 16 typedef u_char CK[CKLEN]; #define IKLEN 16 typedef u_char IK[IKLEN]; #define SQNLEN 6 typedef u_char SQN[SQNLEN]; #define AUTSLEN 14 typedef char AUTS[AUTSLEN]; #define AUTS64LEN 29 typedef char AUTS64[AUTS64LEN]; #define RESLEN 8 typedef unsigned char RES[RESLEN+1]; #define RESHEXLEN 17 typedef char RESHEX[RESHEXLEN]; #define OPLEN 16 typedef u_char OP[OPLEN]; AMF amfstar="\0"; SQN sqn_he= {0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; /* end AKA */ int createAuthHeaderMD5(const char *user, const char *password, int password_len, const char *method, const char *uri, const char *msgbody, const char *auth, const char *algo, char *result); int createAuthHeaderAKAv1MD5(const char *user, const char *OP, const char *AMF, const char *K, const char *method, const char *uri, const char *msgbody, const char *auth, const char *algo, char * result); /* This function is from RFC 2617 Section 5 */ static void hashToHex(md5_byte_t* _b_raw, unsigned char* _h) { unsigned short i; unsigned char j; unsigned char *_b = (unsigned char *) _b_raw; for (i = 0; i < MD5_HASH_SIZE; i++) { j = (_b[i] >> 4) & 0xf; if (j <= 9) { _h[i * 2] = (j + '0'); } else { _h[i * 2] = (j + 'a' - 10); } j = _b[i] & 0xf; if (j <= 9) { _h[i * 2 + 1] = (j + '0'); } else { _h[i * 2 + 1] = (j + 'a' - 10); } }; _h[HASH_HEX_SIZE] = '\0'; } static char *stristr(const char* s1, const char* s2) { char *cp = (char*) s1; char *p1, *p2, *endp; char l, r; endp = (char*)s1 + (strlen(s1) - strlen(s2)) ; while (*cp && (cp <= endp)) { p1 = cp; p2 = (char*)s2; while (*p1 && *p2) { l = toupper(*p1); r = toupper(*p2); if (l != r) { break; } p1++; p2++; } if (*p2 == 0) { return cp; } cp++; } return 0; } int createAuthHeader(const char *user, const char *password, const char *method, const char *uri, const char *msgbody, const char *auth, const char *aka_OP, const char *aka_AMF, const char *aka_K, char *result) { char algo[32]="MD5"; char *start, *end; if ((start = stristr(auth, "Digest")) == NULL) { sprintf(result, "createAuthHeader: authentication must be digest"); return 0; } if ((start = stristr(auth, "algorithm=")) != NULL) { start = start + strlen("algorithm="); if (*start == '"') { start++; } end = start + strcspn(start, " ,\"\r\n"); strncpy(algo, start, end - start); algo[end - start] ='\0'; } if (strncasecmp(algo, "MD5", 3)==0) { return createAuthHeaderMD5(user, password, strlen(password), method, uri, msgbody, auth, algo, result); } else if (strncasecmp(algo, "AKAv1-MD5", 9)==0) { if (!aka_K) { sprintf(result, "createAuthHeader: AKAv1-MD5 authentication requires a key"); return 0; } return createAuthHeaderAKAv1MD5(user, aka_OP, aka_AMF, aka_K, method, uri, msgbody, auth, algo, result); } else { sprintf(result, "createAuthHeader: authentication must use MD5 or AKAv1-MD5"); return 0; } } int getAuthParameter(const char *name, const char *header, char *result, int len) { char *start, *end; start = stristr(header, name); while (start) { // Ensure that the preceding character is "," or whitespace - this // stops us finding "cnonce" when we search for "nonce". char preceding_char = start[-1]; if ((preceding_char == ',') || isspace(preceding_char)) { break; } start = stristr(start+1, name); } if (!start) { result[0] = '\0'; return 0; } start += strlen(name); if (*start++ != '=') { return getAuthParameter(name, start, result, len); } if (*start == '"') { start++; end = start; while (*end != '"' && *end) { end++; } } else { end = start + strcspn(start, " ,\"\r\n"); } if (end - start >= len) { strncpy(result, start, len - 1); result[len - 1] = '\0'; } else { strncpy(result, start, end - start); result[end - start] = '\0'; } return end - start; } static int createAuthResponseMD5(const char* user, const char* password, int password_len, const char* method, const char* uri, const char* authtype, const char* msgbody, const char* realm, const char* nonce, const char* cnonce, const char* nc, unsigned char* result) { md5_byte_t ha1[MD5_HASH_SIZE], ha2[MD5_HASH_SIZE]; md5_byte_t resp[MD5_HASH_SIZE], body[MD5_HASH_SIZE]; unsigned char body_hex[HASH_HEX_SIZE+1]; unsigned char ha1_hex[HASH_HEX_SIZE+1], ha2_hex[HASH_HEX_SIZE+1]; char tmp[MAX_HEADER_LEN]; md5_state_t Md5Ctx; // Load in A1 md5_init(&Md5Ctx); md5_append(&Md5Ctx, (md5_byte_t *) user, strlen(user)); md5_append(&Md5Ctx, (md5_byte_t *) ":", 1); md5_append(&Md5Ctx, (md5_byte_t *) realm, strlen(realm)); md5_append(&Md5Ctx, (md5_byte_t *) ":", 1); md5_append(&Md5Ctx, (md5_byte_t *) password, password_len); md5_finish(&Md5Ctx, ha1); hashToHex(&ha1[0], &ha1_hex[0]); if (auth_uri) { sprintf(tmp, "sip:%s", auth_uri); } else { strncpy(tmp, uri, sizeof(tmp) - 1); } // If using Auth-Int make a hash of the body - which is NULL for REG if (stristr(authtype, "auth-int") != NULL) { md5_init(&Md5Ctx); md5_append(&Md5Ctx, (md5_byte_t *) msgbody, strlen(msgbody)); md5_finish(&Md5Ctx, body); hashToHex(&body[0], &body_hex[0]); } // Load in A2 md5_init(&Md5Ctx); md5_append(&Md5Ctx, (md5_byte_t *) method, strlen(method)); md5_append(&Md5Ctx, (md5_byte_t *) ":", 1); md5_append(&Md5Ctx, (md5_byte_t *) tmp, strlen(tmp)); if (stristr(authtype, "auth-int") != NULL) { md5_append(&Md5Ctx, (md5_byte_t *) ":", 1); md5_append(&Md5Ctx, (md5_byte_t *) &body_hex, HASH_HEX_SIZE); } md5_finish(&Md5Ctx, ha2); hashToHex(&ha2[0], &ha2_hex[0]); md5_init(&Md5Ctx); md5_append(&Md5Ctx, (md5_byte_t *) &ha1_hex, HASH_HEX_SIZE); md5_append(&Md5Ctx, (md5_byte_t *) ":", 1); md5_append(&Md5Ctx, (md5_byte_t *) nonce, strlen(nonce)); if (cnonce[0] != '\0') { md5_append(&Md5Ctx, (md5_byte_t *) ":", 1); md5_append(&Md5Ctx, (md5_byte_t *) nc, strlen(nc)); md5_append(&Md5Ctx, (md5_byte_t *) ":", 1); md5_append(&Md5Ctx, (md5_byte_t *) cnonce, strlen(cnonce)); md5_append(&Md5Ctx, (md5_byte_t *) ":", 1); md5_append(&Md5Ctx, (md5_byte_t *) authtype, strlen(authtype)); } md5_append(&Md5Ctx, (md5_byte_t *) ":", 1); md5_append(&Md5Ctx, (md5_byte_t *) &ha2_hex, HASH_HEX_SIZE); md5_finish(&Md5Ctx, resp); hashToHex(&resp[0], result); return 1; } int createAuthHeaderMD5(const char *user, const char *password, int password_len, const char *method, const char *uri, const char *msgbody, const char *auth, const char *algo, char *result) { unsigned char resp_hex[HASH_HEX_SIZE+1]; char tmp[MAX_HEADER_LEN], tmp2[MAX_HEADER_LEN], realm[MAX_HEADER_LEN], sipuri[MAX_HEADER_LEN], nonce[MAX_HEADER_LEN], authtype[16], cnonce[32], nc[32], opaque[64]; static unsigned int mync = 1; int has_opaque = 0; // Extract the Auth Type - If not present, using 'none' cnonce[0] = '\0'; if (getAuthParameter("qop", auth, authtype, sizeof(authtype))) { // Sloppy auth type recognition (may be "auth,auth-int") if (stristr(authtype, "auth-int")) { strncpy(authtype, "auth-int", sizeof(authtype) - 1); } else if (stristr(authtype, "auth")) { strncpy(authtype, "auth", sizeof(authtype) - 1); } sprintf(cnonce, "%x", rand()); sprintf(nc, "%08x", mync); } // Extract the Opaque value - if present if (getAuthParameter("opaque", auth, opaque, sizeof(opaque))) { has_opaque = 1; } // Extract the Realm if (!getAuthParameter("realm", auth, realm, sizeof(realm))) { sprintf(result, "createAuthHeaderMD5: couldn't parse realm in '%s'", auth); return 0; } sprintf(result, "Digest username=\"%s\",realm=\"%s\"", user, realm); // Construct the URI if (auth_uri == NULL) { sprintf(sipuri, "sip:%s", uri); } else { sprintf(sipuri, "sip:%s", auth_uri); } if (cnonce[0] != '\0') { // No double quotes around nc and qop (RFC3261): // // dig-resp = username / realm / nonce / digest-uri / dresponse // / algorithm / cnonce / opaque / message-qop // message-qop = "qop" EQUAL ("auth" / "auth-int" / token) // nonce-count = "nc" EQUAL 8LHEX // // The digest challenge does have double quotes however: // // digest-cln = realm / domain / nonce / opaque / stale / algorithm // / qop-options / auth-param // qop-options = "qop" EQUAL LDQUOT qop-value *("," qop-value) RDQUOT snprintf(tmp, sizeof(tmp), ",cnonce=\"%s\",nc=%s,qop=%s", cnonce, nc, authtype); strcat(result, tmp); } snprintf(tmp, sizeof(tmp), ",uri=\"%s\"", sipuri); strcat(result, tmp); // Extract the Nonce if (!getAuthParameter("nonce", auth, nonce, sizeof(nonce))) { sprintf(result, "createAuthHeader: couldn't parse nonce"); return 0; } createAuthResponseMD5(user, password, strlen(password), method, sipuri, authtype, msgbody, realm, nonce, cnonce, nc, &resp_hex[0]); snprintf(tmp2, sizeof(tmp2), ",nonce=\"%s\",response=\"%s\",algorithm=%s", nonce, resp_hex, algo); strcat(result, tmp2); if (has_opaque) { snprintf(tmp2, sizeof(tmp2), ",opaque=\"%s\"", opaque); strcat(result, tmp2); } return 1; } int verifyAuthHeader(const char *user, const char *password, const char *method, const char *auth, const char *msgbody) { char algo[MAX_HEADER_LEN]; unsigned char result[HASH_HEX_SIZE + 1]; char response[HASH_HEX_SIZE + 1]; char realm[MAX_HEADER_LEN]; char nonce[MAX_HEADER_LEN]; char cnonce[MAX_HEADER_LEN]; char authtype[MAX_HEADER_LEN]; char nc[MAX_HEADER_LEN]; char uri[MAX_HEADER_LEN]; char *start; if ((start = stristr(auth, "Digest")) == NULL) { WARNING("verifyAuthHeader: authentication must be digest is %s", auth); return 0; } getAuthParameter("algorithm", auth, algo, sizeof(algo)); if (algo[0] == '\0') { strcpy(algo, "MD5"); } if (strncasecmp(algo, "MD5", 3)==0) { getAuthParameter("realm", auth, realm, sizeof(realm)); getAuthParameter("uri", auth, uri, sizeof(uri)); getAuthParameter("nonce", auth, nonce, sizeof(nonce)); getAuthParameter("cnonce", auth, cnonce, sizeof(cnonce)); getAuthParameter("nc", auth, nc, sizeof(nc)); getAuthParameter("qop", auth, authtype, sizeof(authtype)); createAuthResponseMD5(user, password, strlen(password), method, uri, authtype, msgbody, realm, nonce, cnonce, nc, result); getAuthParameter("response", auth, response, sizeof(response)); TRACE_CALLDEBUG("Processing verifyauth command - user %s, password %s, method %s, uri %s, realm %s, nonce %s, result expected %s, response from user %s\n", user, password, method, uri, realm, nonce, (char*)result, response); return !strcmp((char *)result, response); } else { WARNING("createAuthHeader: authentication must use MD5 or AKAv1-MD5, value is '%s'", algo); return 0; } } /*" ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";*/ static int base64_val(char x) { switch(x) { case '=': return -1; case 'A': return 0; case 'B': return 1; case 'C': return 2; case 'D': return 3; case 'E': return 4; case 'F': return 5; case 'G': return 6; case 'H': return 7; case 'I': return 8; case 'J': return 9; case 'K': return 10; case 'L': return 11; case 'M': return 12; case 'N': return 13; case 'O': return 14; case 'P': return 15; case 'Q': return 16; case 'R': return 17; case 'S': return 18; case 'T': return 19; case 'U': return 20; case 'V': return 21; case 'W': return 22; case 'X': return 23; case 'Y': return 24; case 'Z': return 25; case 'a': return 26; case 'b': return 27; case 'c': return 28; case 'd': return 29; case 'e': return 30; case 'f': return 31; case 'g': return 32; case 'h': return 33; case 'i': return 34; case 'j': return 35; case 'k': return 36; case 'l': return 37; case 'm': return 38; case 'n': return 39; case 'o': return 40; case 'p': return 41; case 'q': return 42; case 'r': return 43; case 's': return 44; case 't': return 45; case 'u': return 46; case 'v': return 47; case 'w': return 48; case 'x': return 49; case 'y': return 50; case 'z': return 51; case '0': return 52; case '1': return 53; case '2': return 54; case '3': return 55; case '4': return 56; case '5': return 57; case '6': return 58; case '7': return 59; case '8': return 60; case '9': return 61; case '+': return 62; case '/': return 63; } return 0; } static char* base64_decode_string(const char* buf, unsigned int len, int* newlen) { unsigned long i; int j, x1, x2, x3, x4; char *out; out = (char *)malloc( ( len * 3/4 ) + 8 ); for(i=0, j=0; i + 3 < len; i += 4) { x1=base64_val(buf[i]); x2=base64_val(buf[i+1]); x3=base64_val(buf[i+2]); x4=base64_val(buf[i+3]); out[j++]=(x1<<2) | ((x2 & 0x30)>>4); out[j++]=((x2 & 0x0F)<<4) | ((x3 & 0x3C)>>2); out[j++]=((x3 & 0x03)<<6) | (x4 & 0x3F); } if (i>4); if (x3==-1) { out[j++]=((x2 & 0x0F)<<4) | ((x3 & 0x3C)>>2); if (x4==-1) { out[j++]=((x3 & 0x03)<<6) | (x4 & 0x3F); } } } } out[j++] = 0; *newlen=j; return out; } char base64[65]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; char hexa[17]="0123456789abcdef"; int createAuthHeaderAKAv1MD5(const char *user, const char *aka_OP, const char *aka_AMF, const char *aka_K, const char *method, const char *uri, const char *msgbody, const char *auth, const char *algo, char *result) { char tmp[MAX_HEADER_LEN]; char *start, *end; int has_auts = 0, resuf = 1; char *nonce64, *nonce; int noncelen; AMF amf; OP op; RAND rnd; AUTS auts_bin; AUTS64 auts_hex; MAC mac, xmac; SQN sqn, sqnxoraka, sqn_ms; K k; RES res; CK ck; IK ik; AK ak; int i; // Extract the Nonce if ((start = stristr(auth, "nonce=")) == NULL) { sprintf(result, "createAuthHeaderAKAv1MD5: couldn't parse nonce"); return 0; } start = start + strlen("nonce="); if (*start == '"') { start++; } end = start + strcspn(start, " ,\"\r\n"); strncpy(tmp, start, end - start); tmp[end - start] ='\0'; /* Compute the AKA RES */ nonce64 = tmp; nonce = base64_decode_string(nonce64, end-start, &noncelen); if (noncelen < RANDLEN + AUTNLEN) { sprintf(result, "createAuthHeaderAKAv1MD5 : Nonce is too short %d < %d expected \n", noncelen, RANDLEN + AUTNLEN); if (nonce) free(nonce); return 0; } memcpy(rnd, nonce, RANDLEN); memcpy(sqnxoraka, nonce + RANDLEN, SQNLEN); memcpy(mac, nonce + RANDLEN + SQNLEN + AMFLEN, MACLEN); memcpy(k, aka_K, KLEN); memcpy(amf, aka_AMF, AMFLEN); memcpy(op, aka_OP, OPLEN); /* Compute the AK, response and keys CK IK */ f2345(k, rnd, res, ck, ik, ak, op); res[RESLEN] = '\0'; /* Compute sqn encoded in AUTN */ for (i=0; i < SQNLEN; i++) sqn[i] = sqnxoraka[i] ^ ak[i]; /* compute XMAC */ f1(k, rnd, sqn, (unsigned char *) aka_AMF, xmac, op); if (memcmp(mac, xmac, MACLEN) != 0) { free(nonce); sprintf(result, "createAuthHeaderAKAv1MD5 : MAC != eXpectedMAC -> Server might not know the secret (man-in-the-middle attack?) \n"); return 0; } /* Check SQN, compute AUTS if needed and authorization parameter */ /* the condition below is wrong. * Should trigger synchronization when sqn_ms>>3!=sqn_he>>3 for example. * Also, we need to store the SQN per user or put it as auth parameter. */ if (1/*sqn[5] > sqn_he[5]*/) { sqn_he[5] = sqn[5]; has_auts = 0; /* RES has to be used as password to compute response */ resuf = createAuthHeaderMD5(user, (char *) res, RESLEN, method, uri, msgbody, auth, algo, result); if (resuf == 0) { sprintf(result, "createAuthHeaderAKAv1MD5 : Unexpected return value from createAuthHeaderMD5\n"); free(nonce); return 0; } } else { sqn_ms[5] = sqn_he[5] + 1; f5star(k, rnd, ak, op); for(i=0; i>4]; auts_hex[2*i+1]=hexa[auts_bin[i]&0x0F]; } auts_hex[AUTS64LEN-1]=0; sprintf(tmp, "%s,auts=\"%s\"", result, auts_hex); strcat(result, tmp); } free(nonce); return 1; } #ifdef GTEST #include "gtest/gtest.h" TEST(DigestAuth, nonce) { char nonce[40]; getAuthParameter("nonce", " Authorization: Digest cnonce=\"c7e1249f\",nonce=\"a6ca2bf13de1433183f7c48781bd9304\"", nonce, sizeof(nonce)); EXPECT_STREQ("a6ca2bf13de1433183f7c48781bd9304", nonce); getAuthParameter("nonce", " Authorization: Digest nonce=\"a6ca2bf13de1433183f7c48781bd9304\", cnonce=\"c7e1249f\"", nonce, sizeof(nonce)); EXPECT_STREQ("a6ca2bf13de1433183f7c48781bd9304", nonce); } TEST(DigestAuth, cnonce) { char cnonce[10]; getAuthParameter("cnonce", " Authorization: Digest cnonce=\"c7e1249f\",nonce=\"a6ca2bf13de1433183f7c48781bd9304\"", cnonce, sizeof(cnonce)); EXPECT_STREQ("c7e1249f", cnonce); getAuthParameter("cnonce", " Authorization: Digest nonce=\"a6ca2bf13de1433183f7c48781bd9304\", cnonce=\"c7e1249f\"", cnonce, sizeof(cnonce)); EXPECT_STREQ("c7e1249f", cnonce); } TEST(DigestAuth, MissingParameter) { char cnonce[10]; getAuthParameter("cnonce", " Authorization: Digest nonce=\"a6ca2bf13de1433183f7c48781bd9304\"", cnonce, sizeof(cnonce)); EXPECT_EQ('\0', cnonce[0]); } TEST(DigestAuth, BasicVerification) { char* header = strdup(("Digest \r\n" " realm=\"testrealm@host.com\",\r\n" " nonce=\"dcd98b7102dd2f0e8b11d0f600bfb0c093\"\r\n," " opaque=\"5ccc069c403ebaf9f0171e9517f40e41\"")); char result[255]; createAuthHeader("testuser", "secret", "REGISTER", "sip:example.com", "hello world", header, NULL, NULL, NULL, result); EXPECT_STREQ("Digest username=\"testuser\",realm=\"testrealm@host.com\",uri=\"sip:sip:example.com\",nonce=\"dcd98b7102dd2f0e8b11d0f600bfb0c093\",response=\"db94e01e92f2b09a52a234eeca8b90f7\",algorithm=MD5,opaque=\"5ccc069c403ebaf9f0171e9517f40e41\"", result); EXPECT_EQ(1, verifyAuthHeader("testuser", "secret", "REGISTER", result, "hello world")); free(header); } TEST(DigestAuth, qop) { char result[1024]; char* header = strdup(("Digest \r\n" "\trealm=\"testrealm@host.com\",\r\n" "\tqop=\"auth,auth-int\",\r\n" "\tnonce=\"dcd98b7102dd2f0e8b11d0f600bfb0c093\"\r\n," "\topaque=\"5ccc069c403ebaf9f0171e9517f40e41\"")); createAuthHeader("testuser", "secret", "REGISTER", "sip:example.com", "hello world", header, NULL, NULL, NULL, result); EXPECT_EQ(1, !!strstr(result, ",qop=auth-int,")); // no double quotes around qop-value EXPECT_EQ(1, verifyAuthHeader("testuser", "secret", "REGISTER", result, "hello world")); free(header); } #endif //GTEST sipp-3.6.0/src/variables.cpp0000644000175000017500000002150513475544015015327 0ustar walterwalter/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Authors : Benjamin GAUTHIER - 24 Mar 2004 * Joseph BANINO * Olivier JACQUES * Richard GAYRAUD * From Hewlett Packard Company. * */ #include "sipp.hpp" /* __________________________________________________________________________ C L A S S C C a l l V a r i a b l e __________________________________________________________________________ */ bool CCallVariable::isSet() { if (M_type == E_VT_REGEXP) { if(M_nbOfMatchingValue >= 1) return(true); else return(false); } else if (M_type == E_VT_BOOL) { return M_bool; } else if (M_type == E_VT_DOUBLE) { return M_double; } return (M_type != E_VT_UNDEFINED); } bool CCallVariable::isDouble() { return (M_type == E_VT_DOUBLE); } bool CCallVariable::isBool() { return (M_type == E_VT_BOOL); } bool CCallVariable::isRegExp() { return (M_type == E_VT_REGEXP); } bool CCallVariable::isString() { return (M_type == E_VT_STRING); } // WARNING : setMatchingValue does't allocate the memory for the matching value // but the destructor free the memory void CCallVariable::setMatchingValue(char* P_matchingVal) { M_type = E_VT_REGEXP; if(M_matchingValue != NULL) { delete [] M_matchingValue; } M_matchingValue = P_matchingVal; M_nbOfMatchingValue++; } char* CCallVariable::getMatchingValue() { if (M_type != E_VT_REGEXP) { return NULL; } return(M_matchingValue); } void CCallVariable::setDouble(double val) { M_type = E_VT_DOUBLE; M_double = val; } double CCallVariable::getDouble() { if (M_type != E_VT_DOUBLE) { return 0.0; } return(M_double); } void CCallVariable::setString(char *P_val) { M_type = E_VT_STRING; free(M_stringValue); M_stringValue = P_val; } char *CCallVariable::getString() { if (M_type == E_VT_STRING) { return(M_stringValue); } else if (M_type == E_VT_REGEXP && M_matchingValue) { return(M_matchingValue); } else { return const_cast(""); /* BUG BUT NOT SO SERIOUS */ } } /* Convert this variable to a double. Returns true on success, false on failure. */ bool CCallVariable::toDouble(double *newValue) { char *p; switch(M_type) { case E_VT_REGEXP: if(M_nbOfMatchingValue < 1) { return false; } *newValue = strtod(M_matchingValue, &p); if (*p) { return false; } break; case E_VT_STRING: *newValue = strtod(M_stringValue, &p); if (*p) { return false; } break; case E_VT_DOUBLE: *newValue = getDouble(); break; case E_VT_BOOL: *newValue = (double)getBool(); break; default: return false; } return true; } void CCallVariable::setBool(bool val) { M_type = E_VT_BOOL; M_bool = val; } bool CCallVariable::getBool() { if (M_type != E_VT_BOOL) { return false; } return(M_bool); } // Constuctor and destructor CCallVariable::CCallVariable() { M_matchingValue = NULL; M_stringValue = NULL; M_nbOfMatchingValue = 0; M_type = E_VT_UNDEFINED; } CCallVariable::~CCallVariable() { if(M_matchingValue != NULL) { delete [] M_matchingValue; } M_matchingValue = NULL; free(M_stringValue); } #define LEVEL_BITS 8 VariableTable::VariableTable(VariableTable *parent, int size) { if (parent) { level = parent->level + 1; assert(level < (1 << LEVEL_BITS)); this->parent = parent->getTable(); } else { level = 0; this->parent = NULL; } count = 1; this->size = size; if (size == 0) { variableTable = NULL; return; } variableTable = (CCallVariable **)malloc(size * sizeof(CCallVariable *)); if (!variableTable) { ERROR("Could not allocate variable table!"); } for (int i = 0; i < size; i++) { variableTable[i] = new CCallVariable(); if (variableTable[i] == NULL) { ERROR ("Call variable allocation failed"); } } } VariableTable::VariableTable(AllocVariableTable *src) { count = 1; this->level = src->level; if (src->parent) { this->parent = src->parent->getTable(); } else { this->parent = NULL; } if (level > 0) { assert(this->parent); } this->size = src->size; if (size == 0) { variableTable = NULL; return; } variableTable = (CCallVariable **)malloc(size * sizeof(CCallVariable *)); if (!variableTable) { ERROR("Could not allocate variable table!"); } for (int i = 0; i < size; i++) { variableTable[i] = new CCallVariable(); if (variableTable[i] == NULL) { ERROR ("Call variable allocation failed"); } } } void VariableTable::expand(int size) { assert(size > this->size); if (size == this->size) { return; } variableTable = (CCallVariable **)realloc(variableTable, size * sizeof(CCallVariable *)); if (!variableTable) { ERROR("Could not expand variable table!"); } for (int i = this->size; i < size; i++) { variableTable[i] = new CCallVariable(); if (variableTable[i] == NULL) { ERROR ("Call variable allocation failed"); } } this->size = size; } VariableTable::~VariableTable() { if (parent) { parent->putTable(); } for (int i = 0; i < size; i++) { delete variableTable[i]; } free(variableTable); } VariableTable *VariableTable::getTable() { count++; return this; } void VariableTable::putTable() { if (--count == 0) { delete this; } } CCallVariable *VariableTable::getVar(int i) { int thisLevel = i & ((1 << LEVEL_BITS) - 1); assert(thisLevel <= level); if (thisLevel == level) { i = i >> LEVEL_BITS; assert(i > 0); assert(i <= size ); return variableTable[i - 1]; } assert(parent); return parent->getVar(i); } AllocVariableTable::AllocVariableTable(AllocVariableTable *av_parent) : VariableTable((VariableTable *)av_parent, 0) { this->av_parent = av_parent; } AllocVariableTable::~AllocVariableTable() { clear_str_int(variableMap); clear_int_str(variableRevMap); clear_int_int(variableReferences); } int AllocVariableTable::find(const char *varName, bool allocate) { /* If this variable has already been used, then we have nothing to do. */ str_int_map::iterator var_it = variableMap.find(varName); if (var_it != variableMap.end()) { variableReferences[var_it->second]++; return var_it->second; } if (av_parent) { int ret = av_parent->find(varName, false); if (ret > 0) { return ret; } } if (allocate) { int varNum = size + 1; expand(varNum); varNum = (varNum << LEVEL_BITS) | level; variableMap[varName] = varNum; variableReferences[varNum] = 1; variableRevMap[varNum] = strdup(varName); return varNum; } return -1; } char *AllocVariableTable::getName(int i) { int thisLevel = i & ((1 << LEVEL_BITS) - 1); assert(thisLevel <= level); if (thisLevel == level) { return variableRevMap[i]; } assert(av_parent); return av_parent->getName(i); } void AllocVariableTable::dump() { if (av_parent) { av_parent->dump(); } WARNING("%zu level %d variables:", variableMap.size(), level); for (str_int_map::iterator i = variableMap.begin(); i != variableMap.end(); i++) { WARNING("%s", i->first.c_str()); } } void AllocVariableTable::validate() { for (str_int_map::iterator var_it = variableMap.begin(); var_it != variableMap.end(); var_it++) { if (variableReferences[var_it->second] < 2) { const char *varName = var_it->first.c_str(); int varRef = variableReferences[var_it->second]; if (strcmp(varName, "_") != 0) { ERROR("Variable $%s is referenced %d times!", varName, varRef); } } } if (av_parent) { av_parent->validate(); } } sipp-3.6.0/src/infile.cpp0000644000175000017500000002560313475544015014630 0ustar walterwalter/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA * * Author : Richard GAYRAUD - 04 Nov 2003 * From Hewlett Packard Company. * Charles P. Wright from IBM Research */ #include "sipp.hpp" #include "screen.hpp" #include "stat.hpp" #include "infile.hpp" #include #include /* Read MAX_CHAR_BUFFER_SIZE size lines from the "fileName" and populate it in * the fileContents vector. Each line should be terminated with a '\n' */ FileContents::FileContents(const char *fileName) { ifstream *inFile = new ifstream(fileName); char line[MAX_CHAR_BUFFER_SIZE]; int virtualLines = 0; if (!inFile->good()) { ERROR("Unable to open file %s", fileName); } this->fileName = fileName; realLinesInFile = lineCounter = numLinesInFile = 0; /* Initialize printf info. */ printfFile = false; printfOffset = 0; printfMultiple = 1; line[0] = '\0'; inFile->getline(line, MAX_CHAR_BUFFER_SIZE); if (NULL != strstr(line, "RANDOM")) { usage = InputFileRandomOrder; } else if (NULL != strstr(line, "SEQUENTIAL")) { usage = InputFileSequentialOrder; } else if (NULL != strstr(line, "USER")) { usage = InputFileUser; } else { ERROR("Unknown file type (valid values are RANDOM, SEQUENTIAL, and USER) for %s:%s", fileName, line); } char *useprintf; if ((useprintf = strstr(line, "PRINTF"))) { /* We are going to operate in printf mode, which uses the line as a format * string for printf with the line number. */ useprintf += strlen("PRINTF"); if (*useprintf != '=') { ERROR("Invalid file printf specification (requires =) for %s:%s", fileName, line); } useprintf++; char *endptr; virtualLines = strtoul(useprintf, &endptr, 0); if (*endptr && *endptr != '\r' && *endptr != '\n' && *endptr != ',') { ERROR("Invalid file printf specification for (invalid end character '%c') %s:%s", *endptr, fileName, line); } if (virtualLines == 0) { ERROR("A printf file must have at least one virtual line %s:%s", fileName, line); } printfFile = true; } if ((useprintf = strstr(line, "PRINTFOFFSET"))) { useprintf += strlen("PRINTFOFFSET"); if (*useprintf != '=') { ERROR("Invalid file PRINTFOFFSET specification (requires =) for %s:%s", fileName, line); } useprintf++; char *endptr; printfOffset = strtoul(useprintf, &endptr, 0); if (*endptr && *endptr != '\n' && *endptr != ',') { ERROR("Invalid PRINTFOFFSET specification for (invalid end character '%c') %s:%s", *endptr, fileName, line); } } if ((useprintf = strstr(line, "PRINTFMULTIPLE"))) { useprintf += strlen("PRINTFMULTIPLE"); if (*useprintf != '=') { ERROR("Invalid PRINTFMULTIPLE specification (requires =) for %s:%s", fileName, line); } useprintf++; char *endptr; printfMultiple = strtoul(useprintf, &endptr, 0); if (*endptr && *endptr != '\n' && *endptr != ',') { ERROR("Invalid PRINTFOFFSET specification for (invalid end character '%c') %s:%s", *endptr, fileName, line); } } while (!inFile->eof()) { line[0] = '\0'; inFile->getline(line, MAX_CHAR_BUFFER_SIZE); if (line[0]) { if ('#' != line[0]) { fileLines.push_back(line); realLinesInFile++; /* this counts number of valid data lines */ } } else { break; } } if (realLinesInFile == 0) { ERROR("Input file has zero lines: %s", fileName); } if (printfFile) { numLinesInFile = virtualLines; } else { numLinesInFile = realLinesInFile; } delete inFile; indexMap = NULL; indexField = -1; } int FileContents::getLine(int line, char *dest, int len) { if (printfFile) { line %= realLinesInFile; } return snprintf(dest, len, "%s", fileLines[line].c_str()); } int FileContents::getField(int lineNum, int field, char *dest, int len) { int curfield = field; int curline = lineNum; dest[0] = '\0'; if (lineNum >= numLinesInFile) { return 0; } if (printfFile) { curline %= realLinesInFile; } const string & line = fileLines[curline]; size_t pos(0), oldpos(0); do { oldpos = pos; size_t localpos = line.find(';', oldpos); if (localpos != string::npos) { pos = localpos + 1; } else { pos = localpos; break; } if (curfield == 0) { break; } curfield --; } while (oldpos != string::npos); if (curfield) { WARNING("Field %d not found in the file %s", field, fileName); return 0; } if (string::npos == oldpos) { return 0; } if (string::npos != pos) { // should not be decremented for fieldN pos -= (oldpos + 1); } string x = line.substr(oldpos, pos); if (x.length()) { if (printfFile) { const char *s = x.c_str(); int l = strlen(s); int copied = 0; for (int i = 0; i < l; i++) { if (s[i] == '%') { if (s[i + 1] == '%') { dest[copied++] = s[i]; } else { const char *format = s + i; i++; while (s[i] != 'd') { if (i == l) { ERROR("Invalid printf injection field (ran off end of line): %s", s); } if (!(isdigit(s[i]) || s[i] == '.' || s[i] == '-')) { ERROR("Invalid printf injection field (only decimal values allowed '%c'): %s", s[i], s); } i++; } assert(s[i] == 'd'); char *tmp = (char *)malloc(s + i + 2 - format); if (!tmp) { ERROR("Out of memory!"); } memcpy(tmp, format, s + i + 1 - format); tmp[s + i + 1 - format] = '\0'; copied += sprintf(dest + copied, tmp, printfOffset + (lineNum * printfMultiple)); free(tmp); } } else { dest[copied++] = s[i]; } } dest[copied] = '\0'; return copied; } else { return snprintf(dest, len, "%s", x.c_str()); } } else { return 0; } } int FileContents::numLines() { return numLinesInFile; } int FileContents::nextLine(int userId) { switch(usage) { case InputFileRandomOrder: return rand() % numLinesInFile; case InputFileSequentialOrder: { int ret = lineCounter; lineCounter = (lineCounter + 1) % numLinesInFile; return ret; } case InputFileUser: if (userId == 0) { return -1; } if ((userId - 1) >= numLinesInFile) { ERROR("%s has only %d lines, yet user %d was requested.", fileName, numLinesInFile, userId); } return userId - 1; default: ERROR("Internal error: unknown file usage mode!"); return -1; } } void FileContents::dump(void) { WARNING("Line choosing strategy is [%s]. m_counter [%d] numLinesInFile [%d] realLinesInFile [%d]", usage == InputFileSequentialOrder ? "SEQUENTIAL" : usage == InputFileRandomOrder ? "RANDOM" : usage == InputFileUser ? "USER" : "UNKNOWN", lineCounter, numLinesInFile, realLinesInFile); for (int i = 0; i < realLinesInFile && fileLines[i][0]; i++) { WARNING("%s:%d reads [%s]", fileName, i, fileLines[i].c_str()); } } void FileContents::index(int field) { this->indexField = field; indexMap = new str_int_map; for (int line = 0; line < numLines(); line++) { reIndex(line); } } int FileContents::lookup(char *key) { if (indexField == -1) { ERROR("Invalid Index File: %s", fileName); } if (!indexMap) { ERROR("Invalid Index File: %s", fileName); } str_int_map::iterator index_it = indexMap->find(key); if (index_it == indexMap->end()) { return -1; } return index_it->second; } void FileContents::insert(char *value) { if (printfFile) { ERROR("Can not insert or replace into a printf file: %s", fileName); } fileLines.push_back(value); realLinesInFile++; numLinesInFile++; if (indexField != -1) { reIndex(realLinesInFile - 1); } char line[1024]; getLine(realLinesInFile - 1, line, sizeof(line)); char tmp[1024]; getField(realLinesInFile - 1, 0, tmp, sizeof(tmp)); } void FileContents::replace(int line, char *value) { if (printfFile) { ERROR("Can not insert or replace into a printf file: %s", fileName); } if (line >= realLinesInFile || line < 0) { ERROR("Invalid line number (%d) for file: %s (%d lines)", line, fileName, realLinesInFile); } deIndex(line); fileLines[line] = value; reIndex(line); } void FileContents::reIndex(int line) { if (indexField == -1) { return; } assert(line >= 0); assert(line < realLinesInFile); char tmp[SIPP_MAX_MSG_SIZE]; getField(line, indexField, tmp, SIPP_MAX_MSG_SIZE); str_int_map::iterator index_it = indexMap->find(str_int_map::key_type(tmp)); if (index_it != indexMap->end()) { indexMap->erase(index_it); } indexMap->insert(pair(str_int_map::key_type(tmp), line)); } void FileContents::deIndex(int line) { if (indexField == -1) { return; } assert(line >= 0); assert(line < realLinesInFile); char tmp[SIPP_MAX_MSG_SIZE]; getField(line, indexField, tmp, SIPP_MAX_MSG_SIZE); str_int_map::iterator index_it = indexMap->find(str_int_map::key_type(tmp)); if (index_it != indexMap->end()) { if (index_it->second == line) { indexMap->erase(index_it); } } } sipp-3.6.0/src/sip_parser.cpp0000644000175000017500000004502313475544015015527 0ustar walterwalter/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Richard GAYRAUD - 04 Nov 2003 * Olivier Jacques * From Hewlett Packard Company. * Shriram Natarajan * Peter Higginson * Eric Miller * Venkatesh * Enrico Hartung * Nasir Khan * Lee Ballard * Guillaume Teissier from FTR&D * Wolfgang Beck * Venkatesh * Vlad Troyanker * Charles P Wright from IBM Research * Amit On from Followap * Jan Andres from Freenet * Ben Evans from Open Cloud * Marc Van Diest from Belgacom * Stefan Esser * Andy Aicken * Walter Doekes */ #ifndef _GNU_SOURCE #define _GNU_SOURCE /* needed for strcasestr on cygwin */ #endif #include #include #include "screen.hpp" #include "sip_parser.hpp" /*************************** Mini SIP parser (internals) ***************/ /* * SIP ABNF can be found here: * http://tools.ietf.org/html/rfc3261#section-25 * In 2014, there is a very helpful site that lets you browse the ABNF * easily: * http://www.in2eps.com/fo-abnf/tk-fo-abnf-sip.html */ static const char* internal_find_param(const char* ptr, const char* name); static const char* internal_find_header(const char* msg, const char* name, const char* shortname, bool content); static const char* internal_skip_lws(const char* ptr); /* Search for a character, but only inside this header. Returns NULL if * not found. */ static const char* internal_hdrchr(const char* ptr, const char needle); /* Seek to end of this header. Returns the position the next character, * which must be at the header-delimiting-CRLF or, if the message is * broken, at the ASCIIZ NUL. */ static const char* internal_hdrend(const char* ptr); /*************************** Mini SIP parser (externals) ***************/ char* get_peer_tag(const char* msg) { static char tag[MAX_HEADER_LEN]; const char * to_hdr; const char * ptr; int tag_i = 0; /* Find start of header */ to_hdr = internal_find_header(msg, "To", "t", true); if (!to_hdr) { WARNING("No valid To: header in reply"); return NULL; } /* Skip past display-name */ /* FIXME */ /* Skip past LA/RA-quoted addr-spec if any */ ptr = internal_hdrchr(to_hdr, '>'); if (!ptr) { /* Maybe an addr-spec without quotes */ ptr = to_hdr; } /* Find tag in this header */ ptr = internal_find_param(ptr, "tag"); if (!ptr) { return NULL; } while (*ptr && *ptr != ' ' && *ptr != ';' && *ptr != '\t' && *ptr != '\r' && *ptr != '\n') { tag[tag_i++] = *(ptr++); } tag[tag_i] = '\0'; return tag; } char* get_header_content(const char* message, const char* name) { return get_header(message, name, true); } /* If content is true, we only return the header's contents. */ char* get_header(const char* message, const char* name, bool content) { /* non reentrant. consider accepting char buffer as param */ static char last_header[MAX_HEADER_LEN * 10]; const char *cptr; char *src, *src_orig, *dest, *start, *ptr; /* Are we searching for a short form header? */ bool short_form = false; bool first_time = true; char header_with_newline[MAX_HEADER_LEN + 1]; /* returns empty string in case of error */ last_header[0] = '\0'; if (!message || !*message) { return last_header; } /* for safety's sake */ if (!name || !strrchr(name, ':')) { WARNING("Can not search for header (no colon): %s", name ? name : "(null)"); return last_header; } /* find end of SIP headers - perform search only until that */ cptr = strstr(message, "\r\n\r\n"); if (!cptr) { src_orig = strdup(message); } else if ((src_orig = (char*)malloc(cptr - message + 1))) { src_orig[cptr - message] = '\0'; memcpy(src_orig, message, cptr - message); } if (!src_orig) { ERROR("Out of memory"); return last_header; } do { /* We want to start from the beginning of the message each time * through this loop, because we may be searching for a short form. */ src = src_orig; snprintf(header_with_newline, MAX_HEADER_LEN, "\n%s", name); dest = last_header; while ((src = strcasestr(src, header_with_newline))) { if (content || !first_time) { /* Just want the header's content, so skip over the header * and newline */ src += strlen(name) + 1; /* Skip over leading spaces. */ while (*src == ' ') { src++; } } else { /* Just skip the newline */ src++; } first_time = false; ptr = strchr(src, '\n'); /* Multiline headers always begin with a tab or a space * on the subsequent lines. Skip those lines. */ while (ptr && (*(ptr+1) == ' ' || *(ptr+1) == '\t')) { ptr = strchr(ptr + 1, '\n'); } if (ptr) { *ptr = 0; } // Add ", " when several headers are present if (dest != last_header) { /* Remove trailing whitespaces, tabs, and CRs */ while (dest > last_header && (*(dest-1) == ' ' || *(dest-1) == '\r' || *(dest-1) == '\n' || *(dest-1) == '\t')) { *(--dest) = 0; } dest += sprintf(dest, ", "); } dest += sprintf(dest, "%s", src); if (ptr) { *ptr = '\n'; } src++; } /* We found the header. */ if (dest != last_header) { break; } /* We didn't find the header, even in its short form. */ if (short_form) { free(src_orig); return last_header; } /* We should retry with the short form. */ short_form = true; if (!strcasecmp(name, "call-id:")) { name = "i:"; } else if (!strcasecmp(name, "contact:")) { name = "m:"; } else if (!strcasecmp(name, "content-encoding:")) { name = "e:"; } else if (!strcasecmp(name, "content-length:")) { name = "l:"; } else if (!strcasecmp(name, "content-type:")) { name = "c:"; } else if (!strcasecmp(name, "from:")) { name = "f:"; } else if (!strcasecmp(name, "to:")) { name = "t:"; } else if (!strcasecmp(name, "via:")) { name = "v:"; } else { /* There is no short form to try. */ free(src_orig); return last_header; } } while (1); *(dest--) = 0; /* Remove trailing whitespaces, tabs, and CRs */ while (dest > last_header && (*dest == ' ' || *dest == '\r' || *dest == '\t')) { *(dest--) = 0; } /* Remove leading whitespaces */ for (start = last_header; *start == ' '; start++); /* remove enclosed CRs in multilines */ /* don't remove enclosed CRs for multiple headers (e.g. Via) (Rhys) */ while ((ptr = strstr(last_header, "\r\n")) != NULL && (*(ptr + 2) == ' ' || *(ptr + 2) == '\r' || *(ptr + 2) == '\t')) { /* Use strlen(ptr) to include trailing zero */ memmove(ptr, ptr+1, strlen(ptr)); } /* Remove illegal double CR characters */ while ((ptr = strstr(last_header, "\r\r")) != NULL) { memmove(ptr, ptr+1, strlen(ptr)); } /* Remove illegal double Newline characters */ while ((ptr = strstr(last_header, "\n\n")) != NULL) { memmove(ptr, ptr+1, strlen(ptr)); } free(src_orig); return start; } char* get_first_line(const char* message) { /* non reentrant. consider accepting char buffer as param */ static char last_header[MAX_HEADER_LEN * 10]; const char* src; /* returns empty string in case of error */ memset(last_header, 0, sizeof(last_header)); if (!message || !*message) { return last_header; } src = message; int i=0; while (*src) { if (*src == '\n' || *src == '\r') { break; } last_header[i] = *src; i++; src++; } return last_header; } char* get_call_id(const char* msg) { static char call_id[MAX_HEADER_LEN]; const char *content, *end_of_header; unsigned length; call_id[0] = '\0'; content = internal_find_header(msg, "Call-ID", "i", true); if (!content) { WARNING("(1) No valid Call-ID: header in reply '%s'", msg); return call_id; } /* Always returns something */ end_of_header = internal_hdrend(content); length = end_of_header - content; if (length + 1 > MAX_HEADER_LEN) { WARNING("(1) Call-ID: header too long in reply '%s'", msg); return call_id; } memcpy(call_id, content, length); call_id[length] = '\0'; return call_id; } unsigned long int get_cseq_value(const char* msg) { const char* ptr1; // no short form for CSeq: ptr1 = strstr(msg, "\r\nCSeq:"); if (!ptr1) { ptr1 = strstr(msg, "\r\nCSEQ:"); } if (!ptr1) { ptr1 = strstr(msg, "\r\ncseq:"); } if (!ptr1) { ptr1 = strstr(msg, "\r\nCseq:"); } if (!ptr1) { WARNING("No valid Cseq header in request %s", msg); return 0; } ptr1 += 7; while (*ptr1 == ' ' || *ptr1 == '\t') { ++ptr1; } if (!*ptr1) { WARNING("No valid Cseq data in header"); return 0; } return strtoul(ptr1, NULL, 10); } unsigned long get_reply_code(const char* msg) { while (msg && *msg != ' ' && *msg != '\t') ++msg; while (msg && (*msg == ' ' || *msg == '\t')) ++msg; if (msg && strlen(msg) > 0) { return atol(msg); } return 0; } static const char* internal_find_header(const char* msg, const char* name, const char* shortname, bool content) { const char *ptr = msg; int namelen = strlen(name); int shortnamelen = shortname ? strlen(shortname) : 0; while (1) { int is_short = 0; /* RFC3261, 7.3.1: When comparing header fields, field names * are always case-insensitive. Unless otherwise stated in * the definition of a particular header field, field values, * parameter names, and parameter values are case-insensitive. * Tokens are always case-insensitive. Unless specified * otherwise, values expressed as quoted strings are case- * sensitive. * * Ergo, strcasecmp, because: * To:...;tag=bla == TO:...;TAG=BLA * But: * Warning: "something" != Warning: "SoMeThInG" */ if (strncasecmp(ptr, name, namelen) == 0 || (shortname && (is_short = 1) && strncasecmp(ptr, shortname, shortnamelen) == 0)) { const char *tmp = ptr + (is_short ? strlen(shortname) : strlen(name)); while (*tmp == ' ' || *tmp == '\t') { ++tmp; } if (*tmp == ':') { /* Found */ if (content) { /* We just want the content */ ptr = internal_skip_lws(tmp + 1); } break; } } /* Seek to next line, but not past EOH */ ptr = strchr(ptr, '\n'); if (!ptr || ptr[-1] != '\r' || (ptr[1] == '\r' && ptr[2] == '\n')) { if (ptr && ptr[-1] != '\r') { WARNING("Missing CR during header scan at pos %ld", ptr - msg); /* continue? */ } return NULL; } ++ptr; } return ptr; } static const char* internal_hdrchr(const char* ptr, const char needle) { if (*ptr == '\n') { return NULL; /* stray LF */ } while (1) { if (*ptr == '\0') { return NULL; } else if (*ptr == needle) { return ptr; } else if (*ptr == '\n') { if (ptr[-1] == '\r' && ptr[1] != ' ' && ptr[1] != '\t') { return NULL; /* end of header */ } } ++ptr; } return NULL; /* never gets here */ } static const char* internal_hdrend(const char* ptr) { const char *p = ptr; while (*p) { if (p[0] == '\r' && p[1] == '\n' && (p[2] != ' ' && p[2] != '\t')) { return p; } ++p; } return p; } static const char* internal_find_param(const char* ptr, const char* name) { int namelen = strlen(name); while (1) { ptr = internal_hdrchr(ptr, ';'); if (!ptr) { return NULL; } ++ptr; ptr = internal_skip_lws(ptr); if (!ptr || !*ptr) { return NULL; } /* Case insensitive, see RFC 3261 7.3.1 notes above. */ if (strncasecmp(ptr, name, namelen) == 0 && *(ptr + namelen) == '=') { ptr += namelen + 1; return ptr; } } return NULL; /* never gets here */ } static const char* internal_skip_lws(const char* ptr) { while (1) { while (*ptr == ' ' || *ptr == '\t') { ++ptr; } if (ptr[0] == '\r' && ptr[1] == '\n') { if (ptr[2] == ' ' || ptr[2] == '\t') { ptr += 3; continue; } return NULL; /* end of this header */ } return ptr; } return NULL; /* never gets here */ } #ifdef GTEST #include "gtest/gtest.h" TEST(Parser, internal_find_header) { char data[] = "OPTIONS sip:server SIP/2.0\r\n" "Took: abc1\r\n" "To k: abc2\r\n" "To\t :\r\n abc3\r\n" "From: def\r\n" "\r\n"; const char *eq = strstr(data, "To\t :"); EXPECT_STREQ(eq, internal_find_header(data, "To", "t", false)); EXPECT_STREQ(eq + 8, internal_find_header(data, "To", "t", true)); } TEST(Parser, internal_find_header_no_callid_missing_cr_in_to) { char data[4096]; const char *pos; const char *p; /* If you remove the CR ("\r") from any header before the Call-ID, * the Call-ID will not be found. */ strncpy(data, "INVITE sip:3136455552@85.12.1.1:5065 SIP/2.0\r\n\ Via: SIP/2.0/UDP 85.55.55.12:5060;branch=z9hG4bK831a.2bb3de85.0\r\n\ From: \"3136456666\" ;tag=b62e0d72-be14-4d3c-bd6a-b4da593b6b17\r\n\ To: \n\ Contact: \r\n\ Call-ID: DLGCH_K0IEXzVwYzJiQlwKMGRkMX5GSAxiKmJ+exQADWYsZ2QsFQFb\r\n\ CSeq: 6476 INVITE\r\n\ Allow: OPTIONS, REGISTER, SUBSCRIBE, NOTIFY, PUBLISH, INVITE, ACK, BYE, CANCEL, UPDATE, PRACK, MESSAGE, REFER\r\n\ Supported: 100rel, timer, replaces, norefersub\r\n\ Session-Expires: 1800\r\n\ Min-SE: 90\r\n\ Max-Forwards: 70\r\n\ Content-Type: application/sdp\r\n\ Content-Length: 278\r\n\ \r\n\ v=0\r\n\ o=- 592907310 592907310 IN IP4 85.55.55.30\r\n\ s=Centrex v.1.0\r\n\ c=IN IP4 85.55.55.30\r\n\ t=0 0\r\n\ m=audio 41604 RTP/AVP 8 0 101\r\n\ a=rtpmap:8 PCMA/8000\r\n\ a=rtpmap:0 PCMU/8000\r\n\ a=rtpmap:101 telephone-event/8000\r\n\ a=fmtp:101 0-16\r\n\ a=ptime:20\r\n\ a=maxptime:150\r\n\ a=sendrecv\r\n\ a=rtcp:41605\r\n\ ", sizeof(data) - 1); if ((pos = internal_find_header(data, "Call-ID", "i", false)) && (p = strchr(pos, '\r'))) { data[p - data] = '\0'; /* Unexpected.. */ ASSERT_FALSE(1); EXPECT_STREQ(pos, "Call-ID: DLGCH_K0IEXzVwYzJiQlwKMGRkMX5GSAxiKmJ+exQADWYsZ2QsFQFb"); } else { /* Not finding any, because of missing CR. */ ASSERT_TRUE(1); } } TEST(Parser, get_peer_tag__notag) { EXPECT_STREQ(NULL, get_peer_tag("...\r\nTo: \r\n;tag=notag\r\n\r\n")); } TEST(Parser, get_peer_tag__normal) { EXPECT_STREQ("normal", get_peer_tag("...\r\nTo: ;t2=x;tag=normal;t3=y\r\n\r\n")); } TEST(Parser, get_peer_tag__upper) { EXPECT_STREQ("upper", get_peer_tag("...\r\nTo: ;t2=x;TAG=upper;t3=y\r\n\r\n")); } TEST(Parser, get_peer_tag__normal_2) { EXPECT_STREQ("normal2", get_peer_tag("...\r\nTo: abc;tag=normal2\r\n\r\n")); } TEST(Parser, get_peer_tag__folded) { EXPECT_STREQ("folded", get_peer_tag("...\r\nTo: \r\n ;tag=folded\r\n\r\n")); } TEST(Parser, get_peer_tag__space) { EXPECT_STREQ("space", get_peer_tag("...\r\nTo: ;tag=space\r\n\r\n")); } TEST(Parser, get_peer_tag__space_2) { EXPECT_STREQ("space2", get_peer_tag("...\r\nTo \t:\r\n abc\r\n ;tag=space2\r\n\r\n")); } TEST(Parser, get_call_id_1) { EXPECT_STREQ("test1", get_call_id("...\r\nCall-ID: test1\r\n\r\n")); } TEST(Parser, get_call_id_2) { EXPECT_STREQ("test2", get_call_id("...\r\nCALL-ID:\r\n test2\r\n\r\n")); } TEST(Parser, get_call_id_3) { EXPECT_STREQ("test3", get_call_id("...\r\ncall-id:\r\n\t test3\r\n\r\n")); } TEST(Parser, get_call_id_short_1) { EXPECT_STREQ("testshort1", get_call_id("...\r\ni: testshort1\r\n\r\n")); } TEST(Parser, get_call_id_short_2) { /* The WS surrounding the colon belongs with HCOLON, but the * trailing WS does not. */ EXPECT_STREQ("testshort2 \t ", get_call_id("...\r\nI:\r\n \r\n \t testshort2 \t \r\n\r\n")); } /* The 3pcc-A script sends "invalid" SIP that is parsed by this * sip_parser. We must accept headers without any leading request/ * response line: * * * * */ TEST(Parser, get_call_id_github_0101) { // github-#0101 const char *input = "Call-ID: 1-18220@127.0.0.1\r\n" "Content-Type: application/sdp\r\n" "Content-Length: 129\r\n\r\n" "v=0\r\no=user1 53655765 2353687637 IN IP4 127.0.0.1\r\n" "s=-\r\nc=IN IP4 127.0.0.1\r\nt=0 0\r\n" "m=audio 6000 RTP/AVP 0\r\na=rtpmap:0 PCMU/8000"; EXPECT_STREQ("1-18220@127.0.0.1", get_call_id(input)); } #endif //GTEST sipp-3.6.0/src/socket.cpp0000644000175000017500000027452713475544015014665 0ustar walterwalter/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Richard GAYRAUD - 04 Nov 2003 * Marc LAMBERTON * Olivier JACQUES * Herve PELLAN * David MANSUTTI * Francois-Xavier Kowalski * Gerard Lyonnaz * Francois Draperi (for dynamic_id) * From Hewlett Packard Company. * F. Tarek Rogers * Peter Higginson * Vincent Luba * Shriram Natarajan * Guillaume Teissier from FTR&D * Clement Chen * Wolfgang Beck * Charles P Wright from IBM Research * Martin Van Leeuwen * Andy Aicken * Michael Hirschbichler */ #ifndef _GNU_SOURCE #define _GNU_SOURCE /* needed for strcasestr on cygwin */ #endif #include #include #include #include #include "sipp.hpp" #include "socket.hpp" #include "logger.hpp" /* Older non C++11 gcc (4.6) does not have nullptr */ #define const_char_nullptr (reinterpret_cast(0)) extern bool do_hide; extern bool show_index; SIPpSocket *ctrl_socket = NULL; SIPpSocket *stdin_socket = NULL; static int stdin_fileno = -1; static int stdin_mode; /******************** Recv Poll Processing *********************/ unsigned pollnfds; #ifdef HAVE_EPOLL int epollfd; struct epoll_event epollfiles[SIPP_MAXFDS]; struct epoll_event* epollevents; #else struct pollfd pollfiles[SIPP_MAXFDS]; #endif SIPpSocket *sockets[SIPP_MAXFDS]; int pending_messages = 0; map map_perip_fd; int gai_getsockaddr(struct sockaddr_storage* ss, const char* host, const char *service, int flags, int family) { const struct addrinfo hints = {flags, family,}; struct addrinfo* res; int error = getaddrinfo(host, service, &hints, &res); if (error == 0) { memcpy(ss, res->ai_addr, res->ai_addrlen); freeaddrinfo(res); } else { WARNING("getaddrinfo failed: %s", gai_strerror(error)); } return error; } int gai_getsockaddr(struct sockaddr_storage* ss, const char* host, unsigned short port, int flags, int family) { if (port) { char service[NI_MAXSERV + 1]; snprintf(service, sizeof(service), "%d", port); return gai_getsockaddr(ss, host, service, flags, family); } else { return gai_getsockaddr(ss, host, const_char_nullptr, flags, family); } } void sockaddr_update_port(struct sockaddr_storage* ss, short port) { switch (ss->ss_family) { case AF_INET: _RCAST(struct sockaddr_in*, ss)->sin_port = htons(port); break; case AF_INET6: _RCAST(struct sockaddr_in6*, ss)->sin6_port = htons(port); break; default: ERROR("Unsupported family type"); } } static void process_set(char* what) { char *rest = strchr(what, ' '); if (rest) { *rest++ = '\0'; trim(rest); } else { WARNING("The set command requires two arguments (attribute and value)"); return; } if (!strcmp(what, "rate")) { char *end; double drest = strtod(rest, &end); if (users >= 0) { WARNING("Rates can not be set in a user-based benchmark."); } else if (*end) { WARNING("Invalid rate value: \"%s\"", rest); } else { CallGenerationTask::set_rate(drest); } } else if (!strcmp(what, "rate-scale")) { char *end; double drest = strtod(rest, &end); if (*end) { WARNING("Invalid rate-scale value: \"%s\"", rest); } else { rate_scale = drest; } } else if (!strcmp(what, "users")) { char *end; int urest = strtol(rest, &end, 0); if (users < 0) { WARNING("Users can not be changed at run time for a rate-based benchmark."); } else if (*end) { WARNING("Invalid users value: \"%s\"", rest); } else if (urest < 0) { WARNING("Invalid users value: \"%s\"", rest); } else { CallGenerationTask::set_users(urest); } } else if (!strcmp(what, "limit")) { char *end; unsigned long lrest = strtoul(rest, &end, 0); if (users >= 0) { WARNING("Can not set call limit for a user-based benchmark."); } else if (*end) { WARNING("Invalid limit value: \"%s\"", rest); } else { open_calls_allowed = lrest; open_calls_user_setting = 1; } } else if (!strcmp(what, "display")) { if (!strcmp(rest, "main")) { display_scenario = main_scenario; } else if (!strcmp(rest, "ooc")) { display_scenario = ooc_scenario; } else { WARNING("Unknown display scenario: %s", rest); } } else if (!strcmp(what, "hide")) { if (!strcmp(rest, "true")) { do_hide = true; } else if (!strcmp(rest, "false")) { do_hide = false; } else { WARNING("Invalid bool: %s", rest); } } else if (!strcmp(what, "index")) { if (!strcmp(rest, "true")) { show_index = true; } else if (!strcmp(rest, "false")) { show_index = false; } else { WARNING("Invalid bool: %s", rest); } } else { WARNING("Unknown set attribute: %s", what); } } static void process_trace(char* what) { bool on = false; char *rest = strchr(what, ' '); if (rest) { *rest++ = '\0'; trim(rest); } else { WARNING("The trace command requires two arguments (log and [on|off])"); return; } if (!strcmp(rest, "on")) { on = true; } else if (!strcmp(rest, "off")) { on = false; } else if (!strcmp(rest, "true")) { on = true; } else if (!strcmp(rest, "false")) { on = false; } else { WARNING("The trace command's second argument must be on or off."); return; } if (!strcmp(what, "error")) { if (on == !!print_all_responses) { return; } if (on) { print_all_responses = 1; } else { print_all_responses = 0; log_off(&error_lfi); } } else if (!strcmp(what, "logs")) { if (on == !!log_lfi.fptr) { return; } if (on) { useLogf = 1; rotate_logfile(); } else { useLogf = 0; log_off(&log_lfi); } } else if (!strcmp(what, "messages")) { if (on == !!message_lfi.fptr) { return; } if (on) { useMessagef = 1; rotate_logfile(); } else { useMessagef = 0; log_off(&message_lfi); } } else if (!strcmp(what, "shortmessages")) { if (on == !!shortmessage_lfi.fptr) { return; } if (on) { useShortMessagef = 1; rotate_shortmessagef(); } else { useShortMessagef = 0; log_off(&shortmessage_lfi); } } else { WARNING("Unknown log file: %s", what); } } static void process_dump(char* what) { if (!strcmp(what, "tasks")) { dump_tasks(); } else if (!strcmp(what, "variables")) { display_scenario->allocVars->dump(); } else { WARNING("Unknown dump type: %s", what); } } static void process_reset(char* what) { if (!strcmp(what, "stats")) { main_scenario->stats->computeStat(CStat::E_RESET_C_COUNTERS); } else { WARNING("Unknown reset type: %s", what); } } static bool process_command(char* command) { trim(command); char *rest = strchr(command, ' '); if (rest) { *rest++ = '\0'; trim(rest); } if (!rest) { WARNING("The %s command requires at least one argument", command); } else if (!strcmp(command, "set")) { process_set(rest); } else if (!strcmp(command, "trace")) { process_trace(rest); } else if (!strcmp(command, "dump")) { process_dump(rest); } else if (!strcmp(command, "reset")) { process_reset(rest); } else { WARNING("Unrecognized command: \"%s\"", command); } return false; } int command_mode = 0; char *command_buffer = NULL; extern bool sipMsgCheck (const char *P_msg, SIPpSocket *socket); static const char* get_trimmed_call_id(const char* msg) { /* A call_id identifies a call and is generated by SIPp for each * new call. In client mode, it is mandatory to use the value * generated by SIPp in the "Call-ID" header. Otherwise, SIPp will * not recognise the answer to the message sent as being part of an * existing call. * * Note: [call_id] can be pre-pended with an arbitrary string using * '///'. * Example: Call-ID: ABCDEFGHIJ///[call_id] * - it will still be recognized by SIPp as part of the same call. */ const char *call_id = get_call_id(msg); const char *slashes = strstr(call_id, "///"); if ((!callidSlash) && slashes) { return slashes + 3; } return call_id; } static char* get_inet_address(const struct sockaddr_storage* addr, char* dst, int len) { if (getnameinfo(_RCAST(struct sockaddr*, addr), socklen_from_addr(addr), dst, len, NULL, 0, NI_NUMERICHOST) != 0) { snprintf(dst, len, "addr not supported"); } return dst; } static bool process_key(int c) { switch (c) { case '1': currentScreenToDisplay = DISPLAY_SCENARIO_SCREEN; print_statistics(0); break; case '2': currentScreenToDisplay = DISPLAY_STAT_SCREEN; print_statistics(0); break; case '3': currentScreenToDisplay = DISPLAY_REPARTITION_SCREEN; print_statistics(0); break; case '4': currentScreenToDisplay = DISPLAY_VARIABLE_SCREEN; print_statistics(0); break; case '5': if (use_tdmmap) { currentScreenToDisplay = DISPLAY_TDM_MAP_SCREEN; print_statistics(0); } break; /* Screens 6, 7, 8, 9 are for the extra RTD repartitions. */ case '6': case '7': case '8': case '9': currentScreenToDisplay = DISPLAY_SECONDARY_REPARTITION_SCREEN; currentRepartitionToDisplay = (c - '6') + 2; print_statistics(0); break; case '+': if (users >= 0) { CallGenerationTask::set_users((int)(users + 1 * rate_scale)); } else { CallGenerationTask::set_rate(rate + 1 * rate_scale); } print_statistics(0); break; case '-': if (users >= 0) { CallGenerationTask::set_users((int)(users - 1 * rate_scale)); } else { CallGenerationTask::set_rate(rate - 1 * rate_scale); } print_statistics(0); break; case '*': if (users >= 0) { CallGenerationTask::set_users((int)(users + 10 * rate_scale)); } else { CallGenerationTask::set_rate(rate + 10 * rate_scale); } print_statistics(0); break; case '/': if (users >= 0) { CallGenerationTask::set_users((int)(users - 10 * rate_scale)); } else { CallGenerationTask::set_rate(rate - 10 * rate_scale); } print_statistics(0); break; case 'p': if (paused) { CallGenerationTask::set_paused(false); } else { CallGenerationTask::set_paused(true); } print_statistics(0); break; case 's': if (screenf) { print_screens(); } break; case 'q': quitting+=10; print_statistics(0); break; case 'Q': /* We are going to break, so we never have a chance to press q twice. */ quitting+=20; print_statistics(0); break; } return false; } int handle_ctrl_socket() { unsigned char bufrcv [SIPP_MAX_MSG_SIZE]; int ret = recv(ctrl_socket->ss_fd, bufrcv, sizeof(bufrcv) - 1, 0); if (ret <= 0) { return ret; } if (bufrcv[0] == 'c') { /* No 'c', but we need one for '\0'. */ char *command = (char *)malloc(ret); if (!command) { ERROR("Out of memory allocated command buffer."); } memcpy(command, bufrcv + 1, ret - 1); command[ret - 1] = '\0'; process_command(command); free(command); } else { process_key(bufrcv[0]); } return 0; } void setup_ctrl_socket() { int port, firstport; int try_counter = 60; struct sockaddr_storage ctl_sa; int sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); if (sock == -1) { ERROR_NO("Unable to create remote control socket!"); } if (control_port) { port = control_port; /* If the user specified the control port, then we must assume they know * what they want, and should not cycle. */ try_counter = 1; } else { /* Allow 60 control sockets on the same system */ /* (several SIPp instances) */ port = DEFAULT_CTRL_SOCKET_PORT; } firstport = port; memset(&ctl_sa, 0, sizeof(struct sockaddr_storage)); if (control_ip[0]) { if (gai_getsockaddr(&ctl_sa, control_ip, const_char_nullptr, AI_PASSIVE, AF_UNSPEC) != 0) { ERROR("Unknown control address '%s'.\n" "Use 'sipp -h' for details", control_ip); } } else { ((struct sockaddr_in *)&ctl_sa)->sin_family = AF_INET; ((struct sockaddr_in *)&ctl_sa)->sin_addr.s_addr = INADDR_ANY; } while (try_counter) { ((struct sockaddr_in *)&ctl_sa)->sin_port = htons(port); if (!::bind(sock, (struct sockaddr *)&ctl_sa, sizeof(struct sockaddr_in))) { /* Bind successful */ break; } try_counter--; port++; } if (try_counter == 0) { if (control_port) { ERROR_NO("Unable to bind remote control socket to UDP port %d", control_port); } else { WARNING("Unable to bind remote control socket (tried UDP ports %d-%d): %s", firstport, port - 1, strerror(errno)); } return; } ctrl_socket = new SIPpSocket(0, T_UDP, sock, 0); if (!ctrl_socket) { ERROR_NO("Could not setup control socket!"); } } void reset_stdin() { fcntl(stdin_fileno, F_SETFL, stdin_mode); } void setup_stdin_socket() { stdin_fileno = fileno(stdin); stdin_mode = fcntl(stdin_fileno, F_GETFL); atexit(reset_stdin); fcntl(stdin_fileno, F_SETFL, stdin_mode | O_NONBLOCK); stdin_socket = new SIPpSocket(0, T_TCP, stdin_fileno, 0); if (!stdin_socket) { ERROR_NO("Could not setup keyboard (stdin) socket!"); } } #define SIPP_ENDL "\r\n" void handle_stdin_socket() { int c; int chars = 0; if (feof(stdin)) { stdin_socket->close(); stdin_socket = NULL; return; } while (((c = screen_readkey()) != -1)) { chars++; if (command_mode) { if (c == '\n') { bool quit = process_command(command_buffer); if (quit) { return; } command_buffer[0] = '\0'; command_mode = 0; printf(SIPP_ENDL); } #ifndef __SUNOS else if (c == key_backspace || c == key_dc) #else else if (c == 14) #endif { int command_len = strlen(command_buffer); if (command_len > 0) { command_buffer[command_len--] = '\0'; } } else { int command_len = strlen(command_buffer); char *realloc_ptr = (char *)realloc(command_buffer, command_len + 2); if (realloc_ptr) { command_buffer = realloc_ptr; } else { free(command_buffer); ERROR("Out of memory"); return; } command_buffer[command_len++] = c; command_buffer[command_len] = '\0'; putchar(c); fflush(stdout); } } else if (c == 'c') { command_mode = 1; char *realloc_ptr = (char *)realloc(command_buffer, 1); if (realloc_ptr) { command_buffer = realloc_ptr; } else { free(command_buffer); ERROR("Out of memory"); return; } command_buffer[0] = '\0'; printf("Command: "); fflush(stdout); } else { process_key(c); } } if (chars == 0) { /* We did not read any characters, even though we should have. */ stdin_socket->close(); stdin_socket = NULL; } } /****************************** Network Interface *******************/ /* Our message detection states: */ #define CFM_NORMAL 0 /* No CR Found, searchign for \r\n\r\n. */ #define CFM_CONTROL 1 /* Searching for 27 */ #define CFM_CR 2 /* CR Found, Searching for \n\r\n */ #define CFM_CRLF 3 /* CRLF Found, Searching for \r\n */ #define CFM_CRLFCR 4 /* CRLFCR Found, Searching for \n */ #define CFM_CRLFCRLF 5 /* We've found the end of the headers! */ static void merge_socketbufs(struct socketbuf* socketbuf) { struct socketbuf *next = socketbuf->next; int newsize; char *newbuf; if (!next) { return; } if (next->offset) { ERROR("Internal error: can not merge a socketbuf with a non-zero offset."); } if (socketbuf->offset) { memmove(socketbuf->buf, socketbuf->buf + socketbuf->offset, socketbuf->len - socketbuf->offset); socketbuf->len -= socketbuf->offset; socketbuf->offset = 0; } newsize = socketbuf->len + next->len; newbuf = (char *)realloc(socketbuf->buf, newsize); if (!newbuf) { ERROR("Could not allocate memory to merge socket buffers!"); } memcpy(newbuf + socketbuf->len, next->buf, next->len); socketbuf->buf = newbuf; socketbuf->len = newsize; socketbuf->next = next->next; free_socketbuf(next); } /* Check for a message in the socket and return the length of the first * message. If this is UDP, the only check is if we have buffers. If this is * TCP or TLS we need to parse out the content-length. */ int SIPpSocket::check_for_message() { struct socketbuf *socketbuf = ss_in; int state = ss_control ? CFM_CONTROL : CFM_NORMAL; const char *l; if (!socketbuf) return 0; if (ss_transport == T_UDP || ss_transport == T_SCTP) { return socketbuf->len; } int len = 0; while (socketbuf->offset + len < socketbuf->len) { char c = socketbuf->buf[socketbuf->offset + len]; switch(state) { case CFM_CONTROL: /* For CMD Message the escape char is the end of message */ if (c == 27) { return len + 1; /* The plus one includes the control character. */ } break; case CFM_NORMAL: if (c == '\r') { state = CFM_CR; } break; case CFM_CR: if (c == '\n') { state = CFM_CRLF; } else { state = CFM_NORMAL; } break; case CFM_CRLF: if (c == '\r') { state = CFM_CRLFCR; } else { state = CFM_NORMAL; } break; case CFM_CRLFCR: if (c == '\n') { state = CFM_CRLFCRLF; } else { state = CFM_NORMAL; } break; } /* Head off failing because the buffer does not contain the whole header. */ if (socketbuf->offset + len == socketbuf->len - 1) { merge_socketbufs(socketbuf); } if (state == CFM_CRLFCRLF) { break; } len++; } /* We did not find the end-of-header marker. */ if (state != CFM_CRLFCRLF) { return 0; } char saved = socketbuf->buf[socketbuf->offset + len]; socketbuf->buf[socketbuf->offset + len] = '\0'; /* Find the content-length header. */ if ((l = strcasestr(socketbuf->buf + socketbuf->offset, "\r\nContent-Length:"))) { l += strlen("\r\nContent-Length:"); } else if ((l = strcasestr(socketbuf->buf + socketbuf->offset, "\r\nl:"))) { l += strlen("\r\nl:"); } socketbuf->buf[socketbuf->offset + len] = saved; /* There is no header, so the content-length is zero. */ if (!l) return len + 1; /* Skip spaces. */ while (isspace(*l)) { if (*l == '\r' || *l == '\n') { /* We ran into an end-of-line, so there is no content-length. */ return len + 1; } l++; } /* Do the integer conversion, we only allow '\r' or spaces after the integer. */ char *endptr; int content_length = strtol(l, &endptr, 10); if (*endptr != '\r' && !isspace(*endptr)) { content_length = 0; } /* Now that we know how large this message is, we make sure we have the whole thing. */ do { /* It is in this buffer. */ if (socketbuf->offset + len + content_length < socketbuf->len) { return len + content_length + 1; } if (socketbuf->next == NULL) { /* There is no buffer to merge, so we fail. */ return 0; } /* We merge ourself with the next buffer. */ merge_socketbufs(socketbuf); } while (1); } #ifdef USE_SCTP int SIPpSocket::handleSCTPNotify(char* buffer) { union sctp_notification *notifMsg; notifMsg = (union sctp_notification *)buffer; TRACE_MSG("SCTP Notification: %d\n", ntohs(notifMsg->sn_header.sn_type)); if (notifMsg->sn_header.sn_type == SCTP_ASSOC_CHANGE) { TRACE_MSG("SCTP_ASSOC_CHANGE\n"); if (notifMsg->sn_assoc_change.sac_state == SCTP_COMM_UP) { TRACE_MSG("SCTP_COMM_UP\n"); sctpstate = SCTP_UP; sipp_sctp_peer_params(); /* Send SCTP message right after association is up */ ss_congested = false; flush(); return -2; } else { TRACE_MSG("else: %d\n", notifMsg->sn_assoc_change.sac_state); return 0; } } else if (notifMsg->sn_header.sn_type == SCTP_SHUTDOWN_EVENT) { TRACE_MSG("SCTP_SHUTDOWN_EVENT\n"); return 0; } return -2; } void set_multihome_addr(SIPpSocket* socket, int port) { if (strlen(multihome_ip)>0) { struct sockaddr_storage secondaryaddress; if (gai_getsockaddr(&secondaryaddress, multihome_ip, port, AI_PASSIVE, AF_UNSPEC) != 0) { ERROR("Can't get multihome IP address in getaddrinfo, multihome_ip='%s'", multihome_ip); } int ret = sctp_bindx(socket->ss_fd, (struct sockaddr *) &secondaryaddress, 1, SCTP_BINDX_ADD_ADDR); if (ret < 0) { WARNING("Can't bind to multihome address, errno='%d'", errno); } } } #endif /* Pull up to tcp_readsize data bytes out of the socket into our local buffer. */ int SIPpSocket::empty() { int readsize=0; if (ss_transport == T_UDP || ss_transport == T_SCTP) { readsize = SIPP_MAX_MSG_SIZE; } else { readsize = tcp_readsize; } struct socketbuf *socketbuf; char *buffer; int ret = -1; /* Where should we start sending packets to, ideally we should begin to parse * the Via, Contact, and Route headers. But for now SIPp always sends to the * host specified on the command line; or for UAS mode to the address that * sent the last message. */ sipp_socklen_t addrlen = sizeof(struct sockaddr_storage); buffer = (char *)malloc(readsize); if (!buffer) { ERROR("Could not allocate memory for read!"); } socketbuf = alloc_socketbuf(buffer, readsize, NO_COPY, NULL); switch(ss_transport) { case T_TCP: case T_UDP: ret = recvfrom(ss_fd, buffer, readsize, 0, (struct sockaddr *)&socketbuf->addr, &addrlen); break; case T_TLS: #ifdef USE_OPENSSL ret = SSL_read(ss_ssl, buffer, readsize); /* XXX: Check for clean shutdown. */ #else ERROR("TLS support is not enabled!"); #endif break; case T_SCTP: #ifdef USE_SCTP struct sctp_sndrcvinfo recvinfo; memset(&recvinfo, 0, sizeof(recvinfo)); int msg_flags = 0; ret = sctp_recvmsg(ss_fd, (void*)buffer, readsize, (struct sockaddr *) &socketbuf->addr, &addrlen, &recvinfo, &msg_flags); if (MSG_NOTIFICATION & msg_flags) { errno = 0; handleSCTPNotify(buffer); ret = -2; } #else ERROR("SCTP support is not enabled!"); #endif break; } if (ret <= 0) { free_socketbuf(socketbuf); return ret; } socketbuf->len = ret; buffer_read(socketbuf); /* Do we have a complete SIP message? */ if (!ss_msglen) { if (int msg_len = check_for_message()) { ss_msglen = msg_len; pending_messages++; } } return ret; } void SIPpSocket::invalidate() { unsigned pollidx; if (ss_invalid) { return; } #ifdef USE_OPENSSL if (SSL *ssl = ss_ssl) { SSL_set_shutdown(ssl, SSL_SENT_SHUTDOWN|SSL_RECEIVED_SHUTDOWN); SSL_free(ssl); } #endif /* In some error conditions, the socket FD has already been closed - if it hasn't, do so now. */ if (ss_fd != -1) { #ifdef HAVE_EPOLL int rc = epoll_ctl(epollfd, EPOLL_CTL_DEL, ss_fd, NULL); if (rc == -1) { WARNING_NO("Failed to delete FD from epoll"); } #endif } if (ss_fd != -1 && ss_fd != stdin_fileno) { if (ss_transport != T_UDP) { if (shutdown(ss_fd, SHUT_RDWR) < 0) { WARNING_NO("Failed to shutdown socket %d", ss_fd); } } #ifdef USE_SCTP if (ss_transport == T_SCTP && !gracefulclose) { struct linger ling = {1, 0}; if (setsockopt(ss_fd, SOL_SOCKET, SO_LINGER, &ling, sizeof(ling)) < 0) { WARNING("Unable to set SO_LINGER option for SCTP close"); } } #endif if (::close(ss_fd) < 0) { WARNING_NO("Failed to close socket %d", ss_fd); } } if ((pollidx = ss_pollidx) >= pollnfds) { ERROR("Pollset error: index %d is greater than number of fds %d!", pollidx, pollnfds); } ss_fd = -1; ss_invalid = true; ss_pollidx = -1; /* Adds call sockets in the array */ assert(pollnfds > 0); pollnfds--; #ifdef HAVE_EPOLL if (pollidx < pollnfds) { epollfiles[pollidx] = epollfiles[pollnfds]; epollfiles[pollidx].data.u32 = pollidx; if (sockets[pollnfds]->ss_fd != -1) { int rc = epoll_ctl(epollfd, EPOLL_CTL_MOD, sockets[pollnfds]->ss_fd, &epollfiles[pollidx]); if ((rc == -1) && (errno != EPERM)) { // Ignore "Operation not supported" errors - // otherwise we get log spam when redirecting stdout // to /dev/null WARNING_NO("Failed to update FD within epoll"); } } } #else pollfiles[pollidx] = pollfiles[pollnfds]; #endif /* If unequal, move the last valid socket here. */ if (pollidx != pollnfds) { sockets[pollidx] = sockets[pollnfds]; sockets[pollidx]->ss_pollidx = pollidx; } sockets[pollnfds] = NULL; if (ss_msglen) { pending_messages--; } #ifdef USE_SCTP if (ss_transport == T_SCTP) { sctpstate = SCTP_DOWN; } #endif } void SIPpSocket::abort() { /* Disable linger - we'll send a RST when we close. */ struct linger flush; flush.l_onoff = 1; flush.l_linger = 0; setsockopt(ss_fd, SOL_SOCKET, SO_LINGER, &flush, sizeof(flush)); /* Mark the socket as non-blocking. It's not clear whether this is required but can't hurt. */ int flags = fcntl(ss_fd, F_GETFL, 0); fcntl(ss_fd, F_SETFL, flags | O_NONBLOCK); int count = --ss_count; if (count == 0) { invalidate(); sockets_pending_reset.erase(this); delete this; } else { ss_fd = -1; } } void SIPpSocket::close() { int count = --ss_count; if (count == 0) { invalidate(); sockets_pending_reset.erase(this); delete this; } } ssize_t SIPpSocket::read_message(char *buf, size_t len, struct sockaddr_storage *src) { size_t avail; if (!ss_msglen) return 0; if (ss_msglen > len) ERROR("There is a message waiting in sockfd(%d) that is bigger (%zu bytes) than the read size.", ss_fd, ss_msglen); len = ss_msglen; avail = ss_in->len - ss_in->offset; if (avail > len) { avail = len; } memcpy(buf, ss_in->buf + ss_in->offset, avail); memcpy(src, &ss_in->addr, sizeof(ss_in->addr)); /* Update our buffer and return value. */ buf[avail] = '\0'; /* For CMD Message the escape char is the end of message */ if ((ss_control) && buf[avail-1] == 27) buf[avail-1] = '\0'; ss_in->offset += avail; /* Have we emptied the buffer? */ if (ss_in->offset == ss_in->len) { struct socketbuf *next = ss_in->next; free_socketbuf(ss_in); ss_in = next; } if (int msg_len = check_for_message()) { ss_msglen = msg_len; } else { ss_msglen = 0; pending_messages--; } return avail; } void process_message(SIPpSocket *socket, char *msg, ssize_t msg_size, struct sockaddr_storage *src) { // TRACE_MSG(" msg_size %d and pollset_index is %d \n", msg_size, pollset_index)); if (msg_size <= 0) { return; } if (sipMsgCheck(msg, socket) == false) { if (msg_size == 4 && (memcmp(msg, "\r\n\r\n", 4) == 0 || memcmp(msg, "\x00\x00\x00\x00", 4) == 0)) { /* Common keepalives */; } else { WARNING("non SIP message discarded: \"%.*s\" (%zu)", (int)msg_size, msg, msg_size); } return; } const char *call_id = get_trimmed_call_id(msg); if (call_id[0] == '\0') { WARNING("SIP message without Call-ID discarded"); return; } listener *listener_ptr = get_listener(call_id); struct timeval currentTime; GET_TIME (¤tTime); if (useShortMessagef == 1) { TRACE_SHORTMSG("%s\tR\t%s\tCSeq:%s\t%s\n", CStat::formatTime(¤tTime), call_id, get_header_content(msg, "CSeq:"), get_first_line(msg)); } if (useMessagef == 1) { TRACE_MSG("----------------------------------------------- %s\n" "%s %smessage received [%zu] bytes :\n\n%s\n", CStat::formatTime(¤tTime, true), TRANSPORT_TO_STRING(socket->ss_transport), socket->ss_control ? "control " : "", msg_size, msg); } if (!listener_ptr) { if (thirdPartyMode == MODE_3PCC_CONTROLLER_B || thirdPartyMode == MODE_3PCC_A_PASSIVE || thirdPartyMode == MODE_MASTER_PASSIVE || thirdPartyMode == MODE_SLAVE) { // Adding a new OUTGOING call ! main_scenario->stats->computeStat(CStat::E_CREATE_OUTGOING_CALL); call *new_ptr = new call(call_id, local_ip_is_ipv6, 0, use_remote_sending_addr ? &remote_sending_sockaddr : &remote_sockaddr); if (!new_ptr) { ERROR("Out of memory allocating a call!"); } outbound_congestion = false; if ((socket != main_socket) && (socket != tcp_multiplex) && (socket != localTwinSippSocket) && (socket != twinSippSocket) && (!is_a_local_socket(socket))) { new_ptr->associate_socket(socket); socket->ss_count++; } else { /* We need to hook this call up to a real *call* socket. */ if (!multisocket) { switch(transport) { case T_UDP: new_ptr->associate_socket(main_socket); main_socket->ss_count++; break; case T_TCP: case T_SCTP: case T_TLS: new_ptr->associate_socket(tcp_multiplex); tcp_multiplex->ss_count++; break; } } } listener_ptr = new_ptr; } else if (creationMode == MODE_SERVER) { if (quitting >= 1) { CStat::globalStat(CStat::E_OUT_OF_CALL_MSGS); TRACE_MSG("Discarded message for new calls while quitting\n"); return; } // Adding a new INCOMING call ! main_scenario->stats->computeStat(CStat::E_CREATE_INCOMING_CALL); listener_ptr = new call(call_id, socket, use_remote_sending_addr ? &remote_sending_sockaddr : src); if (!listener_ptr) { ERROR("Out of memory allocating a call!"); } } else { // mode != from SERVER and 3PCC Controller B // This is a message that is not relating to any known call if (ooc_scenario) { if (!get_reply_code(msg)) { char *msg_start = strdup(msg); char *msg_start_end = msg_start; while (!isspace(*msg_start_end) && (*msg_start_end != '\0')) { msg_start_end++; } *msg_start_end = '\0'; ooc_scenario->stats->computeStat(CStat::E_CREATE_INCOMING_CALL); WARNING("Received out-of-call %s message, using the out-of-call scenario", msg_start); free(msg_start); /* This should have the real address that the message came from. */ call *call_ptr = new call(ooc_scenario, socket, use_remote_sending_addr ? &remote_sending_sockaddr : src, call_id, 0 /* no user. */, socket->ss_ipv6, true, false); if (!call_ptr) { ERROR("Out of memory allocating a call!"); } CStat::globalStat(CStat::E_AUTO_ANSWERED); call_ptr->process_incoming(msg, src); } else { /* We received a response not relating to any known call */ /* Do nothing, even if in auto answer mode */ CStat::globalStat(CStat::E_OUT_OF_CALL_MSGS); } } else if (auto_answer && ((strstr(msg, "INFO") == msg) || (strstr(msg, "NOTIFY") == msg) || (strstr(msg, "OPTIONS") == msg) || (strstr(msg, "UPDATE") == msg))) { // If auto answer mode, try to answer the incoming message // with automaticResponseMode // call is discarded before exiting the block if (!get_reply_code(msg)) { aa_scenario->stats->computeStat(CStat::E_CREATE_INCOMING_CALL); /* This should have the real address that the message came from. */ call *call_ptr = new call(aa_scenario, socket, use_remote_sending_addr ? &remote_sending_sockaddr : src, call_id, 0 /* no user. */, socket->ss_ipv6, true, false); if (!call_ptr) { ERROR("Out of memory allocating a call!"); } CStat::globalStat(CStat::E_AUTO_ANSWERED); call_ptr->process_incoming(msg, src); } else { fprintf(stderr, "%s", msg); /* We received a response not relating to any known call */ /* Do nothing, even if in auto answer mode */ CStat::globalStat(CStat::E_OUT_OF_CALL_MSGS); } } else { CStat::globalStat(CStat::E_OUT_OF_CALL_MSGS); WARNING("Discarding message which can't be mapped to a known SIPp call:\n%s", msg); } } } /* If the call was not created above, we just drop this message. */ if (!listener_ptr) { return; } if ((socket == localTwinSippSocket) || (socket == twinSippSocket) || (is_a_local_socket(socket))) { listener_ptr -> process_twinSippCom(msg); } else { listener_ptr -> process_incoming(msg, src); } } SIPpSocket::SIPpSocket(bool use_ipv6, int transport, int fd, int accepting): ss_count(1), ss_ipv6(use_ipv6), ss_transport(transport), ss_control(false), ss_fd(fd), ss_bind_port(0), ss_comp_state(NULL), ss_changed_dest(false), ss_congested(false), ss_invalid(false), ss_in(NULL), ss_out(NULL), ss_out_tail(NULL), ss_msglen(0) { /* Initialize all sockets with our destination address. */ memcpy(&ss_dest, &remote_sockaddr, sizeof(ss_dest)); #ifdef USE_OPENSSL ss_ssl = NULL; if (transport == T_TLS) { if ((ss_bio = BIO_new_socket(fd, BIO_NOCLOSE)) == NULL) { ERROR("Unable to create BIO object:Problem with BIO_new_socket()"); } if (!(ss_ssl = (accepting ? SSL_new_server() : SSL_new_client()))) { ERROR("Unable to create SSL object : Problem with SSL_new()"); } SSL_set_bio(ss_ssl, ss_bio, ss_bio); } #endif /* Store this socket in the tables. */ ss_pollidx = pollnfds++; sockets[ss_pollidx] = this; #ifdef HAVE_EPOLL epollfiles[ss_pollidx].data.u32 = ss_pollidx; epollfiles[ss_pollidx].events = EPOLLIN; int rc = epoll_ctl(epollfd, EPOLL_CTL_ADD, ss_fd, &epollfiles[ss_pollidx]); if (rc == -1) { if (errno == EPERM) { // Attempted to use epoll on a file that does not support // it - this may happen legitimately when stdin/stdout is // redirected to /dev/null, so don't warn } else { ERROR_NO("Failed to add FD to epoll"); } } #else pollfiles[ss_pollidx].fd = ss_fd; pollfiles[ss_pollidx].events = POLLIN | POLLERR; pollfiles[ss_pollidx].revents = 0; #endif } static SIPpSocket* sipp_allocate_socket(bool use_ipv6, int transport, int fd) { return new SIPpSocket(use_ipv6, transport, fd, 0); } static int socket_fd(bool use_ipv6, int transport) { int socket_type = -1; int protocol = 0; int fd; switch(transport) { case T_UDP: socket_type = SOCK_DGRAM; protocol = IPPROTO_UDP; break; case T_SCTP: #ifndef USE_SCTP ERROR("You do not have SCTP support enabled!"); #else socket_type = SOCK_STREAM; protocol = IPPROTO_SCTP; #endif break; case T_TLS: #ifndef USE_OPENSSL ERROR("You do not have TLS support enabled!"); #endif case T_TCP: socket_type = SOCK_STREAM; protocol = IPPROTO_TCP; break; } if ((fd = socket(use_ipv6 ? AF_INET6 : AF_INET, socket_type, protocol))== -1) { ERROR_NO("Unable to get a %s socket (3)", TRANSPORT_TO_STRING(transport)); } return fd; } SIPpSocket *new_sipp_socket(bool use_ipv6, int transport) { SIPpSocket *ret; int fd = socket_fd(use_ipv6, transport); ret = sipp_allocate_socket(use_ipv6, transport, fd); if (!ret) { close(fd); ERROR("Could not allocate new socket structure!"); } return ret; } SIPpSocket* SIPpSocket::new_sipp_call_socket(bool use_ipv6, int transport, bool *existing) { SIPpSocket *sock = NULL; static int next_socket; if (pollnfds >= max_multi_socket) { // we must take the main socket into account /* Find an existing socket that matches transport and ipv6 parameters. */ int first = next_socket; do { int test_socket = next_socket; next_socket = (next_socket + 1) % pollnfds; if (sockets[test_socket]->ss_call_socket) { /* Here we need to check that the address is the default. */ if (sockets[test_socket]->ss_ipv6 != use_ipv6) { continue; } if (sockets[test_socket]->ss_transport != transport) { continue; } if (sockets[test_socket]->ss_changed_dest) { continue; } sock = sockets[test_socket]; sock->ss_count++; *existing = true; break; } } while (next_socket != first); if (next_socket == first) { ERROR("Could not find an existing call socket to re-use!"); } } else { sock = new_sipp_socket(use_ipv6, transport); sock->ss_call_socket = true; *existing = false; } return sock; } SIPpSocket* SIPpSocket::accept() { SIPpSocket *ret; struct sockaddr_storage remote_sockaddr; int fd; sipp_socklen_t addrlen = sizeof(remote_sockaddr); if ((fd = ::accept(ss_fd, (struct sockaddr *)&remote_sockaddr, &addrlen))== -1) { ERROR("Unable to accept on a %s socket: %s", TRANSPORT_TO_STRING(transport), strerror(errno)); } #if defined(__SUNOS) if (fd < 256) { int newfd = fcntl(fd, F_DUPFD, 256); if (newfd <= 0) { // Typically, (24)(Too many open files) is the error here WARNING("Unable to get a different %s socket, errno=%d(%s)", TRANSPORT_TO_STRING(transport), errno, strerror(errno)); // Keep the original socket fd. newfd = fd; } else { ::close(fd); } fd = newfd; } #endif ret = new SIPpSocket(ss_ipv6, ss_transport, fd, 1); if (!ret) { ::close(fd); ERROR_NO("Could not allocate new socket!"); } /* We should connect back to the address which connected to us if we * experience a TCP failure. */ memcpy(&ret->ss_dest, &remote_sockaddr, sizeof(ret->ss_dest)); if (ret->ss_transport == T_TLS) { #ifdef USE_OPENSSL int rc; int i = 0; while ((rc = SSL_accept(ret->ss_ssl)) < 0) { int err = SSL_get_error(ret->ss_ssl, rc); if ((err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE) && i < SIPP_SSL_MAX_RETRIES) { /* These errors are benign we just need to wait for the socket * to be readable/writable again. */ WARNING("SSL_accept failed with error: %s. Attempt %d. " "Retrying...", SSL_error_string(err, rc), ++i); sipp_usleep(SIPP_SSL_RETRY_TIMEOUT); continue; } ERROR("Error in SSL_accept: %s", SSL_error_string(err, rc)); break; } #else ERROR("You need to compile SIPp with TLS support"); #endif } return ret; } int sipp_bind_socket(SIPpSocket *socket, struct sockaddr_storage *saddr, int *port) { int ret; int len; #ifdef USE_SCTP if (transport == T_SCTP && multisocket == 1 && port && *port == -1) { sockaddr_update_port(saddr, 0); } #endif if (socket->ss_ipv6) { len = sizeof(struct sockaddr_in6); } else { len = sizeof(struct sockaddr_in); } if ((ret = ::bind(socket->ss_fd, (sockaddr *)saddr, len))) { return ret; } if (!port) { return 0; } if ((ret = getsockname(socket->ss_fd, (sockaddr *)saddr, (sipp_socklen_t *) &len))) { return ret; } if (socket->ss_ipv6) { socket->ss_port = ntohs((short)((_RCAST(struct sockaddr_in6 *, saddr))->sin6_port)); } else { socket->ss_port = ntohs((short)((_RCAST(struct sockaddr_in *, saddr))->sin_port)); } *port = socket->ss_port; #ifdef USE_SCTP if (transport == T_SCTP) { bool isany = false; if (socket->ss_ipv6) { if (memcmp(&(_RCAST(struct sockaddr_in6 *, saddr)->sin6_addr), &in6addr_any, sizeof(in6_addr)) == 0) isany = true; } else { isany = (_RCAST(struct sockaddr_in *, saddr)->sin_addr.s_addr == INADDR_ANY); } if (!isany) { set_multihome_addr(socket, *port); } } #endif return 0; } void SIPpSocket::set_bind_port(int bind_port) { ss_bind_port = bind_port; } int SIPpSocket::connect(struct sockaddr_storage* dest) { if (dest) { memcpy(&ss_dest, dest, sizeof(*dest)); } int ret; assert(ss_transport == T_TCP || ss_transport == T_TLS || ss_transport == T_SCTP); if (ss_transport == T_TCP || ss_transport == T_TLS) { struct sockaddr_storage with_optional_port; int port = -1; memcpy(&with_optional_port, &local_sockaddr, sizeof(struct sockaddr_storage)); if (local_ip_is_ipv6) { (_RCAST(struct sockaddr_in6*, &with_optional_port))->sin6_port = htons(ss_bind_port); } else { (_RCAST(struct sockaddr_in*, &with_optional_port))->sin_port = htons(ss_bind_port); } sipp_bind_socket(this, &with_optional_port, &port); #ifdef USE_SCTP } else if (ss_transport == T_SCTP) { int port = -1; sipp_bind_socket(this, &local_sockaddr, &port); #endif } int flags = fcntl(ss_fd, F_GETFL, 0); fcntl(ss_fd, F_SETFL, flags | O_NONBLOCK); errno = 0; ret = ::connect(ss_fd, _RCAST(struct sockaddr *, &ss_dest), socklen_from_addr(&ss_dest)); if (ret < 0) { if (errno == EINPROGRESS) { /* Block this socket until the connect completes - this is very similar to entering congestion, but we don't want to increment congestion statistics. */ enter_congestion(0); nb_net_cong--; } else { return ret; } } fcntl(ss_fd, F_SETFL, flags); if (ss_transport == T_TLS) { #ifdef USE_OPENSSL int rc; int i = 0; while ((rc = SSL_connect(ss_ssl)) < 0) { int err = SSL_get_error(ss_ssl, rc); if ((err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE) && i < SIPP_SSL_MAX_RETRIES) { /* These errors are benign we just need to wait for the socket * to be readable/writable again. */ WARNING("SSL_connect failed with error: %s. Attempt %d. " "Retrying...", SSL_error_string(err, rc), ++i); sipp_usleep(SIPP_SSL_RETRY_TIMEOUT); continue; } WARNING("Error in SSL connection: %s", SSL_error_string(err, rc)); invalidate(); return err; } #else ERROR("You need to compile SIPp with TLS support"); #endif } #ifdef USE_SCTP if (ss_transport == T_SCTP) { sctpstate = SCTP_CONNECTING; } #endif return 0; } int SIPpSocket::reconnect() { if ((!ss_invalid) && (ss_fd != -1)) { WARNING("When reconnecting socket, already have file descriptor %d", ss_fd); abort(); } ss_fd = socket_fd(ss_ipv6, ss_transport); if (ss_fd == -1) { ERROR_NO("Could not obtain new socket: "); } if (ss_invalid) { #ifdef USE_OPENSSL ss_ssl = NULL; if (transport == T_TLS) { if ((ss_bio = BIO_new_socket(ss_fd, BIO_NOCLOSE)) == NULL) { ERROR("Unable to create BIO object:Problem with BIO_new_socket()"); } if (!(ss_ssl = SSL_new_client())) { ERROR("Unable to create SSL object : Problem with SSL_new()"); } SSL_set_bio(ss_ssl, ss_bio, ss_bio); } #endif /* Store this socket in the tables. */ ss_pollidx = pollnfds++; sockets[ss_pollidx] = this; #ifdef HAVE_EPOLL epollfiles[ss_pollidx].data.u32 = ss_pollidx; epollfiles[ss_pollidx].events = EPOLLIN; #else pollfiles[ss_pollidx].fd = ss_fd; pollfiles[ss_pollidx].events = POLLIN | POLLERR; pollfiles[ss_pollidx].revents = 0; #endif ss_invalid = false; } #ifdef HAVE_EPOLL int rc = epoll_ctl(epollfd, EPOLL_CTL_ADD, ss_fd, &epollfiles[ss_pollidx]); if (rc == -1) { ERROR_NO("Failed to add FD to epoll"); } #endif return connect(); } /*************************** I/O functions ***************************/ /* Allocate a socket buffer. */ struct socketbuf *alloc_socketbuf(char *buffer, size_t size, int copy, struct sockaddr_storage *dest) { struct socketbuf *socketbuf; socketbuf = (struct socketbuf *)malloc(sizeof(struct socketbuf)); if (!socketbuf) { ERROR("Could not allocate socket buffer!"); } memset(socketbuf, 0, sizeof(struct socketbuf)); if (copy) { socketbuf->buf = (char *)malloc(size); if (!socketbuf->buf) { ERROR("Could not allocate socket buffer data!"); } memcpy(socketbuf->buf, buffer, size); } else { socketbuf->buf = buffer; } socketbuf->len = size; socketbuf->offset = 0; if (dest) { memcpy(&socketbuf->addr, dest, sizeof(*dest)); } socketbuf->next = NULL; return socketbuf; } /* Free a poll buffer. */ void free_socketbuf(struct socketbuf *socketbuf) { free(socketbuf->buf); free(socketbuf); } #ifdef USE_SCTP void SIPpSocket::sipp_sctp_peer_params() { if (heartbeat > 0 || pathmaxret > 0) { struct sctp_paddrparams peerparam; memset(&peerparam, 0, sizeof(peerparam)); sockaddr* addresses; #ifdef __SUNOS /* Sun takes a void** instead of a struct sockaddr** */ int addresscount = sctp_getpaddrs(ss_fd, 0, (void**)&addresses); #else int addresscount = sctp_getpaddrs(ss_fd, 0, &addresses); #endif if (addresscount < 1) WARNING("sctp_getpaddrs, errno=%d", errno); for (int i = 0; i < addresscount; i++) { memset(&peerparam.spp_address, 0, sizeof(peerparam.spp_address)); struct sockaddr_storage* peeraddress = (struct sockaddr_storage*) &addresses[i]; memcpy(&peerparam.spp_address, peeraddress, sizeof(*peeraddress)); peerparam.spp_hbinterval = heartbeat; peerparam.spp_pathmaxrxt = pathmaxret; if (heartbeat > 0) peerparam.spp_flags = SPP_HB_ENABLE; if (pmtu > 0) { peerparam.spp_pathmtu = pmtu; peerparam.spp_flags |= SPP_PMTUD_DISABLE; } if (setsockopt(ss_fd, IPPROTO_SCTP, SCTP_PEER_ADDR_PARAMS, &peerparam, sizeof(peerparam)) == -1) { sctp_freepaddrs(addresses); WARNING("setsockopt(SCTP_PEER_ADDR_PARAMS) failed, errno=%d", errno); } } sctp_freepaddrs(addresses); } } #endif void sipp_customize_socket(SIPpSocket *socket) { unsigned int buffsize = buff_size; /* Allows fast TCP reuse of the socket */ if (socket->ss_transport == T_TCP || socket->ss_transport == T_TLS || socket->ss_transport == T_SCTP) { int sock_opt = 1; if (setsockopt(socket->ss_fd, SOL_SOCKET, SO_REUSEADDR, (void *)&sock_opt, sizeof (sock_opt)) == -1) { ERROR_NO("setsockopt(SO_REUSEADDR) failed"); } #ifdef USE_SCTP if (socket->ss_transport == T_SCTP) { struct sctp_event_subscribe event; memset(&event, 0, sizeof(event)); event.sctp_data_io_event = 1; event.sctp_association_event = 1; event.sctp_shutdown_event = 1; if (setsockopt(socket->ss_fd, IPPROTO_SCTP, SCTP_EVENTS, &event, sizeof(event)) == -1) { ERROR_NO("setsockopt(SCTP_EVENTS) failed, errno=%d", errno); } if (assocmaxret > 0) { struct sctp_assocparams associnfo; memset(&associnfo, 0, sizeof(associnfo)); associnfo.sasoc_asocmaxrxt = assocmaxret; if (setsockopt(socket->ss_fd, IPPROTO_SCTP, SCTP_ASSOCINFO, &associnfo, sizeof(associnfo)) == -1) { WARNING("setsockopt(SCTP_ASSOCINFO) failed, errno=%d", errno); } } if (setsockopt(socket->ss_fd, IPPROTO_SCTP, SCTP_NODELAY, (void *)&sock_opt, sizeof (sock_opt)) == -1) { WARNING("setsockopt(SCTP_NODELAY) failed, errno=%d", errno); } } #endif #ifndef SOL_TCP #define SOL_TCP 6 #endif if (socket->ss_transport != T_SCTP) { if (setsockopt(socket->ss_fd, SOL_TCP, TCP_NODELAY, (void *)&sock_opt, sizeof (sock_opt)) == -1) { { ERROR_NO("setsockopt(TCP_NODELAY) failed"); } } } { struct linger linger; linger.l_onoff = 1; linger.l_linger = 1; if (setsockopt (socket->ss_fd, SOL_SOCKET, SO_LINGER, &linger, sizeof (linger)) < 0) { ERROR_NO("Unable to set SO_LINGER option"); } } } /* Increase buffer sizes for this sockets */ if (setsockopt(socket->ss_fd, SOL_SOCKET, SO_SNDBUF, &buffsize, sizeof(buffsize))) { ERROR_NO("Unable to set socket sndbuf"); } buffsize = buff_size; if (setsockopt(socket->ss_fd, SOL_SOCKET, SO_RCVBUF, &buffsize, sizeof(buffsize))) { ERROR_NO("Unable to set socket rcvbuf"); } } /* This socket is congested, mark it as such and add it to the poll files. */ int SIPpSocket::enter_congestion(int again) { if (!ss_congested) { nb_net_cong++; } ss_congested = true; TRACE_MSG("Problem %s on socket %d and poll_idx is %d \n", again == EWOULDBLOCK ? "EWOULDBLOCK" : "EAGAIN", ss_fd, ss_pollidx); #ifdef HAVE_EPOLL epollfiles[ss_pollidx].events |= EPOLLOUT; int rc = epoll_ctl(epollfd, EPOLL_CTL_MOD, ss_fd, &epollfiles[ss_pollidx]); if (rc == -1) { WARNING_NO("Failed to set EPOLLOUT"); } #else pollfiles[ss_pollidx].events |= POLLOUT; #endif #ifdef USE_SCTP if (ss_transport == T_SCTP && sctpstate == SCTP_CONNECTING) return 0; #endif return -1; } int SIPpSocket::write_error(int ret) { const char *errstring = strerror(errno); #ifndef EAGAIN int again = (errno == EWOULDBLOCK) ? errno : 0; #else int again = ((errno == EAGAIN) || (errno == EWOULDBLOCK)) ? errno : 0; /* Scrub away EAGAIN from the rest of the code. */ if (errno == EAGAIN) { errno = EWOULDBLOCK; } #endif if (again) { return enter_congestion(again); } if ((ss_transport == T_TCP || ss_transport == T_SCTP) && errno == EPIPE) { nb_net_send_errors++; abort(); sockets_pending_reset.insert(this); if (reconnect_allowed()) { WARNING("Broken pipe on TCP connection, remote peer " "probably closed the socket"); } else { ERROR("Broken pipe on TCP connection, remote peer " "probably closed the socket"); } return -1; } #ifdef USE_OPENSSL if (ss_transport == T_TLS) { errstring = SSL_error_string(SSL_get_error(ss_ssl, ret), ret); } #endif WARNING("Unable to send %s message: %s", TRANSPORT_TO_STRING(ss_transport), errstring); nb_net_send_errors++; return -1; } int SIPpSocket::read_error(int ret) { const char *errstring = strerror(errno); #ifdef USE_OPENSSL if (ss_transport == T_TLS) { int err = SSL_get_error(ss_ssl, ret); if (err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE) { /* This is benign - we just need to wait for the socket to be * readable/writable again, which will happen naturally as part * of the poll/epoll loop. */ WARNING("SSL_read failed with error: %s. Retrying...", SSL_error_string(err, ret)); return 1; } } #endif assert(ret <= 0); #ifdef EAGAIN /* Scrub away EAGAIN from the rest of the code. */ if (errno == EAGAIN) { errno = EWOULDBLOCK; } #endif /* We have only non-blocking reads, so this should not occur. The OpenSSL * functions don't set errno, though, so this check doesn't make sense * for TLS sockets. */ if (ret < 0 && ss_transport != T_TLS) { assert(errno != EAGAIN); } if (ss_transport == T_TCP || ss_transport == T_TLS) { if (ret == 0) { /* The remote side closed the connection. */ if (ss_control) { if (localTwinSippSocket) localTwinSippSocket->close(); if (extendedTwinSippMode) { close_peer_sockets(); close_local_sockets(); free_peer_addr_map(); WARNING("One of the twin instances has ended -> exiting"); quitting += 20; } else if (twinSippMode) { if (twinSippSocket) twinSippSocket->close(); if (thirdPartyMode == MODE_3PCC_CONTROLLER_B) { WARNING("3PCC controller A has ended -> exiting"); quitting += 20; } else { quitting = 1; } } } else { /* The socket was closed "cleanly", but we may have calls that need to * be destroyed. Also, if these calls are not complete, and attempt to * send again we may "ressurect" the socket by reconnecting it.*/ invalidate(); if (reset_close) { close_calls(); } } return 0; } abort(); sockets_pending_reset.insert(this); nb_net_recv_errors++; if (reconnect_allowed()) { WARNING("Error on TCP connection, remote peer probably closed the socket: %s", errstring); } else { ERROR("Error on TCP connection, remote peer probably closed the socket: %s", errstring); } return -1; } WARNING("Unable to receive %s message: %s", TRANSPORT_TO_STRING(ss_transport), errstring); nb_net_recv_errors++; return -1; } void SIPpSocket::buffer_write(const char *buffer, size_t len, struct sockaddr_storage *dest) { struct socketbuf *buf = ss_out; if (!buf) { ss_out = alloc_socketbuf(const_cast(buffer), len, DO_COPY, dest); /* NO BUG BECAUSE OF DO_COPY */ ss_out_tail = ss_out; TRACE_MSG("Added first buffered message to socket %d\n", ss_fd); return; } ss_out_tail->next = alloc_socketbuf(const_cast(buffer), len, DO_COPY, dest); /* NO BUG BECAUSE OF DO_COPY */ ss_out_tail = ss_out_tail->next; TRACE_MSG("Appended buffered message to socket %d\n", ss_fd); } void SIPpSocket::buffer_read(struct socketbuf *newbuf) { struct socketbuf *buf = ss_in; struct socketbuf *prev = buf; if (!buf) { ss_in = newbuf; return; } while (buf->next) { prev = buf; buf = buf->next; } prev->next = newbuf; } #ifdef USE_OPENSSL static int send_nowait_tls(SSL* ssl, const void* msg, int len, int /*flags*/) { int initial_fd_flags; int rc; int fd; int fd_flags; int i = 0; if ((fd = SSL_get_fd(ssl)) == -1) { return -1; } fd_flags = fcntl(fd, F_GETFL, NULL); initial_fd_flags = fd_flags; fd_flags |= O_NONBLOCK; fcntl(fd, F_SETFL, fd_flags); while ((rc = SSL_write(ssl, msg, len)) < 0) { int err = SSL_get_error(ssl, rc); if ((err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE) && i < SIPP_SSL_MAX_RETRIES) { /* These errors are benign we just need to wait for the socket * to be readable/writable again. */ WARNING("SSL_write failed with error: %s. Attempt %d. " "Retrying...", SSL_error_string(err, rc), ++i); sipp_usleep(SIPP_SSL_RETRY_TIMEOUT); continue; } return rc; } if (rc == 0) { return rc; } fcntl(fd, F_SETFL, initial_fd_flags); return rc; } #endif static int send_nowait(int s, const void* msg, int len, int flags) { #if defined(MSG_DONTWAIT) && !defined(__SUNOS) return send(s, msg, len, flags | MSG_DONTWAIT); #else int fd_flags = fcntl(s, F_GETFL , NULL); int initial_fd_flags; int rc; initial_fd_flags = fd_flags; // fd_flags &= ~O_ACCMODE; // Remove the access mode from the value fd_flags |= O_NONBLOCK; fcntl(s, F_SETFL , fd_flags); rc = send(s, msg, len, flags); fcntl(s, F_SETFL , initial_fd_flags); return rc; #endif } #ifdef USE_SCTP int send_sctp_nowait(int s, const void *msg, int len, int flags) { struct sctp_sndrcvinfo sinfo; memset(&sinfo, 0, sizeof(sinfo)); sinfo.sinfo_flags = SCTP_UNORDERED; // according to RFC4168 5.1 sinfo.sinfo_stream = 0; #if defined(MSG_DONTWAIT) && !defined(__SUNOS) return sctp_send(s, msg, len, &sinfo, flags | MSG_DONTWAIT); #else int fd_flags = fcntl(s, F_GETFL, NULL); int initial_fd_flags; int rc; initial_fd_flags = fd_flags; fd_flags |= O_NONBLOCK; fcntl(s, F_SETFL , fd_flags); rc = sctp_send(s, msg, len, &sinfo, flags); fcntl(s, F_SETFL, initial_fd_flags); return rc; #endif } #endif ssize_t SIPpSocket::write_primitive(const char* buffer, size_t len, struct sockaddr_storage* dest) { ssize_t rc; /* Refuse to write to invalid sockets. */ if (ss_invalid) { WARNING("Returning EPIPE on invalid socket: %p (%d)", _RCAST(void*, this), ss_fd); errno = EPIPE; return -1; } /* Always check congestion before sending. */ if (ss_congested) { errno = EWOULDBLOCK; return -1; } switch(ss_transport) { case T_TLS: #ifdef USE_OPENSSL rc = send_nowait_tls(ss_ssl, buffer, len, 0); #else errno = EOPNOTSUPP; rc = -1; #endif break; case T_SCTP: #ifdef USE_SCTP TRACE_MSG("socket_write_primitive %d\n", sctpstate); if (sctpstate == SCTP_DOWN) { errno = EPIPE; return -1; } else if (sctpstate == SCTP_CONNECTING) { errno = EWOULDBLOCK; return -1; } rc = send_sctp_nowait(ss_fd, buffer, len, 0); #else errno = EOPNOTSUPP; rc = -1; #endif break; case T_TCP: rc = send_nowait(ss_fd, buffer, len, 0); break; case T_UDP: if (compression) { static char comp_msg[SIPP_MAX_MSG_SIZE]; strncpy(comp_msg, buffer, sizeof(comp_msg) - 1); if (comp_compress(&ss_comp_state, comp_msg, (unsigned int *) &len) != COMP_OK) { ERROR("Compression plugin error"); } buffer = (char *)comp_msg; TRACE_MSG("---\nCompressed message len: %zu\n", len); } rc = sendto(ss_fd, buffer, len, 0, _RCAST(struct sockaddr*, dest), socklen_from_addr(dest)); break; default: ERROR("Internal error, unknown transport type %d", ss_transport); } return rc; } /* Flush any output buffers for this socket. */ int SIPpSocket::flush() { struct socketbuf *buf; int ret; while ((buf = ss_out)) { ssize_t size = buf->len - buf->offset; ret = write_primitive(buf->buf + buf->offset, size, &buf->addr); TRACE_MSG("Wrote %d of %zu bytes in an output buffer.\n", ret, size); if (ret == size) { /* Everything is great, throw away this buffer. */ ss_out = buf->next; free_socketbuf(buf); } else if (ret <= 0) { /* Handle connection closes and errors. */ return write_error(ret); } else { /* We have written more of the partial buffer. */ buf->offset += ret; errno = EWOULDBLOCK; enter_congestion(EWOULDBLOCK); return -1; } } return 0; } /* Write data to a socket. */ int SIPpSocket::write(const char *buffer, ssize_t len, int flags, struct sockaddr_storage *dest) { int rc; if (ss_out) { rc = flush(); TRACE_MSG("Attempted socket flush returned %d\r\n", rc); if (rc < 0) { if ((errno == EWOULDBLOCK) && (flags & WS_BUFFER)) { buffer_write(buffer, len, dest); return len; } else { return rc; } } } rc = write_primitive(buffer, len, dest); struct timeval currentTime; GET_TIME (¤tTime); if (rc == len) { /* Everything is great. */ if (useMessagef == 1) { TRACE_MSG("----------------------------------------------- %s\n" "%s %smessage sent (%zu bytes):\n\n%.*s\n", CStat::formatTime(¤tTime, true), TRANSPORT_TO_STRING(ss_transport), ss_control ? "control " : "", len, (int)len, buffer); } if (useShortMessagef == 1) { char *msg = strdup(buffer); const char *call_id = get_trimmed_call_id(msg); TRACE_SHORTMSG("%s\tS\t%s\tCSeq:%s\t%s\n", CStat::formatTime(¤tTime), call_id, get_header_content(msg, "CSeq:"), get_first_line(msg)); free(msg); } } else if (rc <= 0) { if ((errno == EWOULDBLOCK) && (flags & WS_BUFFER)) { buffer_write(buffer, len, dest); enter_congestion(errno); return len; } if (useMessagef == 1) { TRACE_MSG("----------------------------------------------- %s\n" "Error sending %s message:\n\n%.*s\n", CStat::formatTime(¤tTime, true), TRANSPORT_TO_STRING(ss_transport), (int)len, buffer); } return write_error(errno); } else { /* We have a truncated message, which must be handled internally to the write function. */ if (useMessagef == 1) { TRACE_MSG("----------------------------------------------- %s\n" "Truncation sending %s message (%d of %zu sent):\n\n%.*s\n", CStat::formatTime(¤tTime, true), TRANSPORT_TO_STRING(ss_transport), rc, len, (int)len, buffer); } buffer_write(buffer + rc, len - rc, dest); enter_congestion(errno); } return rc; } bool reconnect_allowed() { if (reset_number == -1) { return true; } return (reset_number > 0); } void SIPpSocket::reset_connection() { if (!reconnect_allowed()) { ERROR_NO("Max number of reconnections reached"); } if (reset_number != -1) { reset_number--; } if (reset_close) { WARNING("Closing calls, because of TCP reset or close!"); close_calls(); } /* Sleep for some period of time before the reconnection. */ usleep(1000 * reset_sleep); if (reconnect() < 0) { WARNING_NO("Could not reconnect TCP socket"); close_calls(); } else { WARNING("Socket required a reconnection."); } } /* Close just those calls for a given socket (e.g., if the remote end closes * the connection. */ void SIPpSocket::close_calls() { owner_list *owners = get_owners_for_socket(this); owner_list::iterator owner_it; socketowner *owner_ptr = NULL; for (owner_it = owners->begin(); owner_it != owners->end(); owner_it++) { owner_ptr = *owner_it; if (owner_ptr) { owner_ptr->tcpClose(); } } delete owners; } int open_connections() { int status=0; int family_hint = PF_UNSPEC; local_port = 0; if (!strlen(remote_host)) { if ((sendMode != MODE_SERVER)) { ERROR("Missing remote host parameter. This scenario requires it"); } } else { int temp_remote_port; get_host_and_port(remote_host, remote_host, &temp_remote_port); if (temp_remote_port != 0) { remote_port = temp_remote_port; } /* Resolving the remote IP */ { fprintf(stderr, "Resolving remote host '%s'... ", remote_host); /* FIXME: add DNS SRV support using liburli? */ if (gai_getsockaddr(&remote_sockaddr, remote_host, remote_port, AI_PASSIVE, AF_UNSPEC) != 0) { ERROR("Unknown remote host '%s'.\n" "Use 'sipp -h' for details", remote_host); } get_inet_address(&remote_sockaddr, remote_ip, sizeof(remote_ip)); family_hint = remote_sockaddr.ss_family; if (remote_sockaddr.ss_family == AF_INET) { strcpy(remote_ip_escaped, remote_ip); } else { sprintf(remote_ip_escaped, "[%s]", remote_ip); } fprintf(stderr, "Done.\n"); } } { /* Yuck. Populate local_sockaddr with "our IP" first, and then * replace it with INADDR_ANY if we did not request a specific * IP to bind on. */ bool bind_specific = false; memset(&local_sockaddr, 0, sizeof(struct sockaddr_storage)); if (strlen(local_ip) || !strlen(remote_host)) { int ret; struct addrinfo * local_addr; struct addrinfo hints; memset((char*)&hints, 0, sizeof(hints)); hints.ai_flags = AI_PASSIVE; hints.ai_family = family_hint; if (strlen(local_ip)) { bind_specific = true; } else { /* Bind on gethostname() IP by default. This is actually * buggy. We should be able to bind on :: and decide on * accept() what Contact IP we use. Right now, if we do * that, we'd send [::] in the contact and :: in the RTP * as "our IP". */ if (gethostname(local_ip, sizeof(local_ip)) != 0) { ERROR_NO("Can't get local hostname"); } } /* Resolving local IP */ if ((ret = getaddrinfo(local_ip, NULL, &hints, &local_addr)) != 0) { if (ret == EAI_ADDRFAMILY) { ERROR("Network family mismatch for local and remote IP"); } else { ERROR("Can't get local IP address in getaddrinfo, " "local_ip='%s', ret=%d", local_ip, ret); } } memcpy(&local_sockaddr, local_addr->ai_addr, local_addr->ai_addrlen); freeaddrinfo(local_addr); if (!bind_specific) { get_inet_address(&local_sockaddr, local_ip, sizeof(local_ip)); } } else { /* Get temp socket on UDP to find out our local address */ int tmpsock = -1; socklen_t len = sizeof(local_sockaddr); if ((tmpsock = socket(remote_sockaddr.ss_family, SOCK_DGRAM, IPPROTO_UDP)) < 0 || ::connect(tmpsock, _RCAST(struct sockaddr*, &remote_sockaddr), socklen_from_addr(&remote_sockaddr)) < 0 || getsockname(tmpsock, _RCAST(struct sockaddr*, &local_sockaddr), &len) < 0) { if (tmpsock >= 0) { close(tmpsock); } ERROR_NO("Failed to find our local ip"); } close(tmpsock); get_inet_address(&local_sockaddr, local_ip, sizeof(local_ip)); } /* Store local addr info for rsa option */ memcpy(&local_addr_storage, &local_sockaddr, sizeof(local_sockaddr)); if (local_sockaddr.ss_family == AF_INET) { strcpy(local_ip_escaped, local_ip); if (!bind_specific) { _RCAST(struct sockaddr_in*, &local_sockaddr)->sin_addr.s_addr = INADDR_ANY; } } else { local_ip_is_ipv6 = true; sprintf(local_ip_escaped, "[%s]", local_ip); if (!bind_specific) { memcpy(&_RCAST(struct sockaddr_in6*, &local_sockaddr)->sin6_addr, &in6addr_any, sizeof(in6addr_any)); } } } /* Creating and binding the local socket */ if ((main_socket = new_sipp_socket(local_ip_is_ipv6, transport)) == NULL) { ERROR_NO("Unable to get the local socket"); } sipp_customize_socket(main_socket); /* Trying to bind local port */ char peripaddr[256]; if (!user_port) { unsigned short l_port; for (l_port = DEFAULT_PORT; l_port < (DEFAULT_PORT + 60); l_port++) { // Bind socket to local_ip if (bind_local || peripsocket) { if (peripsocket) { // On some machines it fails to bind to the self computed local // IP address. // For the socket per IP mode, bind the main socket to the // first IP address specified in the inject file. inFiles[ip_file]->getField(0, peripfield, peripaddr, sizeof(peripaddr)); if (gai_getsockaddr(&local_sockaddr, peripaddr, const_char_nullptr, AI_PASSIVE, AF_UNSPEC) != 0) { ERROR("Unknown host '%s'.\n" "Use 'sipp -h' for details", peripaddr); } } else { if (gai_getsockaddr(&local_sockaddr, local_ip, const_char_nullptr, AI_PASSIVE, AF_UNSPEC) != 0) { ERROR("Unknown host '%s'.\n" "Use 'sipp -h' for details", peripaddr); } } } sockaddr_update_port(&local_sockaddr, l_port); if (sipp_bind_socket(main_socket, &local_sockaddr, &local_port) == 0) { break; } } } if (!local_port) { /* Not already bound, use user_port of 0 to leave * the system choose a port. */ if (bind_local || peripsocket) { if (peripsocket) { // On some machines it fails to bind to the self computed local // IP address. // For the socket per IP mode, bind the main socket to the // first IP address specified in the inject file. inFiles[ip_file]->getField(0, peripfield, peripaddr, sizeof(peripaddr)); if (gai_getsockaddr(&local_sockaddr, peripaddr, const_char_nullptr, AI_PASSIVE, AF_UNSPEC) != 0) { ERROR("Unknown host '%s'.\n" "Use 'sipp -h' for details", peripaddr); } } else { if (gai_getsockaddr(&local_sockaddr, local_ip, const_char_nullptr, AI_PASSIVE, AF_UNSPEC) != 0) { ERROR("Unknown host '%s'.\n" "Use 'sipp -h' for details", peripaddr); } } } sockaddr_update_port(&local_sockaddr, user_port); if (sipp_bind_socket(main_socket, &local_sockaddr, &local_port)) { ERROR_NO("Unable to bind main socket"); } } if (peripsocket) { // Add the main socket to the socket per subscriber map map_perip_fd[peripaddr] = main_socket; } // Create additional server sockets when running in socket per // IP address mode. if (peripsocket && sendMode == MODE_SERVER) { struct sockaddr_storage server_sockaddr; char peripaddr[256]; SIPpSocket *sock; unsigned int lines = inFiles[ip_file]->numLines(); for (unsigned int i = 0; i < lines; i++) { inFiles[ip_file]->getField(i, peripfield, peripaddr, sizeof(peripaddr)); map::iterator j; j = map_perip_fd.find(peripaddr); if (j == map_perip_fd.end()) { if (gai_getsockaddr(&server_sockaddr, peripaddr, local_port, AI_PASSIVE, AF_UNSPEC) != 0) { ERROR("Unknown remote host '%s'.\n" "Use 'sipp -h' for details", peripaddr); } bool is_ipv6 = (server_sockaddr.ss_family == AF_INET6); if ((sock = new_sipp_socket(is_ipv6, transport)) == NULL) { ERROR_NO("Unable to get server socket"); } sipp_customize_socket(sock); if (sipp_bind_socket(sock, &server_sockaddr, NULL)) { ERROR_NO("Unable to bind server socket"); } map_perip_fd[peripaddr] = sock; } } } if ((!multisocket) && (transport == T_TCP || transport == T_TLS || transport == T_SCTP) && (sendMode != MODE_SERVER)) { if ((tcp_multiplex = new_sipp_socket(local_ip_is_ipv6, transport)) == NULL) { ERROR_NO("Unable to get a TCP socket"); } /* If there is a user-supplied local port and we use a single * socket, then bind to the specified port. */ if (user_port) { tcp_multiplex->set_bind_port(local_port); } /* OJA FIXME: is it correct? */ if (use_remote_sending_addr) { remote_sockaddr = remote_sending_sockaddr; } sipp_customize_socket(tcp_multiplex); if (tcp_multiplex->connect(&remote_sockaddr)) { if (reset_number > 0) { WARNING("Failed to reconnect"); main_socket->close(); main_socket = NULL; reset_number--; return 1; } else { if (errno == EINVAL) { /* This occurs sometime on HPUX but is not a true INVAL */ ERROR_NO("Unable to connect a TCP socket, remote peer error.\n" "Use 'sipp -h' for details"); } else { ERROR_NO("Unable to connect a TCP socket.\n" "Use 'sipp -h' for details"); } } } } if (transport == T_TCP || transport == T_TLS || transport == T_SCTP) { if (listen(main_socket->ss_fd, 100)) { ERROR_NO("Unable to listen main socket"); } } /* Trying to connect to Twin Sipp in 3PCC mode */ if (twinSippMode) { if (thirdPartyMode == MODE_3PCC_CONTROLLER_A || thirdPartyMode == MODE_3PCC_A_PASSIVE) { connect_to_peer(twinSippHost, twinSippPort, &twinSipp_sockaddr, twinSippIp, &twinSippSocket); } else if (thirdPartyMode == MODE_3PCC_CONTROLLER_B) { connect_local_twin_socket(twinSippHost); } else { ERROR("TwinSipp Mode enabled but thirdPartyMode is different " "from 3PCC_CONTROLLER_B and 3PCC_CONTROLLER_A\n"); } } else if (extendedTwinSippMode) { if (thirdPartyMode == MODE_MASTER || thirdPartyMode == MODE_MASTER_PASSIVE) { strncpy(twinSippHost, get_peer_addr(master_name), sizeof(twinSippHost) - 1); get_host_and_port(twinSippHost, twinSippHost, &twinSippPort); connect_local_twin_socket(twinSippHost); connect_to_all_peers(); } else if (thirdPartyMode == MODE_SLAVE) { strncpy(twinSippHost, get_peer_addr(slave_number), sizeof(twinSippHost) - 1); get_host_and_port(twinSippHost, twinSippHost, &twinSippPort); connect_local_twin_socket(twinSippHost); } else { ERROR("extendedTwinSipp Mode enabled but thirdPartyMode is different " "from MASTER and SLAVE\n"); } } return status; } void connect_to_peer(char *peer_host, int peer_port, struct sockaddr_storage *peer_sockaddr, char *peer_ip, SIPpSocket **peer_socket) { /* Resolving the peer IP */ printf("Resolving peer address : %s...\n", peer_host); bool is_ipv6 = false; /* Resolving twin IP */ if (gai_getsockaddr(peer_sockaddr, peer_host, peer_port, AI_PASSIVE, AF_UNSPEC) != 0) { ERROR("Unknown peer host '%s'.\n" "Use 'sipp -h' for details", peer_host); } if (peer_sockaddr->ss_family == AF_INET6) { is_ipv6 = true; } get_inet_address(peer_sockaddr, peer_ip, sizeof(peer_ip)); if ((*peer_socket = new_sipp_socket(is_ipv6, T_TCP)) == NULL) { ERROR_NO("Unable to get a twin sipp TCP socket"); } /* Mark this as a control socket. */ (*peer_socket)->ss_control = 1; if ((*peer_socket)->connect(peer_sockaddr)) { if (errno == EINVAL) { /* This occurs sometime on HPUX but is not a true INVAL */ ERROR_NO("Unable to connect a twin sipp TCP socket\n " ", remote peer error.\n" "Use 'sipp -h' for details"); } else { ERROR_NO("Unable to connect a twin sipp socket " "\n" "Use 'sipp -h' for details"); } } sipp_customize_socket(*peer_socket); } SIPpSocket **get_peer_socket(char * peer) { peer_map::iterator peer_it; peer_it = peers.find(peer_map::key_type(peer)); if (peer_it != peers.end()) { return &peer_it->second.peer_socket; } else { ERROR("get_peer_socket: Peer %s not found", peer); } return NULL; } char * get_peer_addr(char * peer) { char * addr; peer_addr_map::iterator peer_addr_it; peer_addr_it = peer_addrs.find(peer_addr_map::key_type(peer)); if (peer_addr_it != peer_addrs.end()) { addr = peer_addr_it->second; return addr; } else { ERROR("get_peer_addr: Peer %s not found", peer); } return NULL; } bool is_a_peer_socket(SIPpSocket *peer_socket) { peer_socket_map::iterator peer_socket_it; peer_socket_it = peer_sockets.find(peer_socket_map::key_type(peer_socket)); if (peer_socket_it == peer_sockets.end()) { return false; } else { return true; } } void connect_local_twin_socket(char * twinSippHost) { /* Resolving the listener IP */ printf("Resolving listener address : %s...\n", twinSippHost); bool is_ipv6 = false; /* Resolving twin IP */ if (gai_getsockaddr(&twinSipp_sockaddr, twinSippHost, twinSippPort, AI_PASSIVE, AF_UNSPEC) != 0) { ERROR("Unknown twin host '%s'.\n" "Use 'sipp -h' for details", twinSippHost); } if (twinSipp_sockaddr.ss_family == AF_INET6) { is_ipv6 = true; } get_inet_address(&twinSipp_sockaddr, twinSippIp, sizeof(twinSippIp)); if ((localTwinSippSocket = new_sipp_socket(is_ipv6, T_TCP)) == NULL) { ERROR_NO("Unable to get a listener TCP socket "); } memset(&localTwin_sockaddr, 0, sizeof(struct sockaddr_storage)); localTwin_sockaddr.ss_family = is_ipv6 ? AF_INET6 : AF_INET; sockaddr_update_port(&localTwin_sockaddr, twinSippPort); sipp_customize_socket(localTwinSippSocket); if (sipp_bind_socket(localTwinSippSocket, &localTwin_sockaddr, 0)) { ERROR_NO("Unable to bind twin sipp socket "); } if (listen(localTwinSippSocket->ss_fd, 100)) { ERROR_NO("Unable to listen twin sipp socket in "); } } void close_peer_sockets() { peer_map::iterator peer_it, __end; for (peer_it = peers.begin(), __end = peers.end(); peer_it != __end; ++peer_it) { T_peer_infos infos = peer_it->second; infos.peer_socket->close(); infos.peer_socket = NULL; peers[std::string(peer_it->first)] = infos; } peers_connected = 0; } void close_local_sockets() { for (int i = 0; i< local_nb; i++) { local_sockets[i]->close(); local_sockets[i] = NULL; } } void connect_to_all_peers() { peer_map::iterator peer_it; T_peer_infos infos; for (peer_it = peers.begin(); peer_it != peers.end(); peer_it++) { infos = peer_it->second; get_host_and_port(infos.peer_host, infos.peer_host, &infos.peer_port); connect_to_peer(infos.peer_host, infos.peer_port, &(infos.peer_sockaddr), infos.peer_ip, &(infos.peer_socket)); peer_sockets[infos.peer_socket] = peer_it->first; peers[std::string(peer_it->first)] = infos; } peers_connected = 1; } bool is_a_local_socket(SIPpSocket *s) { for (int i = 0; i< local_nb + 1; i++) { if (local_sockets[i] == s) return true; } return (false); } void free_peer_addr_map() { peer_addr_map::iterator peer_addr_it; for (peer_addr_it = peer_addrs.begin(); peer_addr_it != peer_addrs.end(); peer_addr_it++) { free(peer_addr_it->second); } } void SIPpSocket::pollset_process(int wait) { int rs; /* Number of times to execute recv(). For TCP with 1 socket per call: no. of events returned by poll For UDP and TCP with 1 global socket: recv_count is a flag that stays up as long as there's data to read */ #ifndef HAVE_EPOLL /* What index should we try reading from? */ static size_t read_index; int loops = max_recv_loops; // If not using epoll, we have a queue of pending messages to spin through. if (read_index >= pollnfds) { read_index = 0; } /* We need to process any messages that we have left over. */ while (pending_messages && loops > 0) { getmilliseconds(); if (sockets[read_index]->ss_msglen) { struct sockaddr_storage src; char msg[SIPP_MAX_MSG_SIZE]; ssize_t len = sockets[read_index]->read_message(msg, sizeof(msg), &src); if (len > 0) { process_message(sockets[read_index], msg, len, &src); } else { assert(0); } loops--; } read_index = (read_index + 1) % pollnfds; } /* Don't read more data if we still have some left over. */ if (pending_messages) { return; } #endif /* Get socket events. */ #ifdef HAVE_EPOLL /* Ignore the wait parameter and always wait - when establishing TCP * connections, the alternative is that we tight-loop. */ rs = epoll_wait(epollfd, epollevents, max_recv_loops, 1); // If we're receiving as many epollevents as possible, flag CPU congestion cpu_max = (rs > (max_recv_loops - 2)); #else rs = poll(pollfiles, pollnfds, wait ? 1 : 0); #endif if (rs < 0 && errno == EINTR) { return; } /* We need to flush all sockets and pull data into all of our buffers. */ #ifdef HAVE_EPOLL for (int event_idx = 0; event_idx < rs; event_idx++) { int poll_idx = (int)epollevents[event_idx].data.u32; #else for (size_t poll_idx = 0; rs > 0 && poll_idx < pollnfds; poll_idx++) { #endif SIPpSocket *sock = sockets[poll_idx]; int events = 0; int ret = 0; assert(sock); #ifdef HAVE_EPOLL if (epollevents[event_idx].events & EPOLLOUT) { #else if (pollfiles[poll_idx].revents & POLLOUT) { #endif #ifdef USE_SCTP if (transport == T_SCTP && sock->sctpstate != SCTP_UP); else #endif { /* We can flush this socket. */ TRACE_MSG("Exit problem event on socket %d \n", sock->ss_fd); #ifdef HAVE_EPOLL epollfiles[poll_idx].events &= ~EPOLLOUT; int rc = epoll_ctl(epollfd, EPOLL_CTL_MOD, sock->ss_fd, &epollfiles[poll_idx]); if (rc == -1) { ERROR_NO("Failed to clear EPOLLOUT"); } #else pollfiles[poll_idx].events &= ~POLLOUT; #endif sock->ss_congested = false; sock->flush(); events++; } } #ifdef HAVE_EPOLL if (epollevents[event_idx].events & EPOLLIN) { #else if (pollfiles[poll_idx].revents & POLLIN) { #endif /* We can empty this socket. */ if ((transport == T_TCP || transport == T_TLS || transport == T_SCTP) && sock == main_socket) { SIPpSocket *new_sock = sock->accept(); if (!new_sock) { ERROR_NO("Accepting new TCP connection"); } } else if (sock == ctrl_socket) { handle_ctrl_socket(); } else if (sock == stdin_socket) { handle_stdin_socket(); } else if (sock == localTwinSippSocket) { if (thirdPartyMode == MODE_3PCC_CONTROLLER_B) { twinSippSocket = sock->accept(); if (!twinSippMode) { ERROR_NO("Accepting new TCP connection on Twin SIPp Socket"); } twinSippSocket->ss_control = 1; } else { /* 3pcc extended mode: open a local socket which will be used for reading the infos sent by this remote twin sipp instance (slave or master) */ if (local_nb == MAX_LOCAL_TWIN_SOCKETS) { ERROR("Max number of twin instances reached"); } SIPpSocket *localSocket = sock->accept(); localSocket->ss_control = 1; local_sockets[local_nb] = localSocket; local_nb++; if (!peers_connected) { connect_to_all_peers(); } } } else { if ((ret = sock->empty()) <= 0) { #ifdef USE_SCTP if (sock->ss_transport == T_SCTP && ret == -2); else #endif { ret = sock->read_error(ret); if (ret == 0) { /* If read_error() then the poll_idx now belongs * to the newest/last socket added to the sockets[]. * Need to re-do the same poll_idx for the "new" socket. * We do this differently when using epoll. */ #ifdef HAVE_EPOLL for (int event_idx2 = event_idx + 1; event_idx2 < rs; event_idx2++) { if (epollevents[event_idx2].data.u32 == pollnfds) { epollevents[event_idx2].data.u32 = poll_idx; } } #else poll_idx--; events++; rs--; #endif continue; } } } } events++; } /* Here the logic diverges; if we're using epoll, we want to stay in the * for-each-socket loop and handle messages on that socket. If we're not using * epoll, we want to wait until after that loop, and spin through our * pending_messages queue again. */ #ifdef HAVE_EPOLL unsigned old_pollnfds = pollnfds; getmilliseconds(); /* Keep processing messages until this socket is freed (changing the number of file descriptors) or we run out of messages. */ while ((pollnfds == old_pollnfds) && (sock->message_ready())) { char msg[SIPP_MAX_MSG_SIZE]; struct sockaddr_storage src; ssize_t len; len = sock->read_message(msg, sizeof(msg), &src); if (len > 0) { process_message(sock, msg, len, &src); } else { assert(0); } } if (pollnfds != old_pollnfds) { /* Processing messages has changed the number of pollnfds, so update any remaining events */ for (int event_idx2 = event_idx + 1; event_idx2 < rs; event_idx2++) { if (epollevents[event_idx2].data.u32 == pollnfds) { epollevents[event_idx2].data.u32 = poll_idx; } } } #else if (events) { rs--; } pollfiles[poll_idx].revents = 0; #endif } #ifndef HAVE_EPOLL if (read_index >= pollnfds) { read_index = 0; } /* We need to process any new messages that we read. */ while (pending_messages && (loops > 0)) { getmilliseconds(); if (sockets[read_index]->ss_msglen) { char msg[SIPP_MAX_MSG_SIZE]; struct sockaddr_storage src; ssize_t len; len = sockets[read_index]->read_message(msg, sizeof(msg), &src); if (len > 0) { process_message(sockets[read_index], msg, len, &src); } else { assert(0); } loops--; } read_index = (read_index + 1) % pollnfds; } cpu_max = (loops <= 0); #endif } /***************** Check of the message received ***************/ bool sipMsgCheck (const char *P_msg, SIPpSocket *socket) { const char C_sipHeader[] = "SIP/2.0"; if (socket == twinSippSocket || socket == localTwinSippSocket || is_a_peer_socket(socket) || is_a_local_socket(socket)) return true; if (strstr(P_msg, C_sipHeader) != NULL) { return true; } return false; } #ifdef GTEST #include "gtest/gtest.h" TEST(get_trimmed_call_id, noslashes) { EXPECT_STREQ("abc", get_trimmed_call_id("OPTIONS..\r\nBla: X\r\nCall-ID: abc\r\nCall-ID: def\r\n\r\n")); } TEST(get_trimmed_call_id, withslashes) { EXPECT_STREQ("abc2", get_trimmed_call_id("OPTIONS..\r\nBla: X\r\nCall-ID: ///abc2\r\nCall-ID: def\r\n\r\n")); EXPECT_STREQ("abc3", get_trimmed_call_id("OPTIONS..\r\nBla: X\r\nCall-ID: abc2///abc3\r\nCall-ID: def\r\n\r\n")); EXPECT_STREQ("abc4///abc5", get_trimmed_call_id("OPTIONS..\r\nBla: X\r\nCall-ID: abc3///abc4///abc5\r\nCall-ID: def\r\n\r\n")); } #endif //GTEST sipp-3.6.0/src/scenario.cpp0000644000175000017500000040175213475544015015170 0ustar walterwalter/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Richard GAYRAUD - 04 Nov 2003 * Olivier Jacques * From Hewlett Packard Company. * Shriram Natarajan * Peter Higginson * Venkatesh * Lee Ballard * Guillaume TEISSIER from FTR&D * Wolfgang Beck * Marc Van Diest from Belgacom * Charles P. Wright from IBM Research * Michael Stovenour */ #include #include "sipp.hpp" #ifdef HAVE_GSL #include #include #include #endif /************************ Class Constructor *************************/ message::message(int index, const char *desc) { this->index = index; this->desc = desc; pause_distribution = NULL; // delete on exit pause_variable = -1; pause_desc = NULL; // free on exit sessions = 0; bShouldRecordRoutes = 0; bShouldAuthenticate = 0; send_scheme = NULL; // delete on exit retrans_delay = 0; timeout = 0; recv_response = 0; recv_request = NULL; // free on exit optional = 0; advance_state = true; regexp_match = 0; regexp_compile = NULL; // regfree (if not NULL) and free on exit /* Anyway */ start_rtd = 0; stop_rtd = 0; repeat_rtd = 0; lost = -1; crlf = 0; ignoresdp = false; hide = 0; display_str = NULL; // free on exit test = -1; condexec = -1; condexec_inverse = false; chance = 0;/* meaning always */ next = -1; nextLabel = NULL; // free on exit on_timeout = -1; onTimeoutLabel = NULL; // free on exit timewait = false; /* 3pcc extended mode */ peer_dest = NULL; // free on exit peer_src = NULL; // free on exit /* Statistics */ nb_sent = 0; nb_recv = 0; nb_sent_retrans = 0; nb_recv_retrans = 0; nb_timeout = 0; nb_unexp = 0; nb_lost = 0; counter = 0; M_actions = NULL; // delete on exit M_type = 0; M_sendCmdData = NULL; // delete on exit M_nbCmdSent = 0; M_nbCmdRecv = 0; content_length_flag = ContentLengthNoPresent; /* How to match responses to this message. */ start_txn = 0; response_txn = 0; ack_txn = 0; recv_response_for_cseq_method_list = NULL; // free on exit } message::~message() { delete(pause_distribution); free(pause_desc); delete(send_scheme); free(recv_request); if (regexp_compile != NULL) { regfree(regexp_compile); } free(regexp_compile); free(display_str); free(nextLabel); free(onTimeoutLabel); free(peer_dest); free(peer_src); delete(M_actions); delete(M_sendCmdData); free(recv_response_for_cseq_method_list); } /******** Global variables which compose the scenario file **********/ scenario *main_scenario; scenario *ooc_scenario; scenario *aa_scenario; scenario *display_scenario; /* This mode setting refers to whether we open calls autonomously (MODE_CLIENT) * or in response to requests (MODE_SERVER). */ int creationMode = MODE_CLIENT; /* Send mode. Do we send to a fixed address or to the last one we got. */ int sendMode = MODE_CLIENT; /* This describes what our 3PCC behavior is. */ int thirdPartyMode = MODE_3PCC_NONE; /*************** Helper functions for various types *****************/ long get_long(const char *ptr, const char *what) { char *endptr; long ret; ret = strtol(ptr, &endptr, 0); if (*endptr) { ERROR("%s, \"%s\" is not a valid integer!", what, ptr); } return ret; } unsigned long long get_long_long(const char *ptr, const char *what) { char *endptr; unsigned long long ret; ret = strtoull(ptr, &endptr, 0); if (*endptr) { ERROR("%s, \"%s\" is not a valid integer!", what, ptr); } return ret; } /* This function returns a time in milliseconds from a string. * The multiplier is used to convert from the default input type into * milliseconds. For example, for seconds you should use 1000 and for * milliseconds use 1. */ long get_time(const char *ptr, const char *what, int multiplier) { char *endptr; const char *p; long ret = 0; double dret; int i; if (!isdigit(*ptr)) { ERROR("%s, \"%s\" is not a valid time!", what, ptr); } for (i = 0, p = ptr; *p; p++) { if (*p == ':') { i++; } } if (i == 1) { /* mm:ss */ ERROR("%s, \"%s\" mm:ss not implemented yet!", what, ptr); } else if (i == 2) { /* hh:mm:ss */ ERROR("%s, \"%s\" hh:mm:ss not implemented yet!", what, ptr); } else if (i != 0) { ERROR("%s, \"%s\" is not a valid time!", what, ptr); } dret = strtod(ptr, &endptr); if (*endptr) { if (!strcmp(endptr, "s")) { /* Seconds */ ret = (long)(dret * 1000); } else if (!strcmp(endptr, "ms")) { /* Milliseconds. */ ret = (long)dret; } else if (!strcmp(endptr, "m")) { /* Minutes. */ ret = (long)(dret * 60000); } else if (!strcmp(endptr, "h")) { /* Hours. */ ret = (long)(dret * 60 * 60 * 1000); } else { ERROR("%s, \"%s\" is not a valid time!", what, ptr); } } else { ret = (long)(dret * multiplier); } return ret; } double get_double(const char *ptr, const char *what) { char *endptr; double ret; ret = strtod(ptr, &endptr); if (*endptr) { ERROR("%s, \"%s\" is not a floating point number!", what, ptr); } return ret; } #if defined(PCAPPLAY) || defined(RTP_STREAM) /* If the value is enclosed in [brackets], it is assumed to be * a command-line supplied keyword value (-key). */ static char* xp_get_keyword_value(const char *name) { const char* ptr = xp_get_value(name); size_t len; if (ptr && ptr[0] == '[' && (len = strlen(ptr)) && ptr[len - 1] == ']') { int i = 0; len -= 2; /* without the brackets */ while (generic[i]) { const char* keyword = *generic[i]; if (strncmp(ptr + 1, keyword, len) == 0 && strlen(keyword) == len) { const char* value = *(generic[i] + 1); return strdup(value); } ++i; } ERROR("%s \"%s\" looks like a keyword value, but keyword not supplied!", name, ptr); } return ptr ? strdup(ptr) : NULL; } #endif static char* xp_get_string(const char *name, const char *what) { const char *ptr; if (!(ptr = xp_get_value(name))) { ERROR("%s is missing the required '%s' parameter.", what, name); } return strdup(ptr); } static double xp_get_double(const char *name, const char *what) { const char *ptr; char *helptext; double val; if (!(ptr = xp_get_value(name))) { ERROR("%s is missing the required '%s' parameter.", what, name); } helptext = (char *)malloc(100 + strlen(name) + strlen(what)); sprintf(helptext, "%s '%s' parameter", what, name); val = get_double(ptr, helptext); free(helptext); return val; } static long xp_get_long(const char *name, const char *what) { const char *ptr; char *helptext; long val; if (!(ptr = xp_get_value(name))) { ERROR("%s is missing the required '%s' parameter.", what, name); } helptext = (char *)malloc(100 + strlen(name) + strlen(what)); sprintf(helptext, "%s '%s' parameter", what, name); val = get_long(ptr, helptext); free(helptext); return val; } static long xp_get_long(const char *name, const char *what, long defval) { if (!(xp_get_value(name))) { return defval; } return xp_get_long(name, what); } static bool xp_get_bool(const char *name, const char *what) { const char *ptr; char *helptext; bool val; if (!(ptr = xp_get_value(name))) { ERROR("%s is missing the required '%s' parameter.", what, name); } helptext = (char *)malloc(100 + strlen(name) + strlen(what)); sprintf(helptext, "%s '%s' parameter", what, name); val = get_bool(ptr, helptext); free(helptext); return val; } static bool xp_get_bool(const char *name, const char *what, bool defval) { if (!(xp_get_value(name))) { return defval; } return xp_get_bool(name, what); } int scenario::get_txn(const char *txnName, const char *what, bool start, bool isInvite, bool isAck) { /* Check the name's validity. */ if (txnName[0] == '\0') { ERROR("Variable names may not be empty for %s", what); } if (strcspn(txnName, "$,") != strlen(txnName)) { ERROR("Variable names may not contain $ or , for %s", what); } /* If this transaction has already been used, then we have nothing to do. */ str_int_map::iterator txn_it = txnMap.find(txnName); if (txn_it != txnMap.end()) { if (start) { /* We need to fill in the invite field. */ transactions[txn_it->second - 1].started++; } else if (isAck) { transactions[txn_it->second - 1].acks++; } else { transactions[txn_it->second - 1].responses++; } return txn_it->second; } /* Assign this variable the next slot. */ struct txnControlInfo transaction; transaction.name = strdup(txnName); if (start) { transaction.started = 1; transaction.responses = 0; transaction.acks = 0; transaction.isInvite = isInvite; } else if (isAck) { /* Does not start or respond to this txn. */ transaction.started = 0; transaction.responses = 0; transaction.acks = 1; transaction.isInvite = false; } else { transaction.started = 0; transaction.responses = 1; transaction.acks = 0; transaction.isInvite = false; } transactions.push_back(transaction); int txnNum = transactions.size(); txnMap[txnName] = txnNum; return txnNum; } int scenario::find_var(const char *varName) { return allocVars->find(varName, false); } int scenario::get_var(const char *varName, const char *what) { /* Check the name's validity. */ if (varName[0] == '\0') { ERROR("Transaction names may not be empty for %s", what); } if (strcspn(varName, "$,") != strlen(varName)) { ERROR("Transaction names may not contain '$' or ',' for %s", what); } return allocVars->find(varName, true); } int scenario::xp_get_var(const char *name, const char *what) { const char *ptr; if (!(ptr = xp_get_value(name))) { ERROR("%s is missing the required '%s' variable parameter.", what, name); } return get_var(ptr, what); } static int xp_get_optional(const char *name, const char *what) { const char *ptr = xp_get_value(name); if (!ptr) { return OPTIONAL_FALSE; } if(!strcmp(ptr, "true")) { return OPTIONAL_TRUE; } else if(!strcmp(ptr, "global")) { return OPTIONAL_GLOBAL; } else if(!strcmp(ptr, "false")) { return OPTIONAL_FALSE; } else { ERROR("Could not understand optional value for %s: %s", what, ptr); } return OPTIONAL_FALSE; } int scenario::xp_get_var(const char *name, const char *what, int defval) { const char *ptr; if (!(ptr = xp_get_value(name))) { return defval; } return xp_get_var(name, what); } bool get_bool(const char *ptr, const char *what) { char *endptr; long ret; if (!strcasecmp(ptr, "true")) { return true; } if (!strcasecmp(ptr, "false")) { return false; } ret = strtol(ptr, &endptr, 0); if (*endptr) { ERROR("%s, \"%s\" is not a valid boolean!", what, ptr); } return ret ? true : false; } /* Pretty print a time. */ int time_string(double ms, char *res, int reslen) { if (ms < 10000) { /* Less then 10 seconds we represent accurately. */ if ((int)(ms + 0.9999) == (int)(ms)) { /* We have an integer, or close enough to it. */ return snprintf(res, reslen, "%dms", (int)ms); } else { if (ms < 1000) { return snprintf(res, reslen, "%.2lfms", ms); } else { return snprintf(res, reslen, "%.1lfms", ms); } } } else if (ms < 60000) { /* We round to 100ms for times less than a minute. */ return snprintf(res, reslen, "%.1fs", ms/1000); } else if (ms < 60 * 60000) { /* We round to 1s for times more than a minute. */ int s = (unsigned int)(ms / 1000); int m = s / 60; s %= 60; return snprintf(res, reslen, "%d:%02d", m, s); } else { int s = (unsigned int)(ms / 1000); int m = s / 60; int h = m / 60; s %= 60; m %= 60; return snprintf(res, reslen, "%d:%02d:%02d", h, m, s); } } /* For backwards compatibility, we assign "true" to slot 1, false to 0, and * allow other valid integers. */ int scenario::get_rtd(const char *ptr, bool start) { if(!strcmp(ptr, (char *)"false")) return 0; if(!strcmp(ptr, (char *)"true")) return stats->findRtd("1", start); return stats->findRtd(ptr, start); } /* Get a counter */ int scenario::get_counter(const char *ptr, const char *what) { /* Check the name's validity. */ if (ptr[0] == '\0') { ERROR("Counter names names may not be empty for %s", what); } if (strcspn(ptr, "$,") != strlen(ptr)) { ERROR("Counter names may not contain $ or , for %s", what); } return stats->findCounter(ptr, true); } /* Some validation functions. */ void scenario::validate_variable_usage() { allocVars->validate(); } void scenario::validate_txn_usage() { for (unsigned int i = 0; i < transactions.size(); i++) { if(transactions[i].started == 0) { ERROR("Transaction %s is never started!", transactions[i].name); } else if(transactions[i].responses == 0) { ERROR("Transaction %s has no responses defined!", transactions[i].name); } if (transactions[i].isInvite && transactions[i].acks == 0) { ERROR("Transaction %s is an INVITE transaction without an ACK!", transactions[i].name); } if (!transactions[i].isInvite && (transactions[i].acks > 0)) { ERROR("Transaction %s is a non-INVITE transaction with an ACK!", transactions[i].name); } } } /* Apply the next and ontimeout labels according to our map. */ void scenario::apply_labels(msgvec v, str_int_map labels) { for (unsigned int i = 0; i < v.size(); i++) { if (v[i]->nextLabel) { str_int_map::iterator label_it = labels.find(v[i]->nextLabel); if (label_it == labels.end()) { ERROR("The label '%s' was not defined (index %d, next attribute)", v[i]->nextLabel, i); } v[i]->next = label_it->second; } if (v[i]->onTimeoutLabel) { str_int_map::iterator label_it = labels.find(v[i]->onTimeoutLabel); if (label_it == labels.end()) { ERROR("The label '%s' was not defined (index %d, ontimeout attribute)", v[i]->onTimeoutLabel, i); } v[i]->on_timeout = label_it->second; } } } int get_cr_number(const char *src) { int res=0; while(*src) { if(*src == '\n') res++; src++; } return res; } static char* clean_cdata(char *ptr, int *removed_crlf = NULL) { char * msg; while((*ptr == ' ') || (*ptr == '\t') || (*ptr == '\n')) ptr++; msg = (char *) malloc(strlen(ptr) + 3); if(!msg) { ERROR("Memory Overflow"); } strcpy(msg, ptr); ptr = msg + strlen(msg); ptr--; while((ptr >= msg) && ((*ptr == ' ') || (*ptr == '\t') || (*ptr == '\n'))) { if(*ptr == '\n' && removed_crlf) { (*removed_crlf)++; } *ptr-- = 0; } if(ptr == msg) { ERROR("Empty cdata in xml scenario file"); } while ((ptr = strstr(msg, "\n "))) { memmove(ptr + 1, ptr + 2, strlen(ptr) - 1); } while ((ptr = strstr(msg, " \n"))) { memmove(ptr, ptr + 1, strlen(ptr)); } while ((ptr = strstr(msg, "\n\t"))) { memmove(ptr + 1, ptr + 2, strlen(ptr) - 1); } while ((ptr = strstr(msg, "\t\n"))) { memmove(ptr, ptr + 1, strlen(ptr)); } if (!strstr(msg, "\n\n")) { strcat(msg, "\n\n"); } return msg; } /********************** Scenario File analyser **********************/ void scenario::checkOptionalRecv(char *elem, unsigned int scenario_file_cursor) { if (last_recv_optional) { ERROR(" before <%s> sequence without a mandatory message. Please remove one 'optional=true' (element %d).", elem, scenario_file_cursor); } last_recv_optional = false; } scenario::scenario(char * filename, int deflt) { char * elem; char *method_list = NULL; unsigned int scenario_file_cursor = 0; int L_content_length = 0 ; char * peer; const char* cptr; last_recv_optional = false; if(filename) { if(!xp_set_xml_buffer_from_file(filename)) { ERROR("Unable to load or parse '%s' xml scenario file", filename); } } else { if(!xp_set_xml_buffer_from_string(default_scenario[deflt])) { ERROR("Unable to load default xml scenario file"); } } stats = new CStat(); allocVars = new AllocVariableTable(userVariables); hidedefault = false; elem = xp_open_element(0); if (!elem) { ERROR("No element in xml scenario file"); } if(strcmp("scenario", elem)) { ERROR("No 'scenario' section in xml scenario file"); } if ((cptr = xp_get_value("name"))) { name = strdup(cptr); } else { name = strdup(""); } duration = 0; found_timewait = false; scenario_file_cursor = 0; while ((elem = xp_open_element(scenario_file_cursor))) { char * ptr; scenario_file_cursor ++; if(!strcmp(elem, "CallLengthRepartition")) { ptr = xp_get_string("value", "CallLengthRepartition"); stats->setRepartitionCallLength(ptr); free(ptr); } else if(!strcmp(elem, "ResponseTimeRepartition")) { ptr = xp_get_string("value", "ResponseTimeRepartition"); stats->setRepartitionResponseTime(ptr); free(ptr); } else if(!strcmp(elem, "Global")) { ptr = xp_get_string("variables", "Global"); char ** currentTabVarName = NULL; int currentNbVarNames; createStringTable(ptr, ¤tTabVarName, ¤tNbVarNames); for (int i = 0; i < currentNbVarNames; i++) { globalVariables->find(currentTabVarName[i], true); } freeStringTable(currentTabVarName, currentNbVarNames); free(ptr); } else if(!strcmp(elem, "User")) { ptr = xp_get_string("variables", "User"); char ** currentTabVarName = NULL; int currentNbVarNames; createStringTable(ptr, ¤tTabVarName, ¤tNbVarNames); for (int i = 0; i < currentNbVarNames; i++) { userVariables->find(currentTabVarName[i], true); } freeStringTable(currentTabVarName, currentNbVarNames); free(ptr); } else if(!strcmp(elem, "Reference")) { ptr = xp_get_string("variables", "Reference"); char ** currentTabVarName = NULL; int currentNbVarNames; createStringTable(ptr, ¤tTabVarName, ¤tNbVarNames); for (int i = 0; i < currentNbVarNames; i++) { int id = allocVars->find(currentTabVarName[i], false); if (id == -1) { ERROR("Could not reference non-existant variable '%s'", currentTabVarName[i]); } } freeStringTable(currentTabVarName, currentNbVarNames); free(ptr); } else if(!strcmp(elem, "DefaultMessage")) { char *id = xp_get_string("id", "DefaultMessage"); if(!(ptr = xp_get_cdata())) { ERROR("No CDATA in 'send' section of xml scenario file"); } char *msg = clean_cdata(ptr); set_default_message(id, msg); free(id); /* XXX: This should really be per scenario. */ } else if(!strcmp(elem, "label")) { ptr = xp_get_string("id", "label"); if (labelMap.find(ptr) != labelMap.end()) { ERROR("The label name '%s' is used twice.", ptr); } labelMap[ptr] = messages.size(); free(ptr); } else if (!strcmp(elem, "init")) { /* We have an init section, which must be full of nops or labels. */ int nop_cursor = 0; char *initelem; while ((initelem = xp_open_element(nop_cursor++))) { if (!strcmp(initelem, "nop")) { /* We should parse this. */ message *nopmsg = new message(initmessages.size(), "scenario initialization"); initmessages.push_back(nopmsg); nopmsg->M_type = MSG_TYPE_NOP; getCommonAttributes(nopmsg); } else if (!strcmp(initelem, "label")) { /* Add an init label. */ cptr = xp_get_value("id"); if (initLabelMap.find(cptr) != initLabelMap.end()) { ERROR("The label name '%s' is used twice.", cptr); } initLabelMap[cptr] = initmessages.size(); } else { ERROR("Invalid element in an init stanza: '%s'", initelem); } xp_close_element(); } } else { /** Message Case */ if (found_timewait) { ERROR(" can only be the last message in a scenario!"); } message *curmsg = new message(messages.size(), name ? name : "unknown scenario"); messages.push_back(curmsg); if(!strcmp(elem, "send")) { checkOptionalRecv(elem, scenario_file_cursor); curmsg->M_type = MSG_TYPE_SEND; /* Sent messages descriptions */ if(!(ptr = xp_get_cdata())) { ERROR("No CDATA in 'send' section of xml scenario file"); } int removed_clrf = 0; char * msg = clean_cdata(ptr, &removed_clrf); L_content_length = xp_get_content_length(msg); switch (L_content_length) { case -1 : // the msg does not contain content-length field break ; case 0 : curmsg -> content_length_flag = message::ContentLengthValueZero; // Initialize to No present break ; default : curmsg -> content_length_flag = message::ContentLengthValueNoZero; // Initialize to No present break ; } if((msg[strlen(msg) - 1] != '\n') && (removed_clrf)) { strcat(msg, "\n"); } char *tsrc = msg; while(*tsrc++); curmsg -> send_scheme = new SendingMessage(this, msg); free(msg); // If this is a request we are sending, then store our transaction/method matching information. if (!curmsg->send_scheme->isResponse()) { char *method = curmsg->send_scheme->getMethod(); bool isInvite = !strcmp(method, "INVITE"); bool isAck = !strcmp(method, "ACK"); if ((cptr = xp_get_value("start_txn"))) { if (isAck) { ERROR("An ACK message can not start a transaction!"); } curmsg->start_txn = get_txn(cptr, "start transaction", true, isInvite, false); } else if ((cptr = xp_get_value("ack_txn"))) { if (!isAck) { ERROR("The ack_txn attribute is valid only for ACK messages!"); } curmsg->ack_txn = get_txn(cptr, "ack transaction", false, false, true); } else { int len = method_list ? strlen(method_list) : 0; method_list = (char *)realloc(method_list, len + strlen(method) + 1); if (!method_list) { ERROR_NO("Out of memory allocating method_list!"); } strcpy(method_list + len, method); } } else { if (xp_get_value("start_txn")) { ERROR("Responses can not start a transaction"); } if (xp_get_value("ack_txn")) { ERROR("Responses can not ACK a transaction"); } } if (xp_get_value("response_txn")) { ERROR("response_txn can only be used for received messages."); } curmsg -> retrans_delay = xp_get_long("retrans", "retransmission timer", 0); curmsg -> timeout = xp_get_long("timeout", "message send timeout", 0); } else if (!strcmp(elem, "recv")) { curmsg->M_type = MSG_TYPE_RECV; /* Received messages descriptions */ if((cptr = xp_get_value("response"))) { curmsg ->recv_response = get_long(cptr, "response code"); if (method_list) { curmsg->recv_response_for_cseq_method_list = strdup(method_list); } if ((cptr = xp_get_value("response_txn"))) { curmsg->response_txn = get_txn(cptr, "transaction response", false, false, false); } } if ((cptr = xp_get_value("request"))) { curmsg->recv_request = strdup(cptr); if (xp_get_value("response_txn")) { ERROR("response_txn can only be used for received responses."); } } curmsg->optional = xp_get_optional("optional", "recv"); last_recv_optional = curmsg->optional; curmsg->advance_state = xp_get_bool("advance_state", "recv", true); if (!curmsg->advance_state && curmsg->optional == OPTIONAL_FALSE) { ERROR("advance_state is allowed only for optional messages (index = %zu)", messages.size() - 1); } if ((cptr = xp_get_value("regexp_match"))) { if (!strcmp(cptr, "true")) { curmsg->regexp_match = 1; } } curmsg->timeout = xp_get_long("timeout", "message timeout", 0); /* record the route set */ /* TODO disallow optional and rrs to coexist? */ if ((cptr = xp_get_value("rrs"))) { curmsg->bShouldRecordRoutes = get_bool(cptr, "record route set"); } /* record the authentication credentials */ if ((cptr = xp_get_value("auth"))) { bool temp = get_bool(cptr, "message authentication"); curmsg->bShouldAuthenticate = temp; } } else if(!strcmp(elem, "pause") || !strcmp(elem, "timewait")) { checkOptionalRecv(elem, scenario_file_cursor); curmsg->M_type = MSG_TYPE_PAUSE; if (!strcmp(elem, "timewait")) { curmsg->timewait = true; found_timewait = true; } int var; if ((var = xp_get_var("variable", "pause", -1)) != -1) { curmsg->pause_variable = var; } else { CSample *distribution = parse_distribution(true); bool sanity_check = xp_get_bool("sanity_check", "pause", true); double pause_duration = distribution->cdfInv(0.99); if (sanity_check && (pause_duration > INT_MAX)) { char percentile[100]; char desc[100]; distribution->timeDescr(desc, sizeof(desc)); time_string(pause_duration, percentile, sizeof(percentile)); ERROR("The distribution %s has a 99th percentile of %s, which is larger than INT_MAX. You should chose different parameters.", desc, percentile); } curmsg->pause_distribution = distribution; /* Update scenario duration with max duration */ duration += (int)pause_duration; } } else if(!strcmp(elem, "nop")) { checkOptionalRecv(elem, scenario_file_cursor); /* Does nothing at SIP level. This message type can be used to handle * actions, increment counters, or for RTDs. */ curmsg->M_type = MSG_TYPE_NOP; } else if(!strcmp(elem, "recvCmd")) { curmsg->M_type = MSG_TYPE_RECVCMD; curmsg->optional = xp_get_optional("optional", "recv"); last_recv_optional = curmsg->optional; /* 3pcc extended mode */ if ((cptr = xp_get_value("src"))) { curmsg->peer_src = strdup(cptr); } else if (extendedTwinSippMode) { ERROR("You must specify a 'src' for recvCmd when using extended 3pcc mode!"); } } else if(!strcmp(elem, "sendCmd")) { checkOptionalRecv(elem, scenario_file_cursor); curmsg->M_type = MSG_TYPE_SENDCMD; /* Sent messages descriptions */ /* 3pcc extended mode */ if ((cptr = xp_get_value("dest"))) { peer = strdup(cptr); curmsg->peer_dest = peer; peer_map::iterator peer_it; peer_it = peers.find(peer_map::key_type(peer)); if(peer_it == peers.end()) /* the peer (slave or master) has not been added in the map (first occurrence in the scenario) */ { T_peer_infos infos = {}; infos.peer_socket = 0; strncpy(infos.peer_host, get_peer_addr(peer), sizeof(infos.peer_host) - 1); peers[std::string(peer)] = infos; } } else if (extendedTwinSippMode) { ERROR("You must specify a 'dest' for sendCmd with extended 3pcc mode!"); } if (!(ptr = xp_get_cdata())) { ERROR("No CDATA in 'sendCmd' section of xml scenario file"); } char *msg = clean_cdata(ptr); curmsg -> M_sendCmdData = new SendingMessage(this, msg, true /* skip sanity */); free(msg); } else { ERROR("Unknown element '%s' in xml scenario file", elem); } getCommonAttributes(curmsg); } /** end * Message case */ xp_close_element(); } // end while free(method_list); /* Close scenario element */ xp_close_element(); if (xp_is_invalid()) { ERROR("Invalid XML in scenario"); } str_int_map::iterator label_it = labelMap.find("_unexp.main"); if (label_it != labelMap.end()) { unexpected_jump = label_it->second; } else { unexpected_jump = -1; } retaddr = find_var("_unexp.retaddr"); pausedaddr = find_var("_unexp.pausedaddr"); /* Patch up the labels. */ apply_labels(messages, labelMap); apply_labels(initmessages, initLabelMap); /* Some post-scenario loading validation. */ stats->validateRtds(); /* Make sure that all variables are used more than once. */ validate_variable_usage(); /* Make sure that all started transactions have responses, and vice versa. */ validate_txn_usage(); if (messages.size() == 0) { ERROR("Did not find any messages inside of scenario!"); } } void scenario::runInit() { call *initcall; if (initmessages.size() > 0) { initcall = new call(main_scenario, NULL, NULL, "///main-init", 0, false, false, true); initcall->run(); } } void clear_int_str(int_str_map m) { for(int_str_map::iterator it = m.begin(); it != m.end(); it = m.begin()) { free(it->second); m.erase(it); } } void clear_str_int(str_int_map m) { for(str_int_map::iterator it = m.begin(); it != m.end(); it = m.begin()) { m.erase(it); } } void clear_int_int(int_int_map m) { for(int_int_map::iterator it = m.begin(); it != m.end(); it = m.begin()) { m.erase(it); } } scenario::~scenario() { for (msgvec::iterator i = messages.begin(); i != messages.end(); i++) { delete *i; } messages.clear(); free(name); allocVars->putTable(); delete stats; for (unsigned int i = 0; i < transactions.size(); i++) { free(transactions[i].name); } transactions.clear(); clear_str_int(labelMap); clear_str_int(initLabelMap); clear_str_int(txnMap); } CSample *parse_distribution(bool oldstyle = false) { CSample *distribution = nullptr; const char *distname; const char *ptr = 0; if(!(distname = xp_get_value("distribution"))) { if (!oldstyle) { ERROR("statistically distributed actions or pauses requires 'distribution' parameter"); } if ((ptr = xp_get_value("normal"))) { distname = "normal"; } else if ((ptr = xp_get_value("exponential"))) { distname = "exponential"; } else if ((ptr = xp_get_value("lognormal"))) { distname = "lognormal"; } else if ((ptr = xp_get_value("weibull"))) { distname = "weibull"; } else if ((ptr = xp_get_value("pareto"))) { distname = "pareto"; } else if ((ptr = xp_get_value("gamma"))) { distname = "gamma"; } else if ((ptr = xp_get_value("min"))) { distname = "uniform"; } else if ((ptr = xp_get_value("max"))) { distname = "uniform"; } else if ((ptr = xp_get_value("milliseconds"))) { double val = get_double(ptr, "Pause milliseconds"); return new CFixed(val); } else { return new CDefaultPause(); } } if (!strcmp(distname, "fixed")) { double value = xp_get_double("value", "Fixed distribution"); distribution = new CFixed(value); } else if (!strcmp(distname, "uniform")) { double min = xp_get_double("min", "Uniform distribution"); double max = xp_get_double("max", "Uniform distribution"); distribution = new CUniform(min, max); #ifdef HAVE_GSL } else if (!strcmp(distname, "normal")) { double mean = xp_get_double("mean", "Normal distribution"); double stdev = xp_get_double("stdev", "Normal distribution"); distribution = new CNormal(mean, stdev); } else if (!strcmp(distname, "lognormal")) { double mean = xp_get_double("mean", "Lognormal distribution"); double stdev = xp_get_double("stdev", "Lognormal distribution"); distribution = new CLogNormal(mean, stdev); } else if (!strcmp(distname, "exponential")) { double mean = xp_get_double("mean", "Exponential distribution"); distribution = new CExponential(mean); } else if (!strcmp(distname, "weibull")) { double lambda = xp_get_double("lambda", "Weibull distribution"); double k = xp_get_double("k", "Weibull distribution"); distribution = new CWeibull(lambda, k); } else if (!strcmp(distname, "pareto")) { double k = xp_get_double("k", "Pareto distribution"); double xsubm = xp_get_double("x_m", "Pareto distribution"); distribution = new CPareto(k, xsubm); } else if (!strcmp(distname, "gpareto")) { double shape = xp_get_double("shape", "Generalized Pareto distribution"); double scale = xp_get_double("scale", "Generalized Pareto distribution"); double location = xp_get_double("location", "Generalized Pareto distribution"); distribution = new CGPareto(shape, scale, location); } else if (!strcmp(distname, "gamma")) { double k = xp_get_double("k", "Gamma distribution"); double theta = xp_get_double("theta", "Gamma distribution"); distribution = new CGamma(k, theta); } else if (!strcmp(distname, "negbin")) { double n = xp_get_double("n", "Negative Binomial distribution"); double p = xp_get_double("p", "Negative Binomial distribution"); distribution = new CNegBin(n, p); #else } else if (!strcmp(distname, "normal") || !strcmp(distname, "lognormal") || !strcmp(distname, "exponential") || !strcmp(distname, "pareto") || !strcmp(distname, "gamma") || !strcmp(distname, "negbin") || !strcmp(distname, "weibull")) { ERROR("The distribution '%s' is only available with GSL", distname); #endif } else { ERROR("Unknown distribution: %s", ptr); } return distribution; } /* 3pcc extended mode: * get the correspondances between * slave and master names and their * addresses */ void parse_slave_cfg() { FILE * f; char line[MAX_PEER_SIZE]; char * temp_peer; char * temp_host; char * peer_host; f = fopen(slave_cfg_file, "r"); if(f) { while (fgets(line, MAX_PEER_SIZE, f) != NULL) { temp_peer = strtok(line, ";"); if (!temp_peer) continue; temp_host = strtok(NULL, ";"); if (!temp_host) continue; peer_host = strdup(temp_host); if (!peer_host) ERROR("Cannot allocate memory!"); peer_addrs[std::string(temp_peer)] = peer_host; } } else { ERROR("Can not open slave_cfg file %s", slave_cfg_file); } fclose(f); } // Determine in which mode the sipp tool has been // launched (client, server, 3pcc client, 3pcc server, 3pcc extended master or slave) void scenario::computeSippMode() { bool isRecvCmdFound = false; bool isSendCmdFound = false; creationMode = -1; sendMode = -1; thirdPartyMode = MODE_3PCC_NONE; assert(messages.size() > 0); for(unsigned int i=0; iM_type) { case MSG_TYPE_PAUSE: case MSG_TYPE_NOP: /* Allow pauses or nops to go first. */ continue; case MSG_TYPE_SEND: if (sendMode == -1) { sendMode = MODE_CLIENT; } if (creationMode == -1) { creationMode = MODE_CLIENT; } break; case MSG_TYPE_RECV: if (sendMode == -1) { sendMode = MODE_SERVER; } if (creationMode == -1) { creationMode = MODE_SERVER; } break; case MSG_TYPE_SENDCMD: isSendCmdFound = true; if (creationMode == -1) { creationMode = MODE_CLIENT; } if(!isRecvCmdFound) { if (creationMode == MODE_SERVER) { /* * If it is a server already, then start it in * 3PCC A passive mode */ if(twinSippMode) { thirdPartyMode = MODE_3PCC_A_PASSIVE; } else if (extendedTwinSippMode) { thirdPartyMode = MODE_MASTER_PASSIVE; } } else { if(twinSippMode) { thirdPartyMode = MODE_3PCC_CONTROLLER_A; } else if (extendedTwinSippMode) { thirdPartyMode = MODE_MASTER; } } if((thirdPartyMode == MODE_MASTER_PASSIVE || thirdPartyMode == MODE_MASTER) && !master_name) { ERROR("Inconsistency between command line and scenario: master scenario but -master option not set"); } if(!twinSippMode && !extendedTwinSippMode) ERROR("sendCmd message found in scenario but no twin sipp" " address has been passed! Use -3pcc option or 3pcc extended mode"); } break; case MSG_TYPE_RECVCMD: if (creationMode == -1) { creationMode = MODE_SERVER; } isRecvCmdFound = true; if(!isSendCmdFound) { if(twinSippMode) { thirdPartyMode = MODE_3PCC_CONTROLLER_B; } else if(extendedTwinSippMode) { thirdPartyMode = MODE_SLAVE; if(!slave_number) { ERROR("Inconsistency between command line and scenario: slave scenario but -slave option not set"); } else { thirdPartyMode = MODE_SLAVE; } } if(!twinSippMode && !extendedTwinSippMode) ERROR("recvCmd message found in scenario but no " "twin sipp address has been passed! Use " "-3pcc option\n"); } break; default: break; } } if(creationMode == -1) ERROR("Unable to determine creation mode of the tool (server, client)"); if(sendMode == -1) ERROR("Unable to determine send mode of the tool (server, client)"); } void scenario::handle_rhs(CAction *tmpAction, const char *what) { if (xp_get_value("value")) { tmpAction->setDoubleValue(xp_get_double("value", what)); if (xp_get_value("variable")) { ERROR("Value and variable are mutually exclusive for %s action!", what); } } else if (xp_get_value("variable")) { tmpAction->setVarInId(xp_get_var("variable", what)); if (xp_get_value("value")) { ERROR("Value and variable are mutually exclusive for %s action!", what); } } else { ERROR("No value or variable defined for %s action!", what); } } void scenario::handle_arithmetic(CAction *tmpAction, const char *what) { tmpAction->setVarId(xp_get_var("assign_to", what)); handle_rhs(tmpAction, what); } void scenario::parseAction(CActions *actions) { char * actionElem; unsigned int recvScenarioLen = 0; char * currentRegExp = NULL; char ** currentTabVarName = NULL; int currentNbVarNames; int sub_currentNbVarId; char* ptr; const char* cptr; while((actionElem = xp_open_element(recvScenarioLen))) { CAction *tmpAction = new CAction(this); if(!strcmp(actionElem, "ereg")) { ptr = xp_get_string("regexp", "ereg"); // keeping regexp expression in memory if(currentRegExp != NULL) delete[] currentRegExp; currentRegExp = new char[strlen(ptr)+1]; xp_unescape(ptr, currentRegExp); tmpAction->setActionType(CAction::E_AT_ASSIGN_FROM_REGEXP); // warning - although these are detected for both msg and hdr // they are only implemented for search_in="hdr" tmpAction->setCaseIndep(xp_get_bool("case_indep", "ereg", false)); tmpAction->setHeadersOnly(xp_get_bool("start_line", "ereg", false)); free(ptr); if ((cptr = xp_get_value("search_in"))) { tmpAction->setOccurrence(1); if (strcmp(cptr, "msg") == 0) { tmpAction->setLookingPlace(CAction::E_LP_MSG); tmpAction->setLookingChar (NULL); } else if (strcmp(cptr, "body") == 0) { tmpAction->setLookingPlace(CAction::E_LP_BODY); tmpAction->setLookingChar (NULL); } else if (strcmp(cptr, "var") == 0) { tmpAction->setVarInId(xp_get_var("variable", "ereg")); tmpAction->setLookingPlace(CAction::E_LP_VAR); } else if (strcmp(cptr, "hdr") == 0) { cptr = xp_get_value("header"); if (!cptr || !strlen(cptr)) { ERROR("search_in=\"hdr\" requires header field"); } tmpAction->setLookingPlace(CAction::E_LP_HDR); tmpAction->setLookingChar(cptr); if ((cptr = xp_get_value("occurrence"))) { tmpAction->setOccurrence(atol(cptr)); } else if ((cptr = xp_get_value("occurence"))) { /* old misspelling */ tmpAction->setOccurrence(atol(cptr)); } } else { ERROR("Unknown search_in value %s", cptr); } } else { tmpAction->setLookingPlace(CAction::E_LP_MSG); tmpAction->setLookingChar(NULL); } // end if-else search_in if (xp_get_value("check_it")) { tmpAction->setCheckIt(xp_get_bool("check_it", "ereg", false)); if (xp_get_value("check_it_inverse")) { ERROR("Can not have both check_it and check_it_inverse for ereg!"); } } else { tmpAction->setCheckItInverse(xp_get_bool("check_it_inverse", "ereg", false)); } if (!(cptr = xp_get_value("assign_to"))) { ERROR("assign_to value is missing"); } createStringTable(cptr, ¤tTabVarName, ¤tNbVarNames); int varId = get_var(currentTabVarName[0], "assign_to"); tmpAction->setVarId(varId); tmpAction->setRegExp(currentRegExp); if (currentNbVarNames > 1 ) { sub_currentNbVarId = currentNbVarNames - 1 ; tmpAction->setNbSubVarId(sub_currentNbVarId); for(int i=1; i<= sub_currentNbVarId; i++) { int varId = get_var(currentTabVarName[i], "sub expression assign_to"); tmpAction->setSubVarId(varId); } } freeStringTable(currentTabVarName, currentNbVarNames); if(currentRegExp != NULL) { delete[] currentRegExp; } currentRegExp = NULL; } /* end !strcmp(actionElem, "ereg") */ else if(!strcmp(actionElem, "log")) { ptr = xp_get_string("message", "log"); tmpAction->setMessage(ptr); free(ptr); tmpAction->setActionType(CAction::E_AT_LOG_TO_FILE); } else if(!strcmp(actionElem, "warning")) { ptr = xp_get_string("message", "warning"); tmpAction->setMessage(ptr); free(ptr); tmpAction->setActionType(CAction::E_AT_LOG_WARNING); } else if(!strcmp(actionElem, "error")) { ptr = xp_get_string("message", "error"); tmpAction->setMessage(ptr); free(ptr); tmpAction->setActionType(CAction::E_AT_LOG_ERROR); } else if(!strcmp(actionElem, "assign")) { tmpAction->setActionType(CAction::E_AT_ASSIGN_FROM_VALUE); handle_arithmetic(tmpAction, "assign"); } else if(!strcmp(actionElem, "assignstr")) { tmpAction->setActionType(CAction::E_AT_ASSIGN_FROM_STRING); tmpAction->setVarId(xp_get_var("assign_to", "assignstr")); ptr = xp_get_string("value", "assignstr"); tmpAction->setMessage(ptr); free(ptr); } else if(!strcmp(actionElem, "gettimeofday")) { tmpAction->setActionType(CAction::E_AT_ASSIGN_FROM_GETTIMEOFDAY); if (!(cptr = xp_get_value("assign_to"))) { ERROR("assign_to value is missing"); } createStringTable(cptr, ¤tTabVarName, ¤tNbVarNames); if (currentNbVarNames != 2 ) { ERROR("The gettimeofday action requires two output variables!"); } tmpAction->setNbSubVarId(1); int varId = get_var(currentTabVarName[0], "gettimeofday seconds assign_to"); tmpAction->setVarId(varId); varId = get_var(currentTabVarName[1], "gettimeofday useconds assign_to"); tmpAction->setSubVarId(varId); freeStringTable(currentTabVarName, currentNbVarNames); } else if(!strcmp(actionElem, "index")) { tmpAction->setVarId(xp_get_var("assign_to", "index")); tmpAction->setActionType(CAction::E_AT_ASSIGN_FROM_INDEX); } else if(!strcmp(actionElem, "jump")) { tmpAction->setActionType(CAction::E_AT_JUMP); handle_rhs(tmpAction, "jump"); } else if(!strcmp(actionElem, "pauserestore")) { tmpAction->setActionType(CAction::E_AT_PAUSE_RESTORE); handle_rhs(tmpAction, "pauserestore"); } else if(!strcmp(actionElem, "add")) { tmpAction->setActionType(CAction::E_AT_VAR_ADD); handle_arithmetic(tmpAction, "add"); } else if(!strcmp(actionElem, "subtract")) { tmpAction->setActionType(CAction::E_AT_VAR_SUBTRACT); handle_arithmetic(tmpAction, "subtract"); } else if(!strcmp(actionElem, "multiply")) { tmpAction->setActionType(CAction::E_AT_VAR_MULTIPLY); handle_arithmetic(tmpAction, "multiply"); } else if(!strcmp(actionElem, "divide")) { tmpAction->setActionType(CAction::E_AT_VAR_DIVIDE); handle_arithmetic(tmpAction, "divide"); if (tmpAction->getVarInId() == 0) { if (tmpAction->getDoubleValue() == 0.0) { ERROR("divide actions can not have a value of zero!"); } } } else if(!strcmp(actionElem, "sample")) { tmpAction->setVarId(xp_get_var("assign_to", "sample")); tmpAction->setActionType(CAction::E_AT_ASSIGN_FROM_SAMPLE); tmpAction->setDistribution(parse_distribution()); } else if(!strcmp(actionElem, "todouble")) { tmpAction->setActionType(CAction::E_AT_VAR_TO_DOUBLE); tmpAction->setVarId(xp_get_var("assign_to", "todouble")); tmpAction->setVarInId(xp_get_var("variable", "todouble")); } else if(!strcmp(actionElem, "test")) { if (xp_get_value("check_it")) { tmpAction->setCheckIt(xp_get_bool("check_it", "test")); if (xp_get_value("check_it_inverse")) { ERROR("Can not have both check_it and check_it_inverse for test!"); } } else if (xp_get_value("check_it_inverse")) { tmpAction->setCheckItInverse(xp_get_bool("check_it_inverse", "test")); } // "assign_to" is optional when "check_it" or "check_it_inverse" set if (xp_get_value("assign_to") || (!xp_get_value("check_it") && !xp_get_value("check_it_inverse")) ) { tmpAction->setVarId(xp_get_var("assign_to", "test")); } tmpAction->setVarInId(xp_get_var("variable", "test")); if (xp_get_value("value")) { tmpAction->setDoubleValue(xp_get_double("value", "test")); if (xp_get_value("variable2")) { ERROR("Can not have both a value and a variable2 for test!"); } } else { tmpAction->setVarIn2Id(xp_get_var("variable2", "test")); } tmpAction->setActionType(CAction::E_AT_VAR_TEST); ptr = xp_get_string("compare", "test"); if (!strcmp(ptr, "equal")) { tmpAction->setComparator(CAction::E_C_EQ); } else if (!strcmp(ptr, "not_equal")) { tmpAction->setComparator(CAction::E_C_NE); } else if (!strcmp(ptr, "greater_than")) { tmpAction->setComparator(CAction::E_C_GT); } else if (!strcmp(ptr, "less_than")) { tmpAction->setComparator(CAction::E_C_LT); } else if (!strcmp(ptr, "greater_than_equal")) { tmpAction->setComparator(CAction::E_C_GEQ); } else if (!strcmp(ptr, "less_than_equal")) { tmpAction->setComparator(CAction::E_C_LEQ); } else { ERROR("Invalid 'compare' parameter: %s", ptr); } free(ptr); } else if(!strcmp(actionElem, "verifyauth")) { tmpAction->setVarId(xp_get_var("assign_to", "verifyauth")); char* username_ptr = xp_get_string("username", "verifyauth"); char* password_ptr = xp_get_string("password", "verifyauth"); tmpAction->setMessage(username_ptr, 0); tmpAction->setMessage(password_ptr, 1); tmpAction->setActionType(CAction::E_AT_VERIFY_AUTH); free(username_ptr); free(password_ptr); username_ptr = password_ptr = NULL; } else if(!strcmp(actionElem, "lookup")) { tmpAction->setVarId(xp_get_var("assign_to", "lookup")); tmpAction->setMessage(xp_get_string("file", "lookup"), 0); tmpAction->setMessage(xp_get_string("key", "lookup"), 1); tmpAction->setActionType(CAction::E_AT_LOOKUP); } else if(!strcmp(actionElem, "insert")) { tmpAction->setMessage(xp_get_string("file", "insert"), 0); tmpAction->setMessage(xp_get_string("value", "insert"), 1); tmpAction->setActionType(CAction::E_AT_INSERT); } else if(!strcmp(actionElem, "replace")) { tmpAction->setMessage(xp_get_string("file", "replace"), 0); tmpAction->setMessage(xp_get_string("line", "replace"), 1); tmpAction->setMessage(xp_get_string("value", "replace"), 2); tmpAction->setActionType(CAction::E_AT_REPLACE); } else if(!strcmp(actionElem, "setdest")) { tmpAction->setMessage(xp_get_string("host", actionElem), 0); tmpAction->setMessage(xp_get_string("port", actionElem), 1); tmpAction->setMessage(xp_get_string("protocol", actionElem), 2); tmpAction->setActionType(CAction::E_AT_SET_DEST); } else if(!strcmp(actionElem, "closecon")) { tmpAction->setActionType(CAction::E_AT_CLOSE_CON); } else if(!strcmp(actionElem, "strcmp")) { if (xp_get_value("check_it")) { tmpAction->setCheckIt(xp_get_bool("check_it", "strcmp")); if (xp_get_value("check_it_inverse")) { ERROR("Can not have both check_it and check_it_inverse for strcmp!"); } } else if (xp_get_value("check_it_inverse")) { tmpAction->setCheckItInverse(xp_get_bool("check_it_inverse", "strcmp")); } // "assign_to" is optional when "check_it" or "check_it_inverse" set if (xp_get_value("assign_to") || (!xp_get_value("check_it") && !xp_get_value("check_it_inverse")) ) { tmpAction->setVarId(xp_get_var("assign_to", "strcmp")); } tmpAction->setVarInId(xp_get_var("variable", "strcmp")); if (xp_get_value("value")) { tmpAction->setStringValue(xp_get_string("value", "strcmp")); if (xp_get_value("variable2")) { ERROR("Can not have both a value and a variable2 for strcmp!"); } } else { tmpAction->setVarIn2Id(xp_get_var("variable2", "strcmp")); } tmpAction->setActionType(CAction::E_AT_VAR_STRCMP); } else if(!strcmp(actionElem, "trim")) { tmpAction->setVarId(xp_get_var("assign_to", "trim")); tmpAction->setActionType(CAction::E_AT_VAR_TRIM); } else if(!strcmp(actionElem, "exec")) { if ((cptr = xp_get_value("command"))) { tmpAction->setActionType(CAction::E_AT_EXECUTE_CMD); tmpAction->setMessage(cptr); } else if((cptr = xp_get_value("int_cmd"))) { CAction::T_IntCmdType type(CAction::E_INTCMD_STOPCALL); /* assume the default */ if (strcmp(cptr, "stop_now") == 0) { type = CAction::E_INTCMD_STOP_NOW; } else if (strcmp(cptr, "stop_gracefully") == 0) { type = CAction::E_INTCMD_STOP_ALL; } else if (strcmp(cptr, "stop_call") == 0) { type = CAction::E_INTCMD_STOPCALL; } /* the action is well formed, adding it in the */ /* tmpActionTable */ tmpAction->setActionType(CAction::E_AT_EXEC_INTCMD); tmpAction->setIntCmd(type); #ifdef PCAPPLAY } else if ((ptr = xp_get_keyword_value("play_pcap_audio"))) { tmpAction->setPcapArgs(ptr); tmpAction->setActionType(CAction::E_AT_PLAY_PCAP_AUDIO); hasMedia = 1; free(ptr); } else if ((ptr = xp_get_keyword_value("play_pcap_image"))) { tmpAction->setPcapArgs(ptr); tmpAction->setActionType(CAction::E_AT_PLAY_PCAP_IMAGE); hasMedia = 1; free(ptr); } else if ((ptr = xp_get_keyword_value("play_pcap_video"))) { tmpAction->setPcapArgs(ptr); tmpAction->setActionType(CAction::E_AT_PLAY_PCAP_VIDEO); hasMedia = 1; free(ptr); } else if ((cptr = xp_get_value("play_dtmf"))) { tmpAction->setMessage(cptr); tmpAction->setActionType(CAction::E_AT_PLAY_DTMF); hasMedia = 1; #else } else if (xp_get_value("play_pcap_audio")) { ERROR("Scenario specifies a play_pcap_audio action, but this version of SIPp does not have PCAP support"); } else if (xp_get_value("play_pcap_image")) { ERROR("Scenario specifies a play_pcap_image action, but this version of SIPp does not have PCAP support"); } else if (xp_get_value("play_pcap_video")) { ERROR("Scenario specifies a play_pcap_video action, but this version of SIPp does not have PCAP support"); } else if (xp_get_value("play_dtmf")) { ERROR("Scenario specifies a play_dtmf action, but this version of SIPp does not have PCAP support"); #endif #ifdef RTP_STREAM } else if ((ptr = xp_get_keyword_value("rtp_stream"))) { hasMedia = 1; if (strcmp(ptr, "pause") == 0) { tmpAction->setActionType(CAction::E_AT_RTP_STREAM_PAUSE); } else if (strcmp(ptr, "resume") == 0) { tmpAction->setActionType(CAction::E_AT_RTP_STREAM_RESUME); } else { tmpAction->setRTPStreamActInfo(ptr); tmpAction->setActionType(CAction::E_AT_RTP_STREAM_PLAY); } free(ptr); #else } else if ((cptr = xp_get_value("rtp_stream"))) { ERROR("Scenario specifies a rtp_stream action, but this version of SIPp does not have RTP stream support"); #endif } else { ERROR("illegal in the scenario"); } } else if(!strcmp(actionElem, "rtp_echo")) { #ifdef RTP_STREAM tmpAction->setActionType(CAction::E_AT_RTP_ECHO); handle_rhs(tmpAction, "rtp_echo"); #else ERROR("Scenario specifies a rtp_echo action, but this version of SIPp does not have RTP stream support"); #endif } else { ERROR("Unknown action: %s", actionElem); } /* If the action was not well-formed, there should have already been an * ERROR declaration, thus it is safe to add it here at the end of the loop. */ actions->setAction(tmpAction); xp_close_element(); recvScenarioLen++; } // end while } // Action list for the message indexed by message_index in // the scenario void scenario::getActionForThisMessage(message *message) { char * actionElem; if (!(actionElem = xp_open_element(0))) { return; } if (strcmp(actionElem, "action")) { xp_close_element(); return; } /* We actually have an action element. */ if (message->M_actions != NULL) { ERROR("Duplicate action for %s index %d", message->desc, message->index); } message->M_actions = new CActions(); parseAction(message->M_actions); xp_close_element(); } void scenario::getBookKeeping(message *message) { const char *ptr; if ((ptr = xp_get_value("rtd"))) { message->stop_rtd = get_rtd(ptr, false); } if ((ptr = xp_get_value("repeat_rtd"))) { if (message->stop_rtd) { message->repeat_rtd = get_bool(ptr, "repeat_rtd"); } else { ERROR("There is a repeat_rtd element without an rtd element"); } } if ((ptr = xp_get_value("start_rtd"))) { message->start_rtd = get_rtd(ptr, true); } if ((ptr = xp_get_value("counter"))) { message->counter = get_counter(ptr, "counter"); } } void scenario::getCommonAttributes(message *message) { const char *ptr; getBookKeeping(message); getActionForThisMessage(message); if ((ptr = xp_get_value("lost"))) { message -> lost = get_double(ptr, "lost percentage"); lose_packets = 1; } if ((ptr = xp_get_value("crlf"))) { message -> crlf = 1; } if ((ptr = xp_get_value("ignoresdp"))) { message->ignoresdp = get_bool(ptr, "ignoresdp"); } if (xp_get_value("hiderest")) { hidedefault = xp_get_bool("hiderest", "hiderest"); } message -> hide = xp_get_bool("hide", "hide", hidedefault); if((ptr = xp_get_value((char *)"display"))) { message -> display_str = strdup(ptr); } message -> condexec = xp_get_var("condexec", "condexec variable", -1); message -> condexec_inverse = xp_get_bool("condexec_inverse", "condexec_inverse", false); if ((ptr = xp_get_value("next"))) { if (found_timewait) { ERROR("next labels are not allowed in elements."); } message->nextLabel = strdup(ptr); message->test = xp_get_var("test", "test variable", -1); if ( 0 != ( ptr = xp_get_value((char *)"chance") ) ) { float chance = get_double(ptr,"chance"); /* probability of branch to next */ if (( chance < 0.0 ) || (chance > 1.0 )) { ERROR("Chance %s not in range [0..1]", ptr); } message -> chance = (int)((1.0-chance)*RAND_MAX); } else { message -> chance = 0; /* always */ } } if ((ptr = xp_get_value((char *)"ontimeout"))) { if (found_timewait) { ERROR("ontimeout labels are not allowed in elements."); } message -> onTimeoutLabel = strdup(ptr); } } // char* manipulation : create a int[] from a char* // test first is the char* is formed by int separeted by coma // and then create the table int isWellFormed(char * P_listeStr, int * nombre) { char * ptr = P_listeStr; int sizeOf; bool isANumber; (*nombre) = 0; sizeOf = strlen(P_listeStr); // getting the number if(sizeOf > 0) { // is the string well formed ? [0-9] [,] isANumber = false; for(int i=0; i<=sizeOf; i++) { switch(ptr[i]) { case ',': if(isANumber == false) { return(0); } else { (*nombre)++; } isANumber = false; break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': isANumber = true; break; case '\t': case ' ' : break; case '\0': if(isANumber == false) { return(0); } else { (*nombre)++; } break; default: return(0); } } // end for } return(1); } int createIntegerTable(char * P_listeStr, unsigned int ** listeInteger, int * sizeOfList) { int nb=0; char * ptr = P_listeStr; char * ptr_prev = P_listeStr; unsigned int current_int; if(P_listeStr) { if(isWellFormed(P_listeStr, sizeOfList) == 1) { (*listeInteger) = new unsigned int[(*sizeOfList)]; while((*ptr) != ('\0')) { if((*ptr) == ',') { sscanf(ptr_prev, "%u", ¤t_int); if (nb<(*sizeOfList)) (*listeInteger)[nb] = current_int; nb++; ptr_prev = ptr+1; } ptr++; } // Read the last sscanf(ptr_prev, "%u", ¤t_int); if (nb<(*sizeOfList)) (*listeInteger)[nb] = current_int; nb++; return(1); } return(0); } else return(0); } int createStringTable(const char* inputString, char*** stringList, int* sizeOfList) { if(!inputString) { return 0; } *stringList = NULL; *sizeOfList = 0; /* FIXME: temporary workaround: needs rewrite */ char* input = const_cast(inputString); do { char* p = strchr(input, ','); if (p) { *p++ = '\0'; } *stringList = (char **)realloc(*stringList, sizeof(char *) * (*sizeOfList + 1)); (*stringList)[*sizeOfList] = strdup(input); (*sizeOfList)++; input = p; } while (input); return 1; } void freeStringTable(char ** stringList, int sizeOfList) { for (int i = 0; i < sizeOfList; i++) { free(stringList[i]); } free(stringList); } /* These are the names of the scenarios, they must match the default_scenario table. */ const char *scenario_table[] = { "uac", "uas", "regexp", "3pcc-C-A", "3pcc-C-B", "3pcc-A", "3pcc-B", "branchc", "branchs", "uac_pcap", "ooc_default", "ooc_dummy", }; int find_scenario(const char *scenario) { int i, max; max = sizeof(scenario_table)/sizeof(scenario_table[0]); for (i = 0; i < max; i++) { if (!strcmp(scenario_table[i], scenario)) { return i; } } ERROR("Invalid default scenario name '%s'", scenario); return -1; } // TIP: to integrate an existing XML scenario, use the following sed line: // cat ../3pcc-controller-B.xml | sed -e 's/\"/\\\"/g' -e 's/\(.*\)/\"\1\\n\"/' const char * default_scenario [] = { /************* Default_scenario[0] ***************/ "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" " \n" " \n" " \n" " ;tag=[pid]SIPpTag00[call_number]\n" " To: [service] \n" " Call-ID: [call_id]\n" " CSeq: 1 INVITE\n" " Contact: sip:sipp@[local_ip]:[local_port]\n" " Max-Forwards: 70\n" " Subject: Performance Test\n" " Content-Type: application/sdp\n" " Content-Length: [len]\n" "\n" " v=0\n" " o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]\n" " s=-\n" " c=IN IP[media_ip_type] [media_ip]\n" " t=0 0\n" " m=audio [media_port] RTP/AVP 0\n" " a=rtpmap:0 PCMU/8000\n" "\n" " ]]>\n" " \n" "\n" " \n" " \n" "\n" " \n" " \n" "\n" " \n" " \n" "\n" " \n" " \n" " \n" " \n" " \n" "\n" " \n" " \n" " \n" " ;tag=[pid]SIPpTag00[call_number]\n" " To: [service] [peer_tag_param]\n" " Call-ID: [call_id]\n" " CSeq: 1 ACK\n" " Contact: sip:sipp@[local_ip]:[local_port]\n" " Max-Forwards: 70\n" " Subject: Performance Test\n" " Content-Length: 0\n" "\n" " ]]>\n" " \n" "\n" " \n" " \n" " \n" "\n" " \n" " \n" " ;tag=[pid]SIPpTag00[call_number]\n" " To: [service] [peer_tag_param]\n" " Call-ID: [call_id]\n" " CSeq: 2 BYE\n" " Contact: sip:sipp@[local_ip]:[local_port]\n" " Max-Forwards: 70\n" " Subject: Performance Test\n" " Content-Length: 0\n" "\n" " ]]>\n" " \n" "\n" " \n" " \n" "\n" " \n" " \n" "\n" " \n" " \n" "\n" "\n" "\n" , /************* Default_scenario[1] ***************/ "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" "\n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" "\n" " \n" " \n" " Content-Length: 0\n" "\n" " ]]>\n" " \n" "\n" " \n" " \n" " Content-Type: application/sdp\n" " Content-Length: [len]\n" "\n" " v=0\n" " o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]\n" " s=-\n" " c=IN IP[media_ip_type] [media_ip]\n" " t=0 0\n" " m=audio [media_port] RTP/AVP 0\n" " a=rtpmap:0 PCMU/8000\n" "\n" " ]]>\n" " \n" "\n" " \n" " \n" "\n" " \n" " \n" "\n" " \n" " \n" " Content-Length: 0\n" "\n" " ]]>\n" " \n" "\n" " \n" " \n" " \n" "\n" "\n" " \n" " \n" "\n" " \n" " \n" "\n" "\n" "\n", /************* Default_scenario[2] ***************/ "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" " \n" " ;tag=[pid]SIPpTag02[call_number]\n" " To: [service] \n" " Call-ID: [call_id]\n" " CSeq: 1 INVITE\n" " Contact: sip:sipp@[local_ip]:[local_port]\n" " Max-Forwards: 70\n" " Subject: Performance Test\n" " Content-Type: application/sdp\n" " Content-Length: [len]\n" "\n" " v=0\n" " o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]\n" " s=-\n" " c=IN IP[media_ip_type] [media_ip]\n" " t=0 0\n" " m=audio [media_port] RTP/AVP 0\n" " a=rtpmap:0 PCMU/8000\n" "\n" " ]]>\n" " \n" "\n" " \n" " \n" "\n" " \n" " \n" " \n" " \n" "\n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" "\n" " \n" " ;tag=[pid]SIPpTag02[call_number]\n" " To: [service] [peer_tag_param]\n" " Call-ID: [call_id]\n" " CSeq: 1 ACK\n" " retrievedIp: [$1]\n" " retrievedContact:[$6]\n" " retrievedSdpOrigin:[$3]\n" " retrievedSdpOrigin-username:[$4]\n" " retrievedSdpOrigin-session-id:[$5]\n" " retrievedSdpOrigin-version:[$8]\n" " Contact: sip:sipp@[local_ip]:[local_port]\n" " Max-Forwards: 70\n" " Subject: Performance Test\n" " Content-Length: 0\n" " ]]>\n" " \n" "\n" " \n" " \n" " \n" "\n" " \n" " \n" " ;tag=[pid]SIPpTag02[call_number]\n" " To: [service] [peer_tag_param]\n" " Call-ID: [call_id]\n" " CSeq: 2 BYE\n" " Contact: sip:sipp@[local_ip]:[local_port]\n" " Max-Forwards: 70\n" " Subject: Performance Test\n" " Content-Length: 0\n" "\n" " ]]>\n" " \n" "\n" " \n" " \n" "\n" " \n" " \n" "\n" " \n" " \n" "\n" "\n" "\n", /************* Default_scenario[3] ***************/ "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" " \n" " ;tag=[pid]SIPpTag03[call_number]\n" " To: [service] \n" " Call-ID: [call_id]\n" " CSeq: 1 INVITE\n" " Contact: sip:sipp@[local_ip]:[local_port]\n" " Max-Forwards: 70\n" " Subject: Performance Test\n" " Content-Length: 0\n" "\n" " ]]>\n" " \n" "\n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" "\n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " ;tag=[pid]SIPpTag03[call_number]\n" " To: [service] [peer_tag_param]\n" " Call-ID: [call_id]\n" " CSeq: 1 ACK\n" " Contact: sip:sipp@[local_ip]:[local_port]\n" " Max-Forwards: 70\n" " Subject: Performance Test\n" " [$2]\n" "\n" " ]]>\n" " \n" "\n" " \n" "\n" " \n" " \n" " ;tag=[pid]SIPpTag03[call_number]\n" " To: [service] [peer_tag_param]\n" " Call-ID: [call_id]\n" " CSeq: 2 BYE\n" " Contact: sip:sipp@[local_ip]:[local_port]\n" " Max-Forwards: 70\n" " Subject: Performance Test\n" " Content-Length: 0\n" "\n" " ]]>\n" " \n" "\n" " \n" "\n" "\n" "\n", /************* Default_scenario[4] ***************/ "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" " \n" " \n" " \n" "\n" "\n" " \n" " ;tag=[pid]SIPpTag04[call_number]\n" " To: [service] \n" " Call-ID: [call_id]\n" " CSeq: 1 INVITE\n" " Contact: sip:sipp@[local_ip]:[local_port]\n" " Max-Forwards: 70\n" " Subject: Performance Test\n" " [$1]\n" "\n" " ]]>\n" " \n" "\n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " ;tag=[pid]SIPpTag04[call_number]\n" " To: [service] [peer_tag_param]\n" " Call-ID: [call_id]\n" " CSeq: 1 ACK\n" " Contact: sip:sipp@[local_ip]:[local_port]\n" " Max-Forwards: 70\n" " Subject: Performance Test\n" " Content-Length: 0\n" "\n" " ]]>\n" " \n" "\n" " \n" " \n" " \n" " \n" " \n" "\n" "\n" " \n" " \n" " ;tag=[pid]SIPpTag04[call_number]\n" " To: [service] [peer_tag_param]\n" " Call-ID: [call_id]\n" " CSeq: 2 BYE\n" " Contact: sip:sipp@[local_ip]:[local_port]\n" " Max-Forwards: 70\n" " Subject: Performance Test\n" " Content-Length: 0\n" "\n" " ]]>\n" " \n" "\n" " \n" " \n" "\n" "\n" "\n" "\n", /************* Default_scenario[5] ***************/ "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" " \n" " \n" "\n" " \n" " \n" " Content-Type: application/sdp\n" " Content-Length: [len]\n" "\n" " v=0\n" " o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]\n" " s=-\n" " c=IN IP[media_ip_type] [media_ip]\n" " t=0 0\n" " m=audio [media_port] RTP/AVP 0\n" " a=rtpmap:0 PCMU/8000\n" "\n" " ]]>\n" " \n" "\n" " \n" "\n" " \n" "\n" " \n" "\n" " \n" " \n" " Content-Length: 0\n" "\n" " ]]>\n" " \n" "\n" " \n" " \n" " \n" "\n" "\n" "\n", /************* Default_scenario[6] ***************/ "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" " \n" "\n" " \n" " \n" " Content-Type: application/sdp\n" " Content-Length: [len]\n" "\n" " v=0\n" " o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]\n" " s=-\n" " c=IN IP[media_ip_type] [media_ip]\n" " t=0 0\n" " m=audio [media_port] RTP/AVP 0\n" " a=rtpmap:0 PCMU/8000\n" "\n" " ]]>\n" " \n" "\n" " \n" "\n" " \n" "\n" " \n" "\n" " \n" " \n" " Content-Length: 0\n" "\n" " ]]>\n" " \n" "\n" " \n" " \n" " \n" "\n" "\n", /************* Default_scenario[7] ***************/ "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" " \n" " ;tag=[pid]SIPpTag07[call_number]\n" " To: ua1 \n" " Call-ID: [call_id]\n" " CSeq: 1 REGISTER\n" " Contact: sip:ua1@[local_ip]:[local_port]\n" " Content-Length: 0\n" " Expires: 300\n" "\n" " ]]>\n" " \n" "\n" " \n" " \n" " \n" "\n" " \n" " \n" "\n" " \n" "\n", /************* Default_scenario[8] ***************/ "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" " \n" " \n" "\n" " \n" " \n" " Content-Length: 0\n" " Expires: 300\n" "\n" " ]]>\n" " \n" "\n" " \n" " \n" " \n" " \n" " \n" " \n" "\n" " \n" " \n" " \n" " Content-Length: 0\n" "\n" " ]]>\n" " \n" "\n" " \n" " \n" " \n" " Content-Length: 0\n" "\n" " ]]>\n" " \n" "\n" " \n" "\n", /* Although this scenario will not work without pcap play enabled, there is no * harm in including it in the binary anyway, because the user could have * dumped it and passed it with -sf. */ /************* Default_scenario[9] ***************/ "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" " \n" " \n" " \n" " ;tag=[pid]SIPpTag09[call_number]\n" " To: [service] \n" " Call-ID: [call_id]\n" " CSeq: 1 INVITE\n" " Contact: sip:sipp@[local_ip]:[local_port]\n" " Max-Forwards: 70\n" " Subject: Performance Test\n" " Content-Type: application/sdp\n" " Content-Length: [len]\n" "\n" " v=0\n" " o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]\n" " s=-\n" " c=IN IP[local_ip_type] [local_ip]\n" " t=0 0\n" " m=audio [auto_media_port] RTP/AVP 8 101\n" " a=rtpmap:8 PCMA/8000\n" " a=rtpmap:101 telephone-event/8000\n" " a=fmtp:101 0-11,16\n" "\n" " ]]>\n" " \n" "\n" " \n" " \n" "\n" " \n" " \n" "\n" " \n" " \n" " \n" " \n" " \n" "\n" " \n" " \n" " \n" " ;tag=[pid]SIPpTag09[call_number]\n" " To: [service] [peer_tag_param]\n" " Call-ID: [call_id]\n" " CSeq: 1 ACK\n" " Contact: sip:sipp@[local_ip]:[local_port]\n" " Max-Forwards: 70\n" " Subject: Performance Test\n" " Content-Length: 0\n" "\n" " ]]>\n" " \n" "\n" " \n" " \n" " \n" " \n" " \n" " \n" "\n" " \n" " \n" " \n" "\n" " \n" " \n" " \n" " \n" " \n" " \n" "\n" " \n" "\n" " \n" " \n" " ;tag=[pid]SIPpTag09[call_number]\n" " To: [service] [peer_tag_param]\n" " Call-ID: [call_id]\n" " CSeq: 2 BYE\n" " Contact: sip:sipp@[local_ip]:[local_port]\n" " Max-Forwards: 70\n" " Subject: Performance Test\n" " Content-Length: 0\n" "\n" " ]]>\n" " \n" "\n" " \n" " \n" "\n" " \n" " \n" "\n" " \n" " \n" "\n" "\n" "\n", "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" " \n" "\n" " \n" " \n" " Content-Length: 0\n" "\n" " ]]>\n" " \n" "\n" " \n" " \n" " \n" "\n" "\n" " \n" " \n" "\n" " \n" " \n" "\n" "\n", "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" " \n" "\n" " \n" " \n" "\n" " \n" " \n" "\n" "\n", }; sipp-3.6.0/src/socketowner.cpp0000644000175000017500000001000213475544015015710 0ustar walterwalter/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Richard GAYRAUD - 04 Nov 2003 * Olivier Jacques * From Hewlett Packard Company. * Shriram Natarajan * Peter Higginson * Eric Miller * Venkatesh * Enrico Hartung * Nasir Khan * Lee Ballard * Guillaume Teissier from FTR&D * Wolfgang Beck * Venkatesh * Vlad Troyanker * Charles P Wright from IBM Research * Amit On from Followap * Jan Andres from Freenet * Ben Evans from Open Cloud * Marc Van Diest from Belgacom * Michael Dwyer from Cibation */ #include #include #include #include #include #include #include #include "sipp.hpp" socket_owner_map_map socket_to_owners; SIPpSocket *socketowner::associate_socket(SIPpSocket *socket) { if (socket) { this->call_socket = socket; add_owner_to_socket(socket); } return socket; } SIPpSocket *socketowner::dissociate_socket() { SIPpSocket *ret = this->call_socket; remove_owner_from_socket(this->call_socket); this->call_socket = NULL; return ret; } unsigned long socketowner::nextownerid = 1; socketowner::socketowner() { this->call_socket = NULL; this->ownerid = socketowner::nextownerid++; } socketowner::~socketowner() { if (this->call_socket) { dissociate_socket()->close(); } } void socketowner::add_owner_to_socket(SIPpSocket *socket) { socket_owner_map_map::iterator map_it = socket_to_owners.find(socket); /* No map defined for this socket. */ if (map_it == socket_to_owners.end()) { socket_to_owners.insert(socket_map_pair(socket, new owner_map)); map_it = socket_to_owners.find(socket); assert(map_it != socket_to_owners.end()); } owner_map *socket_owner_map = (owner_map *) map_it->second; socket_owner_map->insert(long_owner_pair(this->ownerid, this)); } void socketowner::remove_owner_from_socket(SIPpSocket *socket) { socket_owner_map_map::iterator map_it = socket_to_owners.find(socket); /* We must have a map for this socket. */ assert(map_it != socket_to_owners.end()); owner_map *socket_owner_map = (owner_map *) map_it->second; owner_map::iterator owner_it = socket_owner_map->find(this->ownerid); /* And our owner must exist in the map. */ assert(owner_it != socket_owner_map->end()); socket_owner_map->erase(owner_it); /* If we have no more calls, we can delete this entry. */ if (socket_owner_map->begin() == socket_owner_map->end()) { delete socket_owner_map; socket_to_owners.erase(map_it); } } /* The caller must delete this list. */ owner_list *get_owners_for_socket(SIPpSocket *socket) { owner_list *l = new owner_list; socket_owner_map_map::iterator map_it = socket_to_owners.find(socket); /* No map defined for this socket. */ if (map_it == socket_to_owners.end()) { return l; } owner_map *socket_owner_map = (owner_map *) map_it->second; owner_map::iterator owner_it; for (owner_it = socket_owner_map->begin(); owner_it != socket_owner_map->end(); owner_it++) { l->insert(l->end(), owner_it->second); } return l; } sipp-3.6.0/src/rijndael.c0000644000175000017500000007171513475544015014617 0ustar walterwalter/*------------------------------------------------------------------- * Rijndael Implementation *------------------------------------------------------------------- * * A sample 32-bit orientated implementation of Rijndael, the * suggested kernel for the example 3GPP authentication and key * agreement functions. * * This implementation draws on the description in section 5.2 of * the AES proposal and also on the implementation by * Dr B. R. Gladman 9th October 2000. * It uses a number of large (4k) lookup tables to implement the * algorithm in an efficient manner. * * Note: in this implementation the State is stored in four 32-bit * words, one per column of the State, with the top byte of the * column being the _least_ significant byte of the word. * *-----------------------------------------------------------------*/ #include "rijndael.h" #include #define LITTLE_ENDIAN /* For INTEL architecture */ /* Circular byte rotates of 32 bit values */ #define rot1(x) ((x << 8) | (x >> 24)) #define rot2(x) ((x << 16) | (x >> 16)) #define rot3(x) ((x << 24) | (x >> 8)) /* Extract a byte from a 32-bit uint32_t */ #define byte0(x) ((uint8_t)(x)) #define byte1(x) ((uint8_t)(x >> 8)) #define byte2(x) ((uint8_t)(x >> 16)) #define byte3(x) ((uint8_t)(x >> 24)) /* Put or get a 32 bit uint32_t (v) in machine order from a byte * * address in (x) */ #ifdef LITTLE_ENDIAN #define u32_in(x) (*(uint32_t*)(x)) #define u32_out(x,y) (*(uint32_t*)(x) = y) #else /* Invert byte order in a 32 bit variable */ __inline uint32_t byte_swap(const uint32_t x) { return rot1(x) & 0x00ff00ff | rot3(x) & 0xff00ff00; } __inline uint32_t u32_in(const uint8_t x[]) { return byte_swap(*(uint32_t*)x); }; __inline void u32_out(uint8_t x[], const uint32_t v) { *(uint32_t*)x = byte_swap(v); }; #endif /*--------------- The lookup tables ----------------------------*/ static uint32_t rnd_con[10] = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1B, 0x36 }; static uint32_t ft_tab[4][256] = { { 0xA56363C6,0x847C7CF8,0x997777EE,0x8D7B7BF6,0x0DF2F2FF,0xBD6B6BD6,0xB16F6FDE,0x54C5C591, 0x50303060,0x03010102,0xA96767CE,0x7D2B2B56,0x19FEFEE7,0x62D7D7B5,0xE6ABAB4D,0x9A7676EC, 0x45CACA8F,0x9D82821F,0x40C9C989,0x877D7DFA,0x15FAFAEF,0xEB5959B2,0xC947478E,0x0BF0F0FB, 0xECADAD41,0x67D4D4B3,0xFDA2A25F,0xEAAFAF45,0xBF9C9C23,0xF7A4A453,0x967272E4,0x5BC0C09B, 0xC2B7B775,0x1CFDFDE1,0xAE93933D,0x6A26264C,0x5A36366C,0x413F3F7E,0x02F7F7F5,0x4FCCCC83, 0x5C343468,0xF4A5A551,0x34E5E5D1,0x08F1F1F9,0x937171E2,0x73D8D8AB,0x53313162,0x3F15152A, 0x0C040408,0x52C7C795,0x65232346,0x5EC3C39D,0x28181830,0xA1969637,0x0F05050A,0xB59A9A2F, 0x0907070E,0x36121224,0x9B80801B,0x3DE2E2DF,0x26EBEBCD,0x6927274E,0xCDB2B27F,0x9F7575EA, 0x1B090912,0x9E83831D,0x742C2C58,0x2E1A1A34,0x2D1B1B36,0xB26E6EDC,0xEE5A5AB4,0xFBA0A05B, 0xF65252A4,0x4D3B3B76,0x61D6D6B7,0xCEB3B37D,0x7B292952,0x3EE3E3DD,0x712F2F5E,0x97848413, 0xF55353A6,0x68D1D1B9,0000000000,0x2CEDEDC1,0x60202040,0x1FFCFCE3,0xC8B1B179,0xED5B5BB6, 0xBE6A6AD4,0x46CBCB8D,0xD9BEBE67,0x4B393972,0xDE4A4A94,0xD44C4C98,0xE85858B0,0x4ACFCF85, 0x6BD0D0BB,0x2AEFEFC5,0xE5AAAA4F,0x16FBFBED,0xC5434386,0xD74D4D9A,0x55333366,0x94858511, 0xCF45458A,0x10F9F9E9,0x06020204,0x817F7FFE,0xF05050A0,0x443C3C78,0xBA9F9F25,0xE3A8A84B, 0xF35151A2,0xFEA3A35D,0xC0404080,0x8A8F8F05,0xAD92923F,0xBC9D9D21,0x48383870,0x04F5F5F1, 0xDFBCBC63,0xC1B6B677,0x75DADAAF,0x63212142,0x30101020,0x1AFFFFE5,0x0EF3F3FD,0x6DD2D2BF, 0x4CCDCD81,0x140C0C18,0x35131326,0x2FECECC3,0xE15F5FBE,0xA2979735,0xCC444488,0x3917172E, 0x57C4C493,0xF2A7A755,0x827E7EFC,0x473D3D7A,0xAC6464C8,0xE75D5DBA,0x2B191932,0x957373E6, 0xA06060C0,0x98818119,0xD14F4F9E,0x7FDCDCA3,0x66222244,0x7E2A2A54,0xAB90903B,0x8388880B, 0xCA46468C,0x29EEEEC7,0xD3B8B86B,0x3C141428,0x79DEDEA7,0xE25E5EBC,0x1D0B0B16,0x76DBDBAD, 0x3BE0E0DB,0x56323264,0x4E3A3A74,0x1E0A0A14,0xDB494992,0x0A06060C,0x6C242448,0xE45C5CB8, 0x5DC2C29F,0x6ED3D3BD,0xEFACAC43,0xA66262C4,0xA8919139,0xA4959531,0x37E4E4D3,0x8B7979F2, 0x32E7E7D5,0x43C8C88B,0x5937376E,0xB76D6DDA,0x8C8D8D01,0x64D5D5B1,0xD24E4E9C,0xE0A9A949, 0xB46C6CD8,0xFA5656AC,0x07F4F4F3,0x25EAEACF,0xAF6565CA,0x8E7A7AF4,0xE9AEAE47,0x18080810, 0xD5BABA6F,0x887878F0,0x6F25254A,0x722E2E5C,0x241C1C38,0xF1A6A657,0xC7B4B473,0x51C6C697, 0x23E8E8CB,0x7CDDDDA1,0x9C7474E8,0x211F1F3E,0xDD4B4B96,0xDCBDBD61,0x868B8B0D,0x858A8A0F, 0x907070E0,0x423E3E7C,0xC4B5B571,0xAA6666CC,0xD8484890,0x05030306,0x01F6F6F7,0x120E0E1C, 0xA36161C2,0x5F35356A,0xF95757AE,0xD0B9B969,0x91868617,0x58C1C199,0x271D1D3A,0xB99E9E27, 0x38E1E1D9,0x13F8F8EB,0xB398982B,0x33111122,0xBB6969D2,0x70D9D9A9,0x898E8E07,0xA7949433, 0xB69B9B2D,0x221E1E3C,0x92878715,0x20E9E9C9,0x49CECE87,0xFF5555AA,0x78282850,0x7ADFDFA5, 0x8F8C8C03,0xF8A1A159,0x80898909,0x170D0D1A,0xDABFBF65,0x31E6E6D7,0xC6424284,0xB86868D0, 0xC3414182,0xB0999929,0x772D2D5A,0x110F0F1E,0xCBB0B07B,0xFC5454A8,0xD6BBBB6D,0x3A16162C }, { 0x6363C6A5,0x7C7CF884,0x7777EE99,0x7B7BF68D,0xF2F2FF0D,0x6B6BD6BD,0x6F6FDEB1,0xC5C59154, 0x30306050,0x01010203,0x6767CEA9,0x2B2B567D,0xFEFEE719,0xD7D7B562,0xABAB4DE6,0x7676EC9A, 0xCACA8F45,0x82821F9D,0xC9C98940,0x7D7DFA87,0xFAFAEF15,0x5959B2EB,0x47478EC9,0xF0F0FB0B, 0xADAD41EC,0xD4D4B367,0xA2A25FFD,0xAFAF45EA,0x9C9C23BF,0xA4A453F7,0x7272E496,0xC0C09B5B, 0xB7B775C2,0xFDFDE11C,0x93933DAE,0x26264C6A,0x36366C5A,0x3F3F7E41,0xF7F7F502,0xCCCC834F, 0x3434685C,0xA5A551F4,0xE5E5D134,0xF1F1F908,0x7171E293,0xD8D8AB73,0x31316253,0x15152A3F, 0x0404080C,0xC7C79552,0x23234665,0xC3C39D5E,0x18183028,0x969637A1,0x05050A0F,0x9A9A2FB5, 0x07070E09,0x12122436,0x80801B9B,0xE2E2DF3D,0xEBEBCD26,0x27274E69,0xB2B27FCD,0x7575EA9F, 0x0909121B,0x83831D9E,0x2C2C5874,0x1A1A342E,0x1B1B362D,0x6E6EDCB2,0x5A5AB4EE,0xA0A05BFB, 0x5252A4F6,0x3B3B764D,0xD6D6B761,0xB3B37DCE,0x2929527B,0xE3E3DD3E,0x2F2F5E71,0x84841397, 0x5353A6F5,0xD1D1B968,0000000000,0xEDEDC12C,0x20204060,0xFCFCE31F,0xB1B179C8,0x5B5BB6ED, 0x6A6AD4BE,0xCBCB8D46,0xBEBE67D9,0x3939724B,0x4A4A94DE,0x4C4C98D4,0x5858B0E8,0xCFCF854A, 0xD0D0BB6B,0xEFEFC52A,0xAAAA4FE5,0xFBFBED16,0x434386C5,0x4D4D9AD7,0x33336655,0x85851194, 0x45458ACF,0xF9F9E910,0x02020406,0x7F7FFE81,0x5050A0F0,0x3C3C7844,0x9F9F25BA,0xA8A84BE3, 0x5151A2F3,0xA3A35DFE,0x404080C0,0x8F8F058A,0x92923FAD,0x9D9D21BC,0x38387048,0xF5F5F104, 0xBCBC63DF,0xB6B677C1,0xDADAAF75,0x21214263,0x10102030,0xFFFFE51A,0xF3F3FD0E,0xD2D2BF6D, 0xCDCD814C,0x0C0C1814,0x13132635,0xECECC32F,0x5F5FBEE1,0x979735A2,0x444488CC,0x17172E39, 0xC4C49357,0xA7A755F2,0x7E7EFC82,0x3D3D7A47,0x6464C8AC,0x5D5DBAE7,0x1919322B,0x7373E695, 0x6060C0A0,0x81811998,0x4F4F9ED1,0xDCDCA37F,0x22224466,0x2A2A547E,0x90903BAB,0x88880B83, 0x46468CCA,0xEEEEC729,0xB8B86BD3,0x1414283C,0xDEDEA779,0x5E5EBCE2,0x0B0B161D,0xDBDBAD76, 0xE0E0DB3B,0x32326456,0x3A3A744E,0x0A0A141E,0x494992DB,0x06060C0A,0x2424486C,0x5C5CB8E4, 0xC2C29F5D,0xD3D3BD6E,0xACAC43EF,0x6262C4A6,0x919139A8,0x959531A4,0xE4E4D337,0x7979F28B, 0xE7E7D532,0xC8C88B43,0x37376E59,0x6D6DDAB7,0x8D8D018C,0xD5D5B164,0x4E4E9CD2,0xA9A949E0, 0x6C6CD8B4,0x5656ACFA,0xF4F4F307,0xEAEACF25,0x6565CAAF,0x7A7AF48E,0xAEAE47E9,0x08081018, 0xBABA6FD5,0x7878F088,0x25254A6F,0x2E2E5C72,0x1C1C3824,0xA6A657F1,0xB4B473C7,0xC6C69751, 0xE8E8CB23,0xDDDDA17C,0x7474E89C,0x1F1F3E21,0x4B4B96DD,0xBDBD61DC,0x8B8B0D86,0x8A8A0F85, 0x7070E090,0x3E3E7C42,0xB5B571C4,0x6666CCAA,0x484890D8,0x03030605,0xF6F6F701,0x0E0E1C12, 0x6161C2A3,0x35356A5F,0x5757AEF9,0xB9B969D0,0x86861791,0xC1C19958,0x1D1D3A27,0x9E9E27B9, 0xE1E1D938,0xF8F8EB13,0x98982BB3,0x11112233,0x6969D2BB,0xD9D9A970,0x8E8E0789,0x949433A7, 0x9B9B2DB6,0x1E1E3C22,0x87871592,0xE9E9C920,0xCECE8749,0x5555AAFF,0x28285078,0xDFDFA57A, 0x8C8C038F,0xA1A159F8,0x89890980,0x0D0D1A17,0xBFBF65DA,0xE6E6D731,0x424284C6,0x6868D0B8, 0x414182C3,0x999929B0,0x2D2D5A77,0x0F0F1E11,0xB0B07BCB,0x5454A8FC,0xBBBB6DD6,0x16162C3A }, { 0x63C6A563,0x7CF8847C,0x77EE9977,0x7BF68D7B,0xF2FF0DF2,0x6BD6BD6B,0x6FDEB16F,0xC59154C5, 0x30605030,0x01020301,0x67CEA967,0x2B567D2B,0xFEE719FE,0xD7B562D7,0xAB4DE6AB,0x76EC9A76, 0xCA8F45CA,0x821F9D82,0xC98940C9,0x7DFA877D,0xFAEF15FA,0x59B2EB59,0x478EC947,0xF0FB0BF0, 0xAD41ECAD,0xD4B367D4,0xA25FFDA2,0xAF45EAAF,0x9C23BF9C,0xA453F7A4,0x72E49672,0xC09B5BC0, 0xB775C2B7,0xFDE11CFD,0x933DAE93,0x264C6A26,0x366C5A36,0x3F7E413F,0xF7F502F7,0xCC834FCC, 0x34685C34,0xA551F4A5,0xE5D134E5,0xF1F908F1,0x71E29371,0xD8AB73D8,0x31625331,0x152A3F15, 0x04080C04,0xC79552C7,0x23466523,0xC39D5EC3,0x18302818,0x9637A196,0x050A0F05,0x9A2FB59A, 0x070E0907,0x12243612,0x801B9B80,0xE2DF3DE2,0xEBCD26EB,0x274E6927,0xB27FCDB2,0x75EA9F75, 0x09121B09,0x831D9E83,0x2C58742C,0x1A342E1A,0x1B362D1B,0x6EDCB26E,0x5AB4EE5A,0xA05BFBA0, 0x52A4F652,0x3B764D3B,0xD6B761D6,0xB37DCEB3,0x29527B29,0xE3DD3EE3,0x2F5E712F,0x84139784, 0x53A6F553,0xD1B968D1,0000000000,0xEDC12CED,0x20406020,0xFCE31FFC,0xB179C8B1,0x5BB6ED5B, 0x6AD4BE6A,0xCB8D46CB,0xBE67D9BE,0x39724B39,0x4A94DE4A,0x4C98D44C,0x58B0E858,0xCF854ACF, 0xD0BB6BD0,0xEFC52AEF,0xAA4FE5AA,0xFBED16FB,0x4386C543,0x4D9AD74D,0x33665533,0x85119485, 0x458ACF45,0xF9E910F9,0x02040602,0x7FFE817F,0x50A0F050,0x3C78443C,0x9F25BA9F,0xA84BE3A8, 0x51A2F351,0xA35DFEA3,0x4080C040,0x8F058A8F,0x923FAD92,0x9D21BC9D,0x38704838,0xF5F104F5, 0xBC63DFBC,0xB677C1B6,0xDAAF75DA,0x21426321,0x10203010,0xFFE51AFF,0xF3FD0EF3,0xD2BF6DD2, 0xCD814CCD,0x0C18140C,0x13263513,0xECC32FEC,0x5FBEE15F,0x9735A297,0x4488CC44,0x172E3917, 0xC49357C4,0xA755F2A7,0x7EFC827E,0x3D7A473D,0x64C8AC64,0x5DBAE75D,0x19322B19,0x73E69573, 0x60C0A060,0x81199881,0x4F9ED14F,0xDCA37FDC,0x22446622,0x2A547E2A,0x903BAB90,0x880B8388, 0x468CCA46,0xEEC729EE,0xB86BD3B8,0x14283C14,0xDEA779DE,0x5EBCE25E,0x0B161D0B,0xDBAD76DB, 0xE0DB3BE0,0x32645632,0x3A744E3A,0x0A141E0A,0x4992DB49,0x060C0A06,0x24486C24,0x5CB8E45C, 0xC29F5DC2,0xD3BD6ED3,0xAC43EFAC,0x62C4A662,0x9139A891,0x9531A495,0xE4D337E4,0x79F28B79, 0xE7D532E7,0xC88B43C8,0x376E5937,0x6DDAB76D,0x8D018C8D,0xD5B164D5,0x4E9CD24E,0xA949E0A9, 0x6CD8B46C,0x56ACFA56,0xF4F307F4,0xEACF25EA,0x65CAAF65,0x7AF48E7A,0xAE47E9AE,0x08101808, 0xBA6FD5BA,0x78F08878,0x254A6F25,0x2E5C722E,0x1C38241C,0xA657F1A6,0xB473C7B4,0xC69751C6, 0xE8CB23E8,0xDDA17CDD,0x74E89C74,0x1F3E211F,0x4B96DD4B,0xBD61DCBD,0x8B0D868B,0x8A0F858A, 0x70E09070,0x3E7C423E,0xB571C4B5,0x66CCAA66,0x4890D848,0x03060503,0xF6F701F6,0x0E1C120E, 0x61C2A361,0x356A5F35,0x57AEF957,0xB969D0B9,0x86179186,0xC19958C1,0x1D3A271D,0x9E27B99E, 0xE1D938E1,0xF8EB13F8,0x982BB398,0x11223311,0x69D2BB69,0xD9A970D9,0x8E07898E,0x9433A794, 0x9B2DB69B,0x1E3C221E,0x87159287,0xE9C920E9,0xCE8749CE,0x55AAFF55,0x28507828,0xDFA57ADF, 0x8C038F8C,0xA159F8A1,0x89098089,0x0D1A170D,0xBF65DABF,0xE6D731E6,0x4284C642,0x68D0B868, 0x4182C341,0x9929B099,0x2D5A772D,0x0F1E110F,0xB07BCBB0,0x54A8FC54,0xBB6DD6BB,0x162C3A16 }, { 0xC6A56363,0xF8847C7C,0xEE997777,0xF68D7B7B,0xFF0DF2F2,0xD6BD6B6B,0xDEB16F6F,0x9154C5C5, 0x60503030,0x02030101,0xCEA96767,0x567D2B2B,0xE719FEFE,0xB562D7D7,0x4DE6ABAB,0xEC9A7676, 0x8F45CACA,0x1F9D8282,0x8940C9C9,0xFA877D7D,0xEF15FAFA,0xB2EB5959,0x8EC94747,0xFB0BF0F0, 0x41ECADAD,0xB367D4D4,0x5FFDA2A2,0x45EAAFAF,0x23BF9C9C,0x53F7A4A4,0xE4967272,0x9B5BC0C0, 0x75C2B7B7,0xE11CFDFD,0x3DAE9393,0x4C6A2626,0x6C5A3636,0x7E413F3F,0xF502F7F7,0x834FCCCC, 0x685C3434,0x51F4A5A5,0xD134E5E5,0xF908F1F1,0xE2937171,0xAB73D8D8,0x62533131,0x2A3F1515, 0x080C0404,0x9552C7C7,0x46652323,0x9D5EC3C3,0x30281818,0x37A19696,0x0A0F0505,0x2FB59A9A, 0x0E090707,0x24361212,0x1B9B8080,0xDF3DE2E2,0xCD26EBEB,0x4E692727,0x7FCDB2B2,0xEA9F7575, 0x121B0909,0x1D9E8383,0x58742C2C,0x342E1A1A,0x362D1B1B,0xDCB26E6E,0xB4EE5A5A,0x5BFBA0A0, 0xA4F65252,0x764D3B3B,0xB761D6D6,0x7DCEB3B3,0x527B2929,0xDD3EE3E3,0x5E712F2F,0x13978484, 0xA6F55353,0xB968D1D1,0000000000,0xC12CEDED,0x40602020,0xE31FFCFC,0x79C8B1B1,0xB6ED5B5B, 0xD4BE6A6A,0x8D46CBCB,0x67D9BEBE,0x724B3939,0x94DE4A4A,0x98D44C4C,0xB0E85858,0x854ACFCF, 0xBB6BD0D0,0xC52AEFEF,0x4FE5AAAA,0xED16FBFB,0x86C54343,0x9AD74D4D,0x66553333,0x11948585, 0x8ACF4545,0xE910F9F9,0x04060202,0xFE817F7F,0xA0F05050,0x78443C3C,0x25BA9F9F,0x4BE3A8A8, 0xA2F35151,0x5DFEA3A3,0x80C04040,0x058A8F8F,0x3FAD9292,0x21BC9D9D,0x70483838,0xF104F5F5, 0x63DFBCBC,0x77C1B6B6,0xAF75DADA,0x42632121,0x20301010,0xE51AFFFF,0xFD0EF3F3,0xBF6DD2D2, 0x814CCDCD,0x18140C0C,0x26351313,0xC32FECEC,0xBEE15F5F,0x35A29797,0x88CC4444,0x2E391717, 0x9357C4C4,0x55F2A7A7,0xFC827E7E,0x7A473D3D,0xC8AC6464,0xBAE75D5D,0x322B1919,0xE6957373, 0xC0A06060,0x19988181,0x9ED14F4F,0xA37FDCDC,0x44662222,0x547E2A2A,0x3BAB9090,0x0B838888, 0x8CCA4646,0xC729EEEE,0x6BD3B8B8,0x283C1414,0xA779DEDE,0xBCE25E5E,0x161D0B0B,0xAD76DBDB, 0xDB3BE0E0,0x64563232,0x744E3A3A,0x141E0A0A,0x92DB4949,0x0C0A0606,0x486C2424,0xB8E45C5C, 0x9F5DC2C2,0xBD6ED3D3,0x43EFACAC,0xC4A66262,0x39A89191,0x31A49595,0xD337E4E4,0xF28B7979, 0xD532E7E7,0x8B43C8C8,0x6E593737,0xDAB76D6D,0x018C8D8D,0xB164D5D5,0x9CD24E4E,0x49E0A9A9, 0xD8B46C6C,0xACFA5656,0xF307F4F4,0xCF25EAEA,0xCAAF6565,0xF48E7A7A,0x47E9AEAE,0x10180808, 0x6FD5BABA,0xF0887878,0x4A6F2525,0x5C722E2E,0x38241C1C,0x57F1A6A6,0x73C7B4B4,0x9751C6C6, 0xCB23E8E8,0xA17CDDDD,0xE89C7474,0x3E211F1F,0x96DD4B4B,0x61DCBDBD,0x0D868B8B,0x0F858A8A, 0xE0907070,0x7C423E3E,0x71C4B5B5,0xCCAA6666,0x90D84848,0x06050303,0xF701F6F6,0x1C120E0E, 0xC2A36161,0x6A5F3535,0xAEF95757,0x69D0B9B9,0x17918686,0x9958C1C1,0x3A271D1D,0x27B99E9E, 0xD938E1E1,0xEB13F8F8,0x2BB39898,0x22331111,0xD2BB6969,0xA970D9D9,0x07898E8E,0x33A79494, 0x2DB69B9B,0x3C221E1E,0x15928787,0xC920E9E9,0x8749CECE,0xAAFF5555,0x50782828,0xA57ADFDF, 0x038F8C8C,0x59F8A1A1,0x09808989,0x1A170D0D,0x65DABFBF,0xD731E6E6,0x84C64242,0xD0B86868, 0x82C34141,0x29B09999,0x5A772D2D,0x1E110F0F,0x7BCBB0B0,0xA8FC5454,0x6DD6BBBB,0x2C3A1616 } }; static uint32_t fl_tab[4][256] = { { 0x00000063,0x0000007C,0x00000077,0x0000007B,0x000000F2,0x0000006B,0x0000006F,0x000000C5, 0x00000030,0x00000001,0x00000067,0x0000002B,0x000000FE,0x000000D7,0x000000AB,0x00000076, 0x000000CA,0x00000082,0x000000C9,0x0000007D,0x000000FA,0x00000059,0x00000047,0x000000F0, 0x000000AD,0x000000D4,0x000000A2,0x000000AF,0x0000009C,0x000000A4,0x00000072,0x000000C0, 0x000000B7,0x000000FD,0x00000093,0x00000026,0x00000036,0x0000003F,0x000000F7,0x000000CC, 0x00000034,0x000000A5,0x000000E5,0x000000F1,0x00000071,0x000000D8,0x00000031,0x00000015, 0x00000004,0x000000C7,0x00000023,0x000000C3,0x00000018,0x00000096,0x00000005,0x0000009A, 0x00000007,0x00000012,0x00000080,0x000000E2,0x000000EB,0x00000027,0x000000B2,0x00000075, 0x00000009,0x00000083,0x0000002C,0x0000001A,0x0000001B,0x0000006E,0x0000005A,0x000000A0, 0x00000052,0x0000003B,0x000000D6,0x000000B3,0x00000029,0x000000E3,0x0000002F,0x00000084, 0x00000053,0x000000D1,0x00000000,0x000000ED,0x00000020,0x000000FC,0x000000B1,0x0000005B, 0x0000006A,0x000000CB,0x000000BE,0x00000039,0x0000004A,0x0000004C,0x00000058,0x000000CF, 0x000000D0,0x000000EF,0x000000AA,0x000000FB,0x00000043,0x0000004D,0x00000033,0x00000085, 0x00000045,0x000000F9,0x00000002,0x0000007F,0x00000050,0x0000003C,0x0000009F,0x000000A8, 0x00000051,0x000000A3,0x00000040,0x0000008F,0x00000092,0x0000009D,0x00000038,0x000000F5, 0x000000BC,0x000000B6,0x000000DA,0x00000021,0x00000010,0x000000FF,0x000000F3,0x000000D2, 0x000000CD,0x0000000C,0x00000013,0x000000EC,0x0000005F,0x00000097,0x00000044,0x00000017, 0x000000C4,0x000000A7,0x0000007E,0x0000003D,0x00000064,0x0000005D,0x00000019,0x00000073, 0x00000060,0x00000081,0x0000004F,0x000000DC,0x00000022,0x0000002A,0x00000090,0x00000088, 0x00000046,0x000000EE,0x000000B8,0x00000014,0x000000DE,0x0000005E,0x0000000B,0x000000DB, 0x000000E0,0x00000032,0x0000003A,0x0000000A,0x00000049,0x00000006,0x00000024,0x0000005C, 0x000000C2,0x000000D3,0x000000AC,0x00000062,0x00000091,0x00000095,0x000000E4,0x00000079, 0x000000E7,0x000000C8,0x00000037,0x0000006D,0x0000008D,0x000000D5,0x0000004E,0x000000A9, 0x0000006C,0x00000056,0x000000F4,0x000000EA,0x00000065,0x0000007A,0x000000AE,0x00000008, 0x000000BA,0x00000078,0x00000025,0x0000002E,0x0000001C,0x000000A6,0x000000B4,0x000000C6, 0x000000E8,0x000000DD,0x00000074,0x0000001F,0x0000004B,0x000000BD,0x0000008B,0x0000008A, 0x00000070,0x0000003E,0x000000B5,0x00000066,0x00000048,0x00000003,0x000000F6,0x0000000E, 0x00000061,0x00000035,0x00000057,0x000000B9,0x00000086,0x000000C1,0x0000001D,0x0000009E, 0x000000E1,0x000000F8,0x00000098,0x00000011,0x00000069,0x000000D9,0x0000008E,0x00000094, 0x0000009B,0x0000001E,0x00000087,0x000000E9,0x000000CE,0x00000055,0x00000028,0x000000DF, 0x0000008C,0x000000A1,0x00000089,0x0000000D,0x000000BF,0x000000E6,0x00000042,0x00000068, 0x00000041,0x00000099,0x0000002D,0x0000000F,0x000000B0,0x00000054,0x000000BB,0x00000016 }, { 0x00006300,0x00007C00,0x00007700,0x00007B00,0x0000F200,0x00006B00,0x00006F00,0x0000C500, 0x00003000,0x00000100,0x00006700,0x00002B00,0x0000FE00,0x0000D700,0x0000AB00,0x00007600, 0x0000CA00,0x00008200,0x0000C900,0x00007D00,0x0000FA00,0x00005900,0x00004700,0x0000F000, 0x0000AD00,0x0000D400,0x0000A200,0x0000AF00,0x00009C00,0x0000A400,0x00007200,0x0000C000, 0x0000B700,0x0000FD00,0x00009300,0x00002600,0x00003600,0x00003F00,0x0000F700,0x0000CC00, 0x00003400,0x0000A500,0x0000E500,0x0000F100,0x00007100,0x0000D800,0x00003100,0x00001500, 0x00000400,0x0000C700,0x00002300,0x0000C300,0x00001800,0x00009600,0x00000500,0x00009A00, 0x00000700,0x00001200,0x00008000,0x0000E200,0x0000EB00,0x00002700,0x0000B200,0x00007500, 0x00000900,0x00008300,0x00002C00,0x00001A00,0x00001B00,0x00006E00,0x00005A00,0x0000A000, 0x00005200,0x00003B00,0x0000D600,0x0000B300,0x00002900,0x0000E300,0x00002F00,0x00008400, 0x00005300,0x0000D100,0000000000,0x0000ED00,0x00002000,0x0000FC00,0x0000B100,0x00005B00, 0x00006A00,0x0000CB00,0x0000BE00,0x00003900,0x00004A00,0x00004C00,0x00005800,0x0000CF00, 0x0000D000,0x0000EF00,0x0000AA00,0x0000FB00,0x00004300,0x00004D00,0x00003300,0x00008500, 0x00004500,0x0000F900,0x00000200,0x00007F00,0x00005000,0x00003C00,0x00009F00,0x0000A800, 0x00005100,0x0000A300,0x00004000,0x00008F00,0x00009200,0x00009D00,0x00003800,0x0000F500, 0x0000BC00,0x0000B600,0x0000DA00,0x00002100,0x00001000,0x0000FF00,0x0000F300,0x0000D200, 0x0000CD00,0x00000C00,0x00001300,0x0000EC00,0x00005F00,0x00009700,0x00004400,0x00001700, 0x0000C400,0x0000A700,0x00007E00,0x00003D00,0x00006400,0x00005D00,0x00001900,0x00007300, 0x00006000,0x00008100,0x00004F00,0x0000DC00,0x00002200,0x00002A00,0x00009000,0x00008800, 0x00004600,0x0000EE00,0x0000B800,0x00001400,0x0000DE00,0x00005E00,0x00000B00,0x0000DB00, 0x0000E000,0x00003200,0x00003A00,0x00000A00,0x00004900,0x00000600,0x00002400,0x00005C00, 0x0000C200,0x0000D300,0x0000AC00,0x00006200,0x00009100,0x00009500,0x0000E400,0x00007900, 0x0000E700,0x0000C800,0x00003700,0x00006D00,0x00008D00,0x0000D500,0x00004E00,0x0000A900, 0x00006C00,0x00005600,0x0000F400,0x0000EA00,0x00006500,0x00007A00,0x0000AE00,0x00000800, 0x0000BA00,0x00007800,0x00002500,0x00002E00,0x00001C00,0x0000A600,0x0000B400,0x0000C600, 0x0000E800,0x0000DD00,0x00007400,0x00001F00,0x00004B00,0x0000BD00,0x00008B00,0x00008A00, 0x00007000,0x00003E00,0x0000B500,0x00006600,0x00004800,0x00000300,0x0000F600,0x00000E00, 0x00006100,0x00003500,0x00005700,0x0000B900,0x00008600,0x0000C100,0x00001D00,0x00009E00, 0x0000E100,0x0000F800,0x00009800,0x00001100,0x00006900,0x0000D900,0x00008E00,0x00009400, 0x00009B00,0x00001E00,0x00008700,0x0000E900,0x0000CE00,0x00005500,0x00002800,0x0000DF00, 0x00008C00,0x0000A100,0x00008900,0x00000D00,0x0000BF00,0x0000E600,0x00004200,0x00006800, 0x00004100,0x00009900,0x00002D00,0x00000F00,0x0000B000,0x00005400,0x0000BB00,0x00001600 }, { 0x00630000,0x007C0000,0x00770000,0x007B0000,0x00F20000,0x006B0000,0x006F0000,0x00C50000, 0x00300000,0x00010000,0x00670000,0x002B0000,0x00FE0000,0x00D70000,0x00AB0000,0x00760000, 0x00CA0000,0x00820000,0x00C90000,0x007D0000,0x00FA0000,0x00590000,0x00470000,0x00F00000, 0x00AD0000,0x00D40000,0x00A20000,0x00AF0000,0x009C0000,0x00A40000,0x00720000,0x00C00000, 0x00B70000,0x00FD0000,0x00930000,0x00260000,0x00360000,0x003F0000,0x00F70000,0x00CC0000, 0x00340000,0x00A50000,0x00E50000,0x00F10000,0x00710000,0x00D80000,0x00310000,0x00150000, 0x00040000,0x00C70000,0x00230000,0x00C30000,0x00180000,0x00960000,0x00050000,0x009A0000, 0x00070000,0x00120000,0x00800000,0x00E20000,0x00EB0000,0x00270000,0x00B20000,0x00750000, 0x00090000,0x00830000,0x002C0000,0x001A0000,0x001B0000,0x006E0000,0x005A0000,0x00A00000, 0x00520000,0x003B0000,0x00D60000,0x00B30000,0x00290000,0x00E30000,0x002F0000,0x00840000, 0x00530000,0x00D10000,0000000000,0x00ED0000,0x00200000,0x00FC0000,0x00B10000,0x005B0000, 0x006A0000,0x00CB0000,0x00BE0000,0x00390000,0x004A0000,0x004C0000,0x00580000,0x00CF0000, 0x00D00000,0x00EF0000,0x00AA0000,0x00FB0000,0x00430000,0x004D0000,0x00330000,0x00850000, 0x00450000,0x00F90000,0x00020000,0x007F0000,0x00500000,0x003C0000,0x009F0000,0x00A80000, 0x00510000,0x00A30000,0x00400000,0x008F0000,0x00920000,0x009D0000,0x00380000,0x00F50000, 0x00BC0000,0x00B60000,0x00DA0000,0x00210000,0x00100000,0x00FF0000,0x00F30000,0x00D20000, 0x00CD0000,0x000C0000,0x00130000,0x00EC0000,0x005F0000,0x00970000,0x00440000,0x00170000, 0x00C40000,0x00A70000,0x007E0000,0x003D0000,0x00640000,0x005D0000,0x00190000,0x00730000, 0x00600000,0x00810000,0x004F0000,0x00DC0000,0x00220000,0x002A0000,0x00900000,0x00880000, 0x00460000,0x00EE0000,0x00B80000,0x00140000,0x00DE0000,0x005E0000,0x000B0000,0x00DB0000, 0x00E00000,0x00320000,0x003A0000,0x000A0000,0x00490000,0x00060000,0x00240000,0x005C0000, 0x00C20000,0x00D30000,0x00AC0000,0x00620000,0x00910000,0x00950000,0x00E40000,0x00790000, 0x00E70000,0x00C80000,0x00370000,0x006D0000,0x008D0000,0x00D50000,0x004E0000,0x00A90000, 0x006C0000,0x00560000,0x00F40000,0x00EA0000,0x00650000,0x007A0000,0x00AE0000,0x00080000, 0x00BA0000,0x00780000,0x00250000,0x002E0000,0x001C0000,0x00A60000,0x00B40000,0x00C60000, 0x00E80000,0x00DD0000,0x00740000,0x001F0000,0x004B0000,0x00BD0000,0x008B0000,0x008A0000, 0x00700000,0x003E0000,0x00B50000,0x00660000,0x00480000,0x00030000,0x00F60000,0x000E0000, 0x00610000,0x00350000,0x00570000,0x00B90000,0x00860000,0x00C10000,0x001D0000,0x009E0000, 0x00E10000,0x00F80000,0x00980000,0x00110000,0x00690000,0x00D90000,0x008E0000,0x00940000, 0x009B0000,0x001E0000,0x00870000,0x00E90000,0x00CE0000,0x00550000,0x00280000,0x00DF0000, 0x008C0000,0x00A10000,0x00890000,0x000D0000,0x00BF0000,0x00E60000,0x00420000,0x00680000, 0x00410000,0x00990000,0x002D0000,0x000F0000,0x00B00000,0x00540000,0x00BB0000,0x00160000 }, { 0x63000000,0x7C000000,0x77000000,0x7B000000,0xF2000000,0x6B000000,0x6F000000,0xC5000000, 0x30000000,0x01000000,0x67000000,0x2B000000,0xFE000000,0xD7000000,0xAB000000,0x76000000, 0xCA000000,0x82000000,0xC9000000,0x7D000000,0xFA000000,0x59000000,0x47000000,0xF0000000, 0xAD000000,0xD4000000,0xA2000000,0xAF000000,0x9C000000,0xA4000000,0x72000000,0xC0000000, 0xB7000000,0xFD000000,0x93000000,0x26000000,0x36000000,0x3F000000,0xF7000000,0xCC000000, 0x34000000,0xA5000000,0xE5000000,0xF1000000,0x71000000,0xD8000000,0x31000000,0x15000000, 0x04000000,0xC7000000,0x23000000,0xC3000000,0x18000000,0x96000000,0x05000000,0x9A000000, 0x07000000,0x12000000,0x80000000,0xE2000000,0xEB000000,0x27000000,0xB2000000,0x75000000, 0x09000000,0x83000000,0x2C000000,0x1A000000,0x1B000000,0x6E000000,0x5A000000,0xA0000000, 0x52000000,0x3B000000,0xD6000000,0xB3000000,0x29000000,0xE3000000,0x2F000000,0x84000000, 0x53000000,0xD1000000,0000000000,0xED000000,0x20000000,0xFC000000,0xB1000000,0x5B000000, 0x6A000000,0xCB000000,0xBE000000,0x39000000,0x4A000000,0x4C000000,0x58000000,0xCF000000, 0xD0000000,0xEF000000,0xAA000000,0xFB000000,0x43000000,0x4D000000,0x33000000,0x85000000, 0x45000000,0xF9000000,0x02000000,0x7F000000,0x50000000,0x3C000000,0x9F000000,0xA8000000, 0x51000000,0xA3000000,0x40000000,0x8F000000,0x92000000,0x9D000000,0x38000000,0xF5000000, 0xBC000000,0xB6000000,0xDA000000,0x21000000,0x10000000,0xFF000000,0xF3000000,0xD2000000, 0xCD000000,0x0C000000,0x13000000,0xEC000000,0x5F000000,0x97000000,0x44000000,0x17000000, 0xC4000000,0xA7000000,0x7E000000,0x3D000000,0x64000000,0x5D000000,0x19000000,0x73000000, 0x60000000,0x81000000,0x4F000000,0xDC000000,0x22000000,0x2A000000,0x90000000,0x88000000, 0x46000000,0xEE000000,0xB8000000,0x14000000,0xDE000000,0x5E000000,0x0B000000,0xDB000000, 0xE0000000,0x32000000,0x3A000000,0x0A000000,0x49000000,0x06000000,0x24000000,0x5C000000, 0xC2000000,0xD3000000,0xAC000000,0x62000000,0x91000000,0x95000000,0xE4000000,0x79000000, 0xE7000000,0xC8000000,0x37000000,0x6D000000,0x8D000000,0xD5000000,0x4E000000,0xA9000000, 0x6C000000,0x56000000,0xF4000000,0xEA000000,0x65000000,0x7A000000,0xAE000000,0x08000000, 0xBA000000,0x78000000,0x25000000,0x2E000000,0x1C000000,0xA6000000,0xB4000000,0xC6000000, 0xE8000000,0xDD000000,0x74000000,0x1F000000,0x4B000000,0xBD000000,0x8B000000,0x8A000000, 0x70000000,0x3E000000,0xB5000000,0x66000000,0x48000000,0x03000000,0xF6000000,0x0E000000, 0x61000000,0x35000000,0x57000000,0xB9000000,0x86000000,0xC1000000,0x1D000000,0x9E000000, 0xE1000000,0xF8000000,0x98000000,0x11000000,0x69000000,0xD9000000,0x8E000000,0x94000000, 0x9B000000,0x1E000000,0x87000000,0xE9000000,0xCE000000,0x55000000,0x28000000,0xDF000000, 0x8C000000,0xA1000000,0x89000000,0x0D000000,0xBF000000,0xE6000000,0x42000000,0x68000000, 0x41000000,0x99000000,0x2D000000,0x0F000000,0xB0000000,0x54000000,0xBB000000,0x16000000 } }; /*----------------- The workspace ------------------------------*/ static uint32_t Ekey[44]; /* The expanded key */ /*------ The round Function. 4 table lookups and 4 Exors ------*/ #define f_rnd(x, n) \ ( ft_tab[0][byte0(x[n])] \ ^ ft_tab[1][byte1(x[(n + 1) & 3])] \ ^ ft_tab[2][byte2(x[(n + 2) & 3])] \ ^ ft_tab[3][byte3(x[(n + 3) & 3])] ) #define f_round(bo, bi, k) \ bo[0] = f_rnd(bi, 0) ^ k[0]; \ bo[1] = f_rnd(bi, 1) ^ k[1]; \ bo[2] = f_rnd(bi, 2) ^ k[2]; \ bo[3] = f_rnd(bi, 3) ^ k[3]; \ k += 4 /*--- The S Box lookup used in constructing the Key schedule ---*/ #define ls_box(x) \ ( fl_tab[0][byte0(x)] \ ^ fl_tab[1][byte1(x)] \ ^ fl_tab[2][byte2(x)] \ ^ fl_tab[3][byte3(x)] ) /*------------ The last round function (no MixColumn) ----------*/ #define lf_rnd(x, n) \ ( fl_tab[0][byte0(x[n])] \ ^ fl_tab[1][byte1(x[(n + 1) & 3])] \ ^ fl_tab[2][byte2(x[(n + 2) & 3])] \ ^ fl_tab[3][byte3(x[(n + 3) & 3])] ) /*----------------------------------------------------------- * RijndaelKeySchedule * Initialise the key schedule from a supplied key */ void RijndaelKeySchedule(uint8_t key[16]) { uint32_t t; uint32_t *ek=Ekey, /* pointer to the expanded key */ *rc=rnd_con; /* pointer to the round constant */ Ekey[0] = u32_in(key ); Ekey[1] = u32_in(key + 4); Ekey[2] = u32_in(key + 8); Ekey[3] = u32_in(key + 12); while(ek < Ekey + 40) { t = rot3(ek[3]); ek[4] = ek[0] ^ ls_box(t) ^ *rc++; ek[5] = ek[1] ^ ek[4]; ek[6] = ek[2] ^ ek[5]; ek[7] = ek[3] ^ ek[6]; ek += 4; } } /*----------------------------------------------------------- * RijndaelEncrypt * Encrypt an input block */ void RijndaelEncrypt(uint8_t in[16], uint8_t out[16]) { uint32_t b0[4], b1[4], *kp = Ekey; b0[0] = u32_in(in ) ^ *kp++; b0[1] = u32_in(in + 4) ^ *kp++; b0[2] = u32_in(in + 8) ^ *kp++; b0[3] = u32_in(in + 12) ^ *kp++; f_round(b1, b0, kp); f_round(b0, b1, kp); f_round(b1, b0, kp); f_round(b0, b1, kp); f_round(b1, b0, kp); f_round(b0, b1, kp); f_round(b1, b0, kp); f_round(b0, b1, kp); f_round(b1, b0, kp); u32_out(out, lf_rnd(b1, 0) ^ kp[0]); u32_out(out + 4, lf_rnd(b1, 1) ^ kp[1]); u32_out(out + 8, lf_rnd(b1, 2) ^ kp[2]); u32_out(out + 12, lf_rnd(b1, 3) ^ kp[3]); } sipp-3.6.0/src/logger.cpp0000644000175000017500000010737313475544015014646 0ustar walterwalter/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Richard GAYRAUD - 04 Nov 2003 * Marc LAMBERTON * Olivier JACQUES * Herve PELLAN * David MANSUTTI * Francois-Xavier Kowalski * Gerard Lyonnaz * Francois Draperi (for dynamic_id) * From Hewlett Packard Company. * F. Tarek Rogers * Peter Higginson * Vincent Luba * Shriram Natarajan * Guillaume Teissier from FTR&D * Clement Chen * Wolfgang Beck * Charles P Wright from IBM Research * Martin Van Leeuwen * Andy Aicken * Michael Hirschbichler */ #include #include #include #include #include #include #include "logger.hpp" #define SIPP_ENDL "\r\n" #ifdef RTP_STREAM double last_rtpstream_rate_out = 0; double last_rtpstream_rate_in = 0; #endif void print_stats_in_file(FILE * f); bool do_hide = true; bool show_index = false; void print_header_line(FILE *f) { switch(currentScreenToDisplay) { case DISPLAY_STAT_SCREEN : fprintf(f,"----------------------------- Statistics Screen ------- [1-9]: Change Screen --" SIPP_ENDL); break; case DISPLAY_REPARTITION_SCREEN : fprintf(f,"---------------------------- Repartition Screen ------- [1-9]: Change Screen --" SIPP_ENDL); break; case DISPLAY_VARIABLE_SCREEN : fprintf(f,"----------------------------- Variables Screen -------- [1-9]: Change Screen --" SIPP_ENDL); break; case DISPLAY_TDM_MAP_SCREEN : fprintf(f,"------------------------------ TDM map Screen --------- [1-9]: Change Screen --" SIPP_ENDL); break; case DISPLAY_SECONDARY_REPARTITION_SCREEN : fprintf(f,"--------------------------- Repartition %d Screen ------ [1-9]: Change Screen --" SIPP_ENDL, currentRepartitionToDisplay); break; case DISPLAY_SCENARIO_SCREEN : default: fprintf(f,"------------------------------ Scenario Screen -------- [1-9]: Change Screen --" SIPP_ENDL); break; } } void print_bottom_line(FILE *f, int last) { if(last) { fprintf(f,"------------------------------ Test Terminated --------------------------------" SIPP_ENDL); } else if(quitting) { fprintf(f,"------- Waiting for active calls to end. Press [q] again to force exit. -------" SIPP_ENDL ); } else if(paused) { fprintf(f,"----------------- Traffic Paused - Press [p] again to resume ------------------" SIPP_ENDL ); } else if(cpu_max) { fprintf(f,"-------------------------------- CPU CONGESTED ---------------------------------" SIPP_ENDL); } else if(outbound_congestion) { fprintf(f,"------------------------------ OUTBOUND CONGESTION -----------------------------" SIPP_ENDL); } else { if (creationMode == MODE_CLIENT) { switch(thirdPartyMode) { case MODE_MASTER : fprintf(f,"-----------------------3PCC extended mode - Master side -------------------------" SIPP_ENDL); break; case MODE_3PCC_CONTROLLER_A : fprintf(f,"----------------------- 3PCC Mode - Controller A side -------------------------" SIPP_ENDL); break; case MODE_3PCC_NONE: fprintf(f,"------ [+|-|*|/]: Adjust rate ---- [q]: Soft exit ---- [p]: Pause traffic -----" SIPP_ENDL); break; default: ERROR("Internal error: creationMode=%d, thirdPartyMode=%d", creationMode, thirdPartyMode); } } else { assert(creationMode == MODE_SERVER); switch(thirdPartyMode) { case MODE_3PCC_A_PASSIVE : fprintf(f,"------------------ 3PCC Mode - Controller A side (passive) --------------------" SIPP_ENDL); break; case MODE_3PCC_CONTROLLER_B : fprintf(f,"----------------------- 3PCC Mode - Controller B side -------------------------" SIPP_ENDL); break; case MODE_MASTER_PASSIVE : fprintf(f,"------------------ 3PCC extended mode - Master side (passive) --------------------" SIPP_ENDL); break; case MODE_SLAVE : fprintf(f,"----------------------- 3PCC extended mode - Slave side -------------------------" SIPP_ENDL); break; case MODE_3PCC_NONE: fprintf(f,"------------------------------ Sipp Server Mode -------------------------------" SIPP_ENDL); break; default: ERROR("Internal error: creationMode=%d, thirdPartyMode=%d", creationMode, thirdPartyMode); } } } fprintf(f,SIPP_ENDL); fflush(stdout); } void print_tdm_map() { int i = 0; int in_use = 0; int interval = (tdm_map_a+1) * (tdm_map_b+1) * (tdm_map_c+1); printf("TDM Circuits in use:" SIPP_ENDL); while (imessages.size() + 8 - int(interval/(tdm_map_c+1))); i++) { printf(SIPP_ENDL); } } void print_variable_list() { CActions * actions; CAction * action; int printed = 0; bool found; printf("Action defined Per Message :" SIPP_ENDL); printed++; found = false; for(unsigned int i=0; imessages.size(); i++) { message *curmsg = display_scenario->messages[i]; actions = curmsg->M_actions; if(actions != NULL) { switch(curmsg->M_type) { case MSG_TYPE_RECV: printf("=> Message[%u] (Receive Message) - " "[%d] action(s) defined :" SIPP_ENDL, i, actions->getActionSize()); printed++; break; case MSG_TYPE_RECVCMD: printf("=> Message[%u] (Receive Command Message) - " "[%d] action(s) defined :" SIPP_ENDL, i, actions->getActionSize()); printed++; break; default: printf("=> Message[%u] - [%d] action(s) defined :" SIPP_ENDL, i, actions->getActionSize()); printed++; break; } for(int j=0; jgetActionSize(); j++) { action = actions->getAction(j); if(action != NULL) { printf(" --> action[%d] = ", j); action->afficheInfo(); printf(SIPP_ENDL); printed++; found = true; } } } } if(!found) { printed++; printf("=> No action found on any messages" SIPP_ENDL); } printf(SIPP_ENDL); for(unsigned int i=0; i<(display_scenario->messages.size() + 5 - printed); i++) { printf(SIPP_ENDL); } } void print_statistics(int last) { static int first = 1; extern int command_mode; extern char *command_buffer; if (backgroundMode == false && display_scenario) { if (use_curses && !last) { screen_clear(); } if (use_curses && first) { first = 0; printf("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"); } if (command_mode) { printf(SIPP_ENDL); } print_header_line(stdout); switch(currentScreenToDisplay) { case DISPLAY_STAT_SCREEN : display_scenario->stats->displayStat(stdout); break; case DISPLAY_REPARTITION_SCREEN : display_scenario->stats->displayRepartition(stdout); break; case DISPLAY_VARIABLE_SCREEN : print_variable_list(); break; case DISPLAY_TDM_MAP_SCREEN : print_tdm_map(); break; case DISPLAY_SECONDARY_REPARTITION_SCREEN : display_scenario->stats->displayRtdRepartition(stdout, currentRepartitionToDisplay); break; case DISPLAY_SCENARIO_SCREEN : default: print_stats_in_file(stdout); break; } print_bottom_line(stdout, last); if (!last && screen_last_error[0]) { char *errstart = screen_last_error; int colonsleft = 3;/* We want to skip the time. */ while (*errstart && colonsleft) { if (*errstart == ':') { colonsleft--; } errstart++; } while (isspace(*errstart)) { errstart++; } if (strlen(errstart) > 60) { printf("Last Error: %.60s..." SIPP_ENDL, errstart); } else { printf("Last Error: %s" SIPP_ENDL, errstart); } sipp_usleep(100); fflush(stdout); } if (command_mode) { printf("Command: %s", command_buffer ? command_buffer : ""); fflush(stdout); } if(last) { fprintf(stdout,"\n"); } } } void log_off(struct logfile_info *lfi) { if (lfi->fptr) { fflush(lfi->fptr); fclose(lfi->fptr); lfi->fptr = NULL; lfi->overwrite = false; } } void print_stats_in_file(FILE * f) { static char temp_str[256]; int divisor; extern int pollnfds; #define NOTLAST 0 #define SIPP_ENDL "\r\n" /* We are not initialized yet. */ if (!display_scenario) { return; } /* Optional timestamp line for files only */ if(f != stdout) { time_t tim; time(&tim); fprintf(f, " Timestamp: %s" SIPP_ENDL, ctime(&tim)); } /* Header line with global parameters */ if (users >= 0) { sprintf(temp_str, "%d (%d ms)", users, duration); } else { sprintf(temp_str, "%3.1f(%d ms)/%5.3fs", rate, duration, (double)rate_period_ms / 1000.0); } unsigned long long total_calls = display_scenario->stats->GetStat(CStat::CPT_C_IncomingCallCreated) + display_scenario->stats->GetStat(CStat::CPT_C_OutgoingCallCreated); if( creationMode == MODE_SERVER) { fprintf (f, " Port Total-time Total-calls Transport" SIPP_ENDL " %-5d %6lu.%02lu s %8llu %s" SIPP_ENDL SIPP_ENDL, local_port, clock_tick / 1000, (clock_tick % 1000) / 10, total_calls, TRANSPORT_TO_STRING(transport)); } else { assert(creationMode == MODE_CLIENT); if (users >= 0) { fprintf(f, " Users (length)"); } else { fprintf(f, " Call-rate(length)"); } fprintf(f, " Port Total-time Total-calls Remote-host" SIPP_ENDL "%19s %-5d %6lu.%02lu s %8llu %s:%d(%s)" SIPP_ENDL SIPP_ENDL, temp_str, local_port, clock_tick / 1000, (clock_tick % 1000) / 10, total_calls, remote_ip, remote_port, TRANSPORT_TO_STRING(transport)); } /* 1st line */ if(total_calls < stop_after) { sprintf(temp_str, "%llu new calls during %lu.%03lu s period ", display_scenario->stats->GetStat(CStat::CPT_PD_IncomingCallCreated) + display_scenario->stats->GetStat(CStat::CPT_PD_OutgoingCallCreated), (clock_tick-last_report_time) / 1000, ((clock_tick-last_report_time) % 1000)); } else { sprintf(temp_str, "Call limit reached (-m %lu), %lu.%03lu s period ", stop_after, (clock_tick-last_report_time) / 1000, ((clock_tick-last_report_time) % 1000)); } divisor = scheduling_loops; if(!divisor) { divisor = 1; } fprintf(f," %-38s %lu ms scheduler resolution" SIPP_ENDL, temp_str, (clock_tick-last_report_time) / divisor); /* 2nd line */ if( creationMode == MODE_SERVER) { sprintf(temp_str, "%llu calls", display_scenario->stats->GetStat(CStat::CPT_C_CurrentCall)); } else { sprintf(temp_str, "%llu calls (limit %u)", display_scenario->stats->GetStat(CStat::CPT_C_CurrentCall), open_calls_allowed); } fprintf(f," %-38s Peak was %llu calls, after %llu s" SIPP_ENDL, temp_str, display_scenario->stats->GetStat(CStat::CPT_C_CurrentCallPeak), display_scenario->stats->GetStat(CStat::CPT_C_CurrentCallPeakTime)); fprintf(f," %d Running, %d Paused, %d Woken up" SIPP_ENDL, last_running_calls, last_paused_calls, last_woken_calls); last_woken_calls = 0; /* 3rd line dead call msgs, and optional out-of-call msg */ sprintf(temp_str,"%llu dead call msg (discarded)", display_scenario->stats->GetStat(CStat::CPT_G_C_DeadCallMsgs)); fprintf(f," %-37s", temp_str); if( creationMode == MODE_CLIENT) { sprintf(temp_str,"%llu out-of-call msg (discarded)", display_scenario->stats->GetStat(CStat::CPT_G_C_OutOfCallMsgs)); fprintf(f," %-37s", temp_str); } fprintf(f,SIPP_ENDL); if(compression) { fprintf(f," Comp resync: %d sent, %d recv" , resynch_send, resynch_recv); fprintf(f,SIPP_ENDL); } /* 4th line , sockets and optional errors */ sprintf(temp_str,"%d open sockets", pollnfds); fprintf(f," %-38s", temp_str); if(nb_net_recv_errors || nb_net_send_errors || nb_net_cong) { fprintf(f," %lu/%lu/%lu %s errors (send/recv/cong)" SIPP_ENDL, nb_net_send_errors, nb_net_recv_errors, nb_net_cong, TRANSPORT_TO_STRING(transport)); } else { fprintf(f,SIPP_ENDL); } #ifdef PCAPPLAY /* if has media abilities */ if (hasMedia != 0) { sprintf(temp_str, "%lu Total RTP pckts sent ", rtp_pckts_pcap); if (clock_tick-last_report_time) { fprintf(f," %-38s %lu.%03lu last period RTP rate (kB/s)" SIPP_ENDL, temp_str, (rtp_bytes_pcap)/(clock_tick-last_report_time), (rtp_bytes_pcap)%(clock_tick-last_report_time)); } rtp_bytes_pcap = 0; rtp2_bytes_pcap = 0; } #endif #ifdef RTP_STREAM /* if we have rtp stream thread running */ if (rtpstream_numthreads) { unsigned long tempbytes; unsigned long last_tick = clock_tick; /* Saved clock_tick to last_tick and use that in calcs since clock tick */ /* can change during calculations. */ if (last_tick - last_report_time) { tempbytes = rtpstream_bytes_out; /* Calculate integer and fraction parts of rtp bandwidth; this value * will be saved and reused in the case where last_tick==last_report_time */ last_rtpstream_rate_out = ((double)tempbytes) / (last_tick - last_report_time); /* Potential race condition betwen multiple threads updating the * rtpstream_bytes value. We subtract the saved tempbytes value * rather than setting it to zero to minimise the chances of missing * an update to rtpstream_bytes [update between printing stats and * zeroing the counter]. Ideally we would atomically subtract * tempbytes from rtpstream_bytes. */ rtpstream_bytes_out -= tempbytes; tempbytes = rtpstream_bytes_in; last_rtpstream_rate_in = ((double)tempbytes) / (last_tick - last_report_time); rtpstream_bytes_in -= tempbytes; } sprintf(temp_str, "%lu Total RTP pckts sent", rtpstream_pckts); fprintf(f," %-38s %.3f kB/s RTP OUT" SIPP_ENDL, temp_str, last_rtpstream_rate_out); sprintf(temp_str, "%lu RTP sending threads active", rtpstream_numthreads); fprintf(f," %-38s %.3f kB/s RTP IN" SIPP_ENDL, temp_str, last_rtpstream_rate_in); } #endif /* 5th line, RTP echo statistics */ if (rtp_echo_enabled && media_socket_audio > 0) { sprintf(temp_str, "%lu Total echo RTP pckts 1st stream", rtp_pckts); // AComment: Fix for random coredump when using RTP echo if (clock_tick-last_report_time) { fprintf(f," %-38s %lu.%03lu last period RTP rate (kB/s)" SIPP_ENDL, temp_str, (rtp_bytes)/(clock_tick-last_report_time), (rtp_bytes)%(clock_tick-last_report_time)); } /* second stream statitics: */ sprintf(temp_str, "%lu Total echo RTP pckts 2nd stream", rtp2_pckts); // AComment: Fix for random coredump when using RTP echo if (clock_tick-last_report_time) { fprintf(f," %-38s %lu.%03lu last period RTP rate (kB/s)" SIPP_ENDL, temp_str, (rtp2_bytes)/(clock_tick-last_report_time), (rtp2_bytes)%(clock_tick-last_report_time)); } rtp_bytes = 0; rtp2_bytes = 0; } /* Scenario counters */ fprintf(f,SIPP_ENDL); if(!lose_packets) { fprintf(f," " "Messages Retrans Timeout Unexpected-Msg" SIPP_ENDL); } else { fprintf(f," " "Messages Retrans Timeout Unexp. Lost" SIPP_ENDL); } for(unsigned long index = 0; index < display_scenario->messages.size(); index ++) { message *curmsg = display_scenario->messages[index]; if(do_hide && curmsg->hide) { continue; } if (show_index) { fprintf(f, "%-2lu:", index); } if(SendingMessage *src = curmsg -> send_scheme) { if (src->isResponse()) { sprintf(temp_str, "%d", src->getCode()); } else { sprintf(temp_str, "%s", src->getMethod()); } if(creationMode == MODE_SERVER) { fprintf(f," <---------- %-10s ", temp_str); } else { fprintf(f," %10s ----------> ", temp_str); } if (curmsg -> start_rtd) { fprintf(f, " B-RTD%d ", curmsg -> start_rtd); } else if (curmsg -> stop_rtd) { fprintf(f, " E-RTD%d ", curmsg -> stop_rtd); } else { fprintf(f, " "); } if(curmsg -> retrans_delay) { fprintf(f,"%-9lu %-9lu %-9lu %-9s" , curmsg -> nb_sent, curmsg -> nb_sent_retrans, curmsg -> nb_timeout, "" /* Unexpected */); } else { fprintf(f,"%-9lu %-9lu %-9s %-9s" , curmsg -> nb_sent, curmsg -> nb_sent_retrans, "", /* Timeout. */ "" /* Unexpected. */); } } else if(curmsg -> recv_response) { if(creationMode == MODE_SERVER) { fprintf(f," ----------> %-10d ", curmsg -> recv_response); } else { fprintf(f," %10d <---------- ", curmsg -> recv_response); } if (curmsg -> start_rtd) { fprintf(f, " B-RTD%d ", curmsg -> start_rtd); } else if (curmsg -> stop_rtd) { fprintf(f, " E-RTD%d ", curmsg -> stop_rtd); } else { fprintf(f, " "); } fprintf(f,"%-9ld %-9ld %-9ld %-9ld" , curmsg->nb_recv, curmsg->nb_recv_retrans, curmsg->nb_timeout, curmsg->nb_unexp); } else if (curmsg -> pause_distribution || (curmsg -> pause_variable != -1)) { char *desc = curmsg->pause_desc; if (!desc) { desc = (char *)malloc(24); if (curmsg->pause_distribution) { desc[0] = '\0'; curmsg->pause_distribution->timeDescr(desc, 23); } else { snprintf(desc, 23, "$%s", display_scenario->allocVars->getName(curmsg->pause_variable)); } desc[23] = '\0'; curmsg->pause_desc = desc; } int len = strlen(desc) < 9 ? 9 : strlen(desc); if(creationMode == MODE_SERVER) { fprintf(f," [%9s] Pause%*s", desc, 23 - len > 0 ? 23 - len : 0, ""); } else { fprintf(f," Pause [%9s]%*s", desc, 18 - len > 0 ? 18 - len : 0, ""); } fprintf(f,"%-9d", curmsg->sessions); fprintf(f," %-9lu" , curmsg->nb_unexp); } else if(curmsg -> recv_request) { if(creationMode == MODE_SERVER) { fprintf(f," ----------> %-10s ", curmsg -> recv_request); } else { fprintf(f," %10s <---------- ", curmsg -> recv_request); } if (curmsg -> start_rtd) { fprintf(f, " B-RTD%d ", curmsg -> start_rtd); } else if (curmsg -> stop_rtd) { fprintf(f, " E-RTD%d ", curmsg -> stop_rtd); } else { fprintf(f, " "); } fprintf(f,"%-9ld %-9ld %-9ld %-9ld" , curmsg -> nb_recv, curmsg -> nb_recv_retrans, curmsg -> nb_timeout, curmsg -> nb_unexp); } else if(curmsg -> M_type == MSG_TYPE_NOP) { if (curmsg->display_str) { fprintf(f," %s", curmsg->display_str); } else { fprintf(f," [ NOP ] "); } } else if(curmsg -> M_type == MSG_TYPE_RECVCMD) { fprintf(f," [ Received Command ] "); if(curmsg->retrans_delay) { fprintf(f,"%-9ld %-9s %-9ld %-9s" , curmsg->M_nbCmdRecv, "", curmsg->nb_timeout, ""); } else { fprintf(f,"%-9ld %-9s %-9s" , curmsg -> M_nbCmdRecv, "", ""); } } else if(curmsg -> M_type == MSG_TYPE_SENDCMD) { fprintf(f," [ Sent Command ] "); fprintf(f,"%-9lu %-9s %-9s" , curmsg -> M_nbCmdSent, "", ""); } else { ERROR("Scenario command not implemented in display"); } if(lose_packets && (curmsg -> nb_lost)) { fprintf(f," %-9lu" SIPP_ENDL, curmsg -> nb_lost); } else { fprintf(f,SIPP_ENDL); } if(curmsg -> crlf) { fprintf(f,SIPP_ENDL); } } } void print_count_file(FILE *f, int header) { char temp_str[256]; if (!main_scenario || (!header && !main_scenario->stats)) { return; } if (header) { fprintf(f, "CurrentTime%sElapsedTime%s", stat_delimiter, stat_delimiter); } else { struct timeval currentTime, startTime; GET_TIME(¤tTime); main_scenario->stats->getStartTime(&startTime); unsigned long globalElapsedTime = CStat::computeDiffTimeInMs (¤tTime, &startTime); fprintf(f, "%s%s", CStat::formatTime(¤tTime), stat_delimiter); fprintf(f, "%s%s", CStat::msToHHMMSSus(globalElapsedTime), stat_delimiter); } for(unsigned int index = 0; index < main_scenario->messages.size(); index ++) { message *curmsg = main_scenario->messages[index]; if(curmsg->hide) { continue; } if(SendingMessage *src = curmsg -> send_scheme) { if(header) { if (src->isResponse()) { sprintf(temp_str, "%u_%d_", index, src->getCode()); } else { sprintf(temp_str, "%u_%s_", index, src->getMethod()); } fprintf(f, "%sSent%s", temp_str, stat_delimiter); fprintf(f, "%sRetrans%s", temp_str, stat_delimiter); if(curmsg -> retrans_delay) { fprintf(f, "%sTimeout%s", temp_str, stat_delimiter); } if(lose_packets) { fprintf(f, "%sLost%s", temp_str, stat_delimiter); } } else { fprintf(f, "%lu%s", curmsg->nb_sent, stat_delimiter); fprintf(f, "%lu%s", curmsg->nb_sent_retrans, stat_delimiter); if(curmsg -> retrans_delay) { fprintf(f, "%lu%s", curmsg->nb_timeout, stat_delimiter); } if(lose_packets) { fprintf(f, "%lu%s", curmsg->nb_lost, stat_delimiter); } } } else if(curmsg -> recv_response) { if(header) { sprintf(temp_str, "%u_%d_", index, curmsg->recv_response); fprintf(f, "%sRecv%s", temp_str, stat_delimiter); fprintf(f, "%sRetrans%s", temp_str, stat_delimiter); fprintf(f, "%sTimeout%s", temp_str, stat_delimiter); fprintf(f, "%sUnexp%s", temp_str, stat_delimiter); if(lose_packets) { fprintf(f, "%sLost%s", temp_str, stat_delimiter); } } else { fprintf(f, "%lu%s", curmsg->nb_recv, stat_delimiter); fprintf(f, "%lu%s", curmsg->nb_recv_retrans, stat_delimiter); fprintf(f, "%lu%s", curmsg->nb_timeout, stat_delimiter); fprintf(f, "%lu%s", curmsg->nb_unexp, stat_delimiter); if(lose_packets) { fprintf(f, "%lu%s", curmsg->nb_lost, stat_delimiter); } } } else if(curmsg -> recv_request) { if(header) { sprintf(temp_str, "%u_%s_", index, curmsg->recv_request); fprintf(f, "%sRecv%s", temp_str, stat_delimiter); fprintf(f, "%sRetrans%s", temp_str, stat_delimiter); fprintf(f, "%sTimeout%s", temp_str, stat_delimiter); fprintf(f, "%sUnexp%s", temp_str, stat_delimiter); if(lose_packets) { fprintf(f, "%sLost%s", temp_str, stat_delimiter); } } else { fprintf(f, "%lu%s", curmsg->nb_recv, stat_delimiter); fprintf(f, "%lu%s", curmsg->nb_recv_retrans, stat_delimiter); fprintf(f, "%lu%s", curmsg->nb_timeout, stat_delimiter); fprintf(f, "%lu%s", curmsg->nb_unexp, stat_delimiter); if(lose_packets) { fprintf(f, "%lu%s", curmsg->nb_lost, stat_delimiter); } } } else if (curmsg -> pause_distribution || curmsg -> pause_variable) { if(header) { sprintf(temp_str, "%u_Pause_", index); fprintf(f, "%sSessions%s", temp_str, stat_delimiter); fprintf(f, "%sUnexp%s", temp_str, stat_delimiter); } else { fprintf(f, "%d%s", curmsg->sessions, stat_delimiter); fprintf(f, "%lu%s", curmsg->nb_unexp, stat_delimiter); } } else if(curmsg -> M_type == MSG_TYPE_NOP) { /* No output. */ } else if(curmsg -> M_type == MSG_TYPE_RECVCMD) { if(header) { sprintf(temp_str, "%u_RecvCmd", index); fprintf(f, "%s%s", temp_str, stat_delimiter); fprintf(f, "%s_Timeout%s", temp_str, stat_delimiter); } else { fprintf(f, "%lu%s", curmsg->M_nbCmdRecv, stat_delimiter); fprintf(f, "%lu%s", curmsg->nb_timeout, stat_delimiter); } } else if(curmsg -> M_type == MSG_TYPE_SENDCMD) { if(header) { sprintf(temp_str, "%u_SendCmd", index); fprintf(f, "%s%s", temp_str, stat_delimiter); } else { fprintf(f, "%lu%s", curmsg->M_nbCmdSent, stat_delimiter); } } else { ERROR("Unknown count file message type:"); } } fprintf(f, "\n"); fflush(f); } void print_error_codes_file(FILE *f) { if (!main_scenario || !main_scenario->stats) { return; } // Print time and elapsed time to file struct timeval currentTime, startTime; GET_TIME(¤tTime); main_scenario->stats->getStartTime(&startTime); unsigned long globalElapsedTime = CStat::computeDiffTimeInMs (¤tTime, &startTime); fprintf(f, "%s%s", CStat::formatTime(¤tTime), stat_delimiter); fprintf(f, "%s%s", CStat::msToHHMMSSus(globalElapsedTime), stat_delimiter); // Print comma-separated list of all error codes seen since the last time this function was called for (; main_scenario->stats->error_codes.size() != 0;) { fprintf(f, "%d,", main_scenario->stats->error_codes[main_scenario->stats->error_codes.size() - 1]); main_scenario->stats->error_codes.pop_back(); } fprintf(f, "\n"); fflush(f); } /* Function to dump all available screens in a file */ void print_screens(void) { int oldScreen = currentScreenToDisplay; int oldRepartition = currentRepartitionToDisplay; currentScreenToDisplay = DISPLAY_SCENARIO_SCREEN; print_header_line( screen_lfi.fptr); print_stats_in_file( screen_lfi.fptr); print_bottom_line( screen_lfi.fptr, NOTLAST); currentScreenToDisplay = DISPLAY_STAT_SCREEN; print_header_line( screen_lfi.fptr); display_scenario->stats->displayStat(screen_lfi.fptr); print_bottom_line( screen_lfi.fptr, NOTLAST); currentScreenToDisplay = DISPLAY_REPARTITION_SCREEN; print_header_line( screen_lfi.fptr); display_scenario->stats->displayRepartition(screen_lfi.fptr); print_bottom_line( screen_lfi.fptr, NOTLAST); currentScreenToDisplay = DISPLAY_SECONDARY_REPARTITION_SCREEN; for (currentRepartitionToDisplay = 2; currentRepartitionToDisplay <= display_scenario->stats->nRtds(); currentRepartitionToDisplay++) { print_header_line( screen_lfi.fptr); display_scenario->stats->displayRtdRepartition(screen_lfi.fptr, currentRepartitionToDisplay); print_bottom_line( screen_lfi.fptr, NOTLAST); } currentScreenToDisplay = oldScreen; currentRepartitionToDisplay = oldRepartition; } static void rotatef(struct logfile_info* lfi) { char L_rotate_file_name [MAX_PATH]; if (!lfi->fixedname) { sprintf (lfi->file_name, "%s_%ld_%s.log", scenario_file, (long) getpid(), lfi->name); } if (ringbuffer_files > 0) { if (!lfi->ftimes) { lfi->ftimes = (struct logfile_id *)calloc(ringbuffer_files, sizeof(struct logfile_id)); } /* We need to rotate away an existing file. */ if (lfi->nfiles == ringbuffer_files) { if ((lfi->ftimes)[0].n) { sprintf(L_rotate_file_name, "%s_%ld_%s_%lu.%d.log", scenario_file, (long) getpid(), lfi->name, (unsigned long)(lfi->ftimes)[0].start, (lfi->ftimes)[0].n); } else { sprintf(L_rotate_file_name, "%s_%ld_%s_%lu.log", scenario_file, (long) getpid(), lfi->name, (unsigned long)(lfi->ftimes)[0].start); } unlink(L_rotate_file_name); lfi->nfiles--; memmove(lfi->ftimes, &((lfi->ftimes)[1]), sizeof(struct logfile_id) * (lfi->nfiles)); } if (lfi->starttime) { (lfi->ftimes)[lfi->nfiles].start = lfi->starttime; (lfi->ftimes)[lfi->nfiles].n = 0; /* If we have the same time, then we need to append an identifier. */ if (lfi->nfiles && ((lfi->ftimes)[lfi->nfiles].start == (lfi->ftimes)[lfi->nfiles - 1].start)) { (lfi->ftimes)[lfi->nfiles].n = (lfi->ftimes)[lfi->nfiles - 1].n + 1; } if ((lfi->ftimes)[lfi->nfiles].n) { sprintf(L_rotate_file_name, "%s_%ld_%s_%lu.%d.log", scenario_file, (long) getpid(), lfi->name, (unsigned long)(lfi->ftimes)[lfi->nfiles].start, (lfi->ftimes)[lfi->nfiles].n); } else { sprintf(L_rotate_file_name, "%s_%ld_%s_%lu.log", scenario_file, (long) getpid(), lfi->name, (unsigned long)(lfi->ftimes)[lfi->nfiles].start); } lfi->nfiles++; fflush(lfi->fptr); fclose(lfi->fptr); lfi->fptr = NULL; rename(lfi->file_name, L_rotate_file_name); } } time(&lfi->starttime); if (lfi->overwrite) { lfi->fptr = fopen(lfi->file_name, "w"); } else { lfi->fptr = fopen(lfi->file_name, "a"); lfi->overwrite = true; } if(lfi->check && !lfi->fptr) { /* We can not use the error functions from this function, as we may be rotating the error log itself! */ ERROR("Unable to create '%s'", lfi->file_name); } } void rotate_screenf() { rotatef(&screen_lfi); } void rotate_calldebugf() { rotatef(&calldebug_lfi); } void rotate_messagef() { rotatef(&message_lfi); } void rotate_shortmessagef() { rotatef(&shortmessage_lfi); } void rotate_logfile() { rotatef(&log_lfi); } void rotate_errorf() { rotatef(&error_lfi); strcpy(screen_logfile, error_lfi.file_name); } static int _trace(struct logfile_info* lfi, const char* fmt, va_list ap) { int ret = 0; if(lfi->fptr) { ret = vfprintf(lfi->fptr, fmt, ap); fflush(lfi->fptr); lfi->count += ret; if (max_log_size && lfi->count > max_log_size) { fclose(lfi->fptr); lfi->fptr = NULL; } if (ringbuffer_size && lfi->count > ringbuffer_size) { rotatef(lfi); lfi->count = 0; } } return ret; } int TRACE_MSG(const char *fmt, ...) { int ret; va_list ap; va_start(ap, fmt); ret = _trace(&message_lfi, fmt, ap); va_end(ap); return ret; } int TRACE_SHORTMSG(const char *fmt, ...) { int ret; va_list ap; va_start(ap, fmt); ret = _trace(&shortmessage_lfi, fmt, ap); va_end(ap); return ret; } int LOG_MSG(const char *fmt, ...) { int ret; va_list ap; va_start(ap, fmt); ret = _trace(&log_lfi, fmt, ap); va_end(ap); return ret; } int TRACE_CALLDEBUG(const char *fmt, ...) { int ret; va_list ap; va_start(ap, fmt); ret = _trace(&calldebug_lfi, fmt, ap); va_end(ap); return ret; } sipp-3.6.0/src/sipp_unittest.cpp0000644000175000017500000000261313475544015016270 0ustar walterwalter/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Rob Day - 11 May 2014 */ #define GLOBALS_FULL_DEFINITION #include "sipp.hpp" #include "gtest/gtest.h" #include "gmock/gmock.h" #include namespace testing { std::string FLAGS_gmock_verbose = "verbose"; } int main(int argc, char* argv[]) { globalVariables = new AllocVariableTable(NULL); userVariables = new AllocVariableTable(globalVariables); main_scenario = new scenario(0, 0); ::testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); } /* Quickfix to fix unittests that depend on sipp_exit availability, * now that sipp_exit has been moved into sipp.cpp which is not * included. */ void sipp_exit(int rc) { exit(rc); } sipp-3.6.0/src/reporttask.cpp0000644000175000017500000000553413475544015015561 0ustar walterwalter/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Richard GAYRAUD - 04 Nov 2003 * Marc LAMBERTON * Olivier JACQUES * Herve PELLAN * David MANSUTTI * Francois-Xavier Kowalski * Gerard Lyonnaz * From Hewlett Packard Company. * F. Tarek Rogers * Peter Higginson * Vincent Luba * Shriram Natarajan * Guillaume Teissier from FTR&D * Clement Chen * Wolfgang Beck * Charles P Wright from IBM Research */ #include "sipp.hpp" class stattask *stattask::instance = NULL; class screentask *screentask::instance = NULL; void stattask::initialize() { assert(instance == NULL); if (dumpInFile || useCountf || useErrorCodesf) { instance = new stattask(); } } void screentask::initialize() { assert(instance == NULL); if (report_freq) { instance = new screentask(); } } void stattask::dump() { WARNING("Statistics reporting task."); } void screentask::dump() { WARNING("Screen update task."); } void screentask::report(bool last) { print_statistics(last); display_scenario->stats->computeStat(CStat::E_RESET_PD_COUNTERS); last_report_time = getmilliseconds(); scheduling_loops = 0; } bool screentask::run() { if (quitting > 11) { delete this; return false; } if (getmilliseconds() - last_report_time >= report_freq) { report(false); } setPaused(); return true; } unsigned int screentask::wake() { return last_report_time + report_freq; } void stattask::report() { if(dumpInFile) { main_scenario->stats->dumpData(); } if (useCountf) { print_count_file(countf, 0); } if (useErrorCodesf) { print_error_codes_file(codesf); } main_scenario->stats->computeStat(CStat::E_RESET_PL_COUNTERS); last_dump_time = clock_tick; } bool stattask::run() { /* Statistics Logs. */ if((getmilliseconds() - last_dump_time) >= report_freq_dumpLog) { report(); } setPaused(); return true; } unsigned int stattask::wake() { return last_dump_time + report_freq_dumpLog; } sipp-3.6.0/src/screen.cpp0000644000175000017500000001230013475544015014627 0ustar walterwalter/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Richard GAYRAUD - 04 Nov 2003 * From Hewlett Packard Company. */ /**** * Screen.cpp : Simple curses & logfile encapsulation */ #include #include #include #include #include #include #include #include #include #include #include "screen.hpp" #include "sipp.hpp" /* Export these so others needn't include curses.h */ int key_backspace = KEY_BACKSPACE; int key_dc = KEY_DC; unsigned long screen_errors; int screen_inited = 0; char screen_exename[255]; /* ERR is actually -1, but this prevents us from needing to use curses.h in * sipp.cpp. */ int screen_readkey() { int c = getch(); if (c == ERR) { return -1; } return c; } void screen_exit() { if (!screen_inited) { return; } endwin(); } void screen_show_errors() { if (!screen_errors) { return; } fprintf(stderr, "%s\n", screen_last_error); if (screen_errors > 1) { if (screen_logfile[0] != '\0') { fprintf(stderr, "%s: There were more errors, see '%s' file\n", screen_exename, screen_logfile); } else { fprintf(stderr, "%s: There were more errors, enable -trace_err to log them.\n", screen_exename); } } fflush(stderr); } void screen_clear() { printf("\033[2J"); } void screen_set_exename(const char* exe_name) { strncpy(screen_exename, exe_name, sizeof(screen_exename) - 1); } void screen_init() { if (backgroundMode) { return; } screen_inited = 1; initscr(); noecho(); screen_clear(); } static void _screen_error(int fatal, bool use_errno, int error, const char *fmt, va_list ap) { static unsigned long long count = 0; char *c = screen_last_error; struct timeval currentTime; CStat::globalStat(fatal ? CStat::E_FATAL_ERRORS : CStat::E_WARNING); GET_TIME (¤tTime); c+= sprintf(c, "%s: ", CStat::formatTime(¤tTime)); c+= vsprintf(c, fmt, ap); if (use_errno) { c += sprintf(c, ", errno = %d (%s)", error, strerror(error)); } screen_errors++; if (!error_lfi.fptr && print_all_responses) { rotate_errorf(); if (error_lfi.fptr) { fprintf(error_lfi.fptr, "%s: The following events occurred:\n", screen_exename); fflush(error_lfi.fptr); } else { if (screen_inited) { sprintf(c, "%s: Unable to create '%s': %s.\n", screen_exename, screen_logfile, strerror(errno)); } sipp_exit(EXIT_FATAL_ERROR); } } if (error_lfi.fptr) { count += fprintf(error_lfi.fptr, "%s", screen_last_error); fflush(error_lfi.fptr); if (ringbuffer_size && count > ringbuffer_size) { rotate_errorf(); count = 0; } if (max_log_size && count > max_log_size) { print_all_responses = 0; if (error_lfi.fptr) { fflush(error_lfi.fptr); fclose(error_lfi.fptr); error_lfi.fptr = NULL; error_lfi.overwrite = false; } } } else if (fatal) { fprintf(stderr, "%s\n", screen_last_error); fflush(stderr); } if (fatal) { if (!screen_inited) { if (error == EADDRINUSE) { exit(EXIT_BIND_ERROR); } else { exit(EXIT_FATAL_ERROR); } } else { if (error == EADDRINUSE) { sipp_exit(EXIT_BIND_ERROR); } else { sipp_exit(EXIT_FATAL_ERROR); } } } } extern "C" { void ERROR(const char *fmt, ...) { va_list ap; va_start(ap, fmt); _screen_error(true, false, 0, fmt, ap); va_end(ap); assert(0); } void ERROR_NO(const char *fmt, ...) { va_list ap; va_start(ap, fmt); _screen_error(true, true, errno, fmt, ap); va_end(ap); assert(0); } void WARNING(const char *fmt, ...) { va_list ap; va_start(ap, fmt); _screen_error(false, false, 0, fmt, ap); va_end(ap); } void WARNING_NO(const char *fmt, ...) { va_list ap; va_start(ap, fmt); _screen_error(false, true, errno, fmt, ap); va_end(ap); } } sipp-3.6.0/src/sipp.cpp0000644000175000017500000024554713475544015014350 0ustar walterwalter/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Richard GAYRAUD - 04 Nov 2003 * Marc LAMBERTON * Olivier JACQUES * Herve PELLAN * David MANSUTTI * Francois-Xavier Kowalski * Gerard Lyonnaz * Francois Draperi (for dynamic_id) * From Hewlett Packard Company. * F. Tarek Rogers * Peter Higginson * Vincent Luba * Shriram Natarajan * Guillaume Teissier from FTR&D * Clement Chen * Wolfgang Beck * Charles P Wright from IBM Research * Martin Van Leeuwen * Andy Aicken * Michael Hirschbichler */ #include #include #include #include #include #ifdef __APPLE__ /* Provide OSX version of extern char **environ; */ #include #define environ (*_NSGetEnviron()) #endif #define GLOBALS_FULL_DEFINITION #include "sipp.hpp" #include "sip_parser.hpp" #include "socket.hpp" #include "logger.hpp" #include "assert.h" #include "config.h" #include "version.h" extern SIPpSocket *ctrl_socket; extern SIPpSocket *stdin_socket; /* These could be local to main, but for the option processing table. */ static int argiFileName; /***************** Option Handling Table *****************/ struct sipp_option { const char *option; const char *help; int type; void *data; /* Pass 0: Help and other options that should exit immediately. */ /* Pass 1: All other options. */ /* Pass 2: Scenario parsing. */ int pass; }; #define SIPP_OPTION_HELP 1 #define SIPP_OPTION_INT 2 #define SIPP_OPTION_SETFLAG 3 #define SIPP_OPTION_UNSETFLAG 4 #define SIPP_OPTION_STRING 5 #define SIPP_OPTION_ARGI 6 #define SIPP_OPTION_TIME_SEC 7 #define SIPP_OPTION_FLOAT 8 #define SIPP_OPTION_BOOL 10 #define SIPP_OPTION_VERSION 11 #define SIPP_OPTION_TRANSPORT 12 #define SIPP_OPTION_NEED_SSL 13 #define SIPP_OPTION_IP 14 #define SIPP_OPTION_MAX_SOCKET 15 #define SIPP_OPTION_CSEQ 16 #define SIPP_OPTION_SCENARIO 17 #define SIPP_OPTION_RSA 18 #define SIPP_OPTION_LIMIT 19 #define SIPP_OPTION_USERS 20 #define SIPP_OPTION_KEY 21 #define SIPP_OPTION_3PCC 22 #define SIPP_OPTION_TDMMAP 23 #define SIPP_OPTION_TIME_MS 24 #define SIPP_OPTION_SLAVE_CFG 25 #define SIPP_OPTION_3PCC_EXTENDED 26 #define SIPP_OPTION_INPUT_FILE 27 #define SIPP_OPTION_TIME_MS_LONG 28 #define SIPP_OPTION_LONG 29 #define SIPP_OPTION_LONG_LONG 30 #define SIPP_OPTION_DEFAULTS 31 #define SIPP_OPTION_OOC_SCENARIO 32 #define SIPP_OPTION_INDEX_FILE 33 #define SIPP_OPTION_VAR 34 #define SIPP_OPTION_RTCHECK 35 #define SIPP_OPTION_LFNAME 36 #define SIPP_OPTION_LFOVERWRITE 37 #define SIPP_OPTION_PLUGIN 38 #define SIPP_OPTION_NEED_SCTP 39 #define SIPP_HELP_TEXT_HEADER 255 /* Put each option, its help text, and type in this table. */ struct sipp_option options_table[] = { {"h", NULL, SIPP_OPTION_HELP, NULL, 0}, {"help", NULL, SIPP_OPTION_HELP, NULL, 0}, {"", "Scenario file options:", SIPP_HELP_TEXT_HEADER, NULL, 0}, {"sd", "Dumps a default scenario (embedded in the SIPp executable)", SIPP_OPTION_SCENARIO, NULL, 0}, {"sf", "Loads an alternate XML scenario file. To learn more about XML scenario syntax, use the -sd option to dump embedded scenarios. They contain all the necessary help.", SIPP_OPTION_SCENARIO, NULL, 2}, {"oocsf", "Load out-of-call scenario.", SIPP_OPTION_OOC_SCENARIO, NULL, 2}, {"oocsn", "Load out-of-call scenario.", SIPP_OPTION_OOC_SCENARIO, NULL, 2}, { "sn", "Use a default scenario (embedded in the SIPp executable). If this option is omitted, the Standard SipStone UAC scenario is loaded.\n" "Available values in this version:\n\n" "- 'uac' : Standard SipStone UAC (default).\n" "- 'uas' : Simple UAS responder.\n" "- 'regexp' : Standard SipStone UAC - with regexp and variables.\n" "- 'branchc' : Branching and conditional branching in scenarios - client.\n" "- 'branchs' : Branching and conditional branching in scenarios - server.\n\n" "Default 3pcc scenarios (see -3pcc option):\n\n" "- '3pcc-C-A' : Controller A side (must be started after all other 3pcc scenarios)\n" "- '3pcc-C-B' : Controller B side.\n" "- '3pcc-A' : A side.\n" "- '3pcc-B' : B side.\n", SIPP_OPTION_SCENARIO, NULL, 2 }, {"", "IP, port and protocol options:", SIPP_HELP_TEXT_HEADER, NULL, 0}, { "t", "Set the transport mode:\n" "- u1: UDP with one socket (default),\n" "- un: UDP with one socket per call,\n" "- ui: UDP with one socket per IP address. The IP addresses must be defined in the injection file.\n" "- t1: TCP with one socket,\n" "- tn: TCP with one socket per call,\n" #ifdef USE_TLS "- l1: TLS with one socket,\n" "- ln: TLS with one socket per call,\n" #endif #ifdef USE_SCTP "- s1: SCTP with one socket,\n" "- sn: SCTP with one socket per call,\n" #endif "- c1: u1 + compression (only if compression plugin loaded),\n" "- cn: un + compression (only if compression plugin loaded). This plugin is not provided with SIPp.\n" , SIPP_OPTION_TRANSPORT, NULL, 1 }, {"i", "Set the local IP address for 'Contact:','Via:', and 'From:' headers. Default is primary host IP address.\n", SIPP_OPTION_IP, local_ip, 1}, {"p", "Set the local port number. Default is a random free port chosen by the system.", SIPP_OPTION_INT, &user_port, 1}, {"bind_local", "Bind socket to local IP address, i.e. the local IP address is used as the source IP address. If SIPp runs in server mode it will only listen on the local IP address instead of all IP addresses.", SIPP_OPTION_SETFLAG, &bind_local, 1}, {"ci", "Set the local control IP address", SIPP_OPTION_IP, control_ip, 1}, {"cp", "Set the local control port number. Default is 8888.", SIPP_OPTION_INT, &control_port, 1}, {"max_socket", "Set the max number of sockets to open simultaneously. This option is significant if you use one socket per call. Once this limit is reached, traffic is distributed over the sockets already opened. Default value is 50000", SIPP_OPTION_MAX_SOCKET, NULL, 1}, {"max_reconnect", "Set the the maximum number of reconnection.", SIPP_OPTION_INT, &reset_number, 1}, {"reconnect_close", "Should calls be closed on reconnect?", SIPP_OPTION_BOOL, &reset_close, 1}, {"reconnect_sleep", "How long (in milliseconds) to sleep between the close and reconnect?", SIPP_OPTION_TIME_MS, &reset_sleep, 1}, {"rsa", "Set the remote sending address to host:port for sending the messages.", SIPP_OPTION_RSA, NULL, 1}, #ifdef USE_TLS {"tls_cert", "Set the name for TLS Certificate file. Default is 'cacert.pem", SIPP_OPTION_STRING, &tls_cert_name, 1}, {"tls_key", "Set the name for TLS Private Key file. Default is 'cakey.pem'", SIPP_OPTION_STRING, &tls_key_name, 1}, {"tls_ca", "Set the name for TLS CA file. If not specified, X509 verification is not activated.", SIPP_OPTION_STRING, &tls_ca_name, 1}, {"tls_crl", "Set the name for Certificate Revocation List file. If not specified, X509 CRL is not activated.", SIPP_OPTION_STRING, &tls_crl_name, 1}, {"tls_version", "Set the TLS protocol version to use (1.0, 1.1, 1.2) -- default is autonegotiate", SIPP_OPTION_FLOAT, &tls_version, 1}, #else {"tls_cert", NULL, SIPP_OPTION_NEED_SSL, NULL, 1}, {"tls_key", NULL, SIPP_OPTION_NEED_SSL, NULL, 1}, {"tls_ca", NULL, SIPP_OPTION_NEED_SSL, NULL, 1}, {"tls_crl", NULL, SIPP_OPTION_NEED_SSL, NULL, 1}, {"tls_version", NULL, SIPP_OPTION_NEED_SSL, NULL, 1}, #endif #ifdef USE_SCTP {"multihome", "Set multihome address for SCTP", SIPP_OPTION_IP, multihome_ip, 1}, {"heartbeat", "Set heartbeat interval in ms for SCTP", SIPP_OPTION_INT, &heartbeat, 1}, {"assocmaxret", "Set association max retransmit counter for SCTP", SIPP_OPTION_INT, &assocmaxret, 1}, {"pathmaxret", "Set path max retransmit counter for SCTP", SIPP_OPTION_INT, &pathmaxret, 1}, {"pmtu", "Set path MTU for SCTP", SIPP_OPTION_INT, &pmtu, 1}, {"gracefulclose", "If true, SCTP association will be closed with SHUTDOWN (default).\n If false, SCTP association will be closed by ABORT.\n", SIPP_OPTION_BOOL, &gracefulclose, 1}, #else {"multihome", NULL, SIPP_OPTION_NEED_SCTP, NULL, 1}, {"heartbeat", NULL, SIPP_OPTION_NEED_SCTP, NULL, 1}, {"assocmaxret", NULL, SIPP_OPTION_NEED_SCTP, NULL, 1}, {"pathmaxret", NULL, SIPP_OPTION_NEED_SCTP, NULL, 1}, {"pmtu", NULL, SIPP_OPTION_NEED_SCTP, NULL, 1}, {"gracefulclose", NULL, SIPP_OPTION_NEED_SCTP, NULL, 1}, #endif {"", "SIPp overall behavior options:", SIPP_HELP_TEXT_HEADER, NULL, 0}, {"v", "Display version and copyright information.", SIPP_OPTION_VERSION, NULL, 0}, {"bg", "Launch SIPp in background mode.", SIPP_OPTION_SETFLAG, &backgroundMode, 1}, {"nostdin", "Disable stdin.\n", SIPP_OPTION_SETFLAG, &nostdin, 1}, {"plugin", "Load a plugin.", SIPP_OPTION_PLUGIN, NULL, 1}, {"sleep", "How long to sleep for at startup. Default unit is seconds.", SIPP_OPTION_TIME_SEC, &sleeptime, 1}, {"skip_rlimit", "Do not perform rlimit tuning of file descriptor limits. Default: false.", SIPP_OPTION_SETFLAG, &skip_rlimit, 1}, {"buff_size", "Set the send and receive buffer size.", SIPP_OPTION_INT, &buff_size, 1}, {"sendbuffer_warn", "Produce warnings instead of errors on SendBuffer failures.", SIPP_OPTION_BOOL, &sendbuffer_warn, 1}, {"lost", "Set the number of packets to lose by default (scenario specifications override this value).", SIPP_OPTION_FLOAT, &global_lost, 1}, {"key", "keyword value\nSet the generic parameter named \"keyword\" to \"value\".", SIPP_OPTION_KEY, NULL, 1}, {"set", "variable value\nSet the global variable parameter named \"variable\" to \"value\".", SIPP_OPTION_VAR, NULL, 3}, {"tdmmap", "Generate and handle a table of TDM circuits.\n" "A circuit must be available for the call to be placed.\n" "Format: -tdmmap {0-3}{99}{5-8}{1-31}", SIPP_OPTION_TDMMAP, NULL, 1}, {"dynamicStart", "variable value\nSet the start offset of dynamic_id variable", SIPP_OPTION_INT, &startDynamicId, 1}, {"dynamicMax", "variable value\nSet the maximum of dynamic_id variable ", SIPP_OPTION_INT, &maxDynamicId, 1}, {"dynamicStep", "variable value\nSet the increment of dynamic_id variable", SIPP_OPTION_INT, &stepDynamicId, 1}, {"", "Call behavior options:", SIPP_HELP_TEXT_HEADER, NULL, 0}, {"aa", "Enable automatic 200 OK answer for INFO, NOTIFY, OPTIONS and UPDATE.", SIPP_OPTION_SETFLAG, &auto_answer, 1}, {"base_cseq", "Start value of [cseq] for each call.", SIPP_OPTION_CSEQ, NULL, 1}, {"cid_str", "Call ID string (default %u-%p@%s). %u=call_number, %s=ip_address, %p=process_number, %%=% (in any order).", SIPP_OPTION_STRING, &call_id_string, 1}, {"d", "Controls the length of calls. More precisely, this controls the duration of 'pause' instructions in the scenario, if they do not have a 'milliseconds' section. Default value is 0 and default unit is milliseconds.", SIPP_OPTION_TIME_MS, &duration, 1}, {"deadcall_wait", "How long the Call-ID and final status of calls should be kept to improve message and error logs (default unit is ms).", SIPP_OPTION_TIME_MS, &deadcall_wait, 1}, {"auth_uri", "Force the value of the URI for authentication.\n" "By default, the URI is composed of remote_ip:remote_port.", SIPP_OPTION_STRING, &auth_uri, 1}, {"au", "Set authorization username for authentication challenges. Default is taken from -s argument", SIPP_OPTION_STRING, &auth_username, 1}, {"ap", "Set the password for authentication challenges. Default is 'password'", SIPP_OPTION_STRING, &auth_password, 1}, {"s", "Set the username part of the request URI. Default is 'service'.", SIPP_OPTION_STRING, &service, 1}, {"default_behaviors", "Set the default behaviors that SIPp will use. Possible values are:\n" "- all\tUse all default behaviors\n" "- none\tUse no default behaviors\n" "- bye\tSend byes for aborted calls\n" "- abortunexp\tAbort calls on unexpected messages\n" "- pingreply\tReply to ping requests\n" "If a behavior is prefaced with a -, then it is turned off. Example: all,-bye\n", SIPP_OPTION_DEFAULTS, &default_behaviors, 1}, {"nd", "No Default. Disable all default behavior of SIPp which are the following:\n" "- On UDP retransmission timeout, abort the call by sending a BYE or a CANCEL\n" "- On receive timeout with no ontimeout attribute, abort the call by sending a BYE or a CANCEL\n" "- On unexpected BYE send a 200 OK and close the call\n" "- On unexpected CANCEL send a 200 OK and close the call\n" "- On unexpected PING send a 200 OK and continue the call\n" "- On any other unexpected message, abort the call by sending a BYE or a CANCEL\n", SIPP_OPTION_UNSETFLAG, &default_behaviors, 1}, {"pause_msg_ign", "Ignore the messages received during a pause defined in the scenario ", SIPP_OPTION_SETFLAG, &pause_msg_ign, 1}, {"callid_slash_ign", "Don't treat a triple-slash in Call-IDs as indicating an extra SIPp prefix.", SIPP_OPTION_SETFLAG, &callidSlash, 1}, {"", "Injection file options:", SIPP_HELP_TEXT_HEADER, NULL, 0}, {"inf", "Inject values from an external CSV file during calls into the scenarios.\n" "First line of this file say whether the data is to be read in sequence (SEQUENTIAL), random (RANDOM), or user (USER) order.\n" "Each line corresponds to one call and has one or more ';' delimited data fields. Those fields can be referred as [field0], [field1], ... in the xml scenario file. Several CSV files can be used simultaneously (syntax: -inf f1.csv -inf f2.csv ...)", SIPP_OPTION_INPUT_FILE, NULL, 1}, {"infindex", "file field\nCreate an index of file using field. For example -inf ../path/to/users.csv -infindex users.csv 0 creates an index on the first key.", SIPP_OPTION_INDEX_FILE, NULL, 1 }, {"ip_field", "Set which field from the injection file contains the IP address from which the client will send its messages.\n" "If this option is omitted and the '-t ui' option is present, then field 0 is assumed.\n" "Use this option together with '-t ui'", SIPP_OPTION_INT, &peripfield, 1}, {"", "RTP behaviour options:", SIPP_HELP_TEXT_HEADER, NULL, 0}, {"mi", "Set the local media IP address (default: local primary host IP address)", SIPP_OPTION_IP, media_ip, 1}, {"rtp_echo", "Enable RTP echo. RTP/UDP packets received on port defined by -mp are echoed to their sender.\n" "RTP/UDP packets coming on this port + 2 are also echoed to their sender (used for sound and video echo).", SIPP_OPTION_SETFLAG, &rtp_echo_enabled, 1}, {"mb", "Set the RTP echo buffer size (default: 2048).", SIPP_OPTION_INT, &media_bufsize, 1}, {"mp", "Set the local RTP echo port number. Default is 6000.", SIPP_OPTION_INT, &user_media_port, 1}, #ifdef RTP_STREAM {"rtp_payload", "RTP default payload type.", SIPP_OPTION_INT, &rtp_default_payload, 1}, {"rtp_threadtasks", "RTP number of playback tasks per thread.", SIPP_OPTION_INT, &rtp_tasks_per_thread, 1}, {"rtp_buffsize", "Set the rtp socket send/receive buffer size.", SIPP_OPTION_INT, &rtp_buffsize, 1}, #endif {"", "Call rate options:", SIPP_HELP_TEXT_HEADER, NULL, 0}, {"r", "Set the call rate (in calls per seconds). This value can be" "changed during test by pressing '+', '_', '*' or '/'. Default is 10.\n" "pressing '+' key to increase call rate by 1 * rate_scale,\n" "pressing '-' key to decrease call rate by 1 * rate_scale,\n" "pressing '*' key to increase call rate by 10 * rate_scale,\n" "pressing '/' key to decrease call rate by 10 * rate_scale.\n", SIPP_OPTION_FLOAT, &rate, 1}, {"rp", "Specify the rate period for the call rate. Default is 1 second and default unit is milliseconds. This allows you to have n calls every m milliseconds (by using -r n -rp m).\n" "Example: -r 7 -rp 2000 ==> 7 calls every 2 seconds.\n -r 10 -rp 5s => 10 calls every 5 seconds.", SIPP_OPTION_TIME_MS, &rate_period_ms, 1}, {"rate_scale", "Control the units for the '+', '-', '*', and '/' keys.", SIPP_OPTION_FLOAT, &rate_scale, 1}, {"rate_increase", "Specify the rate increase every -rate_interval units (default is seconds). This allows you to increase the load for each independent logging period.\n" "Example: -rate_increase 10 -rate_interval 10s\n" " ==> increase calls by 10 every 10 seconds.", SIPP_OPTION_INT, &rate_increase, 1}, {"rate_max", "If -rate_increase is set, then quit after the rate reaches this value.\n" "Example: -rate_increase 10 -rate_max 100\n" " ==> increase calls by 10 until 100 cps is hit.", SIPP_OPTION_INT, &rate_max, 1}, {"rate_interval", "Set the interval by which the call rate is increased. Defaults to the value of -fd.", SIPP_OPTION_TIME_SEC, &rate_increase_freq, 1}, {"no_rate_quit", "If -rate_increase is set, do not quit after the rate reaches -rate_max.", SIPP_OPTION_UNSETFLAG, &rate_quit, 1}, {"l", "Set the maximum number of simultaneous calls. Once this limit is reached, traffic is decreased until the number of open calls goes down. Default:\n" " (3 * call_duration (s) * rate).", SIPP_OPTION_LIMIT, NULL, 1}, {"m", "Stop the test and exit when 'calls' calls are processed", SIPP_OPTION_LONG, &stop_after, 1}, {"users", "Instead of starting calls at a fixed rate, begin 'users' calls at startup, and keep the number of calls constant.", SIPP_OPTION_USERS, NULL, 1}, {"", "Retransmission and timeout options:", SIPP_HELP_TEXT_HEADER, NULL, 0}, {"recv_timeout", "Global receive timeout. Default unit is milliseconds. If the expected message is not received, the call times out and is aborted.", SIPP_OPTION_TIME_MS_LONG, &defl_recv_timeout, 1}, {"send_timeout", "Global send timeout. Default unit is milliseconds. If a message is not sent (due to congestion), the call times out and is aborted.", SIPP_OPTION_TIME_MS_LONG, &defl_send_timeout, 1}, {"timeout", "Global timeout. Default unit is seconds. If this option is set, SIPp quits after nb units (-timeout 20s quits after 20 seconds).", SIPP_OPTION_TIME_SEC, &global_timeout, 1}, {"timeout_error", "SIPp fails if the global timeout is reached is set (-timeout option required).", SIPP_OPTION_SETFLAG, &timeout_error, 1}, {"max_retrans", "Maximum number of UDP retransmissions before call ends on timeout. Default is 5 for INVITE transactions and 7 for others.", SIPP_OPTION_INT, &max_udp_retrans, 1}, {"max_invite_retrans", "Maximum number of UDP retransmissions for invite transactions before call ends on timeout.", SIPP_OPTION_INT, &max_invite_retrans, 1}, {"max_non_invite_retrans", "Maximum number of UDP retransmissions for non-invite transactions before call ends on timeout.", SIPP_OPTION_INT, &max_non_invite_retrans, 1}, {"nr", "Disable retransmission in UDP mode.", SIPP_OPTION_UNSETFLAG, &retrans_enabled, 1}, {"rtcheck", "Select the retransmission detection method: full (default) or loose.", SIPP_OPTION_RTCHECK, &rtcheck, 1}, {"T2", "Global T2-timer in milli seconds", SIPP_OPTION_TIME_MS, &global_t2, 1}, {"", "Third-party call control options:", SIPP_HELP_TEXT_HEADER, NULL, 0}, {"3pcc", "Launch the tool in 3pcc mode (\"Third Party call control\"). The passed IP address depends on the 3PCC role.\n" "- When the first twin command is 'sendCmd' then this is the address of the remote twin socket. SIPp will try to connect to this address:port to send the twin command (This instance must be started after all other 3PCC scenarios).\n" " Example: 3PCC-C-A scenario.\n" "- When the first twin command is 'recvCmd' then this is the address of the local twin socket. SIPp will open this address:port to listen for twin command.\n" " Example: 3PCC-C-B scenario.", SIPP_OPTION_3PCC, NULL, 1}, {"master","3pcc extended mode: indicates the master number", SIPP_OPTION_3PCC_EXTENDED, &master_name, 1}, {"slave", "3pcc extended mode: indicates the slave number", SIPP_OPTION_3PCC_EXTENDED, &slave_number, 1}, {"slave_cfg", "3pcc extended mode: indicates the file where the master and slave addresses are stored", SIPP_OPTION_SLAVE_CFG, NULL, 1}, {"", "Performance and watchdog options:", SIPP_HELP_TEXT_HEADER, NULL, 0}, {"timer_resol", "Set the timer resolution. Default unit is milliseconds. This option has an impact on timers precision." "Small values allow more precise scheduling but impacts CPU usage." "If the compression is on, the value is set to 50ms. The default value is 10ms.", SIPP_OPTION_TIME_MS, &timer_resolution, 1}, {"max_recv_loops", "Set the maximum number of messages received read per cycle. Increase this value for high traffic level. The default value is 1000.", SIPP_OPTION_INT, &max_recv_loops, 1}, {"max_sched_loops", "Set the maximum number of calls run per event loop. Increase this value for high traffic level. The default value is 1000.", SIPP_OPTION_INT, &max_sched_loops, 1}, {"watchdog_interval", "Set gap between watchdog timer firings. Default is 400.", SIPP_OPTION_TIME_MS, &watchdog_interval, 1}, {"watchdog_reset", "If the watchdog timer has not fired in more than this time period, then reset the max triggers counters. Default is 10 minutes.", SIPP_OPTION_TIME_MS, &watchdog_reset, 1}, {"watchdog_minor_threshold", "If it has been longer than this period between watchdog executions count a minor trip. Default is 500.", SIPP_OPTION_TIME_MS, &watchdog_minor_threshold, 1}, {"watchdog_major_threshold", "If it has been longer than this period between watchdog executions count a major trip. Default is 3000.", SIPP_OPTION_TIME_MS, &watchdog_major_threshold, 1}, {"watchdog_major_maxtriggers", "How many times the major watchdog timer can be tripped before the test is terminated. Default is 10.", SIPP_OPTION_INT, &watchdog_major_maxtriggers, 1}, {"watchdog_minor_maxtriggers", "How many times the minor watchdog timer can be tripped before the test is terminated. Default is 120.", SIPP_OPTION_INT, &watchdog_minor_maxtriggers, 1}, {"", "Tracing, logging and statistics options:", SIPP_HELP_TEXT_HEADER, NULL, 0}, {"f", "Set the statistics report frequency on screen. Default is 1 and default unit is seconds.", SIPP_OPTION_TIME_SEC, &report_freq, 1}, {"trace_stat", "Dumps all statistics in _.csv file. Use the '-h stat' option for a detailed description of the statistics file content.", SIPP_OPTION_SETFLAG, &dumpInFile, 1}, {"stat_delimiter", "Set the delimiter for the statistics file", SIPP_OPTION_STRING, &stat_delimiter, 1}, {"stf", "Set the file name to use to dump statistics", SIPP_OPTION_ARGI, &argiFileName, 1}, {"fd", "Set the statistics dump log report frequency. Default is 60 and default unit is seconds.", SIPP_OPTION_TIME_SEC, &report_freq_dumpLog, 1}, {"periodic_rtd", "Reset response time partition counters each logging interval.", SIPP_OPTION_SETFLAG, &periodic_rtd, 1}, {"trace_msg", "Displays sent and received SIP messages in __messages.log", SIPP_OPTION_SETFLAG, &useMessagef, 1}, {"message_file", "Set the name of the message log file.", SIPP_OPTION_LFNAME, &message_lfi, 1}, {"message_overwrite", "Overwrite the message log file (default true).", SIPP_OPTION_LFOVERWRITE, &message_lfi, 1}, {"trace_shortmsg", "Displays sent and received SIP messages as CSV in __shortmessages.log", SIPP_OPTION_SETFLAG, &useShortMessagef, 1}, {"shortmessage_file", "Set the name of the short message log file.", SIPP_OPTION_LFNAME, &shortmessage_lfi, 1}, {"shortmessage_overwrite", "Overwrite the short message log file (default true).", SIPP_OPTION_LFOVERWRITE, &shortmessage_lfi, 1}, {"trace_counts", "Dumps individual message counts in a CSV file.", SIPP_OPTION_SETFLAG, &useCountf, 1}, {"trace_err", "Trace all unexpected messages in __errors.log.", SIPP_OPTION_SETFLAG, &print_all_responses, 1}, {"error_file", "Set the name of the error log file.", SIPP_OPTION_LFNAME, &error_lfi, 1}, {"error_overwrite", "Overwrite the error log file (default true).", SIPP_OPTION_LFOVERWRITE, &error_lfi, 1}, {"trace_error_codes", "Dumps the SIP response codes of unexpected messages to __error_codes.log.", SIPP_OPTION_SETFLAG, &useErrorCodesf, 1}, // {"trace_timeout", "Displays call ids for calls with timeouts in __timeout.log", SIPP_OPTION_SETFLAG, &useTimeoutf, 1}, {"trace_calldebug", "Dumps debugging information about aborted calls to __calldebug.log file.", SIPP_OPTION_SETFLAG, &useCallDebugf, 1}, {"calldebug_file", "Set the name of the call debug file.", SIPP_OPTION_LFNAME, &calldebug_lfi, 1}, {"calldebug_overwrite", "Overwrite the call debug file (default true).", SIPP_OPTION_LFOVERWRITE, &calldebug_lfi, 1}, {"trace_screen", "Dump statistic screens in the __screens.log file when quitting SIPp. Useful to get a final status report in background mode (-bg option).", SIPP_OPTION_SETFLAG, &useScreenf, 1}, {"screen_file", "Set the name of the screen file.", SIPP_OPTION_LFNAME, &screen_lfi, 1}, {"screen_overwrite", "Overwrite the screen file (default true).", SIPP_OPTION_LFOVERWRITE, &screen_lfi, 1}, {"trace_rtt", "Allow tracing of all response times in __rtt.csv.", SIPP_OPTION_SETFLAG, &dumpInRtt, 1}, {"rtt_freq", "freq is mandatory. Dump response times every freq calls in the log file defined by -trace_rtt. Default value is 200.", SIPP_OPTION_LONG, &report_freq_dumpRtt, 1}, {"trace_logs", "Allow tracing of actions in __logs.log.", SIPP_OPTION_SETFLAG, &useLogf, 1}, {"log_file", "Set the name of the log actions log file.", SIPP_OPTION_LFNAME, &log_lfi, 1}, {"log_overwrite", "Overwrite the log actions log file (default true).", SIPP_OPTION_LFOVERWRITE, &log_lfi, 1}, {"ringbuffer_files", "How many error, message, shortmessage and calldebug files should be kept after rotation?", SIPP_OPTION_INT, &ringbuffer_files, 1}, {"ringbuffer_size", "How large should error, message, shortmessage and calldebug files be before they get rotated?", SIPP_OPTION_LONG_LONG, &ringbuffer_size, 1}, {"max_log_size", "What is the limit for error, message, shortmessage and calldebug file sizes.", SIPP_OPTION_LONG_LONG, &max_log_size, 1}, }; static struct sipp_option *find_option(const char* option) { int i; int max = sizeof(options_table)/sizeof(options_table[0]); /* Allow options to start with '-' or '--' */ if (option[0] != '-') { return NULL; } option++; if (option[0] == '-') { option++; } for (i = 0; i < max; i++) { if (!strcmp(options_table[i].option, option)) { return &(options_table[i]); } } return NULL; } /******************** Recv Poll Processing *********************/ extern unsigned pollnfds; #ifdef HAVE_EPOLL extern int epollfd; extern struct epoll_event* epollevents; #endif extern SIPpSocket *sockets[SIPP_MAXFDS]; /************** Statistics display & User control *************/ static void sipp_sigusr1(int /* not used */) { /* Smooth exit: do not place any new calls and exit */ quitting+=10; } static void sipp_sigusr2(int /* not used */) { if (!signalDump) { signalDump = true; } } void timeout_alarm(int /*param*/) { if (timeout_error) { ERROR("%s timed out after '%.3lf' seconds", scenario_file, ((double)clock_tick / 1000LL)); } quitting = 1; timeout_exit = true; } /* Send loop & trafic generation*/ static void traffic_thread() { /* create the file */ char L_file_name[MAX_PATH]; sprintf(L_file_name, "%s_%ld_screen.log", scenario_file, (long) getpid()); getmilliseconds(); /* Arm the global timer if needed */ if (global_timeout > 0) { signal(SIGALRM, timeout_alarm); alarm(global_timeout / 1000); } // Dump (to create file on disk) and showing screen at the beginning even if // the report period is not reached stattask::report(); screentask::report(false); while (1) { scheduling_loops++; getmilliseconds(); if (signalDump) { /* Screen dumping in a file */ if (useScreenf == 1) { print_screens(); } else { /* If the -trace_screen option has not been set, */ /* create the file at this occasion */ rotate_screenf(); print_screens(); } if (dumpInRtt) { main_scenario->stats->dumpDataRtt(); } signalDump = false; } while (sockets_pending_reset.begin() != sockets_pending_reset.end()) { (*(sockets_pending_reset.begin()))->reset_connection(); sockets_pending_reset.erase(sockets_pending_reset.begin()); } if ((main_scenario->stats->GetStat(CStat::CPT_C_IncomingCallCreated) + main_scenario->stats->GetStat(CStat::CPT_C_OutgoingCallCreated)) >= stop_after) { quitting = 1; } if (quitting) { if (quitting > 11) { /* Force exit: abort all calls */ abort_all_tasks(); } /* Quitting and no more opened calls, close all */ if (!main_scenario->stats->GetStat(CStat::CPT_C_CurrentCall)) { /* We can have calls that do not count towards our open-call count (e.g., dead calls). */ abort_all_tasks(); #ifdef RTP_STREAM rtpstream_shutdown(); #endif /* Reverse order shutdown, because deleting reorders the * sockets list. */ for (int i = pollnfds - 1; i >= 0; --i) { sockets[i]->close(); if (sockets[i] == ctrl_socket) { ctrl_socket = NULL; } else if (sockets[i] == stdin_socket) { stdin_socket = NULL; } } screentask::report(true); stattask::report(); if (useScreenf == 1) { print_screens(); } return; } } getmilliseconds(); /* Schedule all pending calls and process their timers */ task_list *running_tasks; if ((clock_tick - last_timer_cycle) > timer_resolution) { /* Just for the count. */ running_tasks = get_running_tasks(); last_running_calls = running_tasks->size(); /* If we have expired paused calls, move them to the run queue. */ last_woken_calls += expire_paused_tasks(); last_paused_calls = paused_tasks_count(); last_timer_cycle = clock_tick; } /* We should never get so busy with running calls that we can't process some messages. */ int loops = max_sched_loops; /* Now we process calls that are on the run queue. */ running_tasks = get_running_tasks(); /* Workaround hpux problem with iterators. Deleting the * current object when iterating breaks the iterator and * leads to iterate again on the destroyed (deleted) * object. Thus, we have to wait ont step befere actual * deletion of the object*/ task * last = NULL; task_list::iterator iter; for (iter = running_tasks->begin(); iter != running_tasks->end(); iter++) { if (last) { last->run(); if (sockets_pending_reset.begin() != sockets_pending_reset.end()) { last = NULL; break; } } last = *iter; if (--loops <= 0) { break; } } if (last) { last->run(); } while (sockets_pending_reset.begin() != sockets_pending_reset.end()) { (*(sockets_pending_reset.begin()))->reset_connection(); sockets_pending_reset.erase(sockets_pending_reset.begin()); } /* Update the clock. */ getmilliseconds(); /* Receive incoming messages */ SIPpSocket::pollset_process(running_tasks->empty()); } assert(0); } /*************** RTP ECHO THREAD ***********************/ /* param is a pointer to RTP socket */ static void rtp_echo_thread(void* param) { char* msg = (char*)alloca(media_bufsize); size_t nr, ns; sipp_socklen_t len; struct sockaddr_storage remote_rtp_addr; int rc; sigset_t mask; sigfillset(&mask); /* Mask all allowed signals */ rc = pthread_sigmask(SIG_BLOCK, &mask, NULL); if (rc) { WARNING("pthread_sigmask returned %d", rc); return; } for (;;) { len = sizeof(remote_rtp_addr); nr = recvfrom(*(int*)param, msg, media_bufsize, 0, (sockaddr*)&remote_rtp_addr, &len); if (((long)nr) < 0) { WARNING("%s %i", "Error on RTP echo reception - stopping echo - errno=", errno); return; } #ifdef RTP_STREAM if (!rtp_echo_state) { continue; } #endif ns = sendto(*(int*)param, msg, nr, 0, (sockaddr*)&remote_rtp_addr, len); if (ns != nr) { WARNING("%s %i", "Error on RTP echo transmission - stopping echo - errno=", errno); return; } if (*(int*)param == media_socket_audio) { rtp_pckts++; rtp_bytes += ns; } else { /* packets on the second RTP stream */ rtp2_pckts++; rtp2_bytes += ns; } } } /* Wrap the help text. */ static char* wrap(const char* in, int offset, int size) { int pos = 0; int i, j; int l = strlen(in); int alloced = l + 1; char* out = (char*)malloc(alloced); int indent = 0; if (!out) { ERROR_NO("malloc"); } for (i = j = 0; i < l; i++) { out[j++] = in[i]; if (in[i] == '\n') { out = (char*)realloc(out, alloced += offset); if (!out) { ERROR_NO("realloc"); } pos = 0; for (int k = 0; k < offset; k++) { out[j++] = ' '; } if (indent) { indent = 0; } } if (in[i] == '-' && i > 0 && in[i - 1] == '\n') { indent = 1; } if (++pos > size) { int k; for (k = j - 1; k > 0 && !isspace(out[k]); k--); int useoffset = offset; if (indent) { useoffset += 2; } if (k == 0 || out[k] == '\n') { pos = 0; out[j++] = '\n'; out = (char*)realloc(out, alloced += useoffset); if (!out) { ERROR_NO("realloc"); } for (k = 0; k < useoffset; k++) { out[j++] = ' '; } } else { int m; int move_back = 0; out[k] = '\n'; pos = j - k; // move_back is used to step back in the in and out buffers when a // word is longer than useoffset. if (i > (k + useoffset)) { move_back = i - (k + useoffset); i -= move_back; } k++; out = (char*)realloc(out, alloced += useoffset); if (!out) { ERROR_NO("realloc"); } for (m = 0; m < useoffset; m++) { if (k + useoffset + m < alloced) { out[k + useoffset + m] = out[k + m]; } out[k + m] = ' '; } j += useoffset - move_back; } } } out[j] = '\0'; return out; } /* If stdout is a TTY, wrap stdout in a call to PAGER (generally less(1)). * Returns a pid_t you'll have to pass to end_pager(). */ static pid_t begin_pager() { char pager[15] = "/usr/bin/pager"; char *argv[2] = {NULL, NULL}; int stdout_fd = fileno(stdout); int read_write[2]; pid_t ret; if (!isatty(stdout_fd)) { return 0; } /* Get pager first, so we can bail if it's not there */ argv[0] = getenv("PAGER"); if (!argv[0]) { argv[0] = pager; /* missing PAGER */ } else if (!*argv[0]) { return 0; /* blank PAGER */ } /* Should use euidaccess(3), but requires _GNU_SOURCE */ if (access(argv[0], X_OK) < 0) { perror(argv[0]); return 0; } /* Set up pipes and fork */ if (pipe(&read_write[0]) < 0) { perror("pipe"); return 0; } if ((ret = fork()) < 0) { perror("fork"); return 0; } /* Switch stdout FD in parent */ if (ret != 0) { fflush(stdout); close(stdout_fd); close(read_write[0]); if (dup2(read_write[1], stdout_fd) < 0) { perror("dup2"); } else { close(read_write[1]); } return ret; } /* Switch stdin FD and start pager in child */ if (setenv("LESS", "FRX", 1) < 0) { perror("setenv"); } close(STDIN_FILENO); close(read_write[1]); if (dup2(read_write[0], STDIN_FILENO) < 0) { perror("dup2"); } else { close(read_write[0]); } execve(argv[0], argv, environ); /* This was not supposed to happen. Missing binary? */ perror("execve"); return 0; } /* Make sure we flush and close, or the child won't get all the data (and know * when we're done). Wait for the child to exit first. */ void end_pager(pid_t pager) { fflush(stdout); fclose(stdout); while (pager != 0) { int wstatus; if (waitpid(pager, &wstatus, 0) == pager) { pager = 0; } } } /* Help screen */ static void help() { int i, max; pid_t pager = begin_pager(); printf ("\n" "Usage:\n" "\n" " sipp remote_host[:remote_port] [options]\n" "\n" "Example:\n" "\n" " Run SIPp with embedded server (uas) scenario:\n" " ./sipp -sn uas\n" " On the same host, run SIPp with embedded client (uac) scenario:\n" " ./sipp -sn uac 127.0.0.1\n" "\n" " Available options:\n" "\n"); /* We automatically generate the help messages based on the options array. * This should hopefully encourage people to write help text when they * introduce a new option and keep the code a bit cleaner. */ max = sizeof(options_table) / sizeof(options_table[0]); for (i = 0; i < max; i++) { char *formatted; if (!options_table[i].help) { continue; } formatted = wrap(options_table[i].help, 22, 77); if (options_table[i].type == SIPP_HELP_TEXT_HEADER) { printf("\n*** %s\n\n", formatted); } else { printf(" -%-16s: %s\n", options_table[i].option, formatted); } free(formatted); } printf ( "\n\nSignal handling:\n" "\n" " SIPp can be controlled using POSIX signals. The following signals\n" " are handled:\n" " USR1: Similar to pressing the 'q' key. It triggers a soft exit\n" " of SIPp. No more new calls are placed and all ongoing calls\n" " are finished before SIPp exits.\n" " Example: kill -SIGUSR1 732\n" " USR2: Triggers a dump of all statistics screens in\n" " __screens.log file. Especially useful \n" " in background mode to know what the current status is.\n" " Example: kill -SIGUSR2 732\n" "\n" "Exit codes:\n" "\n" " Upon exit (on fatal error or when the number of asked calls (-m\n" " option) is reached, SIPp exits with one of the following exit\n" " code:\n" " 0: All calls were successful\n" " 1: At least one call failed\n" " 97: Exit on internal command. Calls may have been processed\n" " 99: Normal exit without calls processed\n" " -1: Fatal error\n" " -2: Fatal error binding a socket\n"); end_pager(pager); } static void help_stats() { printf( "\n" " The -trace_stat option dumps all statistics in the\n" " file. The dump starts with one header\n" " line with all counters. All following lines are 'snapshots' of \n" " statistics counter given the statistics report frequency\n" " (-fd option). This file can be easily imported in any\n" " spreadsheet application, like Excel.\n" "\n" " In counter names, (P) means 'Periodic' - since last\n" " statistic row and (C) means 'Cumulative' - since SIPp was\n" " started.\n" "\n" " Available statistics are:\n" "\n" " - StartTime: \n" " Date and time when the test has started.\n" "\n" " - LastResetTime:\n" " Date and time when periodic counters were last reset.\n" "\n" " - CurrentTime:\n" " Date and time of the statistic row.\n" "\n" " - ElapsedTime:\n" " Elapsed time.\n" "\n" " - CallRate:\n" " Call rate (calls per seconds).\n" "\n" " - IncomingCall:\n" " Number of incoming calls.\n" "\n" " - OutgoingCall:\n" " Number of outgoing calls.\n" "\n" " - TotalCallCreated:\n" " Number of calls created.\n" "\n" " - CurrentCall:\n" " Number of calls currently ongoing.\n" "\n" " - SuccessfulCall:\n" " Number of successful calls.\n" "\n" " - FailedCall:\n" " Number of failed calls (all reasons).\n" "\n" " - FailedCannotSendMessage:\n" " Number of failed calls because SIPp cannot send the\n" " message (transport issue).\n" "\n" " - FailedMaxUDPRetrans:\n" " Number of failed calls because the maximum number of\n" " UDP retransmission attempts has been reached.\n" "\n" " - FailedUnexpectedMessage:\n" " Number of failed calls because the SIP message received\n" " is not expected in the scenario.\n" "\n" " - FailedCallRejected:\n" " Number of failed calls because of SIPp internal error.\n" " (a scenario sync command is not recognized, a scenario\n" " action failed or a scenario variable assignment failed).\n" "\n" " - FailedCmdNotSent:\n" " Number of failed calls because of inter-SIPp\n" " communication error (a scenario sync command failed to\n" " be sent).\n" "\n" " - FailedRegexpDoesntMatch:\n" " Number of failed calls because of regexp that doesn't\n" " match (there might be several regexp that don't match\n" " during the call but the counter is increased only by\n" " one).\n" "\n" " - FailedRegexpShouldntMatch:\n" " Number of failed calls because of regexp that shouldn't\n" " match but does (there might be several regexp that shouldn't match\n" " during the call but the counter is increased only by\n" " one).\n" "\n" " - FailedRegexpHdrNotFound:\n" " Number of failed calls because of regexp with 'hdr'\n" " option but no matching header found.\n" "\n" " - OutOfCallMsgs:\n" " Number of SIP messages received that cannot be associated\n" " to an existing call.\n" "\n" " - AutoAnswered:\n" " Number of unexpected specific messages received for new Call-ID.\n" " The message has been automatically answered by a 200 OK\n" " Currently, implemented for 'NOTIFY', 'INFO' and 'PING' messages.\n" "\n"); } /************* exit handler *****************/ static void print_last_stats() { interrupt = 1; // print last current screen print_statistics(1); // and print statistics screen currentScreenToDisplay = DISPLAY_STAT_SCREEN; print_statistics(1); if (main_scenario) { stattask::report(); } } static void stop_all_traces() { message_lfi.fptr = NULL; log_lfi.fptr = NULL; dumpInRtt = 0; dumpInFile = 0; } static void freeInFiles() { for (file_map::iterator file_it = inFiles.begin(); file_it != inFiles.end(); file_it++) { delete file_it->second; } } static void freeUserVarMap() { for (int_vt_map::iterator vt_it = userVarMap.begin(); vt_it != userVarMap.end(); vt_it++) { vt_it->second->putTable(); userVarMap[vt_it->first] = NULL; } } static void manage_oversized_file(int signum) { FILE *f; char L_file_name[MAX_PATH]; struct timeval currentTime; static int managing = 0; // we can receive this signal more than once if (managing) { return; } managing = 1; snprintf(L_file_name, MAX_PATH, "%s_%ld_traces_oversized.log", scenario_file, (long) getpid()); f = fopen(L_file_name, "w"); if (!f) { ERROR_NO("Unable to open oversized log file"); } GET_TIME(¤tTime); fprintf(f, "-------------------------------------------- %s\n" "Max file size reached - no more logs\n", CStat::formatTime(¤tTime)); fflush(f); stop_all_traces(); print_all_responses = 0; error_lfi.fptr = NULL; } static void releaseGlobalAllocations() { delete main_scenario; delete ooc_scenario; delete aa_scenario; free_default_messages(); freeInFiles(); freeUserVarMap(); delete userVariables; delete globalVariables; } void sipp_exit(int rc) { unsigned long counter_value_failed = 0; unsigned long counter_value_success = 0; /* Some signals may be delivered twice during exit() execution, and we must prevent all this from beeing done twice */ { static int already_exited = 0; if (already_exited) { return; } already_exited = 1; } screen_exit(); print_last_stats(); screen_show_errors(); /* Close open files. */ struct logfile_info** logfile_ptr; struct logfile_info* logfiles[] = { &screen_lfi, &calldebug_lfi, &message_lfi, &shortmessage_lfi, &log_lfi, &error_lfi, NULL}; for (logfile_ptr = logfiles; *logfile_ptr; ++logfile_ptr) { if ((*logfile_ptr)->fptr) { fclose((*logfile_ptr)->fptr); (*logfile_ptr)->fptr = NULL; } } // Get failed calls counter value before releasing objects if (display_scenario) { counter_value_failed = display_scenario->stats->GetStat(CStat::CPT_C_FailedCall); counter_value_success = display_scenario->stats->GetStat(CStat::CPT_C_SuccessfulCall); } else { rc = EXIT_TEST_FAILED; } releaseGlobalAllocations(); if (rc != EXIT_TEST_RES_UNKNOWN) { // Exit is not a normal exit. Just use the passed exit code. exit(rc); } else { // Normal exit: we need to determine if the calls were all // successful or not. In order to compute the return code, get // the counter of failed calls. If there is 0 failed calls, // then everything is OK! if (counter_value_failed == 0) { if (timeout_exit && counter_value_success < 1) { exit(EXIT_TEST_RES_INTERNAL); } else { exit(EXIT_TEST_OK); } } else { exit(EXIT_TEST_FAILED); } } } static void sipp_sighandler(int signum) { sipp_exit(EXIT_TEST_RES_UNKNOWN); } static void sighandle_set() { struct sigaction action_quit = {}; struct sigaction action_file_size_exceeded = {}; action_quit.sa_handler = sipp_sighandler; action_file_size_exceeded.sa_handler = manage_oversized_file; sigaction(SIGTERM, &action_quit, NULL); sigaction(SIGINT, &action_quit, NULL); sigaction(SIGXFSZ, &action_file_size_exceeded, NULL); // avoid core dump if the max file size is exceeded } static void set_scenario(const char* name) { free(scenario_file); free(scenario_path); const char* sep = strrchr(name, '/'); if (sep) { ++sep; // include slash scenario_path = strndup(name, sep - name); } else { scenario_path = strdup(""); sep = name; } const char* ext = strrchr(sep, '.'); if (ext && strcmp(ext, ".xml") == 0) { scenario_file = strndup(sep, ext - sep); } else { scenario_file = strdup(sep); } } /** * Create and bind media_socket_audio, media_socket_video for RTP and * RCTP on try_port and try_port+2. * * Sets: media_socket_audio and media_socket_audio. */ static int bind_rtp_sockets(struct sockaddr_storage* media_sa, int try_port, int last_attempt) { /* Create RTP sockets for audio and video. */ if ((media_socket_audio = socket(media_sa->ss_family, SOCK_DGRAM, IPPROTO_UDP)) == -1) { ERROR_NO("Unable to create the audio RTP socket"); } if (media_sa->ss_family == AF_INET) { (_RCAST(struct sockaddr_in*, media_sa))->sin_port = htons(try_port); } else { (_RCAST(struct sockaddr_in6*, media_sa))->sin6_port = htons(try_port); } if (::bind(media_socket_audio, (sockaddr*)media_sa, socklen_from_addr(media_sa)) != 0) { if (last_attempt) { ERROR_NO("Unable to bind audio RTP socket (IP=%s, port=%d)", media_ip, try_port); } ::close(media_socket_audio); media_socket_audio = -1; return -1; } /* Create and bind the second/video socket to try_port+2 */ /* (+1 is reserved for RTCP) */ if ((media_socket_video = socket(media_sa->ss_family, SOCK_DGRAM, IPPROTO_UDP)) == -1) { ERROR_NO("Unable to create the video RTP socket"); } if (media_sa->ss_family == AF_INET) { (_RCAST(struct sockaddr_in*, media_sa))->sin_port = htons(try_port + 2); } else { (_RCAST(struct sockaddr_in6*, media_sa))->sin6_port = htons(try_port + 2); } if (::bind(media_socket_video, (sockaddr*)media_sa, socklen_from_addr(media_sa)) != 0) { if (last_attempt) { ERROR_NO("Unable to bind video RTP socket (IP=%s, port=%d)", media_ip, try_port + 2); } ::close(media_socket_audio); ::close(media_socket_video); media_socket_audio = media_socket_video = -1; return -1; } return 0; } /** * Set a bunch of globals and bind audio and video rtp sockets. * * Sets: media_ip, media_port, media_ip_is_ipv6, media_socket_audio, * media_socket_video. */ static void setup_media_sockets() { struct addrinfo hints = {0,}; struct addrinfo* local_addr; struct sockaddr_storage media_sockaddr = {0,}; hints.ai_flags = AI_PASSIVE; hints.ai_family = PF_UNSPEC; /* use local_ip_is_ipv6 as hint? */ /* Defaults for media sockets */ if (media_ip[0] == '\0') { strcpy(media_ip, local_ip); } // assert that an IPv6 'media_ip' is not surrounded by brackets? /* Resolving local IP */ if (getaddrinfo(media_ip, NULL, &hints, &local_addr) != 0) { ERROR("Unknown RTP address '%s'.\n" "Use 'sipp -h' for details", media_ip); } memcpy(&media_sockaddr, local_addr->ai_addr, socklen_from_addr(_RCAST(struct sockaddr_storage*, local_addr->ai_addr))); freeaddrinfo(local_addr); media_ip_is_ipv6 = (media_sockaddr.ss_family == AF_INET6); int try_counter; int max_tries = user_media_port ? 1 : 100; media_port = user_media_port ? user_media_port : DEFAULT_MEDIA_PORT; media_socket_audio = media_socket_video = -1; for (try_counter = 1; try_counter <= max_tries; try_counter++) { int last_attempt = (try_counter == max_tries); if (bind_rtp_sockets(&media_sockaddr, media_port, last_attempt) == 0) { break; } // Old RFC 3551 says: // > RTP data SHOULD be carried on an even UDP port number and // > the corresponding RTCP packets SHOULD be carried on the // > next higher (odd) port number. // So, try only even numbers. media_port += 2; } } /* Main */ int main(int argc, char *argv[]) { int argi = 0; pthread_t pthread2_id = 0, pthread3_id = 0; unsigned int generic_count = 0; bool slave_masterSet = false; generic[0] = NULL; /* At least one argument is needed */ if (argc < 2) { help(); exit(EXIT_OTHER); } { /* Ignore the SIGPIPE signal */ struct sigaction action_pipe; memset(&action_pipe, 0, sizeof(action_pipe)); action_pipe.sa_handler=SIG_IGN; sigaction(SIGPIPE, &action_pipe, NULL); /* The Window Size change Signal is also useless, and causes failures. */ #ifdef SIGWINCH sigaction(SIGWINCH, &action_pipe, NULL); #endif /* sig usr1 management */ struct sigaction action_usr1; memset(&action_usr1, 0, sizeof(action_usr1)); action_usr1.sa_handler = sipp_sigusr1; sigaction(SIGUSR1, &action_usr1, NULL); /* sig usr2 management */ struct sigaction action_usr2; memset(&action_usr2, 0, sizeof(action_usr2)); action_usr2.sa_handler = sipp_sigusr2; sigaction(SIGUSR2, &action_usr2, NULL); } screen_set_exename("sipp"); pid = getpid(); memset(local_ip, 0, sizeof(local_ip)); #ifdef USE_SCTP memset(multihome_ip, 0, sizeof(multihome_ip)); #endif memset(media_ip, 0, sizeof(media_ip)); memset(control_ip, 0, sizeof(control_ip)); /* Initialize our global variable structure. */ globalVariables = new AllocVariableTable(NULL); userVariables = new AllocVariableTable(globalVariables); /* Command line parsing */ #define REQUIRE_ARG() if ((++argi) >= argc) { \ ERROR("Missing argument for param '%s'.\nUse 'sipp -h' for details", argv[argi - 1]); } #define CHECK_PASS() if (option->pass != pass) { break; } for (int pass = 0; pass <= 3; pass++) { for(argi = 1; argi < argc; argi++) { struct sipp_option *option = find_option(argv[argi]); if (!option) { if (argv[argi][0] != '-') { strncpy(remote_host, argv[argi], sizeof(remote_host) - 1); continue; } help(); ERROR("Invalid argument: '%s'.\n" "Use 'sipp -h' for details", argv[argi]); } switch(option->type) { case SIPP_OPTION_HELP: if (argi + 1 < argc && !strcmp(argv[argi + 1], "stat")) { help_stats(); } else { help(); } exit(EXIT_OTHER); case SIPP_OPTION_VERSION: printf("\n %s.\n\n", /* SIPp v1.2.3-TLS-PCAP */ "SIPp " SIPP_VERSION #ifdef USE_TLS "-TLS" #endif #ifdef USE_SCTP "-SCTP" #endif #ifdef PCAPPLAY "-PCAP" #endif #ifdef RTP_STREAM "-RTPSTREAM" #endif ); printf (" This program is free software; you can redistribute it and/or\n" " modify it under the terms of the GNU General Public License as\n" " published by the Free Software Foundation; either version 2 of\n" " the License, or (at your option) any later version.\n" "\n" " This program is distributed in the hope that it will be useful,\n" " but WITHOUT ANY WARRANTY; without even the implied warranty of\n" " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" " GNU General Public License for more details.\n" "\n" " You should have received a copy of the GNU General Public\n" " License along with this program; if not, write to the\n" " Free Software Foundation, Inc.,\n" " 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n" "\n" " Author: see source files.\n\n"); exit(EXIT_OTHER); case SIPP_OPTION_INT: REQUIRE_ARG(); CHECK_PASS(); *((int*)option->data) = get_long(argv[argi], argv[argi-1]); break; case SIPP_OPTION_LONG: REQUIRE_ARG(); CHECK_PASS(); *((long*)option->data) = get_long(argv[argi], argv[argi-1]); break; case SIPP_OPTION_LONG_LONG: REQUIRE_ARG(); CHECK_PASS(); *((unsigned long long*)option->data) = get_long_long(argv[argi], argv[argi-1]); break; case SIPP_OPTION_TIME_SEC: REQUIRE_ARG(); CHECK_PASS(); *((long*)option->data) = get_time(argv[argi], argv[argi-1], 1000); break; case SIPP_OPTION_TIME_MS: REQUIRE_ARG(); CHECK_PASS(); *((int*)option->data) = get_time(argv[argi], argv[argi-1], 1); break; case SIPP_OPTION_TIME_MS_LONG: REQUIRE_ARG(); CHECK_PASS(); *((long*)option->data) = get_time(argv[argi], argv[argi-1], 1); break; case SIPP_OPTION_BOOL: REQUIRE_ARG(); CHECK_PASS(); *((bool*)option->data) = get_bool(argv[argi], argv[argi - 1]); break; case SIPP_OPTION_FLOAT: REQUIRE_ARG(); CHECK_PASS(); *((double*)option->data) = get_double(argv[argi], argv[argi - 1]); break; case SIPP_OPTION_STRING: REQUIRE_ARG(); CHECK_PASS(); *((char**)option->data) = argv[argi]; break; case SIPP_OPTION_ARGI: REQUIRE_ARG(); CHECK_PASS(); *((int*)option->data) = argi; break; case SIPP_OPTION_INPUT_FILE: { REQUIRE_ARG(); CHECK_PASS(); FileContents *data = new FileContents(argv[argi]); char *name = argv[argi]; if (strrchr(name, '/')) { name = strrchr(name, '/') + 1; } else if (strrchr(name, '\\')) { name = strrchr(name, '\\') + 1; } assert(name); inFiles[name] = data; /* By default, the first file is used for IP address input. */ if (!ip_file) { ip_file = name; } if (!default_file) { default_file = name; } } break; case SIPP_OPTION_INDEX_FILE: REQUIRE_ARG(); REQUIRE_ARG(); CHECK_PASS(); { char *fileName = argv[argi - 1]; char *endptr; int field; if (inFiles.find(fileName) == inFiles.end()) { ERROR("Could not find file for -infindex: %s", argv[argi - 1]); } field = strtoul(argv[argi], &endptr, 0); if (*endptr) { ERROR("Invalid field specification for -infindex: %s", argv[argi]); } inFiles[fileName]->index(field); } break; case SIPP_OPTION_SETFLAG: CHECK_PASS(); *((bool*)option->data) = true; break; case SIPP_OPTION_UNSETFLAG: CHECK_PASS(); *((bool*)option->data) = false; break; case SIPP_OPTION_TRANSPORT: REQUIRE_ARG(); CHECK_PASS(); if (strlen(argv[argi]) != 2) { ERROR("Invalid argument for -t param : '%s'.\n" "Use 'sipp -h' for details", argv[argi]); } switch(argv[argi][0]) { case 'u': transport = T_UDP; break; case 't': transport = T_TCP; break; case 's': #ifdef USE_SCTP transport = T_SCTP; #else ERROR("To use SCTP transport you must compile SIPp with lksctp"); #endif break; case 'l': #ifdef USE_TLS transport = T_TLS; if (TLS_init() != 1) { printf("OpenSSL Initialization problem\n"); exit(-1); } #else ERROR("To use a TLS transport you must compile SIPp with OpenSSL"); #endif break; case 'c': if (strlen(comp_error)) { ERROR("No " COMP_PLUGGIN " plugin available: %s", comp_error); } transport = T_UDP; compression = 1; } switch(argv[argi][1]) { case '1': multisocket = 0; peripsocket = 0; break; case 'n': multisocket = 1; peripsocket = 0; break; case 'i': multisocket = 1; peripsocket = 1; socket_close = false; break; } if (peripsocket && transport != T_UDP) { ERROR("You can only use a perip socket with UDP!"); } break; case SIPP_OPTION_NEED_SCTP: CHECK_PASS(); ERROR("SCTP support is required for the %s option.", argv[argi]); break; case SIPP_OPTION_NEED_SSL: CHECK_PASS(); ERROR("OpenSSL is required for the %s option.", argv[argi]); break; case SIPP_OPTION_MAX_SOCKET: REQUIRE_ARG(); CHECK_PASS(); max_multi_socket = get_long(argv[argi], argv[argi - 1]); maxSocketPresent = true; break; case SIPP_OPTION_CSEQ: REQUIRE_ARG(); CHECK_PASS(); base_cseq = get_long(argv[argi], argv[argi - 1]); base_cseq--; break; case SIPP_OPTION_IP: { int dummy_port; char* ptr = (char*)option->data; REQUIRE_ARG(); CHECK_PASS(); strcpy(ptr, argv[argi]); get_host_and_port(ptr, ptr, &dummy_port); } break; case SIPP_OPTION_LIMIT: REQUIRE_ARG(); CHECK_PASS(); if (users >= 0) { ERROR("Can not set open call limit (-l) when -users is specified."); } open_calls_allowed = get_long(argv[argi], argv[argi - 1]); open_calls_user_setting = 1; break; case SIPP_OPTION_USERS: REQUIRE_ARG(); CHECK_PASS(); users = open_calls_allowed = get_long(argv[argi], argv[argi - 1]); open_calls_user_setting = 1; break; case SIPP_OPTION_KEY: REQUIRE_ARG(); REQUIRE_ARG(); CHECK_PASS(); if (generic_count + 1 >= sizeof(generic)/sizeof(generic[0])) { ERROR("Too many generic parameters %d",generic_count + 1); } generic[generic_count++] = &argv[argi - 1]; generic[generic_count] = NULL; break; case SIPP_OPTION_VAR: REQUIRE_ARG(); REQUIRE_ARG(); CHECK_PASS(); { int varId = globalVariables->find(argv[argi - 1], false); if (varId == -1) { globalVariables->dump(); ERROR("Can not set the global variable %s, because it does not exist.", argv[argi - 1]); } globalVariables->getVar(varId)->setString(strdup(argv[argi])); } break; case SIPP_OPTION_3PCC: if (slave_masterSet) { ERROR("-3PCC option is not compatible with -master and -slave options"); } if (extendedTwinSippMode) { ERROR("-3pcc and -slave_cfg options are not compatible"); } REQUIRE_ARG(); CHECK_PASS(); twinSippMode = true; strcpy(twinSippHost, argv[argi]); get_host_and_port(twinSippHost, twinSippHost, &twinSippPort); break; case SIPP_OPTION_SCENARIO: REQUIRE_ARG(); CHECK_PASS(); if (main_scenario) { ERROR("Internal error, main_scenario already set"); } else if (!strcmp(argv[argi - 1], "-sf")) { set_scenario(argv[argi]); if (useLogf == 1) { rotate_logfile(); } main_scenario = new scenario(argv[argi], 0); main_scenario->stats->setFileName(scenario_file, ".csv"); } else if (!strcmp(argv[argi - 1], "-sn")) { int i = find_scenario(argv[argi]); set_scenario(argv[argi]); main_scenario = new scenario(0, i); main_scenario->stats->setFileName(scenario_file, ".csv"); } else if (!strcmp(argv[argi - 1], "-sd")) { int i = find_scenario(argv[argi]); fprintf(stdout, "%s", default_scenario[i]); exit(EXIT_OTHER); } else { ERROR("Internal error, I don't recognize %s as a scenario option", argv[argi] - 1); } break; case SIPP_OPTION_OOC_SCENARIO: REQUIRE_ARG(); CHECK_PASS(); if (!strcmp(argv[argi - 1], "-oocsf")) { ooc_scenario = new scenario(argv[argi], 0); } else if (!strcmp(argv[argi - 1], "-oocsn")) { int i = find_scenario(argv[argi]); ooc_scenario = new scenario(0, i); } else { ERROR("Internal error, I don't recognize %s as a scenario option", argv[argi] - 1); } break; case SIPP_OPTION_SLAVE_CFG: REQUIRE_ARG(); CHECK_PASS(); if (twinSippMode) { ERROR("-slave_cfg and -3pcc options are not compatible"); } extendedTwinSippMode = true; slave_cfg_file = new char [strlen(argv[argi]) + 1]; sprintf(slave_cfg_file,"%s", argv[argi]); parse_slave_cfg(); break; case SIPP_OPTION_3PCC_EXTENDED: REQUIRE_ARG(); CHECK_PASS(); if (slave_masterSet) { ERROR("-slave and -master options are not compatible"); } if (twinSippMode) { ERROR("-master and -slave options are not compatible with -3PCC option"); } *((char**)option->data) = argv[argi]; slave_masterSet = true; break; case SIPP_OPTION_RSA: { REQUIRE_ARG(); CHECK_PASS(); char *remote_s_address; int remote_s_p = DEFAULT_PORT; int temp_remote_s_p; temp_remote_s_p = 0; remote_s_address = argv[argi]; get_host_and_port(remote_s_address, remote_s_address, &temp_remote_s_p); if (temp_remote_s_p != 0) { remote_s_p = temp_remote_s_p; } printf("Resolving remote sending address %s...\n", remote_s_address); /* FIXME: add DNS SRV support using liburli? */ if (gai_getsockaddr(&remote_sending_sockaddr, remote_s_address, remote_s_p, AI_PASSIVE, AF_UNSPEC) != 0) { ERROR("Unknown remote host '%s'.\n" "Use 'sipp -h' for details", remote_s_address); } use_remote_sending_addr = 1; break; } case SIPP_OPTION_RTCHECK: REQUIRE_ARG(); CHECK_PASS(); if (!strcmp(argv[argi], "full")) { *((int*)option->data) = RTCHECK_FULL; } else if (!strcmp(argv[argi], "loose")) { *((int*)option->data) = RTCHECK_LOOSE; } else { ERROR("Unknown retransmission detection method: %s", argv[argi]); } break; case SIPP_OPTION_TDMMAP: { REQUIRE_ARG(); CHECK_PASS(); int i1, i2, i3, i4, i5, i6, i7; if (sscanf(argv[argi], "{%d-%d}{%d}{%d-%d}{%d-%d}", &i1, &i2, &i3, &i4, &i5, &i6, &i7) == 7) { use_tdmmap = true; tdm_map_a = i2 - i1; tdm_map_x = i1; tdm_map_h = i3; tdm_map_b = i5 - i4; tdm_map_y = i4; tdm_map_c = i7 - i6; tdm_map_z = i6; } else { ERROR("Parameter -tdmmap must be of form {%%d-%%d}{%%d}{%%d-%%d}{%%d-%%d}"); } break; } case SIPP_OPTION_DEFAULTS: { unsigned long *ptr = (unsigned long*)option->data; char *token; REQUIRE_ARG(); CHECK_PASS(); *ptr = 0; token = argv[argi]; while ((token = strtok(token, ","))) { if (!strcmp(token, "none")) { *ptr = 0; } else { unsigned long mask = 0; int mode = 1; char *p = token; if (token[0] == '+') { mode = 1; p++; } else if (token[0] == '-') { mode = -1; p++; } if (!strcmp(p, "all")) { mask = DEFAULT_BEHAVIOR_ALL; } else if (!strcmp(p, "bye")) { mask = DEFAULT_BEHAVIOR_BYE; } else if (!strcmp(p, "abortunexp")) { mask = DEFAULT_BEHAVIOR_ABORTUNEXP; } else if (!strcmp(p, "pingreply")) { mask = DEFAULT_BEHAVIOR_PINGREPLY; } else { ERROR("Unknown default behavior: '%s'", token); } switch(mode) { case 0: *ptr = mask; break; case 1: *ptr |= mask; break; case -1: *ptr &= ~mask; break; default: assert(0); } } token = NULL; } break; } case SIPP_OPTION_LFNAME: REQUIRE_ARG(); CHECK_PASS(); ((struct logfile_info*)option->data)->fixedname = true; strcpy(((struct logfile_info*)option->data)->file_name, argv[argi]); break; case SIPP_OPTION_LFOVERWRITE: REQUIRE_ARG(); CHECK_PASS(); ((struct logfile_info*)option->data)->fixedname = true; ((struct logfile_info*)option->data)->overwrite = get_bool(argv[argi], argv[argi - 1]); break; case SIPP_OPTION_PLUGIN: { int ret; REQUIRE_ARG(); CHECK_PASS(); void* handle = dlopen(argv[argi], RTLD_NOW); if (!handle) { ERROR("Could not open plugin %s: %s", argv[argi], dlerror()); } int (*init)(); void* funcptr = dlsym(handle, "init"); /* http://stackoverflow.com/questions/1096341/function-pointers-casting-in-c */ *reinterpret_cast(&init) = funcptr; // yuck const char* error; if ((error = dlerror())) { ERROR("Could not locate init function in %s: %s", argv[argi], error); } ret = init(); if (ret != 0) { ERROR("Plugin %s initialization failed.", argv[argi]); } } break; default: ERROR("Internal error: I don't recognize the option type for %s", argv[argi]); } } } /* Load compression plugin if needed/available. */ if (compression) { comp_load(); } if ((extendedTwinSippMode && !slave_masterSet) || (!extendedTwinSippMode && slave_masterSet)) { ERROR("-slave_cfg option must be used with -slave or -master option"); } if (peripsocket) { if (!ip_file) { ERROR("You must use the -inf option when using -t ui.\n" "Use 'sipp -h' for details"); } } if (ringbuffer_size && max_log_size) { ERROR("Ring Buffer options and maximum log size are mutually exclusive."); } if (global_lost) { lose_packets = 1; } /* If no scenario was selected, choose the uac one */ if (scenario_file == NULL) { assert(main_scenario == NULL); int i = find_scenario("uac"); set_scenario("uac"); main_scenario = new scenario(0, i); main_scenario->stats->setFileName(scenario_file, ".csv"); } #ifdef USE_TLS if ((transport == T_TLS) && (TLS_init_context() != TLS_INIT_NORMAL)) { ERROR("FI_init_ssl_context() failed"); } #endif if (useMessagef == 1) { rotate_messagef(); } if (useShortMessagef == 1) { rotate_shortmessagef(); } if (useCallDebugf) { rotate_calldebugf(); } if (useScreenf == 1) { rotate_screenf(); } // TODO: finish the -trace_timeout option implementation /* if (useTimeoutf == 1) { char L_file_name [MAX_PATH]; sprintf(L_file_name, "%s_%d_timeout.log", scenario_file, getpid()); timeoutf = fopen(L_file_name, "w"); if (!timeoutf) { ERROR("Unable to create '%s'", L_file_name); } } */ if (useCountf == 1) { char L_file_name [MAX_PATH]; sprintf(L_file_name, "%s_%ld_counts.csv", scenario_file, (long) getpid()); countf = fopen(L_file_name, "w"); if (!countf) { ERROR("Unable to create '%s'", L_file_name); } print_count_file(countf, 1); } if (useErrorCodesf == 1) { char L_file_name [MAX_PATH]; sprintf(L_file_name, "%s_%ld_error_codes.csv", scenario_file, (long) getpid()); codesf = fopen(L_file_name, "w"); if (!codesf) { ERROR("Unable to create '%s'", L_file_name); } } if (dumpInRtt == 1) { main_scenario->stats->initRtt(scenario_file, ".csv", report_freq_dumpRtt); } if (rate_increase_freq == 0) { rate_increase_freq = report_freq_dumpLog; } // Check the soft limit on the number of open files, // error out if this does not allow us to open the // required number of signalling channels, and warn // if this may not allow enough media channels. if (!skip_rlimit) { struct rlimit rlimit; unsigned max_sockets_needed = multisocket ? max_multi_socket : 1; if (getrlimit (RLIMIT_NOFILE, &rlimit) < 0) { ERROR_NO("getrlimit error"); } if (max_sockets_needed > rlimit.rlim_cur) { ERROR("Maximum number of open sockets (%d) should be less than the maximum number " "of open files (%lu). Tune this with the `ulimit` command or the -max_socket " "option", max_sockets_needed, (unsigned long)rlimit.rlim_cur); } if ((open_calls_allowed + max_sockets_needed) > rlimit.rlim_cur) { WARNING("Maximum number of open sockets (%d) plus number of open calls (%d) " "should be less than the maximum number of open files (%lu) to " "allow for media support. Tune this with the `ulimit` command, " "the -l option or the -max_socket option", max_sockets_needed, open_calls_allowed, (unsigned long)rlimit.rlim_cur); } } /* if (!ooc_scenario) { ooc_scenario = new scenario(0, find_scenario("ooc_default")); ooc_scenario->stats->setFileName((char*)"ooc_default", (char*)".csv"); } */ display_scenario = main_scenario; aa_scenario = new scenario(0, find_scenario("ooc_dummy")); aa_scenario->stats->setFileName("ooc_dummy", ".csv"); init_default_messages(); for (int i = 1; i <= users; i++) { freeUsers.push_back(i); userVarMap[i] = new VariableTable(userVariables); } if (argiFileName) { main_scenario->stats->setFileName(argv[argiFileName]); } // setup option form cmd line call::maxDynamicId = maxDynamicId; call::startDynamicId = startDynamicId; call::dynamicId = startDynamicId; call::stepDynamicId = stepDynamicId; /* Now Initialize the scenarios. */ main_scenario->runInit(); if (ooc_scenario) { ooc_scenario->runInit(); } /* In which mode the tool is launched ? */ main_scenario->computeSippMode(); if (ooc_scenario && sendMode == MODE_SERVER) { ERROR("SIPp cannot use out-of-call scenarios when running in server mode"); } if (!isatty(fileno(stdout))) use_curses = false; if (use_curses) screen_init(); sighandle_set(); /* checking if we need to launch the tool in background mode */ if (backgroundMode == true) { pid_t l_pid; switch (l_pid = fork()) { case -1: // error when forking ! ERROR_NO("Forking error"); exit(EXIT_FATAL_ERROR); case 0: // child process - poursuing the execution // close all of our file descriptors { int nullfd = open("/dev/null", O_RDWR); dup2(nullfd, fileno(stdin)); dup2(nullfd, fileno(stdout)); dup2(nullfd, fileno(stderr)); close(nullfd); } break; default: // parent process - killing the parent - the child get the parent pid printf("Background mode - PID=[%ld]\n", (long) l_pid); exit(EXIT_OTHER); } } sipp_usleep(sleeptime * 1000); /* Create the statistics reporting task. */ stattask::initialize(); /* Create the screen update task. */ screentask::initialize(); /* Create the rate increase task. */ ratetask::initialize(); /* Create a watchdog task. */ if (watchdog_interval) { new watchdog(watchdog_interval, watchdog_reset, watchdog_major_threshold, watchdog_major_maxtriggers, watchdog_minor_threshold, watchdog_minor_maxtriggers); } /* Setting the rate and its dependant params (open_calls_allowed) */ /* If we are a client, then create the task to open new calls. */ if (creationMode == MODE_CLIENT) { CallGenerationTask::initialize(); CallGenerationTask::set_rate(rate); } #ifdef HAVE_EPOLL epollevents = (struct epoll_event*)malloc(sizeof(struct epoll_event) * max_recv_loops); epollfd = epoll_create(SIPP_MAXFDS); if (epollfd == -1) { ERROR_NO("Failed to open epoll FD"); } #endif open_connections(); /* Always create and Bind RTP socket */ /* to avoid ICMP errors from us. */ setup_media_sockets(); /* Creating the remote control socket thread. */ setup_ctrl_socket(); if (!nostdin) { setup_stdin_socket(); } if (rtp_echo_enabled && media_socket_audio > 0) { if (pthread_create(&pthread2_id, NULL, (void *(*)(void *))rtp_echo_thread, &media_socket_audio) == -1) { ERROR_NO("Unable to create RTP echo thread"); } } /* Creating second RTP echo thread for video. */ if (rtp_echo_enabled && media_socket_video > 0) { if (pthread_create(&pthread3_id, NULL, (void *(*)(void *)) rtp_echo_thread, &media_socket_video) == -1) { ERROR_NO("Unable to create video RTP echo thread"); } } traffic_thread(); /* Cancel and join other threads. */ if (pthread2_id) { pthread_cancel(pthread2_id); } if (pthread3_id) { pthread_cancel(pthread3_id); } if (pthread2_id) { pthread_join(pthread2_id, NULL); } if (pthread3_id) { pthread_join(pthread3_id, NULL); } #ifdef HAVE_EPOLL close(epollfd); free(epollevents); #endif free(scenario_file); free(scenario_path); sipp_exit(EXIT_TEST_RES_UNKNOWN); } sipp-3.6.0/src/xp_parser.c0000644000175000017500000003655313475544015015033 0ustar walterwalter/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright (C) 2003 - The Authors * * Author : Richard GAYRAUD - 04 Nov 2003 * From Hewlett Packard Company. */ /* * Mini xml parser: * * WARNING 1: Only supports printable * ASCII characters in xml files. '\0' * is not a valid character. Returned string are * NULL-terminated. * * WARNING 2: Does not supports multithreading. Works * with static buffer, no memory allocation. */ /******************* Include files *********************/ #include #include #include #include "xp_parser.h" #define strstartswith(haystack, needle) \ (!strncmp(haystack, needle, sizeof(needle) - 1)) /************* Constants and Global variables ***********/ #define XP_MAX_NAME_LEN 256 #define XP_MAX_FILE_LEN 65536 #define XP_MAX_STACK_LEN 256 static char xp_file[XP_MAX_FILE_LEN + 1]; static char *xp_position[XP_MAX_STACK_LEN]; static int xp_stack = 0; static int xp_stack_invalid = 0; static char xp_history[XP_MAX_FILE_LEN + 1]; static char *xp_history_pos; #define xp_history_reset() do { \ xp_history[0] = xp_history[1] = '\0'; \ xp_history_pos = &xp_history[0]; \ } while(0) #define xp_history_push(n) do { \ strcpy(xp_history_pos + 1, n); \ xp_history_pos += strlen(n) + 1; \ /*xp_history_debug();*/ \ } while(0) #define xp_history_pop() do { \ while (xp_history_pos > xp_history && *--xp_history_pos != '\0'); \ /*xp_history_debug();*/ \ } while(0) /****************** Internal routines ********************/ static const char *find_first_of(const char *ptr, const char *needles, const char *end) { while (ptr < end) { const char *q; for (q = needles; *q; ++q) { if (*ptr == *q) { return ptr; } } ++ptr; } return NULL; } static void extract_name(char *name, const char *ptr, const char **end) { const char *p; name[0] = '\0'; if (!*end || *end < ptr) { return; } p = find_first_of(ptr, " \t\r\n/>", *end); if (p) { *end = p; } memcpy(name, ptr, *end - ptr); name[*end - ptr] = '\0'; } static const char *xp_find_escape(const char *escape, size_t len) { static struct escape { const char *name; const char *value; } html_escapes[] = { { "amp", "&" }, { "gt", ">" }, { "lt", "<" }, { "quot", "\"" }, { NULL, NULL } }; struct escape *n; for (n = html_escapes; n->name; ++n) { if (strncmp(escape, n->name, len) == 0) return n->value; } return NULL; } #if 0 static void xp_history_debug() { char *p = &xp_history[0]; fprintf(stderr, "DBG:"); for (;;) { if (p >= xp_history_pos) break; fprintf(stderr, " %s", p + 1); p += strlen(p + 1) + 1; } fprintf(stderr, "\n"); } #endif /* This finds the end of something like , and does not recurse * into other elements. */ static char *xp_find_start_tag_end(char *ptr) { while (*ptr) { if (*ptr == '<') { if (strstartswith(ptr, ""); if (!comment_end) return NULL; ptr = comment_end + 3; } else { return NULL; } } else if ((*ptr == '/') && (*(ptr+1) == '>')) { return ptr; } else if (*ptr == '"') { ptr++; while (*ptr) { if (*ptr == '\\') { ptr += 2; } else if (*ptr == '"') { ptr++; break; } else { ptr++; } } } else if (*ptr == '>') { return ptr; } else { ptr++; } } return ptr; } static char *xp_find_local_end() { char *ptr = xp_position[xp_stack]; int level = 0; while (*ptr) { if (*ptr == '<') { if (strstartswith(ptr, ""); if (!cdata_end) return NULL; ptr = cdata_end + 3; } else if (strstartswith(ptr, ""); if (!comment_end) return NULL; ptr = comment_end + 3; } else if (*(ptr+1) == '/') { level--; if (level < 0) return ptr; } else { level++; } } else if ((*ptr == '/') && (*(ptr+1) == '>')) { level--; if (level < 0) return ptr; } else if (*ptr == '"') { ptr++; while (*ptr) { if (*ptr == '\\') { ptr++; /* Skip the slash. */ } else if (*ptr == '"') { break; } ptr++; } } ptr++; } return ptr; } /********************* Interface routines ********************/ int xp_unescape(const char *source, char *dest) { const char *from; char *to; size_t pos; if (!source || !dest) { return -1; } from = source; to = dest; pos = strcspn(from, "&"); for (; from[pos] != '\0'; pos = strcspn(from, "&")) { size_t term; size_t escape_len; const char *escape; const char c = from[pos]; memcpy(to, from, pos); to += pos; from += pos + 1; if (c != '&') continue; term = strcspn(from, ";"); if (from[term] == '\0') { *to++ = '&'; pos = term; break; } escape = xp_find_escape(from, term); if (!escape) { *to++ = '&'; continue; } escape_len = strlen(escape); memcpy(to, escape, escape_len); to += escape_len; from += term + 1; } if (pos) { memcpy(to, from, pos); to += pos; } to[0] = '\0'; return to - dest; } int xp_set_xml_buffer_from_string(const char *str) { size_t len = strlen(str); if (len > XP_MAX_FILE_LEN) { return 0; } strcpy(xp_file, str); xp_stack = xp_stack_invalid = 0; xp_history_reset(); xp_position[xp_stack] = xp_file; if (!strstartswith(xp_position[xp_stack], "")) return 0; xp_position[xp_stack] = xp_position[xp_stack] + 2; return 1; } int xp_set_xml_buffer_from_file(const char *filename) { FILE *f = fopen(filename, "rb"); char *pos; int index = 0; int c; if (!f) { return 0; } while ((c = fgetc(f)) != EOF) { if (c == '\r') continue; xp_file[index++] = c; if (index >= XP_MAX_FILE_LEN) { xp_file[index++] = 0; xp_stack = xp_stack_invalid = 0; xp_history_reset(); xp_position[xp_stack] = xp_file; fclose(f); return 0; } } xp_file[index++] = 0; fclose(f); xp_stack = xp_stack_invalid = 0; xp_history_reset(); xp_position[xp_stack] = xp_file; if (!strstartswith(xp_position[xp_stack], ""))) return 0; xp_position[xp_stack] = pos + 2; return 1; } char *xp_open_element(int index) { char *ptr = xp_position[xp_stack]; int level = 0; int index_left = index; static char name[XP_MAX_NAME_LEN]; if (index > 0) { xp_history_pop(); } while (*ptr) { if (*ptr == '<') { if ((*(ptr+1) == '!') && (*(ptr+2) == '[') && (strstr(ptr, ""); if (!cdata_end) return NULL; ptr = cdata_end + 2; } else if ((*(ptr+1) == '!') && (*(ptr+2) == '-') && (strstr(ptr, ""); if (!comment_end) return NULL; ptr = comment_end + 2; } else if (strstartswith(ptr, ""); if (!doctype_end) return NULL; ptr = doctype_end; } else if (strstartswith(ptr, ""); if (!xmlmodel_end) return NULL; ptr = xmlmodel_end; } else if (*(ptr+1) == '/') { char *end = xp_find_start_tag_end(ptr + 2); if (!end) { return NULL; } extract_name(name, ptr + 2, (const char**)&end); level--; if (level < 0) return NULL; xp_history_pop(); if (strcmp(xp_history_pos + 1, name) && !xp_stack_invalid) { xp_stack_invalid = 1; fprintf(stderr, "Unexpected (expected )\n", name, xp_history_pos + 1); } } else { char *end = xp_find_start_tag_end(ptr + 1); if (!end) { return NULL; } extract_name(name, ptr + 1, (const char**)&end); xp_history_push(name); if (level == 0) { if (index_left) { index_left--; } else { xp_position[++xp_stack] = end; return name; } } /* We want to skip over this particular element .*/ ptr = end - 1; level++; } } else if ((*ptr == '/') && (*(ptr+1) == '>')) { level--; if (level < 0) return NULL; xp_history_pop(); } ptr++; } return NULL; } void xp_close_element() { if (!xp_stack) { xp_stack_invalid = 1; return; } xp_stack--; } int xp_is_invalid(void) { const char *elem; if (xp_stack_invalid) { return 1; } if (xp_stack) { return 1; } if ((elem = xp_open_element(1))) { /* anything after ? */ xp_close_element(); return 1; } return 0; } const char *xp_get_value(const char *name) { int index = 0; static char buffer[XP_MAX_FILE_LEN + 1]; char *ptr, *end, *check; end = xp_find_start_tag_end(xp_position[xp_stack] + 1); if (!end) return NULL; ptr = xp_position[xp_stack]; while (*ptr) { ptr = strstr(ptr, name); if (!ptr) return NULL; if (ptr > end) return NULL; /* FIXME: potential BUG in parser: we must retrieve full word, * so the use of strstr as it is is not enough. * we should check that the retrieved word is not a piece of * another one. */ check = ptr - 1; if (check >= xp_position[xp_stack]) { if ((*check != '\r') && (*check != '\n') && (*check != '\t') && (*check != ' ' )) { ptr += strlen(name); continue; } } else return(NULL); ptr += strlen(name); while ((*ptr == '\r') || (*ptr == '\n') || (*ptr == '\t') || (*ptr == ' ' ) ) { ptr++; } if (*ptr != '=') continue; ptr++; while ((*ptr == '\r') || (*ptr == '\n') || (*ptr == '\t') || (*ptr == ' ') ) { ptr++; } ptr++; if (*ptr) { while (*ptr) { if (*ptr == '\\') { ptr++; switch(*ptr) { case '\\': buffer[index++] = '\\'; break; case '"': buffer[index++] = '"'; break; case 'n': buffer[index++] = '\n'; break; case 't': buffer[index++] = '\t'; break; case 'r': buffer[index++] = '\r'; break; default: buffer[index++] = '\\'; buffer[index++] = *ptr; break; } ptr++; } else if (*ptr == '"') { break; } else { buffer[index++] = *ptr++; } if (index > XP_MAX_FILE_LEN) return NULL; } buffer[index] = 0; return buffer; } } return NULL; } char* xp_get_cdata(void) { static char buffer[XP_MAX_FILE_LEN + 1]; const char *end = xp_find_local_end(); const char *ptr; ptr = strstr(xp_position[xp_stack], " end) return NULL; end = strstr(ptr, "]]>"); if (!end) { return NULL; } if ((end - ptr) > XP_MAX_FILE_LEN) return NULL; memcpy(buffer, ptr, (end - ptr)); buffer[end-ptr] = 0; return buffer; } int xp_get_content_length(const char *P_buffer) { const char *L_ctl_hdr; int L_content_length = -1; unsigned char short_form; short_form = 0; L_ctl_hdr = strstr(P_buffer, "\nContent-Length:"); if (!L_ctl_hdr) { L_ctl_hdr = strstr(P_buffer, "\nContent-length:"); } if (!L_ctl_hdr) { L_ctl_hdr = strstr(P_buffer, "\ncontent-Length:"); } if (!L_ctl_hdr) { L_ctl_hdr = strstr(P_buffer, "\ncontent-length:"); } if (!L_ctl_hdr) { L_ctl_hdr = strstr(P_buffer, "\nCONTENT-LENGTH:"); } if (!L_ctl_hdr) { L_ctl_hdr = strstr(P_buffer, "\nl:"); short_form = 1; } if (L_ctl_hdr) { if (short_form) { L_ctl_hdr += 3; } else { L_ctl_hdr += 16; } while (isspace(*L_ctl_hdr)) L_ctl_hdr++; sscanf(L_ctl_hdr, "%d", &L_content_length); } /* L_content_length = -1 the message does not contain content-length */ return (L_content_length); } sipp-3.6.0/src/actions.cpp0000644000175000017500000005555513475544015015033 0ustar walterwalter/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Authors : Benjamin GAUTHIER - 24 Mar 2004 * Joseph BANINO * Olivier JACQUES * Richard GAYRAUD * From Hewlett Packard Company. * Guillaume Teissier from FTR&D */ #include "sipp.hpp" #include #ifdef PCAPPLAY #include "prepare_pcap.h" #endif static const char* strIntCmd(CAction::T_IntCmdType type) { switch (type) { case CAction::E_INTCMD_STOPCALL: return "stop_call"; case CAction::E_INTCMD_STOP_ALL: return "stop_gracefully"; case CAction::E_INTCMD_STOP_NOW: return "stop_now"; default: case CAction::E_INTCMD_INVALID: return "invalid"; } return "invalid"; } const char * CAction::comparatorToString(T_Comparator comp) { switch(comp) { case E_C_EQ: return "=="; case E_C_NE: return "!="; case E_C_GT: return ">"; case E_C_LT: return "<"; case E_C_GEQ: return ">="; case E_C_LEQ: return "<="; default: return "invalid"; } } bool CAction::compare(VariableTable *variableTable) { double lhs = variableTable->getVar(M_varInId)->getDouble(); double rhs = M_varIn2Id ? variableTable->getVar(M_varIn2Id)->getDouble() : M_doubleValue; switch(M_comp) { case E_C_EQ: return lhs == rhs; case E_C_NE: return lhs != rhs; case E_C_GT: return lhs > rhs; case E_C_LT: return lhs < rhs; case E_C_GEQ: return lhs >= rhs; case E_C_LEQ: return lhs <= rhs; default: ERROR("Internal error: Invalid comparison type %d", M_comp); return false; /* Shut up warning. */ } } void CAction::afficheInfo() { if (M_action == E_AT_ASSIGN_FROM_REGEXP) { if(M_lookingPlace == E_LP_MSG) { printf("Type[%d] - regexp[%s] where[%s] - checkIt[%d] - checkItInverse[%d] - $%s", M_action, M_regularExpression, "Full Msg", M_checkIt, M_checkItInverse, display_scenario->allocVars->getName(M_varId)); } else { printf("Type[%d] - regexp[%s] where[%s-%s] - checkIt[%d] - checkItInverse[%d] - $%s", M_action, M_regularExpression, "Header", M_lookingChar, M_checkIt, M_checkItInverse, display_scenario->allocVars->getName(M_varId)); } } else if (M_action == E_AT_EXECUTE_CMD) { printf("Type[%d] - command[%-32.32s]", M_action, M_message_str[0]); } else if (M_action == E_AT_EXEC_INTCMD) { printf("Type[%d] - intcmd[%-32.32s]", M_action, strIntCmd(M_IntCmd)); } else if (M_action == E_AT_LOG_TO_FILE) { printf("Type[%d] - message[%-32.32s]", M_action, M_message_str[0]); } else if (M_action == E_AT_LOG_WARNING) { printf("Type[%d] - warning[%-32.32s]", M_action, M_message_str[0]); } else if (M_action == E_AT_LOG_ERROR) { printf("Type[%d] - error[%-32.32s]", M_action, M_message_str[0]); } else if (M_action == E_AT_ASSIGN_FROM_SAMPLE) { char tmp[40]; M_distribution->textDescr(tmp, sizeof(tmp)); printf("Type[%d] - sample varId[%s] %s", M_action, display_scenario->allocVars->getName(M_varId), tmp); } else if (M_action == E_AT_ASSIGN_FROM_VALUE) { printf("Type[%d] - assign varId[%s] %lf", M_action, display_scenario->allocVars->getName(M_varId), M_doubleValue); } else if (M_action == E_AT_ASSIGN_FROM_INDEX) { printf("Type[%d] - assign index[%s]", M_action, display_scenario->allocVars->getName(M_varId)); } else if (M_action == E_AT_ASSIGN_FROM_GETTIMEOFDAY) { printf("Type[%d] - assign gettimeofday[%s, %s]", M_action, display_scenario->allocVars->getName(M_varId), display_scenario->allocVars->getName(M_subVarId[0])); } else if (M_action == E_AT_ASSIGN_FROM_STRING) { printf("Type[%d] - string assign varId[%s] [%-32.32s]", M_action, display_scenario->allocVars->getName(M_varId), M_message_str[0]); } else if (M_action == E_AT_JUMP) { printf("Type[%d] - jump varInId[%s] %lf", M_action, display_scenario->allocVars->getName(M_varInId), M_doubleValue); } else if (M_action == E_AT_PAUSE_RESTORE) { printf("Type[%d] - restore pause varInId[%s] %lf", M_action, display_scenario->allocVars->getName(M_varInId), M_doubleValue); } else if (M_action == E_AT_VAR_ADD) { printf("Type[%d] - add varId[%s] %lf", M_action, display_scenario->allocVars->getName(M_varId), M_doubleValue); } else if (M_action == E_AT_VAR_MULTIPLY) { printf("Type[%d] - multiply varId[%s] %lf", M_action, display_scenario->allocVars->getName(M_varId), M_doubleValue); } else if (M_action == E_AT_VAR_DIVIDE) { printf("Type[%d] - divide varId[%s] %lf", M_action, display_scenario->allocVars->getName(M_varId), M_doubleValue); } else if (M_action == E_AT_VAR_TRIM) { printf("Type[%d] - trim varId[%s]", M_action, display_scenario->allocVars->getName(M_varId)); } else if (M_action == E_AT_VAR_TEST) { printf("Type[%d] - divide varId[%s] varInId[%s] %s %lf", M_action, display_scenario->allocVars->getName(M_varId), display_scenario->allocVars->getName(M_varInId), comparatorToString(M_comp), M_doubleValue); } else if (M_action == E_AT_VAR_TO_DOUBLE) { printf("Type[%d] - toDouble varId[%s]", M_action, display_scenario->allocVars->getName(M_varId)); #ifdef PCAPPLAY } else if ((M_action == E_AT_PLAY_PCAP_AUDIO) || (M_action == E_AT_PLAY_PCAP_IMAGE) || (M_action == E_AT_PLAY_PCAP_VIDEO)) { printf("Type[%d] - file[%s]", M_action, M_pcapArgs->file); } else if (M_action == E_AT_PLAY_DTMF) { printf("Type[%d] - play DTMF digits [%s]", M_action, M_message_str[0]); #endif #ifdef RTP_STREAM } else if (M_action == E_AT_RTP_STREAM_PLAY) { printf("Type[%d] - rtp_stream playfile file %s loop=%d payload %d bytes per packet=%d ms per packet=%d ticks per packet=%d", M_action, M_rtpstream_actinfo.filename, M_rtpstream_actinfo.loop_count, M_rtpstream_actinfo.payload_type, M_rtpstream_actinfo.bytes_per_packet, M_rtpstream_actinfo.ms_per_packet, M_rtpstream_actinfo.ticks_per_packet); } else if (M_action == E_AT_RTP_STREAM_PAUSE) { printf("Type[%d] - rtp_stream pause", M_action); } else if (M_action == E_AT_RTP_STREAM_RESUME) { printf("Type[%d] - rtp_stream resume", M_action); #endif } else { printf("Type[%d] - unknown action type ... ", M_action); } } CAction::T_ActionType CAction::getActionType() { return(M_action); } CAction::T_LookingPlace CAction::getLookingPlace() { return(M_lookingPlace); } CAction::T_IntCmdType CAction::getIntCmd () { return(M_IntCmd); } CAction::T_Comparator CAction::getComparator () { return(M_comp); } bool CAction::getCheckIt() { return(M_checkIt); } bool CAction::getCheckItInverse() { return(M_checkItInverse); } bool CAction::getCaseIndep() { return(M_caseIndep); } bool CAction::getHeadersOnly() { return(M_headersOnly); } int CAction::getOccurrence() { return(M_occurrence); } int CAction::getVarId() { return(M_varId); } int CAction::getVarInId() { return(M_varInId); } int CAction::getVarIn2Id() { return(M_varIn2Id); } char* CAction::getLookingChar() { return(M_lookingChar); } SendingMessage *CAction::getMessage(int n) { return(M_message[n]); } CSample* CAction::getDistribution() { return(M_distribution); } double CAction::getDoubleValue() { return(M_doubleValue); } char* CAction::getStringValue() { return(M_stringValue); } #ifdef PCAPPLAY pcap_pkts * CAction::getPcapPkts() { return(M_pcapArgs); } #endif #ifdef RTP_STREAM rtpstream_actinfo_t *CAction::getRTPStreamActInfo() { return (&M_rtpstream_actinfo); } #endif void CAction::setActionType (CAction::T_ActionType P_value) { M_action = P_value; } void CAction::setLookingPlace (CAction::T_LookingPlace P_value) { M_lookingPlace = P_value; } void CAction::setCheckIt (bool P_value) { M_checkIt = P_value; } void CAction::setCheckItInverse (bool P_value) { M_checkItInverse = P_value; } void CAction::setVarId (int P_value) { M_varId = P_value; } void CAction::setVarInId (int P_value) { M_varInId = P_value; } void CAction::setVarIn2Id (int P_value) { M_varIn2Id = P_value; } void CAction::setCaseIndep (bool P_value) { M_caseIndep = P_value; } void CAction::setOccurrence (int P_value) { M_occurrence = P_value; } void CAction::setHeadersOnly (bool P_value) { M_headersOnly = P_value; } void CAction::setIntCmd (T_IntCmdType P_type) { M_IntCmd = P_type; } void CAction::setComparator (T_Comparator P_value) { M_comp = P_value; } /* sample specific function. */ void CAction::setDistribution (CSample *P_value) { M_distribution = P_value; } /* assign from value specific function. */ void CAction::setDoubleValue (double P_value) { M_doubleValue = P_value; } /* strcmp specific function. */ void CAction::setStringValue (char *P_value) { M_stringValue = P_value; } void CAction::setSubVarId (int P_value) { if ( M_nbSubVarId < M_maxNbSubVarId ) { M_subVarId[M_nbSubVarId] = P_value; M_nbSubVarId++; } } int CAction::getSubVarId(int P_index) { return(M_subVarId[P_index]); } int* CAction::getSubVarId() { return(M_subVarId); } void CAction::setNbSubVarId (int P_value) { M_maxNbSubVarId = P_value; if(M_subVarId != NULL) { delete [] M_subVarId; M_subVarId = NULL; } M_subVarId = new int[M_maxNbSubVarId] ; M_nbSubVarId = 0 ; } int CAction::getNbSubVarId () { return(M_nbSubVarId); } void CAction::setLookingChar(const char* P_value) { if(M_lookingChar != NULL) { delete [] M_lookingChar; M_lookingChar = NULL; } if(P_value != NULL) { M_lookingChar = new char[strlen(P_value)+1]; strcpy(M_lookingChar, P_value); } } void CAction::setMessage(const char* P_value, int n) { if(M_message[n] != NULL) { delete M_message[n]; M_message[n] = NULL; } free(M_message_str[n]); M_message_str[n] = NULL; if(P_value != NULL) { M_message_str[n] = strdup(P_value); M_message[n] = new SendingMessage(M_scenario, P_value, true /* skip sanity */); } } void CAction::setRegExp(const char *P_value) { int errorCode; free(M_regularExpression); M_regularExpression = strdup(P_value); M_regExpSet = true; errorCode = regcomp(&M_internalRegExp, P_value, REGCOMP_PARAMS); if(errorCode != 0) { char buffer[MAX_HEADER_LEN]; regerror(errorCode, &M_internalRegExp, buffer, sizeof(buffer)); ERROR("recomp error : regular expression '%s' - error '%s'", M_regularExpression, buffer); } } char *CAction::getRegularExpression() { if (!M_regExpSet) { ERROR("Trying to get a regular expression for an action that does not have one!"); } return M_regularExpression; } int CAction::executeRegExp(const char* P_string, VariableTable *P_callVarTable) { regmatch_t pmatch[10]; int error; int nbOfMatch = 0; char* result = NULL ; if (!M_regExpSet) { ERROR("Trying to perform regular expression match on action that does not have one!"); } if (getNbSubVarId() > 9) { ERROR("You can only have nine sub expressions!"); } memset((void*)pmatch, 0, sizeof(regmatch_t)*10); error = regexec(&M_internalRegExp, P_string, 10, pmatch, REGEXEC_PARAMS); if ( error == 0) { CCallVariable* L_callVar = P_callVarTable->getVar(getVarId()); for(int i = 0; i <= getNbSubVarId(); i++) { if(pmatch[i].rm_eo != -1) { setSubString(&result, P_string, pmatch[i].rm_so, pmatch[i].rm_eo); L_callVar->setMatchingValue(result); nbOfMatch++; } if (i == getNbSubVarId()) break ; L_callVar = P_callVarTable->getVar(getSubVarId(i)); } } return(nbOfMatch); } void CAction::setSubString(char** P_target, const char* P_source, int P_start, int P_stop) { int sizeOf; if(P_source != NULL) { sizeOf = P_stop - P_start; (*P_target) = new char[sizeOf + 1]; if (sizeOf > 0) { memcpy((*P_target), &(P_source[P_start]), sizeOf); } (*P_target)[sizeOf] = '\0'; } else { *P_target = NULL ; } } #ifdef PCAPPLAY void CAction::setPcapArgs (pcap_pkts * P_value) { if(M_pcapArgs != NULL) { free(M_pcapArgs); M_pcapArgs = NULL; } if(P_value != NULL) { M_pcapArgs = (pcap_pkts *)malloc(sizeof(*M_pcapArgs)); memcpy(M_pcapArgs, P_value, sizeof(*M_pcapArgs)); } } void CAction::setPcapArgs(const char* P_value) { if(M_pcapArgs != NULL) { free(M_pcapArgs); M_pcapArgs = NULL; } if(P_value != NULL) { M_pcapArgs = (pcap_pkts *) malloc(sizeof(*M_pcapArgs)); if (parse_play_args(P_value, M_pcapArgs) == -1) { ERROR("Play pcap error"); } if (access(M_pcapArgs->file, F_OK)) { ERROR("Cannot read file %s", M_pcapArgs->file); } } } #endif #ifdef RTP_STREAM void CAction::setRTPStreamActInfo(const char* P_value) { char* param_str; char* next_comma; if (strlen(P_value) >= sizeof(M_rtpstream_actinfo.filename)) { ERROR("Filename %s is too long, maximum supported length %zu", P_value, sizeof(M_rtpstream_actinfo.filename) - 1); } strcpy(M_rtpstream_actinfo.filename, P_value); param_str = strchr(M_rtpstream_actinfo.filename, ','); next_comma = NULL; M_rtpstream_actinfo.loop_count = 1; if (param_str) { /* we have a loop count parameter */ *(param_str++) = 0; next_comma= strchr(param_str, ','); if (next_comma) { *(next_comma++) = 0; } M_rtpstream_actinfo.loop_count = atoi(param_str); param_str = next_comma; } M_rtpstream_actinfo.payload_type= rtp_default_payload; if (param_str) { /* we have a payload type parameter */ next_comma= strchr (param_str,','); if (next_comma) { *(next_comma++)= 0; } M_rtpstream_actinfo.payload_type= atoi(param_str); } /* Setup based on what we know of payload types */ switch (M_rtpstream_actinfo.payload_type) { case 0: M_rtpstream_actinfo.ms_per_packet = 20; M_rtpstream_actinfo.bytes_per_packet = 160; M_rtpstream_actinfo.ticks_per_packet = 160; break; case 8: M_rtpstream_actinfo.ms_per_packet = 20; M_rtpstream_actinfo.bytes_per_packet = 160; M_rtpstream_actinfo.ticks_per_packet = 160; break; case 9: M_rtpstream_actinfo.ms_per_packet = 20; M_rtpstream_actinfo.bytes_per_packet = 160; M_rtpstream_actinfo.ticks_per_packet = 160; break; case 18: M_rtpstream_actinfo.ms_per_packet = 20; M_rtpstream_actinfo.bytes_per_packet = 20; M_rtpstream_actinfo.ticks_per_packet = 160; break; case 98: M_rtpstream_actinfo.ms_per_packet = 30; M_rtpstream_actinfo.bytes_per_packet = 50; M_rtpstream_actinfo.ticks_per_packet = 240; break; default: M_rtpstream_actinfo.ms_per_packet= -1; M_rtpstream_actinfo.bytes_per_packet= -1; M_rtpstream_actinfo.ticks_per_packet= -1; ERROR("Unknown rtp payload type %d - cannot set playback parameters", M_rtpstream_actinfo.payload_type); break; } if (rtpstream_cache_file(M_rtpstream_actinfo.filename) < 0) { ERROR("Cannot read/cache rtpstream file %s", M_rtpstream_actinfo.filename); } } void CAction::setRTPStreamActInfo(rtpstream_actinfo_t *P_value) { /* At this stage the entire rtpstream action info structure can simply be */ /* copied. No members need to be individually duplicated/processed. */ memcpy(&M_rtpstream_actinfo,P_value, sizeof(M_rtpstream_actinfo)); } #endif void CAction::setScenario(scenario * P_scenario) { M_scenario = P_scenario; } void CAction::setAction(CAction P_action) { if (P_action.getActionType() == CAction::E_AT_ASSIGN_FROM_SAMPLE) { assert(P_action.getDistribution() != NULL); } int L_i; setActionType ( P_action.getActionType() ); setLookingPlace ( P_action.getLookingPlace() ); setVarId ( P_action.getVarId() ); setVarInId ( P_action.getVarInId() ); setDoubleValue ( P_action.getDoubleValue() ); setDistribution ( P_action.getDistribution() ); setScenario ( P_action.M_scenario ); setNbSubVarId ( P_action.getNbSubVarId() ); for (L_i = 0; L_i < P_action.getNbSubVarId() ; L_i++ ) { setSubVarId (P_action.getSubVarId(L_i)); } setLookingChar ( P_action.getLookingChar() ); setCheckIt ( P_action.getCheckIt() ); setCheckItInverse ( P_action.getCheckItInverse() ); setCaseIndep ( P_action.getCaseIndep() ); setOccurrence ( P_action.getOccurrence() ); setHeadersOnly ( P_action.getHeadersOnly() ); for (L_i = 0; L_i < MAX_ACTION_MESSAGE; L_i++) { setMessage(P_action.M_message_str[L_i], L_i); } setRegExp ( P_action.M_regularExpression); setIntCmd ( P_action.M_IntCmd ); #ifdef PCAPPLAY setPcapArgs ( P_action.M_pcapArgs ); #endif #ifdef RTP_STREAM setRTPStreamActInfo(&(P_action.M_rtpstream_actinfo)); #endif } CAction::CAction(scenario *scenario) { M_action = E_AT_NO_ACTION; M_varId = 0; M_varInId = 0; M_varIn2Id = 0; M_nbSubVarId = 0; M_maxNbSubVarId = 0; M_subVarId = NULL; M_checkIt = false; M_checkItInverse = false; M_lookingPlace = E_LP_MSG; M_lookingChar = NULL; M_caseIndep = false; M_occurrence = 1; M_headersOnly = true; for (int i = 0; i < MAX_ACTION_MESSAGE; i++) { M_message[i] = NULL; M_message_str[i] = NULL; } M_IntCmd = E_INTCMD_INVALID; M_doubleValue = 0; M_stringValue = NULL; M_distribution = NULL; #ifdef PCAPPLAY M_pcapArgs = NULL; #endif #ifdef RTP_STREAM memset(&M_rtpstream_actinfo, 0, sizeof(M_rtpstream_actinfo)); #endif M_scenario = scenario; M_regExpSet = false; M_regularExpression = NULL; } CAction::~CAction() { if(M_lookingChar != NULL) { delete [] M_lookingChar; M_lookingChar = NULL; } for (int i = 0; i < MAX_ACTION_MESSAGE; i++) { if(M_message[i] != NULL) { delete M_message[i]; M_message[i] = NULL; } free(M_message_str[i]); M_message_str[i] = NULL; } if(M_subVarId != NULL) { delete [] M_subVarId; M_subVarId = NULL; } free(M_stringValue); #ifdef PCAPPLAY if (M_pcapArgs != NULL) { free_pcaps(M_pcapArgs); M_pcapArgs = NULL; } #endif if (M_regExpSet) { regfree(&M_internalRegExp); free(M_regularExpression); } if (M_distribution) { delete M_distribution; } } /****************************** CActions class ************************/ void CActions::afficheInfo() { printf("Action Size = [%d]\n", M_nbAction); for(int i=0; iafficheInfo(); } } void CActions::reset() { for (int i = 0; i < M_nbAction; i++) { delete M_actionList[i]; M_actionList[i] = NULL; } M_nbAction = 0; } int CActions::getActionSize() { return(M_nbAction); } void CActions::setAction(CAction *P_action) { CAction **newActions = new CAction*[M_nbAction + 1]; if (!newActions) { ERROR("Could not allocate new action list."); } for (int i = 0; i < M_nbAction; i++) { newActions[i] = M_actionList[i]; } if (M_actionList) { delete [] M_actionList; } M_actionList = newActions; M_actionList[M_nbAction] = P_action; M_nbAction++; } CAction* CActions::getAction(int i) { if(i < M_nbAction) { return(M_actionList[i]); } else return(NULL); } CActions::CActions() { M_nbAction = 0; M_actionList = NULL; } CActions::~CActions() { for (int i = 0; i < M_nbAction; i++) { delete M_actionList[i]; } delete [] M_actionList; M_actionList = NULL; } #ifdef GTEST #include "gtest/gtest.h" TEST(actions, MatchingRegexp) { AllocVariableTable vt(NULL); int id = vt.find("1", true); int sub1_id = vt.find("2", true); int sub2_id = vt.find("3", true); int sub3_id = vt.find("4", true); int sub4_id = vt.find("5", true); CAction re(NULL); re.setVarId(id); re.setNbSubVarId(4); re.setSubVarId(sub1_id); re.setSubVarId(sub2_id); re.setSubVarId(sub3_id); re.setSubVarId(sub4_id); re.setRegExp("(.+)(o) (.+)(d)"); int results = re.executeRegExp("hello world", &vt); ASSERT_EQ(5, results); ASSERT_STREQ("hello world", vt.getVar(id)->getString()); ASSERT_STREQ("hell", vt.getVar(sub1_id)->getString()); ASSERT_STREQ("o", vt.getVar(sub2_id)->getString()); ASSERT_STREQ("worl", vt.getVar(sub3_id)->getString()); ASSERT_STREQ("d", vt.getVar(sub4_id)->getString()); } TEST(actions, NonMatchingRegexp) { AllocVariableTable vt(NULL); int id = vt.find("1", true); int sub1_id = vt.find("2", true); int sub2_id = vt.find("3", true); int sub3_id = vt.find("4", true); int sub4_id = vt.find("5", true); CAction re(NULL); re.setVarId(id); re.setNbSubVarId(4); re.setSubVarId(sub1_id); re.setSubVarId(sub2_id); re.setSubVarId(sub3_id); re.setSubVarId(sub4_id); re.setRegExp("(.+)(o) (.+)(d)"); int results = re.executeRegExp("", &vt); ASSERT_EQ(0, results); ASSERT_STREQ("", vt.getVar(id)->getString()); ASSERT_STREQ("", vt.getVar(sub1_id)->getString()); } #endif sipp-3.6.0/src/send_packets.c0000644000175000017500000002501613475544015015463 0ustar walterwalter/* * send_packets.c: from tcpreplay tools by Aaron Turner * http://tcpreplay.sourceforge.net/ * send_packets.c is under BSD license (see below) * SIPp is under GPL license * * * Copyright (c) 2001-2004 Aaron Turner. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the names of the copyright owners nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include #include #include #include #include #include #include #include #include #include "defines.h" #include "send_packets.h" #include "prepare_pcap.h" extern char* scenario_path; extern volatile unsigned long rtp_pckts_pcap; extern volatile unsigned long rtp_bytes_pcap; extern bool media_ip_is_ipv6; inline void timerdiv(struct timeval* tvp, float div) { double interval; if (div == 0 || div == 1) return; interval = ((double) tvp->tv_sec * 1000000 + tvp->tv_usec) / (double) div; tvp->tv_sec = interval / (int) 1000000; tvp->tv_usec = interval - (tvp->tv_sec * 1000000); } /* * converts a float to a timeval structure */ inline void float2timer(float time, struct timeval *tvp) { float n; n = time; tvp->tv_sec = n; n -= tvp->tv_sec; tvp->tv_usec = n * 100000; } static char* find_file(const char* filename) { char *fullpath; if (filename[0] == '/' || !*scenario_path) { return strdup(filename); } fullpath = malloc(MAX_PATH); snprintf(fullpath, MAX_PATH, "%s%s", scenario_path, filename); if (access(fullpath, R_OK) < 0) { free(fullpath); WARNING("SIPp now prefers looking for pcap files next to the scenario. " "%s couldn't be found next to the scenario, falling back to " "using the current working directory", filename); return strdup(filename); } return fullpath; } int parse_play_args(const char* filename, pcap_pkts* pkts) { pkts->file = find_file(filename); prepare_pkts(pkts->file, pkts); return 1; } void free_pcaps(pcap_pkts* pkts) { pcap_pkt *it; for (it = pkts->pkts; it != pkts->max; ++it) { free(it->data); } free(pkts->pkts); free(pkts->file); free(pkts); } int parse_dtmf_play_args(const char* buffer, pcap_pkts* pkts, uint16_t start_seq_no) { pkts->file = strdup(buffer); return prepare_dtmf(pkts->file, pkts, start_seq_no); } void hexdump(char *p, int s) { int i; for (i = 0; i < s; i++) { fprintf(stderr, "%02x ", *(char *)(p+i)); } fprintf(stderr, "\n"); } /* Safe threaded version */ void do_sleep (struct timeval *, struct timeval *, struct timeval *, struct timeval *); void send_packets_cleanup(void *arg) { int * sock = (int *) arg; /* Close send socket */ close(*sock); } void send_packets_pcap_cleanup(void* arg) { play_args_t* play_args = arg; if (play_args->free_pcap_when_done) { free(play_args->pcap); play_args->pcap = NULL; } } void send_packets(play_args_t* play_args) { pthread_cleanup_push(send_packets_pcap_cleanup, ((void*)play_args)); int ret = 0, sock, port_diff; pcap_pkt *pkt_index, *pkt_max; uint16_t *from_port, *to_port; struct timeval didsleep = { 0, 0 }; struct timeval start = { 0, 0 }; struct timeval last = { 0, 0 }; pcap_pkts *pkts = play_args->pcap; /* to and from are pointers in case play_args (call sticky) gets modified! */ struct sockaddr_storage *to = &(play_args->to); struct sockaddr_storage *from = &(play_args->from); struct udphdr *udp; struct sockaddr_in6 to6, from6; char buffer[PCAP_MAXPACKET]; int temp_sum; socklen_t len; #ifndef MSG_DONTWAIT int fd_flags; #endif if (media_ip_is_ipv6) { sock = socket(PF_INET6, SOCK_RAW, IPPROTO_UDP); if (sock < 0) { ERROR("Can't create raw IPv6 socket (need to run as root?): %s", strerror(errno)); goto pop2; } from_port = &(((struct sockaddr_in6 *)from)->sin6_port); len = sizeof(struct sockaddr_in6); to_port = &(((struct sockaddr_in6 *)to)->sin6_port); } else { sock = socket(PF_INET, SOCK_RAW, IPPROTO_UDP); from_port = &(((struct sockaddr_in *)from)->sin_port); len = sizeof(struct sockaddr_in); to_port = &(((struct sockaddr_in *)to)->sin_port); if (sock < 0) { ERROR("Can't create raw IPv4 socket (need to run as root?): %s", strerror(errno)); goto pop2; } } if ((ret = bind(sock, (struct sockaddr *)from, len))) { ERROR("Can't bind media raw socket"); goto pop2; } #ifndef MSG_DONTWAIT fd_flags = fcntl(sock, F_GETFL , NULL); fd_flags |= O_NONBLOCK; fcntl(sock, F_SETFL , fd_flags); #endif udp = (struct udphdr *)buffer; pkt_index = pkts->pkts; pkt_max = pkts->max; if (media_ip_is_ipv6) { memset(&to6, 0, sizeof(to6)); memset(&from6, 0, sizeof(from6)); to6.sin6_family = AF_INET6; from6.sin6_family = AF_INET6; memcpy(&(to6.sin6_addr.s6_addr), &(((struct sockaddr_in6 *)(void *) to)->sin6_addr.s6_addr), sizeof(to6.sin6_addr.s6_addr)); memcpy(&(from6.sin6_addr.s6_addr), &(((struct sockaddr_in6 *)(void *) from)->sin6_addr.s6_addr), sizeof(from6.sin6_addr.s6_addr)); } /* Ensure the sender socket is closed when the thread exits - this * allows the thread to be cancelled cleanly. */ pthread_cleanup_push(send_packets_cleanup, ((void *) &sock)); while (pkt_index < pkt_max) { memcpy(udp, pkt_index->data, pkt_index->pktlen); port_diff = ntohs(udp->uh_dport) - pkts->base; /* modify UDP ports */ udp->uh_sport = htons(port_diff + ntohs(*from_port)); udp->uh_dport = htons(port_diff + ntohs(*to_port)); if (!media_ip_is_ipv6) { temp_sum = checksum_carry( pkt_index->partial_check + check((uint16_t *) &(((struct sockaddr_in *)(void *) from)->sin_addr.s_addr), 4) + check((uint16_t *) &(((struct sockaddr_in *)(void *) to)->sin_addr.s_addr), 4) + check((uint16_t *) &udp->uh_sport, 4)); } else { temp_sum = checksum_carry( pkt_index->partial_check + check((uint16_t *) &(from6.sin6_addr.s6_addr), 16) + check((uint16_t *) &(to6.sin6_addr.s6_addr), 16) + check((uint16_t *) &udp->uh_sport, 4)); } #if !defined(_HPUX_LI) && defined(__HPUX) udp->uh_sum = (temp_sum>>16)+((temp_sum & 0xffff)<<16); #else udp->uh_sum = temp_sum; #endif do_sleep ((struct timeval *) &pkt_index->ts, &last, &didsleep, &start); #ifdef MSG_DONTWAIT if (!media_ip_is_ipv6) { ret = sendto(sock, buffer, pkt_index->pktlen, MSG_DONTWAIT, (struct sockaddr *)to, sizeof(struct sockaddr_in)); } else { ret = sendto(sock, buffer, pkt_index->pktlen, MSG_DONTWAIT, (struct sockaddr *)&to6, sizeof(struct sockaddr_in6)); } #else if (!media_ip_is_ipv6) { ret = sendto(sock, buffer, pkt_index->pktlen, 0, (struct sockaddr *)to, sizeof(struct sockaddr_in)); } else { ret = sendto(sock, buffer, pkt_index->pktlen, 0, (struct sockaddr *)&to6, sizeof(struct sockaddr_in6)); } #endif if (ret < 0) { WARNING("send_packets.c: sendto failed with error: %s", strerror(errno)); goto pop1; } rtp_pckts_pcap++; rtp_bytes_pcap += pkt_index->pktlen - sizeof(*udp); memcpy (&last, &(pkt_index->ts), sizeof(struct timeval)); pkt_index++; } /* Closing the socket is handled by pthread_cleanup_push()/pthread_cleanup_pop() */ pop1: pthread_cleanup_pop(1); pop2: pthread_cleanup_pop(1); } /* * Given the timestamp on the current packet and the last packet sent, * calculate the appropriate amount of time to sleep and do so. */ void do_sleep(struct timeval* time, struct timeval* last, struct timeval* didsleep, struct timeval* start) { struct timeval nap, now, delta; struct timespec sleep; if (gettimeofday (&now, NULL) < 0) { fprintf (stderr, "Error gettimeofday: %s\n", strerror (errno)); } /* First time through for this file */ if (!timerisset (last)) { *start = now; timerclear (&delta); timerclear (didsleep); } else { timersub (&now, start, &delta); } if (timerisset (last) && timercmp (time, last, >)) { timersub (time, last, &nap); } else { /* * Don't sleep if this is our first packet, or if the * this packet appears to have been sent before the * last packet. */ timerclear (&nap); } timeradd (didsleep, &nap, didsleep); if (timercmp (didsleep, &delta, >)) { timersub (didsleep, &delta, &nap); sleep.tv_sec = nap.tv_sec; sleep.tv_nsec = nap.tv_usec * 1000; /* convert ms to ns */ while ((nanosleep (&sleep, &sleep) == -1) && (errno == -EINTR)); } } sipp-3.6.0/.gitmodules0000644000175000017500000000211613475544015014236 0ustar walterwalter[submodule "gtest"] # https://code.google.com/p/googletest/wiki/FAQ # > In the early days, we said that you could install compiled # > Google Test libraries on *nix systems using make install. # > Then every user of your machine can write tests without # > recompiling Google Test. # > # > This seemed like a good idea, but it has a got-cha: every # > user needs to compile his tests using the same compiler # > flags used to compile the installed Google Test libraries; # > otherwise he may run into undefined behaviors (i.e. the # > tests can behave strangely and may even crash for no obvious # > reasons). # ... # > Therefore, for your sanity, we recommend to avoid installing # > pre-compiled Google Test libraries. Instead, each project # > should compile Google Test itself such that it can be sure # > that the same flags are used for both Google Test and the # > tests. # path = gtest url = https://chromium.googlesource.com/external/googletest ignore = dirty [submodule "gmock"] path = gmock url = https://chromium.googlesource.com/external/googlemock ignore = dirty sipp-3.6.0/README.md0000644000175000017500000000615213475544015013344 0ustar walterwalter Travis Build Status Coverity Scan Build Status SIPp - a SIP protocol test tool Copyright (C) 2003-2019 - The Authors 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 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see [http://www.gnu.org/licenses/](http://www.gnu.org/licenses/). # Documentation See the `docs/` directory. Hopefully it is also available in html format at: https://sipp-wip.readthedocs.io/en/latest/ # Building This is the SIPp package. Please refer to the [webpage](http://sipp.sourceforge.net/) for details and documentation. Normally, you should be able to build SIPp by using the provided build script: `build.sh`. This: * checks out the gtest submodule * generates autotools files * runs configure * builds and runs the test suite * builds SIPp `build.sh` passes its arguments through to the configure script, so you can enable SSL, PCAP and SCTP support by calling `./build.sh --with-pcap --with-sctp --with-openssl` or `./build.sh --full` to enable all optional features. # Support I try and be responsive to issues raised on Github, and there's [a reasonably active mailing list](https://lists.sourceforge.net/lists/listinfo/sipp-users). # Making a release * Update CHANGES.md. Tag release. * Download zip, `autoreconf -vif`, copy sipp.1, copy include/version.h. * Create tgz. Upload to github as "binary". # Contributing SIPp is free software, under the terms of the GPL licence (see the LICENCE.txt file for details). You can contribute to the development of SIPp and use the standard Github fork/pull request method to integrate your changes integrate your changes. If you make changes in SIPp, *PLEASE* follow a few coding rules: - SIPp uses GNU autotools, so changes to the build process should be done by editing configure.ac and Makefile.am. Then regenerate the files with `autoreconf -ivf`. (You will need your distribution's `autotools` and `autoconf-archive` packages installed for this.) - Please stay conformant with the current indentation style (4 spaces indent, standard Emacs-like indentation). Examples: ``` if (condition) { /* "{" even if only one instruction */ f(); /* 4 space indents */ } else { char* p = ptr; /* C++-style pointer declaration placement */ g(p); } ``` - If possible, check your changes can be compiled on: - Linux, - Cygwin, - Mac OS X, - FreeBSD. Thanks, Rob Day sipp-3.6.0/.gitignore0000644000175000017500000000076713475544015014063 0ustar walterwalter*.o *~ .*.sw* .autoclean .deps/ .version Makefile Makefile.in Makefile.am aclocal.m4 autom4te.cache/ configure config.guess config.h config.log config.status config.sub compile depcomp .dirstamp install-sh missing sipp sipp.1 sipp-*.tar.gz sipp_unittest stamp-h1 test-driver *.log *.csv vim_ctags compile_commands.json .*.sw? stamp-h.in *.orig *.rej *.patch compile_commands.json # Ignore *.xml in root dir, but not in regression tests dir. /*.xml # Ignore autogenerated version.h. /include/version.h sipp-3.6.0/sipp.dtd0000644000175000017500000000376613475544015013545 0ustar walterwalter sipp-3.6.0/.travis.yml0000644000175000017500000000351413475544015014175 0ustar walterwalter# Config language: cpp sudo: false dist: trusty cache: bundler notifications: email: false # Build matrix (2x compiler, 1x confopts) compiler: - gcc - clang addons: apt: packages: - libpcap-dev - libsctp-dev - libncurses5-dev - libssl-dev - libgsl0-dev - valgrind env: - CONFOPTS="--with-gsl --with-openssl --with-pcap --with-rtpstream --with-sctp" # Extend build matrix matrix: include: - os: linux compiler: gcc env: CONFOPTS="--with-openssl --without-pcap --without-rtpstream" - os: linux compiler: gcc env: CONFOPTS="" - os: linux compiler: gcc env: CONFOPTS="--disable-epoll" - os: linux compiler: gcc addons: apt: packages: - g++-4.6 - libpcap-dev - libsctp-dev - libncurses5-dev - libssl-dev - libgsl0-dev - valgrind env: - CC=gcc-4.6 - CXX=g++-4.6 - CONFOPTS="--with-gsl --with-openssl --with-pcap --with-rtpstream --with-sctp" - os: osx compiler: clang env: CONFOPTS="--with-gsl --with-openssl --with-pcap --with-rtpstream" before_script: - autoreconf -vifs - if [ "$TRAVIS_OS_NAME" = osx ]; then brew install gsl; fi # 2016-10: Apple doesn't include openssl any more because of security # problems openssl had. Manually specify path to includes/libs. - if [ "$TRAVIS_OS_NAME" = osx ]; then brew install openssl; fi - if [ "$TRAVIS_OS_NAME" = osx ]; then CPPFLAGS="-I/usr/local/opt/openssl/include"; fi - if [ "$TRAVIS_OS_NAME" = osx ]; then LDFLAGS="-L/usr/local/opt/openssl/lib"; fi - ./configure CPPFLAGS=$CPPFLAGS LDFLAGS=$LDFLAGS $CONFOPTS script: - make -j2 - make -j2 check - if [ "$TRAVIS_OS_NAME" != osx ]; then ./regress/runtests; fi - ./validate-src.sh sipp-3.6.0/pcap/0000755000175000017500000000000013475544015013004 5ustar walterwaltersipp-3.6.0/pcap/dtmf_2833_5.pcap0000644000175000017500000000137413475544015015513 0ustar walterwalteròCx::P6 $E,@'b8N C|::P6 $E,@'e8N @C::P6 $E,@'`e8N Cb::P6 $E,@'e8N C::P6 $E,@'݀e8N C$::P6 $E,@'e8N @C$M::P6 $E,@~'[e8N C]::P6 $E,@}'e8NC͛::P6 $E,@|'e8NCٛ::P6 $E,@{'e8Nsipp-3.6.0/pcap/dtmf_2833_4.pcap0000644000175000017500000000137413475544015015512 0ustar walterwalteròC "::P6 $E,@'D8N Cp::P6 $E,@'e8N @Co::P6 $E,@'Be8N C ::P6 $E,@'e8N ClZ ::P6 $E,@'e8N C ::P6 $E,@'e8N @C[ ::P6 $E,@'>e8N CD ::P6 $E,@'}e8NCD ::P6 $E,@'}e8NCD ::P6 $E,@'}e8Nsipp-3.6.0/pcap/dtmf_2833_0.pcap0000644000175000017500000000137413475544015015506 0ustar walterwalteròCs::P6 $E,@'[/0D8N C::P6 $E,@'[,e/1D8N @C_ ::P6 $E,@'Ye/2D8N C] ::P6 $E,@'Xe/3D8N C ::P6 $E,@'Wie/4D8N C ::P6 $E,@'V(e/5D8N @CG ::P6 $E,@'Te/6D8N Cܕ ::P6 $E,@'S&e/7D8NC ::P6 $E,@'S&e/7D8NC/ ::P6 $E,@'S&e/7D8Nsipp-3.6.0/pcap/dtmf_2833_8.pcap0000644000175000017500000000137413475544015015516 0ustar walterwalteròCR::P6 $E,@'? =8N Cb::P6 $E,@'~e >8N @C!::P6 $E,@'=e ?8N Co::P6 $E,@'e @8N C::P6 $E,@'e A8N C ::P6 $E,@'ze B8N @CY ::P6 $E,@'9e C8N C ::P6 $E,@'xe D8NCZ ::P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g'K,eqZ8NCP>::P6 $E,@f'K,eqZ8NCZ>::P6 $E,@e'K,eqZ8Nsipp-3.6.0/pcap/dtmf_2833_star.pcap0000644000175000017500000000137413475544015016320 0ustar walterwalteròCV ::P6 $E,@'V/ O8N CǤ ::P6 $E,@'Une O8N @C ::P6 $E,@'T-e O8N C@ ::P6 $E,@'Re O8N C& ::P6 $E,@'Qe O8N Cb ::P6 $E,@'Pje O8N @C?+ ::P6 $E,@'O)e O8N Cy ::P6 $E,@'Mhe O8N Cz ::P6 $E,@'Mhe O8N Cz ::P6 $E,@'Mhe O8N sipp-3.6.0/pcap/dtmf_2833_1.pcap0000644000175000017500000000137413475544015015507 0ustar walterwalteròCs::P6 $E,@'{038N C::P6 $E,@'{,e138N @C_ ::P6 $E,@'ye238N C] ::P6 $E,@'xe338N C ::P6 $E,@'wie438N C ::P6 $E,@'v(e538N @CG ::P6 $E,@'te638N Cܕ ::P6 $E,@'s&e738NC ::P6 $E,@'s&e738NC/ ::P6 $E,@'s&e738Nsipp-3.6.0/pcap/dtmf_2833_7.pcap0000644000175000017500000000137413475544015015515 0ustar walterwalteròC. ::P6 $E,V@'! 8N C} ::P6 $E,W@'`e 8N @Cp ::P6 $E,X@'e 8N C ::P6 $E,Y@'ހe 8N Cg ::P6 $E,Z@'Νe 8N Cص ::P6 $E,[@'\e 8N @C ::P6 $E,\@'e !8N C|Q ::P6 $E,]@'Ze "8NCQ ::P6 $E,^@'Ze "8NCQ ::P6 $E,_@ 'Ze "8Nsipp-3.6.0/pcap/dtmf_2833_6.pcap0000644000175000017500000000137413475544015015514 0ustar walterwalteròC&::P6 $E, @c'b8N C2::P6 $E, @b'ꡀe8N @C::P6 $E, @a'`e8N C::P6 $E,@^'e8N C::P6 $E,%@G'ހe8N Ck::P6 $E,1@;'址e8N @C::P6 $E,6@6'\e 8N C'::P6 $E,7@5'⛀e 8NC}::P6 $E,8@4'⛀e 8NC::P6 $E,9@3'⛀e 8Nsipp-3.6.0/pcap/dtmf_2833_9.pcap0000644000175000017500000000137413475544015015517 0ustar walterwalteròC::P6 $E,@x' e 8N Ce::P6 $E,@w'րe f 8N @CK::P6 $E,@v'e g 8N C::P6 $E,@u'Te h 8N Cw::P6 $E,@t'e i 8N CX6::P6 $E,@s'Ҁe j 8N @C::P6 $E,@r'e k 8N C::P6 $E,@q'Ѐe l 8N C@::P6 $E,@p'Ѐe l 8N CK::P6 $E,@o'Ѐe l 8N sipp-3.6.0/pcap/dtmf_2833_pound.pcap0000644000175000017500000000137413475544015016474 0ustar walterwalteròCa3::P6 $E,@w':( i8N C::P6 $E,@v'9ge i8N @C::P6 $E,@u'8&e i8N C::P6 $E,@t'6e i8N C|k::P6 $E,@s'5e i8N C::P6 $E,@r'4ce i8N @C ::P6 $E,@q'3"e i8N C|U ::P6 $E,@p'1ae i8N CU ::P6 $E,@o'1ae i8N CU ::P6 $E,@n'1ae i8N sipp-3.6.0/pcap/dtmf_2833_3.pcap0000644000175000017500000000137413475544015015511 0ustar walterwalteròCQ ::P6 $E,V@'4&y@8N C ::P6 $E,W@'3eey@8N @Ch ::P6 $E,X@'2$ey@8N Cj ::P6 $E,Y@'0ey@8N C ::P6 $E,Z@'/ey@8N CR ::P6 $E,[@'.aey@8N @C ::P6 $E,\@'- ey@8N C? ::P6 $E,]@'+_ey@8NC ::P6 $E,^@'+_ey@8NC ::P6 $E,_@ '+_ey@8Nsipp-3.6.0/THANKS0000644000175000017500000000173413475544015013001 0ustar walterwalterThe following people have contributed code or other elements to SIPp: Richard Gayraud Marc Lamberton Olivier Jacques Herve Pellan David Mansutti Francois-Xavier Kowalski Gerard Lyonnaz Francois Draperi F. Tarek Rogers Peter Higginson Vincent Luba Shriram Natarajan Guillaume Teissier Clement Chen Wolfgang Beck Charles P Wright Martin Van Leeuwen Andy Aicken Michael Hirschbichler Rob Day Dmitry Semyonov Jordan Walbesser Ken Crowell Peter Lemenkov Menyus Hegedűs Mitko Mitev Matt Williams Richard Brady Natanael Copa Walter Doekes (OSSO B.V.) Simon Gomizelj (Sangoma) Peter Wu Ben Langfeld Richard van den Berg Mustafa Kocaturk Konstantin S. Vishnivetsky SIPp also uses code originally by Aaron Turner (send_packets.c) and L Peter Deutsch (md5.c). The following people have contributed to SIPp in other useful ways (bug reports, testing, etc.): Paul Belanger Jan Stanek Enrico Hartung Daniel Swärd Paul D Smith Ferenc Wágner Carlo R. Carrano Kayode Olajide Daniel Goepp Vijay Goje sipp-3.6.0/m4/0000755000175000017500000000000013475544015012401 5ustar walterwaltersipp-3.6.0/m4/ax_have_epoll.m40000644000175000017500000000705613475544015015461 0ustar walterwalter# =========================================================================== # http://www.gnu.org/software/autoconf-archive/ax_have_epoll.html # =========================================================================== # # SYNOPSIS # # AX_HAVE_EPOLL([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # AX_HAVE_EPOLL_PWAIT([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # DESCRIPTION # # This macro determines whether the system supports the epoll I/O event # interface. A neat usage example would be: # # AX_HAVE_EPOLL( # [AX_CONFIG_FEATURE_ENABLE(epoll)], # [AX_CONFIG_FEATURE_DISABLE(epoll)]) # AX_CONFIG_FEATURE( # [epoll], [This platform supports epoll(7)], # [HAVE_EPOLL], [This platform supports epoll(7).]) # # The epoll interface was added to the Linux kernel in version 2.5.45, and # the macro verifies that a kernel newer than this is installed. This # check is somewhat unreliable if doesn't match the # running kernel, but it is necessary regardless, because glibc comes with # stubs for the epoll_create(), epoll_wait(), etc. that allow programs to # compile and link even if the kernel is too old; the problem would then # be detected only at runtime. # # Linux kernel version 2.6.19 adds the epoll_pwait() call in addition to # epoll_wait(). The availability of that function can be tested with the # second macro. Generally speaking, it is safe to assume that # AX_HAVE_EPOLL would succeed if AX_HAVE_EPOLL_PWAIT has, but not the # other way round. # # LICENSE # # Copyright (c) 2008 Peter Simons # # Copying and distribution of this file, with or without modification, are # permitted in any medium without royalty provided the copyright notice # and this notice are preserved. This file is offered as-is, without any # warranty. #serial 10 AC_DEFUN([AX_HAVE_EPOLL], [dnl ax_have_epoll_cppflags="${CPPFLAGS}" AC_CHECK_HEADER([linux/version.h], [CPPFLAGS="${CPPFLAGS} -DHAVE_LINUX_VERSION_H"]) AC_MSG_CHECKING([for Linux epoll(7) interface]) AC_CACHE_VAL([ax_cv_have_epoll], [dnl AC_LINK_IFELSE([dnl AC_LANG_PROGRAM([dnl #include #ifdef HAVE_LINUX_VERSION_H # include # if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,45) # error linux kernel version is too old to have epoll # endif #endif ], [dnl int fd, rc; struct epoll_event ev; fd = epoll_create(128); rc = epoll_wait(fd, &ev, 1, 0);])], [ax_cv_have_epoll=yes], [ax_cv_have_epoll=no])]) CPPFLAGS="${ax_have_epoll_cppflags}" AS_IF([test "${ax_cv_have_epoll}" = "yes"], [AC_MSG_RESULT([yes]) $1],[AC_MSG_RESULT([no]) $2]) ])dnl AC_DEFUN([AX_HAVE_EPOLL_PWAIT], [dnl ax_have_epoll_cppflags="${CPPFLAGS}" AC_CHECK_HEADER([linux/version.h], [CPPFLAGS="${CPPFLAGS} -DHAVE_LINUX_VERSION_H"]) AC_MSG_CHECKING([for Linux epoll(7) interface with signals extension]) AC_CACHE_VAL([ax_cv_have_epoll_pwait], [dnl AC_LINK_IFELSE([dnl AC_LANG_PROGRAM([dnl #ifdef HAVE_LINUX_VERSION_H # include # if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19) # error linux kernel version is too old to have epoll_pwait # endif #endif #include #include ], [dnl int fd, rc; struct epoll_event ev; fd = epoll_create(128); rc = epoll_wait(fd, &ev, 1, 0); rc = epoll_pwait(fd, &ev, 1, 0, (sigset_t const *)(0));])], [ax_cv_have_epoll_pwait=yes], [ax_cv_have_epoll_pwait=no])]) CPPFLAGS="${ax_have_epoll_cppflags}" AS_IF([test "${ax_cv_have_epoll_pwait}" = "yes"], [AC_MSG_RESULT([yes]) $1],[AC_MSG_RESULT([no]) $2]) ])dnl sipp-3.6.0/m4/ax_cxx_compile_stdcxx_11.m40000644000175000017500000000320413475544015017542 0ustar walterwalter# ============================================================================ # http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html # ============================================================================ # # SYNOPSIS # # AX_CXX_COMPILE_STDCXX_11([ext|noext], [mandatory|optional]) # # DESCRIPTION # # Check for baseline language coverage in the compiler for the C++11 # standard; if necessary, add switches to CXX and CXXCPP to enable # support. # # This macro is a convenience alias for calling the AX_CXX_COMPILE_STDCXX # macro with the version set to C++11. The two optional arguments are # forwarded literally as the second and third argument respectively. # Please see the documentation for the AX_CXX_COMPILE_STDCXX macro for # more information. If you want to use this macro, you also need to # download the ax_cxx_compile_stdcxx.m4 file. # # LICENSE # # Copyright (c) 2008 Benjamin Kosnik # Copyright (c) 2012 Zack Weinberg # Copyright (c) 2013 Roy Stogner # Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov # Copyright (c) 2015 Paul Norman # Copyright (c) 2015 Moritz Klammler # # Copying and distribution of this file, with or without modification, are # permitted in any medium without royalty provided the copyright notice # and this notice are preserved. This file is offered as-is, without any # warranty. #serial 16 #include([ax_cxx_compile_stdcxx.m4]) AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [AX_CXX_COMPILE_STDCXX([11], [$1], [$2])]) sipp-3.6.0/m4/ax_check_compile_flag.m40000644000175000017500000000640213475544015017113 0ustar walterwalter# =========================================================================== # http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html # =========================================================================== # # SYNOPSIS # # AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT]) # # DESCRIPTION # # Check whether the given FLAG works with the current language's compiler # or gives an error. (Warnings, however, are ignored) # # ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on # success/failure. # # If EXTRA-FLAGS is defined, it is added to the current language's default # flags (e.g. CFLAGS) when the check is done. The check is thus made with # the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to # force the compiler to issue an error when a bad flag is given. # # INPUT gives an alternative input source to AC_COMPILE_IFELSE. # # NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this # macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG. # # LICENSE # # Copyright (c) 2008 Guido U. Draheim # Copyright (c) 2011 Maarten Bosmans # # 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 3 of the License, or (at your # option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General # Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see . # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure # scripts that are the output of Autoconf when processing the Macro. You # need not follow the terms of the GNU General Public License when using # or distributing such scripts, even though portions of the text of the # Macro appear in them. The GNU General Public License (GPL) does govern # all other use of the material that constitutes the Autoconf Macro. # # This special exception to the GPL applies to versions of the Autoconf # Macro released by the Autoconf Archive. When you make and distribute a # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. #serial 4 AC_DEFUN([AX_CHECK_COMPILE_FLAG], [AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [ ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1" AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])], [AS_VAR_SET(CACHEVAR,[yes])], [AS_VAR_SET(CACHEVAR,[no])]) _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags]) AS_VAR_IF(CACHEVAR,yes, [m4_default([$2], :)], [m4_default([$3], :)]) AS_VAR_POPDEF([CACHEVAR])dnl ])dnl AX_CHECK_COMPILE_FLAGS sipp-3.6.0/m4/ax_config_feature.m40000644000175000017500000001237213475544015016320 0ustar walterwalter# =========================================================================== # http://www.gnu.org/software/autoconf-archive/ax_config_feature.html # =========================================================================== # # SYNOPSIS # # AX_CONFIG_FEATURE(FEATURE-NAME, FEATURE-DESCRIPTION, DEFINE, DEFINE-DESCRIPTION, [ACTION-IF-ENABLED [, ACTION-IF-NOT-ENABLED]]) # # DESCRIPTION # # AX_CONFIG_FEATURE is a simple wrapper for AC_ARG_ENABLE, it enables the # feature FEATURE-NAME and AC_DEFINEs the passed DEFINE, depending on the # user choice. DESCRIPTION will be used for AC_DEFINEs. ACTION-IF-ENABLED # and ACTION-IF-NOT-ENABLED are the actions that will be run. A feature is # enabled by default, in order to change this behaviour use the # AX_CONFIG_FEATURE_DEFAULT_ENABLED and AX_CONFIG_FEATURE_DEFAULT_DISABLED # macros. # # A simple example: # # AX_CONFIG_FEATURE_DEFAULT_ENABLED # AX_CONFIG_FEATURE(feature_xxxxx, [turns on/off XXXXX support], # HAVE_XXXXX, [Define if you want XXXXX support]) # # ... # # AX_CONFIG_FEATURE_DEFAULT_DISABLED # AX_CONFIG_FEATURE(feature_yyyyy, [turns on/off YYYYY support], # HAVE_YYYYY, [Define if you want YYYYY support], # [enable_yyyyy="yes"], [enable_yyyyy="no"]) # AM_CONDITIONAL(YYYYY, [test "$enable_yyyyy" = "yes"]) # # AX_CONFIG_FEATURE_DEFAULT_ENABLED # AX_CONFIG_FEATURE(...) # # ... # # If you have lot of features and you want a verbose dumping of each user # selection use AX_CONFIG_FEATURE_VERBOSE. Use AX_CONFIG_FEATURE_SILENT in # order to remove a previously AX_CONFIG_FEATURE_VERBOSE. By default # features are silent. # # Use AX_CONFIG_FEATURE_ENABLE or AX_CONFIG_FEATURE_DISABLE in order to # enable or disable a specific feature. # # Another simple example: # # AS_IF([some_test_here],[AX_CONFIG_FEATURE_ENABLE(feature_xxxxx)],[]) # # AX_CONFIG_FEATURE(feature_xxxxx, [turns on/off XXXXX support], # HAVE_XXXXX, [Define if you want XXXXX support]) # AX_CONFIG_FEATURE(feature_yyyyy, [turns on/off YYYYY support], # HAVE_YYYYY, [Define if you want YYYYY support], # [enable_yyyyy="yes"], [enable_yyyyy="no"]) # # ... # # NOTE: AX_CONFIG_FEATURE_ENABLE() must be placed first of the relative # AX_CONFIG_FEATURE() macro ... # # LICENSE # # Copyright (c) 2008 Francesco Salvestrini # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation; either version 2 of the License, or (at your # option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General # Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see . # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure # scripts that are the output of Autoconf when processing the Macro. You # need not follow the terms of the GNU General Public License when using # or distributing such scripts, even though portions of the text of the # Macro appear in them. The GNU General Public License (GPL) does govern # all other use of the material that constitutes the Autoconf Macro. # # This special exception to the GPL applies to versions of the Autoconf # Macro released by the Autoconf Archive. When you make and distribute a # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. #serial 10 AC_DEFUN([AX_CONFIG_FEATURE],[ dnl m4_pushdef([FEATURE], patsubst([$1], -, _))dnl AC_ARG_ENABLE([$1],AS_HELP_STRING([--enable-$1],[$2]),[ case "${enableval}" in yes) ax_config_feature_[]FEATURE[]="yes" ;; no) ax_config_feature_[]FEATURE[]="no" ;; *) AC_MSG_ERROR([bad value ${enableval} for feature --$1]) ;; esac ]) AS_IF([test "$ax_config_feature_[]FEATURE[]" = yes],[ dnl AC_DEFINE([$3]) $5 AS_IF([test "$ax_config_feature_verbose" = yes],[ dnl AC_MSG_NOTICE([Feature $1 is enabled]) ]) ],[ dnl $6 AS_IF([test "$ax_config_feature_verbose" = yes],[ dnl AC_MSG_NOTICE([Feature $1 is disabled]) ]) ]) AH_TEMPLATE([$3],[$4]) m4_popdef([FEATURE])dnl ]) dnl Feature global AC_DEFUN([AX_CONFIG_FEATURE_VERBOSE],[ dnl ax_config_feature_verbose=yes ]) dnl Feature global AC_DEFUN([AX_CONFIG_FEATURE_SILENT],[ dnl ax_config_feature_verbose=no ]) dnl Feature specific AC_DEFUN([AX_CONFIG_FEATURE_DEFAULT_ENABLED], [ ax_config_feature_[]FEATURE[]_default=yes ]) dnl Feature specific AC_DEFUN([AX_CONFIG_FEATURE_DEFAULT_DISABLED], [ ax_config_feature_[]FEATURE[]_default=no ]) dnl Feature specific AC_DEFUN([AX_CONFIG_FEATURE_ENABLE],[ dnl ax_config_feature_[]patsubst([$1], -, _)[]=yes ]) dnl Feature specific AC_DEFUN([AX_CONFIG_FEATURE_DISABLE],[ dnl ax_config_feature_[]patsubst([$1], -, _)[]=no ]) sipp-3.6.0/m4/am_git_version.m40000644000175000017500000000011413475544015015644 0ustar walterwalterAC_SUBST_FILE([AM_GIT_VERSION]) AM_GIT_VERSION=$srcdir/m4/am_git_version.mh sipp-3.6.0/m4/am_git_version.mh0000644000175000017500000000137413475544015015741 0ustar walterwalterfile_version := $(shell sed -e \ '/^\#define SIPP_VERSION /!d;s/[^"]*"//;s/".*//' \ include/version.h 2>/dev/null) git_version := $(shell git describe --tags --always --first-parent 2>/dev/null | sed -e 's/_/~/g') # If there is no git, use the existing include/version.h ifeq ($(git_version),) git_version := $(file_version) endif # If the include/version.h exists, that is. ifneq ($(git_version),) ifneq ($(git_version),$(file_version)) $(shell echo 'Updating include/version.h' >&2) $(shell echo '#define SIPP_VERSION "$(git_version)"' >include/version.h) endif # Otherwise, we have to create it first. else $(shell echo 'Using a stub(!) version.h as include/version.h' >&2) $(shell cp include/stub-version.h include/version.h) endif sipp-3.6.0/m4/ax_cxx_compile_stdcxx.m40000644000175000017500000003300013475544015017236 0ustar walterwalter# =========================================================================== # http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx.html # =========================================================================== # # SYNOPSIS # # AX_CXX_COMPILE_STDCXX(VERSION, [ext|noext], [mandatory|optional]) # # DESCRIPTION # # Check for baseline language coverage in the compiler for the specified # version of the C++ standard. If necessary, add switches to CXX and # CXXCPP to enable support. VERSION may be '11' (for the C++11 standard) # or '14' (for the C++14 standard). # # The second argument, if specified, indicates whether you insist on an # extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g. # -std=c++11). If neither is specified, you get whatever works, with # preference for an extended mode. # # The third argument, if specified 'mandatory' or if left unspecified, # indicates that baseline support for the specified C++ standard is # required and that the macro should error out if no mode with that # support is found. If specified 'optional', then configuration proceeds # regardless, after defining HAVE_CXX${VERSION} if and only if a # supporting mode is found. # # LICENSE # # Copyright (c) 2008 Benjamin Kosnik # Copyright (c) 2012 Zack Weinberg # Copyright (c) 2013 Roy Stogner # Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov # Copyright (c) 2015 Paul Norman # Copyright (c) 2015 Moritz Klammler # # Copying and distribution of this file, with or without modification, are # permitted in any medium without royalty provided the copyright notice # and this notice are preserved. This file is offered as-is, without any # warranty. #serial 4 dnl This macro is based on the code from the AX_CXX_COMPILE_STDCXX_11 macro dnl (serial version number 13). AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl m4_if([$1], [11], [], [$1], [14], [], [$1], [17], [m4_fatal([support for C++17 not yet implemented in AX_CXX_COMPILE_STDCXX])], [m4_fatal([invalid first argument `$1' to AX_CXX_COMPILE_STDCXX])])dnl m4_if([$2], [], [], [$2], [ext], [], [$2], [noext], [], [m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX])])dnl m4_if([$3], [], [ax_cxx_compile_cxx$1_required=true], [$3], [mandatory], [ax_cxx_compile_cxx$1_required=true], [$3], [optional], [ax_cxx_compile_cxx$1_required=false], [m4_fatal([invalid third argument `$3' to AX_CXX_COMPILE_STDCXX])]) AC_LANG_PUSH([C++])dnl ac_success=no AC_CACHE_CHECK(whether $CXX supports C++$1 features by default, ax_cv_cxx_compile_cxx$1, [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])], [ax_cv_cxx_compile_cxx$1=yes], [ax_cv_cxx_compile_cxx$1=no])]) if test x$ax_cv_cxx_compile_cxx$1 = xyes; then ac_success=yes fi m4_if([$2], [noext], [], [dnl if test x$ac_success = xno; then for switch in -std=gnu++$1 -std=gnu++0x; do cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch]) AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch, $cachevar, [ac_save_CXX="$CXX" CXX="$CXX $switch" AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])], [eval $cachevar=yes], [eval $cachevar=no]) CXX="$ac_save_CXX"]) if eval test x\$$cachevar = xyes; then CXX="$CXX $switch" if test -n "$CXXCPP" ; then CXXCPP="$CXXCPP $switch" fi ac_success=yes break fi done fi]) m4_if([$2], [ext], [], [dnl if test x$ac_success = xno; then dnl HP's aCC needs +std=c++11 according to: dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf dnl Cray's crayCC needs "-h std=c++11" for switch in -std=c++$1 -std=c++0x +std=c++$1 "-h std=c++$1"; do cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx$1_$switch]) AC_CACHE_CHECK(whether $CXX supports C++$1 features with $switch, $cachevar, [ac_save_CXX="$CXX" CXX="$CXX $switch" AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_testbody_$1])], [eval $cachevar=yes], [eval $cachevar=no]) CXX="$ac_save_CXX"]) if eval test x\$$cachevar = xyes; then CXX="$CXX $switch" if test -n "$CXXCPP" ; then CXXCPP="$CXXCPP $switch" fi ac_success=yes break fi done fi]) AC_LANG_POP([C++]) if test x$ax_cxx_compile_cxx$1_required = xtrue; then if test x$ac_success = xno; then AC_MSG_ERROR([*** A compiler with support for C++$1 language features is required.]) fi fi if test x$ac_success = xno; then HAVE_CXX$1=0 AC_MSG_NOTICE([No compiler with C++$1 support was found]) else HAVE_CXX$1=1 AC_DEFINE(HAVE_CXX$1,1, [define if the compiler supports basic C++$1 syntax]) fi AC_SUBST(HAVE_CXX$1) ]) dnl Test body for checking C++11 support m4_define([_AX_CXX_COMPILE_STDCXX_testbody_11], _AX_CXX_COMPILE_STDCXX_testbody_new_in_11 ) dnl Test body for checking C++14 support m4_define([_AX_CXX_COMPILE_STDCXX_testbody_14], _AX_CXX_COMPILE_STDCXX_testbody_new_in_11 _AX_CXX_COMPILE_STDCXX_testbody_new_in_14 ) dnl Tests for new features in C++11 m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_11], [[ // If the compiler admits that it is not ready for C++11, why torture it? // Hopefully, this will speed up the test. #ifndef __cplusplus #error "This is not a C++ compiler" #elif __cplusplus < 201103L #error "This is not a C++11 compiler" #else namespace cxx11 { namespace test_static_assert { template struct check { static_assert(sizeof(int) <= sizeof(T), "not big enough"); }; } namespace test_final_override { struct Base { virtual void f() {} }; struct Derived : public Base { virtual void f() override {} }; } namespace test_double_right_angle_brackets { template < typename T > struct check {}; typedef check single_type; typedef check> double_type; typedef check>> triple_type; typedef check>>> quadruple_type; } namespace test_decltype { int f() { int a = 1; decltype(a) b = 2; return a + b; } } namespace test_type_deduction { template < typename T1, typename T2 > struct is_same { static const bool value = false; }; template < typename T > struct is_same { static const bool value = true; }; template < typename T1, typename T2 > auto add(T1 a1, T2 a2) -> decltype(a1 + a2) { return a1 + a2; } int test(const int c, volatile int v) { static_assert(is_same::value == true, ""); static_assert(is_same::value == false, ""); static_assert(is_same::value == false, ""); auto ac = c; auto av = v; auto sumi = ac + av + 'x'; auto sumf = ac + av + 1.0; static_assert(is_same::value == true, ""); static_assert(is_same::value == true, ""); static_assert(is_same::value == true, ""); static_assert(is_same::value == false, ""); static_assert(is_same::value == true, ""); return (sumf > 0.0) ? sumi : add(c, v); } } namespace test_noexcept { int f() { return 0; } int g() noexcept { return 0; } static_assert(noexcept(f()) == false, ""); static_assert(noexcept(g()) == true, ""); } namespace test_constexpr { template < typename CharT > unsigned long constexpr strlen_c_r(const CharT *const s, const unsigned long acc) noexcept { return *s ? strlen_c_r(s + 1, acc + 1) : acc; } template < typename CharT > unsigned long constexpr strlen_c(const CharT *const s) noexcept { return strlen_c_r(s, 0UL); } static_assert(strlen_c("") == 0UL, ""); static_assert(strlen_c("1") == 1UL, ""); static_assert(strlen_c("example") == 7UL, ""); static_assert(strlen_c("another\0example") == 7UL, ""); } namespace test_rvalue_references { template < int N > struct answer { static constexpr int value = N; }; answer<1> f(int&) { return answer<1>(); } answer<2> f(const int&) { return answer<2>(); } answer<3> f(int&&) { return answer<3>(); } void test() { int i = 0; const int c = 0; static_assert(decltype(f(i))::value == 1, ""); static_assert(decltype(f(c))::value == 2, ""); static_assert(decltype(f(0))::value == 3, ""); } } namespace test_uniform_initialization { struct test { static const int zero {}; static const int one {1}; }; static_assert(test::zero == 0, ""); static_assert(test::one == 1, ""); } namespace test_lambdas { void test1() { auto lambda1 = [](){}; auto lambda2 = lambda1; lambda1(); lambda2(); } int test2() { auto a = [](int i, int j){ return i + j; }(1, 2); auto b = []() -> int { return '0'; }(); auto c = [=](){ return a + b; }(); auto d = [&](){ return c; }(); auto e = [a, &b](int x) mutable { const auto identity = [](int y){ return y; }; for (auto i = 0; i < a; ++i) a += b--; return x + identity(a + b); }(0); return a + b + c + d + e; } int test3() { const auto nullary = [](){ return 0; }; const auto unary = [](int x){ return x; }; using nullary_t = decltype(nullary); using unary_t = decltype(unary); const auto higher1st = [](nullary_t f){ return f(); }; const auto higher2nd = [unary](nullary_t f1){ return [unary, f1](unary_t f2){ return f2(unary(f1())); }; }; return higher1st(nullary) + higher2nd(nullary)(unary); } } namespace test_variadic_templates { template struct sum; template struct sum { static constexpr auto value = N0 + sum::value; }; template <> struct sum<> { static constexpr auto value = 0; }; static_assert(sum<>::value == 0, ""); static_assert(sum<1>::value == 1, ""); static_assert(sum<23>::value == 23, ""); static_assert(sum<1, 2>::value == 3, ""); static_assert(sum<5, 5, 11>::value == 21, ""); static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); } // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function // because of this. namespace test_template_alias_sfinae { struct foo {}; template using member = typename T::member_type; template void func(...) {} template void func(member*) {} void test(); void test() { func(0); } } } // namespace cxx11 #endif // __cplusplus >= 201103L ]]) dnl Tests for new features in C++14 m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_14], [[ // If the compiler admits that it is not ready for C++14, why torture it? // Hopefully, this will speed up the test. #ifndef __cplusplus #error "This is not a C++ compiler" #elif __cplusplus < 201402L #error "This is not a C++14 compiler" #else namespace cxx14 { namespace test_polymorphic_lambdas { int test() { const auto lambda = [](auto&&... args){ const auto istiny = [](auto x){ return (sizeof(x) == 1UL) ? 1 : 0; }; const int aretiny[] = { istiny(args)... }; return aretiny[0]; }; return lambda(1, 1L, 1.0f, '1'); } } namespace test_binary_literals { constexpr auto ivii = 0b0000000000101010; static_assert(ivii == 42, "wrong value"); } namespace test_generalized_constexpr { template < typename CharT > constexpr unsigned long strlen_c(const CharT *const s) noexcept { auto length = 0UL; for (auto p = s; *p; ++p) ++length; return length; } static_assert(strlen_c("") == 0UL, ""); static_assert(strlen_c("x") == 1UL, ""); static_assert(strlen_c("test") == 4UL, ""); static_assert(strlen_c("another\0test") == 7UL, ""); } namespace test_lambda_init_capture { int test() { auto x = 0; const auto lambda1 = [a = x](int b){ return a + b; }; const auto lambda2 = [a = lambda1(x)](){ return a; }; return lambda2(); } } namespace test_digit_seperators { constexpr auto ten_million = 100'000'000; static_assert(ten_million == 100000000, ""); } namespace test_return_type_deduction { auto f(int& x) { return x; } decltype(auto) g(int& x) { return x; } template < typename T1, typename T2 > struct is_same { static constexpr auto value = false; }; template < typename T > struct is_same { static constexpr auto value = true; }; int test() { auto x = 0; static_assert(is_same::value, ""); static_assert(is_same::value, ""); return x; } } } // namespace cxx14 #endif // __cplusplus >= 201402L ]]) sipp-3.6.0/missing0000755000175000017500000001533013502240715013451 0ustar walterwalter#! /bin/sh # Common wrapper for a few potentially missing GNU programs. scriptversion=2013-10-28.13; # UTC # Copyright (C) 1996-2014 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # 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, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try '$0 --help' for more information" exit 1 fi case $1 in --is-lightweight) # Used by our autoconf macros to check whether the available missing # script is modern enough. exit 0 ;; --run) # Back-compat with the calling convention used by older automake. shift ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal autoconf autoheader autom4te automake makeinfo bison yacc flex lex help2man Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 'g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: unknown '$1' option" echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac # Run the given program, remember its exit status. "$@"; st=$? # If it succeeded, we are done. test $st -eq 0 && exit 0 # Also exit now if we it failed (or wasn't found), and '--version' was # passed; such an option is passed most likely to detect whether the # program is present and works. case $2 in --version|--help) exit $st;; esac # Exit code 63 means version mismatch. This often happens when the user # tries to use an ancient version of a tool on a file that requires a # minimum version. if test $st -eq 63; then msg="probably too old" elif test $st -eq 127; then # Program was missing. msg="missing on your system" else # Program was found and executed, but failed. Give up. exit $st fi perl_URL=http://www.perl.org/ flex_URL=http://flex.sourceforge.net/ gnu_software_URL=http://www.gnu.org/software program_details () { case $1 in aclocal|automake) echo "The '$1' program is part of the GNU Automake package:" echo "<$gnu_software_URL/automake>" echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/autoconf>" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; autoconf|autom4te|autoheader) echo "The '$1' program is part of the GNU Autoconf package:" echo "<$gnu_software_URL/autoconf/>" echo "It also requires GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; esac } give_advice () { # Normalize program name to check for. normalized_program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` printf '%s\n' "'$1' is $msg." configure_deps="'configure.ac' or m4 files included by 'configure.ac'" case $normalized_program in autoconf*) echo "You should only need it if you modified 'configure.ac'," echo "or m4 files included by it." program_details 'autoconf' ;; autoheader*) echo "You should only need it if you modified 'acconfig.h' or" echo "$configure_deps." program_details 'autoheader' ;; automake*) echo "You should only need it if you modified 'Makefile.am' or" echo "$configure_deps." program_details 'automake' ;; aclocal*) echo "You should only need it if you modified 'acinclude.m4' or" echo "$configure_deps." program_details 'aclocal' ;; autom4te*) echo "You might have modified some maintainer files that require" echo "the 'autom4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) echo "You should only need it if you modified a '.y' file." echo "You may want to install the GNU Bison package:" echo "<$gnu_software_URL/bison/>" ;; lex*|flex*) echo "You should only need it if you modified a '.l' file." echo "You may want to install the Fast Lexical Analyzer package:" echo "<$flex_URL>" ;; help2man*) echo "You should only need it if you modified a dependency" \ "of a man page." echo "You may want to install the GNU Help2man package:" echo "<$gnu_software_URL/help2man/>" ;; makeinfo*) echo "You should only need it if you modified a '.texi' file, or" echo "any other file indirectly affecting the aspect of the manual." echo "You might want to install the Texinfo package:" echo "<$gnu_software_URL/texinfo/>" echo "The spurious makeinfo call might also be the consequence of" echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" echo "want to install GNU make:" echo "<$gnu_software_URL/make/>" ;; *) echo "You might have modified some files without having the proper" echo "tools for further handling them. Check the 'README' file, it" echo "often tells you about the needed prerequisites for installing" echo "this package. You may also peek at any GNU archive site, in" echo "case some other package contains this missing '$1' program." ;; esac } give_advice "$1" | sed -e '1s/^/WARNING: /' \ -e '2,$s/^/ /' >&2 # Propagate the correct exit status (expected to be 127 for a program # not found, 63 for a program that failed due to version mismatch). exit $st # 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: sipp-3.6.0/gmock/0000755000175000017500000000000013475544015013161 5ustar walterwaltersipp-3.6.0/validate-src.sh0000755000175000017500000000222613475544015015000 0ustar walterwalter#!/bin/sh err=0 TAB=`printf '\t'` files_with_tabs=`\ find include src '!' -name config.h \ '(' -name '*.cpp' -o -name '*.hpp' -o -name '*.c' -o -name '*.h' ')' | xargs grep -l "$TAB" | sed -e 's/^/ /'` if test -n "$files_with_tabs"; then echo "tabs encountered in one or more source files:" >&2 echo "$files_with_tabs" >&2 echo >&2 err=$((err+1)) fi files_with_trailing_ws=`\ find include src '!' -name config.h \ '(' -name '*.cpp' -o -name '*.hpp' -o -name '*.c' -o -name '*.h' ')' | xargs grep -l '[[:blank:][:cntrl:]]$' | sed -e 's/^/ /'` if test -n "$files_with_trailing_ws"; then echo "trailing whitespace found in one or more source files:" >&2 echo "$files_with_trailing_ws" >&2 echo >&2 err=$((err+1)) fi files_with_not_4_spaces=`\ find include src '!' -name config.h \ '(' -name '*.cpp' -o -name '*.hpp' -o -name '*.c' -o -name '*.h' ')' | xargs grep -lE '^( \}| {1,3}[a-z_])' | sed -e 's/^/ /'` if test -n "$files_with_not_4_spaces"; then echo "files with non-standard indentation found:" >&2 echo "$files_with_not_4_spaces" >&2 echo >&2 err=$((err+1)) fi exit $err sipp-3.6.0/Makefile.in0000644000175000017500000065736013502240715014136 0ustar walterwalter# Makefile.in generated by automake 1.15.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2017 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. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ bin_PROGRAMS = sipp$(EXEEXT) TESTS = sipp_unittest$(EXEEXT) check_PROGRAMS = $(am__EXEEXT_1) @HAVE_OPENSSL_TRUE@am__append_1 = -DUSE_TLS -DUSE_OPENSSL @HAVE_PCAP_TRUE@am__append_2 = -DPCAPPLAY @HAVE_RTP_TRUE@am__append_3 = -DRTP_STREAM @HAVE_SCTP_TRUE@am__append_4 = -DUSE_SCTP @HAVE_GSL_TRUE@am__append_5 = -DHAVE_GSL @HAVE_EPOLL_TRUE@am__append_6 = -DHAVE_EPOLL @HAVE_HELP2MAN_TRUE@am__append_7 = $(man_MANS) subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/am_git_version.m4 \ $(top_srcdir)/m4/ax_check_compile_flag.m4 \ $(top_srcdir)/m4/ax_config_feature.m4 \ $(top_srcdir)/m4/ax_cxx_compile_stdcxx.m4 \ $(top_srcdir)/m4/ax_cxx_compile_stdcxx_11.m4 \ $(top_srcdir)/m4/ax_have_epoll.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ $(am__configure_deps) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" am__EXEEXT_1 = sipp_unittest$(EXEEXT) PROGRAMS = $(bin_PROGRAMS) am__sipp_SOURCES_DIST = src/actions.cpp src/auth.cpp src/comp.c \ src/call.cpp src/deadcall.cpp src/infile.cpp src/listener.cpp \ src/logger.cpp src/md5.c src/message.cpp src/milenage.c \ src/call_generation_task.cpp src/ratetask.cpp \ src/reporttask.cpp src/rijndael.c src/scenario.cpp \ src/sip_parser.cpp src/screen.cpp src/socket.cpp \ src/socketowner.cpp src/stat.cpp src/strings.cpp src/task.cpp \ src/time.cpp src/variables.cpp src/watchdog.cpp \ src/xp_parser.c include/comp.h include/infile.hpp \ include/listener.hpp include/logger.hpp include/md5.h \ include/message.hpp include/milenage.h \ include/call_generation_task.hpp include/ratetask.hpp \ include/reporttask.hpp include/rijndael.h include/scenario.hpp \ include/sip_parser.hpp include/screen.hpp include/socket.hpp \ include/socketowner.hpp include/stat.hpp include/strings.hpp \ include/task.hpp include/time.hpp include/variables.hpp \ include/watchdog.hpp include/xp_parser.h include/actions.hpp \ include/call.hpp include/auth.hpp include/deadcall.hpp \ include/sslsocket.hpp src/sslsocket.cpp include/prepare_pcap.h \ include/send_packets.h src/prepare_pcap.c src/send_packets.c \ src/rtpstream.cpp include/rtpstream.hpp src/sipp.cpp \ include/sipp.hpp am__dirstamp = $(am__leading_dot)dirstamp am__objects_1 = @HAVE_OPENSSL_TRUE@am__objects_2 = $(am__objects_1) \ @HAVE_OPENSSL_TRUE@ src/sipp-sslsocket.$(OBJEXT) @HAVE_PCAP_TRUE@am__objects_3 = $(am__objects_1) \ @HAVE_PCAP_TRUE@ src/sipp-prepare_pcap.$(OBJEXT) \ @HAVE_PCAP_TRUE@ src/sipp-send_packets.$(OBJEXT) @HAVE_RTP_TRUE@am__objects_4 = src/sipp-rtpstream.$(OBJEXT) am__objects_5 = src/sipp-actions.$(OBJEXT) src/sipp-auth.$(OBJEXT) \ src/sipp-comp.$(OBJEXT) src/sipp-call.$(OBJEXT) \ src/sipp-deadcall.$(OBJEXT) src/sipp-infile.$(OBJEXT) \ src/sipp-listener.$(OBJEXT) src/sipp-logger.$(OBJEXT) \ src/sipp-md5.$(OBJEXT) src/sipp-message.$(OBJEXT) \ src/sipp-milenage.$(OBJEXT) \ src/sipp-call_generation_task.$(OBJEXT) \ src/sipp-ratetask.$(OBJEXT) src/sipp-reporttask.$(OBJEXT) \ src/sipp-rijndael.$(OBJEXT) src/sipp-scenario.$(OBJEXT) \ src/sipp-sip_parser.$(OBJEXT) src/sipp-screen.$(OBJEXT) \ src/sipp-socket.$(OBJEXT) src/sipp-socketowner.$(OBJEXT) \ src/sipp-stat.$(OBJEXT) src/sipp-strings.$(OBJEXT) \ src/sipp-task.$(OBJEXT) src/sipp-time.$(OBJEXT) \ src/sipp-variables.$(OBJEXT) src/sipp-watchdog.$(OBJEXT) \ src/sipp-xp_parser.$(OBJEXT) $(am__objects_1) $(am__objects_2) \ $(am__objects_3) $(am__objects_4) am_sipp_OBJECTS = $(am__objects_5) src/sipp-sipp.$(OBJEXT) sipp_OBJECTS = $(am_sipp_OBJECTS) sipp_DEPENDENCIES = @LIBOBJS@ sipp_LINK = $(CXXLD) $(sipp_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ am__sipp_unittest_SOURCES_DIST = src/actions.cpp src/auth.cpp \ src/comp.c src/call.cpp src/deadcall.cpp src/infile.cpp \ src/listener.cpp src/logger.cpp src/md5.c src/message.cpp \ src/milenage.c src/call_generation_task.cpp src/ratetask.cpp \ src/reporttask.cpp src/rijndael.c src/scenario.cpp \ src/sip_parser.cpp src/screen.cpp src/socket.cpp \ src/socketowner.cpp src/stat.cpp src/strings.cpp src/task.cpp \ src/time.cpp src/variables.cpp src/watchdog.cpp \ src/xp_parser.c include/comp.h include/infile.hpp \ include/listener.hpp include/logger.hpp include/md5.h \ include/message.hpp include/milenage.h \ include/call_generation_task.hpp include/ratetask.hpp \ include/reporttask.hpp include/rijndael.h include/scenario.hpp \ include/sip_parser.hpp include/screen.hpp include/socket.hpp \ include/socketowner.hpp include/stat.hpp include/strings.hpp \ include/task.hpp include/time.hpp include/variables.hpp \ include/watchdog.hpp include/xp_parser.h include/actions.hpp \ include/call.hpp include/auth.hpp include/deadcall.hpp \ include/sslsocket.hpp src/sslsocket.cpp include/prepare_pcap.h \ include/send_packets.h src/prepare_pcap.c src/send_packets.c \ src/rtpstream.cpp include/rtpstream.hpp src/sipp_unittest.cpp \ src/xp_parser_ut.cpp gtest/src/gtest-death-test.cc \ gtest/src/gtest-filepath.cc gtest/src/gtest-internal-inl.h \ gtest/src/gtest-port.cc gtest/src/gtest-printers.cc \ gtest/src/gtest-test-part.cc gtest/src/gtest-typed-test.cc \ gtest/src/gtest.cc gmock/src/gmock-internal-utils.cc \ gmock/src/gmock-matchers.cc @HAVE_OPENSSL_TRUE@am__objects_6 = $(am__objects_1) \ @HAVE_OPENSSL_TRUE@ src/sipp_unittest-sslsocket.$(OBJEXT) @HAVE_PCAP_TRUE@am__objects_7 = $(am__objects_1) \ @HAVE_PCAP_TRUE@ src/sipp_unittest-prepare_pcap.$(OBJEXT) \ @HAVE_PCAP_TRUE@ src/sipp_unittest-send_packets.$(OBJEXT) @HAVE_RTP_TRUE@am__objects_8 = src/sipp_unittest-rtpstream.$(OBJEXT) am__objects_9 = src/sipp_unittest-actions.$(OBJEXT) \ src/sipp_unittest-auth.$(OBJEXT) \ src/sipp_unittest-comp.$(OBJEXT) \ src/sipp_unittest-call.$(OBJEXT) \ src/sipp_unittest-deadcall.$(OBJEXT) \ src/sipp_unittest-infile.$(OBJEXT) \ src/sipp_unittest-listener.$(OBJEXT) \ src/sipp_unittest-logger.$(OBJEXT) \ src/sipp_unittest-md5.$(OBJEXT) \ src/sipp_unittest-message.$(OBJEXT) \ src/sipp_unittest-milenage.$(OBJEXT) \ src/sipp_unittest-call_generation_task.$(OBJEXT) \ src/sipp_unittest-ratetask.$(OBJEXT) \ src/sipp_unittest-reporttask.$(OBJEXT) \ src/sipp_unittest-rijndael.$(OBJEXT) \ src/sipp_unittest-scenario.$(OBJEXT) \ src/sipp_unittest-sip_parser.$(OBJEXT) \ src/sipp_unittest-screen.$(OBJEXT) \ src/sipp_unittest-socket.$(OBJEXT) \ src/sipp_unittest-socketowner.$(OBJEXT) \ src/sipp_unittest-stat.$(OBJEXT) \ src/sipp_unittest-strings.$(OBJEXT) \ src/sipp_unittest-task.$(OBJEXT) \ src/sipp_unittest-time.$(OBJEXT) \ src/sipp_unittest-variables.$(OBJEXT) \ src/sipp_unittest-watchdog.$(OBJEXT) \ src/sipp_unittest-xp_parser.$(OBJEXT) $(am__objects_1) \ $(am__objects_6) $(am__objects_7) $(am__objects_8) am__objects_10 = gtest/src/sipp_unittest-gtest-death-test.$(OBJEXT) \ gtest/src/sipp_unittest-gtest-filepath.$(OBJEXT) \ gtest/src/sipp_unittest-gtest-port.$(OBJEXT) \ gtest/src/sipp_unittest-gtest-printers.$(OBJEXT) \ gtest/src/sipp_unittest-gtest-test-part.$(OBJEXT) \ gtest/src/sipp_unittest-gtest-typed-test.$(OBJEXT) \ gtest/src/sipp_unittest-gtest.$(OBJEXT) \ gmock/src/sipp_unittest-gmock-internal-utils.$(OBJEXT) \ gmock/src/sipp_unittest-gmock-matchers.$(OBJEXT) am_sipp_unittest_OBJECTS = $(am__objects_9) \ src/sipp_unittest-sipp_unittest.$(OBJEXT) \ src/sipp_unittest-xp_parser_ut.$(OBJEXT) $(am__objects_10) sipp_unittest_OBJECTS = $(am_sipp_unittest_OBJECTS) sipp_unittest_DEPENDENCIES = @LIBOBJS@ sipp_unittest_LINK = $(CXXLD) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = SOURCES = $(sipp_SOURCES) $(sipp_unittest_SOURCES) DIST_SOURCES = $(am__sipp_SOURCES_DIST) \ $(am__sipp_unittest_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac 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' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } man1dir = $(mandir)/man1 NROFF = nroff MANS = $(man_MANS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags CSCOPE = cscope AM_RECURSIVE_TARGETS = cscope check recheck am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ am__color_tests=no am__tty_colors = { \ $(am__tty_colors_dummy); \ if test "X$(AM_COLOR_TESTS)" = Xno; then \ am__color_tests=no; \ elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ am__color_tests=yes; \ elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ am__color_tests=yes; \ fi; \ if test $$am__color_tests = yes; then \ red=''; \ grn=''; \ lgn=''; \ blu=''; \ mgn=''; \ brg=''; \ std=''; \ fi; \ } am__recheck_rx = ^[ ]*:recheck:[ ]* am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* # A command that, given a newline-separated list of test names on the # standard input, print the name of the tests that are to be re-run # upon "make recheck". am__list_recheck_tests = $(AWK) '{ \ recheck = 1; \ while ((rc = (getline line < ($$0 ".trs"))) != 0) \ { \ if (rc < 0) \ { \ if ((getline line2 < ($$0 ".log")) < 0) \ recheck = 0; \ break; \ } \ else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ { \ recheck = 0; \ break; \ } \ else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ { \ break; \ } \ }; \ if (recheck) \ print $$0; \ close ($$0 ".trs"); \ close ($$0 ".log"); \ }' # A command that, given a newline-separated list of test names on the # standard input, create the global log from their .trs and .log files. am__create_global_log = $(AWK) ' \ function fatal(msg) \ { \ print "fatal: making $@: " msg | "cat >&2"; \ exit 1; \ } \ function rst_section(header) \ { \ print header; \ len = length(header); \ for (i = 1; i <= len; i = i + 1) \ printf "="; \ printf "\n\n"; \ } \ { \ copy_in_global_log = 1; \ global_test_result = "RUN"; \ while ((rc = (getline line < ($$0 ".trs"))) != 0) \ { \ if (rc < 0) \ fatal("failed to read from " $$0 ".trs"); \ if (line ~ /$(am__global_test_result_rx)/) \ { \ sub("$(am__global_test_result_rx)", "", line); \ sub("[ ]*$$", "", line); \ global_test_result = line; \ } \ else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ copy_in_global_log = 0; \ }; \ if (copy_in_global_log) \ { \ rst_section(global_test_result ": " $$0); \ while ((rc = (getline line < ($$0 ".log"))) != 0) \ { \ if (rc < 0) \ fatal("failed to read from " $$0 ".log"); \ print line; \ }; \ printf "\n"; \ }; \ close ($$0 ".trs"); \ close ($$0 ".log"); \ }' # Restructured Text title. am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } # Solaris 10 'make', and several other traditional 'make' implementations, # pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it # by disabling -e (using the XSI extension "set +e") if it's set. am__sh_e_setup = case $$- in *e*) set +e;; esac # Default flags passed to test drivers. am__common_driver_flags = \ --color-tests "$$am__color_tests" \ --enable-hard-errors "$$am__enable_hard_errors" \ --expect-failure "$$am__expect_failure" # To be inserted before the command running the test. Creates the # directory for the log if needed. Stores in $dir the directory # containing $f, in $tst the test, in $log the log. Executes the # developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and # passes TESTS_ENVIRONMENT. Set up options for the wrapper that # will run the test scripts (or their associated LOG_COMPILER, if # thy have one). am__check_pre = \ $(am__sh_e_setup); \ $(am__vpath_adj_setup) $(am__vpath_adj) \ $(am__tty_colors); \ srcdir=$(srcdir); export srcdir; \ case "$@" in \ */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ *) am__odir=.;; \ esac; \ test "x$$am__odir" = x"." || test -d "$$am__odir" \ || $(MKDIR_P) "$$am__odir" || exit $$?; \ if test -f "./$$f"; then dir=./; \ elif test -f "$$f"; then dir=; \ else dir="$(srcdir)/"; fi; \ tst=$$dir$$f; log='$@'; \ if test -n '$(DISABLE_HARD_ERRORS)'; then \ am__enable_hard_errors=no; \ else \ am__enable_hard_errors=yes; \ fi; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ am__expect_failure=yes;; \ *) \ am__expect_failure=no;; \ esac; \ $(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) # A shell command to get the names of the tests scripts with any registered # extension removed (i.e., equivalently, the names of the test logs, with # the '.log' extension removed). The result is saved in the shell variable # '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, # we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", # since that might cause problem with VPATH rewrites for suffix-less tests. # See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` RECHECK_LOGS = $(TEST_LOGS) TEST_SUITE_LOG = test-suite.log TEST_EXTENSIONS = @EXEEXT@ .test LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) am__set_b = \ case '$@' in \ */*) \ case '$*' in \ */*) b='$*';; \ *) b=`echo '$@' | sed 's/\.log$$//'`; \ esac;; \ *) \ b='$*';; \ esac am__test_logs1 = $(TESTS:=.log) am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) TEST_LOGS = $(am__test_logs2:.test.log=.log) TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ $(TEST_LOG_FLAGS) am__DIST_COMMON = $(srcdir)/Makefile.in \ $(top_srcdir)/include/config.h.in THANKS compile config.guess \ config.sub depcomp install-sh missing test-driver DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ $(am__append_1) $(am__append_2) $(am__append_3) \ $(am__append_4) $(am__append_5) $(am__append_6) DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ GSL_CFLAGS = @GSL_CFLAGS@ GSL_CXXFLAGS = @GSL_CXXFLAGS@ GSL_LIBS = @GSL_LIBS@ HAVE_CXX11 = @HAVE_CXX11@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ SET_MAKE = @SET_MAKE@ 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@ ac_ct_CXX = @ac_ct_CXX@ 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@ curses_CFLAGS = @curses_CFLAGS@ curses_LIBS = @curses_LIBS@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ have_pkgconfig = @have_pkgconfig@ 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@ mkdir_p = @mkdir_p@ ncurses_CFLAGS = @ncurses_CFLAGS@ ncurses_LIBS = @ncurses_LIBS@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ 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@ AM_CFLAGS = -I$(srcdir)/include -Wall -pedantic AM_CXXFLAGS = -I$(srcdir)/include -Wall -pedantic # For BSD-style elements in udphdr struct (uh_dport instead of dest) # among others. AM_CPPFLAGS = -D_BSD_SOURCE -D_DEFAULT_SOURCE CLEANFILES = $(am__append_7) EXTRA_DIST = \ $(srcdir)/example/fortune.cpp \ $(srcdir)/LICENSE.txt \ $(srcdir)/README.md \ $(srcdir)/THANKS \ $(srcdir)/sipp.dtd \ $(srcdir)/cpplint.py @HAVE_OPENSSL_TRUE@ssl_incl = \ @HAVE_OPENSSL_TRUE@ include/sslsocket.hpp @HAVE_OPENSSL_TRUE@ssl_SOURCES = \ @HAVE_OPENSSL_TRUE@ $(ssl_incl) \ @HAVE_OPENSSL_TRUE@ src/sslsocket.cpp @HAVE_PCAP_TRUE@pcap_incl = \ @HAVE_PCAP_TRUE@ include/prepare_pcap.h \ @HAVE_PCAP_TRUE@ include/send_packets.h @HAVE_PCAP_TRUE@pcap_SOURCES = \ @HAVE_PCAP_TRUE@ $(pcap_incl) \ @HAVE_PCAP_TRUE@ src/prepare_pcap.c \ @HAVE_PCAP_TRUE@ src/send_packets.c @HAVE_RTP_TRUE@rtp_SOURCES = \ @HAVE_RTP_TRUE@ src/rtpstream.cpp \ @HAVE_RTP_TRUE@ include/rtpstream.hpp common_incl = \ include/comp.h \ include/infile.hpp \ include/listener.hpp \ include/logger.hpp \ include/md5.h \ include/message.hpp \ include/milenage.h \ include/call_generation_task.hpp \ include/ratetask.hpp \ include/reporttask.hpp \ include/rijndael.h \ include/scenario.hpp \ include/sip_parser.hpp \ include/screen.hpp \ include/socket.hpp \ include/socketowner.hpp \ include/stat.hpp \ include/strings.hpp \ include/task.hpp \ include/time.hpp \ include/variables.hpp \ include/watchdog.hpp \ include/xp_parser.h \ include/actions.hpp \ include/call.hpp \ include/auth.hpp \ include/deadcall.hpp common_SOURCES = \ src/actions.cpp \ src/auth.cpp \ src/comp.c \ src/call.cpp \ src/deadcall.cpp \ src/infile.cpp \ src/listener.cpp \ src/logger.cpp \ src/md5.c \ src/message.cpp \ src/milenage.c \ src/call_generation_task.cpp \ src/ratetask.cpp \ src/reporttask.cpp \ src/rijndael.c \ src/scenario.cpp \ src/sip_parser.cpp \ src/screen.cpp \ src/socket.cpp \ src/socketowner.cpp \ src/stat.cpp \ src/strings.cpp \ src/task.cpp \ src/time.cpp \ src/variables.cpp \ src/watchdog.cpp \ src/xp_parser.c \ $(common_incl) \ $(ssl_SOURCES) \ $(pcap_SOURCES) \ $(rtp_SOURCES) sipp_SOURCES = \ $(common_SOURCES) \ src/sipp.cpp \ include/sipp.hpp sipp_CFLAGS = $(AM_CFLAGS) @GSL_CFLAGS@ sipp_CXXFLAGS = $(AM_CXXFLAGS) @GSL_CXXFLAGS@ sipp_LDADD = @LIBOBJS@ @GSL_LIBS@ gtest_SOURCES = \ gtest/src/gtest-death-test.cc \ gtest/src/gtest-filepath.cc \ gtest/src/gtest-internal-inl.h \ gtest/src/gtest-port.cc \ gtest/src/gtest-printers.cc \ gtest/src/gtest-test-part.cc \ gtest/src/gtest-typed-test.cc \ gtest/src/gtest.cc \ gmock/src/gmock-internal-utils.cc \ gmock/src/gmock-matchers.cc sipp_unittest_SOURCES = \ $(common_SOURCES) \ src/sipp_unittest.cpp \ src/xp_parser_ut.cpp \ $(gtest_SOURCES) sipp_unittest_CFLAGS = $(AM_CFLAGS) -DGTEST=1 \ -I$(srcdir)/gtest/include \ -I$(srcdir)/gmock/include \ -I$(srcdir)/gtest \ -I$(srcdir)/gmock \ @GSL_CFLAGS@ sipp_unittest_CXXFLAGS = $(AM_CXXFLAGS) -DGTEST=1 \ -I$(srcdir)/gtest/include \ -I$(srcdir)/gmock/include \ -I$(srcdir)/gtest \ -I$(srcdir)/gmock \ @GSL_CXXFLAGS@ sipp_unittest_LDADD = @LIBOBJS@ @GSL_LIBS@ BUILT_SOURCES = .autoclean @HAVE_HELP2MAN_TRUE@man_MANS = sipp.1 all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .cc .cpp .log .o .obj .test .test$(EXEEXT) .trs am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign 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; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(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): include/config.h: include/stamp-h1 @test -f $@ || rm -f include/stamp-h1 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) include/stamp-h1 include/stamp-h1: $(top_srcdir)/include/config.h.in $(top_builddir)/config.status @rm -f include/stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status include/config.h $(top_srcdir)/include/config.h.in: $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f include/stamp-h1 touch $@ distclean-hdr: -rm -f include/config.h include/stamp-h1 install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ 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)'; 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) clean-checkPROGRAMS: -test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS) src/$(am__dirstamp): @$(MKDIR_P) src @: > src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) src/$(DEPDIR) @: > src/$(DEPDIR)/$(am__dirstamp) src/sipp-actions.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-auth.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-comp.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-call.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-deadcall.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-infile.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-listener.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-logger.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-md5.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-message.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-milenage.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-call_generation_task.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-ratetask.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-reporttask.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-rijndael.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-scenario.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-sip_parser.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-screen.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-socket.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-socketowner.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-stat.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-strings.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-task.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-time.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-variables.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-watchdog.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-xp_parser.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-sslsocket.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-prepare_pcap.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-send_packets.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-rtpstream.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-sipp.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) sipp$(EXEEXT): $(sipp_OBJECTS) $(sipp_DEPENDENCIES) $(EXTRA_sipp_DEPENDENCIES) @rm -f sipp$(EXEEXT) $(AM_V_CXXLD)$(sipp_LINK) $(sipp_OBJECTS) $(sipp_LDADD) $(LIBS) src/sipp_unittest-actions.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-auth.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-comp.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-call.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-deadcall.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-infile.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-listener.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-logger.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-md5.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-message.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-milenage.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-call_generation_task.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-ratetask.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-reporttask.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-rijndael.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-scenario.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-sip_parser.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-screen.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-socket.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-socketowner.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-stat.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-strings.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-task.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-time.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-variables.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-watchdog.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-xp_parser.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-sslsocket.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-prepare_pcap.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-send_packets.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-rtpstream.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-sipp_unittest.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-xp_parser_ut.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) gtest/src/$(am__dirstamp): @$(MKDIR_P) gtest/src @: > gtest/src/$(am__dirstamp) gtest/src/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) gtest/src/$(DEPDIR) @: > gtest/src/$(DEPDIR)/$(am__dirstamp) gtest/src/sipp_unittest-gtest-death-test.$(OBJEXT): \ gtest/src/$(am__dirstamp) gtest/src/$(DEPDIR)/$(am__dirstamp) gtest/src/sipp_unittest-gtest-filepath.$(OBJEXT): \ gtest/src/$(am__dirstamp) gtest/src/$(DEPDIR)/$(am__dirstamp) gtest/src/sipp_unittest-gtest-port.$(OBJEXT): \ gtest/src/$(am__dirstamp) gtest/src/$(DEPDIR)/$(am__dirstamp) gtest/src/sipp_unittest-gtest-printers.$(OBJEXT): \ gtest/src/$(am__dirstamp) gtest/src/$(DEPDIR)/$(am__dirstamp) gtest/src/sipp_unittest-gtest-test-part.$(OBJEXT): \ gtest/src/$(am__dirstamp) gtest/src/$(DEPDIR)/$(am__dirstamp) gtest/src/sipp_unittest-gtest-typed-test.$(OBJEXT): \ gtest/src/$(am__dirstamp) gtest/src/$(DEPDIR)/$(am__dirstamp) gtest/src/sipp_unittest-gtest.$(OBJEXT): gtest/src/$(am__dirstamp) \ gtest/src/$(DEPDIR)/$(am__dirstamp) gmock/src/$(am__dirstamp): @$(MKDIR_P) gmock/src @: > gmock/src/$(am__dirstamp) gmock/src/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) gmock/src/$(DEPDIR) @: > gmock/src/$(DEPDIR)/$(am__dirstamp) gmock/src/sipp_unittest-gmock-internal-utils.$(OBJEXT): \ gmock/src/$(am__dirstamp) gmock/src/$(DEPDIR)/$(am__dirstamp) gmock/src/sipp_unittest-gmock-matchers.$(OBJEXT): \ gmock/src/$(am__dirstamp) gmock/src/$(DEPDIR)/$(am__dirstamp) sipp_unittest$(EXEEXT): $(sipp_unittest_OBJECTS) $(sipp_unittest_DEPENDENCIES) $(EXTRA_sipp_unittest_DEPENDENCIES) @rm -f sipp_unittest$(EXEEXT) $(AM_V_CXXLD)$(sipp_unittest_LINK) $(sipp_unittest_OBJECTS) $(sipp_unittest_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) -rm -f gmock/src/*.$(OBJEXT) -rm -f gtest/src/*.$(OBJEXT) -rm -f src/*.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@gmock/src/$(DEPDIR)/sipp_unittest-gmock-internal-utils.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@gmock/src/$(DEPDIR)/sipp_unittest-gmock-matchers.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@gtest/src/$(DEPDIR)/sipp_unittest-gtest-death-test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@gtest/src/$(DEPDIR)/sipp_unittest-gtest-filepath.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@gtest/src/$(DEPDIR)/sipp_unittest-gtest-port.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@gtest/src/$(DEPDIR)/sipp_unittest-gtest-printers.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@gtest/src/$(DEPDIR)/sipp_unittest-gtest-test-part.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@gtest/src/$(DEPDIR)/sipp_unittest-gtest-typed-test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@gtest/src/$(DEPDIR)/sipp_unittest-gtest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-actions.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-auth.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-call.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-call_generation_task.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-comp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-deadcall.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-infile.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-listener.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-logger.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-md5.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-message.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-milenage.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-prepare_pcap.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-ratetask.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-reporttask.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-rijndael.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-rtpstream.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-scenario.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-screen.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-send_packets.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-sip_parser.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-sipp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-socket.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-socketowner.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-sslsocket.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-stat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-strings.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-task.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-time.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-variables.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-watchdog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-xp_parser.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-actions.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-auth.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-call.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-call_generation_task.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-comp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-deadcall.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-infile.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-listener.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-logger.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-md5.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-message.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-milenage.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-prepare_pcap.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-ratetask.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-reporttask.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-rijndael.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-rtpstream.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-scenario.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-screen.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-send_packets.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-sip_parser.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-sipp_unittest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-socket.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-socketowner.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-sslsocket.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-stat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-strings.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-task.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-time.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-variables.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-watchdog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-xp_parser.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-xp_parser_ut.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` src/sipp-comp.o: src/comp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -MT src/sipp-comp.o -MD -MP -MF src/$(DEPDIR)/sipp-comp.Tpo -c -o src/sipp-comp.o `test -f 'src/comp.c' || echo '$(srcdir)/'`src/comp.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-comp.Tpo src/$(DEPDIR)/sipp-comp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/comp.c' object='src/sipp-comp.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -c -o src/sipp-comp.o `test -f 'src/comp.c' || echo '$(srcdir)/'`src/comp.c src/sipp-comp.obj: src/comp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -MT src/sipp-comp.obj -MD -MP -MF src/$(DEPDIR)/sipp-comp.Tpo -c -o src/sipp-comp.obj `if test -f 'src/comp.c'; then $(CYGPATH_W) 'src/comp.c'; else $(CYGPATH_W) '$(srcdir)/src/comp.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-comp.Tpo src/$(DEPDIR)/sipp-comp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/comp.c' object='src/sipp-comp.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -c -o src/sipp-comp.obj `if test -f 'src/comp.c'; then $(CYGPATH_W) 'src/comp.c'; else $(CYGPATH_W) '$(srcdir)/src/comp.c'; fi` src/sipp-md5.o: src/md5.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -MT src/sipp-md5.o -MD -MP -MF src/$(DEPDIR)/sipp-md5.Tpo -c -o src/sipp-md5.o `test -f 'src/md5.c' || echo '$(srcdir)/'`src/md5.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-md5.Tpo src/$(DEPDIR)/sipp-md5.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/md5.c' object='src/sipp-md5.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -c -o src/sipp-md5.o `test -f 'src/md5.c' || echo '$(srcdir)/'`src/md5.c src/sipp-md5.obj: src/md5.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -MT src/sipp-md5.obj -MD -MP -MF src/$(DEPDIR)/sipp-md5.Tpo -c -o src/sipp-md5.obj `if test -f 'src/md5.c'; then $(CYGPATH_W) 'src/md5.c'; else $(CYGPATH_W) '$(srcdir)/src/md5.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-md5.Tpo src/$(DEPDIR)/sipp-md5.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/md5.c' object='src/sipp-md5.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -c -o src/sipp-md5.obj `if test -f 'src/md5.c'; then $(CYGPATH_W) 'src/md5.c'; else $(CYGPATH_W) '$(srcdir)/src/md5.c'; fi` src/sipp-milenage.o: src/milenage.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -MT src/sipp-milenage.o -MD -MP -MF src/$(DEPDIR)/sipp-milenage.Tpo -c -o src/sipp-milenage.o `test -f 'src/milenage.c' || echo '$(srcdir)/'`src/milenage.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-milenage.Tpo src/$(DEPDIR)/sipp-milenage.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/milenage.c' object='src/sipp-milenage.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -c -o src/sipp-milenage.o `test -f 'src/milenage.c' || echo '$(srcdir)/'`src/milenage.c src/sipp-milenage.obj: src/milenage.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -MT src/sipp-milenage.obj -MD -MP -MF src/$(DEPDIR)/sipp-milenage.Tpo -c -o src/sipp-milenage.obj `if test -f 'src/milenage.c'; then $(CYGPATH_W) 'src/milenage.c'; else $(CYGPATH_W) '$(srcdir)/src/milenage.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-milenage.Tpo src/$(DEPDIR)/sipp-milenage.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/milenage.c' object='src/sipp-milenage.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -c -o src/sipp-milenage.obj `if test -f 'src/milenage.c'; then $(CYGPATH_W) 'src/milenage.c'; else $(CYGPATH_W) '$(srcdir)/src/milenage.c'; fi` src/sipp-rijndael.o: src/rijndael.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -MT src/sipp-rijndael.o -MD -MP -MF src/$(DEPDIR)/sipp-rijndael.Tpo -c -o src/sipp-rijndael.o `test -f 'src/rijndael.c' || echo '$(srcdir)/'`src/rijndael.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-rijndael.Tpo src/$(DEPDIR)/sipp-rijndael.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/rijndael.c' object='src/sipp-rijndael.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -c -o src/sipp-rijndael.o `test -f 'src/rijndael.c' || echo '$(srcdir)/'`src/rijndael.c src/sipp-rijndael.obj: src/rijndael.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -MT src/sipp-rijndael.obj -MD -MP -MF src/$(DEPDIR)/sipp-rijndael.Tpo -c -o src/sipp-rijndael.obj `if test -f 'src/rijndael.c'; then $(CYGPATH_W) 'src/rijndael.c'; else $(CYGPATH_W) '$(srcdir)/src/rijndael.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-rijndael.Tpo src/$(DEPDIR)/sipp-rijndael.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/rijndael.c' object='src/sipp-rijndael.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -c -o src/sipp-rijndael.obj `if test -f 'src/rijndael.c'; then $(CYGPATH_W) 'src/rijndael.c'; else $(CYGPATH_W) '$(srcdir)/src/rijndael.c'; fi` src/sipp-xp_parser.o: src/xp_parser.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -MT src/sipp-xp_parser.o -MD -MP -MF src/$(DEPDIR)/sipp-xp_parser.Tpo -c -o src/sipp-xp_parser.o `test -f 'src/xp_parser.c' || echo '$(srcdir)/'`src/xp_parser.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-xp_parser.Tpo src/$(DEPDIR)/sipp-xp_parser.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/xp_parser.c' object='src/sipp-xp_parser.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -c -o src/sipp-xp_parser.o `test -f 'src/xp_parser.c' || echo '$(srcdir)/'`src/xp_parser.c src/sipp-xp_parser.obj: src/xp_parser.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -MT src/sipp-xp_parser.obj -MD -MP -MF src/$(DEPDIR)/sipp-xp_parser.Tpo -c -o src/sipp-xp_parser.obj `if test -f 'src/xp_parser.c'; then $(CYGPATH_W) 'src/xp_parser.c'; else $(CYGPATH_W) '$(srcdir)/src/xp_parser.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-xp_parser.Tpo src/$(DEPDIR)/sipp-xp_parser.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/xp_parser.c' object='src/sipp-xp_parser.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -c -o src/sipp-xp_parser.obj `if test -f 'src/xp_parser.c'; then $(CYGPATH_W) 'src/xp_parser.c'; else $(CYGPATH_W) '$(srcdir)/src/xp_parser.c'; fi` src/sipp-prepare_pcap.o: src/prepare_pcap.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -MT src/sipp-prepare_pcap.o -MD -MP -MF src/$(DEPDIR)/sipp-prepare_pcap.Tpo -c -o src/sipp-prepare_pcap.o `test -f 'src/prepare_pcap.c' || echo '$(srcdir)/'`src/prepare_pcap.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-prepare_pcap.Tpo src/$(DEPDIR)/sipp-prepare_pcap.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/prepare_pcap.c' object='src/sipp-prepare_pcap.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -c -o src/sipp-prepare_pcap.o `test -f 'src/prepare_pcap.c' || echo '$(srcdir)/'`src/prepare_pcap.c src/sipp-prepare_pcap.obj: src/prepare_pcap.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -MT src/sipp-prepare_pcap.obj -MD -MP -MF src/$(DEPDIR)/sipp-prepare_pcap.Tpo -c -o src/sipp-prepare_pcap.obj `if test -f 'src/prepare_pcap.c'; then $(CYGPATH_W) 'src/prepare_pcap.c'; else $(CYGPATH_W) '$(srcdir)/src/prepare_pcap.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-prepare_pcap.Tpo src/$(DEPDIR)/sipp-prepare_pcap.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/prepare_pcap.c' object='src/sipp-prepare_pcap.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -c -o src/sipp-prepare_pcap.obj `if test -f 'src/prepare_pcap.c'; then $(CYGPATH_W) 'src/prepare_pcap.c'; else $(CYGPATH_W) '$(srcdir)/src/prepare_pcap.c'; fi` src/sipp-send_packets.o: src/send_packets.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -MT src/sipp-send_packets.o -MD -MP -MF src/$(DEPDIR)/sipp-send_packets.Tpo -c -o src/sipp-send_packets.o `test -f 'src/send_packets.c' || echo '$(srcdir)/'`src/send_packets.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-send_packets.Tpo src/$(DEPDIR)/sipp-send_packets.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/send_packets.c' object='src/sipp-send_packets.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -c -o src/sipp-send_packets.o `test -f 'src/send_packets.c' || echo '$(srcdir)/'`src/send_packets.c src/sipp-send_packets.obj: src/send_packets.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -MT src/sipp-send_packets.obj -MD -MP -MF src/$(DEPDIR)/sipp-send_packets.Tpo -c -o src/sipp-send_packets.obj `if test -f 'src/send_packets.c'; then $(CYGPATH_W) 'src/send_packets.c'; else $(CYGPATH_W) '$(srcdir)/src/send_packets.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-send_packets.Tpo src/$(DEPDIR)/sipp-send_packets.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/send_packets.c' object='src/sipp-send_packets.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -c -o src/sipp-send_packets.obj `if test -f 'src/send_packets.c'; then $(CYGPATH_W) 'src/send_packets.c'; else $(CYGPATH_W) '$(srcdir)/src/send_packets.c'; fi` src/sipp_unittest-comp.o: src/comp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -MT src/sipp_unittest-comp.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-comp.Tpo -c -o src/sipp_unittest-comp.o `test -f 'src/comp.c' || echo '$(srcdir)/'`src/comp.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-comp.Tpo src/$(DEPDIR)/sipp_unittest-comp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/comp.c' object='src/sipp_unittest-comp.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -c -o src/sipp_unittest-comp.o `test -f 'src/comp.c' || echo '$(srcdir)/'`src/comp.c src/sipp_unittest-comp.obj: src/comp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -MT src/sipp_unittest-comp.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-comp.Tpo -c -o src/sipp_unittest-comp.obj `if test -f 'src/comp.c'; then $(CYGPATH_W) 'src/comp.c'; else $(CYGPATH_W) '$(srcdir)/src/comp.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-comp.Tpo src/$(DEPDIR)/sipp_unittest-comp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/comp.c' object='src/sipp_unittest-comp.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -c -o src/sipp_unittest-comp.obj `if test -f 'src/comp.c'; then $(CYGPATH_W) 'src/comp.c'; else $(CYGPATH_W) '$(srcdir)/src/comp.c'; fi` src/sipp_unittest-md5.o: src/md5.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -MT src/sipp_unittest-md5.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-md5.Tpo -c -o src/sipp_unittest-md5.o `test -f 'src/md5.c' || echo '$(srcdir)/'`src/md5.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-md5.Tpo src/$(DEPDIR)/sipp_unittest-md5.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/md5.c' object='src/sipp_unittest-md5.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -c -o src/sipp_unittest-md5.o `test -f 'src/md5.c' || echo '$(srcdir)/'`src/md5.c src/sipp_unittest-md5.obj: src/md5.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -MT src/sipp_unittest-md5.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-md5.Tpo -c -o src/sipp_unittest-md5.obj `if test -f 'src/md5.c'; then $(CYGPATH_W) 'src/md5.c'; else $(CYGPATH_W) '$(srcdir)/src/md5.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-md5.Tpo src/$(DEPDIR)/sipp_unittest-md5.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/md5.c' object='src/sipp_unittest-md5.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -c -o src/sipp_unittest-md5.obj `if test -f 'src/md5.c'; then $(CYGPATH_W) 'src/md5.c'; else $(CYGPATH_W) '$(srcdir)/src/md5.c'; fi` src/sipp_unittest-milenage.o: src/milenage.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -MT src/sipp_unittest-milenage.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-milenage.Tpo -c -o src/sipp_unittest-milenage.o `test -f 'src/milenage.c' || echo '$(srcdir)/'`src/milenage.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-milenage.Tpo src/$(DEPDIR)/sipp_unittest-milenage.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/milenage.c' object='src/sipp_unittest-milenage.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -c -o src/sipp_unittest-milenage.o `test -f 'src/milenage.c' || echo '$(srcdir)/'`src/milenage.c src/sipp_unittest-milenage.obj: src/milenage.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -MT src/sipp_unittest-milenage.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-milenage.Tpo -c -o src/sipp_unittest-milenage.obj `if test -f 'src/milenage.c'; then $(CYGPATH_W) 'src/milenage.c'; else $(CYGPATH_W) '$(srcdir)/src/milenage.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-milenage.Tpo src/$(DEPDIR)/sipp_unittest-milenage.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/milenage.c' object='src/sipp_unittest-milenage.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -c -o src/sipp_unittest-milenage.obj `if test -f 'src/milenage.c'; then $(CYGPATH_W) 'src/milenage.c'; else $(CYGPATH_W) '$(srcdir)/src/milenage.c'; fi` src/sipp_unittest-rijndael.o: src/rijndael.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -MT src/sipp_unittest-rijndael.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-rijndael.Tpo -c -o src/sipp_unittest-rijndael.o `test -f 'src/rijndael.c' || echo '$(srcdir)/'`src/rijndael.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-rijndael.Tpo src/$(DEPDIR)/sipp_unittest-rijndael.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/rijndael.c' object='src/sipp_unittest-rijndael.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -c -o src/sipp_unittest-rijndael.o `test -f 'src/rijndael.c' || echo '$(srcdir)/'`src/rijndael.c src/sipp_unittest-rijndael.obj: src/rijndael.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -MT src/sipp_unittest-rijndael.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-rijndael.Tpo -c -o src/sipp_unittest-rijndael.obj `if test -f 'src/rijndael.c'; then $(CYGPATH_W) 'src/rijndael.c'; else $(CYGPATH_W) '$(srcdir)/src/rijndael.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-rijndael.Tpo src/$(DEPDIR)/sipp_unittest-rijndael.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/rijndael.c' object='src/sipp_unittest-rijndael.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -c -o src/sipp_unittest-rijndael.obj `if test -f 'src/rijndael.c'; then $(CYGPATH_W) 'src/rijndael.c'; else $(CYGPATH_W) '$(srcdir)/src/rijndael.c'; fi` src/sipp_unittest-xp_parser.o: src/xp_parser.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -MT src/sipp_unittest-xp_parser.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-xp_parser.Tpo -c -o src/sipp_unittest-xp_parser.o `test -f 'src/xp_parser.c' || echo '$(srcdir)/'`src/xp_parser.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-xp_parser.Tpo src/$(DEPDIR)/sipp_unittest-xp_parser.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/xp_parser.c' object='src/sipp_unittest-xp_parser.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -c -o src/sipp_unittest-xp_parser.o `test -f 'src/xp_parser.c' || echo '$(srcdir)/'`src/xp_parser.c src/sipp_unittest-xp_parser.obj: src/xp_parser.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -MT src/sipp_unittest-xp_parser.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-xp_parser.Tpo -c -o src/sipp_unittest-xp_parser.obj `if test -f 'src/xp_parser.c'; then $(CYGPATH_W) 'src/xp_parser.c'; else $(CYGPATH_W) '$(srcdir)/src/xp_parser.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-xp_parser.Tpo src/$(DEPDIR)/sipp_unittest-xp_parser.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/xp_parser.c' object='src/sipp_unittest-xp_parser.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -c -o src/sipp_unittest-xp_parser.obj `if test -f 'src/xp_parser.c'; then $(CYGPATH_W) 'src/xp_parser.c'; else $(CYGPATH_W) '$(srcdir)/src/xp_parser.c'; fi` src/sipp_unittest-prepare_pcap.o: src/prepare_pcap.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -MT src/sipp_unittest-prepare_pcap.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-prepare_pcap.Tpo -c -o src/sipp_unittest-prepare_pcap.o `test -f 'src/prepare_pcap.c' || echo '$(srcdir)/'`src/prepare_pcap.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-prepare_pcap.Tpo src/$(DEPDIR)/sipp_unittest-prepare_pcap.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/prepare_pcap.c' object='src/sipp_unittest-prepare_pcap.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -c -o src/sipp_unittest-prepare_pcap.o `test -f 'src/prepare_pcap.c' || echo '$(srcdir)/'`src/prepare_pcap.c src/sipp_unittest-prepare_pcap.obj: src/prepare_pcap.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -MT src/sipp_unittest-prepare_pcap.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-prepare_pcap.Tpo -c -o src/sipp_unittest-prepare_pcap.obj `if test -f 'src/prepare_pcap.c'; then $(CYGPATH_W) 'src/prepare_pcap.c'; else $(CYGPATH_W) '$(srcdir)/src/prepare_pcap.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-prepare_pcap.Tpo src/$(DEPDIR)/sipp_unittest-prepare_pcap.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/prepare_pcap.c' object='src/sipp_unittest-prepare_pcap.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -c -o src/sipp_unittest-prepare_pcap.obj `if test -f 'src/prepare_pcap.c'; then $(CYGPATH_W) 'src/prepare_pcap.c'; else $(CYGPATH_W) '$(srcdir)/src/prepare_pcap.c'; fi` src/sipp_unittest-send_packets.o: src/send_packets.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -MT src/sipp_unittest-send_packets.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-send_packets.Tpo -c -o src/sipp_unittest-send_packets.o `test -f 'src/send_packets.c' || echo '$(srcdir)/'`src/send_packets.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-send_packets.Tpo src/$(DEPDIR)/sipp_unittest-send_packets.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/send_packets.c' object='src/sipp_unittest-send_packets.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -c -o src/sipp_unittest-send_packets.o `test -f 'src/send_packets.c' || echo '$(srcdir)/'`src/send_packets.c src/sipp_unittest-send_packets.obj: src/send_packets.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -MT src/sipp_unittest-send_packets.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-send_packets.Tpo -c -o src/sipp_unittest-send_packets.obj `if test -f 'src/send_packets.c'; then $(CYGPATH_W) 'src/send_packets.c'; else $(CYGPATH_W) '$(srcdir)/src/send_packets.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-send_packets.Tpo src/$(DEPDIR)/sipp_unittest-send_packets.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/send_packets.c' object='src/sipp_unittest-send_packets.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -c -o src/sipp_unittest-send_packets.obj `if test -f 'src/send_packets.c'; then $(CYGPATH_W) 'src/send_packets.c'; else $(CYGPATH_W) '$(srcdir)/src/send_packets.c'; fi` .cc.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` src/sipp-actions.o: src/actions.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-actions.o -MD -MP -MF src/$(DEPDIR)/sipp-actions.Tpo -c -o src/sipp-actions.o `test -f 'src/actions.cpp' || echo '$(srcdir)/'`src/actions.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-actions.Tpo src/$(DEPDIR)/sipp-actions.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/actions.cpp' object='src/sipp-actions.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-actions.o `test -f 'src/actions.cpp' || echo '$(srcdir)/'`src/actions.cpp src/sipp-actions.obj: src/actions.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-actions.obj -MD -MP -MF src/$(DEPDIR)/sipp-actions.Tpo -c -o src/sipp-actions.obj `if test -f 'src/actions.cpp'; then $(CYGPATH_W) 'src/actions.cpp'; else $(CYGPATH_W) '$(srcdir)/src/actions.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-actions.Tpo src/$(DEPDIR)/sipp-actions.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/actions.cpp' object='src/sipp-actions.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-actions.obj `if test -f 'src/actions.cpp'; then $(CYGPATH_W) 'src/actions.cpp'; else $(CYGPATH_W) '$(srcdir)/src/actions.cpp'; fi` src/sipp-auth.o: src/auth.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-auth.o -MD -MP -MF src/$(DEPDIR)/sipp-auth.Tpo -c -o src/sipp-auth.o `test -f 'src/auth.cpp' || echo '$(srcdir)/'`src/auth.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-auth.Tpo src/$(DEPDIR)/sipp-auth.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/auth.cpp' object='src/sipp-auth.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-auth.o `test -f 'src/auth.cpp' || echo '$(srcdir)/'`src/auth.cpp src/sipp-auth.obj: src/auth.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-auth.obj -MD -MP -MF src/$(DEPDIR)/sipp-auth.Tpo -c -o src/sipp-auth.obj `if test -f 'src/auth.cpp'; then $(CYGPATH_W) 'src/auth.cpp'; else $(CYGPATH_W) '$(srcdir)/src/auth.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-auth.Tpo src/$(DEPDIR)/sipp-auth.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/auth.cpp' object='src/sipp-auth.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-auth.obj `if test -f 'src/auth.cpp'; then $(CYGPATH_W) 'src/auth.cpp'; else $(CYGPATH_W) '$(srcdir)/src/auth.cpp'; fi` src/sipp-call.o: src/call.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-call.o -MD -MP -MF src/$(DEPDIR)/sipp-call.Tpo -c -o src/sipp-call.o `test -f 'src/call.cpp' || echo '$(srcdir)/'`src/call.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-call.Tpo src/$(DEPDIR)/sipp-call.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/call.cpp' object='src/sipp-call.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-call.o `test -f 'src/call.cpp' || echo '$(srcdir)/'`src/call.cpp src/sipp-call.obj: src/call.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-call.obj -MD -MP -MF src/$(DEPDIR)/sipp-call.Tpo -c -o src/sipp-call.obj `if test -f 'src/call.cpp'; then $(CYGPATH_W) 'src/call.cpp'; else $(CYGPATH_W) '$(srcdir)/src/call.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-call.Tpo src/$(DEPDIR)/sipp-call.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/call.cpp' object='src/sipp-call.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-call.obj `if test -f 'src/call.cpp'; then $(CYGPATH_W) 'src/call.cpp'; else $(CYGPATH_W) '$(srcdir)/src/call.cpp'; fi` src/sipp-deadcall.o: src/deadcall.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-deadcall.o -MD -MP -MF src/$(DEPDIR)/sipp-deadcall.Tpo -c -o src/sipp-deadcall.o `test -f 'src/deadcall.cpp' || echo '$(srcdir)/'`src/deadcall.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-deadcall.Tpo src/$(DEPDIR)/sipp-deadcall.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/deadcall.cpp' object='src/sipp-deadcall.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-deadcall.o `test -f 'src/deadcall.cpp' || echo '$(srcdir)/'`src/deadcall.cpp src/sipp-deadcall.obj: src/deadcall.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-deadcall.obj -MD -MP -MF src/$(DEPDIR)/sipp-deadcall.Tpo -c -o src/sipp-deadcall.obj `if test -f 'src/deadcall.cpp'; then $(CYGPATH_W) 'src/deadcall.cpp'; else $(CYGPATH_W) '$(srcdir)/src/deadcall.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-deadcall.Tpo src/$(DEPDIR)/sipp-deadcall.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/deadcall.cpp' object='src/sipp-deadcall.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-deadcall.obj `if test -f 'src/deadcall.cpp'; then $(CYGPATH_W) 'src/deadcall.cpp'; else $(CYGPATH_W) '$(srcdir)/src/deadcall.cpp'; fi` src/sipp-infile.o: src/infile.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-infile.o -MD -MP -MF src/$(DEPDIR)/sipp-infile.Tpo -c -o src/sipp-infile.o `test -f 'src/infile.cpp' || echo '$(srcdir)/'`src/infile.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-infile.Tpo src/$(DEPDIR)/sipp-infile.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/infile.cpp' object='src/sipp-infile.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-infile.o `test -f 'src/infile.cpp' || echo '$(srcdir)/'`src/infile.cpp src/sipp-infile.obj: src/infile.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-infile.obj -MD -MP -MF src/$(DEPDIR)/sipp-infile.Tpo -c -o src/sipp-infile.obj `if test -f 'src/infile.cpp'; then $(CYGPATH_W) 'src/infile.cpp'; else $(CYGPATH_W) '$(srcdir)/src/infile.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-infile.Tpo src/$(DEPDIR)/sipp-infile.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/infile.cpp' object='src/sipp-infile.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-infile.obj `if test -f 'src/infile.cpp'; then $(CYGPATH_W) 'src/infile.cpp'; else $(CYGPATH_W) '$(srcdir)/src/infile.cpp'; fi` src/sipp-listener.o: src/listener.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-listener.o -MD -MP -MF src/$(DEPDIR)/sipp-listener.Tpo -c -o src/sipp-listener.o `test -f 'src/listener.cpp' || echo '$(srcdir)/'`src/listener.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-listener.Tpo src/$(DEPDIR)/sipp-listener.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/listener.cpp' object='src/sipp-listener.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-listener.o `test -f 'src/listener.cpp' || echo '$(srcdir)/'`src/listener.cpp src/sipp-listener.obj: src/listener.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-listener.obj -MD -MP -MF src/$(DEPDIR)/sipp-listener.Tpo -c -o src/sipp-listener.obj `if test -f 'src/listener.cpp'; then $(CYGPATH_W) 'src/listener.cpp'; else $(CYGPATH_W) '$(srcdir)/src/listener.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-listener.Tpo src/$(DEPDIR)/sipp-listener.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/listener.cpp' object='src/sipp-listener.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-listener.obj `if test -f 'src/listener.cpp'; then $(CYGPATH_W) 'src/listener.cpp'; else $(CYGPATH_W) '$(srcdir)/src/listener.cpp'; fi` src/sipp-logger.o: src/logger.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-logger.o -MD -MP -MF src/$(DEPDIR)/sipp-logger.Tpo -c -o src/sipp-logger.o `test -f 'src/logger.cpp' || echo '$(srcdir)/'`src/logger.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-logger.Tpo src/$(DEPDIR)/sipp-logger.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/logger.cpp' object='src/sipp-logger.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-logger.o `test -f 'src/logger.cpp' || echo '$(srcdir)/'`src/logger.cpp src/sipp-logger.obj: src/logger.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-logger.obj -MD -MP -MF src/$(DEPDIR)/sipp-logger.Tpo -c -o src/sipp-logger.obj `if test -f 'src/logger.cpp'; then $(CYGPATH_W) 'src/logger.cpp'; else $(CYGPATH_W) '$(srcdir)/src/logger.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-logger.Tpo src/$(DEPDIR)/sipp-logger.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/logger.cpp' object='src/sipp-logger.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-logger.obj `if test -f 'src/logger.cpp'; then $(CYGPATH_W) 'src/logger.cpp'; else $(CYGPATH_W) '$(srcdir)/src/logger.cpp'; fi` src/sipp-message.o: src/message.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-message.o -MD -MP -MF src/$(DEPDIR)/sipp-message.Tpo -c -o src/sipp-message.o `test -f 'src/message.cpp' || echo '$(srcdir)/'`src/message.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-message.Tpo src/$(DEPDIR)/sipp-message.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/message.cpp' object='src/sipp-message.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-message.o `test -f 'src/message.cpp' || echo '$(srcdir)/'`src/message.cpp src/sipp-message.obj: src/message.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-message.obj -MD -MP -MF src/$(DEPDIR)/sipp-message.Tpo -c -o src/sipp-message.obj `if test -f 'src/message.cpp'; then $(CYGPATH_W) 'src/message.cpp'; else $(CYGPATH_W) '$(srcdir)/src/message.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-message.Tpo src/$(DEPDIR)/sipp-message.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/message.cpp' object='src/sipp-message.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-message.obj `if test -f 'src/message.cpp'; then $(CYGPATH_W) 'src/message.cpp'; else $(CYGPATH_W) '$(srcdir)/src/message.cpp'; fi` src/sipp-call_generation_task.o: src/call_generation_task.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-call_generation_task.o -MD -MP -MF src/$(DEPDIR)/sipp-call_generation_task.Tpo -c -o src/sipp-call_generation_task.o `test -f 'src/call_generation_task.cpp' || echo '$(srcdir)/'`src/call_generation_task.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-call_generation_task.Tpo src/$(DEPDIR)/sipp-call_generation_task.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/call_generation_task.cpp' object='src/sipp-call_generation_task.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-call_generation_task.o `test -f 'src/call_generation_task.cpp' || echo '$(srcdir)/'`src/call_generation_task.cpp src/sipp-call_generation_task.obj: src/call_generation_task.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-call_generation_task.obj -MD -MP -MF src/$(DEPDIR)/sipp-call_generation_task.Tpo -c -o src/sipp-call_generation_task.obj `if test -f 'src/call_generation_task.cpp'; then $(CYGPATH_W) 'src/call_generation_task.cpp'; else $(CYGPATH_W) '$(srcdir)/src/call_generation_task.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-call_generation_task.Tpo src/$(DEPDIR)/sipp-call_generation_task.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/call_generation_task.cpp' object='src/sipp-call_generation_task.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-call_generation_task.obj `if test -f 'src/call_generation_task.cpp'; then $(CYGPATH_W) 'src/call_generation_task.cpp'; else $(CYGPATH_W) '$(srcdir)/src/call_generation_task.cpp'; fi` src/sipp-ratetask.o: src/ratetask.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-ratetask.o -MD -MP -MF src/$(DEPDIR)/sipp-ratetask.Tpo -c -o src/sipp-ratetask.o `test -f 'src/ratetask.cpp' || echo '$(srcdir)/'`src/ratetask.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-ratetask.Tpo src/$(DEPDIR)/sipp-ratetask.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/ratetask.cpp' object='src/sipp-ratetask.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-ratetask.o `test -f 'src/ratetask.cpp' || echo '$(srcdir)/'`src/ratetask.cpp src/sipp-ratetask.obj: src/ratetask.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-ratetask.obj -MD -MP -MF src/$(DEPDIR)/sipp-ratetask.Tpo -c -o src/sipp-ratetask.obj `if test -f 'src/ratetask.cpp'; then $(CYGPATH_W) 'src/ratetask.cpp'; else $(CYGPATH_W) '$(srcdir)/src/ratetask.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-ratetask.Tpo src/$(DEPDIR)/sipp-ratetask.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/ratetask.cpp' object='src/sipp-ratetask.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-ratetask.obj `if test -f 'src/ratetask.cpp'; then $(CYGPATH_W) 'src/ratetask.cpp'; else $(CYGPATH_W) '$(srcdir)/src/ratetask.cpp'; fi` src/sipp-reporttask.o: src/reporttask.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-reporttask.o -MD -MP -MF src/$(DEPDIR)/sipp-reporttask.Tpo -c -o src/sipp-reporttask.o `test -f 'src/reporttask.cpp' || echo '$(srcdir)/'`src/reporttask.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-reporttask.Tpo src/$(DEPDIR)/sipp-reporttask.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/reporttask.cpp' object='src/sipp-reporttask.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-reporttask.o `test -f 'src/reporttask.cpp' || echo '$(srcdir)/'`src/reporttask.cpp src/sipp-reporttask.obj: src/reporttask.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-reporttask.obj -MD -MP -MF src/$(DEPDIR)/sipp-reporttask.Tpo -c -o src/sipp-reporttask.obj `if test -f 'src/reporttask.cpp'; then $(CYGPATH_W) 'src/reporttask.cpp'; else $(CYGPATH_W) '$(srcdir)/src/reporttask.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-reporttask.Tpo src/$(DEPDIR)/sipp-reporttask.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/reporttask.cpp' object='src/sipp-reporttask.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-reporttask.obj `if test -f 'src/reporttask.cpp'; then $(CYGPATH_W) 'src/reporttask.cpp'; else $(CYGPATH_W) '$(srcdir)/src/reporttask.cpp'; fi` src/sipp-scenario.o: src/scenario.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-scenario.o -MD -MP -MF src/$(DEPDIR)/sipp-scenario.Tpo -c -o src/sipp-scenario.o `test -f 'src/scenario.cpp' || echo '$(srcdir)/'`src/scenario.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-scenario.Tpo src/$(DEPDIR)/sipp-scenario.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/scenario.cpp' object='src/sipp-scenario.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-scenario.o `test -f 'src/scenario.cpp' || echo '$(srcdir)/'`src/scenario.cpp src/sipp-scenario.obj: src/scenario.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-scenario.obj -MD -MP -MF src/$(DEPDIR)/sipp-scenario.Tpo -c -o src/sipp-scenario.obj `if test -f 'src/scenario.cpp'; then $(CYGPATH_W) 'src/scenario.cpp'; else $(CYGPATH_W) '$(srcdir)/src/scenario.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-scenario.Tpo src/$(DEPDIR)/sipp-scenario.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/scenario.cpp' object='src/sipp-scenario.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-scenario.obj `if test -f 'src/scenario.cpp'; then $(CYGPATH_W) 'src/scenario.cpp'; else $(CYGPATH_W) '$(srcdir)/src/scenario.cpp'; fi` src/sipp-sip_parser.o: src/sip_parser.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-sip_parser.o -MD -MP -MF src/$(DEPDIR)/sipp-sip_parser.Tpo -c -o src/sipp-sip_parser.o `test -f 'src/sip_parser.cpp' || echo '$(srcdir)/'`src/sip_parser.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-sip_parser.Tpo src/$(DEPDIR)/sipp-sip_parser.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/sip_parser.cpp' object='src/sipp-sip_parser.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-sip_parser.o `test -f 'src/sip_parser.cpp' || echo '$(srcdir)/'`src/sip_parser.cpp src/sipp-sip_parser.obj: src/sip_parser.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-sip_parser.obj -MD -MP -MF src/$(DEPDIR)/sipp-sip_parser.Tpo -c -o src/sipp-sip_parser.obj `if test -f 'src/sip_parser.cpp'; then $(CYGPATH_W) 'src/sip_parser.cpp'; else $(CYGPATH_W) '$(srcdir)/src/sip_parser.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-sip_parser.Tpo src/$(DEPDIR)/sipp-sip_parser.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/sip_parser.cpp' object='src/sipp-sip_parser.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-sip_parser.obj `if test -f 'src/sip_parser.cpp'; then $(CYGPATH_W) 'src/sip_parser.cpp'; else $(CYGPATH_W) '$(srcdir)/src/sip_parser.cpp'; fi` src/sipp-screen.o: src/screen.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-screen.o -MD -MP -MF src/$(DEPDIR)/sipp-screen.Tpo -c -o src/sipp-screen.o `test -f 'src/screen.cpp' || echo '$(srcdir)/'`src/screen.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-screen.Tpo src/$(DEPDIR)/sipp-screen.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/screen.cpp' object='src/sipp-screen.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-screen.o `test -f 'src/screen.cpp' || echo '$(srcdir)/'`src/screen.cpp src/sipp-screen.obj: src/screen.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-screen.obj -MD -MP -MF src/$(DEPDIR)/sipp-screen.Tpo -c -o src/sipp-screen.obj `if test -f 'src/screen.cpp'; then $(CYGPATH_W) 'src/screen.cpp'; else $(CYGPATH_W) '$(srcdir)/src/screen.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-screen.Tpo src/$(DEPDIR)/sipp-screen.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/screen.cpp' object='src/sipp-screen.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-screen.obj `if test -f 'src/screen.cpp'; then $(CYGPATH_W) 'src/screen.cpp'; else $(CYGPATH_W) '$(srcdir)/src/screen.cpp'; fi` src/sipp-socket.o: src/socket.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-socket.o -MD -MP -MF src/$(DEPDIR)/sipp-socket.Tpo -c -o src/sipp-socket.o `test -f 'src/socket.cpp' || echo '$(srcdir)/'`src/socket.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-socket.Tpo src/$(DEPDIR)/sipp-socket.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/socket.cpp' object='src/sipp-socket.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-socket.o `test -f 'src/socket.cpp' || echo '$(srcdir)/'`src/socket.cpp src/sipp-socket.obj: src/socket.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-socket.obj -MD -MP -MF src/$(DEPDIR)/sipp-socket.Tpo -c -o src/sipp-socket.obj `if test -f 'src/socket.cpp'; then $(CYGPATH_W) 'src/socket.cpp'; else $(CYGPATH_W) '$(srcdir)/src/socket.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-socket.Tpo src/$(DEPDIR)/sipp-socket.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/socket.cpp' object='src/sipp-socket.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-socket.obj `if test -f 'src/socket.cpp'; then $(CYGPATH_W) 'src/socket.cpp'; else $(CYGPATH_W) '$(srcdir)/src/socket.cpp'; fi` src/sipp-socketowner.o: src/socketowner.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-socketowner.o -MD -MP -MF src/$(DEPDIR)/sipp-socketowner.Tpo -c -o src/sipp-socketowner.o `test -f 'src/socketowner.cpp' || echo '$(srcdir)/'`src/socketowner.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-socketowner.Tpo src/$(DEPDIR)/sipp-socketowner.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/socketowner.cpp' object='src/sipp-socketowner.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-socketowner.o `test -f 'src/socketowner.cpp' || echo '$(srcdir)/'`src/socketowner.cpp src/sipp-socketowner.obj: src/socketowner.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-socketowner.obj -MD -MP -MF src/$(DEPDIR)/sipp-socketowner.Tpo -c -o src/sipp-socketowner.obj `if test -f 'src/socketowner.cpp'; then $(CYGPATH_W) 'src/socketowner.cpp'; else $(CYGPATH_W) '$(srcdir)/src/socketowner.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-socketowner.Tpo src/$(DEPDIR)/sipp-socketowner.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/socketowner.cpp' object='src/sipp-socketowner.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-socketowner.obj `if test -f 'src/socketowner.cpp'; then $(CYGPATH_W) 'src/socketowner.cpp'; else $(CYGPATH_W) '$(srcdir)/src/socketowner.cpp'; fi` src/sipp-stat.o: src/stat.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-stat.o -MD -MP -MF src/$(DEPDIR)/sipp-stat.Tpo -c -o src/sipp-stat.o `test -f 'src/stat.cpp' || echo '$(srcdir)/'`src/stat.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-stat.Tpo src/$(DEPDIR)/sipp-stat.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/stat.cpp' object='src/sipp-stat.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-stat.o `test -f 'src/stat.cpp' || echo '$(srcdir)/'`src/stat.cpp src/sipp-stat.obj: src/stat.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-stat.obj -MD -MP -MF src/$(DEPDIR)/sipp-stat.Tpo -c -o src/sipp-stat.obj `if test -f 'src/stat.cpp'; then $(CYGPATH_W) 'src/stat.cpp'; else $(CYGPATH_W) '$(srcdir)/src/stat.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-stat.Tpo src/$(DEPDIR)/sipp-stat.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/stat.cpp' object='src/sipp-stat.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-stat.obj `if test -f 'src/stat.cpp'; then $(CYGPATH_W) 'src/stat.cpp'; else $(CYGPATH_W) '$(srcdir)/src/stat.cpp'; fi` src/sipp-strings.o: src/strings.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-strings.o -MD -MP -MF src/$(DEPDIR)/sipp-strings.Tpo -c -o src/sipp-strings.o `test -f 'src/strings.cpp' || echo '$(srcdir)/'`src/strings.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-strings.Tpo src/$(DEPDIR)/sipp-strings.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/strings.cpp' object='src/sipp-strings.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-strings.o `test -f 'src/strings.cpp' || echo '$(srcdir)/'`src/strings.cpp src/sipp-strings.obj: src/strings.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-strings.obj -MD -MP -MF src/$(DEPDIR)/sipp-strings.Tpo -c -o src/sipp-strings.obj `if test -f 'src/strings.cpp'; then $(CYGPATH_W) 'src/strings.cpp'; else $(CYGPATH_W) '$(srcdir)/src/strings.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-strings.Tpo src/$(DEPDIR)/sipp-strings.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/strings.cpp' object='src/sipp-strings.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-strings.obj `if test -f 'src/strings.cpp'; then $(CYGPATH_W) 'src/strings.cpp'; else $(CYGPATH_W) '$(srcdir)/src/strings.cpp'; fi` src/sipp-task.o: src/task.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-task.o -MD -MP -MF src/$(DEPDIR)/sipp-task.Tpo -c -o src/sipp-task.o `test -f 'src/task.cpp' || echo '$(srcdir)/'`src/task.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-task.Tpo src/$(DEPDIR)/sipp-task.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/task.cpp' object='src/sipp-task.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-task.o `test -f 'src/task.cpp' || echo '$(srcdir)/'`src/task.cpp src/sipp-task.obj: src/task.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-task.obj -MD -MP -MF src/$(DEPDIR)/sipp-task.Tpo -c -o src/sipp-task.obj `if test -f 'src/task.cpp'; then $(CYGPATH_W) 'src/task.cpp'; else $(CYGPATH_W) '$(srcdir)/src/task.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-task.Tpo src/$(DEPDIR)/sipp-task.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/task.cpp' object='src/sipp-task.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-task.obj `if test -f 'src/task.cpp'; then $(CYGPATH_W) 'src/task.cpp'; else $(CYGPATH_W) '$(srcdir)/src/task.cpp'; fi` src/sipp-time.o: src/time.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-time.o -MD -MP -MF src/$(DEPDIR)/sipp-time.Tpo -c -o src/sipp-time.o `test -f 'src/time.cpp' || echo '$(srcdir)/'`src/time.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-time.Tpo src/$(DEPDIR)/sipp-time.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/time.cpp' object='src/sipp-time.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-time.o `test -f 'src/time.cpp' || echo '$(srcdir)/'`src/time.cpp src/sipp-time.obj: src/time.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-time.obj -MD -MP -MF src/$(DEPDIR)/sipp-time.Tpo -c -o src/sipp-time.obj `if test -f 'src/time.cpp'; then $(CYGPATH_W) 'src/time.cpp'; else $(CYGPATH_W) '$(srcdir)/src/time.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-time.Tpo src/$(DEPDIR)/sipp-time.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/time.cpp' object='src/sipp-time.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-time.obj `if test -f 'src/time.cpp'; then $(CYGPATH_W) 'src/time.cpp'; else $(CYGPATH_W) '$(srcdir)/src/time.cpp'; fi` src/sipp-variables.o: src/variables.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-variables.o -MD -MP -MF src/$(DEPDIR)/sipp-variables.Tpo -c -o src/sipp-variables.o `test -f 'src/variables.cpp' || echo '$(srcdir)/'`src/variables.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-variables.Tpo src/$(DEPDIR)/sipp-variables.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/variables.cpp' object='src/sipp-variables.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-variables.o `test -f 'src/variables.cpp' || echo '$(srcdir)/'`src/variables.cpp src/sipp-variables.obj: src/variables.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-variables.obj -MD -MP -MF src/$(DEPDIR)/sipp-variables.Tpo -c -o src/sipp-variables.obj `if test -f 'src/variables.cpp'; then $(CYGPATH_W) 'src/variables.cpp'; else $(CYGPATH_W) '$(srcdir)/src/variables.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-variables.Tpo src/$(DEPDIR)/sipp-variables.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/variables.cpp' object='src/sipp-variables.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-variables.obj `if test -f 'src/variables.cpp'; then $(CYGPATH_W) 'src/variables.cpp'; else $(CYGPATH_W) '$(srcdir)/src/variables.cpp'; fi` src/sipp-watchdog.o: src/watchdog.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-watchdog.o -MD -MP -MF src/$(DEPDIR)/sipp-watchdog.Tpo -c -o src/sipp-watchdog.o `test -f 'src/watchdog.cpp' || echo '$(srcdir)/'`src/watchdog.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-watchdog.Tpo src/$(DEPDIR)/sipp-watchdog.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/watchdog.cpp' object='src/sipp-watchdog.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-watchdog.o `test -f 'src/watchdog.cpp' || echo '$(srcdir)/'`src/watchdog.cpp src/sipp-watchdog.obj: src/watchdog.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-watchdog.obj -MD -MP -MF src/$(DEPDIR)/sipp-watchdog.Tpo -c -o src/sipp-watchdog.obj `if test -f 'src/watchdog.cpp'; then $(CYGPATH_W) 'src/watchdog.cpp'; else $(CYGPATH_W) '$(srcdir)/src/watchdog.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-watchdog.Tpo src/$(DEPDIR)/sipp-watchdog.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/watchdog.cpp' object='src/sipp-watchdog.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-watchdog.obj `if test -f 'src/watchdog.cpp'; then $(CYGPATH_W) 'src/watchdog.cpp'; else $(CYGPATH_W) '$(srcdir)/src/watchdog.cpp'; fi` src/sipp-sslsocket.o: src/sslsocket.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-sslsocket.o -MD -MP -MF src/$(DEPDIR)/sipp-sslsocket.Tpo -c -o src/sipp-sslsocket.o `test -f 'src/sslsocket.cpp' || echo '$(srcdir)/'`src/sslsocket.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-sslsocket.Tpo src/$(DEPDIR)/sipp-sslsocket.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/sslsocket.cpp' object='src/sipp-sslsocket.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-sslsocket.o `test -f 'src/sslsocket.cpp' || echo '$(srcdir)/'`src/sslsocket.cpp src/sipp-sslsocket.obj: src/sslsocket.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-sslsocket.obj -MD -MP -MF src/$(DEPDIR)/sipp-sslsocket.Tpo -c -o src/sipp-sslsocket.obj `if test -f 'src/sslsocket.cpp'; then $(CYGPATH_W) 'src/sslsocket.cpp'; else $(CYGPATH_W) '$(srcdir)/src/sslsocket.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-sslsocket.Tpo src/$(DEPDIR)/sipp-sslsocket.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/sslsocket.cpp' object='src/sipp-sslsocket.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-sslsocket.obj `if test -f 'src/sslsocket.cpp'; then $(CYGPATH_W) 'src/sslsocket.cpp'; else $(CYGPATH_W) '$(srcdir)/src/sslsocket.cpp'; fi` src/sipp-rtpstream.o: src/rtpstream.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-rtpstream.o -MD -MP -MF src/$(DEPDIR)/sipp-rtpstream.Tpo -c -o src/sipp-rtpstream.o `test -f 'src/rtpstream.cpp' || echo '$(srcdir)/'`src/rtpstream.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-rtpstream.Tpo src/$(DEPDIR)/sipp-rtpstream.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/rtpstream.cpp' object='src/sipp-rtpstream.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-rtpstream.o `test -f 'src/rtpstream.cpp' || echo '$(srcdir)/'`src/rtpstream.cpp src/sipp-rtpstream.obj: src/rtpstream.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-rtpstream.obj -MD -MP -MF src/$(DEPDIR)/sipp-rtpstream.Tpo -c -o src/sipp-rtpstream.obj `if test -f 'src/rtpstream.cpp'; then $(CYGPATH_W) 'src/rtpstream.cpp'; else $(CYGPATH_W) '$(srcdir)/src/rtpstream.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-rtpstream.Tpo src/$(DEPDIR)/sipp-rtpstream.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/rtpstream.cpp' object='src/sipp-rtpstream.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-rtpstream.obj `if test -f 'src/rtpstream.cpp'; then $(CYGPATH_W) 'src/rtpstream.cpp'; else $(CYGPATH_W) '$(srcdir)/src/rtpstream.cpp'; fi` src/sipp-sipp.o: src/sipp.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-sipp.o -MD -MP -MF src/$(DEPDIR)/sipp-sipp.Tpo -c -o src/sipp-sipp.o `test -f 'src/sipp.cpp' || echo '$(srcdir)/'`src/sipp.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-sipp.Tpo src/$(DEPDIR)/sipp-sipp.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/sipp.cpp' object='src/sipp-sipp.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-sipp.o `test -f 'src/sipp.cpp' || echo '$(srcdir)/'`src/sipp.cpp src/sipp-sipp.obj: src/sipp.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-sipp.obj -MD -MP -MF src/$(DEPDIR)/sipp-sipp.Tpo -c -o src/sipp-sipp.obj `if test -f 'src/sipp.cpp'; then $(CYGPATH_W) 'src/sipp.cpp'; else $(CYGPATH_W) '$(srcdir)/src/sipp.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-sipp.Tpo src/$(DEPDIR)/sipp-sipp.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/sipp.cpp' object='src/sipp-sipp.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-sipp.obj `if test -f 'src/sipp.cpp'; then $(CYGPATH_W) 'src/sipp.cpp'; else $(CYGPATH_W) '$(srcdir)/src/sipp.cpp'; fi` src/sipp_unittest-actions.o: src/actions.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-actions.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-actions.Tpo -c -o src/sipp_unittest-actions.o `test -f 'src/actions.cpp' || echo '$(srcdir)/'`src/actions.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-actions.Tpo src/$(DEPDIR)/sipp_unittest-actions.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/actions.cpp' object='src/sipp_unittest-actions.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-actions.o `test -f 'src/actions.cpp' || echo '$(srcdir)/'`src/actions.cpp src/sipp_unittest-actions.obj: src/actions.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-actions.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-actions.Tpo -c -o src/sipp_unittest-actions.obj `if test -f 'src/actions.cpp'; then $(CYGPATH_W) 'src/actions.cpp'; else $(CYGPATH_W) '$(srcdir)/src/actions.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-actions.Tpo src/$(DEPDIR)/sipp_unittest-actions.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/actions.cpp' object='src/sipp_unittest-actions.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-actions.obj `if test -f 'src/actions.cpp'; then $(CYGPATH_W) 'src/actions.cpp'; else $(CYGPATH_W) '$(srcdir)/src/actions.cpp'; fi` src/sipp_unittest-auth.o: src/auth.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-auth.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-auth.Tpo -c -o src/sipp_unittest-auth.o `test -f 'src/auth.cpp' || echo '$(srcdir)/'`src/auth.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-auth.Tpo src/$(DEPDIR)/sipp_unittest-auth.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/auth.cpp' object='src/sipp_unittest-auth.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-auth.o `test -f 'src/auth.cpp' || echo '$(srcdir)/'`src/auth.cpp src/sipp_unittest-auth.obj: src/auth.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-auth.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-auth.Tpo -c -o src/sipp_unittest-auth.obj `if test -f 'src/auth.cpp'; then $(CYGPATH_W) 'src/auth.cpp'; else $(CYGPATH_W) '$(srcdir)/src/auth.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-auth.Tpo src/$(DEPDIR)/sipp_unittest-auth.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/auth.cpp' object='src/sipp_unittest-auth.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-auth.obj `if test -f 'src/auth.cpp'; then $(CYGPATH_W) 'src/auth.cpp'; else $(CYGPATH_W) '$(srcdir)/src/auth.cpp'; fi` src/sipp_unittest-call.o: src/call.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-call.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-call.Tpo -c -o src/sipp_unittest-call.o `test -f 'src/call.cpp' || echo '$(srcdir)/'`src/call.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-call.Tpo src/$(DEPDIR)/sipp_unittest-call.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/call.cpp' object='src/sipp_unittest-call.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-call.o `test -f 'src/call.cpp' || echo '$(srcdir)/'`src/call.cpp src/sipp_unittest-call.obj: src/call.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-call.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-call.Tpo -c -o src/sipp_unittest-call.obj `if test -f 'src/call.cpp'; then $(CYGPATH_W) 'src/call.cpp'; else $(CYGPATH_W) '$(srcdir)/src/call.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-call.Tpo src/$(DEPDIR)/sipp_unittest-call.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/call.cpp' object='src/sipp_unittest-call.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-call.obj `if test -f 'src/call.cpp'; then $(CYGPATH_W) 'src/call.cpp'; else $(CYGPATH_W) '$(srcdir)/src/call.cpp'; fi` src/sipp_unittest-deadcall.o: src/deadcall.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-deadcall.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-deadcall.Tpo -c -o src/sipp_unittest-deadcall.o `test -f 'src/deadcall.cpp' || echo '$(srcdir)/'`src/deadcall.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-deadcall.Tpo src/$(DEPDIR)/sipp_unittest-deadcall.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/deadcall.cpp' object='src/sipp_unittest-deadcall.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-deadcall.o `test -f 'src/deadcall.cpp' || echo '$(srcdir)/'`src/deadcall.cpp src/sipp_unittest-deadcall.obj: src/deadcall.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-deadcall.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-deadcall.Tpo -c -o src/sipp_unittest-deadcall.obj `if test -f 'src/deadcall.cpp'; then $(CYGPATH_W) 'src/deadcall.cpp'; else $(CYGPATH_W) '$(srcdir)/src/deadcall.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-deadcall.Tpo src/$(DEPDIR)/sipp_unittest-deadcall.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/deadcall.cpp' object='src/sipp_unittest-deadcall.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-deadcall.obj `if test -f 'src/deadcall.cpp'; then $(CYGPATH_W) 'src/deadcall.cpp'; else $(CYGPATH_W) '$(srcdir)/src/deadcall.cpp'; fi` src/sipp_unittest-infile.o: src/infile.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-infile.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-infile.Tpo -c -o src/sipp_unittest-infile.o `test -f 'src/infile.cpp' || echo '$(srcdir)/'`src/infile.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-infile.Tpo src/$(DEPDIR)/sipp_unittest-infile.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/infile.cpp' object='src/sipp_unittest-infile.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-infile.o `test -f 'src/infile.cpp' || echo '$(srcdir)/'`src/infile.cpp src/sipp_unittest-infile.obj: src/infile.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-infile.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-infile.Tpo -c -o src/sipp_unittest-infile.obj `if test -f 'src/infile.cpp'; then $(CYGPATH_W) 'src/infile.cpp'; else $(CYGPATH_W) '$(srcdir)/src/infile.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-infile.Tpo src/$(DEPDIR)/sipp_unittest-infile.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/infile.cpp' object='src/sipp_unittest-infile.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-infile.obj `if test -f 'src/infile.cpp'; then $(CYGPATH_W) 'src/infile.cpp'; else $(CYGPATH_W) '$(srcdir)/src/infile.cpp'; fi` src/sipp_unittest-listener.o: src/listener.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-listener.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-listener.Tpo -c -o src/sipp_unittest-listener.o `test -f 'src/listener.cpp' || echo '$(srcdir)/'`src/listener.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-listener.Tpo src/$(DEPDIR)/sipp_unittest-listener.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/listener.cpp' object='src/sipp_unittest-listener.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-listener.o `test -f 'src/listener.cpp' || echo '$(srcdir)/'`src/listener.cpp src/sipp_unittest-listener.obj: src/listener.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-listener.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-listener.Tpo -c -o src/sipp_unittest-listener.obj `if test -f 'src/listener.cpp'; then $(CYGPATH_W) 'src/listener.cpp'; else $(CYGPATH_W) '$(srcdir)/src/listener.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-listener.Tpo src/$(DEPDIR)/sipp_unittest-listener.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/listener.cpp' object='src/sipp_unittest-listener.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-listener.obj `if test -f 'src/listener.cpp'; then $(CYGPATH_W) 'src/listener.cpp'; else $(CYGPATH_W) '$(srcdir)/src/listener.cpp'; fi` src/sipp_unittest-logger.o: src/logger.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-logger.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-logger.Tpo -c -o src/sipp_unittest-logger.o `test -f 'src/logger.cpp' || echo '$(srcdir)/'`src/logger.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-logger.Tpo src/$(DEPDIR)/sipp_unittest-logger.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/logger.cpp' object='src/sipp_unittest-logger.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-logger.o `test -f 'src/logger.cpp' || echo '$(srcdir)/'`src/logger.cpp src/sipp_unittest-logger.obj: src/logger.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-logger.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-logger.Tpo -c -o src/sipp_unittest-logger.obj `if test -f 'src/logger.cpp'; then $(CYGPATH_W) 'src/logger.cpp'; else $(CYGPATH_W) '$(srcdir)/src/logger.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-logger.Tpo src/$(DEPDIR)/sipp_unittest-logger.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/logger.cpp' object='src/sipp_unittest-logger.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-logger.obj `if test -f 'src/logger.cpp'; then $(CYGPATH_W) 'src/logger.cpp'; else $(CYGPATH_W) '$(srcdir)/src/logger.cpp'; fi` src/sipp_unittest-message.o: src/message.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-message.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-message.Tpo -c -o src/sipp_unittest-message.o `test -f 'src/message.cpp' || echo '$(srcdir)/'`src/message.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-message.Tpo src/$(DEPDIR)/sipp_unittest-message.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/message.cpp' object='src/sipp_unittest-message.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-message.o `test -f 'src/message.cpp' || echo '$(srcdir)/'`src/message.cpp src/sipp_unittest-message.obj: src/message.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-message.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-message.Tpo -c -o src/sipp_unittest-message.obj `if test -f 'src/message.cpp'; then $(CYGPATH_W) 'src/message.cpp'; else $(CYGPATH_W) '$(srcdir)/src/message.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-message.Tpo src/$(DEPDIR)/sipp_unittest-message.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/message.cpp' object='src/sipp_unittest-message.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-message.obj `if test -f 'src/message.cpp'; then $(CYGPATH_W) 'src/message.cpp'; else $(CYGPATH_W) '$(srcdir)/src/message.cpp'; fi` src/sipp_unittest-call_generation_task.o: src/call_generation_task.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-call_generation_task.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-call_generation_task.Tpo -c -o src/sipp_unittest-call_generation_task.o `test -f 'src/call_generation_task.cpp' || echo '$(srcdir)/'`src/call_generation_task.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-call_generation_task.Tpo src/$(DEPDIR)/sipp_unittest-call_generation_task.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/call_generation_task.cpp' object='src/sipp_unittest-call_generation_task.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-call_generation_task.o `test -f 'src/call_generation_task.cpp' || echo '$(srcdir)/'`src/call_generation_task.cpp src/sipp_unittest-call_generation_task.obj: src/call_generation_task.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-call_generation_task.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-call_generation_task.Tpo -c -o src/sipp_unittest-call_generation_task.obj `if test -f 'src/call_generation_task.cpp'; then $(CYGPATH_W) 'src/call_generation_task.cpp'; else $(CYGPATH_W) '$(srcdir)/src/call_generation_task.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-call_generation_task.Tpo src/$(DEPDIR)/sipp_unittest-call_generation_task.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/call_generation_task.cpp' object='src/sipp_unittest-call_generation_task.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-call_generation_task.obj `if test -f 'src/call_generation_task.cpp'; then $(CYGPATH_W) 'src/call_generation_task.cpp'; else $(CYGPATH_W) '$(srcdir)/src/call_generation_task.cpp'; fi` src/sipp_unittest-ratetask.o: src/ratetask.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-ratetask.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-ratetask.Tpo -c -o src/sipp_unittest-ratetask.o `test -f 'src/ratetask.cpp' || echo '$(srcdir)/'`src/ratetask.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-ratetask.Tpo src/$(DEPDIR)/sipp_unittest-ratetask.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/ratetask.cpp' object='src/sipp_unittest-ratetask.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-ratetask.o `test -f 'src/ratetask.cpp' || echo '$(srcdir)/'`src/ratetask.cpp src/sipp_unittest-ratetask.obj: src/ratetask.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-ratetask.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-ratetask.Tpo -c -o src/sipp_unittest-ratetask.obj `if test -f 'src/ratetask.cpp'; then $(CYGPATH_W) 'src/ratetask.cpp'; else $(CYGPATH_W) '$(srcdir)/src/ratetask.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-ratetask.Tpo src/$(DEPDIR)/sipp_unittest-ratetask.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/ratetask.cpp' object='src/sipp_unittest-ratetask.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-ratetask.obj `if test -f 'src/ratetask.cpp'; then $(CYGPATH_W) 'src/ratetask.cpp'; else $(CYGPATH_W) '$(srcdir)/src/ratetask.cpp'; fi` src/sipp_unittest-reporttask.o: src/reporttask.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-reporttask.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-reporttask.Tpo -c -o src/sipp_unittest-reporttask.o `test -f 'src/reporttask.cpp' || echo '$(srcdir)/'`src/reporttask.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-reporttask.Tpo src/$(DEPDIR)/sipp_unittest-reporttask.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/reporttask.cpp' object='src/sipp_unittest-reporttask.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-reporttask.o `test -f 'src/reporttask.cpp' || echo '$(srcdir)/'`src/reporttask.cpp src/sipp_unittest-reporttask.obj: src/reporttask.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-reporttask.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-reporttask.Tpo -c -o src/sipp_unittest-reporttask.obj `if test -f 'src/reporttask.cpp'; then $(CYGPATH_W) 'src/reporttask.cpp'; else $(CYGPATH_W) '$(srcdir)/src/reporttask.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-reporttask.Tpo src/$(DEPDIR)/sipp_unittest-reporttask.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/reporttask.cpp' object='src/sipp_unittest-reporttask.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-reporttask.obj `if test -f 'src/reporttask.cpp'; then $(CYGPATH_W) 'src/reporttask.cpp'; else $(CYGPATH_W) '$(srcdir)/src/reporttask.cpp'; fi` src/sipp_unittest-scenario.o: src/scenario.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-scenario.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-scenario.Tpo -c -o src/sipp_unittest-scenario.o `test -f 'src/scenario.cpp' || echo '$(srcdir)/'`src/scenario.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-scenario.Tpo src/$(DEPDIR)/sipp_unittest-scenario.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/scenario.cpp' object='src/sipp_unittest-scenario.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-scenario.o `test -f 'src/scenario.cpp' || echo '$(srcdir)/'`src/scenario.cpp src/sipp_unittest-scenario.obj: src/scenario.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-scenario.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-scenario.Tpo -c -o src/sipp_unittest-scenario.obj `if test -f 'src/scenario.cpp'; then $(CYGPATH_W) 'src/scenario.cpp'; else $(CYGPATH_W) '$(srcdir)/src/scenario.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-scenario.Tpo src/$(DEPDIR)/sipp_unittest-scenario.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/scenario.cpp' object='src/sipp_unittest-scenario.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-scenario.obj `if test -f 'src/scenario.cpp'; then $(CYGPATH_W) 'src/scenario.cpp'; else $(CYGPATH_W) '$(srcdir)/src/scenario.cpp'; fi` src/sipp_unittest-sip_parser.o: src/sip_parser.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-sip_parser.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-sip_parser.Tpo -c -o src/sipp_unittest-sip_parser.o `test -f 'src/sip_parser.cpp' || echo '$(srcdir)/'`src/sip_parser.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-sip_parser.Tpo src/$(DEPDIR)/sipp_unittest-sip_parser.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/sip_parser.cpp' object='src/sipp_unittest-sip_parser.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-sip_parser.o `test -f 'src/sip_parser.cpp' || echo '$(srcdir)/'`src/sip_parser.cpp src/sipp_unittest-sip_parser.obj: src/sip_parser.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-sip_parser.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-sip_parser.Tpo -c -o src/sipp_unittest-sip_parser.obj `if test -f 'src/sip_parser.cpp'; then $(CYGPATH_W) 'src/sip_parser.cpp'; else $(CYGPATH_W) '$(srcdir)/src/sip_parser.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-sip_parser.Tpo src/$(DEPDIR)/sipp_unittest-sip_parser.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/sip_parser.cpp' object='src/sipp_unittest-sip_parser.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-sip_parser.obj `if test -f 'src/sip_parser.cpp'; then $(CYGPATH_W) 'src/sip_parser.cpp'; else $(CYGPATH_W) '$(srcdir)/src/sip_parser.cpp'; fi` src/sipp_unittest-screen.o: src/screen.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-screen.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-screen.Tpo -c -o src/sipp_unittest-screen.o `test -f 'src/screen.cpp' || echo '$(srcdir)/'`src/screen.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-screen.Tpo src/$(DEPDIR)/sipp_unittest-screen.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/screen.cpp' object='src/sipp_unittest-screen.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-screen.o `test -f 'src/screen.cpp' || echo '$(srcdir)/'`src/screen.cpp src/sipp_unittest-screen.obj: src/screen.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-screen.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-screen.Tpo -c -o src/sipp_unittest-screen.obj `if test -f 'src/screen.cpp'; then $(CYGPATH_W) 'src/screen.cpp'; else $(CYGPATH_W) '$(srcdir)/src/screen.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-screen.Tpo src/$(DEPDIR)/sipp_unittest-screen.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/screen.cpp' object='src/sipp_unittest-screen.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-screen.obj `if test -f 'src/screen.cpp'; then $(CYGPATH_W) 'src/screen.cpp'; else $(CYGPATH_W) '$(srcdir)/src/screen.cpp'; fi` src/sipp_unittest-socket.o: src/socket.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-socket.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-socket.Tpo -c -o src/sipp_unittest-socket.o `test -f 'src/socket.cpp' || echo '$(srcdir)/'`src/socket.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-socket.Tpo src/$(DEPDIR)/sipp_unittest-socket.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/socket.cpp' object='src/sipp_unittest-socket.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-socket.o `test -f 'src/socket.cpp' || echo '$(srcdir)/'`src/socket.cpp src/sipp_unittest-socket.obj: src/socket.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-socket.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-socket.Tpo -c -o src/sipp_unittest-socket.obj `if test -f 'src/socket.cpp'; then $(CYGPATH_W) 'src/socket.cpp'; else $(CYGPATH_W) '$(srcdir)/src/socket.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-socket.Tpo src/$(DEPDIR)/sipp_unittest-socket.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/socket.cpp' object='src/sipp_unittest-socket.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-socket.obj `if test -f 'src/socket.cpp'; then $(CYGPATH_W) 'src/socket.cpp'; else $(CYGPATH_W) '$(srcdir)/src/socket.cpp'; fi` src/sipp_unittest-socketowner.o: src/socketowner.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-socketowner.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-socketowner.Tpo -c -o src/sipp_unittest-socketowner.o `test -f 'src/socketowner.cpp' || echo '$(srcdir)/'`src/socketowner.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-socketowner.Tpo src/$(DEPDIR)/sipp_unittest-socketowner.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/socketowner.cpp' object='src/sipp_unittest-socketowner.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-socketowner.o `test -f 'src/socketowner.cpp' || echo '$(srcdir)/'`src/socketowner.cpp src/sipp_unittest-socketowner.obj: src/socketowner.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-socketowner.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-socketowner.Tpo -c -o src/sipp_unittest-socketowner.obj `if test -f 'src/socketowner.cpp'; then $(CYGPATH_W) 'src/socketowner.cpp'; else $(CYGPATH_W) '$(srcdir)/src/socketowner.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-socketowner.Tpo src/$(DEPDIR)/sipp_unittest-socketowner.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/socketowner.cpp' object='src/sipp_unittest-socketowner.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-socketowner.obj `if test -f 'src/socketowner.cpp'; then $(CYGPATH_W) 'src/socketowner.cpp'; else $(CYGPATH_W) '$(srcdir)/src/socketowner.cpp'; fi` src/sipp_unittest-stat.o: src/stat.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-stat.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-stat.Tpo -c -o src/sipp_unittest-stat.o `test -f 'src/stat.cpp' || echo '$(srcdir)/'`src/stat.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-stat.Tpo src/$(DEPDIR)/sipp_unittest-stat.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/stat.cpp' object='src/sipp_unittest-stat.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-stat.o `test -f 'src/stat.cpp' || echo '$(srcdir)/'`src/stat.cpp src/sipp_unittest-stat.obj: src/stat.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-stat.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-stat.Tpo -c -o src/sipp_unittest-stat.obj `if test -f 'src/stat.cpp'; then $(CYGPATH_W) 'src/stat.cpp'; else $(CYGPATH_W) '$(srcdir)/src/stat.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-stat.Tpo src/$(DEPDIR)/sipp_unittest-stat.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/stat.cpp' object='src/sipp_unittest-stat.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-stat.obj `if test -f 'src/stat.cpp'; then $(CYGPATH_W) 'src/stat.cpp'; else $(CYGPATH_W) '$(srcdir)/src/stat.cpp'; fi` src/sipp_unittest-strings.o: src/strings.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-strings.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-strings.Tpo -c -o src/sipp_unittest-strings.o `test -f 'src/strings.cpp' || echo '$(srcdir)/'`src/strings.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-strings.Tpo src/$(DEPDIR)/sipp_unittest-strings.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/strings.cpp' object='src/sipp_unittest-strings.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-strings.o `test -f 'src/strings.cpp' || echo '$(srcdir)/'`src/strings.cpp src/sipp_unittest-strings.obj: src/strings.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-strings.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-strings.Tpo -c -o src/sipp_unittest-strings.obj `if test -f 'src/strings.cpp'; then $(CYGPATH_W) 'src/strings.cpp'; else $(CYGPATH_W) '$(srcdir)/src/strings.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-strings.Tpo src/$(DEPDIR)/sipp_unittest-strings.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/strings.cpp' object='src/sipp_unittest-strings.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-strings.obj `if test -f 'src/strings.cpp'; then $(CYGPATH_W) 'src/strings.cpp'; else $(CYGPATH_W) '$(srcdir)/src/strings.cpp'; fi` src/sipp_unittest-task.o: src/task.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-task.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-task.Tpo -c -o src/sipp_unittest-task.o `test -f 'src/task.cpp' || echo '$(srcdir)/'`src/task.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-task.Tpo src/$(DEPDIR)/sipp_unittest-task.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/task.cpp' object='src/sipp_unittest-task.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-task.o `test -f 'src/task.cpp' || echo '$(srcdir)/'`src/task.cpp src/sipp_unittest-task.obj: src/task.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-task.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-task.Tpo -c -o src/sipp_unittest-task.obj `if test -f 'src/task.cpp'; then $(CYGPATH_W) 'src/task.cpp'; else $(CYGPATH_W) '$(srcdir)/src/task.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-task.Tpo src/$(DEPDIR)/sipp_unittest-task.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/task.cpp' object='src/sipp_unittest-task.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-task.obj `if test -f 'src/task.cpp'; then $(CYGPATH_W) 'src/task.cpp'; else $(CYGPATH_W) '$(srcdir)/src/task.cpp'; fi` src/sipp_unittest-time.o: src/time.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-time.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-time.Tpo -c -o src/sipp_unittest-time.o `test -f 'src/time.cpp' || echo '$(srcdir)/'`src/time.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-time.Tpo src/$(DEPDIR)/sipp_unittest-time.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/time.cpp' object='src/sipp_unittest-time.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-time.o `test -f 'src/time.cpp' || echo '$(srcdir)/'`src/time.cpp src/sipp_unittest-time.obj: src/time.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-time.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-time.Tpo -c -o src/sipp_unittest-time.obj `if test -f 'src/time.cpp'; then $(CYGPATH_W) 'src/time.cpp'; else $(CYGPATH_W) '$(srcdir)/src/time.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-time.Tpo src/$(DEPDIR)/sipp_unittest-time.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/time.cpp' object='src/sipp_unittest-time.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-time.obj `if test -f 'src/time.cpp'; then $(CYGPATH_W) 'src/time.cpp'; else $(CYGPATH_W) '$(srcdir)/src/time.cpp'; fi` src/sipp_unittest-variables.o: src/variables.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-variables.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-variables.Tpo -c -o src/sipp_unittest-variables.o `test -f 'src/variables.cpp' || echo '$(srcdir)/'`src/variables.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-variables.Tpo src/$(DEPDIR)/sipp_unittest-variables.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/variables.cpp' object='src/sipp_unittest-variables.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-variables.o `test -f 'src/variables.cpp' || echo '$(srcdir)/'`src/variables.cpp src/sipp_unittest-variables.obj: src/variables.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-variables.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-variables.Tpo -c -o src/sipp_unittest-variables.obj `if test -f 'src/variables.cpp'; then $(CYGPATH_W) 'src/variables.cpp'; else $(CYGPATH_W) '$(srcdir)/src/variables.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-variables.Tpo src/$(DEPDIR)/sipp_unittest-variables.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/variables.cpp' object='src/sipp_unittest-variables.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-variables.obj `if test -f 'src/variables.cpp'; then $(CYGPATH_W) 'src/variables.cpp'; else $(CYGPATH_W) '$(srcdir)/src/variables.cpp'; fi` src/sipp_unittest-watchdog.o: src/watchdog.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-watchdog.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-watchdog.Tpo -c -o src/sipp_unittest-watchdog.o `test -f 'src/watchdog.cpp' || echo '$(srcdir)/'`src/watchdog.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-watchdog.Tpo src/$(DEPDIR)/sipp_unittest-watchdog.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/watchdog.cpp' object='src/sipp_unittest-watchdog.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-watchdog.o `test -f 'src/watchdog.cpp' || echo '$(srcdir)/'`src/watchdog.cpp src/sipp_unittest-watchdog.obj: src/watchdog.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-watchdog.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-watchdog.Tpo -c -o src/sipp_unittest-watchdog.obj `if test -f 'src/watchdog.cpp'; then $(CYGPATH_W) 'src/watchdog.cpp'; else $(CYGPATH_W) '$(srcdir)/src/watchdog.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-watchdog.Tpo src/$(DEPDIR)/sipp_unittest-watchdog.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/watchdog.cpp' object='src/sipp_unittest-watchdog.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-watchdog.obj `if test -f 'src/watchdog.cpp'; then $(CYGPATH_W) 'src/watchdog.cpp'; else $(CYGPATH_W) '$(srcdir)/src/watchdog.cpp'; fi` src/sipp_unittest-sslsocket.o: src/sslsocket.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-sslsocket.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-sslsocket.Tpo -c -o src/sipp_unittest-sslsocket.o `test -f 'src/sslsocket.cpp' || echo '$(srcdir)/'`src/sslsocket.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-sslsocket.Tpo src/$(DEPDIR)/sipp_unittest-sslsocket.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/sslsocket.cpp' object='src/sipp_unittest-sslsocket.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-sslsocket.o `test -f 'src/sslsocket.cpp' || echo '$(srcdir)/'`src/sslsocket.cpp src/sipp_unittest-sslsocket.obj: src/sslsocket.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-sslsocket.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-sslsocket.Tpo -c -o src/sipp_unittest-sslsocket.obj `if test -f 'src/sslsocket.cpp'; then $(CYGPATH_W) 'src/sslsocket.cpp'; else $(CYGPATH_W) '$(srcdir)/src/sslsocket.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-sslsocket.Tpo src/$(DEPDIR)/sipp_unittest-sslsocket.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/sslsocket.cpp' object='src/sipp_unittest-sslsocket.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-sslsocket.obj `if test -f 'src/sslsocket.cpp'; then $(CYGPATH_W) 'src/sslsocket.cpp'; else $(CYGPATH_W) '$(srcdir)/src/sslsocket.cpp'; fi` src/sipp_unittest-rtpstream.o: src/rtpstream.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-rtpstream.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-rtpstream.Tpo -c -o src/sipp_unittest-rtpstream.o `test -f 'src/rtpstream.cpp' || echo '$(srcdir)/'`src/rtpstream.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-rtpstream.Tpo src/$(DEPDIR)/sipp_unittest-rtpstream.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/rtpstream.cpp' object='src/sipp_unittest-rtpstream.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-rtpstream.o `test -f 'src/rtpstream.cpp' || echo '$(srcdir)/'`src/rtpstream.cpp src/sipp_unittest-rtpstream.obj: src/rtpstream.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-rtpstream.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-rtpstream.Tpo -c -o src/sipp_unittest-rtpstream.obj `if test -f 'src/rtpstream.cpp'; then $(CYGPATH_W) 'src/rtpstream.cpp'; else $(CYGPATH_W) '$(srcdir)/src/rtpstream.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-rtpstream.Tpo src/$(DEPDIR)/sipp_unittest-rtpstream.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/rtpstream.cpp' object='src/sipp_unittest-rtpstream.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-rtpstream.obj `if test -f 'src/rtpstream.cpp'; then $(CYGPATH_W) 'src/rtpstream.cpp'; else $(CYGPATH_W) '$(srcdir)/src/rtpstream.cpp'; fi` src/sipp_unittest-sipp_unittest.o: src/sipp_unittest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-sipp_unittest.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-sipp_unittest.Tpo -c -o src/sipp_unittest-sipp_unittest.o `test -f 'src/sipp_unittest.cpp' || echo '$(srcdir)/'`src/sipp_unittest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-sipp_unittest.Tpo src/$(DEPDIR)/sipp_unittest-sipp_unittest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/sipp_unittest.cpp' object='src/sipp_unittest-sipp_unittest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-sipp_unittest.o `test -f 'src/sipp_unittest.cpp' || echo '$(srcdir)/'`src/sipp_unittest.cpp src/sipp_unittest-sipp_unittest.obj: src/sipp_unittest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-sipp_unittest.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-sipp_unittest.Tpo -c -o src/sipp_unittest-sipp_unittest.obj `if test -f 'src/sipp_unittest.cpp'; then $(CYGPATH_W) 'src/sipp_unittest.cpp'; else $(CYGPATH_W) '$(srcdir)/src/sipp_unittest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-sipp_unittest.Tpo src/$(DEPDIR)/sipp_unittest-sipp_unittest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/sipp_unittest.cpp' object='src/sipp_unittest-sipp_unittest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-sipp_unittest.obj `if test -f 'src/sipp_unittest.cpp'; then $(CYGPATH_W) 'src/sipp_unittest.cpp'; else $(CYGPATH_W) '$(srcdir)/src/sipp_unittest.cpp'; fi` src/sipp_unittest-xp_parser_ut.o: src/xp_parser_ut.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-xp_parser_ut.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-xp_parser_ut.Tpo -c -o src/sipp_unittest-xp_parser_ut.o `test -f 'src/xp_parser_ut.cpp' || echo '$(srcdir)/'`src/xp_parser_ut.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-xp_parser_ut.Tpo src/$(DEPDIR)/sipp_unittest-xp_parser_ut.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/xp_parser_ut.cpp' object='src/sipp_unittest-xp_parser_ut.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-xp_parser_ut.o `test -f 'src/xp_parser_ut.cpp' || echo '$(srcdir)/'`src/xp_parser_ut.cpp src/sipp_unittest-xp_parser_ut.obj: src/xp_parser_ut.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-xp_parser_ut.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-xp_parser_ut.Tpo -c -o src/sipp_unittest-xp_parser_ut.obj `if test -f 'src/xp_parser_ut.cpp'; then $(CYGPATH_W) 'src/xp_parser_ut.cpp'; else $(CYGPATH_W) '$(srcdir)/src/xp_parser_ut.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-xp_parser_ut.Tpo src/$(DEPDIR)/sipp_unittest-xp_parser_ut.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/xp_parser_ut.cpp' object='src/sipp_unittest-xp_parser_ut.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-xp_parser_ut.obj `if test -f 'src/xp_parser_ut.cpp'; then $(CYGPATH_W) 'src/xp_parser_ut.cpp'; else $(CYGPATH_W) '$(srcdir)/src/xp_parser_ut.cpp'; fi` gtest/src/sipp_unittest-gtest-death-test.o: gtest/src/gtest-death-test.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT gtest/src/sipp_unittest-gtest-death-test.o -MD -MP -MF gtest/src/$(DEPDIR)/sipp_unittest-gtest-death-test.Tpo -c -o gtest/src/sipp_unittest-gtest-death-test.o `test -f 'gtest/src/gtest-death-test.cc' || echo '$(srcdir)/'`gtest/src/gtest-death-test.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) gtest/src/$(DEPDIR)/sipp_unittest-gtest-death-test.Tpo gtest/src/$(DEPDIR)/sipp_unittest-gtest-death-test.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gtest/src/gtest-death-test.cc' object='gtest/src/sipp_unittest-gtest-death-test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o gtest/src/sipp_unittest-gtest-death-test.o `test -f 'gtest/src/gtest-death-test.cc' || echo '$(srcdir)/'`gtest/src/gtest-death-test.cc gtest/src/sipp_unittest-gtest-death-test.obj: gtest/src/gtest-death-test.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT gtest/src/sipp_unittest-gtest-death-test.obj -MD -MP -MF gtest/src/$(DEPDIR)/sipp_unittest-gtest-death-test.Tpo -c -o gtest/src/sipp_unittest-gtest-death-test.obj `if test -f 'gtest/src/gtest-death-test.cc'; then $(CYGPATH_W) 'gtest/src/gtest-death-test.cc'; else $(CYGPATH_W) '$(srcdir)/gtest/src/gtest-death-test.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) gtest/src/$(DEPDIR)/sipp_unittest-gtest-death-test.Tpo gtest/src/$(DEPDIR)/sipp_unittest-gtest-death-test.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gtest/src/gtest-death-test.cc' object='gtest/src/sipp_unittest-gtest-death-test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o gtest/src/sipp_unittest-gtest-death-test.obj `if test -f 'gtest/src/gtest-death-test.cc'; then $(CYGPATH_W) 'gtest/src/gtest-death-test.cc'; else $(CYGPATH_W) '$(srcdir)/gtest/src/gtest-death-test.cc'; fi` gtest/src/sipp_unittest-gtest-filepath.o: gtest/src/gtest-filepath.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT gtest/src/sipp_unittest-gtest-filepath.o -MD -MP -MF gtest/src/$(DEPDIR)/sipp_unittest-gtest-filepath.Tpo -c -o gtest/src/sipp_unittest-gtest-filepath.o `test -f 'gtest/src/gtest-filepath.cc' || echo '$(srcdir)/'`gtest/src/gtest-filepath.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) gtest/src/$(DEPDIR)/sipp_unittest-gtest-filepath.Tpo gtest/src/$(DEPDIR)/sipp_unittest-gtest-filepath.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gtest/src/gtest-filepath.cc' object='gtest/src/sipp_unittest-gtest-filepath.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o gtest/src/sipp_unittest-gtest-filepath.o `test -f 'gtest/src/gtest-filepath.cc' || echo '$(srcdir)/'`gtest/src/gtest-filepath.cc gtest/src/sipp_unittest-gtest-filepath.obj: gtest/src/gtest-filepath.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT gtest/src/sipp_unittest-gtest-filepath.obj -MD -MP -MF gtest/src/$(DEPDIR)/sipp_unittest-gtest-filepath.Tpo -c -o gtest/src/sipp_unittest-gtest-filepath.obj `if test -f 'gtest/src/gtest-filepath.cc'; then $(CYGPATH_W) 'gtest/src/gtest-filepath.cc'; else $(CYGPATH_W) '$(srcdir)/gtest/src/gtest-filepath.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) gtest/src/$(DEPDIR)/sipp_unittest-gtest-filepath.Tpo gtest/src/$(DEPDIR)/sipp_unittest-gtest-filepath.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gtest/src/gtest-filepath.cc' object='gtest/src/sipp_unittest-gtest-filepath.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o gtest/src/sipp_unittest-gtest-filepath.obj `if test -f 'gtest/src/gtest-filepath.cc'; then $(CYGPATH_W) 'gtest/src/gtest-filepath.cc'; else $(CYGPATH_W) '$(srcdir)/gtest/src/gtest-filepath.cc'; fi` gtest/src/sipp_unittest-gtest-port.o: gtest/src/gtest-port.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT gtest/src/sipp_unittest-gtest-port.o -MD -MP -MF gtest/src/$(DEPDIR)/sipp_unittest-gtest-port.Tpo -c -o gtest/src/sipp_unittest-gtest-port.o `test -f 'gtest/src/gtest-port.cc' || echo '$(srcdir)/'`gtest/src/gtest-port.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) gtest/src/$(DEPDIR)/sipp_unittest-gtest-port.Tpo gtest/src/$(DEPDIR)/sipp_unittest-gtest-port.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gtest/src/gtest-port.cc' object='gtest/src/sipp_unittest-gtest-port.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o gtest/src/sipp_unittest-gtest-port.o `test -f 'gtest/src/gtest-port.cc' || echo '$(srcdir)/'`gtest/src/gtest-port.cc gtest/src/sipp_unittest-gtest-port.obj: gtest/src/gtest-port.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT gtest/src/sipp_unittest-gtest-port.obj -MD -MP -MF gtest/src/$(DEPDIR)/sipp_unittest-gtest-port.Tpo -c -o gtest/src/sipp_unittest-gtest-port.obj `if test -f 'gtest/src/gtest-port.cc'; then $(CYGPATH_W) 'gtest/src/gtest-port.cc'; else $(CYGPATH_W) '$(srcdir)/gtest/src/gtest-port.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) gtest/src/$(DEPDIR)/sipp_unittest-gtest-port.Tpo gtest/src/$(DEPDIR)/sipp_unittest-gtest-port.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gtest/src/gtest-port.cc' object='gtest/src/sipp_unittest-gtest-port.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o gtest/src/sipp_unittest-gtest-port.obj `if test -f 'gtest/src/gtest-port.cc'; then $(CYGPATH_W) 'gtest/src/gtest-port.cc'; else $(CYGPATH_W) '$(srcdir)/gtest/src/gtest-port.cc'; fi` gtest/src/sipp_unittest-gtest-printers.o: gtest/src/gtest-printers.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT gtest/src/sipp_unittest-gtest-printers.o -MD -MP -MF gtest/src/$(DEPDIR)/sipp_unittest-gtest-printers.Tpo -c -o gtest/src/sipp_unittest-gtest-printers.o `test -f 'gtest/src/gtest-printers.cc' || echo '$(srcdir)/'`gtest/src/gtest-printers.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) gtest/src/$(DEPDIR)/sipp_unittest-gtest-printers.Tpo gtest/src/$(DEPDIR)/sipp_unittest-gtest-printers.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gtest/src/gtest-printers.cc' object='gtest/src/sipp_unittest-gtest-printers.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o gtest/src/sipp_unittest-gtest-printers.o `test -f 'gtest/src/gtest-printers.cc' || echo '$(srcdir)/'`gtest/src/gtest-printers.cc gtest/src/sipp_unittest-gtest-printers.obj: gtest/src/gtest-printers.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT gtest/src/sipp_unittest-gtest-printers.obj -MD -MP -MF gtest/src/$(DEPDIR)/sipp_unittest-gtest-printers.Tpo -c -o gtest/src/sipp_unittest-gtest-printers.obj `if test -f 'gtest/src/gtest-printers.cc'; then $(CYGPATH_W) 'gtest/src/gtest-printers.cc'; else $(CYGPATH_W) '$(srcdir)/gtest/src/gtest-printers.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) gtest/src/$(DEPDIR)/sipp_unittest-gtest-printers.Tpo gtest/src/$(DEPDIR)/sipp_unittest-gtest-printers.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gtest/src/gtest-printers.cc' object='gtest/src/sipp_unittest-gtest-printers.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o gtest/src/sipp_unittest-gtest-printers.obj `if test -f 'gtest/src/gtest-printers.cc'; then $(CYGPATH_W) 'gtest/src/gtest-printers.cc'; else $(CYGPATH_W) '$(srcdir)/gtest/src/gtest-printers.cc'; fi` gtest/src/sipp_unittest-gtest-test-part.o: gtest/src/gtest-test-part.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT gtest/src/sipp_unittest-gtest-test-part.o -MD -MP -MF gtest/src/$(DEPDIR)/sipp_unittest-gtest-test-part.Tpo -c -o gtest/src/sipp_unittest-gtest-test-part.o `test -f 'gtest/src/gtest-test-part.cc' || echo '$(srcdir)/'`gtest/src/gtest-test-part.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) gtest/src/$(DEPDIR)/sipp_unittest-gtest-test-part.Tpo gtest/src/$(DEPDIR)/sipp_unittest-gtest-test-part.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gtest/src/gtest-test-part.cc' object='gtest/src/sipp_unittest-gtest-test-part.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o gtest/src/sipp_unittest-gtest-test-part.o `test -f 'gtest/src/gtest-test-part.cc' || echo '$(srcdir)/'`gtest/src/gtest-test-part.cc gtest/src/sipp_unittest-gtest-test-part.obj: gtest/src/gtest-test-part.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT gtest/src/sipp_unittest-gtest-test-part.obj -MD -MP -MF gtest/src/$(DEPDIR)/sipp_unittest-gtest-test-part.Tpo -c -o gtest/src/sipp_unittest-gtest-test-part.obj `if test -f 'gtest/src/gtest-test-part.cc'; then $(CYGPATH_W) 'gtest/src/gtest-test-part.cc'; else $(CYGPATH_W) '$(srcdir)/gtest/src/gtest-test-part.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) gtest/src/$(DEPDIR)/sipp_unittest-gtest-test-part.Tpo gtest/src/$(DEPDIR)/sipp_unittest-gtest-test-part.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gtest/src/gtest-test-part.cc' object='gtest/src/sipp_unittest-gtest-test-part.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o gtest/src/sipp_unittest-gtest-test-part.obj `if test -f 'gtest/src/gtest-test-part.cc'; then $(CYGPATH_W) 'gtest/src/gtest-test-part.cc'; else $(CYGPATH_W) '$(srcdir)/gtest/src/gtest-test-part.cc'; fi` gtest/src/sipp_unittest-gtest-typed-test.o: gtest/src/gtest-typed-test.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT gtest/src/sipp_unittest-gtest-typed-test.o -MD -MP -MF gtest/src/$(DEPDIR)/sipp_unittest-gtest-typed-test.Tpo -c -o gtest/src/sipp_unittest-gtest-typed-test.o `test -f 'gtest/src/gtest-typed-test.cc' || echo '$(srcdir)/'`gtest/src/gtest-typed-test.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) gtest/src/$(DEPDIR)/sipp_unittest-gtest-typed-test.Tpo gtest/src/$(DEPDIR)/sipp_unittest-gtest-typed-test.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gtest/src/gtest-typed-test.cc' object='gtest/src/sipp_unittest-gtest-typed-test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o gtest/src/sipp_unittest-gtest-typed-test.o `test -f 'gtest/src/gtest-typed-test.cc' || echo '$(srcdir)/'`gtest/src/gtest-typed-test.cc gtest/src/sipp_unittest-gtest-typed-test.obj: gtest/src/gtest-typed-test.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT gtest/src/sipp_unittest-gtest-typed-test.obj -MD -MP -MF gtest/src/$(DEPDIR)/sipp_unittest-gtest-typed-test.Tpo -c -o gtest/src/sipp_unittest-gtest-typed-test.obj `if test -f 'gtest/src/gtest-typed-test.cc'; then $(CYGPATH_W) 'gtest/src/gtest-typed-test.cc'; else $(CYGPATH_W) '$(srcdir)/gtest/src/gtest-typed-test.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) gtest/src/$(DEPDIR)/sipp_unittest-gtest-typed-test.Tpo gtest/src/$(DEPDIR)/sipp_unittest-gtest-typed-test.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gtest/src/gtest-typed-test.cc' object='gtest/src/sipp_unittest-gtest-typed-test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o gtest/src/sipp_unittest-gtest-typed-test.obj `if test -f 'gtest/src/gtest-typed-test.cc'; then $(CYGPATH_W) 'gtest/src/gtest-typed-test.cc'; else $(CYGPATH_W) '$(srcdir)/gtest/src/gtest-typed-test.cc'; fi` gtest/src/sipp_unittest-gtest.o: gtest/src/gtest.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT gtest/src/sipp_unittest-gtest.o -MD -MP -MF gtest/src/$(DEPDIR)/sipp_unittest-gtest.Tpo -c -o gtest/src/sipp_unittest-gtest.o `test -f 'gtest/src/gtest.cc' || echo '$(srcdir)/'`gtest/src/gtest.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) gtest/src/$(DEPDIR)/sipp_unittest-gtest.Tpo gtest/src/$(DEPDIR)/sipp_unittest-gtest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gtest/src/gtest.cc' object='gtest/src/sipp_unittest-gtest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o gtest/src/sipp_unittest-gtest.o `test -f 'gtest/src/gtest.cc' || echo '$(srcdir)/'`gtest/src/gtest.cc gtest/src/sipp_unittest-gtest.obj: gtest/src/gtest.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT gtest/src/sipp_unittest-gtest.obj -MD -MP -MF gtest/src/$(DEPDIR)/sipp_unittest-gtest.Tpo -c -o gtest/src/sipp_unittest-gtest.obj `if test -f 'gtest/src/gtest.cc'; then $(CYGPATH_W) 'gtest/src/gtest.cc'; else $(CYGPATH_W) '$(srcdir)/gtest/src/gtest.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) gtest/src/$(DEPDIR)/sipp_unittest-gtest.Tpo gtest/src/$(DEPDIR)/sipp_unittest-gtest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gtest/src/gtest.cc' object='gtest/src/sipp_unittest-gtest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o gtest/src/sipp_unittest-gtest.obj `if test -f 'gtest/src/gtest.cc'; then $(CYGPATH_W) 'gtest/src/gtest.cc'; else $(CYGPATH_W) '$(srcdir)/gtest/src/gtest.cc'; fi` gmock/src/sipp_unittest-gmock-internal-utils.o: gmock/src/gmock-internal-utils.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT gmock/src/sipp_unittest-gmock-internal-utils.o -MD -MP -MF gmock/src/$(DEPDIR)/sipp_unittest-gmock-internal-utils.Tpo -c -o gmock/src/sipp_unittest-gmock-internal-utils.o `test -f 'gmock/src/gmock-internal-utils.cc' || echo '$(srcdir)/'`gmock/src/gmock-internal-utils.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) gmock/src/$(DEPDIR)/sipp_unittest-gmock-internal-utils.Tpo gmock/src/$(DEPDIR)/sipp_unittest-gmock-internal-utils.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gmock/src/gmock-internal-utils.cc' object='gmock/src/sipp_unittest-gmock-internal-utils.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o gmock/src/sipp_unittest-gmock-internal-utils.o `test -f 'gmock/src/gmock-internal-utils.cc' || echo '$(srcdir)/'`gmock/src/gmock-internal-utils.cc gmock/src/sipp_unittest-gmock-internal-utils.obj: gmock/src/gmock-internal-utils.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT gmock/src/sipp_unittest-gmock-internal-utils.obj -MD -MP -MF gmock/src/$(DEPDIR)/sipp_unittest-gmock-internal-utils.Tpo -c -o gmock/src/sipp_unittest-gmock-internal-utils.obj `if test -f 'gmock/src/gmock-internal-utils.cc'; then $(CYGPATH_W) 'gmock/src/gmock-internal-utils.cc'; else $(CYGPATH_W) '$(srcdir)/gmock/src/gmock-internal-utils.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) gmock/src/$(DEPDIR)/sipp_unittest-gmock-internal-utils.Tpo gmock/src/$(DEPDIR)/sipp_unittest-gmock-internal-utils.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gmock/src/gmock-internal-utils.cc' object='gmock/src/sipp_unittest-gmock-internal-utils.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o gmock/src/sipp_unittest-gmock-internal-utils.obj `if test -f 'gmock/src/gmock-internal-utils.cc'; then $(CYGPATH_W) 'gmock/src/gmock-internal-utils.cc'; else $(CYGPATH_W) '$(srcdir)/gmock/src/gmock-internal-utils.cc'; fi` gmock/src/sipp_unittest-gmock-matchers.o: gmock/src/gmock-matchers.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT gmock/src/sipp_unittest-gmock-matchers.o -MD -MP -MF gmock/src/$(DEPDIR)/sipp_unittest-gmock-matchers.Tpo -c -o gmock/src/sipp_unittest-gmock-matchers.o `test -f 'gmock/src/gmock-matchers.cc' || echo '$(srcdir)/'`gmock/src/gmock-matchers.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) gmock/src/$(DEPDIR)/sipp_unittest-gmock-matchers.Tpo gmock/src/$(DEPDIR)/sipp_unittest-gmock-matchers.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gmock/src/gmock-matchers.cc' object='gmock/src/sipp_unittest-gmock-matchers.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o gmock/src/sipp_unittest-gmock-matchers.o `test -f 'gmock/src/gmock-matchers.cc' || echo '$(srcdir)/'`gmock/src/gmock-matchers.cc gmock/src/sipp_unittest-gmock-matchers.obj: gmock/src/gmock-matchers.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT gmock/src/sipp_unittest-gmock-matchers.obj -MD -MP -MF gmock/src/$(DEPDIR)/sipp_unittest-gmock-matchers.Tpo -c -o gmock/src/sipp_unittest-gmock-matchers.obj `if test -f 'gmock/src/gmock-matchers.cc'; then $(CYGPATH_W) 'gmock/src/gmock-matchers.cc'; else $(CYGPATH_W) '$(srcdir)/gmock/src/gmock-matchers.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) gmock/src/$(DEPDIR)/sipp_unittest-gmock-matchers.Tpo gmock/src/$(DEPDIR)/sipp_unittest-gmock-matchers.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gmock/src/gmock-matchers.cc' object='gmock/src/sipp_unittest-gmock-matchers.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o gmock/src/sipp_unittest-gmock-matchers.obj `if test -f 'gmock/src/gmock-matchers.cc'; then $(CYGPATH_W) 'gmock/src/gmock-matchers.cc'; else $(CYGPATH_W) '$(srcdir)/gmock/src/gmock-matchers.cc'; fi` .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` install-man1: $(man_MANS) @$(NORMAL_INSTALL) @list1=''; \ list2='$(man_MANS)'; \ test -n "$(man1dir)" \ && test -n "`echo $$list1$$list2`" \ || exit 0; \ echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ { for i in $$list1; do echo "$$i"; done; \ if test -n "$$list2"; then \ for i in $$list2; do echo "$$i"; done \ | sed -n '/\.1[a-z]*$$/p'; \ fi; \ } | 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 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=''; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ 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-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files # Recover from deleted '.trs' file; this should ensure that # "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create # both 'foo.log' and 'foo.trs'. Break the recipe in two subshells # to avoid problems with "make -n". .log.trs: rm -f $< $@ $(MAKE) $(AM_MAKEFLAGS) $< # Leading 'am--fnord' is there to ensure the list of targets does not # expand to empty, as could happen e.g. with make check TESTS=''. am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) am--force-recheck: @: $(TEST_SUITE_LOG): $(TEST_LOGS) @$(am__set_TESTS_bases); \ am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ redo_bases=`for i in $$bases; do \ am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ done`; \ if test -n "$$redo_bases"; then \ redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ if $(am__make_dryrun); then :; else \ rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ fi; \ fi; \ if test -n "$$am__remaking_logs"; then \ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ "recursion detected" >&2; \ elif test -n "$$redo_logs"; then \ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ fi; \ if $(am__make_dryrun); then :; else \ st=0; \ errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ for i in $$redo_bases; do \ test -f $$i.trs && test -r $$i.trs \ || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ test -f $$i.log && test -r $$i.log \ || { echo "$$errmsg $$i.log" >&2; st=1; }; \ done; \ test $$st -eq 0 || exit 1; \ fi @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ ws='[ ]'; \ results=`for b in $$bases; do echo $$b.trs; done`; \ test -n "$$results" || results=/dev/null; \ all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ if test `expr $$fail + $$xpass + $$error` -eq 0; then \ success=true; \ else \ success=false; \ fi; \ br='==================='; br=$$br$$br$$br$$br; \ result_count () \ { \ if test x"$$1" = x"--maybe-color"; then \ maybe_colorize=yes; \ elif test x"$$1" = x"--no-color"; then \ maybe_colorize=no; \ else \ echo "$@: invalid 'result_count' usage" >&2; exit 4; \ fi; \ shift; \ desc=$$1 count=$$2; \ if test $$maybe_colorize = yes && test $$count -gt 0; then \ color_start=$$3 color_end=$$std; \ else \ color_start= color_end=; \ fi; \ echo "$${color_start}# $$desc $$count$${color_end}"; \ }; \ create_testsuite_report () \ { \ result_count $$1 "TOTAL:" $$all "$$brg"; \ result_count $$1 "PASS: " $$pass "$$grn"; \ result_count $$1 "SKIP: " $$skip "$$blu"; \ result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ result_count $$1 "FAIL: " $$fail "$$red"; \ result_count $$1 "XPASS:" $$xpass "$$red"; \ result_count $$1 "ERROR:" $$error "$$mgn"; \ }; \ { \ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ $(am__rst_title); \ create_testsuite_report --no-color; \ echo; \ echo ".. contents:: :depth: 2"; \ echo; \ for b in $$bases; do echo $$b; done \ | $(am__create_global_log); \ } >$(TEST_SUITE_LOG).tmp || exit 1; \ mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ if $$success; then \ col="$$grn"; \ else \ col="$$red"; \ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ if $$success; then :; else \ echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ if test -n "$(PACKAGE_BUGREPORT)"; then \ echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ fi; \ echo "$$col$$br$$std"; \ fi; \ $$success || exit 1 check-TESTS: @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ log_list=`for i in $$bases; do echo $$i.log; done`; \ trs_list=`for i in $$bases; do echo $$i.trs; done`; \ log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ exit $$?; recheck: all $(check_PROGRAMS) @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ bases=`for i in $$bases; do echo $$i; done \ | $(am__list_recheck_tests)` || exit 1; \ log_list=`for i in $$bases; do echo $$i.log; done`; \ log_list=`echo $$log_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ am__force_recheck=am--force-recheck \ TEST_LOGS="$$log_list"; \ exit $$? sipp_unittest.log: sipp_unittest$(EXEEXT) @p='sipp_unittest$(EXEEXT)'; \ b='sipp_unittest'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) .test.log: @p='$<'; \ $(am__set_b); \ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) @am__EXEEXT_TRUE@.test$(EXEEXT).log: @am__EXEEXT_TRUE@ @p='$<'; \ @am__EXEEXT_TRUE@ $(am__set_b); \ @am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) distdir: $(DISTFILES) $(am__remove_distdir) 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; \ 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 -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done -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 $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) mkdir $(distdir)/_build $(distdir)/_build/sub $(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-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build/sub \ && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (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 \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__post_remove_distdir) @(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: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(PROGRAMS) $(MANS) installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -rm -f gmock/src/$(DEPDIR)/$(am__dirstamp) -rm -f gmock/src/$(am__dirstamp) -rm -f gtest/src/$(DEPDIR)/$(am__dirstamp) -rm -f gtest/src/$(am__dirstamp) -rm -f src/$(DEPDIR)/$(am__dirstamp) -rm -f src/$(am__dirstamp) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-binPROGRAMS clean-checkPROGRAMS clean-generic \ mostlyclean-am distclean: distclean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf gmock/src/$(DEPDIR) gtest/src/$(DEPDIR) src/$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-man install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-man1 install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -rf gmock/src/$(DEPDIR) gtest/src/$(DEPDIR) src/$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-man uninstall-man: uninstall-man1 .MAKE: all check check-am install install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--refresh check check-TESTS \ check-am clean clean-binPROGRAMS clean-checkPROGRAMS \ clean-cscope clean-generic cscope cscopelist-am ctags ctags-am \ dist dist-all dist-bzip2 dist-gzip dist-lzip dist-shar \ dist-tarZ dist-xz dist-zip distcheck distclean \ distclean-compile distclean-generic distclean-hdr \ distclean-tags distcleancheck distdir distuninstallcheck 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-man1 install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am recheck tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS uninstall-man uninstall-man1 .PRECIOUS: Makefile @AM_GIT_VERSION@ # call.cpp and sipp.cpp use version.h; see AM_GIT_VERSION. src/call.cpp: include/version.h src/sipp.cpp: include/version.h # Ensure that after a reconfigure the source is cleaned. .autoclean: Makefile make clean echo > .autoclean @HAVE_HELP2MAN_TRUE@sipp.1: ./sipp $(sipp_SOURCES) @HAVE_HELP2MAN_TRUE@ $(HELP2MAN) --output=$@ -v "-v" --no-info \ @HAVE_HELP2MAN_TRUE@ --name='SIP testing tool and traffic generator' \ @HAVE_HELP2MAN_TRUE@ ./sipp @HAVE_HELP2MAN_FALSE@sipp.1: @HAVE_HELP2MAN_FALSE@ @echo "Warning: help2man not available, no man page is created." # 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: sipp-3.6.0/docs/0000755000175000017500000000000013475544015013011 5ustar walterwaltersipp-3.6.0/docs/uac.xml0000644000175000017500000001065713475544015014314 0ustar walterwalter ;tag=[pid]SIPpTag00[call_number] To: [service] Call-ID: [call_id] CSeq: 1 INVITE Contact: sip:sipp@[local_ip]:[local_port] Max-Forwards: 70 Subject: Performance Test Content-Type: application/sdp Content-Length: [len] v=0 o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip] s=- c=IN IP[media_ip_type] [media_ip] t=0 0 m=audio [media_port] RTP/AVP 0 a=rtpmap:0 PCMU/8000 ]]> ;tag=[pid]SIPpTag00[call_number] To: [service] [peer_tag_param] Call-ID: [call_id] CSeq: 1 ACK Contact: sip:sipp@[local_ip]:[local_port] Max-Forwards: 70 Subject: Performance Test Content-Length: 0 ]]> ;tag=[pid]SIPpTag00[call_number] To: [service] [peer_tag_param] Call-ID: [call_id] CSeq: 2 BYE Contact: sip:sipp@[local_ip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r;k #F@h&`x]1|P,AfbA+E. ع~;rXNOzh72s]lq@JJha D8[L7`>z)^g1gf+Mp\G%d(@h7pKZ\[m![m pp!;63gPJh7`Ck~\FyE$HeRPeZZ16Bȿ{RGRh7pu1;?r(BXRj&UC0[Br .1zh7`2cNqw]ʷI ,C)@(l;o;~Ozh7p@ ֺaj$hD! >f1:?xzh7`Kw*mR( MY%)i1h$S,n"W  h&pm{ͩ-UQUm\Y\ @q=յer% )܀Jh7pvZ]71eyURQj)T*w^B$UGh7pB[L9)A_X6e+Jʱ;5` {)k_r, wUEeUAdPD'e=?@R3zc0lqWٳe)F`')iMcbavsipp-3.6.0/docs/error.rst0000644000175000017500000001057213475544015014701 0ustar walterwalterError handling ============== SIPp has advanced feature to handle errors and unexpected events. They are detailed in the following sections. Unexpected messages ``````````````````` + When a SIP message that can be correlated to an existing call (with the Call-ID: header) but is not expected in the scenario is received, SIPp will send a CANCEL message if no 200 OK message has been received or a BYE message if a 200 OK message has been received. The call will be marked as failed. If the unexpected message is a 4XX or 5XX, SIPp will send an ACK to this message, close the call and mark the call as failed. + When a SIP message that can't be correlated to an existing call (with the Call-ID: header) is received, SIPp will send a BYE message. The call will not be counted at all. + When a SIP "PING" message is received, SIPp will send an ACK message in response. This message is not counted as being an unexpected message. But it is counted in the "AutoAnswered" statistic counter. + An unexpected message that is not a SIP message will be simply dropped. Retransmissions (UDP only) `````````````````````````` A retransmission mechanism exists in UDP transport mode. To activate the retransmission mechanism, the "send" command must include the "retrans" attribute. When it is activated and a SIP message is sent and no ACK or response is received in answer to this message, the message is re-sent. .. note:: The retransmission mechanism follows :RFC:`3261`, section 17.1.1.2. Retransmissions are differentiated between INVITE and non-INVITE methods. : will initiate the T1 timer to 500 milliseconds. Even if retrans is specified in your scenarios, you can override this by using the -nr command line option to globally disable the retransmission mechanism. Log files ````````` There are several ways to trace what is going on during your SIPp runs. + You can log sent and received SIP messages in __messages.log by using the command line parameter -trace_msg. The messages are time-stamped so that you can track them back. + You also can trace it using the -trace_shortmsg parameter. This logs the most important values of a message as CSV into one line of the __shortmessages.log + You can trace all unexpected messages or events in __errors.log by using the command line parameter -trace_err. + You can trace the SIP response codes of unexpected messages in __error_codes.log by using the command line parameter -trace_error_codes. + You can trace the counts from the main scenario screen in __counts.csv by using the command line parameter -trace_counts. + You can trace the messages and state transitions of failed calls in __calldebug.log using the -trace_calldebug command line parameter. This is useful, because it has less overhead than -trace_msg yet allows you to debug call flows that were not completed successfully. + You can save in a file the statistics screens, as displayed in the interface. This is especially useful when running SIPp in background mode. This can be done in different ways: + When SIPp exits to get a final status report (-trace_screen option) + On demand by using USR2 signal (example: kill -SIGUSR2 738) + By pressing 's' key (if -trace_screen option is set) + If the -trace_logs option is set, you can use the action to print some scenario traces in the __logs.log file. See the Log action section SIPp can treat the messages, short messages, logs, and error logs as ring buffers. This allows you to limit the total amount of space used by these log files and keep only the most recent messages. To set the maximum file size use the -ringbuffer_size option. Once the file exceeds this size (the file size can be exceeded up to the size of a single log message), it is rotated. SIPp can keep several of the most recent files, to specify the number of files to keep use the -ringbuffer_files option. The rotated files have a name of the form ___.log, where is the number of seconds since the epoch. If more than one log file is rotated during a one second period, then the date is expressed as , where serial is an increasing integer identifier. sipp-3.6.0/docs/branchs.xml0000644000175000017500000001055213475544015015156 0ustar walterwalter Content-Length: 0 Expires: 300 ]]> Content-Length: 0 ]]> Content-Length: 0 ]]> sipp-3.6.0/docs/perftest.rst0000644000175000017500000001054113475544015015400 0ustar walterwalterPerformance testing with SIPp ============================= Advice to run performance tests with SIPp ````````````````````````````````````````` SIPp has been originally designed for SIP performance testing. Reaching high call rates and/or high number of simultaneous SIP calls is possible with SIPp, provided that you follow some guidelines: + Use a Linux system to reach high performances. The Windows port of SIPp (through CYGWIN) cannot handle high performances. + Limit the traces to a minimum (usage of ``-trace_msg``, ``-trace_logs`` should be limited to scenario debugging only) + Understand internal SIPp's scheduling mechanism and use the ``-timer_resol``, ``-max_recv_loops`` and ``-max_sched_loops`` command line parameters to tune SIPp given the system it is running on. Generally, running performance tests also implies measuring response times. You can use SIPp's timers (start_rtd, rtd in scenarios and -trace_rtt command line option) to measure those response times. The precision of those measures are entirely dependent on the timer_resol parameter (as described in `SIPp's internal scheduling`_ section). You might want to use another "objective" method if you want to measure those response times with a high precision (a tool like Wireshark will allow you to do so). SIPp's internal scheduling `````````````````````````` SIPp has a single-threaded event-loop architecture, which allows it to handle high SIP traffic loads. SIPp's event loop tracks various tasks, most of which are the calls that are defined in your scenario. In addition to tasks that represent calls there are several special tasks: a screen update task, a statistics update task, a call opening task, and a watchdog task. SIPp's main execution loop consists of: #. Waking up tasks that have expired timers. #. Running up to max_sched_loop tasks that are in a running state (each call is executed until it is no longer runnable). #. Handling each of the sockets in turn, reading max_recv_loops messages from the various sockets. SIPp executes this loop continuously, until some condition tells it to stop (e.g., the user pressing the 'q' key or the global call limit or timeout being reached). Several parameters can be specified on the command line to fine tune this scheduling. + timer_resol: during the main loop, the management of calls (management of wait, retransmission ...) is done for all calls, every "timer_resol" ms at best. The delay of retransmission must be higher than "timer_resol". The default timer resolution is 1 millisecond, and that is the most precise resolution that SIPp currently supports. If you increase this parameter, SIPp's traffic will be burstier and you are likely to encounter retransmissions at high load. If you have too many calls, or each call takes too long, the timer resolution will not be respected. + max_recv_loops and max_sched_loops: received messages are read and treated in batch. "max_recv_loops" is the maximum number of messages that can be read at one time. "max sched loops" is the maximum number of processing calls loops. These limits prevent SIPp from reading and processing new messages from sockets to the exclusion of processing existing calls, and vice versa. For heavy call rate, increase both values. Be careful, those two parameters have a large influence on the CPU occupation of SIPp. + watchdog_interval, watchdog_minor_threshold, watchdog_major_threshold, watchdog_minor_maxtriggers, and watchdog_major_maxtriggers: The watchdog timer is designed to provide feedback if your call load is causing SIPp's scheduler to be overwhelmed. The watchdog task sets a timer that should fire every watchdog_interval milliseconds (by defualt 400ms). If the timer is not serviced for more than watchdog_minor_threshold milliseconds (by default 500s), then a "minor" trigger is recorded. If the number of minor triggers is more than watchdog_minor_maxtriggers; the watchdog task terminates SIPp. Similarly, if the timer is not serviced for more than watchdog_major_threshold milliseconds (by default 3000ms), then a major trigger is recorded; and if more than watchdog_major_maxtriggers are recorded SIPp is terminated. If you only see occasional messages, your test is likely acceptable, but if these events are frequent you need to consider using a more powerful machine or set of machines to run your scenario.sipp-3.6.0/docs/3PCC_extended.rst0000644000175000017500000000364713475544015016125 0ustar walterwalter3PCC Extended ============= An extension of the 3pcc mode is implemented in SIPp. This feature allows any number of SIPp instances to communicate with each other, each one of them being connected to a remote host. The SIPp instance which initiates the call is launched in "master" mode. The others are launched in "slave" mode. Slave SIPp instances have names, given in the command line (for example, s1, s2...sN for the slaves and m for the master) Correspondances between instances names and their addresses must be stored in a file (provided by ``-slave_cfg`` command line argument), in the following format:: s1;127.0.0.1:8080 s2;127.0.0.1:7080 m;127.0.0.1:6080 Each SIPp instance must access a different copy of this file. sendCmd and recvCmd have additional attributes:: Will send a command to the "s1" peer instance, which can be either master or slave, depending on the command line argument, which must be consistent with the scenario: a slave instance cannot have a sendCmd action before having any recvCmd. Note that the message must contain a "From" field, filled with the name of the sender. :: Indicates that the twin command is expected to be received from the "m" peer instance. Note that the master must be the launched at last. There is no integrated scenarios for the 3pcc extended mode, but you can easily adapt those from 3pcc. **Example:** the following drawing illustrate the entire procedure. The arrows that are shown between SIPp master and slaves depict only the synchronization commands exchanged between the different SIPp instances. The SIP message exchange takes place as usual. .. image:: master_slave.png sipp-3.6.0/docs/installation.rst0000644000175000017500000000730313475544015016247 0ustar walterwalterInstallation ~~~~~~~~~~~~ Getting SIPp ```````````` SIPp is released under the `GNU GPL license`_. All the terms of the license apply. It was originally created and provided to the SIP community by `Hewlett-Packard`_ engineers in hope it can be useful, but HP does not provide any support nor warranty concerning SIPp. SIPp releases ````````````` Like many other "open source" projects, there are two versions of SIPp: a stable and unstable release. Stable release: before being labelled as "stable", a SIPp release is thoroughly tested. So you can be confident that all mentioned features will work :) .. note:: Use the stable release for your everyday use and if you are not blocked by a specific feature present in the "unstable release" (see below). `SIPp stable download page `_ Unstable release ```````````````` Unstable release: all new features and bug fixes are checked in `SIPp's master tree`_ repository as soon as they are available. .. note:: Use the unstable release if you absolutely need a bug fix or a feature that is not in the stable release. Available platforms ``````````````````` SIPp is available on Linux and Cygwin. Other Unix distributions are likely to work, but are not tested every release cycle. .. note:: SIPp on Cygwin works only on Windows XP and later versions and will not work on Win2000. This is because of IPv6 support. Installing SIPp ``````````````` + On Linux, SIPp is provided in the form of source code. You will need to compile SIPp to actually use it. + Pre-requisites to compile SIPp are: + C++ Compiler + curses or ncurses library + For TLS support: OpenSSL >= 0.9.8 + For pcap play support: libpcap and libnet + For SCTP support: lksctp-tools + For distributed pauses: `Gnu Scientific Libraries`_ + You have four options to compile SIPp: + Without TLS (Transport Layer Security), SCTP or PCAP support -- this is the recommended setup if you don't need to handle SCTP, TLS or PCAP:: tar -xvzf sipp-xxx.tar cd sipp ./configure make + With TLS support, you must have installed `OpenSSL library`_ (>=0.9.8) (which may come with your system). Building SIPp consists only of adding the ``--with-openssl`` option to the configure command:: tar -xvzf sipp-xxx.tar.gz cd sipp ./configure --with-openssl make + With PCAP play support:: tar -xvzf sipp-xxx.tar.gz cd sipp ./configure --with-pcap make + With SCTP support:: tar -xvzf sipp-xxx.tar.gz cd sipp ./configure --with-sctp make + You can also combine these various options, e.g.:: tar -xvzf sipp-xxx.tar.gz cd sipp ./configure --with-sctp --with-pcap --with-openssl make .. warning:: SIPp compiles under CYGWIN on Windows, provided that you installed IPv6 extension for `CYGWIN `_, as well as libncurses and (optionally OpenSSL and WinPcap). SCTP is not currently supported. + To compile SIPp on Windows with pcap (media support), you must: + Copy the `WinPcap developer package`_ to "C:\cygwin\lib\WpdPack" + Remove or rename "pthread.h" in "C:\cygwin\lib\WpdPack\Include", as it interfers with pthread.h from cygwin + Compile according to the instructions above. .. _GNU GPL license: https://www.gnu.org/copyleft/gpl.html .. _Gnu Scientific Libraries: https://www.gnu.org/software/gsl/ .. _WinPcap developer package: https://www.winpcap.org/devel.htm .. _hewlett-packard: https://www.hp.com/ .. _SIPp's master tree: https://github.com/SIPp/sipp/tree/master .. _OpenSSL library: https://www.openssl.org/ sipp-3.6.0/docs/sipp-01.jpg0000644000175000017500000012176513475544015014720 0ustar walterwalterJFIFHHCreated with The GIMPC  !"$"$CjH" P!"1R#2AQ678BSTstu$3aq4U%brCDc@!14AQRacdq35rb"B#2 ?n://n(#j d6:c? z3"VΘ I-iR 'z1ӡ'=0i0۩ZSF3q`d^l;w [pp𥵇ЎpZz(@cfTEm1>4UWiu4|_13|Dl7]3u{b~uS3m@^#Rջ{Ѕ$I9_oԬ#w6CUkړJP VH%#J;?zf}K>Ay[x84Cᒽ~Lc`a~b/orc~gb6 a_ǁխtNWl̘% KST*QIIS9mI{Fź$]Tir}e92-% VĔy:ׂSMZf&5ZooѮ،MZv_Oퟮzi=.S2bƨ3$;oN+斌ΑԒ\j:-Y(1lnAe礄IW{@KM| FP`M;߯V&n흝 ݆msS{gޭˤtN4v ֢d.O4m6oB̗NJv<݌4ՆWeByel=⩒d+.0Kw n+_Z)":n#Z5孳7]ֈJqw~o׽luHBmKSkn+2SxyA$P 8W jM3keVOq(ֈNN'95Ҍ:Uҕ#n)-sD_|Mӭ~_3uζRYLL_uc{gާ_ZΊX=Kunw‚~j;J@XtӲ'EӷĹDFɳ-;OBНĩJJ#8 |**f#bw6vn׉.׈ڲĖMkNwsVg6WPF{G].Щh).-h^iMT·T{™q%okj\oRR9=q [1:;LlqYiY-swnVnw~xlucxX7K=zxlu4q?7%<6_,v8^.ퟮz7;?]~qlX><6_,v8^.ퟮz7;?]~qlX><6_,v8^.ퟮz7;?]~qlX><6_,v8^.ퟮz7;?]~qlX><6_,v8^.ퟮz7;?]~qlX><6_,v8^.ퟮz7;?]~qlX><6_,v8^.ퟮz7;?]~qlX><6_,v8^.ퟮz7;?]~qlX><6_,v8^.ퟮz7;?]~qlX><6_,v8^.ퟮz7;?]~qlX><6_,v8^.ퟮz7;?]~qlX><6_,v8^.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]\Sxq__TuzrwuT*X90w~Y]yZS>tzY]:ӱssrV]l{xWZ֖zm8}V|ٻnwwXS~Ytlt}^tro|TT{tn~_/lw9YR]1Xt}_}8\rp]zS~wrt]Wܝpw4X1ε6`wrZW_p[t^z||޻~޼~z_}}|~޺|z||xsu~v߳vxߝvz{zy[\wxuxu{X۳{x{x{_tv[xw~xwy|~{uyy״x߶yuxu~vy~vsyZvߘsw7:|xv{{s{{ysvvz\vpxڴpxxxttyss{ܙ|5rwxwvwxvt_z_t~{y{ytx{{{ּvܸvwvzzwyxw|w\yuvsy{xwW޴sݛzz~|zvzߵ_wzvyqyuzywwy{ٹu\ִ7Xzv|{yyZvwu{v{yxXߴttضwXxxszwvzzxxyu|\yz{yݚݵxx|x|xy]ܳuޜtyz6ttzuZ|;ھx~{ߵ;wyWv۹{yst{xuzy|qvvuuuu[|wxyxwwxt{صxڵ6ߜ\ܲquyyxywxzٸzzx|\w~~wx|ywwx||[u|{uyxx~ruuܵx|w{\\|ܷxuyyܺ~]|uxyۻu{x״psuuYxڶ{tzvyyyut{sy\Xy]~w{w۴qz\wuzxutZys^tw|[yٶx|ںxYsxv[wuyuuu~ztzxv\twt|{{w|\x~xxt|~9{xtxruڹuvvxxxvv~yx~wxxyqx{^z|~߸]{[x{X~xyw|7ݵwWuwv|~Ywyxxt|ڶ_w~]x{]zwy]^ޘys^vu{^zzs:tuxx{tu[y߸xwuwuywu|v~vֹvXwyZu{ܻuxxwܼ_yxv~x~]r5y{w~tywyxڞxzvv|V{ssx۟7tws\xXw[sx\ry]ܾw Content-Type: application/sdp Content-Length: [len] v=0 o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip] s=- c=IN IP[media_ip_type] [media_ip] t=0 0 m=audio [media_port] RTP/AVP 0 a=rtpmap:0 PCMU/8000 ]]> Content-Length: 0 ]]> sipp-3.6.0/docs/3pcc-A.xml0000644000175000017500000000731413475544015014546 0ustar walterwalter Content-Type: application/sdp Content-Length: [len] v=0 o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip] s=- c=IN IP[media_ip_type] [media_ip] t=0 0 m=audio [media_port] RTP/AVP 0 a=rtpmap:0 PCMU/8000 ]]> Content-Length: 0 ]]> sipp-3.6.0/docs/.gitignore0000644000175000017500000000004313475544015014776 0ustar walterwalter# sphinx build folder _build *.pyc sipp-3.6.0/docs/regexp.xml0000644000175000017500000001473513475544015015037 0ustar walterwalter ;tag=[pid]SIPpTag02[call_number] To: [service] Call-ID: [call_id] CSeq: 1 INVITE Contact: sip:sipp@[local_ip]:[local_port] Max-Forwards: 70 Subject: Performance Test Content-Type: application/sdp Content-Length: [len] v=0 o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip] s=- c=IN IP[media_ip_type] [media_ip] t=0 0 m=audio [media_port] RTP/AVP 0 a=rtpmap:0 PCMU/8000 ]]> ;tag=[pid]SIPpTag02[call_number] To: [service] [peer_tag_param] Call-ID: [call_id] CSeq: 1 ACK retrievedIp: [$1] retrievedContact:[$6] retrievedSdpOrigin:[$3] retrievedSdpOrigin-username:[$4] retrievedSdpOrigin-session-id:[$5] retrievedSdpOrigin-version:[$8] Contact: sip:sipp@[local_ip]:[local_port] Max-Forwards: 70 Subject: Performance Test Content-Length: 0 ]]> ;tag=[pid]SIPpTag02[call_number] To: [service] [peer_tag_param] Call-ID: [call_id] CSeq: 2 BYE Contact: sip:sipp@[local_ip]:[local_port] Max-Forwards: 70 Subject: Performance Test Content-Length: 0 ]]> sipp-3.6.0/docs/int_scenarios.rst0000644000175000017500000002150313475544015016404 0ustar walterwalterIntegrated scenarios ==================== Integrated scenarios? Yes, there are scenarios that are embedded in SIPp executable. While you can create your own custom SIP scenarios (see how to create your own XML scenarios), a few basic (yet useful) scenarios are available in SIPp executable. UAC ``` Scenario file: :download:`uac.xml ` :: SIPp UAC Remote |(1) INVITE | |------------------>| |(2) 100 (optional) | |<------------------| |(3) 180 (optional) | |<------------------| |(4) 200 | |<------------------| |(5) ACK | |------------------>| | | |(6) PAUSE | | | |(7) BYE | |------------------>| |(8) 200 | |<------------------| UAC with media `````````````` Scenario file: :download:`uac_pcap.xml ` :: SIPp UAC Remote |(1) INVITE | |------------------>| |(2) 100 (optional) | |<------------------| |(3) 180 (optional) | |<------------------| |(4) 200 | |<------------------| |(5) ACK | |------------------>| | | |(6) RTP send (8s) | |==================>| | | |(7) RFC2833 DIGIT 1| |==================>| | | |(8) BYE | |------------------>| |(9) 200 | |<------------------| UAS ``` Scenario file: :download:`uas.xml ` :: Remote SIPp UAS |(1) INVITE | |------------------>| |(2) 180 | |<------------------| |(3) 200 | |<------------------| |(4) ACK | |------------------>| | | |(5) PAUSE | | | |(6) BYE | |------------------>| |(7) 200 | |<------------------| regexp `````` Scenario file: :download:`regexp.xml ` This scenario, which behaves as an UAC is explained in greater details in this section. :: SIPp regexp Remote |(1) INVITE | |------------------>| |(2) 100 (optional) | |<------------------| |(3) 180 (optional) | |<------------------| |(4) 200 | |<------------------| |(5) ACK | |------------------>| | | |(6) PAUSE | | | |(7) BYE | |------------------>| |(8) 200 | |<------------------| branch `````` Scenario files: :download:`branchc.xml ` and :download:`branchs.xml ` Those scenarios, which work against each other (branchc for client side and branchs for server side) are explained in greater details in this section. :: REGISTER ----------> 200 <---------- 200 <---------- INVITE ----------> 100 <---------- 180 <---------- 403 <---------- 200 <---------- ACK ----------> [ 5000 ms] BYE ----------> 200 <---------- UAC Out-of-call Messages ```````````````````````` Scenario file: :download:`ooc_default.xml ` When a SIPp UAC receives an out-of-call request, it instantiates an out-of-call scenario. By default this scenario simply replies with a 200 OK response. This scenario can be overridden by passing the -oocsf or -oocsn command line options. :: SIPp UAC Remote |(1) .* | |<------------------| |(2) 200 | |------------------>| 3PCC ```` 3PCC stands for 3rd Party Call Control. 3PCC is described in :RFC:`3725`. While this feature was first developed to allow 3PCC like scenarios, it can also be used for every case where you would need one SIPp to talk to several remotes. In order to keep SIPp simple (remember, it's a test tool!), one SIPp instance can only talk to one remote. Which is an issue in 3PCC call flows, like call flow I (SIPp being a controller):: A Controller B |(1) INVITE no SDP | | |<------------------| | |(2) 200 offer1 | | |------------------>| | | |(3) INVITE offer1 | | |------------------>| | |(4) 200 OK answer1 | | |<------------------| | |(5) ACK | | |------------------>| |(6) ACK answer1 | | |<------------------| | |(7) RTP | | |.......................................| Scenario file: :download:`3pcc-A.xml <3pcc-A.xml>` Scenario file: :download:`3pcc-B.xml <3pcc-B.xml>` Scenario file: :download:`3pcc-C-A.xml <3pcc-C-A.xml>` Scenario file: :download:`3pcc-C-B.xml <3pcc-C-B.xml>` The 3PCC feature in SIPp allows to have two SIPp instances launched and synchronised together. If we take the example of call flow I, one SIPp instance will take care of the dialog with remote A (this instance is called 3PCC-C-A for 3PCC-Controller-A-Side) and another SIPp instance will take care of the dialog with remote B (this instance is called 3PCC-C-B for 3PCC-Controller-B-Side). The 3PCC call flow I will, in reality, look like this (Controller has been divided in two SIPp instances):: A Controller A Controller B B |(1) INVITE no SDP | | | |<------------------| | | |(2) 200 offer1 | | | |------------------>| | | | sendCmd (offer1) | | | |----------------->| | | | recvCmd | | | |(3) INVITE offer1 | | | |------------------>| | | |(4) 200 OK answer1 | | | |<------------------| | | sendCmd | | | (answer1) | | | |<-----------------| | | recvCmd |(5) ACK | | | |------------------>| |(6) ACK answer1 | | | |<------------------| | | |(7) RTP | | | |..........................................................| As you can see, we need to pass information between both sides of the controller. SDP "offer1" is provided by A in message (2) and needs to be sent to B side in message (3). This mechanism is implemented in the scenarios through the command. This:: Will send a "command" to the twin SIPp instance. Note that including the Call-ID is mandatory in order to correlate the commands to actual calls. In the same manner, this:: Will receive a "command" from the twin SIPp instance. Using the regular expression mechanism, the content is retrieved and stored in a call variable ($2 in this case), ready to be reinjected:: ;tag=[call_number] To: sut [peer_tag_param] Call-ID: [call_id] CSeq: 1 ACK Contact: sip:sipp@[local_ip]:[local_port] Max-Forwards: 70 Subject: Performance Test [$2] ]]> In other words, sendCmd and recvCmd can be seen as synchronization points between two SIPp instances, with the ability to pass parameters between each other. Another scenario that has been reported to be do-able with the 3PCC feature is the following: + A calls B. B answers. B and A converse + B calls C. C answers. C and B converse + B "REFER"s A to C and asks to replace A-B call with B-C call. + A accepts. A and C talk. B drops out of the calls. sipp-3.6.0/docs/sipp-05.jpg0000644000175000017500000011347313475544015014721 0ustar walterwalterJFIFHHC  !"$"$CmK" O!"1A#25QUs378BRTaqu$d4%&rC6DEF= !1S4AQaq5Rr3"2B#Cb ?nz"[?!m Sy).aG*=H-(i!J :l @$BzdCnɎ%E.($dUՀnr[wFI;BK R ܔWea QSM43va:p7{QUtדuCD@fru]aA )PsĻ_8~ߺ][HZdBnb<>uejXIꮁ>7ٽΌ9s[RyjN^ܮǤd\8OLF48Dp'vN]*ǯ ~8osg[SVmiK$,ٷ[fAgjn0R [JBH;-˰[$;xvxQmmIN2F)Rkb.\l"qׇ_n^8c0NGUT0r?g[SVƚ4dTxn{} ӒdңaF[[I*OEwdzv=CZ3#>l3ZZPj@)I;΀kNr\aTpL}3V:lx4pg[SV~:MOҮgj%9)Vzi'%X_'L)ah Y(Tbi>#S29.v |+0 l!:K2ʨ᧹xpׯޣ8~ߺ/fGaKN옭:ڑ!rB^[$<1-Ò Q[P-8dLk4:)W!\%;+Z8tUQL>tGkף ;y=}\wVpu\vfrj^-(3Rݏ+@a)'6 A5sֈbWPHn)un.18@H[N}$ ̙%6֡[ĸ뎶QJhV%#[X,6ˤU2ΜYG FRIk ,44٢tŽe--cMqf?8G+~{C"-NLL7nYy8JQŹG+Ai9.Z5ܬQ[` jU-nv?`5)JߏsCCrn iIi HpP$e*n8 c<1Hͭ6\-3prg[Wpuuk;LN>,_b=in5GT?:8 O WhGGiw(ZmviBm!)m!@040U%i '\ u|_N*,g=gC3j}Ҫb4LcFn~5m7oqEI:-lV)!;UNA`eu֚aEVH)l\!GjNҮn݀Q;NKRԨDޢW<) =.l9GPG5κ3$_/4DUƍcNݭŒm.5L"|:p.V6^ZCNerx9t$du\;Gҏ.KlTj.v[q3%N4s+v>'5IʑUWD"4U1 uG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*jTTpX:U˜Fsipp-3.6.0/docs/transport.rst0000644000175000017500000001343313475544015015603 0ustar walterwalterTransport modes =============== SIPp has several transport modes. The default transport mode is "UDP mono socket". UDP mono socket ``````````````` In UDP mono socket mode (-t u1 command line parameter), one IP/UDP socket is opened between SIPp and the remote. All calls are placed using this socket. This mode is generally used for emulating a relation between 2 SIP servers. UDP multi socket ```````````````` In UDP multi socket mode (-t un command line parameter), one IP/UDP socket is opened for each new call between SIPp and the remote. This mode is generally used for emulating user agents calling a SIP server. UDP with one socket per IP address `````````````````````````````````` In UDP with one socket per IP address mode (-t ui command line parameter), one IP/UDP socket is opened for each IP address given in the inf file. In addition to the "-t ui" command line parameter, one must indicate which field in the inf file is to be used as local IP address for this given call. Use "-ip_field " to provide the field number. There are two distinct cases to use this feature: + Client side: when using -t ui for a client, SIPp will originate each call with a different IP address, as provided in the inf file. In this case, when your IP addresses are in field X of the inject file, then you have to use [fieldX] instead of [local_ip] in your UAC XML scenario file. + Server side: when using -t ui for a server, SIPp will bind itself to all the IP addresses listed in the inf file instead of using 0.0.0.0. This will have the effect SIPp will answer the request on the same IP on which it received the request. In order to have proper Contact and Via fields, a keyword [server_ip] can be used and provides the IP address on which a request was received. So when using this, you have to replace the [local_ip] in your UAS XML scenario file by [server_ip]. In the following diagram, the command line for a client scenario will look like: ./sipp -sf myscenario.xml -t ui -inf database.csv -ip_field 2 192.168.1.1 By doing so, each new call will come sequentially from IP 192.168.0.1, 192.168.0.2, 192.168.0.3, 192.168.0.1, ... This mode is generally used for emulating user agents, using on IP address per user agent and calling a SIP server. TCP mono socket ``````````````` In TCP mono socket mode (-t t1 command line parameter), one IP/TCP socket is opened between SIPp and the remote. All calls are placed using this socket. This mode is generally used for emulating a relation between 2 SIP servers. TCP multi socket ```````````````` In TCP multi socket mode (-t tn command line parameter), one IP/TCP socket is opened for each new call between SIPp and the remote. This mode is generally used for emulating user agents calling a SIP server. TCP reconnections ````````````````` SIPp handles TCP reconnections. In case the TCP socket is lost, SIPp will try to reconnect. The following parameters on the command line control this behaviour: + -max_reconnect : Set the maximum number of reconnection attempts. + -reconnect_close true/false : Should calls be closed on reconnect? + -reconnect_sleep int : How long to sleep (in milliseconds) between the close and reconnect? TLS mono socket ``````````````` In TLS mono socket mode (-t l1 command line parameter), one secured TLS (Transport Layer Security) socket is opened between SIPp and the remote. All calls are placed using this socket. This mode is generally used for emulating a relation between 2 SIP servers. .. warning:: When using TLS transport, SIPp will expect to have two files in the current directory: a certificate (cacert.pem) and a key (cakey.pem). If one is protected with a password, SIPp will ask for it. SIPp supports X509's CRL (Certificate Revocation List). The CRL is read and used if -tls_crl command line specifies a CRL file to read. TLS multi socket ```````````````` In TLS multi socket mode (-t ln command line parameter), one secured TLS (Transport Layer Security) socket is opened for each new call between SIPp and the remote. This mode is generally used for emulating user agents calling a SIP server. SCTP mono socket ```````````````` In SCTP mono socket mode (-t s1 command line parameter), one SCTP (Stream Transmission Control Protocol) socket is opened between SIPp and the remote. All calls are placed using this socket. This mode is generally used for emulating a relation between 2 SIP servers. The -multihome, -heartbeat, -assocmaxret, -pathmaxret, -pmtu and -gracefulclose command-line arguments allow control over specific features of the SCTP protocol, but are usually not necessary. SCTP multi socket ````````````````` In SCTP multi socket mode (-t sn command line parameter), one SCTP socket is opened for each new call between SIPp and the remote. This mode is generally used for emulating user agents calling a SIP server. IPv6 support ```````````` SIPp includes IPv6 support. To use IPv6, just specify the local IP address (-i command line parameter) to be an IPv6 IP address. The following example launches a UAS server listening on port 5063 and a UAC client sending IPv6 traffic to that port. :: ./sipp -sn uas -i [fe80::204:75ff:fe4d:19d9] -p 5063 ./sipp -sn uac -i [fe80::204:75ff:fe4d:19d9] [fe80::204:75ff:fe4d:19d9]:5063 .. warning:: The Pcap play feature may currently not work on IPv6. Multi-socket limit `````````````````` When using one of the "multi-socket" transports, the maximum number of sockets that can be opened (which corresponds to the number of simultaneous calls) will be determined by the system (see how to increase file descriptors section to modify those limits). You can also limit the number of socket used by using the -max_socket command line option. Once the maximum number of opened sockets is reached, the traffic will be distributed over the sockets already opened. sipp-3.6.0/docs/_static/0000755000175000017500000000000013475544015014437 5ustar walterwaltersipp-3.6.0/docs/_static/theme_overrides.css0000644000175000017500000000344613475544015020344 0ustar walterwalter/* -*- coding: utf-8; mode: css -*- * * Sphinx HTML theme customization: read the doc * */ @media screen { /* content column * * RTD theme's default is 800px as max width for the content, but we have * tables with tons of columns, which need the full width of the view-port. */ .wy-nav-content{max-width: none; } /* table: * * - Sequences of whitespace should collapse into a single whitespace. * - make the overflow auto (scrollbar if needed) * - align caption "left" ("center" is unsuitable on vast tables) */ .wy-table-responsive table td { white-space: normal; } .wy-table-responsive { overflow: auto; } .rst-content table.docutils caption { text-align: left; font-size: 100%; } /* captions: * * - captions should have 100% (not 85%) font size * - hide the permalink symbol as long as link is not hovered */ .toc-title { font-size: 150%; font-weight: bold; } caption, .wy-table caption, .rst-content table.field-list caption { font-size: 100%; } caption a.headerlink { opacity: 0; } caption a.headerlink:hover { opacity: 1; } /* Menu selection and keystrokes */ span.menuselection { color: blue; font-family: monospace, "Courier New", Courier } code.kbd, code.kbd span { color: white; background-color: darkblue; font-weight: bold; font-family: monospace, "Courier New", Courier } /* inline literal: drop the borderbox, padding and red color */ code, .rst-content tt, .rst-content code { color: inherit; border: none; padding: unset; background: inherit; font-size: 85%; } .rst-content tt.literal,.rst-content tt.literal,.rst-content code.literal { color: inherit; } } sipp-3.6.0/docs/ooc_default.xml0000644000175000017500000000423213475544015016020 0ustar walterwalter Content-Length: 0 ]]> sipp-3.6.0/docs/branchc.xml0000644000175000017500000001104613475544015015135 0ustar walterwalter ;tag=[pid]SIPpTag07[call_number] To: ua1 Call-ID: [call_id] CSeq: 1 REGISTER Contact: sip:ua1@[local_ip]:[local_port] Content-Length: 0 Expires: 300 ]]> sipp-3.6.0/docs/sipp.rst0000644000175000017500000000622313475544015014521 0ustar walterwalterMain features ============= SIPp allows to generate one or many SIP calls to one remote system. The tool is started from the command line. In this example, two SIPp are started in front of each other to demonstrate SIPp capabilities. Run sipp with embedded server (uas) scenario:: # ./sipp -sn uas On the same host, run sipp with embedded client (uac) scenario:: # ./sipp -sn uac 127.0.0.1 Running SIPp in background `````````````````````````` SIPp can be launched in background mode (-bg command line option). By doing so, SIPp will be detached from the current terminal and run in the background. The PID of the SIPp process is provided. If you didn't specify a number of calls to execute with the -m option, SIPp will run forever. There is a mechanism implemented to stop SIPp smoothly. The command kill -SIGUSR1 [SIPp_PID] will instruct SIPp to stop placing any new calls and finish all ongoing calls before exiting. When using the background mode, the main sipp instance stops and a child process will continue the job. Therefore, the log files names will contain another PID than the actual sipp instance PID. Screens ``````` Several screens are available to monitor SIP traffic. You can change the screen view by pressing 1 to 9 keys on the keyboard. + Key '1': Scenario screen. It displays a call flow of the scenario as well as some important informations. .. image:: sipp-03.jpg + Key '2': Statistics screen. It displays the main statistics counters. The "Cumulative" column gather all statistics, since SIPp has been launched. The "Periodic" column gives the statistic value for the period considered (specified by -f frequency command line parameter). .. image:: sipp-04.jpg + Key '3': Repartition screen. It displays the distribution of response time and call length, as specified in the scenario. .. image:: sipp-05.jpg + Key '4': Variables screen. It displays informations on actions in scenario as well as scenario variable informations. .. image:: sipp-06.jpg Exit codes `````````` To ease automation of testing, upon exit (on fatal error or when the number of asked calls (-m command line option) is reached, sipp exits with one of the following exit codes: ==== =========== Code Description ==== =========== 0 All calls were successful 1 At least one call failed 97 Exit on internal command. Calls may have been processed. Also exit on global timeout (see -timeout_global option) 99 Normal exit without calls processed -1 Fatal error -2 Fatal error binding a socket ==== =========== Depending on the system that SIPp is running on, you can echo this exit code by using "echo ?" command. Contributing to SIPp ```````````````````` Of course, we welcome contributions, and many of SIPp's features (including epoll support for better Linux performance, RTP streaming, and Cygwin support) have come from external contributions. See `developers guide`_ for how to get started + Richard GAYRAUD [initial code] + Olivier JACQUES [code/documentation] + Robert Day [code/documentation] + Charles P. Wright [code] + Many contributors [code] .. _developers guide: https://github.com/SIPp/sipp/wiki/New-Developers'-Guide sipp-3.6.0/docs/media.rst0000644000175000017500000000360213475544015014623 0ustar walterwalterHandling media with SIPp ======================== SIPp is originally a signalling plane traffic generator. There is a limited support of media plane (RTP). RTP echo ```````` The "RTP echo" feature allows SIPp to listen to one or two local IP address and port (specified using -mi and -mp command line parameters) for RTP media. Everything that is received on this address/port is echoed back to the sender. RTP/UDP packets coming on this port + 2 are also echoed to their sender (used for sound and video echo). RTP streaming ````````````` SIPp can play a PCMA, PCMU, G722, iLBC or G729-encoded audio file over RTP. More details on how to do this can be found in the action reference section. PCAP Play ````````` The PCAP play feature makes use of the `PCAP library`_ to replay pre- recorded RTP streams towards a destination. RTP streams can be recorded by tools like Wireshark or ``tcpdump``. This allows you to: + Play any RTP stream (voice, video, voice+video, out of band DTMFs/:RFC:`2833`, T38 fax, ...) + Use any codec as the codec is not handled by SIPp + Emulate precisely the behavior of any SIP equipment as the pcap play will try to replay the RTP stream as it was recorded (limited to the performances of the system). + Reproduce exactly what has been captured using an IP sniffer like Wireshark. A good example is the UAC with media (uac_pcap) embedded scenario. SIPp comes with a G711 alaw pre-recorded pcap file and out of band (:RFC:`2833`) DTMFs in the pcap/ directory. .. warning:: The PCAP play feature uses pthread_setschedparam calls from pthread library. Depending on the system settings, you might need to be root to allow this. Please check "man 3 pthread_setschedparam" man page for details More details on the possible PCAP play actions can be found in the action reference section. .. _PCAP library: https://www.tcpdump.org/manpages/pcap.3pcap.html sipp-3.6.0/docs/tools.rst0000644000175000017500000000175613475544015014714 0ustar walterwalterUseful tools aside SIPp ======================= JEdit ````` `JEdit `_ is a GNU GPL text editor written in Java, and available on almost all platforms. It's extremely powerful and can be used to edit SIPp scenarios with syntax checking if you put the DTD (`sipp.dtd `_) in the same directory as your XML scenario. Wireshark/tshark ```````````````` `Wireshark `_ is a GNU GPL protocol analyzer. It was formerly known as Ethereal. It supports SIP/SDP/RTP. SIP callflow ```````````` When tracing SIP calls, it is very useful to be able to get a call flow from an wireshark trace. The "callflow" tool allows you to do that in a graphical way: `callflow `_ An equivalent exist if you want to generate HTML only call flows `http://www.iptel.org/~sipsc/`_ .. _http://www.iptel.org/~sipsc/: https://web.archive.org/web/20120106005622/https://www.iptel.org/~sipsc/ sipp-3.6.0/docs/3pcc-C-A.xml0000644000175000017500000001144613475544015014727 0ustar walterwalter ;tag=[pid]SIPpTag03[call_number] To: [service] Call-ID: [call_id] CSeq: 1 INVITE Contact: sip:sipp@[local_ip]:[local_port] Max-Forwards: 70 Subject: Performance Test Content-Length: 0 ]]> ;tag=[pid]SIPpTag03[call_number] To: [service] [peer_tag_param] Call-ID: [call_id] CSeq: 1 ACK Contact: sip:sipp@[local_ip]:[local_port] Max-Forwards: 70 Subject: Performance Test [$2] ]]> ;tag=[pid]SIPpTag03[call_number] To: [service] [peer_tag_param] Call-ID: [call_id] CSeq: 2 BYE Contact: sip:sipp@[local_ip]:[local_port] Max-Forwards: 70 Subject: Performance Test Content-Length: 0 ]]> sipp-3.6.0/docs/conf.py0000644000175000017500000001145313475544015014314 0ustar walterwalter# -*- coding: utf-8 -*- # # SIPp documentation build configuration file, created by # sphinx-quickstart on Tue Dec 27 16:20:26 2016. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented out # serve to show the default. # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # import os import sys sys.path.insert(0, os.path.abspath('.')) # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. # # needs_sphinx = '1.0' # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = ['rstFlatTable'] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] # The suffix(es) of source filenames. # You can specify multiple suffix as a list of string: # # source_suffix = ['.rst', '.md'] source_suffix = '.rst' # The master toctree document. master_doc = 'index' # General information about the project. project = u'SIPp' copyright = u'2019, SIPp community' author = u'SIPp developer community' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. version = u'3.6' # The full version, including alpha/beta/rc tags. release = u'3.6' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. language = None # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This patterns also effect to html_static_path and html_extra_path exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' # If true, `todo` and `todoList` produce output, else they produce nothing. todo_include_todos = False # -- Options for HTML output ---------------------------------------------- # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # #html_theme = 'alabaster' html_theme = 'sphinx_rtd_theme' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the # documentation. # # html_theme_options = {} # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". html_static_path = ['_static'] def setup(app): app.add_stylesheet('theme_overrides.css') #html_context = { # 'css_files': [ # '_static/theme_overrides.css', # ], #} # -- Options for HTMLHelp output ------------------------------------------ # Output file base name for HTML help builder. htmlhelp_basename = 'SIPpdoc' # -- Options for LaTeX output --------------------------------------------- latex_elements = { # The paper size ('letterpaper' or 'a4paper'). # # 'papersize': 'letterpaper', # The font size ('10pt', '11pt' or '12pt'). # # 'pointsize': '10pt', # Additional stuff for the LaTeX preamble. # # 'preamble': '', # Latex figure (float) alignment # # 'figure_align': 'htbp', } # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, # author, documentclass [howto, manual, or own class]). latex_documents = [ (master_doc, 'SIPp.tex', u'SIPp Documentation', u'SIPp community', 'manual'), ] # -- Options for manual page output --------------------------------------- # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ (master_doc, 'sipp', u'SIPp Documentation', [author], 1) ] # -- Options for Texinfo output ------------------------------------------- # Grouping the document tree into Texinfo files. List of tuples # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ (master_doc, 'SIPp', u'SIPp Documentation', author, 'SIPp', 'One line description of project.', 'Miscellaneous'), ] highlight_language = 'XML' sipp-3.6.0/docs/sipp-06.jpg0000644000175000017500000012333413475544015014717 0ustar walterwalterJFIFHHC  !"$"$CmK" R  !"1AU#25QRqs78Tau$3Bd4r%E6CDFGSb= !1S4AQaq5Rr3"2B#Cb ?nz"[?!m Sy).aG*=H-(i!J qPǐ$dʇ5[:;Jl2\PH!)7r &LB$nR] . ($dmJ(`yB7n9igun+L{&͹묺l8RR+w~8~ߺ][Hȅ"2 5ejXIꮁ>}No3{-s?V"涤4(]O1rʓgtM?1ӄo:λt*"5λ?eoNg[U,lfߩnW)N>ai2Ն`$;H;[[`ϸIpv-wh<$ڢa ڒ2F)Rkb.\l"qׇ_n^8c0NGUT0r>g[SVƚ4dTxn{} Ӓdңa#q-Ĥ'HT=;]ăq!@ -(u ^ g@59.TW08Z&>ë~BLbpӏo8w{+~էiWtNos+=Td4/#qXn>keO DfK݅f7])u5F\U|<41Uz;~g[SV٬ݜh5ݒ )wZݓQ"ޛR$.HKdC~!ܒF>Ŵ>rV*+z쉍pMt\E0J+2ShB3MUѧDƽz0NC3{?eoNg[UJ8nͮo3nZW ťj_[h %$Ҿ"lQ7=/ hN;f*{5ϸVKD$!g.M1: ѫ};'j"&c^ӯpu;?eo]Ki,ƍx1UX!kqKP%n2H X$t'e6b%[JsY*,bԹI_2c%ø$#wZҶ ׆;7͞D)\c5]{Yt6hzmޙ'KoB'4N~VGNRA*kK{vLӱ4ST6 ZH>2 (dzN+]/U:'Li={lmcgUQvNjp+ފg{\h *U$,ӑ iMc*HWQ'=GN,#@u4H[ZRID*W7"IRu}z?~wh &5-޴Iuw'!=<օ)ljSM83:#LL^]j']"j 1t8>}l -NVR抒xIQҥ\ & P{KORT)?E]ܣEi-mg_P첯-}זHu |!` Pe鲢ʊq&q?:?˶q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3)x~~F<GG3/ <'!n[͢*&`?3[@Ұ~<0OH:Q)]q1"{gGj7\Y4I~Ip>!/ S몸jY,||YT  p!vPKg'+u]gُ.Et)m4x4 ޚ v pN?'e]wTs3`+=p!=̖ppɺKZspgi'se}Yf6 _fXhf) P˗VdZ n[̬9jDVqKuXTHAZœG%'y8AA!"Z&U+_qAu AA ! "BAE$8 HqA  ("!AAPDB AA ! "BAE$8 HqA  ("!AAPDB AA ! "BAE$8 HqA  ("!AAPDB AA ! "BAE$8 HqA  ("!AAPDB AA ! "BAE$8 HqA  ("!*{ACb`EARs7p|AKODP62.XefO{,I+3K,?`~YIENDB`sipp-3.6.0/docs/controlling.rst0000644000175000017500000001303513475544015016077 0ustar walterwalterControlling SIPp ================ SIPp can be controlled interactively through the keyboard or via a UDP socket. SIPp supports both 'hot' keys that can be entered at any time and also a simple command mode. The hot keys are: ===== ====== Key Action ===== ====== \+ Increase the call rate by 1 * rate_scale \* Increase the call rate by 10 * rate_scale \- Decrease the call rate by 1 * rate_scale / Decrease the call rate by 10 * rate_scale c Enter command mode q Quit SIPp (after all calls complete, enter a second time to quit immediately) Q Quit SIPp immediately s Dump screens to the log file (if -trace_screen is passed) p Pause traffic 1 Display the scenario screen 2 Display the statistics screen 3 Display the repartition screen 4 Display the variable screen 5 Display the TDM screen 6-9 Display the second through fifth repartition screen. ===== ====== In command mode, you can type a single line command that instructs SIPp to take some action. Command mode is more versatile than the hot keys, but takes more time to input some common actions. The following commands are available: List of Interactive Commands ```````````````````````````` - ``dump tasks`` Prints a list of active tasks (most tasks are calls) to the error log. dump tasks - ``set rate X`` Sets the call rate. set rate 10 - ``set rate-scale X`` Sets the rate scale, which adjusts the speed of '+', '-', '*', and '/'. set rate-scale 10 - ``set users X`` Sets the number of users (only valid when -users is specified). set rate 10 - ``set limit X`` Sets the open call limit (equivalent to -l option) set limit 100 - ``set hide `` Should the hide XML attribute be respected? set hide false - ``set index `` Display message indexes in the scenario screen. set index true - ``set display `` Changes the scenario that is displayed to either the main or the out-of-call scenario. set display main set display ooc - ``trace `` Turns log on or off at run time. Valid values for log are "error", "logs", "messages", and "shortmessages". trace error on Traffic control ``````````````` SIPp generates SIP traffic according to the scenario specified. You can control the number of calls (scenario) that are started per second. If you pass the -users option, then you need to control the number of instantiated users. You can control the rate through: + Interactive hot keys (described in the previous section) + Interactive Commands + Startup Parameters There are two commands that control rates: set rate X sets the current call rate to X. Additionally, set rate-scale X sets the rate_scale parameter to X. This enables you to use the '+', '-', '*', and '/' keys to set the rate more quickly. For example, if you do set rate- scale 100, then each time you press '+', the call rate is increased by 100 calls and each time you press '*', the call rate is increased by 1000 calls. Similarly, for a user based benchmark you can run set users X. At starting time, you can control the rate by specifying parameters on the command line: + "-r" to specify the call rate in number of calls per seconds + "-rp" to specify the " r ate p eriod" in milliseconds for the call rate (default is 1000ms/1sec). This allows you to have n calls every m milliseconds (by using -r n -rp m). .. note:: Example: run SIPp at 7 calls every 2 seconds (3.5 calls per second) :: ./sipp -sn uac -r 7 -rp 2000 127.0.0.1 You can also pause the traffic by pressing the 'p' key. SIPp will stop placing new calls and wait until all current calls go to their end. You can resume the traffic by pressing 'p' again. To quit SIPp, press the 'q' key. SIPp will stop placing new calls and wait until all current calls go to their end. SIPp will then exit. You can also force SIPp to quit immediatly by pressing the 'Q' key. Current calls will be terminated by sending a BYE or CANCEL message (depending if the calls have been established or not). The same behaviour is obtained by pressing 'q' twice. .. tip:: You can place a defined number of calls and have SIPp exit when this is done. Use the -m option on the command line. Remote control `````````````` SIPp can be "remote-controlled" through a UDP socket. This allows for example + To automate a series of actions, like increasing the call rate smoothly, wait for 10 seconds, increase more, wait for 1 minute and loop + Have a feedback loop so that an application under test can remote control SIPp to lower the load, pause the traffic, ... Each SIPp instance is listening to a UDP socket. It starts to listen to port 8888 and each following SIPp instance (up to 60) will listen to base_port + 1 (8889, 8890, ...). It is then possible to control SIPp like this: :: echo p >/dev/udp/x.y.z.t/8888 -> put SIPp in pause state (p key) echo q >/dev/udp/x.y.z.t/8888 -> quit SIPp (q key) .. note:: All keys available through keyboard are also available in the remote control interface You could also have a small shell script to automate a serie of action. For example, this script will increase the call rate by 10 more new calls/s every 5 seconds, wait at this call rate for one minute and exit SIPp: :: #!/bin/sh echo "*" >/dev/udp/127.0.0.1/8889 sleep 5 echo "*" >/dev/udp/127.0.0.1/8889 sleep 5 echo "*" >/dev/udp/127.0.0.1/8889 sleep 5 echo "*" >/dev/udp/127.0.0.1/8889 sleep 60 echo "q" >/dev/udp/127.0.0.1/8889 To send a command to SIPp, preface it with 'c'. For example: ``echo "cset rate 100" >/dev/udp/127.0.0.1/8888 sets the call rate to 100.`` sipp-3.6.0/docs/3pcc-C-B.xml0000644000175000017500000001144413475544015014726 0ustar walterwalter ;tag=[pid]SIPpTag04[call_number] To: [service] Call-ID: [call_id] CSeq: 1 INVITE Contact: sip:sipp@[local_ip]:[local_port] Max-Forwards: 70 Subject: Performance Test [$1] ]]> ;tag=[pid]SIPpTag04[call_number] To: [service] [peer_tag_param] Call-ID: [call_id] CSeq: 1 ACK Contact: sip:sipp@[local_ip]:[local_port] Max-Forwards: 70 Subject: Performance Test Content-Length: 0 ]]> ;tag=[pid]SIPpTag04[call_number] To: [service] [peer_tag_param] Call-ID: [call_id] CSeq: 2 BYE Contact: sip:sipp@[local_ip]:[local_port] Max-Forwards: 70 Subject: Performance Test Content-Length: 0 ]]> sipp-3.6.0/docs/sipp-04.jpg0000644000175000017500000015664213475544015014725 0ustar walterwalterJFIFHHC  !"$"$CmK" P !"1A#2RU5BQTaqsu78d$34r%C&6DEFS= !1S4AQaq5Rr3"2B#Cb ? OimirTuh $ř(i!J (CcUoRB{\CV鎷 .HJnmZڠXMNKu.a4H[䌔BK ?Qa˙F7*&igu.+L{385PÑ>ܶuXmCjJT.cXWVUn"<"t(49Yk+ROuv oٞ赆vd9D؊ڐCPD@rhE۰69YRl}#p"8XC'Yy⮕EQOc׆7׋Vx8uom[jQ `6?rԪS6}$ &AգƿN*-RSȃNj)Rui.6t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Content-Length: 0 ]]> Content-Type: application/sdp Content-Length: [len] v=0 o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip] s=- c=IN IP[media_ip_type] [media_ip] t=0 0 m=audio [media_port] RTP/AVP 0 a=rtpmap:0 PCMU/8000 ]]> Content-Length: 0 ]]> sipp-3.6.0/docs/statistics.rst0000644000175000017500000001160013475544015015733 0ustar walterwalterStatistics ========== Response times `````````````` Response times can be gathered and reported. Response time names can be arbitrary strings, but for backwards compatibility the value "true" is treated as if it were named "1". Each response time can be used to compute time between two SIPp commands (send, recv or nop). You can start a timer by using the start_rtd attribute and stop it using the rtd attribute. You can view the value of those timers in the SIPp interface by pressing 3, 6, 7, 8 or 9. You can also save the values in a CSV file using the -trace_stat option (see below). If the -trace_rtt option is set, the response times are also dumped in the >scenario file name<_>pid<_rtt.csv. Each line represents a RTD measure (triggered by a message reception with a rtd="n" attribute). The dump frequency is tuned by the -rtt_freq parameter. Available counters `````````````````` The -trace_stat option dumps all statistics in the scenario_name_pid.csv file. The dump starts with one header line with all counters. All following lines are 'snapshots' of statistics counter given the statistics report frequency (-fd option). When SIPp exits, the last values of the statistics are also dumped in this file. This file can be easily imported in any spreadsheet application, like Excel. In counter names, (P) means 'Periodic' - since last statistic row and (C) means 'Cumulated' - since sipp was started. Available statistics are: + StartTime: Date and time when the test has started. + LastResetTime: Date and time when periodic counters where last reseted. + CurrentTime: Date and time of the statistic row. + ElapsedTime: Elapsed time. + CallRate: Call rate (calls per seconds). + IncomingCall: Number of incoming calls. + OutgoingCall: Number of outgoing calls. + TotalCallCreated: Number of calls created. + CurrentCall: Number of calls currently ongoing. + SuccessfulCall: Number of successful calls. + FailedCall: Number of failed calls (all reasons). + FailedCannotSendMessage: Number of failed calls because Sipp cannot send the message (transport issue). + FailedMaxUDPRetrans: Number of failed calls because the maximum number of UDP retransmission attempts has been reached. + FailedUnexpectedMessage: Number of failed calls because the SIP message received is not expected in the scenario. + FailedCallRejected: Number of failed calls because of Sipp internal error. (a scenario sync command is not recognized or a scenario action failed or a scenario variable assignment failed). + FailedCmdNotSent: Number of failed calls because of inter-Sipp communication error (a scenario sync command failed to be sent). + FailedRegexpDoesntMatch: Number of failed calls because of regexp that doesn't match (there might be several regexp that don't match during the call but the counter is increased only by one). + FailedRegexpShouldntMatch: Number of failed calls because of regexp that shouldn't match (there might be several regexp that shouldn't match during the call but the counter is increased only by one). + FailedRegexpHdrNotFound: Number of failed calls because of regexp with hdr option but no matching header found. + FailedOutboundCongestion: Number of failed outgoing calls because of TCP congestion. + FailedTimeoutOnRecv: Number of failed calls because of a recv timeout statement. + FailedTimeoutOnSend: Number of failed calls because of a send timeout statement. + OutOfCallMsgs: Number of SIP messages received that cannot be associated with an existing call. + Retransmissions: Number of SIP messages being retransmitted. + AutoAnswered: Number of unexpected specific messages received for new Call-ID. The message has been automatically answered by a 200 OK Currently, implemented for 'PING' message only. The counters defined in the scenario are also dumped in the stat file. Counters that have a numeric name are identified by the GenericCounter columns. In addition, two other statistics are gathered: + ResponseTime (see previous section) + CallLength: this is the time of the duration of an entire call. Both ResponseTime and CallLength statistics can be tuned using ResponseTimeRepartition and CallLengthRepartition commands in the scenario. The standard deviation (STDev) is also available in the log stat file for these two statistics. Detailed Message Counts ``````````````````````` The SIPp screens provide detailed information about the number of messages sent or recieved, retransmissions, messages lost, and the number of unexpected messages for each scenario element. Although these screens can be parsed, it is much simpler to parse a CSV file. To produce a CSV file that contains the per-message information contained in the main display screen pass the -trace_counts option. Each column of the file represents a message and a particular count of interest (e.g., "1_INVITE_Sent" or "2_100_Unexp"). Each row corresponds to those statistics at a given statistics reporting interval. sipp-3.6.0/docs/scenarios/0000755000175000017500000000000013475544015014777 5ustar walterwaltersipp-3.6.0/docs/scenarios/branching_01.gif0000644000175000017500000002506613475544015017732 0ustar walterwalterGIF89abp,b   $   $$$$$$$( ( $($0( ,,,,,0(0(<0,0,@44440804844880<00Xܴ#SUot7 cSi6PgyUV}$~'^0T@;ȅe~`#B՚i1g֎c9gUsVAH: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AQ?2\E!]^r#ڋVOZޯRʘe_]p뉼C]]EkFP,ңţJ"U#գQ')j"\ڳE>b'6_:LZʖApG]]B"\&Q#)? ݟjB'M,HkLG<:&86Nfco} wJCD A#[7 #_" +X2C] '\`Pڤc#^ ޞا^\)9Ъr*%5[(,BEJſBʋTGB%C%0Vda4 ^7%9[]ǾٵF+'$'eQNk'+îdO*a;+sY0]•d]"y$h7>wb-CiNi^iJi04ѓ' ԙW\9:iwjjj.j>uMj^uS {Zk /`6xVxk^%kp+(=2,x L8#/x5mxkޘ}VU֘nɦ!gmԾ^mֶmi؎ll>}m6m߶6ZцhF ;sipp-3.6.0/docs/scenarios/inject_from_csv.rst0000644000175000017500000001225013475544015020703 0ustar walterwalterInjecting values from an external CSV during calls `````````````````````````````````````````````````` You can use "-inf file_name" as a command line parameter to input values into the scenarios. The first line of the file should say whether the data is to be read in sequence (SEQUENTIAL), random order (RANDOM), or in a user based manner (USER). Each line corresponds to one call and has one or more ';' delimited data fields and they can be referred as [field0], [field1], ... in the xml scenario file. Example:: SEQUENTIAL #This line will be ignored Sarah;sipphone32 Bob;sipphone12 #This line too Fred;sipphone94 Will be read in sequence (first call will use first line, second call second line). At any place where the keyword "[field0]" appears in the scenario file, it will be replaced by either "Sarah", "Bob" or "Fred" depending on the call. At any place where the keyword "[field1]" appears in the scenario file, it will be replaced by either "sipphone32" or "sipphone12" or "sipphone94" depending on the call. At the end of the file, SIPp will re-start from the beginning. The file is not limited in size. You can override the default line selection strategy with the optional line argument. For example:: [field0 line=1] Selects the second line in the file (the first line is line zero. The line parameters support keywords in the argument, so in conjunction with a lookup action it is possible to select values based on a key. The CSV file can contain comment lines. A comment line is a line that starts with a "#". As a picture says more than 1000 words, here is one: .. image:: sipp-02.gif Think of the possibilities of this feature. They are huge. It is possible to use more than one injection file, and is necessary when you want to select different types of data in different ways. For example, when running a user-based benchmark, you may have a caller.csv with "USER" as the first line and a callee.csv with "RANDOM" as the first line. To specify which CSV file is used, add the file= parameter to the keyword. For example:: INVITE sip:[field0 file="callee.csv"] SIP/2.0 From: sipp user <[field0 file="caller.csv"]>;tag=[pid]SIPpTag00[call_number] To: sut user <[field0 file="callee.csv"]> ... Will select the destination user from callee.csv and the sending user from caller.csv. If no file parameter is specified, then the first input file on the command line is used by default. PRINTF Injection files ++++++++++++++++++++++ An extension of the standard injection file is a "PRINTF" injection file. Often, an input file will has a repetitive nature such as:: USERS user000;password000 user001;password001 ... user999;password999 SIPp must maintain this structure in memory, which can reduce performance for very large injection files. To eliminate this problem, SIPp can automatically generate such a structured file based on one or more template lines. For example:: USERS,PRINTF=999 user%03d;password%03d Has the same logical meaning as the original example, yet SIPp only needs to store one entry in memory. Each time a line is used; SIPp will replace %d with the requested line number (starting from zero). Standard printf format decimal specifiers can be used. When more than one template line is available, SIPp cycles through them. This example:: USERS,PRINTF=4 user%03d;password%03d;Foo user%03d;password%03d;Bar Is equivalent to the following injection file:: USERS user000;password000;Foo user001;password001;Bar user002;password002;Foo user003;password003;Bar The following parameters are used to control the behavior of printf injection files: Printf Injection File Parameters ```````````````````````````````` Parameter Description Example PRINTF How many virtual lines exist in this file. PRINTF=10, creates 10 virtual lines PRINTFMULTIPLE Multiple the virtual line number by this value before generating the substitutions used. PRINTF=10,PRINTFMULTIPLE=2 creates 10 virtual lines numbered 0,2,4,...,18. PRINTFOFFSET Add this value to the virtual line number before generating the substitutions used (applied after PRINTFMULTIPLE). PRINTF=10,PRINTFOFFSET=100 creates 10 virtual lines numbered 100-109. PRINTF=10,PRINTFMULTIPLE=2,PRINTFOFFSET=10 creates 10 users numbered 10,12,14,...28. Indexing Injection files ++++++++++++++++++++++++ The -infindex option allows you to generate an index of an injection file. The arguments to -infindex are the injection file to index and the field number that should be indexed. For example if you have an injection file that contains user names and passwords (as the following):: USERS alice,pass_A bob,pass_B carol,pass_C You may want to extract the password for a given user in the file. To do this efficiently, SIPp must build an index for the first field (0). Thus you would pass the argument ``-infindex users.csv 0`` (assuming the file basename is ``users.csv``). SIPp will create an index that contains the logical entries ``{"alice" => 0, "bob" => 1, "carol" => 2}``. To extract a particular password, you can use the lookup action to store the line number into a variable (say ``$line``) and then use the keyword ``[field1 line="[$line]"]``. sipp-3.6.0/docs/scenarios/cond_branching.rst0000644000175000017500000000502713475544015020473 0ustar walterwalter.. _cond-branching: Conditional branching ````````````````````` Conditional branching in scenarios ++++++++++++++++++++++++++++++++++ It is possible to execute a scenario in a non-linear way. You can jump from one part of the scenario to another for example when a message is received or if a call variable is set. You define a label (in the xml) as