Compilation

From SIPp

Jump to: navigation, search

Contents

Pre-requisites

Three pre-requisites are necessary to compile SIPp:

  • C++ compiler
  • Curses library
  • OpenSSL (>=0.9.7)

For pcap play (RTP) support:

  • libnet
  • libpcap

For Windows you need:

  • wpcap.dll and the WdpPack source (WdpPack by WinPcap.org) since it supports media (RTP support).

Tips per OS

HPUX

On HPUX systems,

  • C++ compiler
    You can use aCC
  • Curses library
    Curses library is provided by default.
  • OpenSSL (>=0.9.7)
    Get it from http://software.hp.com

Linux/Debian

On Linux/Debian systems (or any system where dpkg is installed), you can get all pre-requisites for SIPp by doing:

apt-get install gcc-c++
apt-get install ncurses-devel
apt-get install openssl-devel
apt-get install libssl-dev
apt-get install libnet1-dev
apt-get install libpcap0.8-dev

Linux/Unbuntu

I followed the above Linux/Debian instructions and found that I needed to use

apt-get install ncurses-dev

i.e. -dev rather than -devel

I also did

apt-get install build-essential 

Because the ubuntu desktop installation has no development tools by default. Perhaps apt-get install gcc-c++ would have done this for me anyway?

Linux/Redhat

to write.

PCLinuxOS

  • Use Synaptic Package Manager to update all your packages, if you haven't done so. This gets you some of what you will need (curses, gsl)
  • Use Synaptic Package Manager to add g++
  • To get OpenSSL: from command line and as root, 'apt-get install openssl-devel'
  • 'make ossl'
  • You might have to chmod the resulting "sipp" executable to 755 to make it run
  • Still have not figured out how to compile with pcap yet

Linux/Fedora 3

Howto install sipp1.1 (unstable version) on Fedora 3. sipp1.1 supports both authentication and RTP replay. Please send me feedback and let me know any problems, Thanks!

08-02-2006.

1) Pre-requisites to compile SIPp:

  • C++ Compiler (OK for Fedora 3)
  • curses or ncurses library(OK for Fedora 3)
  • For authentication and TLS support: OpenSSL >= 0.9.8(OK for Fedora 3)
  • For pcap play support: libpcap and libnet(need to install, see below)

1.1) Install libpcap on Fedora 3. 1.1.1 get propre tarball from SourceForge.net.

     EX.http://www.tcpdump.org/release/libpcap-0.9.3.tar.gz

1.1.2) unzip it

     tar zxvf libpcap-0.9.3.tar.gz

1.1.3) login as root, go to folder libpcap-0.9.3 and install it. run:

     ./configure 
     ./make  
     ./make install

1.2) Install libnet on Fedora 3

1.2.1) get tarball form SourceForge.net

     http://www.packetfactory.net/projects/libnet/dist/libnet-1.1.2.1.tar.gz

1.2.2) unzip it

     tar zxvf libnet-1.1.2.1.tar.gz

1.2.3) login as root, go to folder libnet-1.1.2.1 and install it.

     cp makfiles/linux.mak port.mak

NOTE: disable the option "-Werror" in WARNING_FLAGS in port.mak (delete "-Werror"). "-Werror" takes warning as error. In my test,the compilation cannot go on if it's on. Run:

     ./make
     ./make install


2) Install Sipp1.1

2.1) get tarball from SourceForge.net.

     EX.http://sipp.sourceforge.net/snapshots/sipp.cumulus.2006-01-31.tar.gz 

2.2) unzip

     tar zxvf sipp.cumulus.2006-01-31.tar.gz
     cd sipp.cumulus.2006-01-31

2.3) modify the codes in send_packets.h , add the following two lines:

     #include <sys/socket.h>
     #define uint16_t int short

In send_packets.c, force the included header file <libnet.h> to:

     #include </usr/include/libnet.h>

In Makefile,in section "#Link Libraries", set the following LIBS path:

      LIBS_linux= -ldl -lpthread -lncurses -lstdc++ -L /usr/lib -L /usr/local/lib -L /usr/lib64

2.4) compile to enable Sipp with PCAP play and authentication support:

     make pcapplay_ossl (It should use this option to enable pcap play and authentication support) 

NOTE: if you do PCAP play in test, login as root.

It should be OK now.

NetBSD

In the "Generic Rules" section of the Makefile, under "# SYSTEM nickname", add:

   SYSTEM_NetBSD=freebsd

Both the basic and ossl builds will work.

