博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

SIPp 学习笔记 一 (安装)

Posted on 2012-02-13 10:34  小新786  阅读(1359)  评论(0编辑  收藏  举报

SIPp 学习笔记  (安装)

                                              

SIPp可以用来测试各种sip的设备,如终端电话或者proxy, 包括功能和性能上的(性能上只能在linux平台下才可以;) 具体的描述可以去参照SIPp的官方网站;

http://sipp.sourceforge.net/doc3.0/reference.html

,安装.

首先在安装之前我们必须弄清楚,SIPp程序所支持的OS平台和其工作的各种模式:

1, SIPp可以工作在两个不同的平台,Linuxwindows. 还有一些特殊的os的安装不在我的学习范围之内,HPos;

2, SIPp能够支持4中模式:

 

You have four options to compile SIPp:

Without TLS (Transport Layer Security) and authentication support:

This is the recommended setup if you don't need to handle SIP authentication and/or TLS. In this case, there are no depencies to install before building SIPp. It is straight forward:

# gunzip sipp-xxx.tar.gz

# tar -xvf sipp-xxx.tar

# cd sipp

# make

With TLS and authentication support, you must have installed OpenSSL library (>=0.9.8) (which may come with your system). Building SIPp consist only in adding the "ossl" option to the make command:

# gunzip sipp-xxx.tar.gz

# tar -xvf sipp-xxx.tar

# cd sipp

# make ossl

With PCAP play and without authentication support:

# gunzip sipp-xxx.tar.gz

# tar -xvf sipp-xxx.tar

# cd sipp

# make pcapplay

With PCAP play and authentication support:

# gunzip sipp-xxx.tar.gz

# tar -xvf sipp-xxx.tar

# cd sipp

# make pcapplay_ossl

 

(win下使用.exe安装的话,不支持TLSPCAP. Win下需要编译源码才能和linux下一样,所有功能都支持;)

 

下面我来说说具体的安装.

1, Windows, 本人先尝试的为Win环境的安装,如果Win都成功了,Linux环境下肯定就更没有问题了;

  windows安装之前,先介绍一个新的东西. CYGWIN,为必须,类似于一个windows 环境中虚拟一个linux环境的工具该工具能将sipp程序和winapi对应上,linux下网络程序能在windows下跑同时还具有gcc的编译功能,缺点是安装起来比较麻烦,为在线安装,服务器在日本,很慢,下面推荐给大家一些安装资料,也是从网上找来并亲自实验过的如果你安装失败的话使用时可能会出现 “error opening terminal cygwin”;

下载地址http://www.cygwin.com/setup.exe下载下来以后,运行,选择要按照的镜像server,我使用的是http://mirrors.kernel.org,速度还可以如果是SIPp使用exe来安装的话,使用下一步就ok,如果是SIPp需要编译源码的话,就必须按照以下的组件.

 gcc-core
   ☼ gcc-g++
   ☼ libncurses-devel
   ☼ libncurses8
   ☼ openssl-devel
   ☼
 make

 OpenSLL

 

安装完以后在win cmd中通过一下环境变量, C:/>set CYGWIN=tty notitle glob;

 

Window 下安装有两种方法,

一是使用官方网站提供的.exe文件,直接安装,然后下一步下一步,十分简单如果CYGwin安装的没有问题的话这就算是安装好了.

Ps:

n         官方网站之提供了1.12.0版本的EXE文件,现在的最新版本已经是3.1;

n         安装目录最好选择在C(系统盘);

n         使用exe安装不支持TLSPACP的功能,如果要支持这两个功能的话就必须使用源码编译安装;

n         下载地址http://sourceforge.net/project/showfiles.php?group_id=104305;

二为下载源码,编译安装

 使用CYGwinwindows下进行编译,所以必须按照cygwingcc编译功能;

 事前准备:1,源码从网上download下放到/usr/,并解压;

         2, winpcap, sipp提供的网址down下来以后,解压缩,copy到C:/cygwin/lib/WpdPack目录下;

         3, 安装IPV6, sipp提供的网址down下来以后,解压开并将其覆盖C:/cygwin/,并修改new-cygwin1.dllcygwin1.dll;

然后进行编译使用命令为 "make pcapplay_cygwin" or "pcapplay_ossl_cygwin” ;

 Ps:  要想编译成功,就必须要安装Opensll和各种lib库,否则 make pcapplay_ossl_cygwin会出错;

      在编译的使用提示找不到cygwin/uio.h, 搜索一下将/usr/include/sys下有这个文件,把它复制到/usr/include/cygwin目录下,再编译,O啦。

 

2,Linux.

Linux下似乎更加简单,解压源代码,根据命令编译即可,关于opensll和pcap的linux大家可以自己研究.