[sipp] Ver. 3.2

Peter Lemenkov peter at fedoraproject.org
Thu Jan 27 16:02:11 UTC 2011


commit 1bc37584d7a57d8ce891428db38fa65d1e76f5ca
Author: Peter Lemenkov <lemenkov at gmail.com>
Date:   Thu Jan 27 19:01:46 2011 +0300

    Ver. 3.2
    
    Signed-off-by: Peter Lemenkov <lemenkov at gmail.com>

 .gitignore                                         |    1 +
 sipp--3.1svn586.diff                               |10063 --------------------
 ...ude-bogus-library-paths-and-include-paths.patch |    8 +-
 ....patch => sipp-0002-Fix-for-CVE-2008-2085.patch |   10 +-
 ...20.patch => sipp-0003-Fix-for-RHBZ-559620.patch |   24 +-
 sipp-0004-Add-autotools-support.patch              |  442 +
 sipp-0005-xp_parser.h-isn-t-a-global-include.patch |   26 +
 sipp.spec                                          |   31 +-
 sources                                            |    2 +-
 9 files changed, 513 insertions(+), 10094 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 36bde88..d93cced 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 sipp.3.1.src.tar.gz
+/sipp.svn.tar.gz
diff --git a/sipp--Do-not-include-bogus-library-paths-and-include-pat.patch b/sipp-0001-Do-not-include-bogus-library-paths-and-include-paths.patch
similarity index 75%
rename from sipp--Do-not-include-bogus-library-paths-and-include-pat.patch
rename to sipp-0001-Do-not-include-bogus-library-paths-and-include-paths.patch
index 02dd935..94399c4 100644
--- a/sipp--Do-not-include-bogus-library-paths-and-include-pat.patch
+++ b/sipp-0001-Do-not-include-bogus-library-paths-and-include-paths.patch
@@ -1,7 +1,9 @@
-From 81153fa6c7908b0f62b5b87782265e68336493cb Mon Sep 17 00:00:00 2001
+From 32802ce3050d934576f34c6bbea10aa592325bb7 Mon Sep 17 00:00:00 2001
 From: Peter Lemenkov <lemenkov at gmail.com>
 Date: Mon, 11 Jan 2010 14:45:45 +0300
-Subject: [PATCH 1/3] Do not include bogus library paths and include paths.
+Subject: [PATCH 1/5] - Do not include bogus library paths and include paths.
+   Taken from Fedoraproject repository - see this link:
+   http://cvs.fedoraproject.org/viewvc/rpms/sipp/devel/sipp--Makefile-fix-paths.diff?content-type=text%2Fplain&view=co
 
 Signed-off-by: Peter Lemenkov <lemenkov at gmail.com>
 ---
@@ -31,5 +33,5 @@ index 23a3fac..6975fa0 100644
  INCDIR_hpux=-I. -I/usr/local/include -I/opt/openssl/include
  INCDIR_tru64=-I. -I/opt/openssl/include
 -- 
-1.6.2.5
+1.7.3.5
 
diff --git a/sipp--Fix-for-CVE-2008-2085.patch b/sipp-0002-Fix-for-CVE-2008-2085.patch
similarity index 89%
rename from sipp--Fix-for-CVE-2008-2085.patch
rename to sipp-0002-Fix-for-CVE-2008-2085.patch
index 0c526a0..0a4c887 100644
--- a/sipp--Fix-for-CVE-2008-2085.patch
+++ b/sipp-0002-Fix-for-CVE-2008-2085.patch
@@ -1,7 +1,9 @@
-From dce23af786559873071b3ea5e4641e4ecdca5ee6 Mon Sep 17 00:00:00 2001
+From 9625749ee12dfc5de74473d3229db3d8673396f4 Mon Sep 17 00:00:00 2001
 From: Peter Lemenkov <lemenkov at gmail.com>
 Date: Wed, 27 Jan 2010 09:46:03 +0300
