You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(8) |
Jul
(9) |
Aug
(24) |
Sep
(24) |
Oct
(10) |
Nov
(25) |
Dec
(22) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(25) |
Feb
(24) |
Mar
(22) |
Apr
(14) |
May
(38) |
Jun
(6) |
Jul
(11) |
Aug
(6) |
Sep
(10) |
Oct
(11) |
Nov
(4) |
Dec
(8) |
2008 |
Jan
(6) |
Feb
(4) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
(2) |
Oct
(2) |
Nov
|
Dec
|
2011 |
Jan
(1) |
Feb
|
Mar
|
Apr
(4) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
(4) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
From: <oja...@us...> - 2006-08-17 16:33:36
|
Revision: 56 Author: ojacques Date: 2006-08-17 09:33:29 -0700 (Thu, 17 Aug 2006) ViewCVS: http://svn.sourceforge.net/gull/?rev=56&view=rev Log Message: ----------- H248: enhancements of dictionary Modified Paths: -------------- seagull/trunk/src/exe-env/h248-env/config/h248-dictionnary.xml Modified: seagull/trunk/src/exe-env/h248-env/config/h248-dictionnary.xml =================================================================== --- seagull/trunk/src/exe-env/h248-env/config/h248-dictionnary.xml 2006-08-17 16:29:40 UTC (rev 55) +++ seagull/trunk/src/exe-env/h248-env/config/h248-dictionnary.xml 2006-08-17 16:33:29 UTC (rev 56) @@ -60,6 +60,11 @@ nbexpr="4" subexpr="2"> </regexp> + <regexp name="message-header-no-equal" + expr="[[:space:]]*[!]\/1[[:space:]]*[[]([^]]+)[]][:]{0,1}[0-9]*[[:space:]]*([^ ]+)[[:space:]]*\n" + nbexpr="3" + subexpr="2"> + </regexp> </fielddef> <fielddef name="transaction-id"> @@ -68,11 +73,21 @@ nbexpr="2" subexpr="1"> </regexp> + <regexp name="trans-id-short" + expr="[Tt][[:space:]]*[=][[:space:]]*([0-9]+)" + nbexpr="2" + subexpr="1"> + </regexp> <regexp name="reply-id" expr="[Rr][Ee][Pp][Ll][Yy][[:space:]]*[=][[:space:]]*([0-9]+)" nbexpr="2" subexpr="1"> </regexp> + <regexp name="transresponseack-id" + expr="TransactionResponseAck[[:space:]]*[{][[:space:]]*([0-9]+)[[:space:]]*[}]" + nbexpr="2" + subexpr="1"> + </regexp> </fielddef> </header> @@ -85,6 +100,13 @@ subexpr="1"> </regexp> </fielddef> + <fielddef name="transaction-id-in-body"> + <regexp name="trans-id-in-body" + expr="[[:space:]]*([[:digit:]]*)[[:space:]]*[}]" + nbexpr="2" + subexpr="1"> + </regexp> + </fielddef> </body> @@ -93,12 +115,11 @@ session-id="transaction-id" out-of-session-id="transaction-id"> -<!-- -<dictionary session-method="open-id"> ---> - <message name="Transaction"></message> + <message name="T"></message> + <message name="TransactionResponseAck"></message> <message name="Reply"></message> + <message name="R"></message> </dictionary> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <oja...@us...> - 2006-08-17 16:29:45
|
Revision: 55 Author: ojacques Date: 2006-08-17 09:29:40 -0700 (Thu, 17 Aug 2006) ViewCVS: http://svn.sourceforge.net/gull/?rev=55&view=rev Log Message: ----------- Text: precision in error message when message is not in dictionary Modified Paths: -------------- seagull/trunk/src/protocol-text/C_ProtocolText.cpp Modified: seagull/trunk/src/protocol-text/C_ProtocolText.cpp =================================================================== --- seagull/trunk/src/protocol-text/C_ProtocolText.cpp 2006-08-16 16:20:39 UTC (rev 54) +++ seagull/trunk/src/protocol-text/C_ProtocolText.cpp 2006-08-17 16:29:40 UTC (rev 55) @@ -730,7 +730,9 @@ L_msg = create(this,L_header,L_body); if (L_msg == NULL) { GEN_ERROR(E_GEN_FATAL_ERROR, "C_ProtocolText::create_new_message() " - << "Error while creating message with header [" << L_header << "]"); + << "Error while creating message with header [" + << L_header + << "]: message not in dictionary?"); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <oja...@us...> - 2006-08-16 16:20:50
|
Revision: 54 Author: ojacques Date: 2006-08-16 09:20:39 -0700 (Wed, 16 Aug 2006) ViewCVS: http://svn.sourceforge.net/gull/?rev=54&view=rev Log Message: ----------- Updated XCAP environment with more realistic scenario and changes in dictionary Modified Paths: -------------- seagull/trunk/src/exe-env/xcap-env/config/conf.client.xml seagull/trunk/src/exe-env/xcap-env/config/conf.server.xml seagull/trunk/src/exe-env/xcap-env/config/xcap-dictionnary.xml seagull/trunk/src/exe-env/xcap-env/scenario/client.xml seagull/trunk/src/exe-env/xcap-env/scenario/server.xml Modified: seagull/trunk/src/exe-env/xcap-env/config/conf.client.xml =================================================================== --- seagull/trunk/src/exe-env/xcap-env/config/conf.client.xml 2006-08-16 13:46:57 UTC (rev 53) +++ seagull/trunk/src/exe-env/xcap-env/config/conf.client.xml 2006-08-16 16:20:39 UTC (rev 54) @@ -22,7 +22,7 @@ <configuration name="Simple IP Client Conf"> <define entity="transport" - name="trans-1" + name="tcp-trans" file="libtrans_ip.so" create_function="create_cipio_instance" delete_function="delete_cipio_instance" @@ -32,9 +32,9 @@ <define entity="channel" name="channel-1" protocol="xcap-protocol" - transport="trans-1" + transport="tcp-trans" global="no" - open-args="mode=client;dest=127.0.0.1:8080"> + open-args="mode=client;dest=127.0.0.1:8090"> </define> Modified: seagull/trunk/src/exe-env/xcap-env/config/conf.server.xml =================================================================== --- seagull/trunk/src/exe-env/xcap-env/config/conf.server.xml 2006-08-16 13:46:57 UTC (rev 53) +++ seagull/trunk/src/exe-env/xcap-env/config/conf.server.xml 2006-08-16 16:20:39 UTC (rev 54) @@ -22,7 +22,7 @@ <configuration name="Simple IP Server Conf"> <define entity="transport" - name="trans-1" + name="tcp-trans" file="libtrans_ip.so" create_function="create_cipio_instance" delete_function="delete_cipio_instance" @@ -32,8 +32,8 @@ <define entity="channel" name="channel-1" protocol="xcap-protocol" - transport="trans-1" - open-args="mode=server;source=127.0.0.1:8080"> + transport="tcp-trans" + open-args="mode=server;source=127.0.0.1:8090"> </define> <define entity="traffic-param" name="display-period" value="1"></define> Modified: seagull/trunk/src/exe-env/xcap-env/config/xcap-dictionnary.xml =================================================================== --- seagull/trunk/src/exe-env/xcap-env/config/xcap-dictionnary.xml 2006-08-16 13:46:57 UTC (rev 53) +++ seagull/trunk/src/exe-env/xcap-env/config/xcap-dictionnary.xml 2006-08-16 16:20:39 UTC (rev 54) @@ -60,6 +60,12 @@ line="0" subexpr="1"> </regexp> + <regexp name="request-param" + expr="[[:space:]]*([^ ]+)[[:space:]]+([^ ]+)[[:space:]]+HTTP\/1\.1[[:space:]]*$" + nbexpr="3" + line="0" + subexpr="2"> + </regexp> <regexp name="answer-type" expr="HTTP\/1\.1[[:space:]]+([0-9]+)[[:space:]]+" nbexpr="2" @@ -99,6 +105,8 @@ <message name="401"></message> <!-- Answer: Unauthorized --> <message name="403"></message> <!-- Answer: Forbidden --> <message name="404"></message> <!-- Answer: Not Found --> + <message name="409"></message> <!-- Answer: Conflict --> + <message name="412"></message> <!-- Answer: Precondition Failed --> <message name="500"></message> <!-- Answer: Internal Server Error --> <message name="501"></message> <!-- Answer: Not Implemented --> <message name="502"></message> <!-- Answer: Bad Gateway --> @@ -108,10 +116,3 @@ </protocol> - - - - - - - Modified: seagull/trunk/src/exe-env/xcap-env/scenario/client.xml =================================================================== --- seagull/trunk/src/exe-env/xcap-env/scenario/client.xml 2006-08-16 13:46:57 UTC (rev 53) +++ seagull/trunk/src/exe-env/xcap-env/scenario/client.xml 2006-08-16 16:20:39 UTC (rev 54) @@ -22,54 +22,79 @@ <scenario> <traffic> - <send channel="channel-1"> - <action> - <!-- open a socket for each call --> - <open args="mode=client;dest=127.0.0.1:8080"></open> - </action> - <message> - <!-- header --> - <! [ CDATA[GET http://xcap.example.com/address-book/users/petri/adbook1/address-book/entry/street/@paved HTTP/1.1]]> - <!-- body --> - <![CDATA[<?xml version="1.0" encoding="UTF-8"?> - <list name="close-friends"> - <entry uri="sip:jo...@ex..."> - <display-name>Joe Smith</display-name> - </entry> - <entry uri="sip:na...@ex..."> - <display-name>Nancy Gross</display-name> - </entry> - <entry uri="sip:pe...@ex..."> - <display-name>Petri Aukia</display-name> - </entry> - </list>]]> - </message> - </send> + <send channel="channel-1"> + <!-- Open a new transport (TCP) socket for this call --> + <action> + <open args="mode=client;dest=127.0.0.1:8090"></open> + </action> + <message> + <!-- header --> + <![CDATA[PUT /xcap/test-auid1/users/sip:us...@hp.../doc.xml HTTP/1.1 + Content-type: application/note+xml;charset=UTF-8 + X-XCAP-Asserted-Identity: "sip:us...@hp..." + User-Agent: Seagull-gull.sourceforge.net + Host: clever5:8090 + Accept: text/html, image/gif, *; q=.2, */*; q=.2 + Connection: keep-alive]]> + <!-- Body --> + <![CDATA[<?xml version="1.0" encoding="UTF-8"?> + <note xmlns:dog="the:namespace:for:dog"> + <dog:to>Jani</dog:to> + <from>Tove</from> + <heading>Re: Reminder</heading> + <body>I will not forget you this week end!</body> + </note>]]> + </message> + </send> - <receive channel="channel-1"> + <receive channel="channel-1"> <message> - <!-- header --> - <![CDATA[HTTP/1.1 200 OK - Content-Type: application/xml-attribute-value - Content-Length: 4]]> - <!-- body --> - <![CDATA[true]]> + <!-- header --> + <![CDATA[HTTP/1.1 201 Created + Server: Apache-Coyote/1.1 + Pragma: No-cache + Cache-Control: no-cache + Expires: Wed, 31 Dec 1969 18:00:00 CST + X-Powered-By: Servlet 2.4; JBoss-4.0.4.GA (build: CVSTag=JBoss_4_0_4_GA date=200605151000)/Tomcat-5.5 + ETag: 1 + Content-Length: 0 + Date: Mon, 07 Aug 2006 21:14:46 GMT]]> </message> + </receive> - <action> - <!-- close the socket --> - <close></close> - </action> - </receive> -</traffic> + <send channel="channel-1"> + <message> + <!-- header --> + <![CDATA[DELETE /xcap/test-auid1/users/sip:us...@hp.../doc.xml HTTP/1.1 + X-XCAP-Asserted-Identity: "sip:us...@hp..." + User-Agent: Seagull-gull.sourceforge.net + Host: clever5:8090 + Accept: text/html, image/gif, *; q=.2, */*; q=.2 + Connection: keep-alive + Content-type: application/x-www-form-urlencoded + ]]> + </message> + </send> + + <receive channel="channel-1"> + <message> + <!-- header --> + <![CDATA[HTTP/1.1 200 OK + Server: Apache-Coyote/1.1 + Pragma: No-cache + Cache-Control: no-cache + Expires: Wed, 31 Dec 1969 18:00:00 CST + X-Powered-By: Servlet 2.4; JBoss-4.0.4.GA (build: CVSTag=JBoss_4_0_4_GA date=200605151000)/Tomcat-5.5 + ETag: 1 + Content-Length: 0 + Date: Mon, 07 Aug 2006 21:14:46 GMT]]> + </message> + <action> + <!-- Close the TCP socket we opened at the beginning --> + <close></close> + </action> + </receive> + </traffic> </scenario> - - - - - - - - Modified: seagull/trunk/src/exe-env/xcap-env/scenario/server.xml =================================================================== --- seagull/trunk/src/exe-env/xcap-env/scenario/server.xml 2006-08-16 13:46:57 UTC (rev 53) +++ seagull/trunk/src/exe-env/xcap-env/scenario/server.xml 2006-08-16 16:20:39 UTC (rev 54) @@ -22,46 +22,72 @@ <scenario> <traffic> - <receive channel="channel-1"> - <message> - <!-- header --> - <! [ CDATA[GET http://xcap.example.com HTTP/1.1 - ]]> - <!-- body --> - <![CDATA[<?xml version="1.0" encoding="UTF-8"?> - <list name="close-friends"> - <entry uri="sip:jo...@ex..."> - <display-name>Joe Smith</display-name> - </entry> - <entry uri="sip:na...@ex..."> - <display-name>Nancy Gross</display-name> - </entry> - <entry uri="sip:pe...@ex..."> - <display-name>Petri Aukia</display-name> - </entry> - </list>]]> + <receive channel="channel-1"> + <message> + <!-- header --> + <![CDATA[PUT /xcap/test-auid1/users/sip:us...@hp.../doc.xml HTTP/1.1 + Content-type: application/note+xml;charset=UTF-8 + X-XCAP-Asserted-Identity: "sip:us...@hp..." + User-Agent: Seagull-gull.sourceforge.net + Host: clever5:8090 + Accept: text/html, image/gif, *; q=.2, */*; q=.2 + Connection: keep-alive]]> + <!-- Body --> + <![CDATA[<?xml version="1.0" encoding="UTF-8"?> + <note xmlns:dog="the:namespace:for:dog"> + <dog:to>Jani</dog:to> + <from>Tove</from> + <heading>Re: Reminder</heading> + <body>I will not forget you this week end!</body> + </note>]]> + </message> + </receive> - </message> - </receive> + <send channel="channel-1"> + <message> + <!-- header --> + <![CDATA[HTTP/1.1 201 Created + Server: Apache-Coyote/1.1 + Pragma: No-cache + Cache-Control: no-cache + Expires: Wed, 31 Dec 1969 18:00:00 CST + X-Powered-By: Servlet 2.4; JBoss-4.0.4.GA (build: CVSTag=JBoss_4_0_4_GA date=200605151000)/Tomcat-5.5 + ETag: 1 + Content-Length: 0 + Date: Mon, 07 Aug 2006 21:14:46 GMT]]> + </message> + </send> - <send channel="channel-1"> - <message> - <!-- header --> - <![CDATA[HTTP/1.1 200 OK - Content-Type: application/xml-attribute-value - Content-Length: 4]]> - <!-- body --> - <![CDATA[true]]> - </message> + <receive channel="channel-1"> + <message> + <!-- header --> + <![CDATA[DELETE /xcap/test-auid1/users/sip:us...@hp.../doc.xml HTTP/1.1 + X-XCAP-Asserted-Identity: "sip:us...@hp..." + User-Agent: Seagull-gull.sourceforge.net + Host: clever5:8090 + Accept: text/html, image/gif, *; q=.2, */*; q=.2 + Connection: keep-alive + Content-type: application/x-www-form-urlencoded + ]]> + </message> + </receive> - <action> - <!-- close the socket --> - <close></close> - </action> - - </send> + <send channel="channel-1"> + <message> + <!-- header --> + <![CDATA[HTTP/1.1 200 OK + Server: Apache-Coyote/1.1 + Pragma: No-cache + Cache-Control: no-cache + Expires: Wed, 31 Dec 1969 18:00:00 CST + X-Powered-By: Servlet 2.4; JBoss-4.0.4.GA (build: CVSTag=JBoss_4_0_4_GA date=200605151000)/Tomcat-5.5 + ETag: 1 + Content-Length: 0 + Date: Mon, 07 Aug 2006 21:14:46 GMT]]> + </message> + </send> + </traffic> - </scenario> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <oja...@us...> - 2006-08-16 13:47:13
|
Revision: 53 Author: ojacques Date: 2006-08-16 06:46:57 -0700 (Wed, 16 Aug 2006) ViewCVS: http://svn.sourceforge.net/gull/?rev=53&view=rev Log Message: ----------- Fixed some types. Added error when text message not in dictionary Modified Paths: -------------- seagull/trunk/src/generator-scenario/C_ScenarioControl.cpp seagull/trunk/src/protocol-text/C_MessageText.cpp seagull/trunk/src/protocol-text/C_ProtocolText.cpp seagull/trunk/src/protocol-text/C_ProtocolText.hpp Modified: seagull/trunk/src/generator-scenario/C_ScenarioControl.cpp =================================================================== --- seagull/trunk/src/generator-scenario/C_ScenarioControl.cpp 2006-08-16 10:59:44 UTC (rev 52) +++ seagull/trunk/src/generator-scenario/C_ScenarioControl.cpp 2006-08-16 13:46:57 UTC (rev 53) @@ -1957,7 +1957,7 @@ = get_counter_id (L_value) ; if (L_string_val->m_data.m_id == -1) { GEN_ERROR(E_GEN_FATAL_ERROR, - "Unable to found definition for [" + "Unable to find definition for [" << L_value << "]"); L_ret = -1 ; break ; Modified: seagull/trunk/src/protocol-text/C_MessageText.cpp =================================================================== --- seagull/trunk/src/protocol-text/C_MessageText.cpp 2006-08-16 10:59:44 UTC (rev 52) +++ seagull/trunk/src/protocol-text/C_MessageText.cpp 2006-08-16 13:46:57 UTC (rev 53) @@ -213,6 +213,9 @@ // message unknown *P_id = -1 ; m_id = -1 ; + GEN_ERROR(E_GEN_FATAL_ERROR, "Unknown (not in dictionary) message [" + << this->get_text_value(m_header) + << "]"); } else { // decode id // std::cerr << "L_message_type " << L_message_type << std::endl; Modified: seagull/trunk/src/protocol-text/C_ProtocolText.cpp =================================================================== --- seagull/trunk/src/protocol-text/C_ProtocolText.cpp 2006-08-16 10:59:44 UTC (rev 52) +++ seagull/trunk/src/protocol-text/C_ProtocolText.cpp 2006-08-16 13:46:57 UTC (rev 53) @@ -657,7 +657,7 @@ } -int C_ProtocolText::analyze_messsage_scen (C_XmlData *P_data, +int C_ProtocolText::analyze_message_scen (C_XmlData *P_data, T_pCDATAValueList P_cdata_value_list) { int L_ret = 0 ; @@ -667,7 +667,7 @@ L_data_scen = P_data->get_sub_data(); if (L_data_scen == NULL){ - GEN_ERROR(E_GEN_FATAL_ERROR, "C_ProtocolText::analyze_messsage_scen() " + GEN_ERROR(E_GEN_FATAL_ERROR, "C_ProtocolText::analyze_message_scen() " << "no value found for this message [" << m_header_name << "]"); L_ret = -1 ; } @@ -702,7 +702,7 @@ NEW_VAR(L_list_value, T_CDATAValueList()); // analyze message from scenario - L_ret = analyze_messsage_scen(P_data, L_list_value) ; + L_ret = analyze_message_scen(P_data, L_list_value) ; if (L_ret != -1) { if ((L_list_value != NULL ) && (!(L_list_value)->empty())) { Modified: seagull/trunk/src/protocol-text/C_ProtocolText.hpp =================================================================== --- seagull/trunk/src/protocol-text/C_ProtocolText.hpp 2006-08-16 10:59:44 UTC (rev 52) +++ seagull/trunk/src/protocol-text/C_ProtocolText.hpp 2006-08-16 13:46:57 UTC (rev 53) @@ -226,7 +226,7 @@ T_FieldHeaderList *P_fielddef_header_list, int *P_ret); - int analyze_messsage_scen(C_XmlData *P_data, + int analyze_message_scen(C_XmlData *P_data, T_pCDATAValueList P_cdata_value_list); C_MessageText* build_message (char *P_header, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <oja...@us...> - 2006-08-16 10:59:49
|
Revision: 52 Author: ojacques Date: 2006-08-16 03:59:44 -0700 (Wed, 16 Aug 2006) ViewCVS: http://svn.sourceforge.net/gull/?rev=52&view=rev Log Message: ----------- Text: add error message when message cannot be created (bad format for example) Modified Paths: -------------- seagull/trunk/src/protocol-text/C_ProtocolText.cpp Modified: seagull/trunk/src/protocol-text/C_ProtocolText.cpp =================================================================== --- seagull/trunk/src/protocol-text/C_ProtocolText.cpp 2006-08-11 14:21:27 UTC (rev 51) +++ seagull/trunk/src/protocol-text/C_ProtocolText.cpp 2006-08-16 10:59:44 UTC (rev 52) @@ -728,6 +728,10 @@ if (L_ret != -1) { L_msg = create(this,L_header,L_body); + if (L_msg == NULL) { + GEN_ERROR(E_GEN_FATAL_ERROR, "C_ProtocolText::create_new_message() " + << "Error while creating message with header [" << L_header << "]"); + } } // delete L_list_value This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jba...@us...> - 2006-08-11 14:21:45
|
Revision: 51 Author: jbannino Date: 2006-08-11 07:21:27 -0700 (Fri, 11 Aug 2006) ViewCVS: http://svn.sourceforge.net/gull/?rev=51&view=rev Log Message: ----------- BUG FIX: remove log message if no operation data on component Modified Paths: -------------- seagull/trunk/src/library-trans-octcap32/C_TCAPMsgBuildContextNoFlavour.body Modified: seagull/trunk/src/library-trans-octcap32/C_TCAPMsgBuildContextNoFlavour.body =================================================================== --- seagull/trunk/src/library-trans-octcap32/C_TCAPMsgBuildContextNoFlavour.body 2006-08-11 12:54:26 UTC (rev 50) +++ seagull/trunk/src/library-trans-octcap32/C_TCAPMsgBuildContextNoFlavour.body 2006-08-11 14:21:27 UTC (rev 51) @@ -425,7 +425,7 @@ } } else { - LOG_ERROR("No operation data"); + // LOG_ERROR("No operation data"); P_data->m_type = E_TYPE_STRING ; P_data->m_value.m_val_binary.m_size = 0 ; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jba...@us...> - 2006-08-11 12:54:31
|
Revision: 50 Author: jbannino Date: 2006-08-11 05:54:26 -0700 (Fri, 11 Aug 2006) ViewCVS: http://svn.sourceforge.net/gull/?rev=50&view=rev Log Message: ----------- BUG FIX : compilation in debug mode Modified Paths: -------------- seagull/trunk/src/library-trans-ip/C_TransIP.cpp Modified: seagull/trunk/src/library-trans-ip/C_TransIP.cpp =================================================================== --- seagull/trunk/src/library-trans-ip/C_TransIP.cpp 2006-08-11 07:46:04 UTC (rev 49) +++ seagull/trunk/src/library-trans-ip/C_TransIP.cpp 2006-08-11 12:54:26 UTC (rev 50) @@ -1036,13 +1036,14 @@ L_resolved_sockaddr = &P_pIpAddr->m_addr_src ; #ifdef DEBUG_MODE - +{ const char *L_cNoHost = "none" ; char *L_hostDebug = (L_host == NULL) ? (char*)L_cNoHost : L_host ; GEN_DEBUG(1, "C_TransIP::resolve_addr() [" << L_hostDebug << "]:[" << L_port << "]"); +} #endif #ifndef USE_IPV4_ONLY This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jba...@us...> - 2006-08-11 07:46:14
|
Revision: 49 Author: jbannino Date: 2006-08-11 00:46:04 -0700 (Fri, 11 Aug 2006) ViewCVS: http://svn.sourceforge.net/gull/?rev=49&view=rev Log Message: ----------- BUG FIX: Add channel received update on the call context for local channel management Modified Paths: -------------- seagull/trunk/src/generator-scenario/C_Scenario.cpp Modified: seagull/trunk/src/generator-scenario/C_Scenario.cpp =================================================================== --- seagull/trunk/src/generator-scenario/C_Scenario.cpp 2006-08-10 10:10:50 UTC (rev 48) +++ seagull/trunk/src/generator-scenario/C_Scenario.cpp 2006-08-11 07:46:04 UTC (rev 49) @@ -814,6 +814,7 @@ P_callCtxt->m_suspend_id = L_id ; P_callCtxt->m_suspend_msg = P_msg ; P_callCtxt->m_channel_id = P_pCmd->m_channel_id ; + P_callCtxt->m_channel_received = P_callCtxt->m_channel_id ; gettimeofday(&P_callCtxt->m_current_time, &L_timeZone) ; // OPEN DELAYED => do not execute the command // just wait for open This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <oja...@us...> - 2006-08-10 10:10:56
|
Revision: 48 Author: ojacques Date: 2006-08-10 03:10:50 -0700 (Thu, 10 Aug 2006) ViewCVS: http://svn.sourceforge.net/gull/?rev=48&view=rev Log Message: ----------- Precisions on transport and channels. Modified Paths: -------------- doc/trunk/src/documentation/content/xdocs/doc/core.xml Modified: doc/trunk/src/documentation/content/xdocs/doc/core.xml =================================================================== --- doc/trunk/src/documentation/content/xdocs/doc/core.xml 2006-08-08 12:54:56 UTC (rev 47) +++ doc/trunk/src/documentation/content/xdocs/doc/core.xml 2006-08-10 10:10:50 UTC (rev 48) @@ -160,7 +160,7 @@ <p><img src="images/channels.jpg" alt="Channels and protocols"/></p> <p>A channel makes the link between a transport and a protocol.</p> <note>Only one channel can be opened as server and it has to be opened as the FIRST channel.</note> - <p>Transport and channels are defined in the <a href="#config_generic">generic configuration file</a> + <p>Transport and channels are defined in the <a href="#transport_config">generic configuration file</a> </p> <p>Here are some examples:</p> <ul> @@ -1431,16 +1431,25 @@ <td>init-args</td> <td>Arguments to be passed to the transport library. The arguments are separated by semi-colons (;).</td> - <td>For the "libtrans_ip.so", the possible values are:<br/> -- type = tcp (default=tcp)<br/> -- decode-buf-len (default=4096): size of the reception buffer (maximum message size after re-assembly)<br/> -- encode-buf-len (default=4096): size of the sending buffer (maximum message size to be sent (can be segmented))<br/> -- read-buf-len (default=1024): amount of bytes to read on the IP socket at a time - several reads -might be necessary if buffer is the message to read is bigger than the buffer (impact on performances)<br/> -For the "libtrans_octcap.so", the possible parameters are the following:<br/> -- flavour (possible values: WBB, AAA, WAA, ABB)<br/> -- path to the reference library (optional)<br/> -- reference library (optional)</td> + <td><ul> + <li>For the "libtrans_ip.so", the possible values are: + <ul> + <li>type = tcp (default=tcp)</li> + <li>decode-buf-len (default=4096): size of the reception buffer (maximum message size after re-assembly)</li> + <li>encode-buf-len (default=4096): size of the sending buffer (maximum message size to be sent (can be segmented))</li> + <li>read-buf-len (default=1024): amount of bytes to read on the IP socket at a time - several reads + might be necessary if buffer is the message to read is bigger than the buffer (impact on performances)</li> + </ul> + </li> + <li>For the "libtrans_octcap.so", the possible parameters are the following: + <ul> + <li>flavour (possible values: WBB, AAA, WAA, ABB)</li> + <li>path to the reference library (optional)</li> + <li>reference library (optional)</li> + </ul> + </li> + </ul> + </td> </tr> </table> <p></p> @@ -1462,6 +1471,14 @@ <td>The value must correspond to one of the protocol name defined in a dictionary.</td> </tr> <tr> + <td>global</td> + <td>Indicate if a channel is declared and used globally (opened once) + or needs to be opened for each scenario call (using the "<a href="#open_action">open</a>" + action). By default, the channel is declared globally. adding <code>global="no"</code> + will allow to open channels in the scenarios.</td> + <td>-</td> + </tr> + <tr> <td>transport</td> <td>Transport to be used for this channel</td> <td>The value must correspond to one transport defined previously.</td> @@ -1469,13 +1486,35 @@ <tr> <td>open-args</td> <td>Arguments to specify connexion parameters.<br/> - For IP-based protocols, it specifies the mode (client or server), the address and the port.<br/> - For TCAP, it specifies the parameters of the TCAP connexion to the stack.</td> - <td>Example of value for a client for a IP-based protocol: + <ul> + <li>libtrans_ip based channels: + <ul> + <li>mode (mandatory): "client" (first message on the channel is sent) or + "server" (first message on the channel is received)</li> + <li>dest (mandatory): destination IP address/port to send messages</li> + <li>source (optional): source IP address/port to send messages (if not specified, + the system chooses the best one)</li> + </ul> + Example of value for a client for a IP-based protocol: "mode=<strong>client</strong>;<strong>dest</strong>=127.0.0.1:3868"<br/> Example of value for a server for a IP-based protocol: - "mode=<strong>server</strong>;<strong>source</strong>=127.0.0.1:3868"<br/> - Example for TCAP: "class=SS7_Stack_2;ossn=20;application=2;instance=2".</td> + "mode=<strong>server</strong>;<strong>source</strong>=127.0.0.1:3868" + </li> + <li>libtrans_octcap based channels: + <ul> + <li>class (mandatory): Name of the OCSS7 stack</li> + <li>ossn (mandatory): Originating SSN used to connect Seagull + TCAP application to OCSS7 stack (one of the local OCSS7 SSN)</li> + <li>application (optional): Application ID used by Seagull + (refer to OCSS7 Application Developer's Guide)</li> + <li>instance (optional): Instance ID used by Seagull (refer to + OCSS7 Application Developer's Guide)</li> + </ul> + Example: "class=SS7_Stack_2;ossn=20;application=2;instance=2" + </li> + </ul> + </td> + <td> </td> </tr> </table> </section> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <oja...@us...> - 2006-08-08 12:55:06
|
Revision: 47 Author: ojacques Date: 2006-08-08 05:54:56 -0700 (Tue, 08 Aug 2006) ViewCVS: http://svn.sourceforge.net/gull/?rev=47&view=rev Log Message: ----------- faq006: error message 'flow control not implemented' Modified Paths: -------------- doc/trunk/src/documentation/content/xdocs/doc/faq.xml Modified: doc/trunk/src/documentation/content/xdocs/doc/faq.xml =================================================================== --- doc/trunk/src/documentation/content/xdocs/doc/faq.xml 2006-08-08 10:45:31 UTC (rev 46) +++ doc/trunk/src/documentation/content/xdocs/doc/faq.xml 2006-08-08 12:54:56 UTC (rev 47) @@ -3,6 +3,7 @@ <faqs> <title>Frequently Asked Questions</title> + <!-- Last FAQ # is 006 --> <faqsection id="usage"> <title>Seagull Usage</title> @@ -43,11 +44,39 @@ What happens if a call is stuck? </question> <answer> - <p>By default, the call will be stuck forever. You activate the call-timeout to instruct Seagull to close "hang" calls. - If a call is active beyond the call-timeout-ms value, the call will time out and Seagull will close the call by using the <![CDATA[<abort>]]> section + <p>By default, the call will be stuck forever. You need to + activate the call-timeout to instruct Seagull to close "hanged" calls. + If a call is active beyond the call-timeout-ms value, the call will + time out and Seagull will close the call by using the <![CDATA[<abort>]]> section of the scenario if it exists.</p> </answer> </faq> + <faq id="faq006"> + <question> + I occasionally get "Flow control not implemented" messages. What does that mean? + </question> + <answer> + <p> The message you see is because Seagull got an "EAGAIN" error + from the TCP protocol stack when trying to send his message. + This EAGAIN error occurs when Seagull cannot send anymore data + (like when TCP buffer full): the TCP stack asks the application + (Seagull) to try again later. But this mechanism (which can be called "flow control") + is not implemented in Seagull.</p> + <p>Looking at the possible causes, this might be because the remote + application (to which Seagull talks to) doesn't read data + quick enough, which causes TCP stack queues on which Seagull is relying + to be overloaded.</p> + <p>Also, you must be aware that when you change the call rate, + the max-send and max-receive as well as maybe max-simultaneous-calls parameters + must be changed accordingly (see + <a href="http://gull.sourceforge.net/doc/core.html#ref_traffic_param">http://gull.sourceforge.net/doc/core.html#ref_traffic_param</a> + for values)</p> + </answer> + </faq> + + </faqsection> + <faqsection id="misc"> + <title>Miscenalleous questions</title> <faq id="faq005"> <question> Is Seagull stable? This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <oja...@us...> - 2006-08-08 10:45:37
|
Revision: 46 Author: ojacques Date: 2006-08-08 03:45:31 -0700 (Tue, 08 Aug 2006) ViewCVS: http://svn.sourceforge.net/gull/?rev=46&view=rev Log Message: ----------- Some precisions on call variables and counters. Documentation for the open action. Modified Paths: -------------- doc/trunk/src/documentation/content/xdocs/doc/core.xml Modified: doc/trunk/src/documentation/content/xdocs/doc/core.xml =================================================================== --- doc/trunk/src/documentation/content/xdocs/doc/core.xml 2006-08-01 16:31:33 UTC (rev 45) +++ doc/trunk/src/documentation/content/xdocs/doc/core.xml 2006-08-08 10:45:31 UTC (rev 46) @@ -472,16 +472,26 @@ </scenario>]]></source> <section id="scen_counter"> <title>Counter section</title> - <p>The <strong>counter</strong> section contains some variable initialization. - Those variables can then be used in other sections. - This can be in a server type or in a client type scenario.</p> - <p>The list of scenario commands that can be included in this section is - described in the <a href="#ref_scenario_commands">scenario command section</a>.</p> + <p>The <strong>counter</strong> section contains a list of counters that + are available during the traffic. This is useful, for example, to handle session-id (the name + varies depending on the protocol) which are used to identify a call in Seagull.</p> + <p>For example, the following code declares 3 counters: HbH-counter (initial value: 1000), + EtE-counter (initial value: 2000) and session-counter (initial value: 0).</p> + <source><![CDATA[<counter> + <counterdef name="HbH-counter" init="1000"> </counterdef> + <counterdef name="EtE-counter" init="2000"> </counterdef> + <counterdef name="session-counter" init="0"> </counterdef> +</counter>]]></source> + <p>Those counters can then be used in the scenario using the <a href="#action_inc-counter">inc-counter</a> + and <a href="#action_set-value">set-value</a> + scenario actions (see <a href="#ref_actions">scenario actions section</a>).</p> </section> <section id="scen_init"> <title>Init section</title> <p>The <strong>init</strong> section is executed once, at the time of the connection is setup (before any traffic). This can be in a server type or in a client type scenario.</p> + <p>This section can be used as a pre-amble to the traffic (like CER/CEA exchange + for Diameter protocol).</p> <p>The list of scenario commands that can be included in this section is described in the <a href="#ref_scenario_commands">scenario command section</a>.</p> </section> @@ -576,13 +586,13 @@ Those variables are local to each call (each instance of the scenario).</p> <p>Here is what is possible to do with call variables:</p> <ul> - <li>Set a call variable by using the <a href="#action_set-value">set-value</a> action.</li> + <li>Set the value of a protocol entity by using the <a href="#action_set-value">set-value</a> action.</li> <li>Increment a call variable within a call by using the <a href="#action_inc-var">inc-var</a> action.</li> - <li>Increment a call counter by using the <a href="#action_inc-counter">inc-counter</a> action. - A counter is a global variable.</li> - <li>Retrieve the value of a protocol entity by using the <a href="#action_store">store</a> action.</li> - <li>Put the value of a call variable in a protocol entity by using the <a href="#action_restore">restore</a> action.</li> - <li>In particular, this is the way how Diameter Hop-by-hop Id and End-To-End Id are handled.</li> + <li>Increment a call counter by using the <a href="#action_inc-counter">inc-counter</a> action (note: a counter is a global + (that is, valid for the entire traffic) variable).</li> + <li>Retrieve the value of a protocol entity in a call variable by using the <a href="#action_store">store</a> action.</li> + <li>Put the value of a call variable in a protocol entity by using the <a href="#action_restore">restore</a> action. + (in particular, this is how Diameter Hop-by-hop Id and End-To-End Id are handled.</li> </ul> </section> </section> @@ -1927,6 +1937,25 @@ </tr> <tr> <th> + <anchor id="action_open"/> + <strong><open></strong> + </th> + <th> </th> + <th>'open' action opens an instance of the transport channel. This can + be used for example to open a new TCP socket for each call. Don't + forget to use 'close' action at the end of the scenario.</th> + <th> </th> + </tr> + <tr> + <td> </td> + <td>args</td> + <td>Argument relevant to the transport channel used</td> + <td> + <code><![CDATA[<open args="mode=client;dest=10.10.11.157:8080"></open>]]></code> + </td> + </tr> + <tr> + <th> <anchor id="action_close"/> <strong><close></strong> </th> @@ -2099,7 +2128,7 @@ <tr> <td> </td> <td>name</td> - <td>Name of the call variable to increment</td> + <td>Name of the global counter to increment</td> <td>"HbH-counter" increment the value of HbH-counter by 1</td> </tr> <tr> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aa...@us...> - 2006-08-01 16:32:02
|
Revision: 45 Author: aajjan Date: 2006-08-01 09:31:33 -0700 (Tue, 01 Aug 2006) ViewCVS: http://svn.sourceforge.net/gull/?rev=45&view=rev Log Message: ----------- support UDP transport with retrans Modified Paths: -------------- seagull/trunk/src/exe-env/h248-env/scenario/client.xml seagull/trunk/src/generator-core/C_GeneratorConfig.cpp seagull/trunk/src/generator-core/C_GeneratorConfig.hpp seagull/trunk/src/generator-core/GeneratorDefaults.h seagull/trunk/src/generator-scenario/C_Scenario.cpp seagull/trunk/src/generator-scenario/C_Scenario.hpp seagull/trunk/src/generator-scenario/C_ScenarioControl.cpp seagull/trunk/src/generator-scenario/C_ScenarioControl.hpp seagull/trunk/src/generator-traffic/C_CallContext.cpp seagull/trunk/src/generator-traffic/C_CallContext.hpp seagull/trunk/src/generator-traffic/C_CallControl.cpp seagull/trunk/src/generator-traffic/C_CallControl.hpp seagull/trunk/src/library-trans-ip/C_Socket.cpp seagull/trunk/src/library-trans-ip/C_Socket.hpp seagull/trunk/src/library-trans-ip/C_TransIP.cpp seagull/trunk/src/library-trans-ip/C_TransIP.hpp seagull/trunk/src/library-trans-ip/S_IpAddr.cpp seagull/trunk/src/library-trans-ip/S_IpAddr.hpp seagull/trunk/src/protocol-text/C_ProtocolText.cpp Modified: seagull/trunk/src/exe-env/h248-env/scenario/client.xml =================================================================== --- seagull/trunk/src/exe-env/h248-env/scenario/client.xml 2006-07-13 12:23:27 UTC (rev 44) +++ seagull/trunk/src/exe-env/h248-env/scenario/client.xml 2006-08-01 16:31:33 UTC (rev 45) @@ -91,8 +91,8 @@ <close></close> --> </action> + </receive> - </receive> </traffic> </scenario> Modified: seagull/trunk/src/generator-core/C_GeneratorConfig.cpp =================================================================== --- seagull/trunk/src/generator-core/C_GeneratorConfig.cpp 2006-07-13 12:23:27 UTC (rev 44) +++ seagull/trunk/src/generator-core/C_GeneratorConfig.cpp 2006-08-01 16:31:33 UTC (rev 45) @@ -67,7 +67,9 @@ "files-no-timestamp", "call-timeout-behaviour-abort", "call-open-timeout-ms", - "execute-check-action" + "execute-check-action", + "max-retrans", + "retrans-enabled" }; static const char _check_level_char [] = { @@ -292,9 +294,11 @@ m_call_timeout_beh_abr = DEF_CALL_TIMEOUT_BEH_ABRT ; m_execute_check_action = DEF_EXECUTE_CHECK_ACTION ; + m_open_timeout = DEF_OPEN_TIMEOUT ; + m_max_retrans = DEF_MAX_RETRANS ; + m_retrans_enabled = DEF_RETRANS_ENABLED ; - m_open_timeout = DEF_OPEN_TIMEOUT ; m_call_rate_scale = DEF_CALL_RATE_SCALE ; @@ -407,7 +411,11 @@ return (m_execute_check_action) ; } +bool C_GeneratorConfig::get_retrans_enabled () { + return (m_retrans_enabled) ; +} + bool C_GeneratorConfig::set_value (T_GeneratorConfigOption P_opt, char *P_value) { bool L_ret = true ; @@ -659,6 +667,25 @@ break ; + case E_CFG_OPT_MAX_RETRANS : + m_max_retrans = strtoul_f(P_value, &L_end_str, 10) ; + if (L_end_str[0] != '\0') { // not a number + L_ret = false ; + } + break ; + + case E_CFG_OPT_RETRANS_ENABLED: + + if(strcmp(P_value, (char *)"true") == 0) { + m_retrans_enabled = true ; + } else { + if(strcmp(P_value, (char *)"false") != 0) { + L_ret = false ; + } + } + break ; + + default: L_ret = false ; break ; @@ -754,6 +781,11 @@ *P_val = m_open_timeout ; break ; + case E_CFG_OPT_MAX_RETRANS : + *P_val = m_max_retrans ; + break ; + + default: L_ret = false ; break ; Modified: seagull/trunk/src/generator-core/C_GeneratorConfig.hpp =================================================================== --- seagull/trunk/src/generator-core/C_GeneratorConfig.hpp 2006-07-13 12:23:27 UTC (rev 44) +++ seagull/trunk/src/generator-core/C_GeneratorConfig.hpp 2006-08-01 16:31:33 UTC (rev 45) @@ -100,6 +100,8 @@ E_CFG_OPT_CALL_TIMEOUT_BEH_ABR, E_CFG_OPT_OPEN_TIMEOUT, E_CFG_OPT_EXECUTE_CHECK_ACTION, + E_CFG_OPT_MAX_RETRANS, + E_CFG_OPT_RETRANS_ENABLED, E_CFG_OPT_Number } T_GeneratorConfigOption ; @@ -152,7 +154,9 @@ bool get_execute_check_action () ; + bool get_retrans_enabled () ; + T_pConfigValueList get_config_param_list() ; int analyze_protocol_stat(char *P_logProtocolStat, T_charPlist *P_protocol_list, @@ -214,6 +218,9 @@ unsigned long m_open_timeout ; + unsigned long m_max_retrans ; + bool m_retrans_enabled ; + unsigned long m_call_rate_scale ; T_pConfigValueList m_configValueList ; Modified: seagull/trunk/src/generator-core/GeneratorDefaults.h =================================================================== --- seagull/trunk/src/generator-core/GeneratorDefaults.h 2006-07-13 12:23:27 UTC (rev 44) +++ seagull/trunk/src/generator-core/GeneratorDefaults.h 2006-08-01 16:31:33 UTC (rev 45) @@ -59,7 +59,10 @@ #define DEF_CALL_TIMEOUT_BEH_ABRT false #define DEF_OPEN_TIMEOUT 0 #define DEF_EXECUTE_CHECK_ACTION true +#define DEF_MAX_RETRANS 0 +#define DEF_RETRANS_ENABLED false + #endif Modified: seagull/trunk/src/generator-scenario/C_Scenario.cpp =================================================================== --- seagull/trunk/src/generator-scenario/C_Scenario.cpp 2006-07-13 12:23:27 UTC (rev 44) +++ seagull/trunk/src/generator-scenario/C_Scenario.cpp 2006-08-01 16:31:33 UTC (rev 45) @@ -61,6 +61,7 @@ C_ExternalDataControl *P_external_data_control, T_exeCode P_exe_code, char *P_behaviour, + bool P_retrans_enabled, unsigned int P_check_mask, T_CheckBehaviour P_checkBehaviour ) { @@ -79,6 +80,8 @@ m_stats = NULL ; m_exe_end_code = P_exe_code ; + m_retrans_enabled = P_retrans_enabled ; + m_nb_retrans = 0 ; if (P_behaviour == NULL) { m_behaviour = E_BEHAVIOUR_SCEN_SUCCESS ; @@ -134,7 +137,10 @@ FREE_VAR(m_cmd_sequence[L_i].m_pre_act_table[L_j]. m_string_expr); - // free regexp + // free regexp ??? + DELETE_VAR(m_cmd_sequence[L_i].m_pre_act_table[L_j]. + m_regexp_data); + } } FREE_TABLE(m_cmd_sequence[L_i].m_pre_act_table); @@ -160,7 +166,10 @@ FREE_VAR(m_cmd_sequence[L_i].m_post_act_table[L_j]. m_string_expr); - // free regexp + // free regexp + DELETE_VAR(m_cmd_sequence[L_i].m_post_act_table[L_j]. + m_regexp_data); + } } FREE_TABLE(m_cmd_sequence[L_i].m_post_act_table); @@ -174,6 +183,8 @@ m_stat = NULL ; m_stats = NULL ; + m_nb_retrans = 0 ; + GEN_DEBUG(1, "C_Scenario::~C_Scenario() end"); } @@ -208,8 +219,66 @@ return (L_ret); } -T_exeCode C_Scenario::execute_cmd (T_pCallContext P_callCtxt, bool P_resume) { +T_exeCode C_Scenario::execute_cmd_retrans (int P_index, T_pCallContext P_callCtxt) { + T_exeCode L_exeCode = E_EXE_NOERROR ; + int L_cmdIdx ; + T_pCmd_scenario L_pCmd ; + + struct timezone L_timeZone ; + + C_MessageFrame *L_retransMsg = NULL ; + int L_channel_id = -1 ; + GEN_DEBUG(1, "C_Scenario::execute_cmd_retrans() start"); + + // retrieve command execution informations + L_cmdIdx = P_callCtxt->m_retrans_cmd_idx[P_index]; + L_pCmd = &m_cmd_sequence[L_cmdIdx] ; + + switch (L_pCmd->m_type) { + + case E_CMD_SCEN_SEND: { + + L_channel_id = L_pCmd -> m_channel_id ; + L_retransMsg = P_callCtxt->m_retrans_msg[P_index] ; + + if (m_channel_ctrl-> + send_to_channel(L_channel_id, P_callCtxt->m_channel_table, L_retransMsg)) { + + GEN_LOG_EVENT(LOG_LEVEL_TRAFFIC_ERR, + "Send error on call with session-id [" + << P_callCtxt->m_id_table[L_channel_id] << "]"); + + L_exeCode = E_EXE_ERROR_SEND ; + } else { + // to modify use a new counter + m_stat -> executeStatAction (C_GeneratorStats::E_SEND_MSG); + gettimeofday(&(P_callCtxt->m_retrans_time[P_index]), &L_timeZone) ; + (P_callCtxt->m_nb_retrans_done[P_index]) ++; + if (m_stats) { + m_stats->updateStats(L_cmdIdx,C_ScenarioStats::E_RETRANS,0); + // m_stats->updateStats(L_cmdIdx,C_ScenarioStats::E_MESSAGE,0); + + } + } + } + break ; + default: + GEN_DEBUG (1, "C_Scenario::execute_cmd() Incorrect type " + << L_pCmd->m_type + << " command execution"); + L_exeCode = E_EXE_ERROR; + break ; + } + + GEN_DEBUG(1, "C_Scenario::execute_cmd_retrans() end"); + return (L_exeCode); +} + + +T_exeCode C_Scenario::execute_cmd (T_pCallContext P_callCtxt, + bool P_resume) { + T_exeCode L_exeCode = E_EXE_NOERROR ; int L_cmdIdx ; T_pCmd_scenario L_pCmd ; @@ -270,8 +339,21 @@ if (m_stats) { m_stats->updateStats(L_cmdIdx,C_ScenarioStats::E_MESSAGE,0); } + + + if (m_retrans_enabled) { + if (L_pCmd->m_retrans_delay > 0) { + P_callCtxt->m_retrans_context.m_retrans_index = L_pCmd->m_retrans_index ; + P_callCtxt->m_retrans_context.m_retrans_delay_index = L_pCmd->m_retrans_delay_index ; + P_callCtxt->m_retrans_context.m_context = P_callCtxt ; + // std::cerr << "m_retrans_context.m_context =" << P_callCtxt << std::endl ; + P_callCtxt->m_retrans_time[L_pCmd->m_retrans_index] = P_callCtxt->m_current_time ; + P_callCtxt->m_retrans_cmd_idx[L_pCmd->m_retrans_index] = L_cmdIdx; + P_callCtxt->m_retrans_msg[L_pCmd->m_retrans_index] = L_sendMsg ; + P_callCtxt->m_retrans_to_do = true ; + } + } } - } if ((L_exeCode == E_EXE_NOERROR) && (L_exeCode != E_EXE_SUSPEND)) { @@ -285,10 +367,16 @@ } } + if (L_exeCode != E_EXE_SUSPEND) { - DELETE_VAR(L_sendMsg); + if ((m_retrans_enabled) && (L_pCmd->m_retrans_delay > 0)) { + L_sendMsg = NULL ; + } else { + DELETE_VAR(L_sendMsg); + } } + } break ; @@ -537,7 +625,9 @@ int P_channel_id, T_pC_MessageFrame P_msg, int P_nb_pre_action, - T_pCmdAction P_pre_act_table) { + T_pCmdAction P_pre_act_table, + unsigned long P_retrans_delay) { + GEN_DEBUG(1, "C_Scenario::add_cmd() start"); if (m_sequence_max < m_sequence_size) { @@ -548,6 +638,22 @@ L_cmd_sequence->m_message = P_msg ; L_cmd_sequence->m_channel_id = P_channel_id ; + + if (m_retrans_enabled == false) { + L_cmd_sequence->m_retrans_delay = 0 ; + L_cmd_sequence->m_retrans_index = 0 ; + L_cmd_sequence->m_retrans_delay_index = 0 ; + } else { + L_cmd_sequence->m_retrans_delay = P_retrans_delay ; + if (P_retrans_delay > 0) { + L_cmd_sequence->m_retrans_index = m_nb_retrans ; + m_nb_retrans++; + } else { + L_cmd_sequence->m_retrans_index = 0 ; + } + L_cmd_sequence->m_retrans_delay_index = 0 ; + } + if ((P_nb_pre_action != 0) && (P_pre_act_table != NULL)) { L_cmd_sequence->m_pre_action = P_nb_pre_action ; L_cmd_sequence->m_pre_act_table = P_pre_act_table ; @@ -580,6 +686,10 @@ L_cmd_sequence->m_post_action = 0 ; L_cmd_sequence->m_post_act_table = NULL ; + L_cmd_sequence->m_retrans_delay = 0 ; + L_cmd_sequence->m_retrans_index = 0 ; + L_cmd_sequence->m_retrans_delay_index = 0 ; + m_sequence_max++ ; GEN_DEBUG(1, "C_Scenario::add_cmd() end"); return (m_sequence_max); @@ -600,6 +710,10 @@ L_cmd_sequence->m_post_action = 0 ; L_cmd_sequence->m_post_act_table = NULL ; + L_cmd_sequence->m_retrans_delay = 0 ; + L_cmd_sequence->m_retrans_index = 0 ; + L_cmd_sequence->m_retrans_delay_index = 0 ; + m_sequence_max++ ; GEN_DEBUG(1, "C_Scenario::add_cmd() end"); return (m_sequence_max); @@ -1383,6 +1497,20 @@ return (L_exeCode); } +void C_Scenario::update_retrans_delay_cmd (size_t P_nb, unsigned long *P_table) { + int L_i ; + size_t L_j ; + for(L_i=0; L_i < m_sequence_max; L_i++) { + if (m_cmd_sequence[L_i].m_retrans_delay > 0 ) { + for (L_j = 0; L_j < P_nb; L_j++) { + if (m_cmd_sequence[L_i].m_retrans_delay == P_table[L_j]) { + m_cmd_sequence[L_i].m_retrans_delay_index = L_j ; + break ; + } + } + } + } +} void C_Scenario::update_wait_cmd (size_t P_nb, unsigned long *P_table) { int L_i ; @@ -1422,6 +1550,9 @@ m_string_expr); // free regexp???? + DELETE_VAR(m_cmd_sequence[P_cmd_index].m_post_act_table[L_j]. + m_regexp_data); + } } @@ -1446,3 +1577,12 @@ T_exeCode C_Scenario::get_exe_end_code() { return (m_exe_end_code) ; } + +int C_Scenario::get_nb_retrans () +{ + return (m_nb_retrans); +} + +T_pCmd_scenario C_Scenario::get_commands() { + return (m_cmd_sequence); +} Modified: seagull/trunk/src/generator-scenario/C_Scenario.hpp =================================================================== --- seagull/trunk/src/generator-scenario/C_Scenario.hpp 2006-07-13 12:23:27 UTC (rev 44) +++ seagull/trunk/src/generator-scenario/C_Scenario.hpp 2006-08-01 16:31:33 UTC (rev 45) @@ -170,6 +170,10 @@ T_pCmdAction m_pre_act_table ; T_pCmdAction m_post_act_table ; + unsigned long m_retrans_delay ; + unsigned long m_retrans_index ; + unsigned long m_retrans_delay_index ; + } T_cmd_scenario, *T_pCmd_scenario ; @@ -184,6 +188,7 @@ C_ExternalDataControl *P_external_data_control, T_exeCode P_exe_code, char *P_behaviour, + bool P_retrans_enabled, unsigned int P_check_mask = 0, T_CheckBehaviour P_checkBehaviour = E_CHECK_BEHAVIOUR_WARNING @@ -198,8 +203,10 @@ int P_channel_id, T_pC_MessageFrame P_msg, int P_nb_pre_action, - T_pCmdAction P_pre_act_table); + T_pCmdAction P_pre_act_table, + unsigned long P_retrans_delay); + // define post actions for the last command added size_t define_post_actions (int P_nb_post_action, T_pCmdAction P_post_act_table) ; @@ -212,9 +219,14 @@ bool check_msg_received (T_pReceiveMsgContext P_rcvMsg) ; - T_exeCode execute_cmd (T_pCallContext P_callCtxt, bool P_resume); + T_exeCode execute_cmd (T_pCallContext P_callCtxt, + bool P_resume); + T_CallContextState first_state(); + T_exeCode execute_cmd_retrans (int P_index, T_pCallContext P_callCtxt); + void update_retrans_delay_cmd (size_t P_nb, unsigned long *P_table) ; + void update_wait_cmd (size_t P_nb, unsigned long *P_table) ; friend iostream_output& operator<<(iostream_output&, C_Scenario&); @@ -228,6 +240,10 @@ T_exeCode get_exe_end_code() ; + int get_nb_retrans(); + + T_pCmd_scenario get_commands() ; + friend class C_ScenarioStats ; private: @@ -263,8 +279,17 @@ T_BehaviourScenario m_behaviour ; + bool m_retrans_enabled ; + int m_nb_retrans ; + } ; typedef C_Scenario *T_pC_Scenario ; #endif // _C_SCENARIO_H + + + + + + Modified: seagull/trunk/src/generator-scenario/C_ScenarioControl.cpp =================================================================== --- seagull/trunk/src/generator-scenario/C_ScenarioControl.cpp 2006-07-13 12:23:27 UTC (rev 44) +++ seagull/trunk/src/generator-scenario/C_ScenarioControl.cpp 2006-08-01 16:31:33 UTC (rev 45) @@ -60,6 +60,9 @@ m_log = NULL ; NEW_VAR(m_wait_values, T_waitValuesSet()); + m_retrans_enabled = false; + NEW_VAR(m_retrans_delay_values, T_retransDelayValuesSet()); + m_external_data = NULL ; m_external_data_used = false ; @@ -72,8 +75,6 @@ m_nb_counter = 0 ; m_counter_table = NULL ; m_action_check_abort = false ; - - } C_ScenarioControl::~C_ScenarioControl() { @@ -121,6 +122,11 @@ } DELETE_VAR(m_wait_values); + if (!m_retrans_delay_values->empty()) { + m_retrans_delay_values->erase(m_retrans_delay_values->begin(), m_retrans_delay_values->end()); + } + DELETE_VAR(m_retrans_delay_values); + if (m_nb_counter != 0){ for (L_i = 0; L_i < m_nb_counter; L_i++) { FREE_VAR(m_counter_table[L_i]); @@ -322,6 +328,10 @@ GEN_DEBUG(1, "C_ScenarioControl::add_scenario() start"); (*P_nbOpen) = 0 ; + if (m_config != NULL) { + m_retrans_enabled = m_config -> get_retrans_enabled(); + } + L_behaviour_scen = get_behaviour_scenario(P_scen) ; if (L_behaviour_scen != NULL) { if ((strcmp(L_behaviour_scen, (char*)"failed") != 0) && @@ -359,6 +369,7 @@ m_external_data, E_EXE_TRAFFIC_END, L_behaviour_scen, + m_retrans_enabled, L_check_level, L_check_behave )); @@ -369,7 +380,10 @@ case E_SCENARIO_INIT: NEW_VAR(m_init_scen, C_Scenario(this, m_channel_ctrl, - m_external_data,E_EXE_INIT_END,L_behaviour_scen)) ; + m_external_data, + E_EXE_INIT_END, + L_behaviour_scen, + m_retrans_enabled)) ; L_current_scen = m_init_scen ; m_nb_scenario++; @@ -381,7 +395,11 @@ GEN_FATAL(E_GEN_FATAL_ERROR, "Maximum number of default scenario reached"); } NEW_VAR(m_default_scen[m_nb_default], - C_Scenario(this, m_channel_ctrl, m_external_data,E_EXE_DEFAULT_END,L_behaviour_scen)); + C_Scenario(this, m_channel_ctrl, + m_external_data, + E_EXE_DEFAULT_END, + L_behaviour_scen, + m_retrans_enabled)); L_current_scen = m_default_scen[m_nb_default] ; GEN_DEBUG(1, "C_ScenarioControl::add_scenario() E_SCENARIO_DEFAULT "); m_nb_default ++ ; @@ -390,7 +408,11 @@ case E_SCENARIO_ABORT: NEW_VAR(m_abort_scen, - C_Scenario(this, m_channel_ctrl, m_external_data,E_EXE_ABORT_END,L_behaviour_scen)); + C_Scenario(this, m_channel_ctrl, + m_external_data, + E_EXE_ABORT_END, + L_behaviour_scen, + m_retrans_enabled)); L_current_scen = m_abort_scen ; m_nb_scenario++; GEN_DEBUG(1, "C_ScenarioControl::add_scenario() E_SCENARIO_ABORT "); @@ -549,6 +571,9 @@ int L_msg_id = -1 ; + char *L_value_retrans = NULL ; + unsigned long L_retrans_delay = 0 ; + char *L_end_str ; GEN_DEBUG(1, "C_ScenarioControl::add_command() start"); @@ -605,9 +630,19 @@ break ; } - L_protocol = m_channel_ctrl->get_channel_protocol(L_channel_id) ; + L_value_retrans = P_data->find_value((char*)"retrans"); + if (L_value_retrans != NULL) { + L_retrans_delay = strtoul_f (L_value_retrans, &L_end_str, 10); + if (L_end_str[0] != '\0') { + GEN_ERROR(E_GEN_FATAL_ERROR, "bad format, [" + << L_value_retrans << "] not a number"); + L_ret = -1 ; + break; + } + } + L_subList = P_data -> get_sub_data() ; for(L_listIt = L_subList->begin() ; L_listIt != L_subList->end() ; @@ -648,16 +683,20 @@ // finally add message on the scenario sequence if ((L_msg != NULL) && (L_channel_id != -1)) { - (void) P_scen ->add_cmd (P_cmd_type, L_channel_id, L_msg, 0, - NULL); + NULL, + L_retrans_delay); L_cmd_inserted = true ; + if (L_retrans_delay > 0 ) { + m_retrans_delay_values->insert(T_retransDelayValuesSet::value_type(L_retrans_delay)); + } + if (*P_trafficType == E_TRAFFIC_UNKNOWN) { switch (P_cmd_type) { case E_CMD_SCEN_RECEIVE: @@ -2268,6 +2307,35 @@ return (m_wait_values); } + +T_pRetransDelayValuesSet C_ScenarioControl::get_retrans_delay_values () { + return (m_retrans_delay_values); +} + +void C_ScenarioControl::update_retrans_delay_cmd (size_t P_nb, + unsigned long *P_table) { + + int L_i ; + if (m_abort_scen != NULL) { + m_abort_scen -> update_retrans_delay_cmd (P_nb, P_table); + } + if (m_traffic_scen != NULL) { + m_traffic_scen -> update_retrans_delay_cmd (P_nb, P_table); + } + if (m_save_traffic_scen != NULL) { + m_save_traffic_scen -> update_retrans_delay_cmd(P_nb, P_table); + } + if (m_init_scen != NULL) { + m_init_scen -> update_retrans_delay_cmd (P_nb, P_table); + } + if (m_nb_default != 0) { + for(L_i=0; L_i < m_nb_default; L_i++) { + m_default_scen[L_i] -> update_retrans_delay_cmd (P_nb, P_table); + } + } +} + + void C_ScenarioControl::update_wait_cmd (size_t P_nb, unsigned long *P_table) { @@ -2690,7 +2758,7 @@ int C_ScenarioControl::get_nb_scenario () { - return m_nb_scenario; + return (m_nb_scenario); } @@ -2699,5 +2767,36 @@ return (m_nb_default); } +int C_ScenarioControl::get_max_nb_retrans () +{ + int L_i ; + int L_res = 0 ; + int L_max = 0 ; + if (m_abort_scen != NULL) { + L_res = m_abort_scen->get_nb_retrans (); + } + if (L_res > L_max) { L_max = L_res ; } + if (m_traffic_scen != NULL) { + L_res = m_traffic_scen->get_nb_retrans(); + } + if (L_res > L_max) { L_max = L_res ; } + if (m_save_traffic_scen != NULL) { + L_res = m_save_traffic_scen->get_nb_retrans(); + } + if (L_res > L_max) { L_max = L_res ; } + if (m_init_scen != NULL) { + L_res = m_init_scen->get_nb_retrans () ; + } + if (L_res > L_max) { L_max = L_res ; } + if (m_nb_default != 0) { + for(L_i=0; L_i < m_nb_default ; L_i++) { + L_res = m_default_scen[L_i]->get_nb_retrans(); + if (L_res > L_max) { L_max = L_res ; } + } + } + return (L_max); +} + + Modified: seagull/trunk/src/generator-scenario/C_ScenarioControl.hpp =================================================================== --- seagull/trunk/src/generator-scenario/C_ScenarioControl.hpp 2006-07-13 12:23:27 UTC (rev 44) +++ seagull/trunk/src/generator-scenario/C_ScenarioControl.hpp 2006-08-01 16:31:33 UTC (rev 45) @@ -47,6 +47,7 @@ } T_CounterDef, *T_pCounterDef ; typedef set_t<unsigned long> T_waitValuesSet, *T_pWaitValuesSet ; +typedef set_t<unsigned long> T_retransDelayValuesSet, *T_pRetransDelayValuesSet ; class C_ReadControl ; // prevent from circular include @@ -96,8 +97,11 @@ int memory_used () ; T_pWaitValuesSet get_wait_values () ; + T_pRetransDelayValuesSet get_retrans_delay_values () ; void update_wait_cmd (size_t P_nb, unsigned long *P_table); + void update_retrans_delay_cmd (size_t P_nb, unsigned long *P_table); + friend iostream_output& operator<<(iostream_output&, C_ScenarioControl&); bool set_counters (C_XmlData *P_xml_counter_def); @@ -109,6 +113,7 @@ int get_nb_scenario (); int get_nb_default_scenario () ; + int get_max_nb_retrans () ; private: @@ -157,8 +162,11 @@ bool m_external_data_used ; // wait values - T_pWaitValuesSet m_wait_values ; + T_pWaitValuesSet m_wait_values ; + bool m_retrans_enabled ; + T_pRetransDelayValuesSet m_retrans_delay_values ; + // generator model C_ProtocolControl *m_protocol_ctrl ; C_TransportControl *m_transport_ctrl ; @@ -236,3 +244,4 @@ + Modified: seagull/trunk/src/generator-traffic/C_CallContext.cpp =================================================================== --- seagull/trunk/src/generator-traffic/C_CallContext.cpp 2006-07-13 12:23:27 UTC (rev 44) +++ seagull/trunk/src/generator-traffic/C_CallContext.cpp 2006-08-01 16:31:33 UTC (rev 45) @@ -77,7 +77,7 @@ } -C_CallContext::C_CallContext(int P_id, int P_nbChannel, int P_mem) : C_ContextFrame() { +C_CallContext::C_CallContext(int P_id, int P_nbChannel, int P_mem, int P_nbRetrans) : C_ContextFrame() { int L_i ; m_internal_call_id = P_id ; m_state = E_CTXT_ERROR ; @@ -119,8 +119,35 @@ m_id_table[L_i].m_value.m_val_number = 0 ; } } - + m_nb_retrans = P_nbRetrans ; + if (P_nbRetrans) { + ALLOC_TABLE(m_retrans_msg, C_MessageFrame**, sizeof(C_MessageFrame*), P_nbRetrans); + ALLOC_TABLE(m_retrans_time, struct timeval*, sizeof(struct timeval), P_nbRetrans); + ALLOC_TABLE(m_nb_retrans_done, int*, sizeof(int), P_nbRetrans); + ALLOC_TABLE(m_retrans_cmd_idx, int*, sizeof(int), P_nbRetrans); + + ALLOC_TABLE(m_retrans_it, T_retransContextList::iterator*, sizeof(T_retransContextList::iterator), P_nbRetrans); + ALLOC_TABLE(m_retrans_it_available, bool*, sizeof(bool), P_nbRetrans); + + + for(L_i = 0 ; L_i < P_nbRetrans; L_i++) { + m_nb_retrans_done[L_i] = 0 ; + m_retrans_cmd_idx[L_i] = 0 ; + m_retrans_msg[L_i] = NULL ; + m_retrans_it_available[L_i] = false ; + } + } else { + m_retrans_msg = NULL ; + m_retrans_time = NULL ; + m_nb_retrans_done = NULL ; + m_retrans_cmd_idx = NULL ; + m_retrans_it = NULL ; + m_retrans_it_available = NULL ; + } + + m_retrans_to_do = false ; + } C_CallContext::~C_CallContext() { @@ -145,6 +172,16 @@ FREE_TABLE(m_channel_table); FREE_TABLE(m_id_table); + + clean_retrans(); + + FREE_TABLE(m_retrans_time); + FREE_TABLE(m_nb_retrans_done); + FREE_TABLE(m_retrans_cmd_idx); + + FREE_TABLE(m_retrans_it); + FREE_TABLE(m_retrans_it_available); + } void C_CallContext::init() { @@ -156,12 +193,15 @@ for (L_i = 0 ; L_i < m_nb_mem; L_i++) { reset_memory(L_i) ; } + + clean_retrans () ; } void C_CallContext::reset() { m_state = E_CTXT_AVAILABLE ; m_current_cmd_idx = 0 ; m_created_call = false ; + clean_retrans () ; } T_CallContextState C_CallContext::get_state() { @@ -202,7 +242,7 @@ reset_id(); m_created_call = false ; m_current_time = *P_time ; - + clean_retrans () ; return (m_state); } @@ -214,7 +254,7 @@ m_current_cmd_idx = 0 ; reset_id(); m_created_call = false ; - + clean_retrans () ; return (m_state); } @@ -225,7 +265,7 @@ m_channel_received = P_rcvCtxt->m_channel ; m_current_cmd_idx = 0 ; // m_id to be tested - + clean_retrans () ; m_created_call = false ; m_current_time = P_rcvCtxt->m_time ; @@ -267,8 +307,25 @@ m_scenario = P_scen ; m_state = P_scen->first_state(); m_current_cmd_idx = 0 ; + m_retrans_to_do = false ; } void C_CallContext::clean_suspended () { DELETE_VAR(m_suspend_msg) ; } + +void C_CallContext::clean_retrans () { + int L_i = 0 ; + for (L_i = 0 ; L_i < m_nb_retrans; L_i++) { + m_nb_retrans_done[L_i] = 0 ; + m_retrans_cmd_idx[L_i] = 0 ; + DELETE_VAR(m_retrans_msg[L_i]); + m_retrans_it_available[L_i] = false ; + } + m_retrans_to_do = false ; +} + + + + + Modified: seagull/trunk/src/generator-traffic/C_CallContext.hpp =================================================================== --- seagull/trunk/src/generator-traffic/C_CallContext.hpp 2006-07-13 12:23:27 UTC (rev 44) +++ seagull/trunk/src/generator-traffic/C_CallContext.hpp 2006-08-01 16:31:33 UTC (rev 45) @@ -42,6 +42,23 @@ class C_CallContext : public C_ContextFrame { public: + typedef struct _retrans_context { + C_CallContext * m_context ; + int m_retrans_index ; // id table internal + int m_retrans_delay_index ; // delay value index + } T_retransContext, *T_pRetransContext ; + + typedef list_t<T_retransContext> + T_retransContextList, *T_pRetransContextList; + + typedef struct _retrans_data { + T_retransContextList::iterator m_iterator ; + int m_index ; + } T_retransData, *T_pRetransData ; + + typedef list_t <T_retransData> T_retransDataList, *T_pRetransDataList ; + + // TEMPORARY bool m_created_call ; // TEMPORARY @@ -51,7 +68,19 @@ int m_suspend_id ; C_MessageFrame *m_suspend_msg ; int m_channel_id ; + + C_MessageFrame **m_retrans_msg ; + struct timeval *m_retrans_time ; + int *m_nb_retrans_done ; + int *m_retrans_cmd_idx ; + int m_nb_retrans ; + T_retransContextList::iterator *m_retrans_it; + bool *m_retrans_it_available ; + + T_retransContext m_retrans_context ; + bool m_retrans_to_do ; + T_pValueData m_id_table ; int *m_channel_table ; // response channel table @@ -60,7 +89,7 @@ int m_channel_received ; - C_CallContext(int P_id, int P_nbChannel, int P_mem=0); + C_CallContext(int P_id, int P_nbChannel, int P_mem=0, int P_nbRetrans=0); ~C_CallContext() ; T_pValueData @@ -98,6 +127,7 @@ int get_internal_id (); void clean_suspended () ; + void clean_retrans () ; private: Modified: seagull/trunk/src/generator-traffic/C_CallControl.cpp =================================================================== --- seagull/trunk/src/generator-traffic/C_CallControl.cpp 2006-07-13 12:23:27 UTC (rev 44) +++ seagull/trunk/src/generator-traffic/C_CallControl.cpp 2006-08-01 16:31:33 UTC (rev 45) @@ -58,6 +58,11 @@ m_call_timeout_abort = false ; m_open_timeout_ms = 0 ; + m_max_retrans = 0 ; + m_retrans_enabled = false ; + m_retrans_context_list = NULL ; + m_retrans_delay_values = NULL ; + m_nb_retrans_delay_values = 0 ; NEW_VAR(m_call_suspended, T_SuspendMap()); @@ -106,6 +111,24 @@ m_call_timeout_ms = 0 ; m_open_timeout_ms = 0 ; + m_max_retrans = 0 ; + m_retrans_enabled = false ; + + if (m_nb_retrans_delay_values > 0 ) { + // std::cerr << "m_nb_retrans_delay_values " << m_nb_retrans_delay_values << std::endl ; + for(L_i=0; L_i < (int)m_nb_retrans_delay_values; L_i++) { + if (!m_retrans_context_list[L_i]->empty()) { + m_retrans_context_list[L_i]->erase(m_retrans_context_list[L_i]->begin(), + m_retrans_context_list[L_i]->end()); + } + DELETE_VAR(m_retrans_context_list[L_i]); + } + FREE_TABLE(m_retrans_context_list); + } + + FREE_TABLE(m_retrans_delay_values); + m_nb_retrans_delay_values = 0; + m_call_timeout_abort = false ; for(L_i=0; L_i < m_nb_channel; L_i++) { @@ -382,6 +405,11 @@ GEN_DEBUG(1, "C_CallControl::messageReceivedControl() "<< "scenario in execution for this call"); + if (m_retrans_enabled) { + stopRetrans(L_pCallContext); + } + + if (L_pCallContext -> msg_received (&L_rcvCtxt) == false) { // scenario in execution but not in receive state GEN_LOG_EVENT_CONDITIONAL (LOG_LEVEL_TRAFFIC_ERR, @@ -494,19 +522,206 @@ GEN_DEBUG (1, "C_CallControl::endTrafficControl() end"); } +void C_CallControl::insert_retrans_list(T_pCallContext P_callContext) { + + int L_index, L_retrans_index ; + + GEN_DEBUG (1, "C_CallControl::insert_retrans_list() start"); + + L_index = P_callContext->m_retrans_context.m_retrans_delay_index ; + L_retrans_index = P_callContext->m_retrans_context.m_retrans_index ; + + m_retrans_context_list[L_index]->push_back(P_callContext->m_retrans_context); + P_callContext->m_retrans_it[L_retrans_index] = m_retrans_context_list[L_index]->end() ; + P_callContext->m_retrans_it[L_retrans_index] -- ; + P_callContext->m_retrans_it_available[L_retrans_index] = true ; + + GEN_DEBUG (1, "C_CallControl::insert_retrans_list() end"); +} + +void C_CallControl::stopRetrans (T_pCallContext P_callContext) { + + int L_i, L_cmdIdx ; + int L_retrans_delay_index ; + + + GEN_DEBUG (1, "C_CallControl::stopRetrans() start"); + + for (L_i = 0 ; L_i < P_callContext->m_nb_retrans; L_i++) { + if (P_callContext->m_retrans_it_available[L_i] == true) { + L_cmdIdx = P_callContext->m_retrans_cmd_idx[L_i]; + L_retrans_delay_index = + (P_callContext->get_scenario()->get_commands())[L_cmdIdx].m_retrans_delay_index ; + m_retrans_context_list[L_retrans_delay_index]->erase(P_callContext->m_retrans_it[L_i]) ; + P_callContext->m_retrans_it_available[L_i] = false ; + } + } + + GEN_DEBUG (1, "C_CallControl::stopRetrans() end"); +} + + +void C_CallControl::messageRetransControl () { + + GEN_DEBUG (1, "C_CallControl::messageRetransControl() start"); + + int L_i ; + int L_retrans_idx ; + int L_nbRetrans, L_nbRetransToDo ; + struct timeval L_current_time ; + C_CallContext *L_pCallContext ; + C_CallContext::T_retransContext L_retrans_ctxt ; + C_CallContext::T_retransContextList::iterator L_it; + + list_t<C_CallContext*> L_stopRetransList ; + list_t<C_CallContext*>::iterator L_stopRetransListIt ; + + list_t<C_CallContext::T_retransContextList::iterator> L_deleteList ; + list_t<C_CallContext::T_retransContextList::iterator>::iterator L_deleteListIt ; + + C_CallContext::T_retransContextList L_doRetransList ; + C_CallContext::T_retransContextList::iterator L_doRetransListIt ; + + bool L_first_get = false ; + + L_stopRetransList.clear(); + L_doRetransList.clear(); + L_deleteList.clear() ; + + for (L_i=0; L_i < (int)m_nb_retrans_delay_values; L_i++) { + if (!(m_retrans_context_list[L_i]->empty())) { + L_nbRetrans = m_retrans_context_list[L_i]->size(); + L_nbRetransToDo = (L_nbRetrans > m_max_send_loop) + ? m_max_send_loop : L_nbRetrans ; + + GEN_DEBUG (1, "C_CallControl::messageRetransControl() L_nbRetrans " << L_nbRetrans); + if (L_nbRetrans) { + if (L_first_get == false) { + GET_TIME(&L_current_time); + L_first_get = true ; + } + } + + for (L_it = m_retrans_context_list[L_i]->begin() ; + L_it != m_retrans_context_list[L_i]->end() ; + L_it++) { + + L_retrans_ctxt = *L_it; + L_pCallContext = L_retrans_ctxt.m_context ; + L_retrans_idx = L_retrans_ctxt.m_retrans_index ; + + if ( ms_difftime(&L_current_time, &L_pCallContext->m_retrans_time[L_retrans_idx]) + < (long) m_retrans_delay_values[L_i] ) { + break ; + } else { // retrans to do + if (L_pCallContext->m_nb_retrans_done[L_retrans_idx] <= (int)m_max_retrans) { + // std::cerr << "do retrans = " << L_pCallContext << std::endl ; + execute_scenario_cmd_retrans (L_retrans_idx, L_pCallContext) ; + L_doRetransList.push_back(L_retrans_ctxt); + L_deleteList.push_back(L_it); + } else { + // std::cerr << "stop (max retrans) = " << L_pCallContext << std::endl ; + L_stopRetransList.push_back(L_pCallContext) ; + } + } + + L_nbRetransToDo -- ; + if (L_nbRetransToDo == 0) break ; + + } + + if (!L_deleteList.empty()) { + for (L_deleteListIt = L_deleteList.begin(); + L_deleteListIt != L_deleteList.end(); + L_deleteListIt ++) { + m_retrans_context_list[L_i]->erase(*L_deleteListIt); + } + } + } + + if (!L_stopRetransList.empty()) { + for (L_stopRetransListIt = L_stopRetransList.begin(); + L_stopRetransListIt != L_stopRetransList.end(); + L_stopRetransListIt++) { + L_pCallContext = *L_stopRetransListIt ; + stopRetrans(L_pCallContext); + makeCallContextAvailable(&L_pCallContext) ; + m_stat -> executeStatAction (C_GeneratorStats::E_CALL_FAILED) ; + } + L_stopRetransList.erase(L_stopRetransList.begin(), + L_stopRetransList.end()); + } + + if (!L_doRetransList.empty()) { + for (L_doRetransListIt = L_doRetransList.begin(); + L_doRetransListIt != L_doRetransList.end(); + L_doRetransListIt++) { + L_retrans_ctxt = *L_doRetransListIt; + m_retrans_context_list[L_i]->push_back(L_retrans_ctxt); + L_pCallContext = L_retrans_ctxt.m_context ; + L_pCallContext->m_retrans_it[L_retrans_ctxt.m_retrans_index] = + m_retrans_context_list[L_i]->end(); + (L_pCallContext->m_retrans_it[L_retrans_ctxt.m_retrans_index])--; + } + L_doRetransList.erase(L_doRetransList.begin(), + L_doRetransList.end()); + } + } + + GEN_DEBUG (1, "C_CallControl::messageRetranstControl() end"); +} + +T_exeCode C_CallControl::execute_scenario_cmd_retrans (int P_index, T_pCallContext P_callContext) { + T_pC_Scenario L_scenario ; + T_exeCode L_exeResult ; + T_pCallContext L_callContext = P_callContext ; + + GEN_DEBUG (1, "C_CallControl::execute_scenario_cmd_retrans() start"); + + L_scenario = L_callContext->get_scenario() ; + // ctrl to max_retrans and delay + L_exeResult = L_scenario->execute_cmd_retrans (P_index, L_callContext); + + switch (L_exeResult) { + case E_EXE_NOERROR: + break ; + case E_EXE_ERROR_SEND: + makeCallContextAvailable(&L_callContext) ; + m_stat -> executeStatAction (C_GeneratorStats::E_CALL_FAILED) ; + m_stat -> executeStatAction (C_GeneratorStats::E_FAILED_CANNOT_SEND_MSG); + m_stat -> err_msg ((char*) "Send error"); + break ; + default: + m_stat -> executeStatAction (C_GeneratorStats::E_CALL_FAILED) ; + makeCallContextAvailable(&L_callContext) ; + break ; + } + GEN_DEBUG (1, "C_CallControl::execute_scenario_cmd_retrans() end"); + return (L_exeResult); +} + void C_CallControl::messageSendControl() { int L_nbSend, L_nbSendToDo ; T_pCallContext L_pCallContext ; + GEN_DEBUG (1, "C_CallControl::messageSendControl() start"); L_nbSend = m_call_ctxt_mlist -> getNbElements (E_CTXT_SEND) ; L_nbSendToDo = (L_nbSend > m_max_send_loop) ? m_max_send_loop : L_nbSend ; while (L_nbSendToDo > 0) { - L_pCallContext - = m_call_ctxt_table[m_call_ctxt_mlist->getFirst(E_CTXT_SEND)]; + L_pCallContext + = m_call_ctxt_table[m_call_ctxt_mlist->getFirst(E_CTXT_SEND)]; execute_scenario_cmd (L_pCallContext); + + if (m_retrans_enabled) { + if ((L_pCallContext->m_retrans_to_do) == true) { + insert_retrans_list(L_pCallContext) ; + L_pCallContext->m_retrans_to_do = false ; + } + } + L_nbSendToDo -- ; } GEN_DEBUG (1, "C_CallControl::messageSendControl() end"); @@ -633,6 +848,10 @@ messageOpenTimeoutControl(); } + if (m_retrans_enabled) { + messageRetransControl () ; + } + messageReceivedControl () ; if (m_nb_wait_values) { waitControl() ; } eventControl () ; @@ -647,7 +866,7 @@ T_GeneratorError L_error = E_GEN_NO_ERROR ; int L_i ; - int L_memory_used, L_channel_used ; + int L_memory_used, L_channel_used, L_nb_retrans ; C_CallContext *L_pCallContext ; unsigned long L_config_value ; @@ -655,7 +874,9 @@ T_pCallContext L_call_ctxt ; T_TrafficType L_type ; - T_pWaitValuesSet L_wait_values ; + T_pWaitValuesSet L_wait_values ; + + T_pRetransDelayValuesSet L_retrans_delay_values ; GEN_DEBUG (1, "C_CallControl::InitProcedure() start"); @@ -698,9 +919,16 @@ "Internal open timeout (ms) not specified"); } - m_call_timeout_abort = m_config -> get_call_timeout_beh_abr (); + if (!m_config->get_value(E_CFG_OPT_MAX_RETRANS, + &m_max_retrans)) { + GEN_FATAL(E_GEN_FATAL_ERROR, + "Internal max retrans is not specified"); + } + + m_retrans_enabled = m_config -> get_retrans_enabled(); + // wait values management L_wait_values = m_scenario_control->get_wait_values() ; m_nb_wait_values = L_wait_values -> size() ; @@ -738,11 +966,17 @@ L_memory_used = m_scenario_control->memory_used() ; L_channel_used = m_channel_control->nb_channel() ; + L_nb_retrans = m_scenario_control->get_max_nb_retrans(); + if (m_retrans_enabled == false) { + L_nb_retrans = 0 ; + } + for(L_i = 0; L_i < (int)m_call_ctxt_table_size; L_i++) { NEW_VAR(L_pCallContext, C_CallContext(L_i, L_channel_used, - L_memory_used)); + L_memory_used, + L_nb_retrans)); m_call_ctxt_table[L_i] = L_pCallContext ; m_call_ctxt_mlist->setElementPayload((long)L_i, L_pCallContext); } @@ -750,11 +984,47 @@ // test if an init scenario is defined L_scenario = m_scenario_control->init_scenario_defined(&L_type) ; + if (m_retrans_enabled) { + L_retrans_delay_values = m_scenario_control->get_retrans_delay_values() ; + m_nb_retrans_delay_values = L_retrans_delay_values -> size() ; + + // std::cerr << "m_nb_retrans_delay_values=" << m_nb_retrans_delay_values << std::endl ; + + if (m_nb_retrans_delay_values != 0) { + + T_retransDelayValuesSet::iterator L_retransDelayIt ; + int L_i ; + + ALLOC_TABLE(m_retrans_delay_values, + unsigned long*, + sizeof(unsigned long), + m_nb_retrans_delay_values); + L_i = 0 ; + for (L_retransDelayIt = L_retrans_delay_values->begin(); + L_retransDelayIt != L_retrans_delay_values->end() ; + L_retransDelayIt++) { + m_retrans_delay_values[L_i] = *L_retransDelayIt ; + L_i ++ ; + } + + ALLOC_TABLE(m_retrans_context_list, C_CallContext::T_pRetransContextList*, sizeof(C_CallContext::T_pRetransContextList), m_nb_retrans_delay_values); + for (L_i = 0 ; L_i < (int)m_nb_retrans_delay_values; L_i++) { + NEW_VAR(m_retrans_context_list[L_i], + C_CallContext::T_retransContextList()); + } + + + m_scenario_control -> update_retrans_delay_cmd (m_nb_retrans_delay_values, + m_retrans_delay_values); + } + + } + m_stat->init(); if (L_scenario == NULL) { GEN_WARNING("no init scenario defined"); } else { - + switch(L_type) { case E_TRAFFIC_CLIENT: @@ -1115,6 +1385,10 @@ GEN_LOG_EVENT(LOG_LEVEL_TRAFFIC_ERR, "Call timeout detected"); + if (m_retrans_enabled) { + stopRetrans(L_pCallContext); + } + // Timeout for scenario stats if ((L_stats = (L_pCallContext->get_scenario())->get_stats()) != NULL) { L_stats -> updateStats(L_pCallContext->get_current_cmd_idx(), @@ -1132,10 +1406,12 @@ ->moveToList(L_pCallContext->get_state(), L_pCallContext->get_internal_id()); } else { + m_stat->executeStatAction(C_GeneratorStats::E_CALL_FAILED); makeCallContextAvailable(&L_pCallContext); } } else { + m_stat->executeStatAction(C_GeneratorStats::E_CALL_FAILED); makeCallContextAvailable (&L_pCallContext) ; } Modified: seagull/trunk/src/generator-traffic/C_CallControl.hpp =================================================================== --- seagull/trunk/src/generator-traffic/C_CallControl.hpp 2006-07-13 12:23:27 UTC (rev 44) +++ seagull/trunk/src/generator-traffic/C_CallControl.hpp 2006-08-01 16:31:33 UTC (rev 45) @@ -38,6 +38,7 @@ #include "list_t.hpp" #include "map_t.hpp" + #include "gen_operation_t.hpp" #include "ProtocolData.hpp" @@ -60,7 +61,7 @@ T_pCallContext> T_CallMap, *T_pCallMap ; typedef map_t<int, T_pCallContext> T_SuspendMap, *T_pSuspendMap ; - + C_CallControl(C_GeneratorConfig *P_config, T_pC_ScenarioControl P_scenControl, C_ChannelControl *P_channel_ctrl); @@ -131,6 +132,13 @@ unsigned long m_open_timeout_ms ; + unsigned long m_max_retrans ; + unsigned long m_retrans_enabled ; + C_CallContext::T_pRetransContextList *m_retrans_context_list ; + + unsigned long *m_retrans_delay_values ; + size_t m_nb_retrans_delay_values ; + // TaskController related methods T_GeneratorError TaskProcedure(); T_GeneratorError InitProcedure(); @@ -152,6 +160,12 @@ T_exeCode execute_scenario_cmd (T_pCallContext P_callContext, bool P_resume=false) ; + void messageRetransControl () ; + T_exeCode execute_scenario_cmd_retrans (int P_index, T_pCallContext P_callContext); + void insert_retrans_list(T_pCallContext P_callContext) ; + + void stopRetrans (T_pCallContext P_callContext) ; + void makeCallContextAvailable (T_pCallContext *P_pCallCxt) ; T_pCallContext makeCallContextUnavailable (C_Scenario *P_scen); T_pCallContext retrieve_call_context (int P_channel_id, T_pValueData P_id); Modified: seagull/trunk/src/library-trans-ip/C_Socket.cpp =================================================================== --- seagull/trunk/src/library-trans-ip/C_Socket.cpp 2006-07-13 12:23:27 UTC (rev 44) +++ seagull/trunk/src/library-trans-ip/C_Socket.cpp 2006-08-01 16:31:33 UTC (rev 45) @@ -212,6 +212,12 @@ &L_linger, sizeof (L_linger)) < 0) { SOCKET_ERROR(1, "Unable to set SO_LINGER option"); } + + // non blocking mode (for connect only ?) + L_flags = call_fcntl(m_socket_id, F_GETFL , NULL); + L_flags |= O_NONBLOCK; + call_fcntl(m_socket_id, F_SETFL , L_flags); + } // size of recv buf @@ -229,9 +235,9 @@ } // non blocking mode (for connect only ?) - L_flags = call_fcntl(m_socket_id, F_GETFL , NULL); - L_flags |= O_NONBLOCK; - call_fcntl(m_socket_id, F_SETFL , L_flags); + // L_flags = call_fcntl(m_socket_id, F_GETFL , NULL); + // L_flags |= O_NONBLOCK; + // call_fcntl(m_socket_id, F_SETFL , L_flags); } @@ -259,6 +265,14 @@ return (0); } +T_SockAddrStorage* C_SocketListen::get_remote_sockaddr_ptr() { + return (NULL); +} + +tool_socklen_t* C_SocketListen::get_len_remote_sockaddr_ptr() { + return (NULL); +} + int C_SocketListen::_open (size_t P_buffer_size, C_ProtocolBinaryFrame *P_protocol) { @@ -271,7 +285,7 @@ P_protocol) ; if (L_rc == 0) { - + set_properties() ; /* bind the socket to the newly formed address */ @@ -319,20 +333,20 @@ m_read_buf_size, m_segm_buf_size)); L_ret = L_socket->_open(m_buffer_size, m_protocol) ; if (L_ret == 0) { - SOCKET_DEBUG(0, "C_SocketWithData::process_fd_set() CNX"); + SOCKET_DEBUG(0, "C_SocketListen::process_fd_set() CNX"); P_event->m_type = C_TransportEvent::E_TRANS_CONNECTION ; P_event->m_channel_id = m_channel_id ; P_event->m_id = L_socket->get_id() ; } else { - SOCKET_DEBUG(0, "C_SocketWithData::process_fd_set() NOEVENT open failed"); + SOCKET_DEBUG(0, "C_SocketListen::process_fd_set() NOEVENT open failed"); DELETE_VAR(L_socket); P_event->m_type = C_TransportEvent::E_TRANS_NO_EVENT ; } } else { - SOCKET_DEBUG(0, "C_SocketWithData::process_fd_set() NOEVENT"); + SOCKET_DEBUG(0, "C_SocketListen::process_fd_set() NOEVENT"); P_event->m_type = C_TransportEvent::E_TRANS_NO_EVENT ; } - + return (L_socket); } @@ -340,11 +354,9 @@ return(&(m_source_addr_info->m_addr)); } -// UDP T_SocketType C_SocketListen::get_trans_type() { return(m_type); } -// UDP C_SocketServer::C_SocketServer(C_SocketListen *P_listen, int P_channel_id, @@ -353,17 +365,62 @@ : C_SocketWithData(P_channel_id, P_read_buf_size, P_segm_buf_size) { SOCKET_DEBUG(0, "C_SocketServer::C_SocketServer() id=" << m_socket_id); m_listen_sock = P_listen ; - // UDP + m_source_udp_addr_info = NULL ; m_type = m_listen_sock->get_trans_type(); - if (m_type == E_SOCKET_UDP_MODE) { - // std::cerr << "m_socket_id before " << m_socket_id << std::endl; - m_socket_id = m_listen_sock->get_id(); - // std::cerr << "m_socket_id " << m_socket_id << std::endl; - } - // UDP - // std::cerr << "m_type " << m_type << std::endl; } +C_SocketServer::C_SocketServer(T_SocketType P_type, + T_pIpAddr P_addr, + int P_channel_id, + size_t P_read_buf_size, + size_t P_segm_buf_size) + : C_SocketWithData(P_type, + P_addr, + P_channel_id, + P_read_buf_size, + P_segm_buf_size) { + m_listen_sock = NULL ; + m_source_udp_addr_info = P_addr ; + SOCKET_DEBUG(0, "C_SocketServer::C_SocketServer() id=" << m_socket_id); +} + +int C_SocketServer::_open_udp (size_t P_buffer_size, + C_ProtocolBinaryFrame *P_protocol) { + + int L_rc ; /* system calls return value storage */ + + SOCKET_DEBUG(0, "C_SocketServer::_open_udp()"); + + L_rc = C_Socket::_open(get_domain(m_source_udp_addr_info), + P_buffer_size, + P_protocol) ; + + if (L_rc == 0) { + + m_protocol = P_protocol ; + + m_buffer_size = P_buffer_size ; + + set_properties() ; + + /* bind the socket to the newly formed address */ + L_rc = call_bind(m_socket_id, + (sockaddr *)(void *)&(m_source_udp_addr_info->m_addr), + SOCKADDR_IN_SIZE(&(m_source_udp_addr_info->m_addr))); + /* check there was no error */ + if (L_rc) { + SOCKET_ERROR(1, "bind [" << strerror(errno) << "]"); + } else { + m_remote_sockaddr = m_source_udp_addr_info->m_addr; + m_len_remote_sockaddr = SOCKADDR_IN_SIZE(&(m_source_udp_addr_info->m_addr)); + m_remote_sockaddr_ptr = &m_remote_sockaddr ; + m_len_remote_sockaddr_ptr = &m_len_remote_sockaddr ; + m_state = E_SOCKET_STATE_READY ; + } + } + return (L_rc); +} + C_SocketServer::~C_SocketServer() { SOCKET_DEBUG(0, "C_SocketServer::~C_SocketServer() id=" << m_socket_id); } @@ -376,17 +433,13 @@ SOCKET_DEBUG(0, "C_SocketServer::_open()"); - // UDP - if (m_type == E_SOCKET_TCP_MODE) { - L_size = SOCKADDR_IN_SIZE(m_listen_sock->get_source_address()); memset(&m_accepted_addr, 0, L_size); - + m_socket_id = call_accept (m_listen_sock->get_id(), - (sockaddr *)(void *)&m_accepted_addr, - &L_size); + (sockaddr *)(void *)&m_accepted_addr, + &L_size); - } // UDP m_protocol = P_protocol ; @@ -432,38 +485,45 @@ if (L_rc == 0) { set_properties() ; - // UDP - if (m_type == E_SOCKET_TCP_MODE) { + if (m_type == E_SOCKET_TCP_MODE) { - L_rc = call_connect (m_socket_id, - (struct sockaddr*)(void*)&(m_remote_addr_info->m_addr), - SOCKADDR_IN_SIZE(&(m_remote_addr_info->m_addr))) ; - if (L_rc) { - if (errno != EINPROGRESS) { - SOCKET_ERROR(1, "connect failed [" - << L_rc << "][" - << strerror(errno) << "]"); - *P_status = E_OPEN_FAILED ; + L_rc = call_connect (m_socket_id, + (struct sockaddr*)(void*)&(m_remote_addr_info->m_addr), + SOCKADDR_IN_SIZE(&(m_remote_addr_info->m_addr))) ; + if (L_rc) { + if (errno != EINPROGRESS) { + SOCKET_ERROR(1, "connect failed [" + << L_rc << "][" + << strerror(errno) << "]"); + *P_status = E_OPEN_FAILED ; + } else { + m_state = E_SOCKET_STATE_INPROGESS ; + *P_status = E_OPEN_DELAYED ; + L_rc = 0 ; + } + } else { - m_state = E_SOCKET_STATE_INPROGESS ; - *P_status = E_OPEN_DELAYED ; - L_rc = 0 ; + m_state = E_SOCKET_STATE_READY ; + *P_status = E_OPEN_OK ; } - } else { - m_state = E_SOCKET_STATE_READY ; - *P_status = E_OPEN_OK ; + L_rc = call_bind(m_socket_id, + (sockaddr *)(void *)&(m_remote_addr_info->m_addr_src), + SOCKADDR_IN_SIZE(&(m_remote_addr_info->m_addr_src))); + + if (L_rc) { + SOCKET_ERROR(1, "bind [" << strerror(errno) << "]"); + } else { + m_remote_sockaddr = m_remote_addr_info->m_addr; + m_len_remote_sockaddr = SOCKADDR_IN_SIZE(&(m_remote_addr_info->m_addr)); + m_remote_sockaddr_ptr = &m_remote_sockaddr ; + m_len_remote_sockaddr_ptr = &m_len_remote_sockaddr ; + + m_state = E_SOCKET_STATE_READY ; + *P_status = E_OPEN_OK ; + } } - } else { - - // UDP - // bind - m_state = E_SOCKET_STATE_READY ; - *P_status = E_OPEN_OK ; } - // UDP - - } return (L_rc); } @@ -499,9 +559,21 @@ m_read_buf_size = P_read_buf_size ; ALLOC_TABLE(m_read_buf, char*, sizeof(char), m_read_buf_size); + m_remote_sockaddr_ptr = NULL ; + m_len_remote_sockaddr_ptr = NULL ; + + m_len_remote_sockaddr = SOCKADDR_IN_SIZE(&m_remote_sockaddr); + memset(&m_remote_sockaddr, 0, m_len_remote_sockaddr); } +T_SockAddrStorage* C_SocketWithData::get_remote_sockaddr_ptr() { + return (m_remote_sockaddr_ptr); +} +tool_socklen_t* C_SocketWithData::get_len_remote_sockaddr_ptr() { + return (m_len_remote_sockaddr_ptr); +} + C_SocketWithData::~C_SocketWithData() { SOCKET_DEBUG(0, "C_SocketWithData::~C_SocketWithData()"); if (!m_data_queue.empty()) { @@ -532,14 +604,17 @@ SOCKET_DEBUG(0, "C_SocketWithData::process_fd_set() id=" << m_socket_id); - switch (m_state) { case E_SOCKET_STATE_READY: if (FD_ISSET(m_socket_id, P_rSet)) { - L_rc = call_read(m_socket_id, L_buf, m_read_buf_size); - // UDP + if (m_type == E_SOCKET_TCP_MODE) { + L_rc = call_read(m_socket_id, L_buf, m_read_buf_size); + } else { + L_rc = _read(L_buf); + } + if (L_rc <= 0) { SOCKET_DEBUG(0, "C_SocketWithData::process_fd_set() CLOSED"); P_event->m_type = C_TransportEvent::E_TRANS_CLOSED ; @@ -630,3 +705,20 @@ return (L_size); } +int C_SocketServer::_read (void* P_buffer) { + return (call_recvfrom(m_socket_id, + P_buffer, + m_read_buf_size, + 0, + (sockaddr *)(void *)m_remote_sockaddr_ptr, + m_len_remote_sockaddr_ptr)); +} + +int C_SocketClient::_read (void* P_buffer) { + return (call_recvfrom(m_socket_id, + P_buffer, + m_read_buf_size, + 0, + NULL, + NULL)); +} Modified: seagull/trunk/src/library-trans-ip/C_Socket.hpp =================================================================== --- seagull/trunk/src/library-trans-ip/C_Socket.hpp 2006-07-13 12:23:27 UTC (rev 44) +++ seagull/trunk/src/library-trans-ip/C_Socket.hpp 2006-08-01 16:31:33 UTC (rev 45) @@ -75,6 +75,10 @@ virtual C_Socket* process_fd_set(fd_set *P_rSet, fd_set *P_wSet, C_TransportEvent *P_event) = 0 ; + + virtual T_SockAddrStorage* get_remote_sockaddr_ptr() = 0 ; + virtual tool_socklen_t* get_len_remote_sockaddr_ptr() = 0 ; + void set_channel_id(int P_channel_id); void set_properties () ; C_pDataDecode get_decode () ; @@ -111,10 +115,15 @@ size_t P_read_buf_size, size_t P_segm_buf_size) ; virtual ~C_SocketWithData() ; - C_Socket* process_fd_set(fd_set *P_rSet, fd_set *P_wSet, C_TransportEvent *P_event) ; + virtual C_Socket* process_fd_set(fd_set *P_rSet, fd_set *P_wSet, C_TransportEvent *P_event) ; + virtual int _read (void *P_buf) = 0 ; size_t received_buffer (unsigned char *P_data, size_t P_size_buf, struct timeval *P_time) ; + + T_SockAddrStorage* get_remote_sockaddr_ptr() ; + tool_socklen_t* get_len_remote_sockaddr_ptr() ; + protected: @@ -125,6 +134,14 @@ size_t m_read_buf_size ; char *m_read_buf ; + + T_SockAddrStorage m_remote_sockaddr ; + tool_socklen_t m_len_remote_sockaddr ; + + T_SockAddrStorage* m_remote_sockaddr_ptr ; + tool_socklen_t* m_len_remote_sockaddr_ptr ; + + } ; class C_SocketListen : public C_Socket { @@ -138,17 +155,18 @@ size_t P_segm_buf_size) ; virtual ~C_SocketListen() ; int _open (size_t P_buffer_size, C_ProtocolBinaryFrame *P_protocol) ; - C_Socket* process_fd_set(fd_set *P_rSet, + virtual C_Socket* process_fd_set(fd_set *P_rSet, fd_set *P_wSet, C_TransportEvent *P_event) ; size_t received_buffer (unsigned char *P_data, size_t P_size_buf, struct timeval *P_time) ; T_SockAddrStorage * get_source_address () ; - // UDP - T_SocketType get_trans_type() ; ; + + T_SocketType get_trans_type() ; + T_SockAddrStorage* get_remote_sockaddr_ptr() ; + tool_socklen_t* get_len_remote_sockaddr_ptr() ; - protected: T_pIpAddr m_source_addr_info ; @@ -167,11 +185,25 @@ int P_channel_id, size_t P_read_buf_size, size_t P_segm_buf_size); + + C_SocketServer(T_SocketType P_type, + T_pIpAddr P_addr, + int P_channel_id, + size_t P_read_buf_size, + size_t P_segm_buf_size) ; + + virtual ~C_SocketServer(); int _open (size_t P_buffer_size, C_ProtocolBinaryFrame *P_protocol) ; + int _open_udp (size_t P_buffer_size, + C_ProtocolBinaryFrame *P_protocol) ; + + int _read (void *P_buf) ; + private: - C_SocketListen *m_listen_sock ; + C_SocketListen *m_listen_sock ; + T_pIpAddr m_source_udp_addr_info ; } ; @@ -187,6 +219,8 @@ int _open (T_pOpenStatus P_status, size_t P_buffer_size, C_ProtocolBinaryFrame *P_protocol); + int _read (void *P_buf) ; + } ; typedef map_t<int, C_Socket*> T_SocketMap, *T_pSocketMap ; Modified: seagull/trunk/src/library-trans-ip/C_TransIP.cpp =================================================================== --- seagull/trunk/src/library-trans-ip/C_TransIP.cpp 2006-07-13 12:23:27 UTC (rev 44) +++ seagull/trunk/src/library-trans-ip/C_TransIP.cpp 2006-08-01 16:31:33 UTC (rev 45) @@ -303,7 +303,11 @@ unsigned char *L_data = m_encode_buffer ; C_ProtocolBinaryFrame *L_protocol ; + + T_SockAddrStorage *L_remote_sockaddr = NULL ; + tool_socklen_t *L_len_remote_sockaddr = NULL ; + C_ProtocolFrame::T_MsgError L_error = C_ProtocolFrame::E_MSG_OK ; @@ -315,33 +319,46 @@ L_socket = L_it->second ; L_protocol = L_socket -> get_protocol() ; + if (m_trans_type == E_SOCKET_UDP_MODE) { + L_remote_sockaddr = L_socket->get_remote_sockaddr_ptr () ; + L_len_remote_sockaddr = L_socket->get_len_remote_sockaddr_ptr() ; + } + L_error = L_protocol->encode_message(P_msg, L_data, &L_size); if (L_error == C_ProtocolFrame::E_MSG_OK) { L_protocol->log_buffer((char*)"sent", L_data, L_size); - // L_ret = send_buffer2(P_id, L_data, L_size) ; - (void) send_buffer(P_id, L_data, L_size) ; + (void) send_buffer(P_id, L_data, L_size, L_remote_sockaddr, L_len_remote_sockaddr) ; } } return (0) ; } -size_t C_TransIP::send_buffer (int P_id, - unsigned char *P_data, - size_t P_size) { +size_t C_TransIP::send_buffer (int P_id, + ... [truncated message content] |
From: <oja...@us...> - 2006-07-13 12:23:38
|
Revision: 44 Author: ojacques Date: 2006-07-13 05:23:27 -0700 (Thu, 13 Jul 2006) ViewCVS: http://svn.sourceforge.net/gull/?rev=44&view=rev Log Message: ----------- Redo base_cx dictionary and start_client for diameter env - modified by mistake Modified Paths: -------------- seagull/trunk/src/exe-env/diameter-env/config/base_cx.xml seagull/trunk/src/exe-env/diameter-env/run/start_client.ksh Modified: seagull/trunk/src/exe-env/diameter-env/config/base_cx.xml =================================================================== --- seagull/trunk/src/exe-env/diameter-env/config/base_cx.xml 2006-07-13 12:18:45 UTC (rev 43) +++ seagull/trunk/src/exe-env/diameter-env/config/base_cx.xml 2006-07-13 12:23:27 UTC (rev 44) @@ -33,7 +33,6 @@ </types> <header name="command" length="msg-length" type="cmd-code"> - <start-length></start-length> <fielddef name="protocol-version" size="1" unit="octet"></fielddef> <fielddef name="msg-length" size="3" unit="octet"> </fielddef> <fielddef name="flags" size="1" unit="octet"> </fielddef> Modified: seagull/trunk/src/exe-env/diameter-env/run/start_client.ksh =================================================================== --- seagull/trunk/src/exe-env/diameter-env/run/start_client.ksh 2006-07-13 12:18:45 UTC (rev 43) +++ seagull/trunk/src/exe-env/diameter-env/run/start_client.ksh 2006-07-13 12:23:27 UTC (rev 44) @@ -19,5 +19,5 @@ # export LD_LIBRARY_PATH=/usr/local/bin -seagull -conf ../config/conf.client.xml -dico ../config/base_cx.xml -scen ../scenario/sar-saa.client.xml -log ../logs/sar-saa.client.log -llevel ETM +seagull -conf ../config/conf.client.xml -dico ../config/base_cx.xml -scen ../scenario/sar-saa.client.xml -log ../logs/sar-saa.client.log -llevel ET This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <oja...@us...> - 2006-07-13 12:18:56
|
Revision: 43 Author: ojacques Date: 2006-07-13 05:18:45 -0700 (Thu, 13 Jul 2006) ViewCVS: http://svn.sourceforge.net/gull/?rev=43&view=rev Log Message: ----------- Added local OCTCAP include path in build.conf Modified Paths: -------------- seagull/trunk/src/build.conf seagull/trunk/src/exe-env/diameter-env/config/base_cx.xml seagull/trunk/src/exe-env/diameter-env/run/start_client.ksh Modified: seagull/trunk/src/build.conf =================================================================== --- seagull/trunk/src/build.conf 2006-07-13 10:40:41 UTC (rev 42) +++ seagull/trunk/src/build.conf 2006-07-13 12:18:45 UTC (rev 43) @@ -106,7 +106,7 @@ # Linux library generation definition for using TCAP lib BUILD_TCAP_LIB_CC_LINUX=g++ -BUILD_TCAP_LIB_CC_FLAGS_LINUX="-D_GNU_SOURCE -D_REENTRANT -shared -Wall -Werror -I/opt/OC/include" +BUILD_TCAP_LIB_CC_FLAGS_LINUX="-D_GNU_SOURCE -D_REENTRANT -shared -Wall -Werror -I/opt/OC/include -I./octcap_include" BUILD_TCAP_LIB_LD_LINUX=g++ BUILD_TCAP_LIB_LD_FLAGS_LINUX="-shared -fPIC" BUILD_TCAP_LIB_LD_LIBS_LINUX="-lm -lntl" @@ -163,8 +163,8 @@ # HP_UX library generation definition for using TCAP lib BUILD_TCAP_LIB_CC_HP_UX=aCC -BUILD_TCAP_LIB_CC_FLAGS_HP_UX="-Aa +Z +DAportable +p -D_HPUX_SOURCE -D_XOPEN_SOURCE=500 -D_XOPEN_SOURCE_EXTENDED `check_dlopen_usage` -I/opt/OC/include" -BUILD_TCAP_LIB_CC_FLAGS_HP_UX_IA64="-AP -Aa +Z +p +DD64 -D_HPUX_SOURCE -D_XOPEN_SOURCE=500 -D_XOPEN_SOURCE_EXTENDED `check_dlopen_usage` -I/opt/OC/include" +BUILD_TCAP_LIB_CC_FLAGS_HP_UX="-Aa +Z +DAportable +p -D_HPUX_SOURCE -D_XOPEN_SOURCE=500 -D_XOPEN_SOURCE_EXTENDED `check_dlopen_usage` -I/opt/OC/include -I./octcap_include" +BUILD_TCAP_LIB_CC_FLAGS_HP_UX_IA64="-AP -Aa +Z +p +DD64 -D_HPUX_SOURCE -D_XOPEN_SOURCE=500 -D_XOPEN_SOURCE_EXTENDED `check_dlopen_usage` -I/opt/OC/include -I./octcap_include" BUILD_TCAP_LIB_LD_HP_UX=aCC BUILD_TCAP_LIB_LD_FLAGS_HP_UX="-b" BUILD_TCAP_LIB_LD_FLAGS_HP_UX_IA64="-b +DD64" Modified: seagull/trunk/src/exe-env/diameter-env/config/base_cx.xml =================================================================== --- seagull/trunk/src/exe-env/diameter-env/config/base_cx.xml 2006-07-13 10:40:41 UTC (rev 42) +++ seagull/trunk/src/exe-env/diameter-env/config/base_cx.xml 2006-07-13 12:18:45 UTC (rev 43) @@ -33,6 +33,7 @@ </types> <header name="command" length="msg-length" type="cmd-code"> + <start-length></start-length> <fielddef name="protocol-version" size="1" unit="octet"></fielddef> <fielddef name="msg-length" size="3" unit="octet"> </fielddef> <fielddef name="flags" size="1" unit="octet"> </fielddef> Modified: seagull/trunk/src/exe-env/diameter-env/run/start_client.ksh =================================================================== --- seagull/trunk/src/exe-env/diameter-env/run/start_client.ksh 2006-07-13 10:40:41 UTC (rev 42) +++ seagull/trunk/src/exe-env/diameter-env/run/start_client.ksh 2006-07-13 12:18:45 UTC (rev 43) @@ -19,5 +19,5 @@ # export LD_LIBRARY_PATH=/usr/local/bin -seagull -conf ../config/conf.client.xml -dico ../config/base_cx.xml -scen ../scenario/sar-saa.client.xml -log ../logs/sar-saa.client.log -llevel ET +seagull -conf ../config/conf.client.xml -dico ../config/base_cx.xml -scen ../scenario/sar-saa.client.xml -log ../logs/sar-saa.client.log -llevel ETM This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aa...@us...> - 2006-07-13 10:40:47
|
Revision: 42 Author: aajjan Date: 2006-07-13 03:40:41 -0700 (Thu, 13 Jul 2006) ViewCVS: http://svn.sourceforge.net/gull/?rev=42&view=rev Log Message: ----------- bug fix for C_ProtocolExternal in is_variable Modified Paths: -------------- seagull/trunk/src/protocol-external/C_ProtocolExternal.cpp Modified: seagull/trunk/src/protocol-external/C_ProtocolExternal.cpp =================================================================== --- seagull/trunk/src/protocol-external/C_ProtocolExternal.cpp 2006-07-12 13:12:50 UTC (rev 41) +++ seagull/trunk/src/protocol-external/C_ProtocolExternal.cpp 2006-07-13 10:40:41 UTC (rev 42) @@ -3027,7 +3027,7 @@ ALLOC_TABLE(L_value, char*, sizeof(char), - L_value_size); + L_value_size+1); memcpy(L_value, L_search, L_value_size); L_value[L_value_size] = 0 ; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aa...@us...> - 2006-07-12 13:13:03
|
Revision: 41 Author: aajjan Date: 2006-07-12 06:12:50 -0700 (Wed, 12 Jul 2006) ViewCVS: http://svn.sourceforge.net/gull/?rev=41&view=rev Log Message: ----------- fix problem related to regexp Modified Paths: -------------- seagull/trunk/src/common/C_RegExp.cpp seagull/trunk/src/protocol-text/C_ProtocolText.cpp Modified: seagull/trunk/src/common/C_RegExp.cpp =================================================================== --- seagull/trunk/src/common/C_RegExp.cpp 2006-07-11 15:02:54 UTC (rev 40) +++ seagull/trunk/src/common/C_RegExp.cpp 2006-07-12 13:12:50 UTC (rev 41) @@ -96,7 +96,8 @@ if (L_buffer) { - L_error = regexec(&m_internalRegExp, L_buffer, MAX_MATCH, L_pmatch, REG_EXTENDED | REG_NEWLINE); + // L_error = regexec(&m_internalRegExp, L_buffer, MAX_MATCH, L_pmatch, REG_EXTENDED | REG_NEWLINE); + L_error = regexec(&m_internalRegExp, L_buffer, MAX_MATCH, L_pmatch, REG_EXTENDED); if (L_error == 0) { for(L_i=0; L_i < MAX_MATCH; L_i++) { if(L_pmatch[L_i].rm_eo == -1) break ; @@ -157,8 +158,8 @@ if (L_buffer) { - L_error = regexec(&m_internalRegExp, L_buffer, - MAX_MATCH, L_pmatch, REG_EXTENDED | REG_NEWLINE); + // L_error = regexec(&m_internalRegExp, L_buffer, MAX_MATCH, L_pmatch, REG_EXTENDED | REG_NEWLINE); + L_error = regexec(&m_internalRegExp, L_buffer, MAX_MATCH, L_pmatch, REG_EXTENDED); if (L_error == 0) { for(L_i=0; L_i < MAX_MATCH; L_i++) { if(L_pmatch[L_i].rm_eo == -1) break ; @@ -214,7 +215,8 @@ } if (L_buffer) { - L_error = regexec(&m_internalRegExp, L_buffer, MAX_MATCH, L_pmatch, REG_EXTENDED | REG_NEWLINE); + // L_error = regexec(&m_internalRegExp, L_buffer, MAX_MATCH, L_pmatch, REG_EXTENDED | REG_NEWLINE); + L_error = regexec(&m_internalRegExp, L_buffer, MAX_MATCH, L_pmatch, REG_EXTENDED); if (L_error == 0) { for(L_i=0; L_i < MAX_MATCH; L_i++) { if(L_pmatch[L_i].rm_eo == -1) break ; Modified: seagull/trunk/src/protocol-text/C_ProtocolText.cpp =================================================================== --- seagull/trunk/src/protocol-text/C_ProtocolText.cpp 2006-07-11 15:02:54 UTC (rev 40) +++ seagull/trunk/src/protocol-text/C_ProtocolText.cpp 2006-07-12 13:12:50 UTC (rev 41) @@ -130,6 +130,8 @@ sizeof(char), (m_field_body_separator_size+1)); + m_field_body_separator[0] = 0 ; + if (m_field_separator_size != 0 ) { strcat(m_field_body_separator, m_field_separator); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <oja...@us...> - 2006-07-11 15:03:03
|
Revision: 40 Author: ojacques Date: 2006-07-11 08:02:54 -0700 (Tue, 11 Jul 2006) ViewCVS: http://svn.sourceforge.net/gull/?rev=40&view=rev Log Message: ----------- typo in MSRP start script Modified Paths: -------------- seagull/trunk/src/exe-env/msrp-env/run/start_server.ksh Modified: seagull/trunk/src/exe-env/msrp-env/run/start_server.ksh =================================================================== --- seagull/trunk/src/exe-env/msrp-env/run/start_server.ksh 2006-07-11 09:03:32 UTC (rev 39) +++ seagull/trunk/src/exe-env/msrp-env/run/start_server.ksh 2006-07-11 15:02:54 UTC (rev 40) @@ -20,5 +20,5 @@ export LD_LIBRARY_PATH=/usr/local/bin -seagull -conf ../config/conf.server.xml -dico ../config/mrsp-dictionnary.xml -scen ../scenario/server.xml -log ../logs/server.log -llevel ET +seagull -conf ../config/conf.server.xml -dico ../config/msrp-dictionnary.xml -scen ../scenario/server.xml -log ../logs/server.log -llevel ET This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <oja...@us...> - 2006-07-11 09:03:38
|
Revision: 39 Author: ojacques Date: 2006-07-11 02:03:32 -0700 (Tue, 11 Jul 2006) ViewCVS: http://svn.sourceforge.net/gull/?rev=39&view=rev Log Message: ----------- Precision on octcap flavor. Modified Paths: -------------- doc/trunk/src/documentation/content/xdocs/doc/octcap.xml Modified: doc/trunk/src/documentation/content/xdocs/doc/octcap.xml =================================================================== --- doc/trunk/src/documentation/content/xdocs/doc/octcap.xml 2006-07-10 15:26:30 UTC (rev 38) +++ doc/trunk/src/documentation/content/xdocs/doc/octcap.xml 2006-07-11 09:03:32 UTC (rev 39) @@ -644,7 +644,8 @@ from the correct library. To find the final library, it will use the parameters set in the init-args field. In init-args, you can specify the following parameters:</p> <ul> - <li>flavour (possible values: WBB and AAA)</li> + <li>flavour (possible values: WBB, WAA for ITU (sccp_service_kind is set to TCX_SCCP_SERVICE_ITU_WB) and AAA, ABB + for ANSI (sccp_service_kind is set to TCX_SCCP_SERVICE_REGULAR))</li> <li>path to the OCSS7's libSS7util.sl shared library (not necessary for OCSS7 >= 3.x - /opt/HP-AIN/SS7_WBB/sharedlib for OCSS7 2.2)</li> <li>library (name of the libSS7util shared library) - libSS7util.sl by default</li> </ul> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aa...@us...> - 2006-07-10 15:26:37
|
Revision: 38 Author: aajjan Date: 2006-07-10 08:26:30 -0700 (Mon, 10 Jul 2006) ViewCVS: http://svn.sourceforge.net/gull/?rev=38&view=rev Log Message: ----------- add FilterFrame.hpp Added Paths: ----------- seagull/trunk/src/filter-frame/ seagull/trunk/src/filter-frame/FilterFrame.hpp Removed Paths: ------------- seagull/trunk/src/parser-frame/FilterFrame.hpp Added: seagull/trunk/src/filter-frame/FilterFrame.hpp =================================================================== --- seagull/trunk/src/filter-frame/FilterFrame.hpp (rev 0) +++ seagull/trunk/src/filter-frame/FilterFrame.hpp 2006-07-10 15:26:30 UTC (rev 38) @@ -0,0 +1,27 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * (c)Copyright 2006 Hewlett-Packard Development Company, LP. + * + */ + +#ifndef _FILTER_FRAME_ +#define _FILTER_FRAME_ + +#include "C_ProtocolFrame.hpp" + +typedef char* (*T_FilterFunction)(char *P_buf); + +#endif // _FILTER_FRAME_ Deleted: seagull/trunk/src/parser-frame/FilterFrame.hpp =================================================================== --- seagull/trunk/src/parser-frame/FilterFrame.hpp 2006-07-10 15:21:54 UTC (rev 37) +++ seagull/trunk/src/parser-frame/FilterFrame.hpp 2006-07-10 15:26:30 UTC (rev 38) @@ -1,27 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * (c)Copyright 2006 Hewlett-Packard Development Company, LP. - * - */ - -#ifndef _FILTER_FRAME_ -#define _FILTER_FRAME_ - -#include "C_ProtocolFrame.hpp" - -typedef char* (*T_FilterFunction)(char *P_buf); - -#endif // _FILTER_FRAME_ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aa...@us...> - 2006-07-10 15:22:09
|
Revision: 37 Author: aajjan Date: 2006-07-10 08:21:54 -0700 (Mon, 10 Jul 2006) ViewCVS: http://svn.sourceforge.net/gull/?rev=37&view=rev Log Message: ----------- add FilterFrame.hpp Added Paths: ----------- seagull/trunk/src/parser-frame/FilterFrame.hpp Added: seagull/trunk/src/parser-frame/FilterFrame.hpp =================================================================== --- seagull/trunk/src/parser-frame/FilterFrame.hpp (rev 0) +++ seagull/trunk/src/parser-frame/FilterFrame.hpp 2006-07-10 15:21:54 UTC (rev 37) @@ -0,0 +1,27 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * (c)Copyright 2006 Hewlett-Packard Development Company, LP. + * + */ + +#ifndef _FILTER_FRAME_ +#define _FILTER_FRAME_ + +#include "C_ProtocolFrame.hpp" + +typedef char* (*T_FilterFunction)(char *P_buf); + +#endif // _FILTER_FRAME_ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <aa...@us...> - 2006-07-10 15:16:51
|
Revision: 36 Author: aajjan Date: 2006-07-10 08:16:04 -0700 (Mon, 10 Jul 2006) ViewCVS: http://svn.sourceforge.net/gull/?rev=36&view=rev Log Message: ----------- H248: new protocol (not really useful until UDP is functional). MSRP: new protocol. CORE: parsing libraries for text protocols: xml, h248, msrp. CORE: Fix for text protocol core dump in mono-socket mode. CORE: various fixes for text scenario parsing. Modified Paths: -------------- seagull/trunk/src/build.conf seagull/trunk/src/exe-env/xcap-env/config/xcap-dictionnary.xml seagull/trunk/src/library-parser-xml/parser.cpp seagull/trunk/src/library-parser-xml/parser.hpp seagull/trunk/src/library-trans-ip/C_Socket.cpp seagull/trunk/src/library-trans-ip/C_Socket.hpp seagull/trunk/src/library-trans-ip/C_TransIP.cpp seagull/trunk/src/library-trans-ip/socket_t.hpp seagull/trunk/src/parser-frame/ParserFrame.hpp seagull/trunk/src/protocol-binary/C_ProtocolBinary.cpp seagull/trunk/src/protocol-text/C_MessageText.cpp seagull/trunk/src/protocol-text/C_ProtocolText.cpp seagull/trunk/src/protocol-text/C_ProtocolText.hpp seagull/trunk/src/xml-parser/C_XmlParser.cpp Added Paths: ----------- seagull/trunk/src/exe-env/h248-env/ seagull/trunk/src/exe-env/h248-env/config/ seagull/trunk/src/exe-env/h248-env/config/conf.client.xml seagull/trunk/src/exe-env/h248-env/config/conf.server.xml seagull/trunk/src/exe-env/h248-env/config/h248-dictionnary.xml seagull/trunk/src/exe-env/h248-env/logs/ seagull/trunk/src/exe-env/h248-env/run/ seagull/trunk/src/exe-env/h248-env/run/start_client.ksh seagull/trunk/src/exe-env/h248-env/run/start_server.ksh seagull/trunk/src/exe-env/h248-env/scenario/ seagull/trunk/src/exe-env/h248-env/scenario/client.xml seagull/trunk/src/exe-env/h248-env/scenario/server.xml seagull/trunk/src/exe-env/msrp-env/ seagull/trunk/src/exe-env/msrp-env/config/ seagull/trunk/src/exe-env/msrp-env/config/conf.client.xml seagull/trunk/src/exe-env/msrp-env/config/conf.server.xml seagull/trunk/src/exe-env/msrp-env/config/msrp-dictionnary.xml seagull/trunk/src/exe-env/msrp-env/logs/ seagull/trunk/src/exe-env/msrp-env/run/ seagull/trunk/src/exe-env/msrp-env/run/start_client.ksh seagull/trunk/src/exe-env/msrp-env/run/start_server.ksh seagull/trunk/src/exe-env/msrp-env/scenario/ seagull/trunk/src/exe-env/msrp-env/scenario/client.xml seagull/trunk/src/exe-env/msrp-env/scenario/server.xml seagull/trunk/src/library-parser-h248/ seagull/trunk/src/library-parser-h248/parser_h248.cpp seagull/trunk/src/library-parser-h248/parser_h248.hpp seagull/trunk/src/library-parser-msrp/ seagull/trunk/src/library-parser-msrp/parser_msrp.cpp seagull/trunk/src/library-parser-msrp/parser_msrp.hpp Modified: seagull/trunk/src/build.conf =================================================================== --- seagull/trunk/src/build.conf 2006-06-28 13:55:50 UTC (rev 35) +++ seagull/trunk/src/build.conf 2006-07-10 15:16:04 UTC (rev 36) @@ -19,7 +19,7 @@ # General project definitions PROJECT_NAME=seagull -PROJECT_VERSION=1.3.1 +PROJECT_VERSION=1.3.2 function check_dlopen_usage { if test `uname -s` = "HP-UX" @@ -215,7 +215,7 @@ # tool executable BUILD_1_NAME="seagull" BUILD_1_TYPE=exe -BUILD_1_MODULES="common generator-common generator-core generator-model protocol-frame protocol-data protocol-binary protocol-binary-body-not-interpreted protocol-external protocol-text protocol-stats scenario-stats data-log transport-frame generator-traffic generator-scenario external-data xml-parser generator-stats parser-frame" +BUILD_1_MODULES="common generator-common generator-core generator-model protocol-frame protocol-data protocol-binary protocol-binary-body-not-interpreted protocol-external protocol-text protocol-stats scenario-stats data-log transport-frame generator-traffic generator-scenario external-data xml-parser generator-stats parser-frame filter-frame" # ip transport library BUILD_2_NAME="libtrans_ip.so" @@ -232,18 +232,28 @@ BUILD_4_TYPE=simple_exe BUILD_4_MODULES="tool-csvsplit" -# parser library +# xml parser library BUILD_5_NAME="libparser_xml.so" BUILD_5_TYPE=lib -BUILD_5_MODULES="common parser-frame protocol-frame library-parser-xml" +BUILD_5_MODULES="common parser-frame filter-frame protocol-frame library-parser-xml" -# HP OC TCAP 3.2 transport library -#BUILD_6_NAME="libtrans_octcap.so" -#BUILD_6_TYPE=tcap_lib -#BUILD_6_MODULES="common transport-frame protocol-frame library-trans-octcap32" +# h248 parser library +BUILD_6_NAME="libparser_h248.so" +BUILD_6_TYPE=lib +BUILD_6_MODULES="common parser-frame filter-frame protocol-frame library-parser-h248" +# msrp parser library +BUILD_7_NAME="libparser_msrp.so" +BUILD_7_TYPE=lib +BUILD_7_MODULES="common parser-frame filter-frame protocol-frame library-parser-msrp" + +# HP OC TCAP transport library +#BUILD_8_NAME="libtrans_octcap.so" +#BUILD_8_TYPE=tcap_lib +#BUILD_8_MODULES="common transport-frame protocol-frame library-trans-octcap32" + # sctp transport library -#BUILD_7_NAME="libtrans_extsctp.so" -#BUILD_7_TYPE=libextsctp -#BUILD_7_MODULES="common transport-frame protocol-frame library-trans-extsctp" +#BUILD_9_NAME="libtrans_extsctp.so" +#BUILD_9_TYPE=libextsctp +#BUILD_9_MODULES="common transport-frame protocol-frame library-trans-extsctp" Added: seagull/trunk/src/exe-env/h248-env/config/conf.client.xml =================================================================== --- seagull/trunk/src/exe-env/h248-env/config/conf.client.xml (rev 0) +++ seagull/trunk/src/exe-env/h248-env/config/conf.client.xml 2006-07-10 15:16:04 UTC (rev 36) @@ -0,0 +1,81 @@ +<!-- + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + (c)Copyright 2006 Hewlett-Packard Development Company, LP. + +--> + +<?xml version="1.0" encoding="ISO-8859-1"?> +<configuration name="Simple IP Client Conf"> + + <define entity="transport" + name="trans-1" + file="libtrans_ip.so" + create_function="create_cipio_instance" + delete_function="delete_cipio_instance" + init-args="type=tcp"> + </define> + + <define entity="channel" + name="channel-1" + protocol="h248-text" + transport="trans-1" +<!-- + global="no" +--> + open-args="mode=client;dest=127.0.0.1:2944"> + </define> + + + <define entity="traffic-param" name="call-rate" value="1"></define> + <define entity="traffic-param" name="display-period" value="1"></define> + <define entity="traffic-param" name="log-stat-period" value="1"></define> + <define entity="traffic-param" name="log-stat-file" value="../logs/client-stat.csv"></define> + <define entity="traffic-param" name="call-timeout-ms" value="30000"></define> + <define entity="traffic-param" name="display-scenario-stat" value="true"></define> + <define entity="traffic-param" name="display-protocol-stat" value="true"></define> + <define entity="traffic-param" name="log-protocol-stat-period" value="5"></define> + <define entity="traffic-param" name="log-protocol-stat-name" value="all"></define> + <define entity="traffic-param" name="log-protocol-stat-file" value="../logs/client-protocol-stat.csv"></define> + + <define entity="traffic-param" name="call-open-timeout-ms" value="5000"></define> + <define entity="traffic-param" name="execute-check-action" value="false"></define> + +<!-- + <define entity="traffic-param" name="data-log-period" value="10"></define> + <define entity="traffic-param" name="data-log-number" value="1000"></define> + <define entity="traffic-param" name="data-log-file" value="../logs/client-rtt.csv"></define> + <define entity="traffic-param" name="data-log-rtdistrib" value="3000"></define> +--> + + <define entity="traffic-param" name="max-send" value="200"></define> + <define entity="traffic-param" name="max-receive" value="200"></define> + <define entity="traffic-param" name="max-simultaneous-calls" value="2000"></define> + <define entity="traffic-param" name="select-timeout-ms" value="1000"></define> + +<!-- + <define entity="traffic-param" name="number-calls" value="1"></define> +--> + +</configuration> + + + + + + + + Added: seagull/trunk/src/exe-env/h248-env/config/conf.server.xml =================================================================== --- seagull/trunk/src/exe-env/h248-env/config/conf.server.xml (rev 0) +++ seagull/trunk/src/exe-env/h248-env/config/conf.server.xml 2006-07-10 15:16:04 UTC (rev 36) @@ -0,0 +1,68 @@ +<!-- + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + (c)Copyright 2006 Hewlett-Packard Development Company, LP. + +--> + +<?xml version="1.0" encoding="ISO-8859-1"?> +<configuration name="Simple IP Server Conf"> + + <define entity="transport" + name="trans-1" + file="libtrans_ip.so" + create_function="create_cipio_instance" + delete_function="delete_cipio_instance" + init-args="type=tcp"> + </define> + + <define entity="channel" + name="channel-1" + protocol="h248-text" + transport="trans-1" + open-args="mode=server;source=127.0.0.1:2944"> + </define> + + <define entity="traffic-param" name="display-period" value="1"></define> + <define entity="traffic-param" name="log-stat-period" value="1"></define> + <define entity="traffic-param" name="log-stat-file" value="../logs/server-stat.csv"></define> + <define entity="traffic-param" name="call-timeout-ms" value="1000"></define> + <define entity="traffic-param" name="display-scenario-stat" value="true"></define> + <define entity="traffic-param" name="display-protocol-stat" value="true"></define> + <define entity="traffic-param" name="log-protocol-stat-period" value="5"></define> + <define entity="traffic-param" name="log-protocol-stat-name" value="all"></define> + <define entity="traffic-param" name="log-protocol-stat-file" value="../logs/server-protocol-stat.csv"></define> + +<!-- + <define entity="traffic-param" name="data-log-period" value="10"></define> + <define entity="traffic-param" name="data-log-number" value="1000"></define> + <define entity="traffic-param" name="data-log-file" value="../logs/server-rtt.csv"></define> + <define entity="traffic-param" name="data-log-rtdistrib" value="3000"></define> +--> + + <define entity="traffic-param" name="max-send" value="2000"></define> + <define entity="traffic-param" name="max-receive" value="2000"></define> + <define entity="traffic-param" name="max-simultaneous-calls" value="2000"></define> + <define entity="traffic-param" name="select-timeout-ms" value="1000"></define> + + <define entity="traffic-param" name="call-timeout-behaviour-abort" value="true"></define> + <define entity="traffic-param" name="files-no-timestamp" value="true"></define> + + +</configuration> + + + Added: seagull/trunk/src/exe-env/h248-env/config/h248-dictionnary.xml =================================================================== --- seagull/trunk/src/exe-env/h248-env/config/h248-dictionnary.xml (rev 0) +++ seagull/trunk/src/exe-env/h248-env/config/h248-dictionnary.xml 2006-07-10 15:16:04 UTC (rev 36) @@ -0,0 +1,113 @@ +<!-- + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + (c)Copyright 2006 Hewlett-Packard Development Company, LP. + +--> + +<!-- h248/megaco-dictionnary definition --> +<!-- text protocol definition --> +<!-- seagull configuration file set --> + +<?xml version="1.0" encoding="ISO-8859-1"?> + +<protocol name="h248-text" + type="text" + filter="lib=libparser_h248.so;function=filter_h248" + field-separator="" + body-separator="{"> + +<configuration-parameters> +</configuration-parameters> + +<types> +</types> + + +<body-method> + + <defmethod name="body-to-be-parsed" + method="parser" + param="lib=libparser_h248.so;function=parse_h248"> + </defmethod> + +</body-method> + + +<header name="message" + type="type"> + <fielddef name="type"> + <regexp name="message-header-1" + expr="[[:space:]]*MEGACO\/1[[:space:]]*[[]([^]]+)[]][:]{0,1}[0-9]*[[:space:]]*([^ ]+)[[:space:]]*[=][[:space:]]*([0-9]*)[[:space:]]*" + nbexpr="4" + subexpr="2"> + </regexp> + <regexp name="message-header-2" + expr="[[:space:]]*[!]\/1[[:space:]]*[[]([^]]+)[]][:]{0,1}[0-9]*[[:space:]]*([^ ]+)[[:space:]]*[=][[:space:]]*([0-9]*)[[:space:]]*" + nbexpr="4" + subexpr="2"> + </regexp> + </fielddef> + + <fielddef name="transaction-id"> + <regexp name="trans-id" + expr="[Tt][Rr][Aa][Nn][Ss][Aa][Cc][Tt][Ii][Oo][Nn][[:space:]]*[=][[:space:]]*([0-9]+)" + nbexpr="2" + subexpr="1"> + </regexp> + <regexp name="reply-id" + expr="[Rr][Ee][Pp][Ll][Yy][[:space:]]*[=][[:space:]]*([0-9]+)" + nbexpr="2" + subexpr="1"> + </regexp> + </fielddef> + +</header> + +<body name="data" type="data-type"> + <fielddef name="add-id"> + <regexp name="add-id" + expr="[Aa][Dd][Dd][ ]*[=][ ]*([!-}]*)[[:space:]]*[{]" + nbexpr="2" + subexpr="1"> + </regexp> + </fielddef> + +</body> + + +<dictionary session-method="field" + session-id="transaction-id" + out-of-session-id="transaction-id"> + +<!-- +<dictionary session-method="open-id"> +--> + + <message name="Transaction"></message> + <message name="Reply"></message> + +</dictionary> + +</protocol> + + + + + + + + Added: seagull/trunk/src/exe-env/h248-env/run/start_client.ksh =================================================================== --- seagull/trunk/src/exe-env/h248-env/run/start_client.ksh (rev 0) +++ seagull/trunk/src/exe-env/h248-env/run/start_client.ksh 2006-07-10 15:16:04 UTC (rev 36) @@ -0,0 +1,24 @@ +#!/bin/ksh +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# (c)Copyright 2006 Hewlett-Packard Development Company, LP. +# +# + +export LD_LIBRARY_PATH=/usr/local/bin + +seagull -conf ../config/conf.client.xml -dico ../config/h248-dictionnary.xml -scen ../scenario/client.xml -log ../logs/client.log -llevel ET + Property changes on: seagull/trunk/src/exe-env/h248-env/run/start_client.ksh ___________________________________________________________________ Name: svn:executable + * Added: seagull/trunk/src/exe-env/h248-env/run/start_server.ksh =================================================================== --- seagull/trunk/src/exe-env/h248-env/run/start_server.ksh (rev 0) +++ seagull/trunk/src/exe-env/h248-env/run/start_server.ksh 2006-07-10 15:16:04 UTC (rev 36) @@ -0,0 +1,24 @@ +#!/bin/ksh +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# (c)Copyright 2006 Hewlett-Packard Development Company, LP. +# +# + +export LD_LIBRARY_PATH=/usr/local/bin + +seagull -conf ../config/conf.server.xml -dico ../config/h248-dictionnary.xml -scen ../scenario/server.xml -log ../logs/server.log -llevel ET + Property changes on: seagull/trunk/src/exe-env/h248-env/run/start_server.ksh ___________________________________________________________________ Name: svn:executable + * Added: seagull/trunk/src/exe-env/h248-env/scenario/client.xml =================================================================== --- seagull/trunk/src/exe-env/h248-env/scenario/client.xml (rev 0) +++ seagull/trunk/src/exe-env/h248-env/scenario/client.xml 2006-07-10 15:16:04 UTC (rev 36) @@ -0,0 +1,108 @@ +<!-- + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + (c)Copyright 2006 Hewlett-Packard Development Company, LP. + +--> + +<?xml version="1.0" encoding="ISO-8859-1" ?> +<scenario> + + + +<counter> + <counterdef name="transaction-counter" init="0"> </counterdef> +</counter> + +<traffic> + <send channel="channel-1"> + <action> + <inc-counter name="transaction-counter"> </inc-counter> + <set-value name="transaction-id" + format="$(transaction-counter)"> + </set-value> +<!-- + <open args="mode=client;dest=127.0.0.1:2944"></open> +--> + </action> + <message> + <!-- header --> + <! [ CDATA[!/1 [123.123.123.4\]:5698 + Transaction = 11111111]]> + <!-- body --> + <![CDATA[Context = $ { + Add = T2 { + Media { + Stream = 1 { + LocalControl { + Mode = SendReceive, + }, + Local { + v=0\r + c=IN IP4 $\r + m=audio $ RTP/AVP 0\r + a=rtpmap:0 PCMU/8000/1\r + }, + Remote { + v=0 + c=IN IP4 16.16.200.10 + m=audio 10000 RTP/AVP 0 + a=rtpmap:0 PCMU/8000/1 + }} + }}}}]]> + </message> + </send> + + <receive channel="channel-1"> + <message> + <!-- header --> + <![CDATA[MEGACO/1 [123.123.123.4\] + Reply = 2]]> + <!-- body --> + <![CDATA[ Context = 101 { + Add = T1 { + Media { + Stream = 1 { + Local { + v=0 + c=IN IP4 16.16.200.2 + m=audio 20001 RTP/AVP 0 + a=rtpmap:0 PCMU/8000/1 + } + }}}}}}]]> + </message> + + <action> + <!-- close the socket --> +<!-- + <close></close> +--> + </action> + + </receive> +</traffic> + +</scenario> + + + + + + + + + + Added: seagull/trunk/src/exe-env/h248-env/scenario/server.xml =================================================================== --- seagull/trunk/src/exe-env/h248-env/scenario/server.xml (rev 0) +++ seagull/trunk/src/exe-env/h248-env/scenario/server.xml 2006-07-10 15:16:04 UTC (rev 36) @@ -0,0 +1,115 @@ +<!-- + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + (c)Copyright 2006 Hewlett-Packard Development Company, LP. + +--> + +<?xml version="1.0" encoding="ISO-8859-1" ?> +<scenario> + +<traffic> + <receive channel="channel-1"> + <message> + <!-- header --> + <! [ CDATA[MEGACO/1 [123.123.123.4\] + Transaction = 1 ]]> + <!-- body --> + <![CDATA[Context = $ { + Add = T1 { + Media { + Stream = 1 { + LocalControl { + Mode = SendReceive, + }, + Local { + v=0 + c=IN IP4 $ + m=audio $ RTP/AVP 0 + a=rtpmap:0 PCMU/8000/1 + }, + Remote { + v=0 + c=IN IP4 16.16.200.10 + m=audio 10000 RTP/AVP 0 + a=rtpmap:0 PCMU/8000/1 + } + } + } + }}}]]> + </message> + + <action> + <store name="TRANS-ID" entity="transaction-id"> + <regexp name="trans-id" + expr="[Tt][Rr][Aa][Nn][Ss][Aa][Cc][Tt][Ii][Oo][Nn][[:space:]]*[=][[:space:]]*([0-9]+)" + nbexpr="2" + subexpr="1"> + </regexp> + </store> + </action> + + </receive> + + <send channel="channel-1"> + <action> + <restore name="TRANS-ID" entity="transaction-id"></restore> + </action> + <message> + <!-- header --> + <![CDATA[MEGACO/1 [123.123.123.4\] + Reply = 1 +]]> + <!-- body --> + <![CDATA[ Context = 101 { + Add = { + Media { + Stream = 1 { + Local { + v=0 + c=IN IP4 16.16.200.2 + m=audio 20001 RTP/AVP 0 + a=rtpmap:0 PCMU/8000/1 + } + } + } + } + } +}]]> + </message> + + <action> + <!-- close the socket --> +<!-- + <close></close> +--> + </action> + + </send> +</traffic> + +</scenario> + + + + + + + + + + + Added: seagull/trunk/src/exe-env/msrp-env/config/conf.client.xml =================================================================== --- seagull/trunk/src/exe-env/msrp-env/config/conf.client.xml (rev 0) +++ seagull/trunk/src/exe-env/msrp-env/config/conf.client.xml 2006-07-10 15:16:04 UTC (rev 36) @@ -0,0 +1,81 @@ +<!-- + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + (c)Copyright 2006 Hewlett-Packard Development Company, LP. + +--> + +<?xml version="1.0" encoding="ISO-8859-1"?> +<configuration name="Simple IP Client Conf"> + + <define entity="transport" + name="trans-1" + file="libtrans_ip.so" + create_function="create_cipio_instance" + delete_function="delete_cipio_instance" + init-args="type=tcp"> + </define> + + <define entity="channel" + name="channel-1" + protocol="msrp-text" + transport="trans-1" +<!-- + global="no" +--> + open-args="mode=client;dest=127.0.0.1:8493"> + </define> + + + <define entity="traffic-param" name="call-rate" value="1"></define> + <define entity="traffic-param" name="display-period" value="1"></define> + <define entity="traffic-param" name="log-stat-period" value="1"></define> + <define entity="traffic-param" name="log-stat-file" value="../logs/client-stat.csv"></define> + <define entity="traffic-param" name="call-timeout-ms" value="30000"></define> + <define entity="traffic-param" name="display-scenario-stat" value="true"></define> + <define entity="traffic-param" name="display-protocol-stat" value="true"></define> + <define entity="traffic-param" name="log-protocol-stat-period" value="5"></define> + <define entity="traffic-param" name="log-protocol-stat-name" value="all"></define> + <define entity="traffic-param" name="log-protocol-stat-file" value="../logs/client-protocol-stat.csv"></define> + + <define entity="traffic-param" name="call-open-timeout-ms" value="5000"></define> + <define entity="traffic-param" name="execute-check-action" value="false"></define> + +<!-- + <define entity="traffic-param" name="data-log-period" value="10"></define> + <define entity="traffic-param" name="data-log-number" value="1000"></define> + <define entity="traffic-param" name="data-log-file" value="../logs/client-rtt.csv"></define> + <define entity="traffic-param" name="data-log-rtdistrib" value="3000"></define> +--> + + <define entity="traffic-param" name="max-send" value="200"></define> + <define entity="traffic-param" name="max-receive" value="200"></define> + <define entity="traffic-param" name="max-simultaneous-calls" value="2000"></define> + <define entity="traffic-param" name="select-timeout-ms" value="1000"></define> + +<!-- + <define entity="traffic-param" name="number-calls" value="1"></define> +--> + +</configuration> + + + + + + + + Added: seagull/trunk/src/exe-env/msrp-env/config/conf.server.xml =================================================================== --- seagull/trunk/src/exe-env/msrp-env/config/conf.server.xml (rev 0) +++ seagull/trunk/src/exe-env/msrp-env/config/conf.server.xml 2006-07-10 15:16:04 UTC (rev 36) @@ -0,0 +1,68 @@ +<!-- + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + (c)Copyright 2006 Hewlett-Packard Development Company, LP. + +--> + +<?xml version="1.0" encoding="ISO-8859-1"?> +<configuration name="Simple IP Server Conf"> + + <define entity="transport" + name="trans-1" + file="libtrans_ip.so" + create_function="create_cipio_instance" + delete_function="delete_cipio_instance" + init-args="type=tcp"> + </define> + + <define entity="channel" + name="channel-1" + protocol="msrp-text" + transport="trans-1" + open-args="mode=server;source=127.0.0.1:8493"> + </define> + + <define entity="traffic-param" name="display-period" value="1"></define> + <define entity="traffic-param" name="log-stat-period" value="1"></define> + <define entity="traffic-param" name="log-stat-file" value="../logs/server-stat.csv"></define> + <define entity="traffic-param" name="call-timeout-ms" value="1000"></define> + <define entity="traffic-param" name="display-scenario-stat" value="true"></define> + <define entity="traffic-param" name="display-protocol-stat" value="true"></define> + <define entity="traffic-param" name="log-protocol-stat-period" value="5"></define> + <define entity="traffic-param" name="log-protocol-stat-name" value="all"></define> + <define entity="traffic-param" name="log-protocol-stat-file" value="../logs/server-protocol-stat.csv"></define> + +<!-- + <define entity="traffic-param" name="data-log-period" value="10"></define> + <define entity="traffic-param" name="data-log-number" value="1000"></define> + <define entity="traffic-param" name="data-log-file" value="../logs/server-rtt.csv"></define> + <define entity="traffic-param" name="data-log-rtdistrib" value="3000"></define> +--> + + <define entity="traffic-param" name="max-send" value="2000"></define> + <define entity="traffic-param" name="max-receive" value="2000"></define> + <define entity="traffic-param" name="max-simultaneous-calls" value="2000"></define> + <define entity="traffic-param" name="select-timeout-ms" value="1000"></define> + + <define entity="traffic-param" name="call-timeout-behaviour-abort" value="true"></define> + <define entity="traffic-param" name="files-no-timestamp" value="true"></define> + + +</configuration> + + + Added: seagull/trunk/src/exe-env/msrp-env/config/msrp-dictionnary.xml =================================================================== --- seagull/trunk/src/exe-env/msrp-env/config/msrp-dictionnary.xml (rev 0) +++ seagull/trunk/src/exe-env/msrp-env/config/msrp-dictionnary.xml 2006-07-10 15:16:04 UTC (rev 36) @@ -0,0 +1,105 @@ +<!-- + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + (c)Copyright 2006 Hewlett-Packard Development Company, LP. + +--> + +<!-- msrp-dictionnary definition --> +<!-- text protocol definition --> +<!-- seagull configuration file set --> + +<?xml version="1.0" encoding="ISO-8859-1"?> + +<protocol name="msrp-text" + type="text" + filter="lib=libparser_msrp.so;function=filter_msrp" + field-separator="\r\n" + body-separator="-------"> + +<configuration-parameters> +</configuration-parameters> + +<types> +</types> + +<body-method> + + <defmethod name="body-to-be-parsed" + method="parser" + param="lib=libparser_msrp.so;function=parse_msrp"> + </defmethod> + +</body-method> + + +<header name="message" + type="type"> + <fielddef name="type"> + <regexp name="message-type" + expr="[[:space:]]*MSRP[[:space:]]+[^ ]+[[:space:]]*([!-}]*)" + nbexpr="2" + line="0" + subexpr="1"> + </regexp> + </fielddef> + + <fielddef name="session-id"> + <regexp name="session-id" + expr="[[:space:]]*MSRP[[:space:]]+([^ ]+)[[:space:]]*[^ ]+" + nbexpr="2" + subexpr="1"> + </regexp> + </fielddef> + +</header> + +<body name="data" type="data-type"> +</body> + + +<dictionary session-method="field" + session-id="session-id" + out-of-session-id="session-id"> + +<!-- +out-of-session-id="session-id" +<dictionary session-method="open-id"> +--> + <message name="SEND"></message> + <message name="REPORT"></message> + <message name="200"></message> <!-- successful --> + <message name="400"></message> <!-- unintelligible --> + <message name="403"></message> <!-- not allowed --> + <message name="408"></message> + <message name="413"></message> <!-- undesired message --> + <message name="415"></message> <!-- not understood --> + <message name="423"></message> <!-- out of bounds --> + <message name="481"></message> <!-- not exist --> + <message name="501"></message> + <message name="506"></message> + +</dictionary> + +</protocol> + + + + + + + + Added: seagull/trunk/src/exe-env/msrp-env/run/start_client.ksh =================================================================== --- seagull/trunk/src/exe-env/msrp-env/run/start_client.ksh (rev 0) +++ seagull/trunk/src/exe-env/msrp-env/run/start_client.ksh 2006-07-10 15:16:04 UTC (rev 36) @@ -0,0 +1,24 @@ +#!/bin/ksh +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# (c)Copyright 2006 Hewlett-Packard Development Company, LP. +# +# + +export LD_LIBRARY_PATH=/usr/local/bin + +seagull -conf ../config/conf.client.xml -dico ../config/msrp-dictionnary.xml -scen ../scenario/client.xml -log ../logs/client.log -llevel ET + Property changes on: seagull/trunk/src/exe-env/msrp-env/run/start_client.ksh ___________________________________________________________________ Name: svn:executable + * Added: seagull/trunk/src/exe-env/msrp-env/run/start_server.ksh =================================================================== --- seagull/trunk/src/exe-env/msrp-env/run/start_server.ksh (rev 0) +++ seagull/trunk/src/exe-env/msrp-env/run/start_server.ksh 2006-07-10 15:16:04 UTC (rev 36) @@ -0,0 +1,24 @@ +#!/bin/ksh +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# (c)Copyright 2006 Hewlett-Packard Development Company, LP. +# +# + +export LD_LIBRARY_PATH=/usr/local/bin + +seagull -conf ../config/conf.server.xml -dico ../config/mrsp-dictionnary.xml -scen ../scenario/server.xml -log ../logs/server.log -llevel ET + Property changes on: seagull/trunk/src/exe-env/msrp-env/run/start_server.ksh ___________________________________________________________________ Name: svn:executable + * Added: seagull/trunk/src/exe-env/msrp-env/scenario/client.xml =================================================================== --- seagull/trunk/src/exe-env/msrp-env/scenario/client.xml (rev 0) +++ seagull/trunk/src/exe-env/msrp-env/scenario/client.xml 2006-07-10 15:16:04 UTC (rev 36) @@ -0,0 +1,87 @@ +<!-- + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + (c)Copyright 2006 Hewlett-Packard Development Company, LP. + +--> + +<?xml version="1.0" encoding="ISO-8859-1" ?> +<scenario> + + + +<counter> + <counterdef name="session-counter" init="0"> </counterdef> +</counter> + +<traffic> + <send channel="channel-1"> + <action> + <inc-counter name="session-counter"> </inc-counter> + <set-value name="session-id" + format="$(session-counter)"> + </set-value> +<!-- + <open args="mode=client;dest=127.0.0.1:8493"></open> +--> + </action> + <message> + <!-- header --> + <! [ CDATA[MSRP d93kswow SEND + To-Path: msrp://bob.example.com:8888/9di4ea;tcp + From-Path: msrp://alicepc.example.com:7777/iau39;tcp + Message-ID: 12339sdqwer + Content-Type: text/plain + Hi, I'm Alice !]]> + <!-- body --> + <![CDATA[d93kswow$ + ]]> + </message> + </send> + + <receive channel="channel-1"> + <message> + <! -- header --> + <![CDATA[MSRP d93kswow 200 OK + To-Path: msrp://alicepc.example.com:7777/iau39;tcp + From-Path: msrp://bob.example.com:8888/9di4ea;tcp + ]]> + <!-- body --> + <![CDATA[d93kswow$ + ]]> + </message> + + <action> + <!-- close the socket --> +<!-- + <close></close> +--> + </action> + + </receive> +</traffic> + +</scenario> + + + + + + + + + + Added: seagull/trunk/src/exe-env/msrp-env/scenario/server.xml =================================================================== --- seagull/trunk/src/exe-env/msrp-env/scenario/server.xml (rev 0) +++ seagull/trunk/src/exe-env/msrp-env/scenario/server.xml 2006-07-10 15:16:04 UTC (rev 36) @@ -0,0 +1,86 @@ +<!-- + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + (c)Copyright 2006 Hewlett-Packard Development Company, LP. + +--> + +<?xml version="1.0" encoding="ISO-8859-1" ?> +<scenario> + +<traffic> + <receive channel="channel-1"> + <message> + <!-- header --> + <! [ CDATA[MSRP d93kswow SEND + To-Path: msrp://bob.example.com:8888/9di4ea;tcp + From-Path: msrp://alicepc.example.com:7777/iau39;tcp + Message-ID: 12339sdqwer + Content-Type: text/plain + Hi, I'm Alice !]]> + <!-- body --> + <![CDATA[d93kswow$ + ]]> + </message> + + <action> + <store name="TRANS-ID" entity="session-id"> + <regexp name="session-id" + expr="[[:space:]]*MSRP[[:space:]]+([^ ]+)[[:space:]]*[^ ]+" + nbexpr="2" + subexpr="1"> + </regexp> + </store> + </action> + </receive> + + <send channel="channel-1"> + <action> + <restore name="TRANS-ID" entity="session-id"></restore> + </action> + <message> + <! -- header --> + <![CDATA[MSRP foo_transactionid 200 OK + To-Path: msrp://alicepc.example.com:7777/iau39;tcp + From-Path: msrp://bob.example.com:8888/9di4ea;tcp + ]]> + <!-- body --> + <![CDATA[d93kswow$ + ]]> + </message> + + <action> + <!-- close the socket --> +<!-- + <close></close> +--> + </action> + + </send> +</traffic> + +</scenario> + + + + + + + + + + + Modified: seagull/trunk/src/exe-env/xcap-env/config/xcap-dictionnary.xml =================================================================== --- seagull/trunk/src/exe-env/xcap-env/config/xcap-dictionnary.xml 2006-06-28 13:55:50 UTC (rev 35) +++ seagull/trunk/src/exe-env/xcap-env/config/xcap-dictionnary.xml 2006-07-10 15:16:04 UTC (rev 36) @@ -26,6 +26,8 @@ <protocol name="xcap-protocol" type="text" + filter="lib=libparser_xml.so;function=filter_xml" + field-separator="\r\n" body-separator="\r\n"> <configuration-parameters> Added: seagull/trunk/src/library-parser-h248/parser_h248.cpp =================================================================== --- seagull/trunk/src/library-parser-h248/parser_h248.cpp (rev 0) +++ seagull/trunk/src/library-parser-h248/parser_h248.cpp 2006-07-10 15:16:04 UTC (rev 36) @@ -0,0 +1,201 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * (c)Copyright 2006 Hewlett-Packard Development Company, LP. + * + */ + +#include "parser_h248.hpp" +#include "iostream_t.hpp" +#include <regex.h> +#include "string_t.hpp" +#include "Utils.hpp" + + +C_ProtocolFrame::T_MsgError parse_h248 (char *P_buf, + size_t *P_size, + char *P_buf_header, + size_t P_size_header) { + + C_ProtocolFrame::T_MsgError L_error = C_ProtocolFrame::E_MSG_ERROR_DECODING_SIZE_LESS ; + + size_t L_size = *P_size ; + int L_nb_acc = 1 ; + size_t L_i = 0 ; + + while (L_size) { + switch (P_buf[L_i]) { + case '{': + L_nb_acc++ ; + break ; + case '}': + L_nb_acc-- ; + break ; + default : + break ; + } + L_size-- ; + + L_i++; + + if (L_nb_acc == 0) { + L_error = C_ProtocolFrame::E_MSG_OK ; + *P_size -= (L_i+1) ; + break ; + } + } + + return (L_error) ; +} + + +char* skip_blank(char *P_ptr, + char *P_buffer, + size_t P_size_buffer, + size_t *P_size) { + + char *L_blank_ptr = NULL ; + char *L_new_ptr = P_ptr ; + + + L_blank_ptr = P_ptr ; + while (((L_blank_ptr) && (L_blank_ptr < (P_buffer + P_size_buffer))) && + ((*L_blank_ptr == ' ') || + (*L_blank_ptr == '\t'))) { L_blank_ptr++ ; } + if (L_blank_ptr != P_ptr) { + *(P_size) = (L_blank_ptr - P_ptr) ; + L_new_ptr = L_blank_ptr ; + } + + return (L_new_ptr) ; +} + + +char * filter_h248(char* P_buffer) { + + size_t L_size = 0 ; + + size_t L_size_buffer = 0 ; + size_t L_size_end = 0 ; + + char *L_pos = NULL ; + char *L_ptr = P_buffer ; + + char *L_result = NULL ; + char *L_new = NULL ; + + bool L_skip_blank = true ; + size_t L_size_blank = 0 ; + + + if ((P_buffer != NULL) && + ((L_size_buffer = strlen(P_buffer)) > 0 )) { + + L_size_end = L_size_buffer ; + + ALLOC_TABLE(L_result, + char*, + sizeof(char), + L_size_buffer); + + if ((strchr(L_ptr,'\n')) == NULL) { + L_new = L_result ; + L_size = L_size_buffer ; + + // skip blank + if (L_skip_blank) { + L_ptr = skip_blank(L_ptr,P_buffer, L_size_buffer, &L_size_blank) ; + L_size -= L_size_blank ; + } + + memcpy(L_new, L_ptr, L_size); + L_new += (L_size+1) ; + + *L_new = '\0' ; + *(L_new-1) = '\n' ; + + } else { + // if '\n' exists + + while( (L_ptr) + && (L_pos = strchr(L_ptr,'\n')) != NULL) { + + L_size_blank = 0 ; + // L_size : from start to '\n' not included + L_size = L_pos - L_ptr ; + // skip blank + if (L_skip_blank) { + L_ptr = skip_blank(L_ptr,P_buffer, L_size_buffer, &L_size_blank) ; + L_size -= L_size_blank ; + L_size_end -= L_size_blank ; + } + + if (L_new == NULL) { L_new = L_result ; } else { L_new += 1 ; } + memcpy(L_new, L_ptr, L_size); + + L_new += L_size ; + // test end needed ? for L_ptr + if ((L_pos + 1) <= (P_buffer+L_size_buffer)) { + L_ptr = L_pos + 1 ; + } else { + L_ptr = NULL ; + } + + L_size_end -= (L_size + 1) ; + + *(L_new) = '\n' ; + + } // while + + + // ctrl the end of buffer + if (L_size_end > 0) { + + L_size = L_size_end ; + L_size_blank = 0 ; + + // skip blank + if (L_skip_blank) { + L_ptr = skip_blank(L_ptr,P_buffer, L_size_buffer, &L_size_blank) ; + L_size -= L_size_blank ; + } + + + if (L_size) { + L_new +=1 ; + + memcpy(L_new, L_ptr, L_size); + L_new += (L_size+1) ; + + *L_new = '\0' ; + *(L_new-1) = '\n' ; + } else { + // add final '\0' + L_new += 1 ; + *L_new = '\0' ; + } + } else { + // add final '\0' + L_new += 1 ; + *L_new = '\0' ; + + } + } + } + + return (L_result); + +} + Added: seagull/trunk/src/library-parser-h248/parser_h248.hpp =================================================================== --- seagull/trunk/src/library-parser-h248/parser_h248.hpp (rev 0) +++ seagull/trunk/src/library-parser-h248/parser_h248.hpp 2006-07-10 15:16:04 UTC (rev 36) @@ -0,0 +1,36 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * (c)Copyright 2006 Hewlett-Packard Development Company, LP. + * + */ + +#ifndef _PARSER_H248_HPP_ +#define _PARSER_H248_HPP_ + +#include "C_ProtocolFrame.hpp" + + +extern "C" C_ProtocolFrame::T_MsgError parse_h248 (char *P_buf, + size_t *P_size, + char *P_buf_header, + size_t P_size_header); + + +extern "C" char * filter_h248(char* P_buffer) ; + + +#endif // _PARSER_H248_HPP_ + Added: seagull/trunk/src/library-parser-msrp/parser_msrp.cpp =================================================================== --- seagull/trunk/src/library-parser-msrp/parser_msrp.cpp (rev 0) +++ seagull/trunk/src/library-parser-msrp/parser_msrp.cpp 2006-07-10 15:16:04 UTC (rev 36) @@ -0,0 +1,200 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * (c)Copyright 2006 Hewlett-Packard Development Company, LP. + * + */ + +#include "parser_msrp.hpp" +#include "iostream_t.hpp" +#include <regex.h> +#include "string_t.hpp" +#include "Utils.hpp" + + +C_ProtocolFrame::T_MsgError parse_msrp (char *P_buf, + size_t *P_size, + char *P_buf_header, + size_t P_size_header) { + + // C_ProtocolFrame::T_MsgError L_error = C_ProtocolFrame::E_MSG_ERROR_DECODING_SIZE_LESS ; + C_ProtocolFrame::T_MsgError L_error = C_ProtocolFrame::E_MSG_OK; + + return (L_error) ; +} + + +char* skip_blank(char *P_ptr, + char *P_buffer, + size_t P_size_buffer, + size_t *P_size) { + + char *L_blank_ptr = NULL ; + char *L_new_ptr = P_ptr ; + + + L_blank_ptr = P_ptr ; + while (((L_blank_ptr) && (L_blank_ptr < (P_buffer + P_size_buffer))) && + ((*L_blank_ptr == ' ') || + (*L_blank_ptr == '\t'))) { L_blank_ptr++ ; } + if (L_blank_ptr != P_ptr) { + *(P_size) = (L_blank_ptr - P_ptr) ; + L_new_ptr = L_blank_ptr ; + } + + return (L_new_ptr) ; +} + + +char * filter_msrp(char* P_buffer) { + + size_t L_size = 0 ; + + size_t L_size_buffer = 0 ; + size_t L_size_end = 0 ; + + char *L_pos = NULL ; + char *L_ptr = P_buffer ; + + char *L_result = NULL ; + char *L_new = NULL ; + + bool L_skip_blank = true ; + size_t L_size_blank = 0 ; + + + if ((P_buffer != NULL) && + ((L_size_buffer = strlen(P_buffer)) > 0 )) { + + L_size_end = L_size_buffer ; + + ALLOC_TABLE(L_result, + char*, + sizeof(char), + (2*L_size_buffer)); + + + if ((strchr(L_ptr,'\n')) == NULL) { + + L_new = L_result ; + L_size = L_size_buffer ; + + // skip blank + if (L_skip_blank) { + L_ptr = skip_blank(L_ptr,P_buffer, L_size_buffer, &L_size_blank) ; + L_size -= L_size_blank ; + } + + memcpy(L_new, L_ptr, L_size); + L_new += (L_size - 1) ; + if (*L_new != '\r') { + L_new += 1 ; + *L_new = '\r' ; + } + L_new += 2 ; + *L_new = '\0' ; + *(L_new-1) = '\n' ; + + } else { + // if '\n' exists + + while( (L_ptr) + && (L_pos = strchr(L_ptr,'\n')) != NULL) { + + L_size_blank = 0 ; + // L_size : from start to '\n' not included + L_size = L_pos - L_ptr ; + // skip blank + if (L_skip_blank) { + + L_ptr = skip_blank(L_ptr,P_buffer, L_size_buffer, &L_size_blank) ; + L_size -= L_size_blank ; + L_size_end -= L_size_blank ; + + } + + if (L_new == NULL) { L_new = L_result ; } else { L_new += 1 ; } + memcpy(L_new, L_ptr, L_size); + L_new += (L_size - 1) ; + // test end needed ? for L_ptr + if ((L_pos + 1) <= (P_buffer+L_size_buffer)) { + L_ptr = L_pos + 1 ; + } else { + L_ptr = NULL ; + } + + L_size_end -= (L_size + 1) ; + + if (*L_new != '\r') { + L_new += 1 ; + *(L_new) = '\r' ; + } + L_new += 1 ; + *(L_new) = '\n' ; + + } // while + + + // ctrl the end of buffer + if (L_size_end > 0) { + + L_size = L_size_end ; + L_size_blank = 0 ; + + // skip blank + if (L_skip_blank) { + + L_ptr = skip_blank(L_ptr,P_buffer, L_size_buffer, &L_size_blank) ; + L_size -= L_size_blank ; + } + + if (L_size) { + L_new +=1 ; + + memcpy(L_new, L_ptr, L_size); + L_new += (L_size-1) ; + + if (*L_new != '\r') { + L_new += 1 ; + *(L_new) = '\r' ; + } + L_new += 2 ; + *L_new = '\0' ; + *(L_new-1) = '\n' ; + } else { + // add final '\0' + L_new += 1 ; + *L_new = '\0' ; + } + } else { + // add final '\0' + L_new += 1 ; + *L_new = '\0' ; + + } + } + } + + if (L_result != NULL) { + L_ptr = L_result ; + while ((L_ptr = strstr(L_ptr, "\r\n\r\n")) != NULL ) { + memmove(L_ptr+2, L_ptr+4, strlen(L_ptr+4)); + L_ptr += 2 ; + } + } + + return (L_result); +} + Added: seagull/trunk/src/library-parser-msrp/parser_msrp.hpp =================================================================== --- seagull/trunk/src/library-parser-msrp/parser_msrp.hpp (rev 0) +++ seagull/trunk/src/library-parser-msrp/parser_msrp.hpp 2006-07-10 15:16:04 UTC (rev 36) @@ -0,0 +1,40 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * (c)Copyright 2006 Hewlett-Packard Development Company, LP. + * + */ + +#ifndef _PARSER_MSRP_HPP_ +#define _PARSER_MSRP_HPP_ + +#include "C_ProtocolFrame.hpp" + + +extern "C" C_ProtocolFrame::T_MsgError parse_msrp (char *P_buf, + size_t *P_size, + char *P_buf_header, + size_t P_size_header); + + +extern "C" char * filter_msrp(char* P_buffer) ; + + +#endif // _PARSER_MSRP_HPP_ + + + + + Modified: seagull/trunk/src/library-parser-xml/parser.cpp =================================================================== --- seagull/trunk/src/library-parser-xml/parser.cpp 2006-06-28 13:55:50 UTC (rev 35) +++ seagull/trunk/src/library-parser-xml/parser.cpp 2006-07-10 15:16:04 UTC (rev 36) @@ -21,10 +21,12 @@ #include "iostream_t.hpp" #include <regex.h> #include "string_t.hpp" +#include "Utils.hpp" - C_ProtocolFrame::T_MsgError parse_xml (char *P_buf, - size_t *P_size) { + size_t *P_size, + char *P_buf_header, + size_t P_size_header) { C_ProtocolFrame::T_MsgError L_error = C_ProtocolFrame::E_MSG_ERROR_DECODING ; regex_t L_reg_expr ; @@ -156,3 +158,166 @@ } +char* skip_blank(char *P_ptr, + char *P_buffer, + size_t P_size_buffer, + size_t *P_size) { + + char *L_blank_ptr = NULL ; + char *L_new_ptr = P_ptr ; + + + L_blank_ptr = P_ptr ; + while (((L_blank_ptr) && (L_blank_ptr < (P_buffer + P_size_buffer))) && + ((*L_blank_ptr == ' ') || + (*L_blank_ptr == '\t'))) { L_blank_ptr++ ; } + if (L_blank_ptr != P_ptr) { + *(P_size) = (L_blank_ptr - P_ptr) ; + L_new_ptr = L_blank_ptr ; + } + + return (L_new_ptr) ; +} + + + + +char * filter_xml(char* P_buffer) { + + size_t L_size = 0 ; + + size_t L_size_buffer = 0 ; + size_t L_size_end = 0 ; + + char *L_pos = NULL ; + char *L_ptr = P_buffer ; + + char *L_result = NULL ; + char *L_new = NULL ; + + bool L_skip_blank = true ; + size_t L_size_blank = 0 ; + + + if ((P_buffer != NULL) && + ((L_size_buffer = strlen(P_buffer)) > 0 )) { + + L_size_end = L_size_buffer ; + + ALLOC_TABLE(L_result, + char*, + sizeof(char), + (2*L_size_buffer... [truncated message content] |
From: <oja...@us...> - 2006-06-28 13:55:58
|
Revision: 35 Author: ojacques Date: 2006-06-28 06:55:50 -0700 (Wed, 28 Jun 2006) ViewCVS: http://svn.sourceforge.net/gull/?rev=35&view=rev Log Message: ----------- Clarify some error messages Modified Paths: -------------- seagull/trunk/src/external-data/C_ExternalDataControl.cpp seagull/trunk/src/protocol-data/ProtocolData.cpp Modified: seagull/trunk/src/external-data/C_ExternalDataControl.cpp =================================================================== --- seagull/trunk/src/external-data/C_ExternalDataControl.cpp 2006-06-28 10:14:16 UTC (rev 34) +++ seagull/trunk/src/external-data/C_ExternalDataControl.cpp 2006-06-28 13:55:50 UTC (rev 35) @@ -574,7 +574,7 @@ << "signed value = " << L_signed_value); L_value->m_value.m_val_signed = L_signed_value ; } else { - GEN_ERROR(E_GEN_FATAL_ERROR, "empty field for number expected" + GEN_ERROR(E_GEN_FATAL_ERROR, "Field empty where number value was expected" << " in file [" << m_file_name << "]"); L_ret = false ; @@ -606,7 +606,7 @@ << "unsigned value =" << L_unsigned_value); L_value->m_value.m_val_number = L_unsigned_value ; } else { - GEN_ERROR(E_GEN_FATAL_ERROR, "empty field for number expected" + GEN_ERROR(E_GEN_FATAL_ERROR, "Field empty where number value was expected" << " in file [" << m_file_name << "]"); } Modified: seagull/trunk/src/protocol-data/ProtocolData.cpp =================================================================== --- seagull/trunk/src/protocol-data/ProtocolData.cpp 2006-06-28 10:14:16 UTC (rev 34) +++ seagull/trunk/src/protocol-data/ProtocolData.cpp 2006-06-28 13:55:50 UTC (rev 35) @@ -373,7 +373,7 @@ L_value.m_value.m_val_signed = L_signed_value ; } } else { - GEN_ERROR(E_GEN_FATAL_ERROR, "empty field for number expected"); + GEN_ERROR(E_GEN_FATAL_ERROR, "Field empty where a signed number is expected"); P_result = -1 ; } } @@ -402,7 +402,7 @@ L_value.m_value.m_val_number = L_unsigned_value ; } } else { - GEN_ERROR(E_GEN_FATAL_ERROR, "empty field for number expected"); + GEN_ERROR(E_GEN_FATAL_ERROR, "Field empty where a number is expected"); P_result = -1 ; } } @@ -474,7 +474,7 @@ L_value.m_value.m_val_signed_64 = L_signed_value ; } } else { - GEN_ERROR(E_GEN_FATAL_ERROR, "empty field for number64 expected"); + GEN_ERROR(E_GEN_FATAL_ERROR, "Field empty where a signed number64 is expected"); P_result = -1 ; } } @@ -503,7 +503,7 @@ L_value.m_value.m_val_number_64 = L_unsigned_value ; } } else { - GEN_ERROR(E_GEN_FATAL_ERROR, "empty field for number64 expected"); + GEN_ERROR(E_GEN_FATAL_ERROR, "Field empty where a number64 is expected"); P_result = -1 ; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <oja...@us...> - 2006-06-28 10:14:35
|
Revision: 34 Author: ojacques Date: 2006-06-28 03:14:16 -0700 (Wed, 28 Jun 2006) ViewCVS: http://svn.sourceforge.net/gull/?rev=34&view=rev Log Message: ----------- Updated video. Modified Paths: -------------- doc/trunk/src/documentation/content/doc/seagull_01.flv Modified: doc/trunk/src/documentation/content/doc/seagull_01.flv =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <oja...@us...> - 2006-06-27 08:59:16
|
Revision: 33 Author: ojacques Date: 2006-06-27 01:59:06 -0700 (Tue, 27 Jun 2006) ViewCVS: http://svn.sourceforge.net/gull/?rev=33&view=rev Log Message: ----------- More explanations on dictionary parameters. Modified Paths: -------------- doc/trunk/src/documentation/content/xdocs/doc/core.xml Modified: doc/trunk/src/documentation/content/xdocs/doc/core.xml =================================================================== --- doc/trunk/src/documentation/content/xdocs/doc/core.xml 2006-06-23 08:33:42 UTC (rev 32) +++ doc/trunk/src/documentation/content/xdocs/doc/core.xml 2006-06-27 08:59:06 UTC (rev 33) @@ -1270,14 +1270,60 @@ </section> <section id="config_dict"> <title>Protocol dictionary</title> - <p>In order for Seagull to be versatile enough, messages and parameters of protocols - are described in an XML dictionary.</p> + <p>In Seagull, messages and parameters of protocols + are described in an XML dictionary. This allow a great flexibility to + add new messages or parameters. You can create as many dictionary as you want + for example for specific flavor or version of a protocol.</p> <p>To specify the dictionary, use the -dico option in the command line:</p> <source> -dico ../config/[dictionary-name].xml </source> <p>To be able to create a multi-protocol scenario, you can specify several dictionaries:</p> <source> -dico ../config/[dictionary_1-name].xml ../config/[dictionary_2-name].xml</source> - <p>A dictionary contains several XML sections: types, header, body, dictionary:</p> + <p>A dictionary contains several XML sections: protocol, types, header, body, dictionary:</p> <section> + <title>Protocol</title> + <p>"protocol": this is the top level section. Depending on the protocol, + some attributes can be configured there:</p> + <ul> + <li>Common for all protocols + <ul> + <li><strong>name</strong>: a name used to identify the protocol in the config file</li> + <li><strong>type</strong>: can be "binary" (like Diameter), "binary-body-not-interpreted", "external-library" (like OCTCAP) or "text" (like XCAP or H248 text)</li> + <li><strong>use-transport-library</strong>: "trans-ip" (TCP or UDP), "trans-extsctp" for SCTP, "trans-octcap" for OCTCAP.</li> + </ul> + </li> + <li>binary type + <ul> + <li><strong>padding</strong> (optional): padding to be used for message length. A padding of 4 will make sure that the message size is a multiple of 4 octets.</li> + <li><strong>length</strong> (optional): by default, Seagull will include the headers to compute the message length. + By putting length="header-excluded", Seagull will not include the headers to compute the message length.</li> + </ul> + </li> + <li>text type + <ul> + <li><strong>filter</strong>: specify a filter to be used when reading the XML scenario before sending it. + Used to remove heading and trailing spaces or tabs, add additional CR/LF, .... + Example: "lib=libparser_h248.so;function=filter_h248"</li> + <li><strong>field-separator</strong>: specify the text sequence to be appended for each line in the XML scenario. + Example: field-separator="\r\n" will replace the end of line of the scenario with "\r\n".</li> + <li><strong>body-separator</strong>: text sequence to be added between headers and body section. + Example: body-separator="\r\n" for XCAP, body-separator="{" for H248 text.</li> + </ul> + </li> + <li>external-library type + <ul> + <li><strong>context-factory-constructor</strong>: to be completed</li> + <li><strong>context-factory-destructor</strong>: to be completed</li> + </ul> + </li> + <li>binary-body-not-interpreted type + <ul> + <li></li> + </ul> + </li> + </ul> + <fixme author="Olivier">Add context-factory explanations</fixme> + </section> + <section> <title>Types</title> <p>"types" section contains all types needed for the protocol. An example of the Types section for Diameter protocol is available <a href="diameter.html#Types">there</a>.</p> @@ -1286,6 +1332,7 @@ <title>Header</title> <p>"header" section contains the description of message header. An example of the Types section for Diameter protocol is available <a href="diameter.html#Header">there</a>.</p> + <fixme author="Olivier">Add text / fielddef explanations (regexp for reception, format for construction)</fixme> </section> <section> <title>Body</title> @@ -1294,10 +1341,32 @@ the Types section for Diameter protocol is available <a href="diameter.html#Body">there</a>.</p> </section> <section> + <title>body-method</title> + <p>"body-method" section contains the methods to be used to parse the body. It is composed of several + "def-method" sections.</p> + <ul> + <li><strong>name</strong>: name of the body-method (can be anything)</li> + <li><strong>method</strong>: can be "length" (length of the body to be parsed is indicated in a parameter - see param) + or "parser"</li> + <li><strong>param</strong>: for "length" method: specify the parameter to be used to indicate body length + (example: param=Content-Length). + For "parser" method, indicate the library to be used as well as the function to be used + (example: for XCAP: "lib=libparser_xml.so;function=parse_xml", for H248: "lib=libparser_h248.so;function=parse_h248"</li> + </ul> + <p>Example:</p> + <fixme author="Olivier">Add body-method example</fixme> + </section> + <section> <title>Dictionary</title> - <p>"dictionary" section contains all possible parameters - and command-synchro. An example of - the Types section for Diameter protocol is available <a href="diameter.html#Dictionary">there</a>.</p> + <p>"dictionary" section contains all possible messages and parameters.</p> + <p>In addition, several attributes are available:</p> + <ul> + <li><strong>session-method</strong>: can be "field" (a session or "call" is identified + with a protocol field) or "open-id" (a session or "call" is identified with + the open id (eg a socket id in case of HTTP))</li> + <li><strong>session-id (optional)</strong>: only for "field" session-method: the field to be used to identify the session</li> + <li><strong>out-of-session-id (optional)</strong>: only for "field" session-method: the field to be used in backup of session-id</li> + </ul> </section> </section> </section> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <oja...@us...> - 2006-06-23 08:33:55
|
Revision: 32 Author: ojacques Date: 2006-06-23 01:33:42 -0700 (Fri, 23 Jun 2006) ViewCVS: http://svn.sourceforge.net/gull/?rev=32&view=rev Log Message: ----------- Diameter Sh application - provided by Perrin Morrow <pe...@op...> Added Paths: ----------- seagull/trunk/src/exe-env/diameter-env/run/start_client_sh.ksh seagull/trunk/src/exe-env/diameter-env/run/start_server_sh.ksh seagull/trunk/src/exe-env/diameter-env/scenario/udr-uda.client.xml seagull/trunk/src/exe-env/diameter-env/scenario/udr-uda.server.xml Added: seagull/trunk/src/exe-env/diameter-env/run/start_client_sh.ksh =================================================================== --- seagull/trunk/src/exe-env/diameter-env/run/start_client_sh.ksh (rev 0) +++ seagull/trunk/src/exe-env/diameter-env/run/start_client_sh.ksh 2006-06-23 08:33:42 UTC (rev 32) @@ -0,0 +1,24 @@ +#!/bin/ksh +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# (c)Copyright 2006 Hewlett-Packard Development Company, LP. +# +# Authors: Perrin Morrow <pe...@op...> +# + +export LD_LIBRARY_PATH=/usr/local/bin +seagull -conf ../config/conf.client.xml -dico ../config/base_sh.xml -scen ../scenario/udr-uda.client.xml -log ../logs/udr-uda.client.log -llevel ET + Property changes on: seagull/trunk/src/exe-env/diameter-env/run/start_client_sh.ksh ___________________________________________________________________ Name: svn:executable + * Added: seagull/trunk/src/exe-env/diameter-env/run/start_server_sh.ksh =================================================================== --- seagull/trunk/src/exe-env/diameter-env/run/start_server_sh.ksh (rev 0) +++ seagull/trunk/src/exe-env/diameter-env/run/start_server_sh.ksh 2006-06-23 08:33:42 UTC (rev 32) @@ -0,0 +1,25 @@ +#!/bin/ksh +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# (c)Copyright 2006 Hewlett-Packard Development Company, LP. +# +# Authors: Perrin Morrow <pe...@op...> +# + +export LD_LIBRARY_PATH=/usr/local/bin +seagull -conf ../config/conf.server.xml -dico ../config/base_sh.xml -scen ../scenario/udr-uda.server.xml -log ../logs/udr-uda.server.log -llevel ET + + Property changes on: seagull/trunk/src/exe-env/diameter-env/run/start_server_sh.ksh ___________________________________________________________________ Name: svn:executable + * Added: seagull/trunk/src/exe-env/diameter-env/scenario/udr-uda.client.xml =================================================================== --- seagull/trunk/src/exe-env/diameter-env/scenario/udr-uda.client.xml (rev 0) +++ seagull/trunk/src/exe-env/diameter-env/scenario/udr-uda.client.xml 2006-06-23 08:33:42 UTC (rev 32) @@ -0,0 +1,99 @@ +<!-- + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + (c)Copyright 2006 Hewlett-Packard Development Company, LP. + + Authors: Perrin Morrow <pe...@op...> + +--> + +<?xml version="1.0" encoding="ISO-8859-1" ?> +<scenario> + + <counter> + <counterdef name="HbH-counter" init="1000"></counterdef> + <counterdef name="EtE-counter" init="2000"></counterdef> + <counterdef name="session-counter" init="0"></counterdef> + </counter> + + <init> + <send channel="trans-ip-v4"> + <command name="CER"> + <avp name="Origin-Host" value="sh-client"></avp> + <avp name="Origin-Realm" value="seagull"></avp> + <avp name="Host-IP-Address" value="0x00017F000001"></avp> + <!-- IPV4 127.0.0.1--> + <avp name="Vendor-Id" value="11"></avp> + <avp name="Product-Name" value="Sh Interface"></avp> + <avp name="Origin-State-Id" value="1094807040"></avp> + <avp name="Supported-Vendor-Id" value="10415"></avp> + <avp name="Vendor-Specific-Application-Id"> + <avp name="Vendor-Id" value="10415"></avp> + <avp name="Auth-Application-Id" value="16777217"></avp> + </avp> + <avp name="Firmware-Revision" value="1"></avp> + </command> + </send> + + <receive channel="trans-ip-v4"> + <command name="CEA"> + </command> + </receive> + </init> + + <!-- Traffic --> + <traffic> + + <!-- User-Data-Request --> + <send channel="trans-ip-v4"> + <action> + <!-- For each request, increment the session-ID counter --> + <inc-counter name="HbH-counter"></inc-counter> + <inc-counter name="EtE-counter"></inc-counter> + <inc-counter name="session-counter"></inc-counter> + <set-value name="HbH-id" format="$(HbH-counter)"></set-value> + <set-value name="EtE-id" format="$(EtE-counter)"></set-value> + <set-value name="Session-Id" format="seagull;1096298391;$(session-counter)"></set-value> + </action> + <command name="UDR"> + <avp name="Session-Id" value="value_is_replaced"></avp> + <avp name="Auth-Session-State" value="1"></avp> + <avp name="Origin-Host" value="sh-client"></avp> + <avp name="Origin-Realm" value="seagull"></avp> + <avp name="Destination-Host" value="sh-server"></avp> + <avp name="Destination-Realm" value="seagull"></avp> + <avp name="User-Identity"> + <avp name="Public-Identity" value="sip:subscriber@seagull"></avp> + </avp> + <avp name="Data-Reference" value="10"></avp> <!-- IMS_PUBLIC_IDENTITY --> + </command> + <action> + <start-timer></start-timer> + </action> + </send> + + <receive channel="trans-ip-v4"> + <action> + <stop-timer></stop-timer> + </action> + <command name="UDA"> + </command> + </receive> + + </traffic> + +</scenario> + Added: seagull/trunk/src/exe-env/diameter-env/scenario/udr-uda.server.xml =================================================================== --- seagull/trunk/src/exe-env/diameter-env/scenario/udr-uda.server.xml (rev 0) +++ seagull/trunk/src/exe-env/diameter-env/scenario/udr-uda.server.xml 2006-06-23 08:33:42 UTC (rev 32) @@ -0,0 +1,79 @@ +<!-- + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + (c)Copyright 2006 Hewlett-Packard Development Company, LP. + + Authors: Perrin Morrow <pe...@op...> + +--> + +<?xml version="1.0" encoding="ISO-8859-1" ?> +<scenario> + + <init> + <receive channel="trans-ip-v4"> + <command name="CER"> + </command> + <action> + <store name="ven" entity="Vendor-Id"></store> + </action> + </receive> + + <send channel="trans-ip-v4"> + <command name="CEA"> + <avp name="Result-Code" value="2001"></avp> + <avp name="Origin-Host" value="sh-server"></avp> + <avp name="Origin-Realm" value="seagull"></avp> + <avp name="Host-IP-Address" value="0x00017F000001"></avp> + <avp name="Vendor-Id" value="0"></avp> + <avp name="Product-Name" value="HSS"></avp> + <avp name="Firmware-Revision" value="1"></avp> + </command> + </send> + </init> + + <traffic> + <receive channel="trans-ip-v4"> + <command name="UDR"> + <!-- Only need to specify what needs to be parsed --> + <avp name="Session-Id" value="dont_care"></avp> + </command> + <!-- Store action is at the end of the command --> + <action> + <store name="HbH" entity="HbH-id"></store> + <store name="E2E" entity="EtE-id"></store> + <store name="sid" entity="Session-Id"></store> + </action> + </receive> + + <send channel="trans-ip-v4"> + <!-- Restore action is before the command --> + <action> + <restore name="HbH" entity="HbH-id"></restore> + <restore name="E2E" entity="EtE-id"></restore> + <restore name="sid" entity="Session-Id"></restore> + </action> + <command name="UDA"> + <avp name="Session-Id" value="will_be_erased"></avp> + <avp name="Origin-Host" value="sh-server"></avp> + <avp name="Origin-Realm" value="seagull"></avp> + <avp name="Auth-Session-State" value="1"></avp> + <avp name="Result-Code" value="2001"></avp> + <avp name="User-Data" value="<Sh-Data> </Sh-Data>"></avp> + </command> + </send> + </traffic> +</scenario> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |