This may be a bit late - if so ignore it. #1 Pollfiles is a structure that allows the poll() function to receive from any of a number of open sockets (one per TCP call for example). So poll_idx is an index and pollfiles[(*poll_idx)].fd is the file-descriptor to do the send on.
#2 Yes. I think main_socket is 0 in the UAC case. #3 Sorry I don't know - never used compression. Peter Peter Higginson Newport Networks Ltd, Direct line 01494 470694 http://www.newport-networks.com/ -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of F. Tarek Rogers Sent: 05 September 2006 14:31 To: [email protected] Subject: [Sipp-users] Adding support for multiple destinations Hi, I have a need to modify SIPp to support multiple remote destinations in UAC mode. The idea being to supply additional hosts to SIPp, which are stored in an array of remote_hosts[], and then each successive call does a round robin to the next host in the array. A new variable in the call class stores the index to the socket array that is used by that call's destination. The goal is to test a N-wide server setup, where launching N instances of SIPp becomes unwieldy for the operator. I've done some of this work, but have a few areas of code in sipp.c that I'm not familiar with, and I'm hoping someone can shed some light: Issue #1: recv_message in sipp.c makes a call to send_message, which supplies a socket. The send is in a conditional block like thus: if((pollfiles[(*poll_idx)].revents & POLLOUT) != 0 ) { ... if (pending_msg[(*poll_idx)] != NULL) { char * VP_tmp = strdup(pending_msg[(*poll_idx)]); free(pending_msg[(*poll_idx)]); pending_msg[(*poll_idx)] = NULL; send_message(pollfiles[(*poll_idx)].fd, NULL, VP_tmp, 0); free(VP_tmp); } Can someone enlighten me on what pollfiles is? This looks like a way to send messages that have already been queued up by the call somewhere. If using a call based socket - how would I go about identifying the call instance involved in the pending message? Issue #2: This code accepts an incoming TCP connection request. if(s == main_socket) { /* New incoming connection */ sipp_socklen_t len = SOCK_ADDR_SIZE(&remote_sockaddr); int new_sock = accept(s,(sockaddr *)(void *)&remote_sockaddr,&len); My assumption is that this will only be executed during UAS mode, since UAC mode initiates all his socket connections? Issue #3: decompress_if_needed which is called by recv_message uses a sock. At this point in recv_message, I've no idea what's being done. Can someone speak intelligently about what the code surrounding decompress_if_needed does? I'd appreciate any pointers. Thanks ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Sipp-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sipp-users --------------- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and delete this e-mail. Any unauthorized copying, disclosure or distribution of the contents in this e-mail is strictly forbidden. --------------- ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Sipp-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sipp-users