-Subject: [PATCH 2/3] Fix for CVE-2008-2085.
+Subject: [PATCH 2/5] -Fix for CVE-2008-2085.
+  Taken from Fedoraproject repository - see this link:
+  http://cvs.fedoraproject.org/viewvc/rpms/sipp/devel/sipp--CVE-2008-2085-fix.diff?content-type=text%2Fplain&view=co
 
 Signed-off-by: Peter Lemenkov <lemenkov at gmail.com>
 ---
@@ -9,7 +11,7 @@ Signed-off-by: Peter Lemenkov <lemenkov at gmail.com>
  1 files changed, 33 insertions(+), 8 deletions(-)
 
 diff --git a/call.cpp b/call.cpp
-index 6830304..408f23c 100644
+index ebef278..6360d51 100644
 --- a/call.cpp
 +++ b/call.cpp
 @@ -133,17 +133,26 @@ uint32_t get_remote_ip_media(char *msg)
@@ -103,5 +105,5 @@ index 6830304..408f23c 100644
  }
  
 -- 
-1.6.2.5
+1.7.3.5
 
diff --git a/sipp--Initial-fix-for-RHBZ-559620.patch b/sipp-0003-Fix-for-RHBZ-559620.patch
similarity index 72%
rename from sipp--Initial-fix-for-RHBZ-559620.patch
rename to sipp-0003-Fix-for-RHBZ-559620.patch
index 719a6cd..c87ec5a 100644
--- a/sipp--Initial-fix-for-RHBZ-559620.patch
+++ b/sipp-0003-Fix-for-RHBZ-559620.patch
@@ -1,7 +1,7 @@
-From 2b9333c4b1e3dffbd078cb4a747cc4254f3aa78f Mon Sep 17 00:00:00 2001
+From 3ceca7c455f79fa28cc98a95a8f54535c7b39864 Mon Sep 17 00:00:00 2001
 From: Peter Lemenkov <lemenkov at gmail.com>
 Date: Fri, 29 Jan 2010 19:16:18 +0300
-Subject: [PATCH 3/3] Initial fix for RHBZ #559620.
+Subject: [PATCH 3/5] Fix for RHBZ #559620
 
 Signed-off-by: Peter Lemenkov <lemenkov at gmail.com>
 ---
@@ -9,7 +9,7 @@ Signed-off-by: Peter Lemenkov <lemenkov at gmail.com>
  1 files changed, 9 insertions(+), 4 deletions(-)
 
 diff --git a/auth.c b/auth.c
-index 3e96037..6283d50 100644
+index 3e96037..c40830b 100644
 --- a/auth.c
 +++ b/auth.c
 @@ -223,6 +223,7 @@ int createAuthHeaderMD5(char * user, char * password, int password_len, char * m
@@ -25,8 +25,8 @@ index 3e96037..6283d50 100644
      sprintf(result, "Digest username=\"%s\",realm=\"%s\"",user,tmp);
      if (cnonce[0] != '\0') {
 -        sprintf(result, "%s,cnonce=\"%s\",nc=%s,qop=%s",result,cnonce,nc,authtype);
-+        snprintf(tmpbuf, 2048, "%s,cnonce=\"%s\",nc=%s,qop=%s",result,cnonce,nc,authtype);
-+        strcpy(result,tmpbuf);
++        snprintf(tmpbuf, 2048, ",cnonce=\"%s\",nc=%s,qop=%s",cnonce,nc,authtype);
++        strcat(result,tmpbuf);
      }
  
      // Construct the URI 
@@ -35,8 +35,8 @@ index 3e96037..6283d50 100644
      hashToHex(&ha2[0], &ha2_hex[0]);
  
 -    sprintf(result, "%s,uri=\"%s\"",result,tmp);
-+    snprintf(tmpbuf, 2048, "%s,uri=\"%s\"",result,tmp);
-+    strcpy(result,tmpbuf);
++    snprintf(tmpbuf, 2048, ",uri=\"%s\"",tmp);
++    strcat(result,tmpbuf);
  
      // Extract the Nonce 
      if (!getAuthParameter("nonce", auth, tmp, sizeof(tmp))) {
@@ -45,16 +45,16 @@ index 3e96037..6283d50 100644
      hashToHex(&resp[0], &resp_hex[0]);
  
 -    sprintf(result, "%s,nonce=\"%s\",response=\"%s\",algorithm=%s",result,tmp,resp_hex,algo);
-+    snprintf(tmpbuf, 2048, "%s,nonce=\"%s\",response=\"%s\",algorithm=%s",result,tmp,resp_hex,algo);
-+    strcpy(result,tmpbuf);
++    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, "%s,opaque=\"%s\"",result,opaque);
-+        strcpy(result,tmpbuf);
++        snprintf(tmpbuf, 2048, ",opaque=\"%s\"",opaque);
++        strcat(result,tmpbuf);
      }
  
      return 1;
 -- 
