You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
(2) |
Dec
(6) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(12) |
Feb
(9) |
Mar
(8) |
Apr
(5) |
May
(10) |
Jun
(13) |
Jul
(7) |
Aug
(15) |
Sep
(17) |
Oct
(23) |
Nov
(51) |
Dec
(9) |
2007 |
Jan
(27) |
Feb
(11) |
Mar
(14) |
Apr
(21) |
May
(55) |
Jun
(15) |
Jul
(16) |
Aug
(8) |
Sep
(15) |
Oct
(24) |
Nov
(19) |
Dec
(47) |
2008 |
Jan
(33) |
Feb
(1) |
Mar
(14) |
Apr
(10) |
May
(8) |
Jun
(33) |
Jul
(33) |
Aug
(10) |
Sep
(13) |
Oct
(10) |
Nov
(1) |
Dec
(11) |
2009 |
Jan
(3) |
Feb
|
Mar
(8) |
Apr
(5) |
May
(1) |
Jun
|
Jul
(3) |
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
(3) |
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(20) |
2013 |
Jan
(3) |
Feb
(20) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <arc...@us...> - 2012-12-29 18:52:55
|
Revision: 620 http://sourceforge.net/p/sipp/code/620 Author: arcady-91 Date: 2012-12-29 18:52:52 +0000 (Sat, 29 Dec 2012) Log Message: ----------- Fixed configure, now compiles on Cygwin Modified Paths: -------------- sipp/trunk/configure.ac Modified: sipp/trunk/configure.ac =================================================================== --- sipp/trunk/configure.ac 2012-12-29 11:20:12 UTC (rev 619) +++ sipp/trunk/configure.ac 2012-12-29 18:52:52 UTC (rev 620) @@ -41,8 +41,9 @@ CPPFLAGS="$CPPFLAGS -D__SUNOS" ;; *-cygwin*) - CFLAGS="$CFLAGS -D__CYGWIN" - CPPFLAGS="$CPPFLAGS -D__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" @@ -116,11 +117,10 @@ # Conditional build with SCTP if test "$sctp" = 'yes'; then AC_CHECK_HEADERS([netinet/sctp.h],,[AC_MSG_WARN([<netinet/sctp.h> header missing, but this is acceptable on Mac OS X Lion])]) - AC_SEARCH_LIBS([sctp_send],[sctp],,[AC_MSG_ERROR([SCTP library missing])]) - AC_SEARCH_LIBS([sctp_getpaddrs],[sctp],,[AC_MSG_ERROR([SCTP library missing])]) - AC_SEARCH_LIBS([sctp_freepaddrs],[sctp],,[AC_MSG_ERROR([SCTP library missing])]) - AC_SEARCH_LIBS([sctp_bindx],[sctp],,[AC_MSG_ERROR([SCTP library missing])]) - AC_SEARCH_LIBS([sctp_recvmsg],[sctp],,[AC_MSG_ERROR([SCTP library missing])]) + AC_SEARCH_LIBS([sctp_send],[sctp sctpsp],,[AC_MSG_ERROR([SCTP library missing])]) + AC_SEARCH_LIBS([sctp_freepaddrs],[sctp sctpsp],,[AC_MSG_ERROR([SCTP library missing])]) + AC_SEARCH_LIBS([sctp_bindx],[sctp sctpsp],,[AC_MSG_ERROR([SCTP library missing])]) + AC_SEARCH_LIBS([sctp_recvmsg],[sctp sctpsp],,[AC_MSG_ERROR([SCTP library missing])]) fi # For Makefile.am AM_CONDITIONAL(HAVE_SCTP, test "$sctp" = "yes") @@ -128,10 +128,10 @@ # Conditional build with pcap if test "$pcap" = 'yes'; then AC_CHECK_HEADERS([pcap.h],,[AC_MSG_ERROR([<pcap.h> header missing])]) - AC_SEARCH_LIBS([pcap_open_offline],[pcap,wpcap],,[AC_MSG_ERROR([pcap library missing])]) - AC_SEARCH_LIBS([pcap_next],[pcap,wpcap],,[AC_MSG_ERROR([pcap library missing])]) - AC_SEARCH_LIBS([pcap_next_ex],[pcap,wpcap],,[AC_MSG_ERROR([pcap library missing])]) - AC_SEARCH_LIBS([pcap_close],[pcap,wpcap],,[AC_MSG_ERROR([pcap library missing])]) + AC_SEARCH_LIBS([pcap_open_offline],[pcap wpcap],,[AC_MSG_ERROR([pcap library missing])]) + AC_SEARCH_LIBS([pcap_next],[pcap wpcap],,[AC_MSG_ERROR([pcap library missing])]) + AC_SEARCH_LIBS([pcap_next_ex],[pcap wpcap],,[AC_MSG_ERROR([pcap library missing])]) + AC_SEARCH_LIBS([pcap_close],[pcap wpcap],,[AC_MSG_ERROR([pcap library missing])]) fi # For Makefile.am AM_CONDITIONAL(HAVE_PCAP, test "$pcap" = "yes") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arc...@us...> - 2012-12-29 11:20:15
|
Revision: 619 http://sourceforge.net/p/sipp/code/619 Author: arcady-91 Date: 2012-12-29 11:20:12 +0000 (Sat, 29 Dec 2012) Log Message: ----------- Fixes needed to create .rpm and .deb packages, and compile on PureDarwin Modified Paths: -------------- sipp/trunk/Makefile.am sipp/trunk/README.txt sipp/trunk/configure.ac sipp/trunk/sipp.cpp sipp/trunk/sipp.hpp Modified: sipp/trunk/Makefile.am =================================================================== --- sipp/trunk/Makefile.am 2012-12-22 09:06:54 UTC (rev 618) +++ sipp/trunk/Makefile.am 2012-12-29 11:20:12 UTC (rev 619) @@ -17,7 +17,7 @@ endif if HAVE_SCTP -DEFS += -ggdb -DUSE_SCTP +DEFS += -DUSE_SCTP endif sipp_SOURCES = comp.c \ Modified: sipp/trunk/README.txt =================================================================== --- sipp/trunk/README.txt 2012-12-22 09:06:54 UTC (rev 618) +++ sipp/trunk/README.txt 2012-12-29 11:20:12 UTC (rev 619) @@ -1,35 +1,34 @@ -# 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. +# SIPp - a SIP protocol test tool +# Copyright (C) 2003,2004,2005,2006 - 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. +# 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,2004,2005,2006 - The Authors -# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. BUILDING ******** -This is the Sipp package. Please refer to the http://sipp.sourceforge.net/ -WEB page for details and download of the last version. +This is the SIPp package. Please refer to the http://sipp.sourceforge.net/ +webpage for details and download of the last version. -Normally, you should be able to build Sipp by just typing "make" in the -current diractory. Then "sipp -h" will give you access to the online help. +Normally, you should be able to build SIPp by just typing +"autoreconf -ivf; ./configure --with-pcap --with-sctp; make" in the +current directory. Then "sipp -h" will give you access to the online help. CONTRIBUTING ************ -Sipp is free software, under the terms of the GPL licence (please the the +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 contact us via Sourceforge to integrate your changes. If you +of SIPp and contact us via Sourceforge to integrate your changes. If you make changes in Sipp, *PLEASE* follow a few coding rules: - Use 80 columns code, @@ -48,7 +47,7 @@ - Use "{" in if conditions even if there is only one instruction (see example above). - - Do not use std C++ libs if something euivalent exists in libc + - Do not use std C++ libs if something equivalent exists in libc (better portability). (e.g. prefer "printf" to "cout <<" ). - Check your changes can be compiled on: @@ -61,6 +60,7 @@ Thanks, + Rob Day <rk...@rk...> oja...@us... ric...@us... Modified: sipp/trunk/configure.ac =================================================================== --- sipp/trunk/configure.ac 2012-12-22 09:06:54 UTC (rev 618) +++ sipp/trunk/configure.ac 2012-12-29 11:20:12 UTC (rev 619) @@ -1,12 +1,12 @@ # ======================== initialization =============================== -AC_INIT([SIPp], [3.1], [sip...@li...], [sipp]) +AC_INIT([SIPp], [3.3], [sip...@li...], [sipp]) AC_CANONICAL_TARGET AC_CONFIG_SRCDIR([sipp.cpp]) AC_CONFIG_HEADERS([config.h]) -AM_INIT_AUTOMAKE([foreign dist-xz]) +AM_INIT_AUTOMAKE([foreign]) AC_ARG_WITH([openssl],AC_HELP_STRING([--with-openssl], [build with OpenSSL support]), [openssl="$withval"],[openssl="no"]) AC_ARG_WITH([pcap],AC_HELP_STRING([--with-pcap], [build with pcap support]), [pcap="$withval"],[pcap="no"]) @@ -115,7 +115,7 @@ # Conditional build with SCTP if test "$sctp" = 'yes'; then - AC_CHECK_HEADERS([netinet/sctp.h],,[AC_MSG_ERROR([<netinet/sctp.h> header missing])]) + AC_CHECK_HEADERS([netinet/sctp.h],,[AC_MSG_WARN([<netinet/sctp.h> header missing, but this is acceptable on Mac OS X Lion])]) AC_SEARCH_LIBS([sctp_send],[sctp],,[AC_MSG_ERROR([SCTP library missing])]) AC_SEARCH_LIBS([sctp_getpaddrs],[sctp],,[AC_MSG_ERROR([SCTP library missing])]) AC_SEARCH_LIBS([sctp_freepaddrs],[sctp],,[AC_MSG_ERROR([SCTP library missing])]) @@ -128,10 +128,10 @@ # Conditional build with pcap if test "$pcap" = 'yes'; then AC_CHECK_HEADERS([pcap.h],,[AC_MSG_ERROR([<pcap.h> header missing])]) - AC_CHECK_LIB([pcap], [pcap_open_offline],,[AC_MSG_ERROR([pcap library missing])]) - AC_CHECK_LIB([pcap], [pcap_next],,[AC_MSG_ERROR([pcap library missing])]) - AC_CHECK_LIB([pcap], [pcap_next_ex],,[AC_MSG_ERROR([pcap library missing])]) - AC_CHECK_LIB([pcap], [pcap_close],,[AC_MSG_ERROR([pcap library missing])]) + AC_SEARCH_LIBS([pcap_open_offline],[pcap,wpcap],,[AC_MSG_ERROR([pcap library missing])]) + AC_SEARCH_LIBS([pcap_next],[pcap,wpcap],,[AC_MSG_ERROR([pcap library missing])]) + AC_SEARCH_LIBS([pcap_next_ex],[pcap,wpcap],,[AC_MSG_ERROR([pcap library missing])]) + AC_SEARCH_LIBS([pcap_close],[pcap,wpcap],,[AC_MSG_ERROR([pcap library missing])]) fi # For Makefile.am AM_CONDITIONAL(HAVE_PCAP, test "$pcap" = "yes") Modified: sipp/trunk/sipp.cpp =================================================================== --- sipp/trunk/sipp.cpp 2012-12-22 09:06:54 UTC (rev 618) +++ sipp/trunk/sipp.cpp 2012-12-29 11:20:12 UTC (rev 619) @@ -3030,7 +3030,7 @@ } #ifdef USE_SCTP -static void handleSCTPNotify(struct sipp_socket* socket,char* buffer) +static int handleSCTPNotify(struct sipp_socket* socket,char* buffer) { union sctp_notification *notifMsg; Modified: sipp/trunk/sipp.hpp =================================================================== --- sipp/trunk/sipp.hpp 2012-12-22 09:06:54 UTC (rev 618) +++ sipp/trunk/sipp.hpp 2012-12-29 11:20:12 UTC (rev 619) @@ -32,8 +32,10 @@ #include <netinet/in.h> #include <netinet/tcp.h> #ifdef USE_SCTP +#ifndef __DARWIN #include <netinet/sctp.h> #endif +#endif #include <sys/time.h> #include <sys/poll.h> #include <sys/resource.h> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arc...@us...> - 2012-12-22 09:06:56
|
Revision: 618 http://sourceforge.net/p/sipp/code/618 Author: arcady-91 Date: 2012-12-22 09:06:54 +0000 (Sat, 22 Dec 2012) Log Message: ----------- Bumping version number to 3.3-beta1 Modified Paths: -------------- sipp/trunk/sipp.cpp Modified: sipp/trunk/sipp.cpp =================================================================== --- sipp/trunk/sipp.cpp 2012-12-22 02:27:38 UTC (rev 617) +++ sipp/trunk/sipp.cpp 2012-12-22 09:06:54 UTC (rev 618) @@ -4622,10 +4622,13 @@ } exit(EXIT_OTHER); case SIPP_OPTION_VERSION: - printf("\n SIPp v3.2" + printf("\n SIPp v3.3-beta1" #ifdef _USE_OPENSSL "-TLS" #endif +#ifdef USE_SCTP + "-SCTP" +#endif #ifdef PCAPPLAY "-PCAP" #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arc...@us...> - 2012-12-22 02:27:40
|
Revision: 617 http://sourceforge.net/p/sipp/code/617 Author: arcady-91 Date: 2012-12-22 02:27:38 +0000 (Sat, 22 Dec 2012) Log Message: ----------- Thanking bug reporters Modified Paths: -------------- sipp/trunk/THANKS Modified: sipp/trunk/THANKS =================================================================== --- sipp/trunk/THANKS 2012-12-22 01:50:49 UTC (rev 616) +++ sipp/trunk/THANKS 2012-12-22 02:27:38 UTC (rev 617) @@ -31,3 +31,8 @@ The following people have contributed useful bug reports to SIPp: Paul Belanger +Jan Stanek +Enrico Hartung +Daniel Swärd +Paul D Smith +Ferenc Wágner This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arc...@us...> - 2012-12-22 01:50:51
|
Revision: 616 http://sourceforge.net/p/sipp/code/616 Author: arcady-91 Date: 2012-12-22 01:50:49 +0000 (Sat, 22 Dec 2012) Log Message: ----------- Autotools support Added Paths: ----------- sipp/trunk/Makefile.am sipp/trunk/configure.ac Added: sipp/trunk/Makefile.am =================================================================== --- sipp/trunk/Makefile.am (rev 0) +++ sipp/trunk/Makefile.am 2012-12-22 01:50:49 UTC (rev 616) @@ -0,0 +1,50 @@ +bin_PROGRAMS = sipp + +if HAVE_OPENSSL +DEFS += -D_USE_OPENSSL +ssl_SOURCES = sslinit.c \ + sslthreadsafe.c +endif + +if HAVE_PCAP +DEFS += -DPCAPPLAY +pcap_SOURCES = prepare_pcap.c \ + send_packets.c +endif + +if HAVE_UNITTEST +DEFS += -DSIPP_UNITTEST +endif + +if HAVE_SCTP +DEFS += -ggdb -DUSE_SCTP +endif + +sipp_SOURCES = comp.c \ + xp_parser.c \ + actions.cpp \ + call.cpp \ + deadcall.cpp \ + infile.cpp \ + listener.cpp \ + message.cpp \ + opentask.cpp \ + reporttask.cpp \ + scenario.cpp \ + screen.cpp \ + sipp.cpp \ + socketowner.cpp \ + stat.cpp \ + task.cpp \ + variables.cpp \ + watchdog.cpp \ + md5.c \ + auth.c \ + milenage.c \ + rijndael.c \ + $(ssl_SOURCES) \ + $(pcap_SOURCES) + +sipp_LDADD = @LIBOBJS@ + +# fortune.cpp Added: sipp/trunk/configure.ac =================================================================== --- sipp/trunk/configure.ac (rev 0) +++ sipp/trunk/configure.ac 2012-12-22 01:50:49 UTC (rev 616) @@ -0,0 +1,167 @@ +# ======================== initialization =============================== + +AC_INIT([SIPp], [3.1], [sip...@li...], [sipp]) + +AC_CANONICAL_TARGET + +AC_CONFIG_SRCDIR([sipp.cpp]) +AC_CONFIG_HEADERS([config.h]) +AM_INIT_AUTOMAKE([foreign dist-xz]) + +AC_ARG_WITH([openssl],AC_HELP_STRING([--with-openssl], [build with OpenSSL support]), [openssl="$withval"],[openssl="no"]) +AC_ARG_WITH([pcap],AC_HELP_STRING([--with-pcap], [build with pcap support]), [pcap="$withval"],[pcap="no"]) +AC_ARG_WITH([unittest],AC_HELP_STRING([--with-unittest], [build with unit testing framework]), [unittest="$withval"],[unittest="no"]) +AC_ARG_WITH([sctp],AC_HELP_STRING([--with-sctp], [build with SCTP support]), [sctp="$withval"],[sctp="no"]) + +# ==================== basic compiler settings ========================== + +AC_PROG_CC +AC_PROG_CXX +AC_HEADER_STDC + +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" + CPPFLAGS="$CPPFLAGS -D__LINUX" + ;; + *-sunos*) + CFLAGS="$CFLAGS -D__SUNOS" + CPPFLAGS="$CPPFLAGS -D__SUNOS" + ;; + *-cygwin*) + CFLAGS="$CFLAGS -D__CYGWIN" + CPPFLAGS="$CPPFLAGS -D__CYGWIN" + ;; + *-tru64*) + CFLAGS="$CFLAGS -D__OSF1" + CPPFLAGS="$CPPFLAGS -D__OSF1" + ;; +esac + +# ==================== checks for libraries ============================= +AC_CHECK_LIB(curses,initscr,,[AC_MSG_ERROR([ncurses library missing])]) +AC_CHECK_LIB(pthread, pthread_mutex_init, THREAD_LIBS="-lpthread", + AC_MSG_ERROR(pthread library needed!)) + +# For Linux and SunOS +AC_SEARCH_LIBS([dlopen], [dl]) +AC_SEARCH_LIBS([dlerror], [dl]) +AC_SEARCH_LIBS([dlsym], [dl]) + +# For SunOS +AC_SEARCH_LIBS([inet_addr], [nsl]) +AC_SEARCH_LIBS([inet_ntoa], [nsl]) + +AC_SEARCH_LIBS([pthread_mutex_init], [pthread]) +AC_SEARCH_LIBS([pthread_mutex_destroy], [pthread]) +AC_SEARCH_LIBS([pthread_mutex_lock], [pthread]) +AC_SEARCH_LIBS([pthread_mutex_unlock], [pthread]) +AC_SEARCH_LIBS([pthread_self], [pthread]) +AC_SEARCH_LIBS([pthread_cancel], [pthread]) +AC_SEARCH_LIBS([pthread_join], [pthread]) +AC_SEARCH_LIBS([pthread_attr_init], [pthread]) +AC_SEARCH_LIBS([pthread_attr_setstacksize], [pthread]) +AC_SEARCH_LIBS([pthread_create], [pthread]) +AC_SEARCH_LIBS([pthread_attr_destroy], [pthread]) +AC_SEARCH_LIBS([pthread_setschedparam], [pthread]) +AC_SEARCH_LIBS([pthread_setcancelstate], [pthread]) +AC_SEARCH_LIBS([pthread_setcanceltype], [pthread]) +AC_SEARCH_LIBS([pthread_exit], [pthread]) +AC_SEARCH_LIBS([pthread_sigmask], [pthread]) +#AC_SEARCH_LIBS([pthread_cleanup_push], [pthread]) <- macro +#AC_SEARCH_LIBS([pthread_cleanup_pop], [pthread]) <- macro + +AC_SEARCH_LIBS([floor], [m]) +AC_SEARCH_LIBS([pow], [m]) + +# For SunOS +AC_SEARCH_LIBS([htons], [socket]) +AC_SEARCH_LIBS([ntohs], [socket]) +AC_SEARCH_LIBS([bind], [socket]) +AC_SEARCH_LIBS([freeaddrinfo], [socket]) +AC_SEARCH_LIBS([getaddrinfo], [socket]) +AC_SEARCH_LIBS([listen], [socket]) +AC_SEARCH_LIBS([recvfrom], [socket]) +AC_SEARCH_LIBS([shutdown], [socket]) + +# 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 + AC_CHECK_HEADERS([openssl/md5.h],,[AC_MSG_ERROR([<openssl/md5.h> header missing])]) + AC_CHECK_HEADERS([openssl/bio.h],,[AC_MSG_ERROR([<openssl/bio.h> header missing])]) + AC_CHECK_HEADERS([openssl/err.h],,[AC_MSG_ERROR([<openssl/err.h> header missing])]) + AC_CHECK_HEADERS([openssl/rand.h],,[AC_MSG_ERROR([<openssl/rand.h> header missing])]) + AC_CHECK_HEADERS([openssl/ssl.h],,[AC_MSG_ERROR([<openssl/ssl.h> header missing])]) + AC_CHECK_HEADERS([openssl/x509v3.h],,[AC_MSG_ERROR([<openssl/x509v3.h> header missing])]) + AC_CHECK_LIB([ssl], [SSL_library_init],,[AC_MSG_ERROR([ssl library missing])]) + AC_CHECK_LIB([crypto], [CRYPTO_num_locks],,[AC_MSG_ERROR([crypto library missing])]) +fi +# For Makefile.am +AM_CONDITIONAL(HAVE_OPENSSL, test "$openssl" = "yes") + +# Conditional build with SCTP +if test "$sctp" = 'yes'; then + AC_CHECK_HEADERS([netinet/sctp.h],,[AC_MSG_ERROR([<netinet/sctp.h> header missing])]) + AC_SEARCH_LIBS([sctp_send],[sctp],,[AC_MSG_ERROR([SCTP library missing])]) + AC_SEARCH_LIBS([sctp_getpaddrs],[sctp],,[AC_MSG_ERROR([SCTP library missing])]) + AC_SEARCH_LIBS([sctp_freepaddrs],[sctp],,[AC_MSG_ERROR([SCTP library missing])]) + AC_SEARCH_LIBS([sctp_bindx],[sctp],,[AC_MSG_ERROR([SCTP library missing])]) + AC_SEARCH_LIBS([sctp_recvmsg],[sctp],,[AC_MSG_ERROR([SCTP library missing])]) +fi +# For Makefile.am +AM_CONDITIONAL(HAVE_SCTP, test "$sctp" = "yes") + +# Conditional build with pcap +if test "$pcap" = 'yes'; then + AC_CHECK_HEADERS([pcap.h],,[AC_MSG_ERROR([<pcap.h> header missing])]) + AC_CHECK_LIB([pcap], [pcap_open_offline],,[AC_MSG_ERROR([pcap library missing])]) + AC_CHECK_LIB([pcap], [pcap_next],,[AC_MSG_ERROR([pcap library missing])]) + AC_CHECK_LIB([pcap], [pcap_next_ex],,[AC_MSG_ERROR([pcap library missing])]) + AC_CHECK_LIB([pcap], [pcap_close],,[AC_MSG_ERROR([pcap library missing])]) +fi +# For Makefile.am +AM_CONDITIONAL(HAVE_PCAP, test "$pcap" = "yes") +AM_CONDITIONAL(HAVE_UNITTEST, test "$unittest" = "yes") + +# ==================== checks for header files ========================== + +AC_FUNC_ALLOCA +AC_CHECK_HEADERS([arpa/inet.h fcntl.h limits.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h unistd.h]) + +# ===== checks for typedefs, structures and compiler characteristics ==== + +AC_HEADER_STDBOOL +AC_C_INLINE +AC_TYPE_PID_T +AC_TYPE_SIZE_T +AC_TYPE_SSIZE_T +AC_TYPE_UINT16_T +AC_TYPE_UINT32_T +AC_TYPE_UINT8_T + +# ==================== checks for library functions ===================== + +AC_FUNC_FORK +#AC_FUNC_MALLOC +#AC_FUNC_REALLOC +#AC_FUNC_STRTOD +AC_CHECK_FUNCS([alarm dup2 floor gethostname gettimeofday inet_ntoa memmove memset pow regcomp socket sqrt strcasecmp strchr strcspn strdup strerror strncasecmp strrchr strstr strtol strtoul strtoull]) + +# ==================== generate files =================================== + +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arc...@us...> - 2012-12-22 01:50:46
|
Revision: 615 http://sourceforge.net/p/sipp/code/615 Author: arcady-91 Date: 2012-12-22 01:50:44 +0000 (Sat, 22 Dec 2012) Log Message: ----------- Fixing IPv6 bug Modified Paths: -------------- sipp/trunk/opentask.cpp sipp/trunk/sipp.cpp Modified: sipp/trunk/opentask.cpp =================================================================== --- sipp/trunk/opentask.cpp 2012-12-22 01:50:39 UTC (rev 614) +++ sipp/trunk/opentask.cpp 2012-12-22 01:50:44 UTC (rev 615) @@ -118,7 +118,7 @@ // adding a new OUTGOING CALL main_scenario->stats->computeStat(CStat::E_CREATE_OUTGOING_CALL); - call * call_ptr = call::add_call(userid, is_ipv6, use_remote_sending_addr ? &remote_sending_sockaddr : &remote_sockaddr); + 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!"); } Modified: sipp/trunk/sipp.cpp =================================================================== --- sipp/trunk/sipp.cpp 2012-12-22 01:50:39 UTC (rev 614) +++ sipp/trunk/sipp.cpp 2012-12-22 01:50:44 UTC (rev 615) @@ -3334,7 +3334,7 @@ { // Adding a new OUTGOING call ! main_scenario->stats->computeStat(CStat::E_CREATE_OUTGOING_CALL); - call *new_ptr = new call(call_id, is_ipv6, 0, use_remote_sending_addr ? &remote_sending_sockaddr : &remote_sockaddr); + 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!"); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arc...@us...> - 2012-12-22 01:50:41
|
Revision: 614 http://sourceforge.net/p/sipp/code/614 Author: arcady-91 Date: 2012-12-22 01:50:39 +0000 (Sat, 22 Dec 2012) Log Message: ----------- Merging Menyus Heged?\197?\177s' SCTP patch Modified Paths: -------------- sipp/trunk/Makefile sipp/trunk/THANKS sipp/trunk/call.cpp sipp/trunk/opentask.cpp sipp/trunk/sipp.cpp sipp/trunk/sipp.hpp Modified: sipp/trunk/Makefile =================================================================== --- sipp/trunk/Makefile 2012-12-22 01:50:34 UTC (rev 613) +++ sipp/trunk/Makefile 2012-12-22 01:50:39 UTC (rev 614) @@ -106,7 +106,7 @@ CFLAGS_SunOS=${DEBUG_FLAGS} -D__SUNOS CFLAGS_Cygwin=-D__CYGWIN -Dsocklen_t=int CFLAGS_Darwin=-D__DARWIN -CFLAGS=$(CFLAGS_$(SYSTEM)) $(VERINFO) $(TLS) $(PCAPPLAY) $(EXTRACFLAGS) $(UNITTEST) +CFLAGS=$(CFLAGS_$(SYSTEM)) $(VERINFO) $(TLS) $(SCTP) $(PCAPPLAY) $(EXTRACFLAGS) $(UNITTEST) #C++ Compiler Flags CPPFLAGS_hpux=-AA -mt -D__HPUX -D_INCLUDE_LONGLONG -DNOMACROS +W829 @@ -116,7 +116,7 @@ CPPFLAGS_SunOS=${DEBUG_FLAGS} -D__SUNOS CPPFLAGS_Cygwin=-D__CYGWIN -Dsocklen_t=int CPPFLAGS_Darwin=-D__DARWIN -CPPFLAGS=$(CPPFLAGS_$(SYSTEM)) $(VERINFO) $(TLS) $(PCAPPLAY) $(EXTRACPPFLAGS) $(UNITTEST) +CPPFLAGS=$(CPPFLAGS_$(SYSTEM)) $(VERINFO) $(TLS) $(SCTP) $(PCAPPLAY) $(EXTRACPPFLAGS) $(UNITTEST) #Linker mapping CCLINK_hpux=aCC @@ -171,6 +171,13 @@ ossl: $(MAKE) OSNAME=`uname|sed -e "s/CYGWIN.*/CYGWIN/"` MODELNAME=`uname -m|sed "s/Power Macintosh/ppc/"` OBJ_TLS="sslinit.o sslthreadsafe.o" TLS_LIBS="-lssl -lcrypto" TLS="-D_USE_OPENSSL -DOPENSSL_NO_KRB5" $(OUTPUT) +# Building with SCTP +sctp: + $(MAKE) OSNAME=`uname|sed -e "s/CYGWIN.*/CYGWIN/"` MODELNAME=`uname -m|sed "s/Power Macintosh/ppc/"` SCTP_LIBS="-lsctp" SCTP="-DUSE_SCTP" $(OUTPUT) + +sctp_ossl: + $(MAKE) OSNAME=`uname|sed -e "s/CYGWIN.*/CYGWIN/"` MODELNAME=`uname -m|sed "s/Power Macintosh/ppc/"` OBJ_TLS="sslinit.o sslthreadsafe.o" TLS_LIBS="-lssl -lcrypto" TLS="-D_USE_OPENSSL -DOPENSSL_NO_KRB5" SCTP_LIBS="-lsctp" SCTP="-DUSE_SCTP" $(OUTPUT) + #Building with PCAP play pcapplay: $(MAKE) OSNAME=`uname|sed -e "s/CYGWIN.*/CYGWIN/"` MODELNAME=`uname -m|sed "s/Power Macintosh/ppc/"` OBJ_PCAPPLAY="send_packets.o prepare_pcap.o" PCAPPLAY_LIBS="-lpcap" PCAPPLAY="-DPCAPPLAY" $(OUTPUT) @@ -178,6 +185,9 @@ pcapplay_ossl: $(MAKE) OSNAME=`uname|sed -e "s/CYGWIN.*/CYGWIN/"` MODELNAME=`uname -m|sed "s/Power Macintosh/ppc/"` OBJ_TLS="sslinit.o sslthreadsafe.o" TLS_LIBS="-lssl -lcrypto" TLS="-D_USE_OPENSSL -DOPENSSL_NO_KRB5" OBJ_PCAPPLAY="send_packets.o prepare_pcap.o" PCAPPLAY_LIBS="-lpcap `if test -f ./ext; then echo -L./ext/lib; fi;`" PCAPPLAY="-DPCAPPLAY `if test -f ./ext; then echo -I./ext/include; fi;`" $(OUTPUT) +pcapplay_sctp_ossl: + $(MAKE) OSNAME=`uname|sed -e "s/CYGWIN.*/CYGWIN/"` MODELNAME=`uname -m|sed "s/Power Macintosh/ppc/"` SCTP_LIBS="lsctp" SCTP="-DUSE_SCTP" OBJ_TLS="sslinit.o sslthreadsafe.o" TLS_LIBS="-lssl -lcrypto" TLS="-D_USE_OPENSSL -DOPENSSL_NO_KRB5" OBJ_PCAPPLAY="send_packets.o prepare_pcap.o" PCAPPLAY_LIBS="-lpcap `if test -f ./ext; then echo -L./ext/lib; fi;`" PCAPPLAY="-DPCAPPLAY `if test -f ./ext; then echo -I./ext/include; fi;`" $(OUTPUT) + pcapplay_hp_li_ia: @_HPUX_LI_FLAG=-D_HPUX_LI ; export _HPUX_LI_FLAG ; $(MAKE) pcapplay @@ -192,7 +202,7 @@ $(OUTPUT): $(OBJ_TLS) $(OBJ_PCAPPLAY) $(OBJ) $(CCLINK) $(LFLAGS) $(MFLAGS) $(LIBDIR_$(SYSTEM)) \ - $(DEBUG_FLAGS) -o $@ $(OBJ_TLS) $(OBJ_PCAPPLAY) $(OBJ) $(LIBS) $(TLS_LIBS) $(PCAPPLAY_LIBS) $(EXTRAENDLIBS) + $(DEBUG_FLAGS) -o $@ $(OBJ_TLS) $(OBJ_PCAPPLAY) $(OBJ) $(LIBS) $(TLS_LIBS) $(PCAPPLAY_LIBS) $(SCTP_LIBS) $(EXTRAENDLIBS) debug: DEBUG_FLAGS="-g -pg" ; export DEBUG_FLAGS ; $(MAKE) all Modified: sipp/trunk/THANKS =================================================================== --- sipp/trunk/THANKS 2012-12-22 01:50:34 UTC (rev 613) +++ sipp/trunk/THANKS 2012-12-22 01:50:39 UTC (rev 614) @@ -24,6 +24,7 @@ Jordan Walbesser Ken Crowell Peter Lemenkov +Menyus Hegedűs SIPp also uses code originally by Aaron Turner (send_packets.c) and L Peter Deutsch (md5.c). Modified: sipp/trunk/call.cpp =================================================================== --- sipp/trunk/call.cpp 2012-12-22 01:50:34 UTC (rev 613) +++ sipp/trunk/call.cpp 2012-12-22 01:50:39 UTC (rev 614) @@ -787,11 +787,11 @@ if (sipp_bind_socket(call_socket, &saddr, &call_port)) { ERROR_NO("Unable to bind UDP socket"); } - } else { /* TCP or TLS. */ + } else { /* TCP, SCTP or TLS. */ struct sockaddr_storage *L_dest = &remote_sockaddr; if ((associate_socket(new_sipp_call_socket(use_ipv6, transport, &existing))) == NULL) { - ERROR_NO("Unable to get a TCP socket"); + ERROR_NO("Unable to get a TCP/SCTP/TLS socket"); } if (existing) { @@ -808,9 +808,9 @@ if (reconnect_allowed()) { if(errno == EINVAL){ /* This occurs sometime on HPUX but is not a true INVAL */ - WARNING("Unable to connect a TCP socket, remote peer error"); + WARNING("Unable to connect a TCP/SCTP/TLS socket, remote peer error"); } else { - WARNING("Unable to connect a TCP socket"); + 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 @@ -828,9 +828,9 @@ } else { if(errno == EINVAL){ /* This occurs sometime on HPUX but is not a true INVAL */ - ERROR("Unable to connect a TCP socket, remote peer error"); + ERROR("Unable to connect a TCP/SCTP/TLS socket, remote peer error"); } else { - ERROR_NO("Unable to connect a TCP socket"); + ERROR_NO("Unable to connect a TCP/SCTP/TLS socket"); } } } @@ -3566,14 +3566,23 @@ 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) { + if (!call_socket && ((protocol == T_TCP && transport == T_TCP) || + (protocol == T_SCTP && transport == T_SCTP))) { bool existing; if ((associate_socket(new_sipp_call_socket(use_ipv6, transport, &existing))) == NULL) { - ERROR_NO("Unable to get a TCP socket"); + 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) { @@ -3590,12 +3599,12 @@ /* Nothing to do. */ } else if (protocol == T_TLS) { ERROR("Changing destinations is not supported for TLS."); - } else if (protocol == T_TCP) { + } else if (protocol == T_TCP || protocol == T_SCTP) { if (!multisocket) { - ERROR("Changing destinations for TCP requires multisocket mode."); + ERROR("Changing destinations for TCP or SCTP requires multisocket mode."); } if (call_socket->ss_count > 1) { - ERROR("Can not change destinations for a TCP socket that has more than one user."); + ERROR("Can not change destinations for a TCP/SCTP socket that has more than one user."); } } @@ -3624,7 +3633,7 @@ free(str_port); free(str_protocol); - if (protocol == T_TCP) { + if (protocol == T_TCP || protocol == T_SCTP) { close(call_socket->ss_fd); call_socket->ss_fd = -1; call_socket->ss_changed_dest = true; @@ -3632,9 +3641,9 @@ if (reconnect_allowed()) { if(errno == EINVAL){ /* This occurs sometime on HPUX but is not a true INVAL */ - WARNING("Unable to connect a TCP socket, remote peer error"); + WARNING("Unable to connect a TCP/SCTP/TLS socket, remote peer error"); } else { - WARNING("Unable to connect a TCP socket"); + 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 @@ -3648,9 +3657,9 @@ } else { if(errno == EINVAL){ /* This occurs sometime on HPUX but is not a true INVAL */ - ERROR("Unable to connect a TCP socket, remote peer error"); + ERROR("Unable to connect a TCP/SCTP/TLS socket, remote peer error"); } else { - ERROR_NO("Unable to connect a TCP socket"); + ERROR_NO("Unable to connect a TCP/SCTP/TLS socket"); } } } Modified: sipp/trunk/opentask.cpp =================================================================== --- sipp/trunk/opentask.cpp 2012-12-22 01:50:34 UTC (rev 613) +++ sipp/trunk/opentask.cpp 2012-12-22 01:50:39 UTC (rev 614) @@ -134,6 +134,7 @@ main_socket->ss_count++; break; case T_TCP: + case T_SCTP: case T_TLS: call_ptr->associate_socket(tcp_multiplex); tcp_multiplex->ss_count++; Modified: sipp/trunk/sipp.cpp =================================================================== --- sipp/trunk/sipp.cpp 2012-12-22 01:50:34 UTC (rev 613) +++ sipp/trunk/sipp.cpp 2012-12-22 01:50:39 UTC (rev 614) @@ -130,6 +130,7 @@ #define SIPP_OPTION_LFNAME 36 #define SIPP_OPTION_LFOVERWRITE 37 #define SIPP_OPTION_PLUGIN 38 +#define SIPP_OPTION_NEED_SCTP 39 /* Put Each option, its help text, and type in this table. */ struct sipp_option options_table[] = { @@ -289,6 +290,8 @@ "- tn: TCP with one socket per call,\n" "- l1: TLS with one socket,\n" "- ln: TLS with one socket per call,\n" + "- s1: SCTP with one socket (default),\n" + "- sn: SCTP with one socket per call,\n" "- 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}, @@ -342,6 +345,21 @@ "Format: -tdmmap {0-3}{99}{5-8}{1-31}", SIPP_OPTION_TDMMAP, NULL, 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}, +#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 {"dynamicStart", "variable value\nSet the start offset of dynamic_id varaiable", 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} @@ -597,6 +615,34 @@ #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 + char * get_inet_address(struct sockaddr_storage * addr) { static char * ip_addr = NULL; @@ -2359,12 +2405,51 @@ return len; } +#ifdef USE_SCTP +void sipp_sctp_peer_params(struct sipp_socket *socket) +{ + if (heartbeat > 0 || pathmaxret > 0) + { + struct sctp_paddrparams peerparam; + memset(&peerparam, 0, sizeof(peerparam)); + + sockaddr* addresses; + int addresscount = sctp_getpaddrs(socket->ss_fd, 0, &addresses); + 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, SOCK_ADDR_SIZE(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(socket->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(struct sipp_socket *socket) { unsigned int buffsize = buff_size; /* Allows fast TCP reuse of the socket */ - if (socket->ss_transport == T_TCP || socket->ss_transport == T_TLS ) { + 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, @@ -2372,15 +2457,49 @@ 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; @@ -2438,6 +2557,27 @@ rc = -1; #endif break; + case T_SCTP: +#ifdef USE_SCTP + { + TRACE_MSG("socket_write_primitive %d\n", socket->sctpstate); + if (socket->sctpstate == SCTP_DOWN) + { + errno = EPIPE; + return -1; + } + else if (socket->sctpstate == SCTP_CONNECTING) + { + errno = EWOULDBLOCK; + return -1; + } + rc = send_sctp_nowait(socket->ss_fd, buffer, len, 0); + } +#else + errno = EOPNOTSUPP; + rc = -1; +#endif + break; case T_TCP: rc = send_nowait(socket->ss_fd, buffer, len, 0); break; @@ -2465,7 +2605,7 @@ return rc; } -/* This socket is congestion, mark its as such and add it to the poll files. */ +/* This socket is congested, mark it as such and add it to the poll files. */ int enter_congestion(struct sipp_socket *socket, int again) { socket->ss_congested = true; @@ -2475,7 +2615,11 @@ pollfiles[socket->ss_pollidx].events |= POLLOUT; - nb_net_cong++; +#ifdef USE_SCTP + if (!(socket->ss_transport == T_SCTP && + socket->sctpstate == SCTP_CONNECTING)) +#endif + nb_net_cong++; return -1; } @@ -2498,7 +2642,8 @@ return enter_congestion(socket, again); } - if (socket->ss_transport == T_TCP && errno == EPIPE) { + if ((socket->ss_transport == T_TCP || socket->ss_transport == T_SCTP) + && errno == EPIPE) { nb_net_send_errors++; close(socket->ss_fd); socket->ss_fd = -1; @@ -2604,7 +2749,7 @@ while ((buf = socket->ss_out)) { ssize_t size = buf->len - buf->offset; ret = socket_write_primitive(socket, buf->buf + buf->offset, size, &buf->addr); - TRACE_MSG("Wrote %d of %d bytes in an output buffer.", ret, size); + TRACE_MSG("Wrote %d of %d bytes in an output buffer.\n", ret, size); if (ret == size) { /* Everything is great, throw away this buffer. */ socket->ss_out = buf->next; @@ -2780,7 +2925,7 @@ if (!socketbuf) return 0; - if (socket->ss_transport == T_UDP) { + if (socket->ss_transport == T_UDP || socket->ss_transport == T_SCTP) { return socketbuf->len; } @@ -2884,9 +3029,90 @@ while (1); } +#ifdef USE_SCTP +static void handleSCTPNotify(struct sipp_socket* socket,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"); + socket->sctpstate = SCTP_UP; + sipp_sctp_peer_params(socket); + + /* Send SCTP message right after association is up */ + socket->ss_congested = false; + flush_socket(socket); + 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(struct sipp_socket* socket,int port) +{ + if (strlen(multihome_ip)>0) + { + struct addrinfo * multi_addr; + struct addrinfo hints; + memset((char*)&hints, 0, sizeof(hints)); + hints.ai_flags = AI_PASSIVE; + hints.ai_family = PF_UNSPEC; + + if (getaddrinfo(multihome_ip, NULL, &hints, &multi_addr) != 0) + { + ERROR("Can't get multihome IP address in getaddrinfo, multihome_ip='%s'",multihome_ip); + } + + struct sockaddr_storage secondaryaddress; + memset(&secondaryaddress, 0, sizeof(secondaryaddress)); + + memcpy(&secondaryaddress, multi_addr->ai_addr, SOCK_ADDR_SIZE(_RCAST(struct sockaddr_storage *,multi_addr->ai_addr))); + freeaddrinfo(multi_addr); + + if (port>0) + { + if (secondaryaddress.ss_family==AF_INET) ((struct sockaddr_in*)&secondaryaddress)->sin_port=htons(port); + else if (secondaryaddress.ss_family==AF_INET6) ((struct sockaddr_in6*)&secondaryaddress)->sin6_port=htons(port); + } + + 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. */ static int empty_socket(struct sipp_socket *socket) { - int readsize = socket->ss_transport == T_UDP ? SIPP_MAX_MSG_SIZE : tcp_readsize; + + int readsize=0; + if (socket->ss_transport == T_UDP || socket->ss_transport == T_SCTP) { + readsize = SIPP_MAX_MSG_SIZE; + } else { + readsize = tcp_readsize; + } + struct socketbuf *socketbuf; char *buffer; int ret; @@ -2915,6 +3141,25 @@ 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(socket->ss_fd, (void*)buffer, readsize, + (struct sockaddr *) &socketbuf->addr, &addrlen, &recvinfo, &msg_flags); + + if (MSG_NOTIFICATION & msg_flags) + { + errno = 0; + handleSCTPNotify(socket, buffer); + ret = -2; + } +#else + ERROR("SCTP support is not enabled!"); +#endif + break; } if (ret <= 0) { free_socketbuf(socketbuf); @@ -2951,6 +3196,17 @@ #endif shutdown(socket->ss_fd, SHUT_RDWR); + +#ifdef USE_SCTP + if (socket->ss_transport==T_SCTP && !gracefulclose) + { + struct linger ling={1,0}; + if (setsockopt (socket->ss_fd, SOL_SOCKET, SO_LINGER, &ling, sizeof (ling)) < 0) { + WARNING("Unable to set SO_LINGER option for SCTP close"); + } + } +#endif + close(socket->ss_fd); socket->ss_fd = -1; @@ -2974,6 +3230,12 @@ { pending_messages--; } + +#ifdef USE_SCTP + if (socket->ss_transport == T_SCTP) { + socket->sctpstate=SCTP_DOWN; + } +#endif } void sipp_close_socket (struct sipp_socket *socket) { @@ -3094,6 +3356,7 @@ main_socket->ss_count++; break; case T_TCP: + case T_SCTP: case T_TLS: new_ptr->associate_socket(tcp_multiplex); tcp_multiplex->ss_count++; @@ -3242,7 +3505,14 @@ assert(sock); - if(pollfiles[poll_idx].revents & POLLOUT) { + if(pollfiles[poll_idx].revents & POLLOUT) + { + +#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); pollfiles[poll_idx].events &= ~POLLOUT; @@ -3251,10 +3521,11 @@ flush_socket(sock); events++; } + } if(pollfiles[poll_idx].revents & POLLIN) { /* We can empty this socket. */ - if ((transport == T_TCP || transport == T_TLS) && sock == main_socket) { + if ((transport == T_TCP || transport == T_TLS || transport == T_SCTP) && sock == main_socket) { struct sipp_socket *new_sock = sipp_accept_socket(sock); if (!new_sock) { ERROR_NO("Accepting new TCP connection.\n"); @@ -3286,8 +3557,14 @@ connect_to_all_peers(); } } - } else { + } + else { if ((ret = empty_socket(sock)) <= 0) { +#ifdef USE_SCTP + if (sock->ss_transport==T_SCTP && ret==-2) ; + else +#endif + { ret = read_error(sock, ret); if (ret == 0) { /* If read_error() then the poll_idx now belongs @@ -3300,6 +3577,7 @@ } } } + } events++; } @@ -3913,12 +4191,22 @@ int socket_fd(bool use_ipv6, int transport) { int socket_type; + 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!\n"); +#else + socket_type = SOCK_STREAM; + protocol=IPPROTO_SCTP; +#endif + break; case T_TLS: #ifndef _USE_OPENSSL ERROR("You do not have TLS support enabled!\n"); @@ -3928,7 +4216,7 @@ break; } - if((fd = socket(use_ipv6 ? AF_INET6 : AF_INET, socket_type, 0))== -1) { + if((fd = socket(use_ipv6 ? AF_INET6 : AF_INET, socket_type, protocol))== -1) { ERROR("Unable to get a %s socket (3)", TRANSPORT_TO_STRING(transport)); } @@ -4070,6 +4358,21 @@ int ret; int len; + +#ifdef USE_SCTP + if (transport==T_SCTP && multisocket==1 && *port==-1) + { + if (socket->ss_ipv6) + { + (_RCAST(struct sockaddr_in6 *, saddr))->sin6_port=0; + } + else + { + (_RCAST(struct sockaddr_in *, saddr))->sin_port=0; + } + } +#endif + if (socket->ss_ipv6) { len = sizeof(struct sockaddr_in6); } else { @@ -4094,14 +4397,34 @@ *port = ntohs((short)((_RCAST(struct sockaddr_in *, saddr))->sin_port)); } +#ifdef USE_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 (transport==T_SCTP && !isany) set_multihome_addr(socket,*port); +#endif + return 0; } int sipp_do_connect_socket(struct sipp_socket *socket) { int ret; - assert(socket->ss_transport == T_TCP || socket->ss_transport == T_TLS); + assert(socket->ss_transport == T_TCP || socket->ss_transport == T_TLS || socket->ss_transport == T_SCTP); +#ifdef USE_SCTP + if (socket->ss_transport==T_SCTP) + { + int port=-1; + sipp_bind_socket(socket, &local_sockaddr, &port); + } +#endif + errno = 0; ret = connect(socket->ss_fd, (struct sockaddr *)&socket->ss_dest, SOCK_ADDR_SIZE(&socket->ss_dest)); if (ret < 0) { @@ -4119,6 +4442,12 @@ #endif } +#ifdef USE_SCTP + if (socket->ss_transport == T_SCTP) { + socket->sctpstate = SCTP_CONNECTING; + } +#endif + return 0; } @@ -4248,6 +4577,9 @@ pid = getpid(); memset(local_ip, 0, 40); +#ifdef USE_SCTP + memset(multihome_ip, 0, 40); +#endif memset(media_ip,0, 40); memset(control_ip,0, 40); memset(media_ip_escaped,0, 42); @@ -4435,6 +4767,13 @@ 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_OPENSSL transport = T_TLS; @@ -4473,6 +4812,10 @@ ERROR("You can only use a perip socket with UDP!\n"); } 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]); @@ -5498,7 +5841,7 @@ } } - if((!multisocket) && (transport == T_TCP || transport == T_TLS) && + 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"); @@ -5508,6 +5851,7 @@ if (use_remote_sending_addr) { remote_sockaddr = remote_sending_sockaddr ; } + sipp_customize_socket(tcp_multiplex); if(sipp_connect_socket(tcp_multiplex, &remote_sockaddr)) { if(reset_number >0){ @@ -5527,11 +5871,10 @@ } } - sipp_customize_socket(tcp_multiplex); } - if(transport == T_TCP || transport == T_TLS) { + if(transport == T_TCP || transport == T_TLS || transport == T_SCTP) { if(listen(main_socket->ss_fd, 100)) { ERROR_NO("Unable to listen main socket"); } Modified: sipp/trunk/sipp.hpp =================================================================== --- sipp/trunk/sipp.hpp 2012-12-22 01:50:34 UTC (rev 613) +++ sipp/trunk/sipp.hpp 2012-12-22 01:50:39 UTC (rev 614) @@ -31,6 +31,9 @@ #include <sys/socket.h> #include <netinet/in.h> #include <netinet/tcp.h> +#ifdef USE_SCTP +#include <netinet/sctp.h> +#endif #include <sys/time.h> #include <sys/poll.h> #include <sys/resource.h> @@ -119,6 +122,7 @@ #define T_UDP 0 #define T_TCP 1 #define T_TLS 2 +#define T_SCTP 3 #ifdef _USE_OPENSSL #define DEFAULT_TLS_CERT ((char *)"cacert.pem") @@ -126,7 +130,7 @@ #define DEFAULT_TLS_CRL ((char *)"") #endif -#define TRANSPORT_TO_STRING(p) ((p==T_TCP) ? "TCP" : ((p==T_TLS)? "TLS" :"UDP")) +#define TRANSPORT_TO_STRING(p) ((p==T_TCP) ? "TCP" : ((p==T_TLS)? "TLS" : ((p==T_UDP)? "UDP" : "SCTP"))) #define SIPP_MAXFDS 65536 #define SIPP_MAX_MSG_SIZE 65536 @@ -237,6 +241,14 @@ extern char local_ip_escaped[42]; extern bool local_ip_is_ipv6; extern int local_port _DEFVAL(0); +#ifdef USE_SCTP +extern char multihome_ip[40]; +extern int heartbeat _DEFVAL(0); +extern int assocmaxret _DEFVAL(0); +extern int pathmaxret _DEFVAL(0); +extern int pmtu _DEFVAL(0); +extern bool gracefulclose _DEFVAL(true); +#endif extern char control_ip[40]; extern int control_port _DEFVAL(0); extern int buff_size _DEFVAL(65535); @@ -542,6 +554,11 @@ struct socketbuf *next; }; +#ifdef USE_SCTP +#define SCTP_DOWN 0 +#define SCTP_CONNECTING 1 +#define SCTP_UP 2 +#endif /* This is an abstraction of a socket, which provides buffers for input and * output. */ struct sipp_socket { @@ -570,6 +587,9 @@ struct socketbuf *ss_in; /* Buffered input. */ size_t ss_msglen; /* Is there a complete SIP message waiting, and if so how big? */ struct socketbuf *ss_out; /* Buffered output. */ +#ifdef USE_SCTP + int sctpstate; +#endif }; /* Write data to a socket. */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arc...@us...> - 2012-12-22 01:50:36
|
Revision: 613 http://sourceforge.net/p/sipp/code/613 Author: arcady-91 Date: 2012-12-22 01:50:34 +0000 (Sat, 22 Dec 2012) Log Message: ----------- Replace 'sut' with '[service]' in default scenarios Modified Paths: -------------- sipp/trunk/scenario.cpp Modified: sipp/trunk/scenario.cpp =================================================================== --- sipp/trunk/scenario.cpp 2012-12-22 01:50:29 UTC (rev 612) +++ sipp/trunk/scenario.cpp 2012-12-22 01:50:34 UTC (rev 613) @@ -1907,7 +1907,7 @@ " INVITE sip:[service]@[remote_ip]:[remote_port] SIP/2.0\n" " Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]\n" " From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[pid]SIPpTag00[call_number]\n" -" To: sut <sip:[service]@[remote_ip]:[remote_port]>\n" +" To: [service] <sip:[service]@[remote_ip]:[remote_port]>\n" " Call-ID: [call_id]\n" " CSeq: 1 INVITE\n" " Contact: sip:sipp@[local_ip]:[local_port]\n" @@ -1951,7 +1951,7 @@ " ACK sip:[service]@[remote_ip]:[remote_port] SIP/2.0\n" " Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]\n" " From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[pid]SIPpTag00[call_number]\n" -" To: sut <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]\n" +" To: [service] <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]\n" " Call-ID: [call_id]\n" " CSeq: 1 ACK\n" " Contact: sip:sipp@[local_ip]:[local_port]\n" @@ -1973,7 +1973,7 @@ " BYE sip:[service]@[remote_ip]:[remote_port] SIP/2.0\n" " Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]\n" " From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[pid]SIPpTag00[call_number]\n" -" To: sut <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]\n" +" To: [service] <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]\n" " Call-ID: [call_id]\n" " CSeq: 2 BYE\n" " Contact: sip:sipp@[local_ip]:[local_port]\n" @@ -2145,7 +2145,7 @@ " INVITE sip:[service]@[remote_ip]:[remote_port] SIP/2.0\n" " Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]\n" " From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[pid]SIPpTag02[call_number]\n" -" To: sut <sip:[service]@[remote_ip]:[remote_port]>\n" +" To: [service] <sip:[service]@[remote_ip]:[remote_port]>\n" " Call-ID: [call_id]\n" " CSeq: 1 INVITE\n" " Contact: sip:sipp@[local_ip]:[local_port]\n" @@ -2222,7 +2222,7 @@ " ACK sip:[service]@[remote_ip]:[remote_port] SIP/2.0\n" " Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]\n" " From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[pid]SIPpTag02[call_number]\n" -" To: sut <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]\n" +" To: [service] <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]\n" " Call-ID: [call_id]\n" " CSeq: 1 ACK\n" " retrievedIp: [$1]\n" @@ -2249,7 +2249,7 @@ " BYE sip:[service]@[remote_ip]:[remote_port] SIP/2.0\n" " Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]\n" " From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[pid]SIPpTag02[call_number]\n" -" To: sut <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]\n" +" To: [service] <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]\n" " Call-ID: [call_id]\n" " CSeq: 2 BYE\n" " Contact: sip:sipp@[local_ip]:[local_port]\n" @@ -2318,7 +2318,7 @@ " INVITE sip:[service]@[remote_ip]:[remote_port] SIP/2.0\n" " Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]\n" " From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[pid]SIPpTag03[call_number]\n" -" To: sut <sip:[service]@[remote_ip]:[remote_port]>\n" +" To: [service] <sip:[service]@[remote_ip]:[remote_port]>\n" " Call-ID: [call_id]\n" " CSeq: 1 INVITE\n" " Contact: sip:sipp@[local_ip]:[local_port]\n" @@ -2363,7 +2363,7 @@ " ACK sip:[service]@[remote_ip]:[remote_port] SIP/2.0\n" " Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]\n" " From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[pid]SIPpTag03[call_number]\n" -" To: sut <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]\n" +" To: [service] <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]\n" " Call-ID: [call_id]\n" " CSeq: 1 ACK\n" " Contact: sip:sipp@[local_ip]:[local_port]\n" @@ -2383,7 +2383,7 @@ " BYE sip:[service]@[remote_ip]:[remote_port] SIP/2.0\n" " Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]\n" " From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[pid]SIPpTag03[call_number]\n" -" To: sut <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]\n" +" To: [service] <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]\n" " Call-ID: [call_id]\n" " CSeq: 2 BYE\n" " Contact: sip:sipp@[local_ip]:[local_port]\n" @@ -2455,7 +2455,7 @@ " INVITE sip:[service]@[remote_ip]:[remote_port] SIP/2.0\n" " Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]\n" " From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[pid]SIPpTag04[call_number]\n" -" To: sut <sip:[service]@[remote_ip]:[remote_port]>\n" +" To: [service] <sip:[service]@[remote_ip]:[remote_port]>\n" " Call-ID: [call_id]\n" " CSeq: 1 INVITE\n" " Contact: sip:sipp@[local_ip]:[local_port]\n" @@ -2484,7 +2484,7 @@ " ACK sip:[service]@[remote_ip]:[remote_port] SIP/2.0\n" " Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]\n" " From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[pid]SIPpTag04[call_number]\n" -" To: sut <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]\n" +" To: [service] <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]\n" " Call-ID: [call_id]\n" " CSeq: 1 ACK\n" " Contact: sip:sipp@[local_ip]:[local_port]\n" @@ -2513,7 +2513,7 @@ " BYE sip:[service]@[remote_ip]:[remote_port] SIP/2.0\n" " Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]\n" " From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[pid]SIPpTag04[call_number]\n" -" To: sut <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]\n" +" To: [service] <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]\n" " Call-ID: [call_id]\n" " CSeq: 2 BYE\n" " Contact: sip:sipp@[local_ip]:[local_port]\n" @@ -3073,7 +3073,7 @@ " INVITE sip:[service]@[remote_ip]:[remote_port] SIP/2.0\n" " Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]\n" " From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[pid]SIPpTag09[call_number]\n" -" To: sut <sip:[service]@[remote_ip]:[remote_port]>\n" +" To: [service] <sip:[service]@[remote_ip]:[remote_port]>\n" " Call-ID: [call_id]\n" " CSeq: 1 INVITE\n" " Contact: sip:sipp@[local_ip]:[local_port]\n" @@ -3115,7 +3115,7 @@ " ACK sip:[service]@[remote_ip]:[remote_port] SIP/2.0\n" " Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]\n" " From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[pid]SIPpTag09[call_number]\n" -" To: sut <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]\n" +" To: [service] <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]\n" " Call-ID: [call_id]\n" " CSeq: 1 ACK\n" " Contact: sip:sipp@[local_ip]:[local_port]\n" @@ -3153,7 +3153,7 @@ " BYE sip:[service]@[remote_ip]:[remote_port] SIP/2.0\n" " Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]\n" " From: sipp <sip:sipp@[local_ip]:[local_port]>;tag=[pid]SIPpTag09[call_number]\n" -" To: sut <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]\n" +" To: [service] <sip:[service]@[remote_ip]:[remote_port]>[peer_tag_param]\n" " Call-ID: [call_id]\n" " CSeq: 2 BYE\n" " Contact: sip:sipp@[local_ip]:[local_port]\n" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arc...@us...> - 2012-12-22 01:50:31
|
Revision: 612 http://sourceforge.net/p/sipp/code/612 Author: arcady-91 Date: 2012-12-22 01:50:29 +0000 (Sat, 22 Dec 2012) Log Message: ----------- CVE-2008-2085 fix - thanks to Peter Lemenkov Modified Paths: -------------- sipp/trunk/THANKS sipp/trunk/call.cpp Modified: sipp/trunk/THANKS =================================================================== --- sipp/trunk/THANKS 2012-12-22 01:50:24 UTC (rev 611) +++ sipp/trunk/THANKS 2012-12-22 01:50:29 UTC (rev 612) @@ -23,6 +23,7 @@ Dmitry Semyonov Jordan Walbesser Ken Crowell +Peter Lemenkov SIPp also uses code originally by Aaron Turner (send_packets.c) and L Peter Deutsch (md5.c). Modified: sipp/trunk/call.cpp =================================================================== --- sipp/trunk/call.cpp 2012-12-22 01:50:24 UTC (rev 611) +++ sipp/trunk/call.cpp 2012-12-22 01:50:29 UTC (rev 612) @@ -133,17 +133,28 @@ char pattern[] = "c=IN IP4 "; char *begin, *end; char ip[32]; - begin = strstr(msg, pattern); + char *my_msg = strdup(msg); + + if (!my_msg) { + return INADDR_NONE; + } + begin = strstr(my_msg, pattern); if (!begin) { + free(my_msg); /* Can't find what we're looking at -> return no address */ return INADDR_NONE; } begin += sizeof("c=IN IP4 ") - 1; end = strstr(begin, "\r\n"); - if (!end) + if (!end) { + free(my_msg); return INADDR_NONE; + } + *end = '\0'; memset(ip, 0, 32); - strncpy(ip, begin, end - begin); + strncpy(ip, begin, sizeof(ip) - 1); + ip[sizeof(ip) - 1] = '\0'; + free(my_msg); return inet_addr(ip); } @@ -156,20 +167,30 @@ char pattern[] = "c=IN IP6 "; char *begin, *end; char ip[128]; + char *my_msg = strdup(msg); memset(addr, 0, sizeof(*addr)); memset(ip, 0, 128); - begin = strstr(msg, pattern); + if (!my_msg) { + return 0; + } + begin = strstr(my_msg,pattern); if (!begin) { + free(my_msg); /* Can't find what we're looking at -> return no address */ return 0; } begin += sizeof("c=IN IP6 ") - 1; end = strstr(begin, "\r\n"); - if (!end) + if (!end) { + free(my_msg); return 0; - strncpy(ip, begin, end - begin); + } + *end = '\0'; + strncpy(ip, begin, sizeof(ip) -1); + ip[sizeof(ip) - 1] = '\0'; + free(my_msg); if (!inet_pton(AF_INET6, ip, addr)) { return 0; } @@ -196,17 +217,27 @@ ERROR("Internal error: Undefined media pattern %d\n", 3); } - begin = strstr(msg, pattern); + char *my_msg = strdup(msg); + if (!my_msg) { + return 0; + } + begin = strstr(my_msg, pattern); if (!begin) { + free(my_msg); /* m=audio not found */ return 0; } begin += strlen(pattern) - 1; end = strstr(begin, "\r\n"); - if (!end) + if (!end) { + free(my_msg); ERROR("get_remote_port_media: no CRLF found"); + } + *end = '\0'; memset(number, 0, sizeof(number)); strncpy(number, begin, sizeof(number) - 1); + number[sizeof(number) - 1] = '\0'; + free(my_msg); return atoi(number); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arc...@us...> - 2012-12-22 01:50:27
|
Revision: 611 http://sourceforge.net/p/sipp/code/611 Author: arcady-91 Date: 2012-12-22 01:50:24 +0000 (Sat, 22 Dec 2012) Log Message: ----------- Fixing spelling errors Modified Paths: -------------- sipp/trunk/THANKS sipp/trunk/deadcall.cpp sipp/trunk/scenario.cpp Modified: sipp/trunk/THANKS =================================================================== --- sipp/trunk/THANKS 2012-12-22 01:50:20 UTC (rev 610) +++ sipp/trunk/THANKS 2012-12-22 01:50:24 UTC (rev 611) @@ -28,3 +28,4 @@ Deutsch (md5.c). The following people have contributed useful bug reports to SIPp: +Paul Belanger Modified: sipp/trunk/deadcall.cpp =================================================================== --- sipp/trunk/deadcall.cpp 2012-12-22 01:50:20 UTC (rev 610) +++ sipp/trunk/deadcall.cpp 2012-12-22 01:50:24 UTC (rev 611) @@ -74,7 +74,7 @@ WARNING("%s, received '%s'", buffer, msg); TRACE_MSG("-----------------------------------------------\n" - "Dead call %s recieved a %s message:\n\n%s\n", + "Dead call %s received a %s message:\n\n%s\n", id, TRANSPORT_TO_STRING(transport), msg); expiration = clock_tick + deadcall_wait; Modified: sipp/trunk/scenario.cpp =================================================================== --- sipp/trunk/scenario.cpp 2012-12-22 01:50:20 UTC (rev 610) +++ sipp/trunk/scenario.cpp 2012-12-22 01:50:24 UTC (rev 611) @@ -850,7 +850,7 @@ } if ((ptr = xp_get_value("response_txn"))) { - ERROR("response_txn can only be used for recieved messages."); + ERROR("response_txn can only be used for received messages."); } curmsg -> retrans_delay = xp_get_long("retrans", "retransmission timer", 0); @@ -871,7 +871,7 @@ if((ptr = xp_get_value((char *)"request"))) { curmsg -> recv_request = strdup(ptr); if ((ptr = xp_get_value("response_txn"))) { - ERROR("response_txn can only be used for recieved responses."); + ERROR("response_txn can only be used for received responses."); } } @@ -2035,7 +2035,7 @@ " <!-- are also discarded. -->\n" " <!-- -->\n" " <!-- If the specified header was present several times in the -->\n" -" <!-- message, all occurences are concatenated (CRLF seperated) -->\n" +" <!-- message, all occurences are concatenated (CRLF separated) -->\n" " <!-- to be used in place of the '[last_*]' keyword. -->\n" "\n" " <send>\n" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arc...@us...> - 2012-12-22 01:50:22
|
Revision: 610 http://sourceforge.net/p/sipp/code/610 Author: arcady-91 Date: 2012-12-22 01:50:20 +0000 (Sat, 22 Dec 2012) Log Message: ----------- Adding DTMF 0 pcap file (contributed by Ken Crowell) Modified Paths: -------------- sipp/trunk/THANKS Added Paths: ----------- sipp/trunk/pcap/dtmf_2833_0.pcap Modified: sipp/trunk/THANKS =================================================================== --- sipp/trunk/THANKS 2012-12-22 01:50:15 UTC (rev 609) +++ sipp/trunk/THANKS 2012-12-22 01:50:20 UTC (rev 610) @@ -1,4 +1,4 @@ -The following people have contributed code to SIPp: +The following people have contributed code or other elements to SIPp: Richard Gayraud Marc Lamberton @@ -22,6 +22,7 @@ Rob Day Dmitry Semyonov Jordan Walbesser +Ken Crowell SIPp also uses code originally by Aaron Turner (send_packets.c) and L Peter Deutsch (md5.c). Added: sipp/trunk/pcap/dtmf_2833_0.pcap =================================================================== --- sipp/trunk/pcap/dtmf_2833_0.pcap (rev 0) +++ sipp/trunk/pcap/dtmf_2833_0.pcap 2012-12-22 01:50:20 UTC (rev 610) @@ -0,0 +1,22 @@ +\xD4ò\xA1++@\xA0\xF1\x9DC_ +\x80\xA0\xF1\x9DC\x9D] +\xC0\xA0\xF1\x9DC\xAC ++@\xA0\xF1\x9DC\xCFG ++\x80\xA0\xF1\x9DCܕ +++\ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arc...@us...> - 2012-12-22 01:50:18
|
Revision: 609 http://sourceforge.net/p/sipp/code/609 Author: arcady-91 Date: 2012-12-22 01:50:15 +0000 (Sat, 22 Dec 2012) Log Message: ----------- Adding RTD name to all relevant statistics headers Modified Paths: -------------- sipp/trunk/stat.cpp Modified: sipp/trunk/stat.cpp =================================================================== --- sipp/trunk/stat.cpp 2012-12-22 01:50:11 UTC (rev 608) +++ sipp/trunk/stat.cpp 2012-12-22 01:50:15 UTC (rev 609) @@ -1120,11 +1120,11 @@ sprintf(repartitionHeader, "%s%s", P_repartitionName, stat_delimiter); for(int i=0; i<(sizeOfTab-1); i++) { - sprintf(buffer, "<%d%s", tabRepartition[i].borderMax, stat_delimiter); + 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, ">=%d%s", tabRepartition[sizeOfTab-1].borderMax, stat_delimiter); + 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); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arc...@us...> - 2012-12-22 01:50:13
|
Revision: 608 http://sourceforge.net/p/sipp/code/608 Author: arcady-91 Date: 2012-12-22 01:50:11 +0000 (Sat, 22 Dec 2012) Log Message: ----------- Merged from Fedora RPM - xp_parser.h isn't a global include Modified Paths: -------------- sipp/trunk/xp_parser.c Modified: sipp/trunk/xp_parser.c =================================================================== --- sipp/trunk/xp_parser.c 2012-12-22 01:50:07 UTC (rev 607) +++ sipp/trunk/xp_parser.c 2012-12-22 01:50:11 UTC (rev 608) @@ -37,7 +37,7 @@ #include <string.h> #include <ctype.h> -#include <xp_parser.h> +#include "xp_parser.h" /************* Constants and Global variables ***********/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arc...@us...> - 2012-12-22 01:50:09
|
Revision: 607 http://sourceforge.net/p/sipp/code/607 Author: arcady-91 Date: 2012-12-22 01:50:07 +0000 (Sat, 22 Dec 2012) Log Message: ----------- Merged from Fedora RPM - fix compile with -D_FORTIFY_SOURCE=2 gcc parameter Modified Paths: -------------- sipp/trunk/auth.c Modified: sipp/trunk/auth.c =================================================================== --- sipp/trunk/auth.c 2012-12-22 01:50:03 UTC (rev 606) +++ sipp/trunk/auth.c 2012-12-22 01:50:07 UTC (rev 607) @@ -224,6 +224,7 @@ static unsigned int mync = 1; int has_opaque = 0; md5_state_t Md5Ctx; + char tmpbuf[2048]; // Extract the Auth Type - If not present, using 'none' cnonce[0] = '\0'; @@ -284,9 +285,11 @@ hashToHex(&ha2[0], &ha2_hex[0]); if (cnonce[0] != '\0') { - sprintf(result, "%s,cnonce=\"%s\",nc=%s,qop=%s",result,cnonce,nc,authtype); + snprintf(tmpbuf, 2048, ",cnonce=\"%s\",nc=%s,qop=%s",cnonce,nc,authtype); + strcat(result,tmpbuf); } - sprintf(result, "%s,uri=\"%s\"",result,tmp); + snprintf(tmpbuf, 2048, ",uri=\"%s\"",tmp); + strcat(result,tmpbuf); // Extract the Nonce if (!getAuthParameter("nonce", auth, tmp, sizeof(tmp))) { @@ -311,10 +314,12 @@ md5_finish(&Md5Ctx, resp); hashToHex(&resp[0], &resp_hex[0]); - sprintf(result, "%s,nonce=\"%s\",response=\"%s\",algorithm=%s",result,tmp,resp_hex,algo); + snprintf(tmpbuf, 2048, ",nonce=\"%s\",response=\"%s\",algorithm=%s",tmp,resp_hex,algo); + strcat(result,tmpbuf); if (has_opaque) { - sprintf(result, "%s,opaque=\"%s\"",result,opaque); + snprintf(tmpbuf, 2048, ",opaque=\"%s\"",opaque); + strcat(result,tmpbuf); } return 1; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arc...@us...> - 2012-12-22 01:50:05
|
Revision: 606 http://sourceforge.net/p/sipp/code/606 Author: arcady-91 Date: 2012-12-22 01:50:03 +0000 (Sat, 22 Dec 2012) Log Message: ----------- Out-of-call scenario fix Modified Paths: -------------- sipp/trunk/scenario.cpp sipp/trunk/scenario.hpp sipp/trunk/sipp.cpp Modified: sipp/trunk/scenario.cpp =================================================================== --- sipp/trunk/scenario.cpp 2012-12-22 01:49:57 UTC (rev 605) +++ sipp/trunk/scenario.cpp 2012-12-22 01:50:03 UTC (rev 606) @@ -142,6 +142,7 @@ scenario *main_scenario; scenario *ooc_scenario; +scenario *aa_scenario; scenario *display_scenario; /* This mode setting refers to whether we open calls autonomously (MODE_CLIENT) @@ -1854,6 +1855,7 @@ "branchs", "uac_pcap", "ooc_default", + "ooc_dummy", }; int find_scenario(const char *scenario) { @@ -3223,4 +3225,37 @@ " <CallLengthRepartition value=\"10, 50, 100, 500, 1000, 5000, 10000\"/>\n" "\n" "</scenario>\n", +"<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>\n" +"<!DOCTYPE scenario SYSTEM \"sipp.dtd\">\n" +"\n" +"<!-- 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 the -->\n" +"<!-- 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 License -->\n" +"<!-- 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" +"<!-- Sipp default 'uas' scenario. -->\n" +"<!-- -->\n" +"\n" +"<scenario name=\"Out-of-call UAS\">\n" +" <recv request=\"DUMMY\" />\n" +"\n" +" <!-- definition of the response time repartition table (unit is ms) -->\n" +" <ResponseTimeRepartition value=\"10, 20, 30, 40, 50, 100, 150, 200\"/>\n" +"\n" +" <!-- definition of the call length repartition table (unit is ms) -->\n" +" <CallLengthRepartition value=\"10, 50, 100, 500, 1000, 5000, 10000\"/>\n" +"\n" +"</scenario>\n", + + }; Modified: sipp/trunk/scenario.hpp =================================================================== --- sipp/trunk/scenario.hpp 2012-12-22 01:49:57 UTC (rev 605) +++ sipp/trunk/scenario.hpp 2012-12-22 01:50:03 UTC (rev 606) @@ -222,6 +222,7 @@ /* There are external variable containing the current scenario */ extern scenario *main_scenario; extern scenario *ooc_scenario; +extern scenario *aa_scenario; extern scenario *display_scenario; extern int creationMode; extern int sendMode; @@ -251,7 +252,7 @@ int find_scenario(const char *scenario); -extern char * default_scenario[11]; +extern char * default_scenario[12]; /* Useful utility functions for parsing integers, etc. */ long get_long(const char *ptr, const char *what); Modified: sipp/trunk/sipp.cpp =================================================================== --- sipp/trunk/sipp.cpp 2012-12-22 01:49:57 UTC (rev 605) +++ sipp/trunk/sipp.cpp 2012-12-22 01:50:03 UTC (rev 606) @@ -3121,20 +3121,47 @@ else // mode != from SERVER and 3PCC Controller B { // This is a message that is not relating to any known call - if (auto_answer == true) { - // If auto answer mode, try to answer the incoming message - // with automaticResponseMode - // call is discarded before exiting the block + if (ooc_scenario) { if(!get_reply_code(msg)){ - ooc_scenario->stats->computeStat(CStat::E_CREATE_INCOMING_CALL); - /* 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!"); + 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, "NOTIFY") == msg) || + (strstr(msg, "INFO") == 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); @@ -3792,6 +3819,7 @@ { delete main_scenario; delete ooc_scenario; + delete aa_scenario; free_default_messages(); freeInFiles(); freeUserVarMap(); @@ -4887,11 +4915,15 @@ main_scenario->stats->setFileName((char*)"uac", (char*)".csv"); sprintf(scenario_file,"uac"); } + /* 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((char*)"ooc_dummy", (char*)".csv"); init_default_messages(); for (int i = 1; i <= users; i++) { @@ -4912,10 +4944,15 @@ /* Now Initialize the scenarios. */ main_scenario->runInit(); - ooc_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"); + } /* checking if we need to launch the tool in background mode */ if(backgroundMode == true) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arc...@us...> - 2012-12-22 01:49:55
|
Revision: 604 http://sourceforge.net/p/sipp/code/604 Author: arcady-91 Date: 2012-12-22 01:49:52 +0000 (Sat, 22 Dec 2012) Log Message: ----------- XML parser no longer skips some characters. Modified Paths: -------------- sipp/trunk/xp_parser.c Modified: sipp/trunk/xp_parser.c =================================================================== --- sipp/trunk/xp_parser.c 2012-12-22 01:49:48 UTC (rev 603) +++ sipp/trunk/xp_parser.c 2012-12-22 01:49:52 UTC (rev 604) @@ -218,17 +218,17 @@ (strstr(ptr,"<![CDATA[") == ptr)) { char * cdata_end = strstr(ptr, "]]>"); if(!cdata_end) return NULL; - ptr = cdata_end + 3; + ptr = cdata_end + 2; } else if ((*(ptr+1) == '!') && (*(ptr+2) == '-') && (strstr(ptr,"<!--") == ptr)) { char * comment_end = strstr(ptr, "-->"); if(!comment_end) return NULL; - ptr = comment_end + 3; + ptr = comment_end + 2; } else if (strstr(ptr,"<!DOCTYPE") == ptr) { char * doctype_end = strstr(ptr, ">"); if(!doctype_end) return NULL; - ptr = doctype_end + 2; + ptr = doctype_end; } else if(*(ptr+1) == '/') { level--; if(level < 0) return NULL; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arc...@us...> - 2012-12-22 01:49:50
|
Revision: 603 http://sourceforge.net/p/sipp/code/603 Author: arcady-91 Date: 2012-12-22 01:49:48 +0000 (Sat, 22 Dec 2012) Log Message: ----------- Rewriting of get_host_and_port Modified Paths: -------------- sipp/trunk/Makefile sipp/trunk/sipp.cpp Modified: sipp/trunk/Makefile =================================================================== --- sipp/trunk/Makefile 2012-12-22 01:49:43 UTC (rev 602) +++ sipp/trunk/Makefile 2012-12-22 01:49:48 UTC (rev 603) @@ -105,7 +105,7 @@ CFLAGS_SunOS=${DEBUG_FLAGS} -D__SUNOS CFLAGS_Cygwin=-D__CYGWIN -Dsocklen_t=int CFLAGS_Darwin=-D__DARWIN -CFLAGS=$(CFLAGS_$(SYSTEM)) $(VERINFO) $(TLS) $(PCAPPLAY) $(EXTRACFLAGS) +CFLAGS=$(CFLAGS_$(SYSTEM)) $(VERINFO) $(TLS) $(PCAPPLAY) $(EXTRACFLAGS) $(UNITTEST) #C++ Compiler Flags CPPFLAGS_hpux=-AA -mt -D__HPUX -D_INCLUDE_LONGLONG -DNOMACROS +W829 @@ -115,7 +115,7 @@ CPPFLAGS_SunOS=${DEBUG_FLAGS} -D__SUNOS CPPFLAGS_Cygwin=-D__CYGWIN -Dsocklen_t=int CPPFLAGS_Darwin=-D__DARWIN -CPPFLAGS=$(CPPFLAGS_$(SYSTEM)) $(VERINFO) $(TLS) $(PCAPPLAY) $(EXTRACPPFLAGS) +CPPFLAGS=$(CPPFLAGS_$(SYSTEM)) $(VERINFO) $(TLS) $(PCAPPLAY) $(EXTRACPPFLAGS) $(UNITTEST) #Linker mapping CCLINK_hpux=aCC @@ -163,6 +163,9 @@ all: $(MAKE) OSNAME=`uname|sed -e "s/CYGWIN.*/CYGWIN/"` MODELNAME=`uname -m|sed "s/Power Macintosh/ppc/"` $(OUTPUT) +unittest: + $(MAKE) UNITTEST="-DSIPP_UNITTEST" OSNAME=`uname|sed -e "s/CYGWIN.*/CYGWIN/"` MODELNAME=`uname -m|sed "s/Power Macintosh/ppc/"` $(OUTPUT) + # Building with TLS and authentication ossl: $(MAKE) OSNAME=`uname|sed -e "s/CYGWIN.*/CYGWIN/"` MODELNAME=`uname -m|sed "s/Power Macintosh/ppc/"` OBJ_TLS="auth.o sslinit.o sslthreadsafe.o milenage.o rijndael.o" TLS_LIBS="-lssl -lcrypto" TLS="-D_USE_OPENSSL -DOPENSSL_NO_KRB5" $(OUTPUT) Modified: sipp/trunk/sipp.cpp =================================================================== --- sipp/trunk/sipp.cpp 2012-12-22 01:49:43 UTC (rev 602) +++ sipp/trunk/sipp.cpp 2012-12-22 01:49:48 UTC (rev 603) @@ -622,7 +622,7 @@ return ip_addr; } -void get_host_and_port(char * addr, char * host, int * port) +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 @@ -630,32 +630,61 @@ * RFC 2732). If that's the case, then we need to skip past the IPv6 * address, which should be contained within square brackets ('[',']'). */ - char *p; - p = strchr( addr, '[' ); /* Look for '['. */ - if( p != NULL ) { /* If found, look for ']'. */ - p = strchr( p, ']' ); + const char *has_brackets; + int len; + + has_brackets = strchr(addr, '['); + if (has_brackets != NULL) { + has_brackets = strchr(has_brackets, ']'); } - if( p == NULL ) { /* If '['..']' not found, */ - p = addr; /* scan the whole string. */ + 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 = 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 = 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 = atol(first_colon_location + 1); + } + } + } else { /* If '['..']' found, */ - char *p1; /* extract the remote_host */ - char *p2; - p1 = strchr( addr, '[' ); - p2 = strchr( addr, ']' ); - *p2 = '\0'; - strcpy(host, p1 + 1); - *p2 = ']'; + 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 = atol(colon_before_port + 1); + } else { + *port = 0; + } } - /* Starting at <p>, which is either the start of the host substring - * or the end of the IPv6 address, find the last colon character. - */ - p = strchr( p, ':' ); - if( NULL != p ) { - *p = '\0'; - *port = atol(p + 1); - } else { - *port = 0; - } } static unsigned char tolower_table[256]; @@ -4113,7 +4142,43 @@ return sipp_do_connect_socket(socket); } +#ifdef SIPP_UNITTEST +int main() +{ + /* Unit testing function */ + char ipv6_addr_brackets[] = "[fe80::92a4:deff:fe74:7af5]"; + char ipv6_addr_port[] = "[fe80::92a4:deff:fe74:7af5]:999"; + char ipv6_addr[] = "fe80::92a4:deff:fe74:7af5"; + char ipv4_addr_port[] = "127.0.0.1:999"; + char ipv4_addr[] = "127.0.0.1"; + char hostname_port[] = "sipp.sf.net:999"; + char hostname[] = "sipp.sf.net"; + int port_result = -1; + char host_result[255]; + char orig_addr[255]; + +#define TEST_GET_HOST_AND_PORT(VAR, EXPECTED_HOST, EXPECTED_PORT) {\ + strcpy(host_result,""); \ + strcpy(orig_addr,VAR); \ + get_host_and_port(VAR, host_result, &port_result); \ + if ((strcmp(host_result, EXPECTED_HOST) != 0) || (port_result != EXPECTED_PORT)) \ + {fprintf(stderr, "get_host_and_port fails for address %s - results are %s and %d, expected %s and %d\n", orig_addr, host_result, port_result, EXPECTED_HOST, EXPECTED_PORT);};\ +} + + TEST_GET_HOST_AND_PORT(ipv6_addr, "fe80::92a4:deff:fe74:7af5", 0) + TEST_GET_HOST_AND_PORT(ipv6_addr_brackets, "fe80::92a4:deff:fe74:7af5", 0) + TEST_GET_HOST_AND_PORT(ipv6_addr_port, "fe80::92a4:deff:fe74:7af5", 999) + TEST_GET_HOST_AND_PORT(ipv4_addr, "127.0.0.1", 0) + TEST_GET_HOST_AND_PORT(ipv4_addr_port, "127.0.0.1", 999) + TEST_GET_HOST_AND_PORT(hostname, "sipp.sf.net", 0) + TEST_GET_HOST_AND_PORT(hostname_port, "sipp.sf.net", 999) + + return 0; +} + +#else + /* Main */ int main(int argc, char *argv[]) { @@ -5058,6 +5123,8 @@ } +#endif + void sipp_usleep(unsigned long usec) { if (usec >= 1000000) { sleep(usec / 1000000); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arc...@us...> - 2012-12-22 01:49:46
|
Revision: 602 http://sourceforge.net/p/sipp/code/602 Author: arcady-91 Date: 2012-12-22 01:49:43 +0000 (Sat, 22 Dec 2012) Log Message: ----------- Prevent the return value of wake() from being 0 or undefined. Modified Paths: -------------- sipp/trunk/THANKS sipp/trunk/opentask.cpp Modified: sipp/trunk/THANKS =================================================================== --- sipp/trunk/THANKS 2012-12-22 01:49:39 UTC (rev 601) +++ sipp/trunk/THANKS 2012-12-22 01:49:43 UTC (rev 602) @@ -19,5 +19,6 @@ Martin Van Leeuwen Andy Aicken Michael Hirschbichler +Rob Day The following people have contributed useful bug reports to SIPp: Modified: sipp/trunk/opentask.cpp =================================================================== --- sipp/trunk/opentask.cpp 2012-12-22 01:49:39 UTC (rev 601) +++ sipp/trunk/opentask.cpp 2012-12-22 01:49:43 UTC (rev 602) @@ -61,7 +61,9 @@ return 0; } else { /* We need to compute when the next call is going to be opened. */ - return (unsigned long) (last_rate_change_time + ((calls_since_last_rate_change + 1) / (rate/rate_period_ms))); + return (unsigned long) + MAX(last_rate_change_time + (calls_since_last_rate_change / + MAX(rate/MAX(rate_period_ms, 1), 1)), 1); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arc...@us...> - 2012-12-22 01:49:42
|
Revision: 601 http://sourceforge.net/p/sipp/code/601 Author: arcady-91 Date: 2012-12-22 01:49:39 +0000 (Sat, 22 Dec 2012) Log Message: ----------- Adding THANKS file to better track contributors Added Paths: ----------- sipp/trunk/THANKS Added: sipp/trunk/THANKS =================================================================== --- sipp/trunk/THANKS (rev 0) +++ sipp/trunk/THANKS 2012-12-22 01:49:39 UTC (rev 601) @@ -0,0 +1,23 @@ +The following people have contributed code 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 + +The following people have contributed useful bug reports to SIPp: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <dve...@us...> - 2011-10-31 11:47:37
|
Revision: 600 http://sipp.svn.sourceforge.net/sipp/?rev=600&view=rev Author: dverbeir Date: 2011-10-31 11:47:30 +0000 (Mon, 31 Oct 2011) Log Message: ----------- Enh: (ims_bench branch) Re-enable PCAP play support (use "make all_pcap" for building); original patch by James Van Vleet. Modified Paths: -------------- sipp/branches/ims_bench/Makefile sipp/branches/ims_bench/actions.cpp sipp/branches/ims_bench/actions.hpp sipp/branches/ims_bench/call.cpp sipp/branches/ims_bench/manager.cpp sipp/branches/ims_bench/prepare_pcap.cpp sipp/branches/ims_bench/rmt_parms.cpp sipp/branches/ims_bench/scenario.cpp sipp/branches/ims_bench/send_packets.cpp sipp/branches/ims_bench/send_packets.h sipp/branches/ims_bench/sipp.cpp Modified: sipp/branches/ims_bench/Makefile =================================================================== --- sipp/branches/ims_bench/Makefile 2011-06-14 06:27:20 UTC (rev 599) +++ sipp/branches/ims_bench/Makefile 2011-10-31 11:47:30 UTC (rev 600) @@ -200,13 +200,21 @@ -include local.mk +# By default, built OpenSSL enabled version of sipp. Alternative is pcapplay_ossl as is forced by "make all_pcap" +ifeq ($(SIPP_TARGET),) +SIPP_TARGET=ossl +endif + # Building Ossl, Manager & CpuMem + additional RMT lib all: make OSNAME=$(LOCAL_OSNAME) MODELNAME=$(LOCAL_MODELNAME) -C rmt - make OSNAME=$(LOCAL_OSNAME) MODELNAME=$(LOCAL_MODELNAME) ossl + make OSNAME=$(LOCAL_OSNAME) MODELNAME=$(LOCAL_MODELNAME) $(SIPP_TARGET) make OSNAME=$(LOCAL_OSNAME) MODELNAME=$(LOCAL_MODELNAME) $(MANAGER) make OSNAME=$(LOCAL_OSNAME) MODELNAME=$(LOCAL_MODELNAME) $(CPUMEM) +all_pcap: + make OSNAME=$(LOCAL_OSNAME) MODELNAME=$(LOCAL_MODELNAME) SIPP_TARGET=pcapplay_ossl + sip: make OSNAME=$(LOCAL_OSNAME) MODELNAME=$(LOCAL_MODELNAME) ossl Modified: sipp/branches/ims_bench/actions.cpp =================================================================== --- sipp/branches/ims_bench/actions.cpp 2011-06-14 06:27:20 UTC (rev 599) +++ sipp/branches/ims_bench/actions.cpp 2011-10-31 11:47:30 UTC (rev 600) @@ -314,7 +314,7 @@ } } -void CPcapAction::setPcapArgs (char* P_value) +void CPcapAction::setPcapArgs(const char* P_value) { if (M_pcapArgs != NULL) { free(M_pcapArgs); Modified: sipp/branches/ims_bench/actions.hpp =================================================================== --- sipp/branches/ims_bench/actions.hpp 2011-06-14 06:27:20 UTC (rev 599) +++ sipp/branches/ims_bench/actions.hpp 2011-10-31 11:47:30 UTC (rev 600) @@ -151,11 +151,11 @@ class CPcapAction : public CAction { public: - CPcapAction(T_ActionType P_type) : CAction(P_type) { } + CPcapAction(T_ActionType P_type) : CAction(P_type), M_pcapArgs(NULL) { } virtual ~CPcapAction(); virtual void showInfo(); - void setPcapArgs(char* P_value); + void setPcapArgs(const char* P_value); void setPcapArgs(pcap_pkts* P_value); pcap_pkts* getPcapPkts() { return M_pcapArgs; } private: Modified: sipp/branches/ims_bench/call.cpp =================================================================== --- sipp/branches/ims_bench/call.cpp 2011-06-14 06:27:20 UTC (rev 599) +++ sipp/branches/ims_bench/call.cpp 2011-10-31 11:47:30 UTC (rev 600) @@ -683,7 +683,7 @@ m_ctx_ssl(NULL), m_bio(NULL), #endif #ifdef PCAPPLAY - hasMediaInformation(0), play_args_a(0), play_args_v(0), + hasMediaInformation(0), play_args_a(), play_args_v(), #endif #ifdef _USE_OPENSSL dialog_authentication(NULL), dialog_challenge_type(0), @@ -3907,13 +3907,14 @@ case CAction::E_AT_PLAY_PCAP_AUDIO: case CAction::E_AT_PLAY_PCAP_VIDEO: { + CPcapAction* pAction = static_cast<CPcapAction*>(currentAction); play_args_t *play_args; - if (currentAction->getActionType() == CAction::E_AT_PLAY_PCAP_AUDIO) { + if (pAction->getActionType() == CAction::E_AT_PLAY_PCAP_AUDIO) { play_args = &(this->play_args_a); - } else if (currentAction->getActionType() == CAction::E_AT_PLAY_PCAP_VIDEO) { + } else if (pAction->getActionType() == CAction::E_AT_PLAY_PCAP_VIDEO) { play_args = &(this->play_args_v); } - play_args->pcap = currentAction->getPcapPkts(); + play_args->pcap = pAction->getPcapPkts(); /* port number is set in [auto_]media_port interpolation */ if (media_ip_is_ipv6) { struct sockaddr_in6 *from = (struct sockaddr_in6 *)(void *) &(play_args->from); Modified: sipp/branches/ims_bench/manager.cpp =================================================================== --- sipp/branches/ims_bench/manager.cpp 2011-06-14 06:27:20 UTC (rev 599) +++ sipp/branches/ims_bench/manager.cpp 2011-10-31 11:47:30 UTC (rev 600) @@ -1247,7 +1247,7 @@ int i; unsigned int t_LocalRefTime = getmilliseconds(); RunAction* t_pRun = getRunAction(m_CurrentRun); - if (t_pRun) { + if (t_pRun) { // Protect against case where GETCOUNTERS completes after end of last run if (m_AllCounters.total_calls) { UInt64 t_Delta = m_AllCounters.total_calls - m_LastTotalCall; UInt32 t_DeltaTime = t_LocalRefTime-m_LastRefTime; Modified: sipp/branches/ims_bench/prepare_pcap.cpp =================================================================== --- sipp/branches/ims_bench/prepare_pcap.cpp 2011-06-14 06:27:20 UTC (rev 599) +++ sipp/branches/ims_bench/prepare_pcap.cpp 2011-10-31 11:47:30 UTC (rev 600) @@ -108,7 +108,7 @@ #ifdef __HPUX pkthdr = (pcap_pkthdr *) malloc (sizeof (*pkthdr)); #else - pkthdr = malloc (sizeof (*pkthdr)); + pkthdr = (pcap_pkthdr *) malloc (sizeof (*pkthdr)); #endif if (!pkthdr) ERROR("Can't allocate memory for pcap pkthdr"); Modified: sipp/branches/ims_bench/rmt_parms.cpp =================================================================== --- sipp/branches/ims_bench/rmt_parms.cpp 2011-06-14 06:27:20 UTC (rev 599) +++ sipp/branches/ims_bench/rmt_parms.cpp 2011-10-31 11:47:30 UTC (rev 600) @@ -36,6 +36,7 @@ RMT_PARM_MAP_ENTRY( SIPP_PARM_USER_NAME2, "user_name2", RmtParmInfo::TYPE_STR ), RMT_PARM_MAP_ENTRY( SIPP_PARM_USER_DOMAIN2, "user_domain2", RmtParmInfo::TYPE_STR ), RMT_PARM_MAP_ENTRY( SIPP_PARM_PARTNER_ID, "partner_id", RmtParmInfo::TYPE_INT16 ), + RMT_PARM_MAP_ENTRY( SIPP_PARM_USER_NAME, "extension", RmtParmInfo::TYPE_STR ), /*>>> Insert new ones above this line <<<*/ RMT_PARM_MAP_ENTRY( SIPP_PARM_ID_MAX, "", RmtParmInfo::TYPE_NONE ) }; Modified: sipp/branches/ims_bench/scenario.cpp =================================================================== --- sipp/branches/ims_bench/scenario.cpp 2011-06-14 06:27:20 UTC (rev 599) +++ sipp/branches/ims_bench/scenario.cpp 2011-10-31 11:47:30 UTC (rev 600) @@ -733,7 +733,7 @@ } #ifdef PCAPPLAY - parseActions(a_rScen); + parseActions(a_ParseCtx); #endif } Modified: sipp/branches/ims_bench/send_packets.cpp =================================================================== --- sipp/branches/ims_bench/send_packets.cpp 2011-06-14 06:27:20 UTC (rev 599) +++ sipp/branches/ims_bench/send_packets.cpp 2011-10-31 11:47:30 UTC (rev 600) @@ -92,11 +92,10 @@ tvp->tv_usec = n * 100000; } -/* buffer should be "file_name" */ int -parse_play_args (char *buffer, pcap_pkts *pkts) +parse_play_args (const char *file, pcap_pkts *pkts) { - pkts->file = strdup (buffer); + pkts->file = strdup (file); prepare_pkts(pkts->file, pkts); return 1; } @@ -113,6 +112,15 @@ void do_sleep (struct timeval *, struct timeval *, struct timeval *, struct timeval *); +#ifdef __HPUX +u_int16_t checksum_carry(int s) { +#else +inline u_int16_t checksum_carry(int s) { +#endif + int s_c = (s >> 16) + (s & 0xffff); + return (~(s_c + (s_c >> 16)) & 0xffff); +} + int send_packets (play_args_t * play_args) { @@ -173,26 +181,26 @@ while (pkt_index < pkt_max) { memcpy(udp, pkt_index->data, pkt_index->pktlen); - port_diff = ntohs (udp->uh_dport) - pkts->base; + port_diff = ntohs (udp->dest) - pkts->base; // modify UDP ports - udp->uh_sport = htons(port_diff + *from_port); - udp->uh_dport = htons(port_diff + *to_port); + udp->source = htons(port_diff + *from_port); + udp->dest = htons(port_diff + *to_port); if (!media_ip_is_ipv6) { - temp_sum = checksum_carry(pkt_index->partial_check + check((u_int16_t *) &(((struct sockaddr_in *)(void *) from)->sin_addr.s_addr), 4) + check((u_int16_t *) &(((struct sockaddr_in *)(void *) to)->sin_addr.s_addr), 4) + check((u_int16_t *) &udp->uh_sport, 4)); + temp_sum = checksum_carry(pkt_index->partial_check + check((u_int16_t *) &(((struct sockaddr_in *)(void *) from)->sin_addr.s_addr), 4) + check((u_int16_t *) &(((struct sockaddr_in *)(void *) to)->sin_addr.s_addr), 4) + check((u_int16_t *) &udp->source, 4)); } else { - temp_sum = checksum_carry(pkt_index->partial_check + check((u_int16_t *) &(from6.sin6_addr.s6_addr), 16) + check((u_int16_t *) &(to6.sin6_addr.s6_addr), 16) + check((u_int16_t *) &udp->uh_sport, 4)); + temp_sum = checksum_carry(pkt_index->partial_check + check((u_int16_t *) &(from6.sin6_addr.s6_addr), 16) + check((u_int16_t *) &(to6.sin6_addr.s6_addr), 16) + check((u_int16_t *) &udp->source, 4)); } #ifndef _HPUX_LI #ifdef __HPUX - udp->uh_sum = (temp_sum>>16)+((temp_sum & 0xffff)<<16); + udp->check = (temp_sum>>16)+((temp_sum & 0xffff)<<16); #else - udp->uh_sum = temp_sum; + udp->check = temp_sum; #endif #else - udp->uh_sum = temp_sum; + udp->check = temp_sum; #endif do_sleep ((struct timeval *) &pkt_index->ts, &last, &didsleep, Modified: sipp/branches/ims_bench/send_packets.h =================================================================== --- sipp/branches/ims_bench/send_packets.h 2011-06-14 06:27:20 UTC (rev 599) +++ sipp/branches/ims_bench/send_packets.h 2011-10-31 11:47:30 UTC (rev 600) @@ -121,7 +121,7 @@ extern "C" { #endif - int parse_play_args (char *, pcap_pkts *); + int parse_play_args (const char *file, pcap_pkts *pkts); int send_packets (play_args_t *); #ifdef __cplusplus } Modified: sipp/branches/ims_bench/sipp.cpp =================================================================== --- sipp/branches/ims_bench/sipp.cpp 2011-06-14 06:27:20 UTC (rev 599) +++ sipp/branches/ims_bench/sipp.cpp 2011-10-31 11:47:30 UTC (rev 600) @@ -870,10 +870,10 @@ #ifdef PCAPPLAY /* if has media abilities */ if (hasMedia != 0) { - sprintf(temp_str, "%d Total RTP pckts sent ", + sprintf(temp_str, "%lu Total RTP pckts sent ", rtp_pckts_pcap); if (clock_tick-last_report_time) { - fprintf(f," %-38s %d.%03d last period RTP rate (kB/s)" SIPP_ENDL, + 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)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <saj...@us...> - 2011-06-14 06:27:28
|
Revision: 599 http://sipp.svn.sourceforge.net/sipp/?rev=599&view=rev Author: sajeeshs Date: 2011-06-14 06:27:20 +0000 (Tue, 14 Jun 2011) Log Message: ----------- Fix: Coredump when authentication header is used. Patch contributed by Bruno Tournay, Patch ID:3314077 Modified Paths: -------------- sipp/trunk/call.cpp Modified: sipp/trunk/call.cpp =================================================================== --- sipp/trunk/call.cpp 2011-06-02 08:34:11 UTC (rev 598) +++ sipp/trunk/call.cpp 2011-06-14 06:27:20 UTC (rev 599) @@ -2417,6 +2417,7 @@ 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"); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <saj...@us...> - 2011-06-02 08:34:17
|
Revision: 598 http://sipp.svn.sourceforge.net/sipp/?rev=598&view=rev Author: sajeeshs Date: 2011-06-02 08:34:11 +0000 (Thu, 02 Jun 2011) Log Message: ----------- Fix: Remove extra "\r\n" at the end if the message body ends with "\r\n\r\n" Modified Paths: -------------- sipp/trunk/call.cpp Modified: sipp/trunk/call.cpp =================================================================== --- sipp/trunk/call.cpp 2011-05-16 06:09:42 UTC (rev 597) +++ sipp/trunk/call.cpp 2011-06-02 08:34:11 UTC (rev 598) @@ -1208,6 +1208,8 @@ char *L_ptr1 ; char *L_ptr2 ; int uselen = 0; + int tmplen; + char *hdrbdry; assert(send_status); @@ -1249,6 +1251,16 @@ ack_is_pending = false ; } + /* Fix: Remove extra "\r\n" if message body ends with "\r\n\r\n" */ + tmplen = (*len) - 1; + if ((dest[tmplen] == dest[tmplen-2] && dest[tmplen] == '\n') + && (dest[tmplen-1] == dest[tmplen-3] && dest[tmplen-1] == '\r')) { + hdrbdry = strstr(dest, "\r\n\r\n"); + if (NULL != hdrbdry && hdrbdry != dest+(tmplen-3)) { + *len = (*len) - 2; + } + } + *send_status = send_raw(dest, index, *len); return dest; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <saj...@us...> - 2011-05-16 06:09:48
|
Revision: 597 http://sipp.svn.sourceforge.net/sipp/?rev=597&view=rev Author: sajeeshs Date: 2011-05-16 06:09:42 +0000 (Mon, 16 May 2011) Log Message: ----------- FIX: No curses inclusion under Cygwin make - ID: 3220321 Patch contributed by uiltje ( tuijldert ) Modified Paths: -------------- sipp/trunk/Makefile Modified: sipp/trunk/Makefile =================================================================== --- sipp/trunk/Makefile 2010-11-12 10:12:32 UTC (rev 596) +++ sipp/trunk/Makefile 2011-05-16 06:09:42 UTC (rev 597) @@ -153,7 +153,7 @@ INCDIR_hpux=-I. -I/usr/local/include -I/opt/openssl/include INCDIR_tru64=-I. -I/opt/openssl/include INCDIR_SunOS=-I. -I/usr/local/ssl/include/ -INCDIR_Cygwin=-I. -I/usr/include/openssl -I/usr/include -I/usr/lib/WpdPack/Include +INCDIR_Cygwin=-I. -I/usr/include/openssl -I/usr/include -I/usr/include/ncurses -I/usr/lib/WpdPack/Include INCDIR_Darwin=-I. -I/usr/local/ssl/include INCDIR=$(INCDIR_$(SYSTEM)) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <saj...@us...> - 2010-11-12 10:12:38
|
Revision: 596 http://sipp.svn.sourceforge.net/sipp/?rev=596&view=rev Author: sajeeshs Date: 2010-11-12 10:12:32 +0000 (Fri, 12 Nov 2010) Log Message: ----------- Enh: Changing Sipp version to 3.2 Modified Paths: -------------- sipp/trunk/sipp.cpp Modified: sipp/trunk/sipp.cpp =================================================================== --- sipp/trunk/sipp.cpp 2010-11-09 08:41:12 UTC (rev 595) +++ sipp/trunk/sipp.cpp 2010-11-12 10:12:32 UTC (rev 596) @@ -4202,7 +4202,7 @@ } exit(EXIT_OTHER); case SIPP_OPTION_VERSION: - printf("\n SIPp v3.1" + printf("\n SIPp v3.2" #ifdef _USE_OPENSSL "-TLS" #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <saj...@us...> - 2010-11-09 08:41:18
|
Revision: 595 http://sipp.svn.sourceforge.net/sipp/?rev=595&view=rev Author: sajeeshs Date: 2010-11-09 08:41:12 +0000 (Tue, 09 Nov 2010) Log Message: ----------- FIX: sipp crashes when the line is too large. BugID-2968740(Patch contributed by Mitko-Mitev) Modified Paths: -------------- sipp/trunk/message.cpp Modified: sipp/trunk/message.cpp =================================================================== --- sipp/trunk/message.cpp 2010-11-08 13:02:28 UTC (rev 594) +++ sipp/trunk/message.cpp 2010-11-09 08:41:12 UTC (rev 595) @@ -111,8 +111,11 @@ if (current_line[0] == '\0') { line_mark = strchr(src, '\n'); if (line_mark) { - memcpy(current_line, src, line_mark - src); - current_line[line_mark-src] = '\0'; + 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 was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |