diff options
author | Martin Wilke <miwi@FreeBSD.org> | 2006-12-21 23:07:44 +0000 |
---|---|---|
committer | Martin Wilke <miwi@FreeBSD.org> | 2006-12-21 23:07:44 +0000 |
commit | 9014055fd51fdc39c02abd0929ddbfb7a2c4d30d (patch) | |
tree | a0c66954d2bc6631fd13fbdbbcb0352438ae9b7d /net | |
parent | 92c993f0662157cca2313393d355f753cf82f581 (diff) | |
download | ports-9014055fd51fdc39c02abd0929ddbfb7a2c4d30d.tar.gz ports-9014055fd51fdc39c02abd0929ddbfb7a2c4d30d.zip |
Notes
Diffstat (limited to 'net')
-rw-r--r-- | net/sipp/Makefile | 56 | ||||
-rw-r--r-- | net/sipp/distinfo | 6 | ||||
-rw-r--r-- | net/sipp/files/patch-Makefile | 40 | ||||
-rw-r--r-- | net/sipp/files/patch-auth.c | 14 | ||||
-rw-r--r-- | net/sipp/files/patch-prepare_pcap.c | 48 | ||||
-rw-r--r-- | net/sipp/files/patch-prepare_pcap.h | 13 | ||||
-rw-r--r-- | net/sipp/files/patch-send_packets.c | 13 | ||||
-rw-r--r-- | net/sipp/files/patch-sipp.hpp | 11 | ||||
-rw-r--r-- | net/sipp/files/sipp.1 | 304 |
9 files changed, 161 insertions, 344 deletions
diff --git a/net/sipp/Makefile b/net/sipp/Makefile index 6b3e5dab38b2..3601d69341b7 100644 --- a/net/sipp/Makefile +++ b/net/sipp/Makefile @@ -6,11 +6,10 @@ # PORTNAME= sipp -PORTVERSION= 1.1.r6 +PORTVERSION= 1.1.r6.20061208 CATEGORIES= net -MASTER_SITES= ${MASTER_SITE_SOURCEFORGE_EXTENDED} -MASTER_SITE_SUBDIR= sipp -DISTNAME= ${PORTNAME}-1.1rc6 +MASTER_SITES= http://sipp.sourceforge.net/snapshots/ +DISTNAME= ${PORTNAME}.2006-12-08 MAINTAINER= tut@nhamon.com.ua COMMENT= SIP testing tool @@ -22,18 +21,59 @@ MAKE_ENV+= CPP="${CXX}" CPPFLAGS="${CXXFLAGS}" CCLINK="${CXX}" .include <bsd.port.pre.mk> -.if !defined(WITHOUT_DIGEST_AUTH) -ALL_TARGET=ossl +.if defined(WITH_PCAPPLAY) +BUILD_DEPENDS= libnet*>=1.1.2,1:${PORTSDIR}/net/libnet + +PCAP_FILES= dtmf_2833_1.pcap dtmf_2833_2.pcap dtmf_2833_3.pcap \ + dtmf_2833_4.pcap dtmf_2833_5.pcap dtmf_2833_6.pcap \ + dtmf_2833_7.pcap dtmf_2833_8.pcap dtmf_2833_9.pcap \ + dtmf_2833_pound.pcap dtmf_2833_star.pcap g711a.pcap + +PLIST_DIRS= %%DATADIR%%/pcap %%DATADIR%% + +.for f in ${PCAP_FILES} +PLIST_FILES+= %%DATADIR%%/pcap/${f} +.endfor .endif +.if defined(WITHOUT_DIGEST_AUTH) + +.if defined(WITH_PCAPPLAY) +ALL_TARGET= pcapplay +.endif #defined(WITH_PCAPPLAY) + +.else + +.if defined(WITH_PCAPPLAY) +ALL_TARGET= pcapplay_ossl +.else +ALL_TARGET= ossl +.endif #defined(WITH_PCAPPLAY) + +.endif #defined(WITHOUT_DIGEST_AUTH) + post-patch: .if ${ARCH} == "ia64" - @${REINPLACE_CMD} -e 's/^\(MFLAGS_ia64=\)\+DD64$$/\1/' \ - ${WRKSRC}/Makefile + @${REINPLACE_CMD} 's/^\(MFLAGS_ia64=\)\+DD64$$/\1/' ${WRKSRC}/Makefile +.endif + +.if defined(WITH_PCAPPLAY) + @${REINPLACE_CMD} \ + 's|\(\\"\)\(pcap/[^"]*\.pcap\\"\)|\1${DATADIR}/\2|' \ + ${WRKSRC}/scenario.cpp .endif do-install: ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin ${INSTALL_MAN} ${FILESDIR}/sipp.1 ${PREFIX}/man/man1 +.if defined(WITH_PCAPPLAY) + ${MKDIR} ${DATADIR}/pcap + +.for f in ${PCAP_FILES} + ${INSTALL_DATA} ${WRKSRC}/pcap/${f} ${DATADIR}/pcap/${f} +.endfor + +.endif #defined(WITH_PCAPPLAY) + .include <bsd.port.post.mk> diff --git a/net/sipp/distinfo b/net/sipp/distinfo index 5c50d1190e17..b7c8d7a7f74a 100644 --- a/net/sipp/distinfo +++ b/net/sipp/distinfo @@ -1,3 +1,3 @@ -MD5 (sipp-1.1rc6.tar.gz) = 05f4b8b4d296c1d0771323eb1dbc14a8 -SHA256 (sipp-1.1rc6.tar.gz) = 2c6c842c1b6d6d5e57eb6b88a3673c01417e87032ebaff8e21c6d5469ab5f386 -SIZE (sipp-1.1rc6.tar.gz) = 157911 +MD5 (sipp.2006-12-08.tar.gz) = d173c86f4c969b86c34328364b2862f7 +SHA256 (sipp.2006-12-08.tar.gz) = cd790c30066aa19f104014d5523c44dbe752b1c19310b120d48915e9a9c0ba50 +SIZE (sipp.2006-12-08.tar.gz) = 170190 diff --git a/net/sipp/files/patch-Makefile b/net/sipp/files/patch-Makefile index ead280cbfc25..0c93740279cc 100644 --- a/net/sipp/files/patch-Makefile +++ b/net/sipp/files/patch-Makefile @@ -1,8 +1,17 @@ $FreeBSD$ ---- Makefile.orig Tue Aug 29 11:03:34 2006 -+++ Makefile Thu Sep 7 22:35:57 2006 -@@ -67,7 +67,7 @@ +--- Makefile.orig ++++ Makefile +@@ -18,8 +18,6 @@ + # From Hewlett Packard Company. + # + +--include local.mk +- + # Output binary to be built + OUTPUT=sipp + +@@ -69,7 +67,7 @@ CC_SunOS=gcc CC_Cygwin=cc CC_Darwin=cc @@ -11,7 +20,7 @@ $FreeBSD$ # C++ compiler mapping CPP_hpux=aCC -@@ -77,7 +77,7 @@ +@@ -79,7 +77,7 @@ CPP_SunOS=g++ CPP_Cygwin=g++ CPP_Darwin=g++ @@ -20,25 +29,25 @@ $FreeBSD$ #Model specific flags MFLAGS_ia64=+DD64 -@@ -99,7 +99,7 @@ - CFLAGS_SunOS=-g +@@ -102,7 +100,7 @@ + CFLAGS_SunOS=-g -D__SUNOS CFLAGS_Cygwin=-D__CYGWIN -Dsocklen_t=int CFLAGS_Darwin=-D__DARWIN --CFLAGS=$(CFLAGS_$(SYSTEM)) -D__3PCC__ $(TLS) $(PCAPPLAY) +-CFLAGS=$(CFLAGS_$(SYSTEM)) -D__3PCC__ $(TLS) $(PCAPPLAY) $(EXTRACFLAGS) +CFLAGS+=$(CFLAGS_$(SYSTEM)) -D__3PCC__ $(TLS) $(PCAPPLAY) #C++ Compiler Flags CPPFLAGS_hpux=-AA -mt -D__HPUX +W829 -@@ -109,7 +109,7 @@ - CPPFLAGS_SunOS=-g +@@ -112,7 +110,7 @@ + CPPFLAGS_SunOS=-g -D__SUNOS CPPFLAGS_Cygwin=-D__CYGWIN -Dsocklen_t=int CPPFLAGS_Darwin=-D__DARWIN --CPPFLAGS=$(CPPFLAGS_$(SYSTEM)) -D__3PCC__ $(TLS) $(PCAPPLAY) +-CPPFLAGS=$(CPPFLAGS_$(SYSTEM)) -D__3PCC__ $(TLS) $(PCAPPLAY) $(EXTRACPPFLAGS) +CPPFLAGS+=$(CPPFLAGS_$(SYSTEM)) -D__3PCC__ $(TLS) $(PCAPPLAY) #Linker mapping CCLINK_hpux=aCC -@@ -119,7 +119,7 @@ +@@ -122,7 +120,7 @@ CCLINK_SunOS=gcc CCLINK_Cygwin=g++ CCLINK_Darwin=g++ @@ -47,3 +56,12 @@ $FreeBSD$ #Linker Flags LFLAGS_hpux=-AA -mt +@@ -153,8 +151,6 @@ + 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: diff --git a/net/sipp/files/patch-auth.c b/net/sipp/files/patch-auth.c deleted file mode 100644 index 2ed3be8c1e34..000000000000 --- a/net/sipp/files/patch-auth.c +++ /dev/null @@ -1,14 +0,0 @@ -$FreeBSD$ - ---- auth.c.orig Tue Aug 29 11:03:34 2006 -+++ auth.c Thu Sep 7 22:54:05 2006 -@@ -21,6 +21,9 @@ - * - introduced AKAv1-MD5 - */ - -+#ifdef __FreeBSD__ -+#include <sys/types.h> -+#endif - #include <stdlib.h> - #include <stdio.h> - #include <string.h> diff --git a/net/sipp/files/patch-prepare_pcap.c b/net/sipp/files/patch-prepare_pcap.c new file mode 100644 index 000000000000..a878d162d7ba --- /dev/null +++ b/net/sipp/files/patch-prepare_pcap.c @@ -0,0 +1,48 @@ +$FreeBSD$ + +--- prepare_pcap.c.orig ++++ prepare_pcap.c +@@ -19,7 +19,7 @@ + #include <stdlib.h> + #include <netinet/in.h> + #include <netinet/udp.h> +-#if defined(__HPUX) || defined(__CYGWIN) ++#if defined(__HPUX) || defined(__CYGWIN) || defined(__FreeBSD__) + #include <netinet/in_systm.h> + #endif + #include <netinet/ip.h> +@@ -142,7 +142,7 @@ + fprintf(stderr, "prepare_pcap.c: Ignoring non UDP packet!\n"); + continue; + } +-#if defined(__DARWIN) || defined(__CYGWIN) ++#if defined(__DARWIN) || defined(__CYGWIN) || defined(__FreeBSD__) + udphdr = (struct udphdr *)((char *)iphdr + (iphdr->ihl << 2) + 4); + pktlen = (u_long)(ntohs(udphdr->uh_ulen)); + #else +@@ -164,7 +164,7 @@ + ERROR("Can't allocate memory for pcap pkt data"); + memcpy(pkt_index->data, udphdr, pktlen); + +-#if defined(__HPUX) || defined(__DARWIN) || (defined __CYGWIN) ++#if defined(__HPUX) || defined(__DARWIN) || (defined __CYGWIN) || defined(__FreeBSD__) + udphdr->uh_sum = 0 ; + #else + udphdr->check = 0; +@@ -173,14 +173,14 @@ + // compute a partial udp checksum + // not including port that will be changed + // when sending RTP +-#if defined(__HPUX) || defined(__DARWIN) || (defined __CYGWIN) ++#if defined(__HPUX) || defined(__DARWIN) || (defined __CYGWIN) || defined(__FreeBSD__) + pkt_index->partial_check = check((u_int16_t *) &udphdr->uh_ulen, pktlen - 4) + ntohs(IPPROTO_UDP + pktlen); + #else + pkt_index->partial_check = check((u_int16_t *) &udphdr->len, pktlen - 4) + ntohs(IPPROTO_UDP + pktlen); + #endif + if (max_length < pktlen) + max_length = pktlen; +-#if defined(__HPUX) || defined(__DARWIN) || (defined __CYGWIN) ++#if defined(__HPUX) || defined(__DARWIN) || (defined __CYGWIN) || defined(__FreeBSD__) + if (base > ntohs(udphdr->uh_dport)) + base = ntohs(udphdr->uh_dport); + #else diff --git a/net/sipp/files/patch-prepare_pcap.h b/net/sipp/files/patch-prepare_pcap.h new file mode 100644 index 000000000000..f7c7fec52e60 --- /dev/null +++ b/net/sipp/files/patch-prepare_pcap.h @@ -0,0 +1,13 @@ +$FreeBSD$ + +--- prepare_pcap.h.orig ++++ prepare_pcap.h +@@ -22,7 +22,7 @@ + #include <netinet/udp.h> + #include <time.h> + +-#if defined(__HPUX) || defined(__DARWIN) || defined(__CYGWIN) ++#if defined(__HPUX) || defined(__DARWIN) || defined(__CYGWIN) || defined(__FreeBSD__) + #define u_int8_t uint8_t + #define u_int16_t uint16_t + #define u_int32_t uint32_t diff --git a/net/sipp/files/patch-send_packets.c b/net/sipp/files/patch-send_packets.c new file mode 100644 index 000000000000..e386eee113b6 --- /dev/null +++ b/net/sipp/files/patch-send_packets.c @@ -0,0 +1,13 @@ +$FreeBSD$ + +--- send_packets.c.orig ++++ send_packets.c +@@ -45,7 +45,7 @@ + #include <unistd.h> + #include <stdlib.h> + #include <netinet/udp.h> +-#if defined(__DARWIN) || defined(__CYGWIN) ++#if defined(__DARWIN) || defined(__CYGWIN) || defined(__FreeBSD__) + #include <netinet/in.h> + #endif + #ifndef __CYGWIN diff --git a/net/sipp/files/patch-sipp.hpp b/net/sipp/files/patch-sipp.hpp deleted file mode 100644 index 4c39f89eb72e..000000000000 --- a/net/sipp/files/patch-sipp.hpp +++ /dev/null @@ -1,11 +0,0 @@ ---- sipp.hpp.orig Tue Feb 1 15:12:35 2005 -+++ sipp.hpp Tue Feb 1 15:12:49 2005 -@@ -268,7 +268,7 @@ - void pollset_remove(int idx); - int pollset_add(call * p_call, int socket); - --#if defined (__hpux) || defined (__alpha) -+#if defined (__hpux) - #define sipp_socklen_t int - #else - #define sipp_socklen_t socklen_t diff --git a/net/sipp/files/sipp.1 b/net/sipp/files/sipp.1 index 58b4b19858a1..52e5cbe2cac6 100644 --- a/net/sipp/files/sipp.1 +++ b/net/sipp/files/sipp.1 @@ -128,7 +128,7 @@ .\" ======================================================================== .\" .IX Title "sipp 1" -.TH sipp 1 "2004-06-16" "sipp" "User Contributed Documentation" +.TH sipp 1 "2006-12-17" "sipp" "User Contributed Documentation" .SH "NAME" sipp \- A benchworking tool for the SIP protocol. .SH "DESCRIPTION" @@ -143,306 +143,16 @@ testing configuration for \s-1SIP\s0. .SH "SYNTAX" .IX Header "SYNTAX" .Vb 1 -\& sipp remote_host[:remote_port] [options] +\&Run 'sipp' command without parameters for configuration details. .Ve -.SH "OPTIONS" -.IX Header "OPTIONS" +.SH "SEE ALSO" +.IX Header "SEE ALSO" .Vb 1 -\& -v : Display version and copyright information. -.Ve -.PP -.Vb 1 -\& -bg : Launch the tool in background mode. -.Ve -.PP -.Vb 2 -\& -p local_port : Set the local port number. Default is a -\& random free port chosen by the system. -.Ve -.PP -.Vb 3 -\& -i local_ip : Set the local IP address for 'Contact:', -\& 'Via:', and 'From:' headers. Default is -\& primary host IP address. -.Ve -.PP -.Vb 5 -\& -d duration : Controls the length (in milliseconds) of -\& of calls. More precisely, this controls -\& the duration of 'pause' instructions in -\& the scenario, if they do not have a -\& 'milliseconds' section. Default value is 0. -.Ve -.PP -.Vb 3 -\& -r rate (cps) : Set the call rate (in calls per seconds). -\& This value can be changed during test by -\& pressing ENTER. Default is 10. -.Ve -.PP -.Vb 5 -\& -sf filename : Loads an alternate xml scenario file. -\& To learn more about XML scenario syntax, -\& use the -sd option to dump embedded -\& scenarios. They contain all the necessary -\& help. -.Ve -.PP -.Vb 3 -\& -sn name : Use a default scenario (embedded in -\& the sipp executable). Available values -\& in this version: -.Ve -.PP -.Vb 4 -\& 'uac' : Standard SipStone UAC (default). -\& 'uas' : Simple UAS responder (UDP only). -\& 'regexp' : Standard SipStone UAC - with -\& regexp and variables. -.Ve -.PP -.Vb 1 -\& Default 3pcc scanerios (see -3pcc option): -.Ve -.PP -.Vb 5 -\& '3pcc-C-A' : Controller A side (must be started -\& after all other 3pcc scenarios) -\& '3pcc-C-B' : Controller B side. -\& '3pcc-A' : A side. -\& '3pcc-B' : B side. -.Ve -.PP -.Vb 2 -\& -sd name : Dumps a default scenario (embeded in -\& the sipp executable) -.Ve -.PP -.Vb 1 -\& -t [u1|un|t1|tn] : Set the transport mode: -.Ve -.PP -.Vb 4 -\& u1: UDP with one socket (default), -\& un: UDP with one socket per call, -\& t1: TCP with one socket, -\& tn: TCP with one socket per call. -.Ve -.PP -.Vb 2 -\& -trace_msg : Displays sent and received SIP messages in -\& sipp_messages.log -.Ve -.PP -.Vb 3 -\& -trace_stat : Dumps all statistics in the <scenario_name.csv> -\& file. Use the '-h stat' option for a detailed -\& description of the statistics file content. -.Ve -.PP -.Vb 6 -\& The -trace_stat option dumps all statistics in the -\& <scenario_name.csv> file. The dump starts with one header -\& line with all counters. All following lines are 'snapshots' of -\& statistics counter given the statistics report frequency -\& (-fd option). This file can be easily imported in any -\& spreadsheet application, like Excel. -.Ve -.PP -.Vb 3 -\& In counter names, (P) means 'Periodic' - since last -\& statistic row and (C) means 'Cumulated' - since sipp was -\& started. -.Ve -.PP -.Vb 1 -\& Available statistics are: -.Ve -.PP -.Vb 2 -\& - StartTime: -\& Date and time when the test has started. -.Ve -.PP -.Vb 2 -\& - LastResetTime: -\& Date and time when periodic counters where last reseted. -.Ve -.PP -.Vb 2 -\& - CurrentTime: -\& Date and time of the statistic row. -.Ve -.PP -.Vb 2 -\& - ElapsedTime: -\& Elapsed time. -.Ve -.PP -.Vb 2 -\& - CallRate: -\& Call rate (calls per seconds). -.Ve -.PP -.Vb 2 -\& - IncomingCall: -\& Number of incoming calls. -.Ve -.PP -.Vb 2 -\& - OutgoingCall: -\& Number of outgoing calls. -.Ve -.PP -.Vb 2 -\& - TotalCallCreated: -\& Number of calls created. -.Ve -.PP -.Vb 2 -\& - CurrentCall: -\& Number of calls currently ongoing. -.Ve -.PP -.Vb 2 -\& - SuccessfulCall: -\& Number of successful calls. -.Ve -.PP -.Vb 2 -\& - FailedCall: -\& Number of failed calls (all reasons). -.Ve -.PP -.Vb 3 -\& - FailedCannotSendMessage: -\& Number of failed calls because Sipp cannot send the -\& message (transport issue). -.Ve -.PP -.Vb 3 -\& - FailedMaxUDPRetrans: -\& Number of failed calls because the maximum number of -\& UDP retransmission attempts has been reached. -.Ve -.PP -.Vb 3 -\& - FailedUnexpectedMessage: -\& Number of failed calls because the SIP message received -\& cannot be associated to an existing call. -.Ve -.PP -.Vb 4 -\& - FailedCallRejected: -\& Number of failed calls because of Sipp internal error. -\& (a scenario sync command is not recognized or a scenario -\& action failed or a scenario variable assignment failed). -.Ve -.PP -.Vb 4 -\& - FailedCmdNotSent: -\& Number of failed calls because of inter-Sipp -\& communication error (a scenario sync command failed to -\& be sent). -.Ve -.PP -.Vb 5 -\& - FailedRegexpDoesntMatch: -\& Number of failed calls because of regexp that doesn't -\& match (there might be several regexp that don't match -\& during the call but the counter is increased only by -\& one). -.Ve -.PP -.Vb 3 -\& - FailedRegexpHdrNotFound: -\& Number of failed calls because of regexp with hdr -\& option but no matching header found. -.Ve -.PP -.Vb 1 -\& -stf file_name : Set the file name to use to dump statistics -.Ve -.PP -.Vb 2 -\& -trace_err : Trace all unexpected messages in -\& sipp_errors.log. -.Ve -.PP -.Vb 2 -\& -s service_name : Set the username part of the resquest URI. -\& Default is 'service'. -.Ve -.PP -.Vb 2 -\& -f frequency : Set the statistics report frequency on screen -\& (in seconds). Default is 1. -.Ve -.PP -.Vb 2 -\& -fd frequency : Set the statistics dump log report frequency -\& (in seconds). Default is 60. -.Ve -.PP -.Vb 4 -\& -l calls_limit : Set the maximum number of simultaneous -\& calls. Once this limit is reached, traffic -\& is decreased until the number of open calls -\& goes down. Default: -.Ve -.PP -.Vb 1 -\& (3 * call_duration (s) * rate). -.Ve -.PP -.Vb 2 -\& -m calls : Stop the test and exit when 'calls' calls are -\& processed. -.Ve -.PP -.Vb 3 -\& -mp local_port : Set the local RTP echo port number. Default -\& is none. RTP/UDP packets received on that -\& port are echoed to their sender. -.Ve -.PP -.Vb 1 -\& -mi local_rtp_ip : Set the local IP address for RTP echo. -.Ve -.PP -.Vb 5 -\& -3pcc ip:port : Launch the tool in 3pcc mode ("Third Party -\& call control"). The passed ip address -\& is the address of the twin sipp 3pcc tool -\& The used scenario must be a 3pcc relative -\& scenario -.Ve -.PP -.Vb 1 -\& -nr : Disable retransmission in UDP mode. -.Ve -.SH "EXIT CODE" -.IX Header "EXIT CODE" -.Vb 7 -\& Upon exit (on fatal error or when the number of asked calls (-m -\& option) is reached, sipp exits with one of the following exit -\& code: -\& 0: All calls were successful -\& 1: At least one call failed -\& 99: Normal exit without calls processed -\& -1: Fatal error -.Ve -.SH "EXAMPLES" -.IX Header "EXAMPLES" -.Vb 4 -\& Run sipp with embedded server (uas) scenario: -\& sipp -sn uas -\& On the same host, run sipp with embedded client (uac) scenario -\& sipp -sn uac 127.0.0.1 +\&SIPp documentation - http://sipp.sourceforge.net/doc/ .Ve .SH "AUTHORS" .IX Header "AUTHORS" .Vb 2 -\& Richard Gayraud <richard_gayraud@users.sourceforge.net> -\& O Jacques <ojacques@users.sourceforge.net> +\&Richard Gayraud <richard_gayraud@users.sourceforge.net> +\&Olivier Jacques <ojacques@users.sourceforge.net> .Ve |