Re: [Sipp-users] Can sipp call rate and call parameter be controlled by external script/program

2009-01-24 Thread Charles P Wright
> > You can tell SIPp to change its rate using the control socket.
> Can I tell sipp, not to make next call, until I am ready again?
You can set the rate to zero.
 
> > You can probably change the call parameters using extended 3PCC.  If 
you 
> > establish a socket to a 3PCC element and setup various parameters 
(look at 
> > the replace and insert actions so that you can update the in-memory 
> > representation of the CSV file); you can then pass those parameters to 

> > another instance of SIPp that will generate the calls (or you might 
even 
> > be able to generate the calls from that instance).
> I will study 3PCC in more details, but can I pass the parameter from
> my external script to 3PCC?
Only if your external script speaks 3PCC.  It is relatively simple. You 
open a TCP connection to the 3PCC port, and send messages terminated by 
"\27" (i.e. the character 27.  The messages can contain anything you want. 
 The messages are SIP-like, and are something like the following:

Call-ID: Foo
From: class
Any-Random-Header: Value

Body text\27

Where Foo is the call ID you select, From is the names in slave.cfg, and 
Any-Random-Header and Body text are the infomration you want to put in. 
SIPp internally adds the \27, but if you need an external script you'll 
need to do it yourself.

> > If you do modify the injection file, I would suggest using something 
like 
> > a MySQL database as a backing store and querying the database. 
> I believe this is alternative to my socket based approach. However if
> 3PCC approach works, I may not need to need this. In any case, could you
> please point me to the files, that I should start looking at?
message.cpp defines the keywords (the SendingMessage class parses the XML 
into a structure); call.cpp (create_sending_message) interprets the 
structure created by message.cpp; and infile.cpp handles the file 
keywords.
 
Charles

--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
Sipp-users mailing list
Sipp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sipp-users


Re: [Sipp-users] Build Error on building PCAPPLAY

2009-01-24 Thread Dmitry Goncharov

The compiler doesn't see the definition of u_int16_t.
On linux it is in sys/types.h and in linux/types.h.
You need to find the header which contains the definition of u_int16_t 
and include that header.

BR, Dmitry

KATWALA, KALPESH, ATTLABS wrote:

Hi All,

I'm trying to compile SIPp using pcapplay on Solaris 5.10 version.
It is erroring in prepare_pcap.h {62}.  

Any idea how to get around this error?  


I tried following what's on the SIPP digest - but doesn't look like it
is working.

http://www.mail-archive.com/sipp-users@lists.sourceforge.net/msg00056.ht
ml

r...@srel-util # make 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" sipp
gcc  -D__SUNOS -DSVN_VERSION="\"\""  -DPCAPPLAY -I.
-I/usr/local/ssl/include/ -c -o send_packets.o send_packets.c
In file included from send_packets.h:44,
 from send_packets.c:60:
prepare_pcap.h:62: error: parse error before "u_int16_t"
prepare_pcap.h:62: warning: no semicolon at end of struct or union
prepare_pcap.h:66: error: parse error before '}' token
prepare_pcap.h:66: warning: data definition has no type or storage class
prepare_pcap.h:71: error: parse error before '*' token
prepare_pcap.h:72: error: parse error before "checksum_carry"
prepare_pcap.h:72: warning: data definition has no type or storage class
prepare_pcap.h:73: error: parse error before "pcap_pkts"
===
===
 
Here is what line 62 of my prepare_pcap.h looks like:

#include 
#if defined(__HPUX) || defined(__DARWIN) || defined(__CYGWIN) ||
defined(__FreeBSD__)
struct iphdr
  {
#ifdef _HPUX_LI
unsigned int ihl:4;
unsigned int version:4;
#else
unsigned int version:4;
unsigned int ihl:4;
#endif
u_int8_t tos;
u_int16_t tot_len;
u_int16_t id;
u_int16_t frag_off;
u_int8_t ttl;
u_int8_t protocol;
u_int16_t check;
u_int32_t saddr;
u_int32_t daddr;
/*The options start here. */
  };
#endif
typedef struct
{
  u_char *data;
  u_long pktlen;
  struct timeval ts;
  int partial_check;
} pcap_pkt;
#define PCAP_MAXPACKET  1500
typedef struct
{
  char *file;
  u_int16_t base;   < Line 62
  u_long max_length;
  pcap_pkt *max;
  pcap_pkt *pkts;
} pcap_pkts;
#ifdef __cplusplus
extern "C" {
#endif
int check(u_int16_t *, int);
u_int16_t checksum_carry(int);
int prepare_pkts(char *, pcap_pkts *);
void free_pkts(pcap_pkts *);
#ifdef __cplusplus
}
#endif
#endif /* PREPARE_PCAP_H */


Thank you for your help.

Kalpesh Katwala
SVT Testing Group, IMS, AT&T



--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
Sipp-users mailing list
Sipp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sipp-users

  
--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword___
Sipp-users mailing list
Sipp-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sipp-users