Unfortunately, the pcapplay does not yet compile; it comes up with this:

   In file included from send_packets.c:52:
   /usr/include/netinet/ip6.h:82: error: field 'ip6_src' has incomplete type
   /usr/include/netinet/ip6.h:83: error: field 'ip6_dst' has incomplete type

If you happen to know how to fix this, drop me a note at <cjs@starling-software.com>.

OpenBSD

On OpenBSD g++, curses and openssl are in a normal build. The Makefile is currently not set up for OpenBSD. It will not work with make called recursively with name=value pairs defined. A short term fix is to edit the makefile and hardcode the values of OSNAME and MODELNAME. All values are the same as FreeBSD except for the SSL libraries.

Solaris

You need libnet and libpcap packages for comiling SIPp on Solaris with support for RTP feature. We have tried compiling SIPp using libnet1.1.2.1 and libpcap0.9.4 Both the packages need to be compiled from source as binaries for these versions are not available as of now.

libnet1.1.2.1 is broken on Solaris. There is a workaround available. Edit the file 'libnet_raw.c' and add "break;" at line 144. After making the change compile and install the libnet package using 'make' utility. For refrence see http://web.bii.a-star.edu.sg/~james/mlfd/

Windows XP

1) Pre-requisites to compile SIPp:

  • cygwin
  • cygwin IPv6 extension
  • wpcap.dll and the WdpPack source (WdpPack by WinPcap.org) since it supports media (RTP support). (since release 1.1rc8)


2) Preparing the build enviroment

2.1) cygwin

1. Download cygwin http://www.cygwin.com/setup.exe
2. Run setup.exe
3. Continue advancing through the installer screens till reaching ‘Select Packages’ screen
4. Best to leave default packages option, but make sure you have the next packages marked for
   installation (if not mark them):
   ☼ gcc-core
   ☼ gcc-g++
   ☼ libncurses-devel
   ☼ libncurses8
   ☼ openssl-devel
   ☼ make
5. Continue with the installation (might take some time depending on your internet speed and
   download site)

2.2) Cygwin IPv6 extension

1. Download cygwin extension from http://win6.jp/Cygwin/cygwin-1.5.21-2-ipv6-0.21.zip
2. Extract the file to a temp directory.
3. Copy the 3 directories (bin/lib/usr) and paste them into your %cygwin% root
   directory,overwriting existing files.
4. Go into %cygwin%\bin and rename new_cygwin1.dll to cygwin1.dll
   (overwrite existing cygwin1.dll).

2.3) WinPcap support (since release 1.1rc8)

1. download the WdpPack from WinPcap installer for Windows and install it.
   This will give you the wpcap.dll which is needed by SIPp since version 1.1rc8.
2. download the WinPcap source of version 3.1 and higher from WinPcap Developement.
   It will be needed for compilation!
3. Unpack the WinPcap sources to Unpack it into %cygwin%\lib\WdpPack. 
4. Don't forget to rename or delete %cygwin%\lib\WdpPack\Include\pthread.h because it
   interfers with pthread.h of cygwin. 
These notes can be found here too: SIPp Online Documentation - Installing SIPp

2.4) SIPp source code

1. Download one of SIPp source code releases from
   http://sipp.sourceforge.net/snapshots/ (latest available releases)
   http://sourceforge.net/project/showfiles.php?group_id=104305 (more stable releases)
2. Extract the downloaded archive into %cygwin%\home\username 
   (where user name is your windows user name).

3) Building SIPp

1. Open cygwin shell via the shortcut the cygwin installation created.
2. Wait for first time launch to create some user specific files.
3. When you get the ‘$’ prompt you are ready to go.
4. Go into the SIPp directory under the \home\username directory.
5. Run the ‘make’ command and wait for the build to end.

4) Running Sipp

1. Copy the ‘sipp.exe’ executable into a directory you wish.
2. For the executable to run you must copy ‘cygwin1.dll’ and ‘cygncurses-8.dll’
   from %cygwin%\bin into the directory ‘sipp.exe’ resides in.
3. To run SIPp, you can execute it from windows command line.

TIP : You might want to consider installing an officail release of SIPp for windows first. (EX. http://sourceforge.net/project/showfiles.php?group_id=104305&package_id=119322). This way you will have a ready directory with all dll's and Windows shortcuts, and you only need to copy your built sipp.exe into that directory.

NOTE : To uninstall cygwin - http://cygwin.com/faq/faq_2.html#SEC20

Personal tools