-1.6.2.5
+1.7.3.5
 
diff --git a/sipp-0004-Add-autotools-support.patch b/sipp-0004-Add-autotools-support.patch
new file mode 100644
index 0000000..0741df8
--- /dev/null
+++ b/sipp-0004-Add-autotools-support.patch
@@ -0,0 +1,442 @@
+From c1df32611c92bd2708ba98a64b81b5d1fd269c0b Mon Sep 17 00:00:00 2001
+From: Peter Lemenkov <lemenkov at gmail.com>
+Date: Thu, 2 Sep 2010 19:04:58 +0400
+Subject: [PATCH 4/5] Add autotools support
+
+Signed-off-by: Peter Lemenkov <lemenkov at gmail.com>
+---
+ Makefile     |  234 ----------------------------------------------------------
+ Makefile.am  |   41 ++++++++++
+ configure.ac |  131 ++++++++++++++++++++++++++++++++
+ 3 files changed, 172 insertions(+), 234 deletions(-)
+ delete mode 100644 Makefile
+ create mode 100644 Makefile.am
+ create mode 100644 configure.ac
+
+diff --git a/Makefile b/Makefile
+deleted file mode 100644
+index 6975fa0..0000000
+--- a/Makefile
++++ /dev/null
+@@ -1,234 +0,0 @@
+-#  This program is free software; you can redistribute it and/or modify
+-#  it under the terms of the GNU General Public License as published by
+-#  the Free Software Foundation; either version 2 of the License, or
+-#  (at your option) any later version.
+-#
+-#  This program is distributed in the hope that it will be useful,
+-#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+-#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+-#  GNU General Public License for more details.
+-#
+-#  You should have received a copy of the GNU General Public License
+-#  along with this program; if not, write to the Free Software
+-#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+-#
+-#  Copyright (C) 2003 - The Authors
+-#
+-#  Author : Richard GAYRAUD - 04 Nov 2003
+-#           From Hewlett Packard Company.
+-#
+-
+--include local.mk
+-SVN_VERSION=$(shell if test -d .svn ; then svnversion . | sed -e 's/^/svn/;' ;  else echo unknown ; fi)
+-VERINFO=-DSVN_VERSION="\"$(SVN_VERSION)\""
+-
+-# Output binary to be built
+-OUTPUT=sipp
+-
+-# C & C++ object files to be built
+-OBJ= xp_parser.o message.o scenario.o screen.o call.o comp.o sipp.o stat.o \
+-     actions.o variables.o infile.o deadcall.o task.o socketowner.o listener.o \
+-     opentask.o reporttask.o watchdog.o
+-
+-# Libraries directories
+-LIBDIR_linux=
+-LIBDIR_FreeBSD=
+-LIBDIR_hpux=
+-LIBDIR_tru64=
+-LIBDIR_SunOS=
+-LIBDIR_Cygwin=
+-LIBDIR_Darwin=
+-
+-# Archive file created in your home directory when building the archive target
+-# ARCHIVE= $(HOME)/$(OUTPUT).tgz
+-ARCHIVE= $(OUTPUT).tgz
+-
+-# Files to be erased by 'make clean' in addition to the output 
+-# binaries and object files:
+-TOCLEAN= *.log $(ARCHIVE) \
+-         *.csv *.exe
+-
+-###################################################################
+-# Generic Rules
+-
+-#OSNAME=`uname`
+-#MODELNAME=`uname -m`
+-
+-# SYSTEM nickname
+-SYSTEM_HP-UX=hpux
+-SYSTEM_Linux=linux
+-SYSTEM_FreeBSD=freebsd
+-SYSTEM_OSF1=tru64
+-SYSTEM_SunOS=SunOS
+-SYSTEM_CYGWIN=Cygwin
+-SYSTEM_Darwin=Darwin
+-SYSTEM=$(SYSTEM_$(OSNAME))
+-
+-# C compiler
+-CC_hpux=aCC
+-CC_linux=gcc  
+-CC_freebsd=cc  
+-CC_tru64=cc  
+-CC_SunOS=gcc
+-CC_Cygwin=cc  
+-CC_Darwin=cc  
+-CC=$(CC_$(SYSTEM))
+-
+-# C++ compiler mapping
+-CPP_hpux=aCC  
+-CPP_linux=g++  
+-CPP_freebsd=g++  
+-CPP_tru64=cxx  
+-CPP_SunOS=g++
+-CPP_Cygwin=g++  
+-CPP_Darwin=g++  
+-CPP=$(CPP_$(SYSTEM))
+-
+-#Model specific flags
+-MFLAGS_ia64=+DD64
+-MFLAGS_9000/800=+DAportable
+-MFLAGS_9000/785=+DAportable
+-MFLAGS_i686=
+-MFLAGS_i586=
+-MFLAGS_i486=
+-MFLAGS_i386=
+-MFLAGS_ppc=
+-MFLAGS=$(MFLAGS_$(MODELNAME))
+-
+-#C Compiler Flags
+-# supress warning #829 (Implicit conversion of string literal to
+-#'char *' is deprecated) since this is both common and harmless
+-CFLAGS_hpux=-D__HPUX -DPROTOTYPES +W829
+-CFLAGS_linux=-D__LINUX -pthread 
+-CFLAGS_freebsd=-D__LINUX -pthread
+-CFLAGS_tru64=-D__OSF1 -pthread
+-CFLAGS_SunOS=${DEBUG_FLAGS} -D__SUNOS
+-CFLAGS_Cygwin=-D__CYGWIN -Dsocklen_t=int
+-CFLAGS_Darwin=-D__DARWIN
+-CFLAGS=$(CFLAGS_$(SYSTEM)) $(VERINFO) $(TLS) $(PCAPPLAY) $(EXTRACFLAGS)
+-
+-#C++ Compiler Flags
+-CPPFLAGS_hpux=-AA -mt -D__HPUX -D_INCLUDE_LONGLONG -DNOMACROS +W829  
+-CPPFLAGS_linux=-D__LINUX -pthread 
+-CPPFLAGS_freebsd=-D__LINUX -pthread
+-CPPFLAGS_tru64=-D__OSF1 -pthread
+-CPPFLAGS_SunOS=${DEBUG_FLAGS} -D__SUNOS
+-CPPFLAGS_Cygwin=-D__CYGWIN -Dsocklen_t=int
+-CPPFLAGS_Darwin=-D__DARWIN
+-CPPFLAGS=$(CPPFLAGS_$(SYSTEM)) $(VERINFO) $(TLS) $(PCAPPLAY) $(EXTRACPPFLAGS)
+-
+-#Linker mapping
+-CCLINK_hpux=aCC
+-CCLINK_linux=gcc
+-CCLINK_freebsd=g++
+-CCLINK_tru64=cxx
+-CCLINK_SunOS=gcc
+-CCLINK_Cygwin=g++
+-CCLINK_Darwin=g++
+-CCLINK=$(CCLINK_$(SYSTEM))
+-
+-#Linker Flags
+-LFLAGS_hpux=-AA -mt
+-LFLAGS_linux=
+-LFLAGS_freebsd=
+-LFLAGS_tru64=
+-LFLAGS_SunOS=-mt ${DEBUG_FLAGS}
+-LFLAGS_Cygwin=
+-LFLAGS_Darwin=
+-LFLAGS=$(LFLAGS_$(SYSTEM)) $(EXTRALFLAGS)
+-
+-#Link Libraries
+-LIBS_linux= -ldl -lpthread -lncurses -lstdc++ -lm
+-LIBS_hpux= -lcurses -lpthread -L /opt/openssl/lib -L /usr/local/lib
+-LIBS_tru64= -lcurses -lpthread
+-LIBS_freebsd= -lcurses -pthread -L /usr/local/lib
+-LIBS_SunOS= -lcurses -lpthread -lnsl -lsocket -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic -lm -ldl -L /usr/local/ssl/lib/
+-LIBS_Cygwin= -lcurses -lpthread -lstdc++ -L /usr/lib/WpdPack/Lib
+-LIBS_Darwin= -lcurses
+-LIBS=$(LIBS_$(SYSTEM)) $(EXTRALIBS)
+-
+-# Include directories
+-INCDIR_linux=-I.
+-INCDIR_freebsd=-I. -I/usr/local/include
+-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_Darwin=-I. -I/usr/local/ssl/include
+-INCDIR=$(INCDIR_$(SYSTEM)) 
+-
+--include local.mk
+-
+-# Building without TLS and authentication (no openssl pre-requisite)
+-all:
+-	$(MAKE) 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)
+-
+-#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)
+-
+-pcapplay_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"  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
+-
+-pcapplay_ossl_hp_li_ia:
+-	@_HPUX_LI_FLAG=-D_HPUX_LI ; export _HPUX_LI_FLAG ; $(MAKE) pcapplay_ossl
+-
+-pcapplay_cygwin:
+-	$(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="-lwpcap" PCAPPLAY="-DPCAPPLAY" $(OUTPUT)
+-
+-pcapplay_ossl_cygwin:
+-	$(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"  OBJ_PCAPPLAY="send_packets.o prepare_pcap.o" PCAPPLAY_LIBS="-lwpcap" PCAPPLAY="-DPCAPPLAY" $(OUTPUT)
+-
+-$(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:
+-	DEBUG_FLAGS="-g -pg" ; export DEBUG_FLAGS ; $(MAKE) all
+-
+-debug_ossl:
+-	@DEBUG_FLAGS=-g ; export DEBUG_FLAGS ; $(MAKE) ossl
+-
+-debug_pcap:
+-	@DEBUG_FLAGS=-g ; export DEBUG_FLAGS ; make pcapplay
+-
+-debug_pcap_cygwin:
+-	@DEBUG_FLAGS=-g ; export DEBUG_FLAGS ; $(MAKE) pcapplay_ossl_cygwin
+-
+-clean:
+-	rm -f *.o $(OUTPUT) *~ $(TOCLEAN) 
+-	rm -rf cxx_repository
+-
+-archive:
+-	rm -f TMP_TAR_FILE.* $(ARCHIVE)
+-	$(MAKE) clean
+-	tar cf TMP_TAR_FILE.tar .
+-	gzip TMP_TAR_FILE.tar
+-	cp TMP_TAR_FILE.tar.gz $(ARCHIVE)
+-	rm -f TMP_TAR_FILE.*
+-
+-
+-# Files types rules
+-.SUFFIXES: .o .cpp .c .h .hpp
+-
+-*.o: *.h *.hpp
+-
+-.C.o:
+-	$(CPP) $(CPPFLAGS) $(MFLAGS) $(DEBUG_FLAGS) $(_HPUX_LI_FLAG) $(INCDIR) -c -o $*.o $<
+-
+-.cpp.o:
+-	$(CPP) $(CPPFLAGS) $(MFLAGS) $(DEBUG_FLAGS) $(_HPUX_LI_FLAG) $(INCDIR) -c -o $*.o $<
+-
+-.c.o:
+-	$(CC) $(CFLAGS) $(MFLAGS) $(DEBUG_FLAGS) $(_HPUX_LI_FLAG) $(INCDIR) -c -o $*.o $<
+-
+-fortune.so: fortune.cpp
+-	g++ -fPIC $(CPPFLAGS) $(MFLAGS) $(DEBUG_FLAGS) $(_HPUX_LI_FLAG) $(INCDIR) -c -o fortune.o $<
+-	gcc -shared -Wl,-soname,fortune.so -o $@ fortune.o
+diff --git a/Makefile.am b/Makefile.am
+new file mode 100644
+index 0000000..c6acf8b
+--- /dev/null
++++ b/Makefile.am
+@@ -0,0 +1,41 @@
++bin_PROGRAMS = sipp
++
++DEFS +=  $(SYS_DEFINES)
++
++if HAVE_OPENSSL
++ssl_SOURCES = auth.c \
++	      milenage.c \
++	      rijndael.c \
++	      sslinit.c \
++	      sslthreadsafe.c
++endif
++
++if HAVE_PCAP
++pcap_SOURCES = prepare_pcap.c \
++	       send_packets.c
++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 \
++	       $(ssl_SOURCES) \
++	       $(pcap_SOURCES)
++
++sipp_LDADD = @LIBOBJS@
++
++#	       fortune.cpp
+diff --git a/configure.ac b/configure.ac
+new file mode 100644
+index 0000000..e7891d2
+--- /dev/null
++++ b/configure.ac
+@@ -0,0 +1,131 @@
++# ======================== initialization ===============================
++
++AC_INIT([SIPp], [3.1], [sipp-users at lists.sourceforge.net], [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"])
++
++# ==================== basic compiler settings ==========================
++
++AC_PROG_CC
++AC_PROG_CXX
++AC_HEADER_STDC
++
++# ==================== checks for libraries =============================
++AC_CHECK_LIB(curses,initscr,,[AC_MSG_ERROR([ncurses library missing])])
++
++# 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 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")
++
++# ==================== 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])
++
++# ==================== system-specific defines =========================
++
++case "${target_os}" in
++	*linux*)
++		SYS_DEFINES="-D__LINUX"
++		;;
++	*)
++		SYS_DEFINES="-D__UNKNOWN"
++		;;
++esac
++AC_SUBST([SYS_DEFINES])
++
++# ==================== generate files ===================================
++
++AC_CONFIG_FILES([Makefile])
++AC_OUTPUT
+-- 
+1.7.3.5
+
diff --git a/sipp-0005-xp_parser.h-isn-t-a-global-include.patch b/sipp-0005-xp_parser.h-isn-t-a-global-include.patch
new file mode 100644
index 0000000..9a8be44
--- /dev/null
+++ b/sipp-0005-xp_parser.h-isn-t-a-global-include.patch
@@ -0,0 +1,26 @@
+From 3a169738ba7c34ccf25049a2bfdf7ea9045205f5 Mon Sep 17 00:00:00 2001
+From: Peter Lemenkov <lemenkov at gmail.com>
+Date: Thu, 2 Sep 2010 19:06:13 +0400
+Subject: [PATCH 5/5] xp_parser.h isn't a global include
+
+Signed-off-by: Peter Lemenkov <lemenkov at gmail.com>
+---
+ xp_parser.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/xp_parser.c b/xp_parser.c
+index ce0ca43..7d60cb2 100644
+--- a/xp_parser.c
++++ b/xp_parser.c
+@@ -37,7 +37,7 @@
+ #include <string.h>
+ #include <ctype.h>
+ 
+-#include <xp_parser.h>
++#include "xp_parser.h"
+ 
+ /************* Constants and Global variables ***********/
+ 
+-- 
+1.7.3.5
+
diff --git a/sipp.spec b/sipp.spec
index 0faffe8..306c10a 100644
--- a/sipp.spec
+++ b/sipp.spec
@@ -1,18 +1,21 @@
 Summary:	SIP test tool / traffic generator
 Name:		sipp
-Version:	3.1
-Release:	9.svn586%{?dist}
+Version:	3.2
+Release:	1%{?dist}
 License:	GPLv2+
 Group:		Applications/Communications
 URL:		http://sipp.sourceforge.net/
-Source0:	http://downloads.sourceforge.net/%{name}/%{name}.%{version}.src.tar.gz
-Patch0:		sipp--3.1svn586.diff
+Source0:	http://downloads.sourceforge.net/%{name}/%{name}.svn.tar.gz
 # Fedora-specific
-Patch1:		sipp--Do-not-include-bogus-library-paths-and-include-pat.patch
+Patch1:	sipp-0001-Do-not-include-bogus-library-paths-and-include-paths.patch
 # https://sourceforge.net/tracker/index.php?func=detail&aid=2011751&group_id=104305&atid=637566
-Patch2:		sipp--Fix-for-CVE-2008-2085.patch
-# https://bugzilla.redhat.com/show_bug.cgi?id=559620
-Patch3:		sipp--Initial-fix-for-RHBZ-559620.patch
+Patch2:	sipp-0002-Fix-for-CVE-2008-2085.patch
+# https://bugzilla.redhat.com/559620
+Patch3:	sipp-0003-Fix-for-RHBZ-559620.patch
+Patch4:	sipp-0004-Add-autotools-support.patch
+Patch5:	sipp-0005-xp_parser.h-isn-t-a-global-include.patch
+BuildRequires:  autoconf
+BuildRequires:  automake
 BuildRequires:	ncurses-devel
 %if 0%{?el4}
 BuildRequires:	libpcap
@@ -34,14 +37,16 @@ retransmission management and dynamically adjustable call rates.
 
 %prep
 %setup -qn %{name}.svn
-%patch0 -p1 -b .svn586
 %patch1 -p1 -b .fix_paths
 %patch2 -p1 -b .cve20082085
 %patch3 -p1 -b .rhbz559620
-sed -i s,^SVN_VERSION=.*,SVN_VERSION=586,g Makefile
+%patch4 -p1 -b .autotools
+%patch5 -p1 -b .fix_header
 
 %build
-DEBUG_FLAGS="%{optflags}" %{__make} %{?_smp_mflags} pcapplay_ossl
+autoreconf -ivf
+%configure --with-openssl --with-pcap
+make %{?_smp_mflags}
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -59,6 +64,10 @@ rm -rf $RPM_BUILD_ROOT
 %{_datadir}/%{name}
 
 %changelog
+* Thu Jan 27 2011 Peter Lemenkov <lemenkov at gmail.com> 3.2-1
+- Ver 3.2
+- Patches rebased
+
 * Fri Jan 29 2010 Peter Lemenkov <lemenkov at gmail.com> 3.1-9.svn586
 - Fix for RHBZ #559620
 - Reorganized patches.
diff --git a/sources b/sources
index 41daee1..d6154d6 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-452a6f88f2d314dbb2f44e318a60982b  sipp.3.1.src.tar.gz
+2a3a60cb4317dcf8eb5482f6a955e4d0  sipp.svn.tar.gz


More information about the scm-commits mailing list