diff --git a/.jenkins.sh b/.jenkins.sh old mode 100644 new mode 100755 diff --git a/.project b/.project index d9fcf2fb1677e3a9d5497f3889e48a87236c98b5..fc1332f22fdf8f107e4307e7eb8fdbaec2f00f07 100644 --- a/.project +++ b/.project @@ -15,4 +15,16 @@ org.eclipse.titan.designer.core.TITANNature org.eclipse.titan.log.viewer.TitanLogProject + + + ccsrc/Protocols/Tcp/Abstract_Socket.cc + 1 + C:/Users/yann/Documents/wireshark/cygwin64/home/yann/frameworks/titan/titan.core/performance_test/SIPApplibPerfTest/src/Abstract_Socket.cc + + + ccsrc/Protocols/Tcp/Abstract_Socket.hh + 1 + C:/Users/yann/Documents/wireshark/cygwin64/home/yann/frameworks/titan/titan.core/performance_test/SIPApplibPerfTest/src/Abstract_Socket.hh + + diff --git a/README.md b/README.md index 1a0c8227aeb262aa33b742bfd93468e3e7482ac2..117b56ca7265f1e753b1803d1f74c6b42d5f7479 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,25 @@ -NG112 +# NG112 + +## Introduction This repositories contains the test specifications and test adapter code. -Contact information +## Contact information Email at cti_support at etsi dot org -License +## License Unless specified otherwise, the content of this repository and the files contained are released under the ETSI Software License. See the attached LICENSE file or visit https://forge.etsi.org/etsi-software-license + +## Standard links +- Next Generation 112 Long Term Definition, accessible [here](http://www.eena.org/uploads/gallery/files/pdf/2013-03-15-eena_ng_longtermdefinitionupdated.pdf) + +## RFC links +- RFC 5222 - LoST: A Location-to-Service Translation Protocol, accessible [here](https://tools.ietf.org/html/rfc5222) +- RFC 5985 - HELD, accessible [here](https://tools.ietf.org/html/rfc5985) +- RFC 6155 - Use of Device Identity in HTTP-Enabled Location Delivery (HELD), accessible [here](https://tools.ietf.org/html/rfc6155) +- RFC 3863 - Presence Information Data Format (PIDF), accessible [here](https://tools.ietf.org/html/rfc3863) +- RFC 4119 - A Presence-based GEOPRIV Location Object Format, accessible [here](https://tools.ietf.org/html/rfc4119) +- RFC 7459 - Representation of Uncertainty and Confidence in the Presence Information Data Format Location Object (PIDF-LO), accessible [here](https://tools.ietf.org/html/rfc7459) + +NOTE All draft can be found in the 'IETF XML Registry', accessible [here](https://www.iana.org/assignments/xml-registry/xml-registry.xhtml) diff --git a/ccsrc/EncDec/LibHttp/LibItsHttp_Encdec.cc b/ccsrc/EncDec/LibHttp/LibItsHttp_Encdec.cc new file mode 100644 index 0000000000000000000000000000000000000000..63ee4c7dad7925100bffa7f69708c0ec4a74bbb1 --- /dev/null +++ b/ccsrc/EncDec/LibHttp/LibItsHttp_Encdec.cc @@ -0,0 +1,28 @@ + +#include "LibItsHttp_MessageBodyTypes.hh" + +#include "http_codec.hh" + +#include "loggers.hh" + +namespace LibItsHttp__EncdecDeclarations { + + BITSTRING fx__enc__http__message(const LibItsHttp__TypesAndValues::HttpMessage& p) { + loggers::get_instance().log_msg(">>> fx__enc__http__message: ", (const Base_Type&)p); + + OCTETSTRING os; + http_codec codec; + codec.encode(p, os); + + return oct2bit(os); + } + INTEGER fx__dec__http__message(BITSTRING& pdu, LibItsHttp__TypesAndValues::HttpMessage& p) { + loggers::get_instance().log_msg(">>> fx__dec__http__message: ", pdu); + + OCTETSTRING os = bit2oct(pdu); + http_codec codec; + codec.decode(os, p); + + return 0; + } +} // End of namespace LibItsHttp__EncdecDeclarations diff --git a/ccsrc/EncDec/LibSip/LibSip_Encdec.cc b/ccsrc/EncDec/LibSip/LibSip_Encdec.cc new file mode 100644 index 0000000000000000000000000000000000000000..79bf839d2be3cc5726f960ad466f5344d3374156 --- /dev/null +++ b/ccsrc/EncDec/LibSip/LibSip_Encdec.cc @@ -0,0 +1,119 @@ + +#include "LibSip_EncdecDeclarations.hh" +#include "LibSip_XMLTypes.hh" + +#include "sip_codec_register_request.hh" +#include "sip_codec_invite_request.hh" + +#include "loggers.hh" + +namespace LibSip__EncdecDeclarations { + + BITSTRING fx__enc__Request(const LibSip__SIPTypesAndValues::Request& p) { + loggers::get_instance().log_msg(">>> fx__enc__Request: ", p); + + float duration; + std::string tag("fx__enc__Request"); + loggers::get_instance().set_start_time(tag); + + OCTETSTRING os; + sip_codec_request codec; + if (codec.encode(p, os) == -1) { + loggers::get_instance().warning("fx__enc__Request -1 result code was returned"); + return int2bit(0, 1); + } + loggers::get_instance().set_stop_time(tag, duration); + + return oct2bit(os); + } + + BITSTRING fx__enc__REGISTER__Request(const LibSip__SIPTypesAndValues::REGISTER__Request& p) { + loggers::get_instance().log_msg(">>> fx__enc__REGISTER__Request: ", p); + + float duration; + std::string tag("fx__enc__REGISTER__Request"); + loggers::get_instance().set_start_time(tag); + + OCTETSTRING os; + sip_codec_register_request codec; + if (codec.encode(p, os) == -1) { + loggers::get_instance().warning("fx__enc__REGISTER__Request: -1 result code was returned"); + return int2bit(0, 1); + } + loggers::get_instance().set_stop_time(tag, duration); + + return oct2bit(os); + } + + BITSTRING fx__enc__INVITE__Request(const LibSip__SIPTypesAndValues::INVITE__Request& p) { + loggers::get_instance().log_msg(">>> fx__enc__INVITE__Request: ", p); + + float duration; + std::string tag("fx__enc__INVITE__Request"); + loggers::get_instance().set_start_time(tag); + + OCTETSTRING os; + sip_codec_invite_request codec; + if (codec.encode(p, os) == -1) { + loggers::get_instance().warning("fx__enc__INVITE__Request: -1 result code was returned"); + return int2bit(0, 1); + } + loggers::get_instance().set_stop_time(tag, duration); + + return oct2bit(os); + } + + BITSTRING fx__enc__OPTIONS__Request(const LibSip__SIPTypesAndValues::OPTIONS__Request& p) { return BITSTRING(); } + BITSTRING fx__enc__BYE__Request(const LibSip__SIPTypesAndValues::BYE__Request& p) { return BITSTRING(); } + BITSTRING fx__enc__CANCEL__Request(const LibSip__SIPTypesAndValues::CANCEL__Request& p) { return BITSTRING(); } + BITSTRING fx__enc__ACK__Request(const LibSip__SIPTypesAndValues::ACK__Request& p) { return BITSTRING(); } + BITSTRING fx__enc__PRACK__Request(const LibSip__SIPTypesAndValues::PRACK__Request& p) { return BITSTRING(); } + BITSTRING fx__enc__NOTIFY__Request(const LibSip__SIPTypesAndValues::NOTIFY__Request& p) { return BITSTRING(); } + BITSTRING fx__enc__SUBSCRIBE__Request(const LibSip__SIPTypesAndValues::SUBSCRIBE__Request& p) { return BITSTRING(); } + BITSTRING fx__enc__PUBLISH__Request(const LibSip__SIPTypesAndValues::PUBLISH__Request& p) { return BITSTRING(); } + BITSTRING fx__enc__UPDATE__Request(const LibSip__SIPTypesAndValues::UPDATE__Request& p) { return BITSTRING(); } + BITSTRING fx__enc__REFER__Request(const LibSip__SIPTypesAndValues::REFER__Request& p) { return BITSTRING(); } + BITSTRING fx__enc__MESSAGE__Request(const LibSip__SIPTypesAndValues::MESSAGE__Request& p) { return BITSTRING(); } + BITSTRING fx__enc__INFO__Request(const LibSip__SIPTypesAndValues::INFO__Request& p) { return BITSTRING(); } + BITSTRING fx__enc__Response(const LibSip__SIPTypesAndValues::Response& p) { return BITSTRING(); } + BITSTRING fx__enc__Raw(const CHARSTRING& p) { return BITSTRING(); } + BITSTRING fx__enc__SMS(const LibSip__SimpleMsgSummaryTypes::SimpleMsgSummary& pdu) { return BITSTRING(); } + BITSTRING fx__enc__MessageBody(const LibSip__MessageBodyTypes::MessageBody& pdu) { return BITSTRING(); } + INTEGER fx__dec__Request(BITSTRING& pdu, LibSip__SIPTypesAndValues::Request& p) { return INTEGER(0); } + + INTEGER fx__dec__REGISTER__Request(BITSTRING& pdu, LibSip__SIPTypesAndValues::REGISTER__Request& p) { + loggers::get_instance().log_msg(">>> fx__dec__REGISTER__Request: ", pdu); + + OCTETSTRING os = bit2oct(pdu); + sip_codec_register_request codec; + codec.decode(os, p); + + return 0; + } + + INTEGER fx__dec__INVITE__Request(BITSTRING& pdu, LibSip__SIPTypesAndValues::INVITE__Request& p) { + loggers::get_instance().log_msg(">>> fx__dec__INVITE__Request: ", pdu); + + OCTETSTRING os = bit2oct(pdu); + sip_codec_invite_request codec; + codec.decode(os, p); + + return 0; + } + + INTEGER fx__dec__OPTIONS__Request(BITSTRING& pdu, LibSip__SIPTypesAndValues::OPTIONS__Request& p) { return INTEGER(0); } + INTEGER fx__dec__BYE__Request(BITSTRING& pdu, LibSip__SIPTypesAndValues::BYE__Request& p) { return INTEGER(0); } + INTEGER fx__dec__CANCEL__Request(BITSTRING& pdu, LibSip__SIPTypesAndValues::CANCEL__Request& p) { return INTEGER(0); } + INTEGER fx__dec__ACK__Request(BITSTRING& pdu, LibSip__SIPTypesAndValues::ACK__Request& p) { return INTEGER(0); } + INTEGER fx__dec__PRACK__Request(BITSTRING& pdu, LibSip__SIPTypesAndValues::PRACK__Request& p) { return INTEGER(0); } + INTEGER fx__dec__NOTIFY__Request(BITSTRING& pdu, LibSip__SIPTypesAndValues::NOTIFY__Request& p) { return INTEGER(0); } + INTEGER fx__dec__SUBSCRIBE__Request(BITSTRING& pdu, LibSip__SIPTypesAndValues::SUBSCRIBE__Request& p) { return INTEGER(0); } + INTEGER fx__dec__PUBLISH__Request(BITSTRING& pdu, LibSip__SIPTypesAndValues::PUBLISH__Request& p) { return INTEGER(0); } + INTEGER fx__dec__UPDATE__Request(BITSTRING& pdu, LibSip__SIPTypesAndValues::UPDATE__Request& p) { return INTEGER(0); } + INTEGER fx__dec__REFER__Request(BITSTRING& pdu, LibSip__SIPTypesAndValues::REFER__Request& p) { return INTEGER(0); } + INTEGER fx__dec__MESSAGE__Request(BITSTRING& pdu, LibSip__SIPTypesAndValues::MESSAGE__Request& p) { return INTEGER(0); } + INTEGER fx__dec__INFO__Request(BITSTRING& pdu, LibSip__SIPTypesAndValues::INFO__Request& p) { return INTEGER(0); } + INTEGER fx__dec__Response(BITSTRING& pdu, LibSip__SIPTypesAndValues::Response& p) { return INTEGER(0); } + INTEGER fx__dec__SMS(BITSTRING& pdu, LibSip__SimpleMsgSummaryTypes::SimpleMsgSummary& p) { return INTEGER(0); } + INTEGER fx__dec__MessageBody(BITSTRING& pdu, LibSip__MessageBodyTypes::MessageBody& p) { return INTEGER(0); } +} // End of namespace LibSip__EncdecDeclarations diff --git a/ccsrc/EncDec/LibSip/LibSip_SMSFunctions_Encdec.cc b/ccsrc/EncDec/LibSip/LibSip_SMSFunctions_Encdec.cc new file mode 100644 index 0000000000000000000000000000000000000000..65e0af8cc95a391b028b21fe17c22ce0087fe2d6 --- /dev/null +++ b/ccsrc/EncDec/LibSip/LibSip_SMSFunctions_Encdec.cc @@ -0,0 +1,9 @@ +#include "LibSip_SMSFunctions.hh" + +#include "loggers.hh" + +namespace LibSip__SMSFunctions { + + HEXSTRING fx__GetSC__TimeStamp(const INTEGER& p__TimeZone) { return int2hex(0, 14); }; + +} // End of namespace LibSip__SMSFunctions diff --git a/ccsrc/EncDec/LibSip/LibSip_Steps_Encdec.cc b/ccsrc/EncDec/LibSip/LibSip_Steps_Encdec.cc new file mode 100644 index 0000000000000000000000000000000000000000..8fd63692301b02d28172da4963fd16fcd9519bb9 --- /dev/null +++ b/ccsrc/EncDec/LibSip/LibSip_Steps_Encdec.cc @@ -0,0 +1,12 @@ +#include "LibSip_Steps.hh" + +#include "loggers.hh" + +namespace LibSip__Steps { + + CHARSTRING fx__rndStr() { return CHARSTRING(""); }; + CHARSTRING fx__putInLowercase(const CHARSTRING& p__string) { return CHARSTRING(""); }; + CHARSTRING fx__getIpAddr(const CHARSTRING& p__host__name) { return CHARSTRING(""); }; + CHARSTRING fx__calculateDigestResponse(const CHARSTRING& p__nonce, const CHARSTRING& p__cnonce, const CHARSTRING& p__user, const CHARSTRING& p__realm, const CHARSTRING& p__passwd, const CHARSTRING& p__alg, const CHARSTRING& p__nonceCount, const CHARSTRING& p__method, const CHARSTRING& p__qop, const CHARSTRING& p__URI, const CHARSTRING& p__HEntity) { return CHARSTRING(""); }; + +} // End of namespace LibSip__Steps diff --git a/ccsrc/EncDec/LibSip/LibSip_Templates_Encdec.cc b/ccsrc/EncDec/LibSip/LibSip_Templates_Encdec.cc new file mode 100644 index 0000000000000000000000000000000000000000..2c68f22cdfaecf05680cf3ebfc960365d5daa729 --- /dev/null +++ b/ccsrc/EncDec/LibSip/LibSip_Templates_Encdec.cc @@ -0,0 +1,9 @@ +#include "LibSip_Templates.hh" + +#include "loggers.hh" + +namespace LibSip__Templates { + + INTEGER fx__calculateXMLBodyLen(const LibSip__XMLTypes::XmlBody& p__mb) { return INTEGER(0); }; + +} // End of namespace LibSip__Templates diff --git a/ccsrc/Framework/include/codec.hh b/ccsrc/Framework/include/codec.hh new file mode 100644 index 0000000000000000000000000000000000000000..9a6f4b5f8fd421de77de70eb4d0e9166cf634a7f --- /dev/null +++ b/ccsrc/Framework/include/codec.hh @@ -0,0 +1,63 @@ +/*! + * \file codec.hh + * \brief Header file for ITS abstract codec definition. + * \author ETSI STF525 + * \copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + * \version 0.1 + */ +#pragma once + +#include "params.hh" + +class OCTETSTRING; //! Declare TITAN class +class CHARSTRING; //! Declare TITAN class +class BITSTRING; //! Declare TITAN class + +/*! + * \class codec + * \brief This class provides the interface for all ITS codecs, include UT and AC codecs + * \abstract + */ +template +class codec { +protected: + params* _params; //! Reference to params stack + // \todo Use smart pointer std::unique_ptr + +public: //! \publicsection + /*! + * \fn codec(); + * \brief Default constructor + * \todo Remove logs + */ + explicit codec() : _params(nullptr) { }; + /*! + * \fn ~codec(); + * \brief Default destructor + * \virtual + * \todo Remove logs + */ + virtual ~codec() { }; + /*! + * \fn int encode(const TPDUEnc& msg, OCTETSTRING& data); + * \brief Encode typed message into an octet string + * \param[in] p_message The typed message to be encoded + * \param[out] p_data The encoding result + * \return 0 on success, -1 otherwise + * \pure + */ + virtual int encode(const TPDUEnc& p_message, OCTETSTRING& p_data) = 0; + /*! + * \fn int decode(const OCTETSTRING& p_, TPDUDec& p_message, params* p_params = NULL); + * \brief Encode typed message into an octet string format + * \param[in] p_data The message in its octet string + * \param[out] p_message The decoded typed message + * \return 0 on success, -1 otherwise + * \pure + */ + virtual int decode(const OCTETSTRING& p_, TPDUDec& p_message, params* p_params = NULL) = 0; +}; // End of class codec + diff --git a/ccsrc/Framework/include/codec_factory.hh b/ccsrc/Framework/include/codec_factory.hh new file mode 100644 index 0000000000000000000000000000000000000000..cbded3be724a677707e837a0f89c22375d02b3cd --- /dev/null +++ b/ccsrc/Framework/include/codec_factory.hh @@ -0,0 +1,46 @@ +/*! + * \file codec_factory.hh + * \brief Header file for ITS abstract protocol codec definition. + * \author ETSI STF525 + * \copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + * \version 0.1 + */ +#pragma once + +#include +#include +#include +#include + +#include "codec.hh" + +class Record_Type; //! TITAN forward declaration + +/*! + * \class codec_factory + * \brief This class provides a factory class to create codec class instances + * \abstract + */ +class codec_factory { +public: //! \publicsection + /*! + * \fn codec(); + * \brief Default constructor + */ + codec_factory() { }; + /*! + * \fn codec* create_codec(const std::string & type, const std::string & param); + * \brief Create the codecs stack based on the provided codecs stack description (cf. remark) + * \param[in] p_type The provided codecs stack description + * \param[in] p_params Optional parameters + * \return 0 on success, -1 otherwise + * \remark The description below introduces codecs stack in case of ITS project: + * HTTP(codecs=xml:held_codec;html:html_codec,json:json_codec)/TCP(debug=1,server=httpbin.org,port=80,use_ssl=0) + * \pure + */ + virtual codec* create_codec() = 0; +}; // End of class codec_factory + diff --git a/ccsrc/Framework/include/codec_stack_builder.hh b/ccsrc/Framework/include/codec_stack_builder.hh new file mode 100644 index 0000000000000000000000000000000000000000..1a4d430c1e204cd77bcfa5c23834032296a1e2fa --- /dev/null +++ b/ccsrc/Framework/include/codec_stack_builder.hh @@ -0,0 +1,74 @@ +/*! + * \file codec_stack_builder.hh + * \brief Header file for ITS protocol stack builder. + * \author ETSI STF525 + * \copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + * \version 0.1 + */ +#pragma once + +#include "codec_factory.hh" + +class Record_Type; //! TITAN forward declaration + +/*! + * \class codec_stack_builder + * \brief This class provides a factory class to create Codec class instances + */ +class codec_stack_builder { +private: //! \privatesection + static codec_stack_builder* _instance; //! Smart pointer to the unique instance of the logger framework + std::map _codecs; //! The list of the registered \see t_codec factories + + /*! + * \brief Default constructor + * Create a new instance of the codec_stack_builder class + * \private + */ + codec_stack_builder() { }; // can not be created manually +public: //! \publicsection + /*! + * \fn codec_stack_builder* get_instance(); + * \brief Accessor for the unique instance of the logger framework + * \static + */ + static codec_stack_builder* get_instance() { return _instance ? _instance : _instance = new codec_stack_builder(); }; + + /*! + * \fn void register_codec_factory(const std::string & p_type, codec_factory* p_codec_factory); + * \brief Add a new codec factory + * \param[in] p_type The codec identifier (e.g. GN for the GeoNetworking codec...) + * \param[in] p_codec_factory A reference to the \see codec_factory + * \static + */ + static void register_codec_factory(const std::string & p_type, codec_factory* p_codec_factory) { codec_stack_builder::get_instance()->_register_codec_factory(p_type, p_codec_factory); }; + +private: //! \privatesection + /*! + * \fn void _register_codec_factory(const std::string & p_type, codec_factory* p_codec_factory); + * \brief Add a new codec factory + * \param[in] p_type The codec identifier (e.g. GN for the GeoNetworking codec...) + * \param[in] p_codec_factory A reference to the \see codec_factory + */ + void _register_codec_factory(const std::string & p_type, codec_factory* p_codec_factory) { _codecs[p_type] = p_codec_factory; }; + +public: //! \publicsection + /*! + * \fn codec* get_codec(const char* p_codec_name); + * \brief Retrieve the specified codec name from the list of the registered codecs + * \param[in] p_codec_name The codec indentifier + * \return The pointer to the codec object on success, nullptr otherwise + */ + inline codec* get_codec(const char* p_codec_name) { // NOTE A virtual method cannot not be a template ==> polymorphism required here + typename std::map::const_iterator it = _codecs.find(p_codec_name); + if (it != _codecs.cend()) { + return it->second->create_codec(); + } + + return nullptr; + } +}; // End of class codec_stack_builder + diff --git a/ccsrc/Framework/include/converter.hh b/ccsrc/Framework/include/converter.hh new file mode 100644 index 0000000000000000000000000000000000000000..5d679847e1bc996b96b5bbf6537b20a9d9e301fe --- /dev/null +++ b/ccsrc/Framework/include/converter.hh @@ -0,0 +1,356 @@ +/*! + * \file converter.hh + * \brief Helper class for types converter. + * \author ETSI STF525 + * \copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + * \version 0.1 + */ +#pragma once + +#include +#include +#include + +#include +#include +#include + +#include +#include +#include // LONG_MAX, LLONG_MAX +#include // time_t, struct tm, difftime, time, mktime + +/*! + * \class converter + * \brief This class provide a set of methods for types conversions + * \remark Singleton pattern + */ +class converter { + + /*! + * \brief Unique static object reference of this class + */ + static converter * instance; + + /*! + * \brief Default private ctor + */ + converter() {}; + /*! + * \brief Default private dtor + */ + ~converter() { + if (instance != NULL) { + delete instance; + instance = NULL; + } + }; + +public: /*! \publicsection */ + /*! + * \brief Public accessor to the single object reference + */ + inline static converter & get_instance() { + if (instance == NULL) instance = new converter(); + return *instance; + }; + +public: + /*! + * \enum endian_t + * \brief Endianess style + */ + typedef enum { + big_endian, + little_endian + } endian_t; + +public: + /*! + * \brief Convert a Binary Coded Decimal value into a binary value + * \param[in] p_value The BDC value + * \return The binary value + * \inline + */ + inline uint8_t bcd_to_bin(const uint8_t p_value) { + return ((p_value / 16 * 10) + (p_value % 16)); + }; + + /*! + * \brief Convert a binary value into a Binary Coded Decimal value + * \param[in] p_value The binary value + * \return The BCD value + * \inline + */ + inline uint8_t bin_to_bcd(const uint8_t p_value) { + return ((p_value / 10 * 16) + (p_value % 10)); + }; + + /*! + * \brief Swap two bytes length value (e.g. 0xCAFE becomes 0xFECA) + * \param[in] p_value The value to swap + * \return The swapped value + * \inline + */ + uint16_t swap(const uint16_t p_value); + inline int16_t swap(const int16_t p_value) { + return static_cast(swap(static_cast(p_value))); + }; + /*! + * \brief Swap four bytes length value (used for littel endian / big endian) + * \param[in] p_value The value to swap + * \return The swapped value + */ + uint32_t swap(const uint32_t p_value); + inline int32_t swap(const int32_t p_value) { + return static_cast(swap(static_cast(p_value))); + }; + + /*! + * \brief Convert a string into an hexadecimal string + * \param[in] p_value The string value + * \return The hexadecimal value + */ + std::string string_to_hexa(const std::string & p_value); + /*! + * \brief Convert a bytes array int32_t an hexadecimal string + * \param[in] p_value The bytes array value + * \return The hexadecimal value + */ + std::string bytes_to_hexa(const std::vector & p_value); + /*! + * \brief Convert an hexadecimal string into a bytes array + * \param[in] p_value The hexadecimal value + * \return The bytes array value + */ + std::vector hexa_to_bytes(const std::string & p_value); + + /*! + * \brief Convert a time in time_t format into a string formated according to RFC 822, 1036, 1123, 2822 + * \param[in] p_time The time to convert in time_t format + * \return The time string formated + * \see http://www.unixtimestamp.com/ + * @code + * std::string result = time_to_string(1489755780); + * result.compare("Fri, 17 Mar 2017 13:03:00 +0000") == 0 // When time zone is set to UTC + * @endcode + * \remark Use commands 1) timedatectl to change your machine timezone (e.g. sudo timedatectl set-timezone UTC to change machine timezone to UTC, 2) timedatectl list-timezones to get the list of the timezones) + */ + std::string time_to_string(const time_t p_time); + /*! + * \brief Convert a time in struct tm format into a string formated according to RFC 822, 1036, 1123, 2822 + * \param[in] p_time The time to convert in struct tm format + * \return The time string formated + * \see http://www.unixtimestamp.com/ + */ + std::string time_to_string(const struct tm & p_time); + + /*! + * \brief Convert a 16-bits integer (int16_t) into a bytes array + * \param[in] p_value The 16-bits integer value + * \param[in] p_endianess Endianess style. Default: big_endian + * \return The bytes array value + */ + inline std::vector short_to_bytes(const int16_t p_value, const endian_t p_endianess = big_endian) const { + std::vector result(sizeof(short), 0x00); + for (int i = sizeof(short) - 1; i >= 0; i--) { + int offset = (sizeof(short) - 1 - i) * 8; + result[i] = static_cast((p_value >> offset) & 0xFF); + } // End of 'for' statement + return result; + }; // End of short_to_bytes + + /*! + * \brief Convert a bytes array into a 16-bits integer (int16_t) + * \param[in] p_value The bytes array + * \param[in] p_endianess Endianess style. Default: big_endian + * \return The 16-bits integer on success, SHRT_MAX on error (wrong bytes array size) + */ + inline int16_t bytes_to_short(const std::vector & p_value, const endian_t p_endianess = big_endian) const { + // Sanity check + if (p_value.size() > sizeof(short)) { + return SHRT_MAX; + } + int16_t value = 0; + for (size_t i = 0; i < p_value.size(); i++) { + value = (value << 8) + (p_value[i] & 0xff); + } // End of 'for' statement + return value; + }; // End of bytes_to_short + + /*! + * \brief Convert a 32-bits integer (int32_t) into a bytes array + * \param[in] p_value The 32-bits integer value + * \param[in] p_endianess Endianess style. Default: big_endian + * \return The bytes array value + */ + inline std::vector int_to_bytes(const int32_t p_value, const endian_t p_endianess = big_endian) const { + /*uint8_t bytes[sizeof(p_value)]; + std::copy( + static_cast(static_cast(&p_value)), + static_cast(static_cast(&p_value)) + sizeof(p_value), + bytes + ); + std::vector result(bytes, bytes + sizeof(bytes) / sizeof(uint8_t));*/ + std::vector result(sizeof(int), 0x00); + for (int i = sizeof(int) - 1; i >= 0; i--) { + int offset = (sizeof(int) - 1 - i) * 8; + result[i] = static_cast((p_value >> offset) & 0xFF); + } // End of 'for' statement + return result; + }; // End of int_to_bytes + + /*! + * \brief Convert a bytes array into a 32-bits integer (int32_t) + * \param[in] p_value The bytes array + * \param[in] p_endianess Endianess style. Default: big_endian + * \return The 32-bits integer on success, LONG_MAX on error (wrong bytes array size) + */ + inline int32_t bytes_to_int(const std::vector & p_value, const endian_t p_endianess = big_endian) const { + // Sanity check + if (p_value.size() > sizeof(int)) { + return INT_MAX; + } + int32_t value = 0; + for (size_t i = 0; i < p_value.size(); i++) { + value = (value << 8) + (p_value[i] & 0xff); + } // End of 'for' statement + return value; + // return *((int *)(&p_value[0])); + }; // End of bytes_to_int + + /*! + * \brief Convert a 64-bits integer (int64_t) into a bytes array + * \param[in] p_value The 64-bits integer value + * \param[in] p_endianess Endianess style. Default: big_endian + * \return The bytes array value + */ + inline std::vector long_to_bytes(const int64_t p_value, const endian_t p_endianess = big_endian) const { + /*uint8_t bytes[sizeof(p_value)]; + std::copy( + static_cast(static_cast(&p_value)), + static_cast(static_cast(&p_value)) + sizeof(p_value), + bytes + ); + std::vector result(bytes, bytes + sizeof(bytes) / sizeof(uint8_t));*/ + std::vector result(sizeof(int64_t), 0x00); + for (int i = sizeof(int64_t) - 1; i >= 0; i--) { + int offset = (sizeof(int64_t) - 1 - i) * 8; + result[i] = static_cast((p_value >> offset) & 0xFF); + } // End of 'for' statement + return result; + }; // End of long_to_bytes + + /*! + * \brief Convert a bytes array into a 64-bits integer (int64_t) + * \param[in] p_value The bytes array + * \param[in] p_endianess Endianess style. Default: big_endian + * \return The 64-bits integer on success, LLONG_MAX on error (wrong bytes array size) + */ + inline int64_t bytes_to_long(const std::vector & p_value, const endian_t p_endianess = big_endian) const { + // Sanity check + if (p_value.size() > sizeof(int64_t)) { + return LLONG_MAX; + } + int64_t value = 0; + for (size_t i = 0; i < p_value.size(); i++) { + value = (value << 8) + (p_value[i] & 0xff); + } // End of 'for' statement + return value; + // return *((long *)(&p_value[0])); + }; // End of bytes_to_long + + /*! + * \brief Convert a float value into a bytes array + * \param[in] p_value The float value + * \return The bytes array value + */ + inline std::vector float_to_bytes(const float p_value) const { + uint8_t bytes[sizeof(p_value)]; + std::copy( + static_cast(static_cast(&p_value)), + static_cast(static_cast(&p_value)) + sizeof(p_value), + bytes + ); + std::vector result(bytes, bytes + sizeof(bytes) / sizeof(uint8_t)); + return result; + }; // End of float_to_long + + /*! + * \brief Convert a bytes array into a float + * \param[in] p_value The bytes array + * \return The float value + */ + inline float bytes_to_float(const std::vector & p_value) const { + return *((float *)(&p_value[0])); + }; // End of bytes_to_float + + /*! + * \brief Convert a string into a bytes array + * \param[in] p_value The string value + * \return The bytes array value + */ + inline std::vector string_to_bytes(const std::string & p_value) const { + return std::vector(p_value.begin(), p_value.end()); + }; // End of string_to_bytes + + /*! + * \brief Convert a bytes array into a string + * \param[in] p_value The bytes array value + * \return The string value + */ + inline std::string bytes_to_string(const std::vector & p_value) const { + return std::string(p_value.begin(), p_value.end()); + }; // End of bytes_to_string + +public: + /*! + * \brief Convert a string into an integer + * \param[in] p_value The string value + * \return The integer value + */ + inline int32_t string_to_int(const std::string & p_value) const { + return std::stoi(p_value); + //return atoi(p_value.c_str()); + }; // End of string_to_int + + /*! + * \brief Convert an integer into a string + * \param[in] p_value The integer value + * \return The string value + */ + inline std::string int_to_string(const int32_t & p_value) const { + std::ostringstream ss; + ss << p_value; + return ss.str(); + }; // End of string_to_bytes + +public: + + /*! + * \brief Returns a copy of the string, with leading and trailing special characters omitted + * \param[in] p_value The string value + * \param[in] p_trim_chars The special characters to be omitted. Default: ' ' and TAB + * \return The new string value + */ + std::string trim(const std::string& p_value, const std::string& p_trim_chars = " \t"); + + /*! + * \brief Convert the provided string into a list of arguments + * \param[in] p_value The string value + * \return The arguments list + * \code{.cc} + * std::string str = "--host localhost --port 12345 --duration -1"; + * std::vector tokens = converter::get_instance().split_arguments_line(str); + * std::clog << "Tokens: " << std::endl; + * for (auto it = tokens.begin(); it != tokens.end(); ++it) { + * std::clog << " " << *it << std::endl; + * } + * \endcode + */ + std::vector split_arguments_line(const std::string & p_value); + +}; // End of class converter diff --git a/ccsrc/Framework/include/layer.hh b/ccsrc/Framework/include/layer.hh new file mode 100644 index 0000000000000000000000000000000000000000..abd4eae428e1ea02df86579dc72a996e2dd5970d --- /dev/null +++ b/ccsrc/Framework/include/layer.hh @@ -0,0 +1,144 @@ +/*! + * \file layer.hh + * \brief Header file for ITS abstract protocol layer definition. + * \author ETSI STF525 + * \copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + * \version 0.1 + */ +#pragma once + +#include +#include +#include +#include + +#include "params.hh" + +class OCTETSTRING; //! Forward declaration of TITAN class +class BITSTRING; //! Forward declaration of TITAN class +class CHARSTRING; //! Forward declaration of TITAN class +class INTEGER; //! Forward declaration of TITAN class + +/*! + * \class layer + * \brief This class provides basic description of an ITS protocol layer + */ +class layer { + std::vector upperLayers; //! List of the upper protocol layers + std::vector lowerLayers; //! List of the lower protocol layers + +protected: + std::string type; //! Type description, it indicates the protocol type (e.g. CAM, DENM, GN, ETH, PCAP...) + +public: //! \publicsection + /*! + * \brief Default constructor + * Create a new instance of the layer class + */ + explicit layer() : upperLayers(), lowerLayers(), type(std::string("")) { }; + + /*! + * \brief Specialized constructor + * Create a new instance of the layer class with its type description + * \param[in] p_type The port type name (e.g. GN for the GeoNetworking layer) + * \remark This constructor is called by the layer factory + * \see layer_factory + */ + explicit layer(const std::string& p_type) : upperLayers(), lowerLayers(), type(std::string(p_type.begin(), p_type.end())) { }; + + /*! + * \brief Default destructor + * \todo Remove logs + */ + virtual ~layer() { + // Double linked list, only remove layers in lowerLayers from the lowest one + std::for_each(lowerLayers.rbegin(), lowerLayers.rend(), [](layer* it) { delete it; } ); + lowerLayers.clear(); + upperLayers.clear(); + }; + + /*! + * \fn void delete_layer(); + * \brief Delete this layer + * \todo To be implemented + */ + void delete_layer() { }; + +public: //! \publicsection + /*! + * \inline + * \fn void add_upper_layer(layer* p_layer); + * \brief Add a new layer in the list of the upper layer + * \param[in] p_layer The layer protocol to be removed + */ + inline void add_upper_layer(layer* p_layer) { + if (p_layer != NULL) { + upperLayers.push_back(p_layer); + p_layer->lowerLayers.push_back(this); + }; + }; + + /*! + * \fn void remove_upper_layer(layer* p_layer); + * \brief Remove the specified upper layer protocol from the list of the upper layer + * \param[in] p_layer The layer protocol to be removed + * \todo To be implemented + */ + void remove_upper_layer(layer* p_layer) { }; + + /*! + * \virtual + * \fn void send_data(OCTETSTRING& data, params& params); + * \brief Send bytes formated data to the lower layers + * \param[in] p_data The data to be sent + * \param[in] p_params Some parameters to overwrite default value of the lower layers parameters + * \todo Remove the logs + * \virtual + */ + virtual void send_data(OCTETSTRING& p_data, params& p_params) { }; + + /*! + * \virtual + * \fn void receive_data(OCTETSTRING& data, params& params); + * \brief Receive bytes formated data from the lower layers + * \param[in] p_data The bytes formated data received + * \param[in] p_params Some lower layers parameters values when data was received + * \todo Remove the logs + * \virtual + */ + virtual void receive_data(OCTETSTRING& p_data, params& p_params) { } + + /*! + * \inline + * \fn const std::string& to_string(); + * \brief Remove the specified upper layer protocol from the list of the upper layer + * \param[in] The layer protocol to be removed + */ + inline const std::string& to_string() const { return type; }; + +protected: //! \protectedsection + inline void to_all_layers(std::vector&layers, OCTETSTRING& data, params& params) { + for (std::vector::const_iterator it = layers.cbegin(); it != layers.cend(); ++it) { + layer* p = *it; + p->receive_data(data, params); // FIXME BUG I + } // End of 'for' statement + }; + + inline void receive_to_all_layers(OCTETSTRING& data, params& params) { + for (std::vector::const_iterator it = upperLayers.cbegin(); it != upperLayers.cend(); ++it) { + layer* p = *it; + p->receive_data(data, params); + } // End of 'for' statement + }; + + inline void send_to_all_layers(OCTETSTRING& data, params& params) { + for (std::vector::const_iterator it = lowerLayers.cbegin(); it != lowerLayers.cend(); ++it) { + layer* p = *it; + p->send_data(data, params); + } // End of 'for' statement + }; +}; // End of class layer + diff --git a/ccsrc/Framework/include/layer_factory.hh b/ccsrc/Framework/include/layer_factory.hh new file mode 100644 index 0000000000000000000000000000000000000000..c66fdc3c4b4590d439d6dd96ce8604df5c9344c9 --- /dev/null +++ b/ccsrc/Framework/include/layer_factory.hh @@ -0,0 +1,114 @@ +/*! + * \file layer_factory.hh + * \brief Header file for ITS abstract protocol layer definition. + * \author ETSI STF525 + * \copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + * \version 0.1 + */ +#pragma once + +#include +#include +#include +#include + +#include "layer.hh" + +/*! + * \class layer_factory + * \brief This class provides a factory class to create layer class instances + * \abstract + */ +class layer_factory { +public: //! \publicsection + /*! + * \fn codec(); + * \brief Default constructor + */ + layer_factory() {}; + /*! + * \fn layer* create_layer(const std::string & type, const std::string & param); + * \brief Create the layers stack based on the provided layers stack description (cf. remark) + * \param[in] p_type The provided layers stack description + * \param[in] p_params Optional parameters + * \return 0 on success, -1 otherwise + * \remark The description below introduces layers stack in case of ITS project: + * CAM layer + * next_header : btpA|btpB (overwrite BTP.type) + * header_type : tsb|gbc + * header_sub_type : sh (single hop) + * DENM layer + * next_header : btpA|btpB (overwrite BTP.type) + * header_type : tsb|gbc + * BTP layer + * type : btpA|btpB + * destination port: dst_port + * source port : src_port + * device_mode : Set to 1 if the layer shall encapsulate upper layer PDU + * GN layer + * its_aid : ITS AID as defined by ETSI TS 102 965 V1.2.1. Default: 141 + * ll_address : GeoNetworking address of the Test System + * latitude : latitude of the Test System + * longitude : longitude of the Test System + * beaconing : Set to 1 if GnLayer shall start beaconing + * Beaconing timer expiry : expiry (ms) + * device_mode : Set to 1 if the layer shall encapsulate upper layer PDU + * secured_mode : Set to 1 if message exchanges shall be signed + * encrypted_mode : Set to 1 if message exchanges shall be encrypted + * NOTE: For signed & encrypted message exchanges, both secured_mode and encrypted_mode shall be set to 1 + * certificate : Certificate identifier the Test Adapter shall use + * secure_db_path : Path to the certificates and keys storage location + * hash : Hash algorithm to be used when secured mode is set + * Authorized values are SHA-256 or SHA-384 + * Default: SHA-256 + * signature : Signature algorithm to be used when secured mode is set + * Authorized values are NISTP-256, BP-256 and BP-384 + * Default: NISTP-256 + * cypher : Cyphering algorithm to be used when secured mode is set + * Ethernet layer + * mac_src :Source MAC address + * mac_bc :Broadcast address + * eth_type : Ethernet type + * Commsignia layer + * mac_src : Device MAC address, used to discard packets + * To indicate no filering, use the value 000000000000 + * mac_bc : Broadcast address + * eth_type : Ethernet type, used to discard packets + * target_host : Device address + * target_port : Device port + * source_port : Test System port + * interface_id: Interface id, used to discard packets + * tx_power : TX power (dB) + * UDP layer (IP/UDP based on Pcap) + * dst_ip : destination IPv4 address (aa.bb.cc.dd) + * dst_port: destination port + * src_ip : source IPv4 address (aa.bb.cc.dd) + * src_port: source port + * Pcap layer + * mac_src : Source MAC address, used to exclude from capture the acket sent by the Test System + * filter : Pcap filter (compliant with tcpdump syntax) + * E.g. filter=and ether src 04e548000001 + * Online mode: + * nic: Local NIC + * If set, online mode is used + * Offline mode (nic is present but not set): + * file : File to read + * frame_offset: Frame offset, used to skip packets with frame number < frame_offset + * time_offset : Time offset, used to skip packets with time offset < time_offset + * save_mode : 1 to save sent packet, 0 otherwise + * Here are some examples: + * GeoNetworking multiple component case: + * NodeB.geoNetworkingPort.params := "GN(ll_address=04e548000001,latitude=43551050,longitude=10298730,beaconing=0,expiry=1000,its_aid=141)/COMMSIGNIA(mac_src=04e548000001,mac_bc=FFFFFFFFFFFF,eth_type=8947,target_host=10.200.1.101,target_port=7942,source_port=7943,its_aid=141,interface_id=2,tx_power=-32)/UDP(dst_ip=192.168.56.1,dst_port=12346,src_ip=192.168.156.4,src_port=12345)/ETH(mac_src=04e548000001,mac_dst=0A0027000011,eth_type=0800)/PCAP(mac_src=04e548000001,file=/home/vagrant/TriesAndDelete/etsi_its/testdata/TC_AUTO_IOT_DENM_RWW_BV_01_short.pcap,filter=and (udp port 30000 or udp port 7943))" +NodeC.geoNetworkingPort.params := "GN(ll_address=70b3d5791b48,latitude=43551050,longitude=10298730,beaconing=0,expiry=1000,its_aid=141)/COMMSIGNIA(mac_src=70b3d5791b48,mac_bc=FFFFFFFFFFFF,eth_type=8947,target_host=10.200.1.101,target_port=7942,source_port=7943,its_aid=141,interface_id=2,tx_power=-32)/UDP(dst_ip=192.168.56.1,dst_port=12346,src_ip=192.168.156.4,src_port=12345)/ETH(mac_src=70b3d5791b48,mac_dst=0A0027000011,eth_type=0800)/PCAP(mac_src=70b3d5791b48,file=/home/vagrant/TriesAndDelete/etsi_its/testdata/TC_AUTO_IOT_DENM_RWW_BV_01_short.pcap,filter=and (udp port 30000 or udp port 7943))" + * NodeB.geoNetworkingPort.params := "GN(ll_address=04e548000001,latitude=43551050,longitude=10298730,beaconing=0,expiry=1000,its_aid=141)/ETH(mac_src=04e548000001,mac_dst=0A0027000011,eth_type=0800)/PCAP(mac_src=04e548000001,file=/home/vagrant/TriesAndDelete/etsi_its/testdata/TC_AUTO_IOT_DENM_RWW_BV_01.pcap,filter=and ether src 04e548000001)" +#NodeC.geoNetworkingPort.params := "GN(ll_address=70b3d5791b48,latitude=43551050,longitude=10298730,beaconing=0,expiry=1000,its_aid=141)/ETH(mac_src=70b3d5791b48,mac_dst=0A0027000011,eth_type=0800)/PCAP(mac_src=70b3d5791b48,file=/home/vagrant/TriesAndDelete/etsi_its/testdata/TC_AUTO_IOT_DENM_RWW_BV_01.pcap,filter=and ether src 70b3d5791b48)" + * UpperTester port based on UDP + * system.utPort.params := "UT_GN/UDP(dst_ip=192.168.1.1,dst_port=12346,src_ip=192.168.156.4,src_port=12345)/ETH(mac_src=026f8338c1e5,mac_dst=0A0027000011,eth_type=0800)/PCAP(mac_src=0800275c4959,nic=enp0s8,filter=and udp port 12346)" + * \pure + */ + virtual layer* create_layer(const std::string & p_type, const std::string & p_params) = 0; +}; // End of class layer_factory + diff --git a/ccsrc/Framework/include/layer_stack_builder.hh b/ccsrc/Framework/include/layer_stack_builder.hh new file mode 100644 index 0000000000000000000000000000000000000000..af797a3a64b7a9cae8379ca46f77d266907ac2ce --- /dev/null +++ b/ccsrc/Framework/include/layer_stack_builder.hh @@ -0,0 +1,67 @@ +/*! + * \file layer_stack_builder.hh + * \brief Header file for ITS protocol stack builder. + * \author ETSI STF525 + * \copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + * \version 0.1 + */ +#pragma once + +#include "layer_factory.hh" + +/*! + * \class layer_stack_builder + * \brief This class provides a factory class to create Layer class instances + */ +class layer_stack_builder { +private: //! \privatesection + typedef std::map LayerFactoryMap; + + static layer_stack_builder * _instance; //! Smart pointer to the unique instance of the logger framework + std::map _layer_factories; //! The list of the registered \see t_layer factories + + /*! + * \brief Default constructor + * Create a new instance of the layer_stack_builder class + * \private + */ + layer_stack_builder(); // can not be created manually +public: //! \publicsection + /*! + * \fn layer_stack_builder* get_instance(); + * \brief Accessor for the unique instance of the logger framework + * \static + */ + static layer_stack_builder* get_instance(); + + /*! + * \fn void register_layer_factory(const std::string & p_type, layer_factory* p_layer_factory); + * \brief Add a new layer factory + * \param[in] p_type The layer identifier (e.g. GN for the GeoNetworking layer...) + * \param[in] p_layer_factory A reference to the \see layer_factory + * \static + */ + static void register_layer_factory(const std::string & p_type, layer_factory* p_layer_factory); + +private: //! \privatesection + /*! + * \fn void _register_layer_factory(const std::string & p_type, layer_factory* p_layer_factory); + * \brief Add a new layer factory + * \param[in] p_type The layer identifier (e.g. GN for the GeoNetworking layer...) + * \param[in] p_layer_factory A reference to the \see layer_factory + */ + void _register_layer_factory(const std::string & p_type, layer_factory* p_layer_factory); + +public: //! \publicsection + /*! + * \fn layer* create_layer_stack(const char* p_layer_stack_description); + * \brief Add a new layer factory + * \param[in] p_layer_stack_description A textual description of the layer to create + * \return The created layer object on success, nullptr otherwise + */ + layer* create_layer_stack(const char* p_layer_stack_description); +}; // End of class layer_stack_builder + diff --git a/ccsrc/Framework/include/loggers.hh b/ccsrc/Framework/include/loggers.hh new file mode 100644 index 0000000000000000000000000000000000000000..6f252f58c33c7c70516fadb9e4c6297c3dcf19ef --- /dev/null +++ b/ccsrc/Framework/include/loggers.hh @@ -0,0 +1,289 @@ +/*! + * \file loogers.hh + * \brief Header file for the logger framework. + * \author ETSI STF525 + * \copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + * \version 0.1 + */ +#pragma once + +#include +#include +#include +#include +#include + +/** +class Base_Type; +class OCTETSTRING; +class TTCN_Buffer; +class TTCN_Logger; +enum TTCN_Logger::Severity; +extern void TTCN_error(const char *err_msg, ...) __attribute__ ((__format__ (__printf__, 1, 2), __noreturn__)); +extern void TTCN_error_begin(const char *err_msg, ...) __attribute__ ((__format__ (__printf__, 1, 2))); +extern void TTCN_error_end() __attribute__ ((__noreturn__)); +void TTCN_warning(const char *warning_msg, ...) __attribute__ ((__format__ (__printf__, 1, 2))); +extern void TTCN_warning_begin(const char *warning_msg, ...) __attribute__ ((__format__ (__printf__, 1, 2))); +extern void TTCN_warning_end(); +**/ + +using namespace std; // Required for isnan() +#include + +/*! + * \class loggers + * \brief This class provides basic functionalities for an ITS dictionary + * \implements Singleton pattern + * \todo Remove reference to TTCN3.hh + */ +class loggers { +private: //! \privatesection + static std::unique_ptr _instance; //! Smart pointer to the unique instance of the logger framework + std::map _times; //! Timer used to measure execution time between calls to methods \loggers::set_start_time and \loggers::set_stop_time + + /*! + * \brief Default constructor + * Create a new instance of the loggers class + * \private + */ + explicit loggers() : _times() { }; + + inline void log_time_exec(const char *p_fmt, ...); + +public: //! \publicsection + /*! + * \brief Default destructor + */ + virtual ~loggers() {}; + + /*! + * \fn static loggers& get_instance(); + * \brief Accessor for the unique instance of the logger framework + * \inline + */ + static inline loggers& get_instance() { return *_instance.get(); }; + + /*! + * \fn void log_to_hexa(const char *p_prompt, const TTCN_Buffer& buffer); + * \brief Hexa dump of the \see TTCN_Buffer buffer + * \param[in] p_prompt Label of the log to be produced + * \param[in] buffer The TTCN_Buffer buffer to dump + * \inline + */ + inline void log_to_hexa(const char *p_prompt, const TTCN_Buffer& buffer); + /*! + * \fn void log_to_hexa(const char *p_prompt, const OCTETSTRING& msg); + * \brief Hexa dump of the \see OCTETSTRING buffer + * \param[in] p_prompt Label of the log to be produced + * \param[in] msg The OCTETSTRING buffer to dump + * \inline + */ + inline void log_to_hexa(const char *p_prompt, const OCTETSTRING& msg); + /*! + * \fn void log_to_hexa(const char *p_prompt, const unsigned char* msg, const size_t msg_size); + * \brief Hexa dump of the provided buffer + * \param[in] p_prompt Label of the log to be produced + * \param[in] msg The buffer to dump + * \inline + */ + inline void log_to_hexa(const char *p_prompt, const unsigned char* msg, const size_t msg_size); + /*! + * \fn void log_msg(const char *p_prompt, const Base_Type& p_type); + * \brief Debug log of TITAN data structures + * \param[in] p_prompt Label of the log to be produced + * \param[in] msg The TITAN data structure to log + * \inline + */ + inline void log_msg(const char *p_prompt, const Base_Type& p_type); + /*! + * \fn void log(const char *p_fmt, ...); + * \brief Debug message based on printf-compliant formatting message + * \param[in] p_fmt The printf-compliant format of the message to log + * \param[in] ... The arguments + * \inline + */ + inline void log(const char *p_fmt, ...); + + /*! + * \fn void user_msg(const char *p_prompt, const Base_Type& p_type); + * \brief User message of TITAN data structures + * \param[in] p_prompt Label of the log to be produced + * \param[in] msg The TITAN data structure to log + * \inline + */ + inline void user_msg(const char *p_prompt, const Base_Type& p_type); + /*! + * \fn void user(const char *p_fmt, ...); + * \brief User message based on printf-compliant formatting message + * \param[in] p_fmt The printf-compliant format of the message to log + * \param[in] ... The arguments + * \inline + */ + inline void user(const char *p_fmt, ...); + + /*! + * \fn void user_msg(const char *p_prompt, const Base_Type& p_type); + * \brief Warning message of TITAN data structures + * \param[in] p_prompt Label of the log to be produced + * \param[in] msg The TITAN data structure to log + * \inline + */ + inline void warning_msg(const char *p_prompt, const Base_Type& p_type); + /*! + * \fn void user(const char *p_fmt, ...); + * \brief Warning message based on printf-compliant formatting message + * \param[in] p_fmt The printf-compliant format of the message to log + * \param[in] ... The arguments + * \inline + */ + inline void warning(const char *p_fmt, ...); + + /*! + * \fn void user(const char *p_fmt, ...); + * \brief Error message based on printf-compliant formatting message + * \param[in] p_fmt The printf-compliant format of the message to log + * \param[in] ... The arguments + * \inline + */ + inline void error(const char *p_fmt, ...); + + /*! + * \fn void set_start_time(std::string& p_time_key); + * \brief Start execution time measurement + * \param[in] p_time_key A timer identifier (any string) + * \inline + */ + inline void set_start_time(std::string& p_time_key); + /*! + * \fn void set_stop_time(std::string& p_time_key, float& p_time); + * \brief Stop execution time measurement + * \param[in] p_time_key The timer identifier provided while calling \see loggers::set_start_time method + * \param[out] p_time The execution time measured in milliseconds + * \inline + */ + inline void set_stop_time(std::string& p_time_key, float& p_time); +}; // End of class loggers + +void loggers::log_to_hexa(const char *p_prompt, const TTCN_Buffer & buffer) +{ + TTCN_Logger::begin_event(TTCN_Logger::DEBUG_UNQUALIFIED); + TTCN_Logger::log_event_str(p_prompt); + buffer.log(); + TTCN_Logger::end_event(); +} + +void loggers::log_to_hexa(const char *p_prompt, const OCTETSTRING& msg) +{ + TTCN_Logger::begin_event(TTCN_Logger::DEBUG_UNQUALIFIED); + TTCN_Logger::log_event_str(p_prompt); + TTCN_Logger::log_event("Size: %d,\nMsg: ", msg.lengthof()); + + for(int i = 0; i < msg.lengthof(); i++) { + TTCN_Logger::log_event(" %02x", ((const unsigned char*)msg)[i]); + } + TTCN_Logger::log_event("\n"); + TTCN_Logger::end_event(); +} + +void loggers::log_to_hexa(const char *p_prompt, const unsigned char* msg, const size_t msg_size) +{ + TTCN_Logger::begin_event(TTCN_Logger::DEBUG_UNQUALIFIED); + TTCN_Logger::log_event_str(p_prompt); + for(size_t i = 0; i < msg_size; i++) { + TTCN_Logger::log_event(" %02x", *(msg + i)); + } + TTCN_Logger::log_event("\n"); + TTCN_Logger::end_event(); +} + +void loggers::log_msg(const char *p_prompt, const Base_Type& p_type) +{ + TTCN_Logger::begin_event(TTCN_Logger::DEBUG_UNQUALIFIED); + TTCN_Logger::log_event_str(p_prompt); + p_type.log(); + TTCN_Logger::end_event(); +} + +void loggers::log(const char *p_fmt, ...) +{ + TTCN_Logger::begin_event(TTCN_Logger::DEBUG_UNQUALIFIED); + va_list args; + va_start(args, p_fmt); + TTCN_Logger::log_event_va_list(p_fmt, args); + va_end(args); + TTCN_Logger::end_event(); +} + +void loggers::user_msg(const char *p_prompt, const Base_Type& p_type) +{ + TTCN_Logger::begin_event(TTCN_Logger::USER_UNQUALIFIED); + TTCN_Logger::log_event_str(p_prompt); + p_type.log(); + TTCN_Logger::end_event(); +} + +void loggers::user(const char *p_fmt, ...) +{ + TTCN_Logger::begin_event(TTCN_Logger::USER_UNQUALIFIED); + va_list args; + va_start(args, p_fmt); + TTCN_Logger::log_event_va_list(p_fmt, args); + va_end(args); + TTCN_Logger::end_event(); +} + +void loggers::warning(const char *p_fmt, ...) +{ + TTCN_Logger::begin_event(TTCN_Logger::WARNING_UNQUALIFIED); + va_list args; + va_start(args, p_fmt); + TTCN_Logger::log_event_va_list(p_fmt, args); + va_end(args); + TTCN_Logger::end_event(); +} + +void loggers::warning_msg(const char *p_prompt, const Base_Type& p_type) +{ + TTCN_Logger::begin_event(TTCN_Logger::WARNING_UNQUALIFIED); + TTCN_Logger::log_event_str(p_prompt); + p_type.log(); + TTCN_Logger::end_event(); +} + +void loggers::error(const char *p_fmt, ...) +{ + va_list args; + va_start(args, p_fmt); + TTCN_error(p_fmt, args); + va_end(args); +} + +void loggers::set_start_time(std::string& p_time_key) +{ + _times[p_time_key] = std::clock(); +} + +void loggers::set_stop_time(std::string& p_time_key, float& p_time) +{ + std::map::iterator it = _times.find(p_time_key); + if (it != loggers::_times.end()) { + p_time = (std::clock() - _times[p_time_key]) * 1000.0 / CLOCKS_PER_SEC; // in milliseconds + _times.erase(it); + loggers::get_instance().log_time_exec("%s: Execution duration: %f ms", p_time_key.c_str(), p_time); + + } +} + +void loggers::log_time_exec(const char *p_fmt, ...) +{ + TTCN_Logger::begin_event(TTCN_Logger::EXECUTOR_RUNTIME); + va_list args; + va_start(args, p_fmt); + TTCN_Logger::log_event_va_list(p_fmt, args); + va_end(args); + TTCN_Logger::end_event(); +} + diff --git a/ccsrc/Framework/include/params.hh b/ccsrc/Framework/include/params.hh new file mode 100644 index 0000000000000000000000000000000000000000..a0c841db0432388b608c71f4f5b137647f550479 --- /dev/null +++ b/ccsrc/Framework/include/params.hh @@ -0,0 +1,87 @@ +/*! + * \file params.hh + * \brief Header file for the parameter dictionary. + * \author ETSI STF525 + * \copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + * \version 0.1 + */ +#pragma once + +#include +#include + + /*! + * \class params + * \brief This class provides basic functionalities for an ITS dictionary + * \implements std::map + */ +class params : public std::map { +public: //! \publicsection + // TODO Use static constexpr (see commsignia_layer.hh) + static const std::string& debug; //! Set to 1 to enable the debug mode + + static const std::string& loopback; + + static const std::string& mac_src; //! Source MAC address parameter name + static const std::string& mac_dst; //! Destination MAC address parameter name + static const std::string& mac_bc; //! Broadcast MAC address parameter name + static const std::string& eth_type; //! Ethernet type parameter name + static const std::string& nic; //! Network Interface Card parameter name + static const std::string& latitude; //! Test system Latitude parameter name + static const std::string& longitude; //! Test system Longitude parameter name + + static const std::string& server; //! HTTP server address (e.g. www.etsi.org) + static const std::string& port; //! Commsignia HTTP server port. Default: 80 + static const std::string& use_ssl; //! Set to 1 to use SSL to communicate with the HTTP server. Default: false + + static const std::string& sip_url; + static const std::string& sip_version; + static const std::string& payload; //! UpperLayer Payload parameter name + + static const std::string& codecs; //! List of codecs to use for HTTP application layers + + /*! + * \brief Default constructor + * Create a new instance of the params class + */ + params() : std::map() {}; + /*! + * \brief Copy constructor + * Clone an existing instance of a params object + * \param[in] p_params An existing instance of a params object + */ + explicit params(const params& p_params) : std::map(p_params.begin(), p_params.end()) { }; + + /*! + * \brief Default destructor + */ + virtual ~params() { }; + + /*! + * \fn void log() const; + * \brief Provides a dump of the content of this instance + */ + void log() const; + /*! + * \fn void log() const; + * \brief Provides a dump of the content of this instance + */ + void log(); + /*! + * \fn void reset(); + * \brief Reset the content of this instance + */ + void reset(); + + /*! + * \static + * \fn void convert(params& p_param, const std::string p_parameters); + * \brief Create a new instance of a params object by converting a list of ITS parameters in string format (t1=v1,T2=(v0,v1v2)...) + * \return a new instance of a params object + */ + static void convert(params& p_param, const std::string p_parameters); +}; // End of class params + diff --git a/ccsrc/Framework/include/t_layer.hh b/ccsrc/Framework/include/t_layer.hh new file mode 100644 index 0000000000000000000000000000000000000000..8e355a9138ef2ef3a9ca492e98edbce94bd4ef3d --- /dev/null +++ b/ccsrc/Framework/include/t_layer.hh @@ -0,0 +1,72 @@ +/*! + * \file t_layer.hh + * \brief Header file for ITS abstract protocol layer definition. + * \author ETSI STF525 + * \copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + * \version 0.1 + */ +#pragma once + +#include "layer.hh" + +/*! + * \class t_layer + * \brief This class provides basic description of an ITS port protocol layer. + * A port protocol layer is the final layer which provides the access to the physical communication channel + * A port protocol layer derives from both a layer class and a template port class + */ +template class t_layer : public layer { + typedef std::vector TPortList; + typedef typename std::vector::iterator TPortListIterator; + + TPortList upperPorts; //! The list of the upper ports + +public: //! \publicsection + /*! + * \brief Default constructor + * Create a new instance of the t_layer class + * \todo Remove logs + */ + explicit t_layer() : layer(), upperPorts() { }; + + /*! + * \brief Specialized constructor + * Create a new instance of the layer class with its type description + * \param[in] p_type The port type name (e.g. TCP for the TCP sockect based layer) + * \remark This constructor is called by the layer factory + * \see layer_factory + */ + explicit t_layer(const std::string& p_type) : layer(p_type), upperPorts() { }; + /*! + * \inline + * \fn void add_upper_port(TPort * p_port); + * \brief Add a new upper port layer + * \todo To be done + */ + inline void add_upper_port(TPort * p_port) { upperPorts.push_back(p_port); }; + /*! + * \fn void remove_upper_port(TPort*); + * \brief Remove the specified upper layer port protocol from the list of the upper layers + * \param[in] p_layer The layer protocol to be removed + */ + void remove_upper_port(TPort*); + +protected: //! \protectedsection + /*! + * \inline + * \fn void to_all_upper_ports(const TMessage& m, const params& param); + * \brief Forward the message to all available upper port layers + * \param[in] p_message The message to be forwarded + * \param[in] p_params Some lower layers parameters values when data was received + */ + template + inline void to_all_upper_ports(const TMessage& p_message, const params& p_params) { + for(TPortListIterator it=upperPorts.begin(); itreceiveMsg(p_message, p_params); + } + } +}; // End of class t_layer + diff --git a/ccsrc/Framework/src/codec_stack_builder.cc b/ccsrc/Framework/src/codec_stack_builder.cc new file mode 100644 index 0000000000000000000000000000000000000000..2bf087e4bb7d687b91ab1d1db54da361a2d24d0d --- /dev/null +++ b/ccsrc/Framework/src/codec_stack_builder.cc @@ -0,0 +1,4 @@ +#include "codec_stack_builder.hh" + +codec_stack_builder* codec_stack_builder::_instance = NULL; + diff --git a/ccsrc/Framework/src/converter.cc b/ccsrc/Framework/src/converter.cc new file mode 100644 index 0000000000000000000000000000000000000000..84bef6d61fa59d657ba8ee5e3b03c985dd62cec4 --- /dev/null +++ b/ccsrc/Framework/src/converter.cc @@ -0,0 +1,135 @@ +#include "converter.hh" + +converter * converter::instance = NULL; + +uint16_t converter::swap(const uint16_t p_value) { + uint8_t *ptr = (uint8_t *)&p_value; + return (ptr[0] << 8) | ptr[1]; +} + +uint32_t converter::swap(const uint32_t p_value) { + uint8_t *ptr = (uint8_t *)&p_value; + return (ptr[0] << 24) | (ptr[1] << 16) | (ptr[2] << 8) | ptr[3]; +} + +std::string converter::string_to_hexa(const std::string & p_value) { + static const char * const lut = "0123456789ABCDEF"; + + std::string input(p_value); + std::for_each( + input.begin(), + input.end(), + [](char & c) { + c = std::toupper(c); + } + ); + + std::string output; + uint32_t length = p_value.length(); + output.reserve(2 * length); + for (uint32_t i = 0; i < length; ++i) { + const uint8_t c = input[i]; + output.push_back(lut[c >> 4]); + output.push_back(lut[c & 15]); + } // End of 'for' statement + + return output; +} + +std::string converter::bytes_to_hexa(const std::vector & p_value) { + std::ostringstream oss; + oss << std::setfill('0'); + std::for_each( + p_value.begin(), + p_value.end(), + [&oss](uint8_t ch) { + oss << std::hex + << std::setw(2) + << static_cast(ch); + } + ); + return oss.str(); +} + +std::vector converter::hexa_to_bytes(const std::string & p_value) { + static const char * const lut = "0123456789ABCDEF"; + + // Sanity check + std::vector output; + if (p_value.length() & 1) { + return output; + } + + std::string input(p_value); + std::for_each( + input.begin(), + input.end(), + [](char & c) { + c = std::toupper(c); + } + ); + + output.reserve(p_value.length() / 2); + for (uint32_t i = 0; i < p_value.length(); i += 2) { + char msbDigit = input[i]; + const char *msbIndex = std::lower_bound(lut, lut + 16, msbDigit); + if (*msbIndex != msbDigit) { + output.clear(); + return output; + } + char lsbDigit = input[i + 1]; + const char* lsbIndex = std::lower_bound(lut, lut + 16, lsbDigit); + if (*lsbIndex != lsbDigit) { + output.clear(); + return output; + } + output.push_back(((msbIndex - lut) << 4) | (lsbIndex - lut)); + } // End of 'for' statement + + return output; +} + +std::string converter::time_to_string(const time_t p_time) { + struct tm * t = std::localtime(&p_time); + return time_to_string(*t); +} + +std::string converter::time_to_string(const struct tm & p_time) { + char buffer[64] = { 0 }; + // Format: RFC 822, 1036, 1123, 2822 + std::strftime(buffer, 64, "%a, %d %b %Y %H:%M:%S %z", &p_time); + return std::string(buffer); +} + +std::string converter::trim(const std::string& str, const std::string& whitespace) { + size_t strBegin = str.find_first_not_of(whitespace); + if (strBegin == std::string::npos) + return ""; // no content + + size_t strEnd = str.find_last_not_of(whitespace); + size_t strRange = strEnd - strBegin + 1; + + return str.substr(strBegin, strRange); +} + +std::vector converter::split_arguments_line(const std::string & p_value) { + std::vector output; + std::string line = trim(p_value); + if (!line.empty() && (line[0] == '-')) { // Valid command line + size_t current = 0; + size_t next = (size_t)-1; + size_t pos = 0; + do { + if (line[pos + 1] == '-') { // -- + current = pos + 2; + } else { + current = pos + 1; + } + next = line.find("-", current); + std::string str(line.substr(pos, next - pos)); + output.push_back(str); + pos = next; + } while (next != std::string::npos); + } // else, invalid command line + return output; +} diff --git a/ccsrc/Framework/src/layer_factory.cc b/ccsrc/Framework/src/layer_factory.cc new file mode 100644 index 0000000000000000000000000000000000000000..33f24feff891385a58cf38e3515b4d498223ec1b --- /dev/null +++ b/ccsrc/Framework/src/layer_factory.cc @@ -0,0 +1,71 @@ +#include +#include + +#include "layer_stack_builder.hh" + +#include "loggers.hh" + +layer_stack_builder* layer_stack_builder::_instance = NULL; + +// static functions +layer_stack_builder * layer_stack_builder::get_instance() +{ + return _instance ? _instance : _instance = new layer_stack_builder(); +} + +void layer_stack_builder::register_layer_factory(const std::string & p_type, layer_factory* p_layer_factory) +{ + layer_stack_builder::get_instance()->_register_layer_factory(p_type, p_layer_factory); +} + +// member functions +layer_stack_builder::layer_stack_builder() +{ +} + +void layer_stack_builder::_register_layer_factory(const std::string & p_type, layer_factory* p_layer_factory) +{ + _layer_factories[p_type] = p_layer_factory; +} + +layer* layer_stack_builder::create_layer_stack(const char* p_layer_stack_description) +{ + loggers::get_instance().log(">>> layer_stack_builder::create_layer_stack: %s", p_layer_stack_description); + + layer* entry = NULL; // Initial layer (the first declared) + layer* up = NULL; // Upper layer + // Parse the layer description + try { + std::regex rgx ("(\\w+)(\\((.*?)\\))?(\\/|$)"); + std::string str = p_layer_stack_description; + std::sregex_iterator begin(str.cbegin(), str.cend(), rgx); + std::sregex_iterator end = std::sregex_iterator(); + for (std::sregex_iterator it = begin; it != end; ++it) { + std::smatch m = *it; + loggers::get_instance().log("layer_stack_builder::create_layer_stack: %d - %s - %s - %s - %s", m.size(), m[0].str().c_str(), m[1].str().c_str(), m[2].str().c_str(), m[3].str().c_str()); + LayerFactoryMap::iterator i = _layer_factories.find(m[1].str()); + if (i == _layer_factories.end()) { + loggers::get_instance().error("layer_stack_builder::create_layer_stack: %s: Unknown layer type", m[1].str().c_str()); + } + loggers::get_instance().log("layer_stack_builder::create_layer_stack: Create layer %s, %s", m[1].str().c_str(), m[3].str().c_str()); + layer* l = i->second->create_layer(m[1].str(), m[3].str()); + if (NULL == l) { + loggers::get_instance().error("layer_stack_builder::create_layer_stack: %s: Layer creation error", m[1].str().c_str()); + } + + loggers::get_instance().log("layer_stack_builder::create_layer_stack: Setup layers for %s", l->to_string().c_str()); + l->add_upper_layer(up); + if (entry == NULL) { // Set the first declared layer + entry = l; + } + up = l; // Build the linked list of layers + } // End of 'for' statement + } + catch(const std::logic_error& e){ + if(up){ // FIXME To be reviewed + up->delete_layer(); + up = NULL; + } + } + return entry; +} diff --git a/ccsrc/Framework/src/loggers.cc b/ccsrc/Framework/src/loggers.cc new file mode 100644 index 0000000000000000000000000000000000000000..fba1c590dcc06cec73dab5da72c84f2e37888c75 --- /dev/null +++ b/ccsrc/Framework/src/loggers.cc @@ -0,0 +1,4 @@ +#include "loggers.hh" + +std::unique_ptr loggers::_instance = static_cast>(new loggers); + diff --git a/ccsrc/Framework/src/params.cc b/ccsrc/Framework/src/params.cc new file mode 100644 index 0000000000000000000000000000000000000000..1fae651ce77b51f8b8fe96042ddfeb16a6c9ac18 --- /dev/null +++ b/ccsrc/Framework/src/params.cc @@ -0,0 +1,91 @@ +/*! + * \file params.cc + * \brief Source file for the parameter dictionary. + * \author ETSI STF525 + * \copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + * \version 0.1 + */ +#include +#include + +#include "params.hh" +#include "loggers.hh" + +const std::string& params::debug = std::string("debug"); + +const std::string& params::loopback = std::string("loopback"); + +const std::string& params::mac_src = std::string("mac_src"); +const std::string& params::mac_dst = std::string("mac_dst"); +const std::string& params::mac_bc = std::string("mac_bc"); +const std::string& params::eth_type = std::string("eth_type"); + + +const std::string& params::nic = std::string("nic"); +const std::string& params::latitude = std::string("latitude"); +const std::string& params::longitude = std::string("longitude"); + +const std::string& params::server = std::string("server"); +const std::string& params::port = std::string("port"); +const std::string& params::use_ssl = std::string("use_ssl"); + +const std::string& params::sip_url = std::string("sip_url"); +const std::string& params::sip_version = std::string("sip_version"); +const std::string& params::payload = std::string("payload"); + +const std::string& params::codecs = std::string("codecs"); + +void params::convert(params& p_param, const std::string p_parameters) { + // Sanity checks + if (p_parameters.length() == 0) { + return; + } + loggers::get_instance().log(">>> params::convert: %s", p_parameters.c_str()); + // Extract parameters + try { + std::regex rgx ("(\\w+)=(.*?)(,|$)"); + std::sregex_iterator begin(p_parameters.cbegin(), p_parameters.cend(), rgx); + std::sregex_iterator end = std::sregex_iterator(); + for (std::sregex_iterator it = begin; it != end; ++it) { + std::smatch m = *it; + loggers::get_instance().log("params::convert: %d - %s - %s - %s - %s", m.size(), m[0].str().c_str(), m[1].str().c_str(), m[2].str().c_str(), m[3].str().c_str()); + p_param.insert(std::pair(m[1].str(), m[2].str())); + } // End of 'for' statement + } + catch(const std::logic_error& e){ + p_param.clear(); + } + loggers::get_instance().log("<<< params::convert"); +} + +void params::log() const { + loggers::get_instance().log("params::log"); + if (size() == 0) { + loggers::get_instance().log("\tEmpty"); + } else { + for (const_iterator it = cbegin(); it != cend(); ++it) { + loggers::get_instance().log("\t(%s, %s)", it->first.c_str(), it->second.c_str()); + } // End of 'for' statement + } +} + +void params::log() { + loggers::get_instance().log("params::log"); + if (size() == 0) { + loggers::get_instance().log("\tEmpty"); + } else { + for (const_iterator it = cbegin(); it != cend(); ++it) { + loggers::get_instance().log("\t(%s, %s)", it->first.c_str(), it->second.c_str()); + } // End of 'for' statement + } +} + +void params::reset() { + loggers::get_instance().log("params::reset"); + for (iterator it = begin(); it != end(); ++it) { + it->second.clear(); + } // End of 'for' statement +} diff --git a/ccsrc/Ports/LibHttp/HttpPort.cc b/ccsrc/Ports/LibHttp/HttpPort.cc new file mode 100644 index 0000000000000000000000000000000000000000..c20a2afddf7f4342b8c85da65bd868a7852eaab3 --- /dev/null +++ b/ccsrc/Ports/LibHttp/HttpPort.cc @@ -0,0 +1,113 @@ +#include "HttpPort.hh" +#include "http_layer_factory.hh" +#include "loggers.hh" + +#include "LibItsHttp_TypesAndValues.hh" + +namespace LibItsHttp__TestSystem { + + HttpPort::HttpPort(const char *par_port_name): HttpPort_BASE(par_port_name), _cfg_params(), _layer_params(), _layer(nullptr), _time_key("HttpPort::outgoing_send") { + // Nothing to do + } // End of constructor + + HttpPort::~HttpPort() { + loggers::get_instance().log(">>> HttpPort::~HttpPort"); + + if (_layer != nullptr) { + delete _layer; + } + } // End of destructor + + void HttpPort::set_parameter(const char * parameter_name, const char * parameter_value) + { + loggers::get_instance().log("HttpPort::set_parameter: %s=%s", parameter_name, parameter_value); + _cfg_params.insert(std::pair(std::string(parameter_name), std::string(parameter_value))); + } + + /*void HttpPort::Handle_Fd_Event(int fd, boolean is_readable, + boolean is_writable, boolean is_error) {}*/ + + void HttpPort::Handle_Fd_Event_Error(int /*fd*/) + { + + } + + void HttpPort::Handle_Fd_Event_Writable(int /*fd*/) + { + + } + + void HttpPort::Handle_Fd_Event_Readable(int /*fd*/) + { + + } + + /*void HttpPort::Handle_Timeout(double time_since_last_call) {}*/ + + void HttpPort::user_map(const char * system_port) + { + loggers::get_instance().log(">>> HttpPort::user_map: %s", system_port); + // Build layer stack + params::iterator it = _cfg_params.find(std::string("params")); + if (it != _cfg_params.end()) { + loggers::get_instance().log("HttpPort::user_map: %s", it->second.c_str()); + // Setup parameters + params::convert(_layer_params, it->second); // TODO This _layer_params seems to be useless + // Create layer + _layer = layer_stack_builder::get_instance()->create_layer_stack(it->second.c_str()); + if (static_cast(_layer) == nullptr) { + loggers::get_instance().error("HttpPort::user_map: Invalid stack configuration: %s", it->second.c_str()); + } + static_cast(_layer)->add_upper_port(this); + + } else { + loggers::get_instance().error("HttpPort::user_map: No layers defined in configuration file"); + } + } // End of user_map method + + void HttpPort::user_unmap(const char * system_port) + { + loggers::get_instance().log(">>> HttpPort::user_unmap: %s", system_port); + + // Reset layers + if (_layer != nullptr) { + delete _layer; + _layer = nullptr; + } + } // End of user_unmap method + + void HttpPort::user_start() + { + loggers::get_instance().log(">>> HttpPort::user_start"); + + } // End of user_start method + + void HttpPort::user_stop() + { + loggers::get_instance().log(">>> HttpPort::user_stop"); + + } // End of user_stop method + + void HttpPort::outgoing_send(const LibItsHttp__TypesAndValues::HttpMessage& send_par) + { + loggers::get_instance().log_msg(">>> HttpPort::outgoing_send: payload=", send_par); + + float duration; + loggers::get_instance().set_start_time(_time_key); + params params; + static_cast(_layer)->sendMsg(send_par, params); + loggers::get_instance().set_stop_time(_time_key, duration); + } + + void HttpPort::receiveMsg (const LibItsHttp__TypesAndValues::HttpMessage& p_ind, const params& p_params) { + loggers::get_instance().log_msg(">>> HttpPort::receive_msg: ", p_ind); + // Sanity check + if (!p_ind.is_bound()) { + return; + } + + incoming_message(p_ind); + } + +} + diff --git a/ccsrc/Ports/LibHttp/HttpPort.hh b/ccsrc/Ports/LibHttp/HttpPort.hh new file mode 100644 index 0000000000000000000000000000000000000000..63c70c5c15d22fa9854bec79f9a073532fe34654 --- /dev/null +++ b/ccsrc/Ports/LibHttp/HttpPort.hh @@ -0,0 +1,46 @@ +#pragma once + +#include "LibItsHttp_TestSystem.hh" + +#include "layer.hh" +#include "params.hh" + +namespace LibItsHttp__TypesAndValues { + class HttpMessage; +} + +namespace LibItsHttp__TestSystem { + + class HttpPort : public HttpPort_BASE { + params _cfg_params; + params _layer_params; + layer* _layer; + std::string _time_key; + public: + HttpPort(const char *par_port_name); + ~HttpPort(); + + void set_parameter(const char *parameter_name, const char *parameter_value); + void receiveMsg (const LibItsHttp__TypesAndValues::HttpMessage& p_ind, const params& p_params); + + private: + /* void Handle_Fd_Event(int fd, boolean is_readable, + boolean is_writable, boolean is_error); */ + void Handle_Fd_Event_Error(int fd); + void Handle_Fd_Event_Writable(int fd); + void Handle_Fd_Event_Readable(int fd); + /* void Handle_Timeout(double time_since_last_call); */ + + protected: + void user_map(const char *system_port); + void user_unmap(const char *system_port); + + void user_start(); + void user_stop(); + + protected: + void outgoing_send(const LibItsHttp__TypesAndValues::HttpMessage& send_par); + }; // End of class HttpPort + +} + diff --git a/ccsrc/Ports/LibSip/OperatorPort.hh b/ccsrc/Ports/LibSip/OperatorPort.hh new file mode 100644 index 0000000000000000000000000000000000000000..a44d31675dfb7db40db280178d9149691301865c --- /dev/null +++ b/ccsrc/Ports/LibSip/OperatorPort.hh @@ -0,0 +1,31 @@ + + +#pragma once + +#include "LibSip_Interface.hh" + +namespace LibSip__Interface { + + class OperatorPort : public OperatorPort_BASE { + public: + OperatorPort(const char *par_port_name): OperatorPort_BASE(par_port_name) { }; + ~OperatorPort() { }; + + protected: + virtual void outgoing_call(const s__SIP__conversation_call& call_par) { }; + virtual void outgoing_call(const s__SIP__ringing_call& call_par) { }; + virtual void outgoing_call(const s__SIP__announcementA_call& call_par) { }; + virtual void outgoing_call(const s__SIP__announcementB_call& call_par) { }; + virtual void outgoing_call(const s__SIP__announcement_call& call_par) { }; + virtual void outgoing_call(const s__SIP__voiceMessage_call& call_par) { }; + virtual void outgoing_call(const s__SIP__mediastopped_call& call_par) { }; + virtual void outgoing_reply(const s__SIP__conversation_reply& reply_par) { }; + virtual void outgoing_reply(const s__SIP__ringing_reply& reply_par) { }; + virtual void outgoing_reply(const s__SIP__announcementA_reply& reply_par) { }; + virtual void outgoing_reply(const s__SIP__announcementB_reply& reply_par) { }; + virtual void outgoing_reply(const s__SIP__announcement_reply& reply_par) { }; + virtual void outgoing_reply(const s__SIP__voiceMessage_reply& reply_par) { }; + virtual void outgoing_reply(const s__SIP__mediastopped_reply& reply_par) { }; + }; // End of class OperatorPort + +} diff --git a/ccsrc/Ports/LibSip/SipPort.cc b/ccsrc/Ports/LibSip/SipPort.cc new file mode 100644 index 0000000000000000000000000000000000000000..d56da838d7d17bba582891d265ba5c69cabdb8ae --- /dev/null +++ b/ccsrc/Ports/LibSip/SipPort.cc @@ -0,0 +1,90 @@ +#include "SipPort.hh" +#include "sip_layer_factory.hh" +#include "loggers.hh" + +namespace LibSip__Interface { + + SipPort::SipPort(const char *par_port_name): SipPort_BASE(par_port_name), _cfg_params(), _layer_params(), _layer(nullptr), _time_key("SipPort::outgoing_send") { + // Nothing to do + } // End of constructor + + SipPort::~SipPort() { + loggers::get_instance().log(">>> SipPort::~SipPort"); + + if (_layer != nullptr) { + delete _layer; + } + } // End of destructor + + void SipPort::set_parameter(const char * parameter_name, const char * parameter_value) + { + loggers::get_instance().log("SipPort::set_parameter: %s=%s", parameter_name, parameter_value); + _cfg_params.insert(std::pair(std::string(parameter_name), std::string(parameter_value))); + } + + /*void SipPort::Handle_Fd_Event(int fd, boolean is_readable, + boolean is_writable, boolean is_error) {}*/ + + void SipPort::Handle_Fd_Event_Error(int /*fd*/) + { + + } + + void SipPort::Handle_Fd_Event_Writable(int /*fd*/) + { + + } + + void SipPort::Handle_Fd_Event_Readable(int /*fd*/) + { + + } + + /*void SipPort::Handle_Timeout(double time_since_last_call) {}*/ + + void SipPort::user_map(const char * system_port) + { + loggers::get_instance().log(">>> SipPort::user_map: %s", system_port); + // Build layer stack + params::iterator it = _cfg_params.find(std::string("params")); + if (it != _cfg_params.end()) { + loggers::get_instance().log("SipPort::user_map: %s", it->second.c_str()); + // Setup parameters + params::convert(_layer_params, it->second); // TODO This _layer_params seems to be useless + // Create layer + _layer = layer_stack_builder::get_instance()->create_layer_stack(it->second.c_str()); + if (static_cast(_layer) == nullptr) { + loggers::get_instance().error("SipPort::user_map: Invalid stack configuration: %s", it->second.c_str()); + } + static_cast(_layer)->add_upper_port(this); + + } else { + loggers::get_instance().error("SipPort::user_map: No layers defined in configuration file"); + } + } // End of user_map method + + void SipPort::user_unmap(const char * system_port) + { + loggers::get_instance().log(">>> SipPort::user_unmap: %s", system_port); + + // Reset layers + if (_layer != nullptr) { + delete _layer; + _layer = nullptr; + } + } // End of user_unmap method + + void SipPort::user_start() + { + loggers::get_instance().log(">>> SipPort::user_start"); + + } // End of user_start method + + void SipPort::user_stop() + { + loggers::get_instance().log(">>> SipPort::user_stop"); + + } // End of user_stop method + +} + diff --git a/ccsrc/Ports/LibSip/SipPort.hh b/ccsrc/Ports/LibSip/SipPort.hh new file mode 100644 index 0000000000000000000000000000000000000000..642a9621a4dc98be063f436f61cbd5c7b99e882f --- /dev/null +++ b/ccsrc/Ports/LibSip/SipPort.hh @@ -0,0 +1,62 @@ +#pragma once + +#include "LibSip_Interface.hh" + +#include "layer.hh" +#include "params.hh" + +namespace LibSip__SIPTypesAndValues { + class REGISTER__Request; +} + +namespace LibSip__Interface { + + class SipPort : public SipPort_BASE { + params _cfg_params; + params _layer_params; + layer* _layer; + std::string _time_key; + public: + SipPort(const char *par_port_name); + ~SipPort(); + + void set_parameter(const char *parameter_name, const char *parameter_value); + void receiveMsg (const LibSip__SIPTypesAndValues::REGISTER__Request&, const params&); + + private: + /* void Handle_Fd_Event(int fd, boolean is_readable, + boolean is_writable, boolean is_error); */ + void Handle_Fd_Event_Error(int fd); + void Handle_Fd_Event_Writable(int fd); + void Handle_Fd_Event_Readable(int fd); + /* void Handle_Timeout(double time_since_last_call); */ + + protected: + void user_map(const char *system_port); + void user_unmap(const char *system_port); + + void user_start(); + void user_stop(); + + protected: + virtual void outgoing_send(const LibSip__SIPTypesAndValues::Request& send_par, const Address4SIP *destination_address) { }; + virtual void outgoing_send(const LibSip__SIPTypesAndValues::REGISTER__Request& send_par, const Address4SIP *destination_address) { }; + virtual void outgoing_send(const LibSip__SIPTypesAndValues::INVITE__Request& send_par, const Address4SIP *destination_address) { }; + virtual void outgoing_send(const LibSip__SIPTypesAndValues::OPTIONS__Request& send_par, const Address4SIP *destination_address) { }; + virtual void outgoing_send(const LibSip__SIPTypesAndValues::BYE__Request& send_par, const Address4SIP *destination_address) { }; + virtual void outgoing_send(const LibSip__SIPTypesAndValues::CANCEL__Request& send_par, const Address4SIP *destination_address) { }; + virtual void outgoing_send(const LibSip__SIPTypesAndValues::ACK__Request& send_par, const Address4SIP *destination_address) { }; + virtual void outgoing_send(const LibSip__SIPTypesAndValues::PRACK__Request& send_par, const Address4SIP *destination_address) { }; + virtual void outgoing_send(const LibSip__SIPTypesAndValues::NOTIFY__Request& send_par, const Address4SIP *destination_address) { }; + virtual void outgoing_send(const LibSip__SIPTypesAndValues::SUBSCRIBE__Request& send_par, const Address4SIP *destination_address) { }; + virtual void outgoing_send(const LibSip__SIPTypesAndValues::PUBLISH__Request& send_par, const Address4SIP *destination_address) { }; + virtual void outgoing_send(const LibSip__SIPTypesAndValues::UPDATE__Request& send_par, const Address4SIP *destination_address) { }; + virtual void outgoing_send(const LibSip__SIPTypesAndValues::REFER__Request& send_par, const Address4SIP *destination_address) { }; + virtual void outgoing_send(const LibSip__SIPTypesAndValues::MESSAGE__Request& send_par, const Address4SIP *destination_address) { }; + virtual void outgoing_send(const LibSip__SIPTypesAndValues::INFO__Request& send_par, const Address4SIP *destination_address) { }; + virtual void outgoing_send(const LibSip__SIPTypesAndValues::Response& send_par, const Address4SIP *destination_address) { }; + virtual void outgoing_send(const CHARSTRING& send_par, const Address4SIP *destination_address) { }; + }; // End of class SipPort + +} + diff --git a/ccsrc/Protocols/ETH/ethernet_layer.cc b/ccsrc/Protocols/ETH/ethernet_layer.cc new file mode 100644 index 0000000000000000000000000000000000000000..d0ba32a00d25430551fe16cabda9ae914381a34a --- /dev/null +++ b/ccsrc/Protocols/ETH/ethernet_layer.cc @@ -0,0 +1,82 @@ +#include "ethernet_layer_factory.hh" + +#include "loggers.hh" + +ethernet_layer::ethernet_layer(const std::string & p_type, const std::string & param) : layer(p_type), _params() { + loggers::get_instance().log(">>> ethernet_layer::ethernet_layer: %s, %s", to_string().c_str(), param.c_str()); + // Setup parameters + params::convert(_params, param); + params::const_iterator it = _params.find("mac_src"); + if (it == _params.cend()) { + _params.insert(std::pair(std::string("mac_src"), "000000000000")); + } + it = _params.find("mac_bc"); + if (it == _params.cend()) { + _params.insert(std::pair(std::string("mac_bc"), "FFFFFFFFFFFF")); + } + it = _params.find("eth_type"); + if (it == _params.cend()) { + _params.insert(std::pair(std::string("eth_type"), "8947")); + } + //_params.log(); +} + +void ethernet_layer::send_data(OCTETSTRING& data, params& params) { + loggers::get_instance().log_msg(">>> ethernet_layer::send_data: ", data); + + OCTETSTRING eth; + // Destination MAC address + params::const_iterator it = params.find(params::mac_dst); // Find in provided parameters, params + if (it != params.cend()) { + eth = str2oct(CHARSTRING(it->second.c_str())); + } else { + it = _params.find(params::mac_dst); + if (it != _params.cend()) { + eth = str2oct(CHARSTRING(it->second.c_str())); + } else { + eth = str2oct(CHARSTRING(_params[params::mac_bc].c_str())); + } + } + // Source MAC address + it = params.find(params::mac_src); // Find in provided parameters, params + if (it != params.cend()) { + eth += str2oct(CHARSTRING(it->second.c_str())); + } else { + eth += str2oct(CHARSTRING(_params[params::mac_src].c_str())); + } + // Ethernet type + it = params.find(params::eth_type); // Find in layer parameters + if (it != params.cend()) { + eth += str2oct(CHARSTRING(it->second.c_str())); + } else { + eth += str2oct(CHARSTRING(_params[params::eth_type].c_str())); + } + + eth += data; + send_to_all_layers(eth, params); +} + +void ethernet_layer::receive_data(OCTETSTRING& data, params& params) { + loggers::get_instance().log_msg(">>> ethernet_layer::receive_data: ", data); + + // Extract dest MAC Address + OCTETSTRING dst = OCTETSTRING(6, static_cast(data)); + //loggers::get_instance().log_msg("ethernet_layer::receive_data: dst: ", dst); + // Extract source MAC Address + OCTETSTRING src = OCTETSTRING(6, 6 + static_cast(data)); + //loggers::get_instance().log_msg("ethernet_layer::receive_data: src: ", src); + // Extract ethertype + OCTETSTRING proto = OCTETSTRING(2, 2 + static_cast(data)); + //loggers::get_instance().log_msg("ethernet_layer::receive_data: proto: ", proto); + data = OCTETSTRING(data.lengthof() - 14, 14 + static_cast(data)); + // Update params + CHARSTRING s = oct2str(dst); + params.insert(std::pair(params::mac_dst, std::string(static_cast(s)))); + s = oct2str(src); + params.insert(std::pair(params::mac_src, std::string(static_cast(s)))); + //loggers::get_instance().log_msg("ethernet_layer::receive_data: payload for upper layer:", data); + + receive_to_all_layers(data, params); +} + +ethernet_layer_factory ethernet_layer_factory::_f; diff --git a/ccsrc/Protocols/ETH/ethernet_layer.hh b/ccsrc/Protocols/ETH/ethernet_layer.hh new file mode 100644 index 0000000000000000000000000000000000000000..6f224a8e6ccfde54ec97fcd76389f76a0c29eb7c --- /dev/null +++ b/ccsrc/Protocols/ETH/ethernet_layer.hh @@ -0,0 +1,48 @@ +/*! + * \file udp_layer.hh + * \brief Header file for ITS UDP/IP protocol layer definition. + * \author ETSI STF525 + * \copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + * \version 0.1 + */ +#pragma once + +#include "t_layer.hh" +#include "params.hh" + +class ethernet_layer : public layer { + params _params; //! Layer parameters + +public: //! \publicsection + /*! + * \brief Specialised constructor + * Create a new instance of the ethernet_layer class + * \param[in] p_type \todo + * \param[in] p_param \todo + */ + ethernet_layer(const std::string & p_type, const std::string & param); + /*! + * \brief Default destructor + */ + virtual ~ethernet_layer() {}; + + /*! + * \virtual + * \fn void send_data(OCTETSTRING& data, params& params); + * \brief Send bytes formated data to the lower layers + * \param[in] p_data The data to be sent + * \param[in] p_params Some parameters to overwrite default value of the lower layers parameters + */ + virtual void send_data(OCTETSTRING& data, params& params); + /*! + * \virtual + * \fn void receive_data(OCTETSTRING& data, params& params); + * \brief Receive bytes formated data from the lower layers + * \param[in] p_data The bytes formated data received + * \param[in] p_params Some lower layers parameters values when data was received + */ + virtual void receive_data(OCTETSTRING& data, params& info); +}; // End of class ethernet_layer diff --git a/ccsrc/Protocols/ETH/ethernet_layer_factory.hh b/ccsrc/Protocols/ETH/ethernet_layer_factory.hh new file mode 100644 index 0000000000000000000000000000000000000000..099a925f023ec9631da15c92eb8870c909ec5d61 --- /dev/null +++ b/ccsrc/Protocols/ETH/ethernet_layer_factory.hh @@ -0,0 +1,45 @@ +/*! + * \file ethernet_layer_factory.hh + * \brief Header file for ITS Ethernet protocol layer factory. + * \author ETSI STF525 + * \copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + * \version 0.1 + */ +#pragma once + +#include "layer_stack_builder.hh" + +#include "ethernet_layer.hh" + +/*! + * \class ethernet_layer_factory + * \brief This class provides a factory class to create an ethernet_layer class instance + */ +class ethernet_layer_factory: public layer_factory { + static ethernet_layer_factory _f; //! Reference to the unique instance of this class +public: //! \publicsection + /*! + * \brief Default constructor + * Create a new instance of the ethernet_layer_factory class + * \remark The ETH layer identifier is ETH + */ + ethernet_layer_factory() { + // register factory + layer_stack_builder::register_layer_factory("ETH", this); + }; + /*! + * \fn layer* create_layer(const std::string & type, const std::string & param); + * \brief Create the layers stack based on the provided layers stack description + * \param[in] p_type The provided layers stack description + * \param[in] p_params Optional parameters + * \return 0 on success, -1 otherwise + * \inline + */ + inline virtual layer* create_layer(const std::string& p_type, const std::string& p_param) { + return new ethernet_layer(p_type, p_param); + }; +}; // End of class ethernet_layer_factory + diff --git a/ccsrc/Protocols/Held/held_codec.cc b/ccsrc/Protocols/Held/held_codec.cc new file mode 100644 index 0000000000000000000000000000000000000000..63aded118dd75401836ad58975ac401b589a2082 --- /dev/null +++ b/ccsrc/Protocols/Held/held_codec.cc @@ -0,0 +1,82 @@ +#include +#include +#include + +#include "held_codec_factory.hh" + +#include "loggers.hh" + +#include "LibItsHttp_XmlMessageBodyTypes.hh" + +#include "urn_ietf_params_xml_ns_geopriv_held.hh" + +int held_codec::encode (const LibItsHttp__XmlMessageBodyTypes::XmlBody& msg, OCTETSTRING& data) +{ + loggers::get_instance().log_msg(">>> held_codec::encode: ", (const Base_Type&)msg); + + TTCN_EncDec::clear_error(); + TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_DEFAULT); + TTCN_Buffer encoding_buffer; + + if (msg.ischosen(LibItsHttp__XmlMessageBodyTypes::XmlBody::ALT_locationRequest)) { + const urn__ietf__params__xml__ns__geopriv__held::LocationRequestType& location_request = msg.locationRequest(); + loggers::get_instance().log_msg("held_codec::encode: Process LocationRequestType", (const Base_Type&)location_request); + location_request.encode(urn__ietf__params__xml__ns__geopriv__held::LocationRequest_descr_, encoding_buffer, TTCN_EncDec::CT_XER, XER_EXTENDED); + } else if (msg.ischosen(LibItsHttp__XmlMessageBodyTypes::XmlBody::ALT_locationResponse)) { + const urn__ietf__params__xml__ns__geopriv__held::LocationResponseType& location_response = msg.locationResponse(); + loggers::get_instance().log_msg("held_codec::encode: Process LocationResponseType", (const Base_Type&)location_response); + location_response.encode(urn__ietf__params__xml__ns__geopriv__held::LocationResponse_descr_, encoding_buffer, TTCN_EncDec::CT_XER, XER_EXTENDED); + } else { + loggers::get_instance().warning("held_codec::encode: Unsupported variant"); + return -1; + } + data = OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()); + loggers::get_instance().log_msg("held_codec::decode: After encoding: ", data); + + loggers::get_instance().log("<<< held_codec::encode"); + return 0; +} + +int held_codec::decode (const OCTETSTRING& p_data, LibItsHttp__XmlMessageBodyTypes::XmlBody& msg, params* p_params) +{ + loggers::get_instance().log_msg(">>> held_codec::decode: p_data=", p_data); + + TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_DEFAULT); + TTCN_EncDec::clear_error(); + TTCN_Buffer decoding_buffer(p_data); + + // Sanity checks + params::const_iterator it; + if (p_params == nullptr) { + loggers::get_instance().warning("held_codec::decode: Failed to access p_params (null pointer)"); + return -1; + } else { + it = p_params->find("decode_str"); + if (it == p_params->cend()) { + loggers::get_instance().warning("held_codec::decode: Failed to access p_params item (decode_str)"); + return -1; + } + } + + if (it->second.find("second.find("second.find(" +{ +public: + explicit held_codec() : codec() { }; + virtual ~held_codec() { }; + + virtual int encode (const LibItsHttp__XmlMessageBodyTypes::XmlBody&, OCTETSTRING& data); + virtual int decode (const OCTETSTRING& p_data, LibItsHttp__XmlMessageBodyTypes::XmlBody&, params* p_params = NULL); + +}; // End of class held_codec diff --git a/ccsrc/Protocols/Held/held_codec_factory.hh b/ccsrc/Protocols/Held/held_codec_factory.hh new file mode 100644 index 0000000000000000000000000000000000000000..703fa8f57b0b4270315a3753aa3168300f5db106 --- /dev/null +++ b/ccsrc/Protocols/Held/held_codec_factory.hh @@ -0,0 +1,46 @@ +/*! + * \file held_codec_factory.hh + * \brief Header file for ITS HELD/IP protocol codec factory. + * \author ETSI STF525 + * \copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + * \version 0.1 + */ +#pragma once + +#include "codec_stack_builder.hh" + +#include "held_codec.hh" + +class Record_Type; //! TITAN forward declaration + +/*! + * \class held_codec_factory + * \brief This class provides a factory class to create an held_codec class instance + */ +class held_codec_factory: public codec_factory { + static held_codec_factory _f; //! Reference to the unique instance of this class +public: //! \publicsection + /*! + * \brief Default constructor + * Create a new instance of the held_codec_factory class + * \remark The HELD/IP codec identifier is HELD + */ + held_codec_factory() { + // register factory + codec_stack_builder::register_codec_factory("held_codec", this); + }; + /*! + * \fn codec* create_codec(const std::string & type, const std::string & param); + * \brief Create the codecs stack based on the provided codecs stack description + * \param[in] p_type The provided codecs stack description + * \param[in] p_params Optional parameters + * \return 0 on success, -1 otherwise + * \inline + */ + inline virtual codec* create_codec() { + return (codec*)new held_codec(); + }; +}; // End of class held_codec_factory diff --git a/ccsrc/Protocols/Http/http_codec.cc b/ccsrc/Protocols/Http/http_codec.cc new file mode 100644 index 0000000000000000000000000000000000000000..4db763966d7d588fc605ede877d2c0631c2dfdfa --- /dev/null +++ b/ccsrc/Protocols/Http/http_codec.cc @@ -0,0 +1,555 @@ +#include +#include +#include + +#include "codec_stack_builder.hh" + +#include "http_codec.hh" + +#include "loggers.hh" + +#include "LibItsHttp_TypesAndValues.hh" +#include "LibItsHttp_MessageBodyTypes.hh" +#include "LibItsHttp_XmlMessageBodyTypes.hh" + +int http_codec::encode (const LibItsHttp__TypesAndValues::HttpMessage& msg, OCTETSTRING& data) +{ + loggers::get_instance().log_msg(">>> http_codec::encode: ", (const Base_Type&)msg); + + TTCN_EncDec::clear_error(); + TTCN_Buffer encoding_buffer; + + _ec.reset(); + + int result; + if (msg.ischosen(LibItsHttp__TypesAndValues::HttpMessage::ALT_request)) { + result = encode_request(msg.request(), encoding_buffer); + } else if (msg.ischosen(LibItsHttp__TypesAndValues::HttpMessage::ALT_response)) { + result = encode_response(msg.response(), encoding_buffer); + } else { + loggers::get_instance().warning("http_codec::encode: Unbound HttpMessage"); + return -1; + } + + data = OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()); + + loggers::get_instance().log_msg("<<< http_codec::encode: data=", data); + return result; +} + +int http_codec::decode (const OCTETSTRING& data, LibItsHttp__TypesAndValues::HttpMessage& msg, params* params) +{ + loggers::get_instance().log_msg(">>> http_codec::decode: data=", data); + + TTCN_EncDec::clear_error(); + TTCN_Buffer decoding_buffer(data); + loggers::get_instance().log_to_hexa("http_codec::decode: decoding_buffer=", decoding_buffer); + + _dc.reset(); + + _params = params; + + // Get the first line (e.g. HTTP/1.1 302 Found or POST / HTTP/1.1) + CHARSTRING message_id; + if (get_line(decoding_buffer, message_id) == -1) { + return -1; + } + loggers::get_instance().log_msg("http_codec::decode: message_id: ", message_id); + // Extract parameters + try { + std::string str(static_cast(message_id)); + std::regex rgx ("\\s*(\\w+)/"); + std::sregex_iterator begin(str.cbegin(), str.cend(), rgx); + std::smatch m = *begin; + loggers::get_instance().log("http_codec::decode: %d - %s", m.size(), m[0].str().c_str()); + if (m[0].str().compare("HTTP/") == 0) { // HTTP response + LibItsHttp__TypesAndValues::Response response; + std::regex rgx ("\\s*HTTP/(\\d+)\\.(\\d+)\\s+(\\d+)\\s+([\\w\\s\\t\\v\\f]+)*"); + std::sregex_iterator begin(str.cbegin(), str.cend(), rgx); + std::smatch m = *begin; + loggers::get_instance().log("http_codec::decode: Process response: %d", m.size()); + if (m.size() != 5) { + loggers::get_instance().error("http_codec::decode: Unsupported tag"); + return -1; + } + response.version__major() = std::stoi(m[1].str().c_str()); + response.version__minor() = std::stoi(m[2].str().c_str()); + response.statuscode() = std::stoi(m[3].str().c_str()); + response.statustext() = CHARSTRING(m[4].str().c_str()); + LibItsHttp__TypesAndValues::HeaderLines headers; + decode_headers(decoding_buffer, headers); + response.header() = headers; + loggers::get_instance().log_to_hexa("Before decoding Body: ", decoding_buffer); + LibItsHttp__MessageBodyTypes::HttpMessageBody body; + if (decode_body(decoding_buffer, body) == -1) { + response.body().set_to_omit(); + } else { + response.body() = OPTIONAL(body); + } + msg.response() = response; + } else { // HTTP request + LibItsHttp__TypesAndValues::Request request; + std::regex rgx ("\\s*(\\w+)\\s+(.+)\\s+HTTP/(\\d)\\.(\\d)"); + std::sregex_iterator begin(str.cbegin(), str.cend(), rgx); + std::smatch m = *begin; + if (m.size() != 5) { + loggers::get_instance().error("http_codec::decode: Unsupported tag"); + return -1; + } + request.method() = CHARSTRING(m[1].str().c_str()); + request.uri() = CHARSTRING(m[2].str().c_str()); + request.version__major() = std::stoi(m[3].str().c_str()); + request.version__minor() = std::stoi(m[4].str().c_str()); + LibItsHttp__TypesAndValues::HeaderLines headers; + decode_headers(decoding_buffer, headers); + request.header() = headers; + OPTIONAL body; + body.set_to_omit(); + if (decode_body(decoding_buffer, body) == -1) { + request.body().set_to_omit(); + } else { + request.body() = body; + } + msg.request() = request; + } + + loggers::get_instance().log_msg("<<< http_codec::decode: ", (const Base_Type&)msg); + return 0; + } + catch(const std::logic_error& e) { + return -1; + } +} + +int http_codec::encode_request(const LibItsHttp__TypesAndValues::Request& p_request, TTCN_Buffer& p_encoding_buffer) +{ + loggers::get_instance().log_msg(">>> http_codec::encode_request: ", (const Base_Type&)p_request); + + const OPTIONAL& v = p_request.body(); + OCTETSTRING os; + if (v.ispresent()) { + const LibItsHttp__MessageBodyTypes::HttpMessageBody& body = static_cast(*v.get_opt_value()); + loggers::get_instance().log_msg("http_codec::encode_request: body: ", body); + if (encode_body(body, os) == -1) { + loggers::get_instance().warning("http_codec::encode_request: Failed to encode HTTP body"); + _ec.length = 0; + _ec.is_content_length_present = 0x00; + } else { + _ec.length = os.lengthof(); + _ec.is_content_length_present = 0x01; + } + loggers::get_instance().log("http_codec::encode_request: length=%d", _ec.length); + } else { + loggers::get_instance().log("http_codec::encode_request: HTTP body field not present"); + _ec.length = 0; + _ec.is_content_length_present = 0x00; + } + + // Encode generic part + p_encoding_buffer.put_cs(p_request.method()); + p_encoding_buffer.put_c(' '); + p_encoding_buffer.put_cs(p_request.uri()); + p_encoding_buffer.put_cs(" HTTP/"); + p_encoding_buffer.put_cs(int2str(p_request.version__major())); + p_encoding_buffer.put_c('.'); + p_encoding_buffer.put_cs(int2str(p_request.version__minor())); + p_encoding_buffer.put_cs("\r\n"); + // Encode headers + const LibItsHttp__TypesAndValues::HeaderLines& headers = p_request.header(); + for (int i = 0; i < headers.size_of(); i++) { + const LibItsHttp__TypesAndValues::HeaderLine& header = headers[i]; + loggers::get_instance().log_msg("http_codec::encode_request: Processing header ", header.header__name()); + p_encoding_buffer.put_cs(header.header__name()); + p_encoding_buffer.put_cs(": "); + if (std::string(static_cast(header.header__name())).compare("Content-length") == 0) { + if (_ec.length != 0) { + p_encoding_buffer.put_cs(int2str(_ec.length + 2/*Stand for the last CRLF*/)); + _ec.is_content_length_present = 0x01; + } else { + p_encoding_buffer.put_cs("0"); + _ec.is_content_length_present = 0x00; + } + loggers::get_instance().log("http_codec::encode_request: Content-length: %d - %x", _ec.length, _ec.is_content_length_present); + } else { + const OPTIONAL& o = header.header__value(); + if (o.ispresent()) { + const LibItsHttp__TypesAndValues::charstring__list& v = dynamic_cast &>(o); + if (v.size_of() > 0) { + loggers::get_instance().log_msg("http_codec::encode_request: Processing value ", v[0]); + p_encoding_buffer.put_cs(v[0]); + int j = 1; + while (j < v.size_of()) { + p_encoding_buffer.put_cs(", "); + loggers::get_instance().log_msg("http_codec::encode_request: Processing value ", v[j]); + p_encoding_buffer.put_cs(v[j]); + j += 1; + } // End of 'while' statement + } + } // else, do not include it + } + p_encoding_buffer.put_cs("\r\n"); + } // End of 'for' statement + + p_encoding_buffer.put_cs("\r\n"); + if (_ec.is_content_length_present == 0x01) { + loggers::get_instance().log_msg("http_codec::encode_request: Add body ", os); + p_encoding_buffer.put_os(os); + p_encoding_buffer.put_cs("\r\n"); + } + + return 0; +} + +int http_codec::encode_response (const LibItsHttp__TypesAndValues::Response& p_response, TTCN_Buffer& p_encoding_buffer) { + loggers::get_instance().log_msg(">>> http_codec::encode_response: ", (const Base_Type&)p_response); + + const OPTIONAL& v = p_response.body(); + OCTETSTRING os; + if (v.ispresent()) { + const LibItsHttp__MessageBodyTypes::HttpMessageBody& body = static_cast(*v.get_opt_value()); + loggers::get_instance().log_msg("http_codec::encode_response: body: ", body); + if (encode_body(body, os) == -1) { + _ec.length = 0; + } + } + + // Encode generic part + p_encoding_buffer.put_cs("HTTP/"); + p_encoding_buffer.put_cs(int2str(p_response.version__major())); + p_encoding_buffer.put_c('.'); + p_encoding_buffer.put_cs(int2str(p_response.version__minor())); + p_encoding_buffer.put_cs(" "); + p_encoding_buffer.put_cs(int2str(p_response.statuscode())); + p_encoding_buffer.put_cs(" "); + if (p_response.statustext().lengthof() != 0) { + p_encoding_buffer.put_cs(p_response.statustext()); + } + p_encoding_buffer.put_cs("\r\n"); + // Encode headers + const LibItsHttp__TypesAndValues::HeaderLines& headers = p_response.header(); + for (int i = 0; i < headers.size_of(); i++) { + const LibItsHttp__TypesAndValues::HeaderLine& header = headers[i]; + loggers::get_instance().log_msg("http_codec::encode_response: Processing header ", header.header__name()); + p_encoding_buffer.put_cs(header.header__name()); + p_encoding_buffer.put_cs(": "); + if (std::string(static_cast(header.header__name())).compare("Content-Length") == 0) { + if (_ec.length != 0) { + p_encoding_buffer.put_cs(int2str(_ec.length + 2/*Stand for the last CRLF*/)); + } else { + p_encoding_buffer.put_cs("0"); + } + _ec.is_content_length_present = 0x01; + } else { + const OPTIONAL& o = header.header__value(); + if (o.ispresent()) { + const LibItsHttp__TypesAndValues::charstring__list& v = dynamic_cast &>(o); + if (v.size_of() > 0) { + loggers::get_instance().log_msg("http_codec::encode_response: Processing value ", v[0]); + p_encoding_buffer.put_cs(v[0]); + int j = 1; + while (j < v.size_of()) { + p_encoding_buffer.put_cs(", "); + loggers::get_instance().log_msg("http_codec::encode_response: Processing value ", v[j]); + p_encoding_buffer.put_cs(v[j]); + j += 1; + } // End of 'while' statement + } + } // else, do not include it + } + p_encoding_buffer.put_cs("\r\n"); + } // End of 'for' statement + + p_encoding_buffer.put_cs("\r\n"); + if (_ec.length != 0) { + p_encoding_buffer.put_os(os); + p_encoding_buffer.put_cs("\r\n"); + } + + return 0; +} + +int http_codec::decode_headers(TTCN_Buffer& decoding_buffer, LibItsHttp__TypesAndValues::HeaderLines& headers) { + loggers::get_instance().log(">>> http_codec::decode_headers"); + loggers::get_instance().log_to_hexa("http_codec::decode_headers", decoding_buffer); + + CHARSTRING cstr; + int i = 0; + while (true) { + switch(get_line(decoding_buffer, cstr, true)) { + case 0: { + loggers::get_instance().log_msg("http_codec::decode_headers: ", cstr); + LibItsHttp__TypesAndValues::HeaderLine header; + if (decode_header(cstr, header) == -1) { + loggers::get_instance().warning("http_codec::decode_headers: Failed to decode header %s", static_cast(cstr)); + return -1; + } + headers[i++] = header; + } + break; + case 1: + loggers::get_instance().log_msg("<<< http_codec::decode_headers: ", headers); + return 0; + case -1: + loggers::get_instance().warning("http_codec::decode_headers: Failed to decode headers"); + return -1; + } // End of 'switch' statement + } // End of 'while' statement +} + +int http_codec::decode_header(CHARSTRING& header_line, LibItsHttp__TypesAndValues::HeaderLine& header) { + loggers::get_instance().log_msg(">>> http_codec::decode_header", header_line); + + try { + std::string str(static_cast(header_line)); + std::regex rgx ("([0-9a-zA-Z-]+)\\:\\s+(.+)(,(.+))*"); + std::sregex_iterator begin(str.cbegin(), str.cend(), rgx); + std::smatch m = *begin; + if (m.size() < 5) { + loggers::get_instance().warning("http_codec::decode_header: Failed to decode header %s", str.c_str()); + return -1; + } + loggers::get_instance().log("http_codec::decode_header: %d", m.size()); + header.header__name() = CHARSTRING(m[1].str().c_str()); + LibItsHttp__TypesAndValues::charstring__list v; + for (unsigned int j = 0; j < m.size(); j++) { + if (m[j + 2].str().length() == 0) { + break; + } + v[j] = CHARSTRING(m[j + 2].str().c_str()); + } // End of 'for' statement + header.header__value() = OPTIONAL(v); + + if (m[1].str().compare("Content-Length") == 0) { + // Save the the body length + loggers::get_instance().log("http_codec::decode_header: decoded Content-Length %s", m[2].str().c_str()); + _dc.length = std::stoi(m[2].str()); + } + return 0; + } + catch(const std::logic_error& e) { + return -1; + } +} + +int http_codec::encode_body(const LibItsHttp__MessageBodyTypes::HttpMessageBody& p_message_body, OCTETSTRING& p_encoding_buffer) { + loggers::get_instance().log_msg(">>> http_codec::encode_body: ", (const Base_Type&)p_message_body); + loggers::get_instance().log("http_codec::encode_body: # of codecs=%d", _codecs.size()); + + if (p_message_body.ischosen(LibItsHttp__MessageBodyTypes::HttpMessageBody::ALT_binary__body)) { + p_encoding_buffer = p_message_body.binary__body().raw(); + } else if (p_message_body.ischosen(LibItsHttp__MessageBodyTypes::HttpMessageBody::ALT_html__body)) { + p_encoding_buffer = OCTETSTRING(p_message_body.html__body().lengthof(), (unsigned char*)static_cast(p_message_body.html__body())); + } else if (p_message_body.ischosen(LibItsHttp__MessageBodyTypes::HttpMessageBody::ALT_text__body)) { + p_encoding_buffer = OCTETSTRING(p_message_body.text__body().lengthof(), (unsigned char*)static_cast(p_message_body.text__body())); + } else if (p_message_body.ischosen(LibItsHttp__MessageBodyTypes::HttpMessageBody::ALT_xml__body)) { + const LibItsHttp__XmlMessageBodyTypes::XmlBody& xml_body = p_message_body.xml__body(); + if (xml_body.ischosen(LibItsHttp__XmlMessageBodyTypes::XmlBody::ALT_raw)) { + p_encoding_buffer = OCTETSTRING(xml_body.raw().lengthof(), (unsigned char*)static_cast(xml_body.raw())); + } else if (xml_body.ischosen(LibItsHttp__XmlMessageBodyTypes::XmlBody::ALT_findServiceRequest)) { + std::map > >::const_iterator it = _codecs.find("lost"); + if (it != _codecs.cend()) { + loggers::get_instance().log("http_codec::encode_body: Call 'lost_codec'"); + _codecs["lost"]->encode((Record_Type&)xml_body, p_encoding_buffer); + } else { + loggers::get_instance().warning("http_codec::encode_body: Unsupported HTTP codec, use raw field as default"); + p_encoding_buffer = OCTETSTRING(xml_body.raw().lengthof(), (unsigned char*)static_cast(xml_body.raw())); + // TODO Add new HTTP message codec here + } + } else { + std::map > >::const_iterator it = _codecs.find("held"); + if (it != _codecs.cend()) { + loggers::get_instance().log("http_codec::encode_body: Call 'held_codec'"); + _codecs["held"]->encode((Record_Type&)xml_body, p_encoding_buffer); + } else { + loggers::get_instance().warning("http_codec::encode_body: Unsupported HTTP codec, use raw field as default"); + p_encoding_buffer = OCTETSTRING(xml_body.raw().lengthof(), (unsigned char*)static_cast(xml_body.raw())); + // TODO Add new HTTP message codec here + } + } + } else { + loggers::get_instance().warning("http_codec::encode_body: Failed to encode HTTP message body"); + return -1; + } + loggers::get_instance().log_msg("http_codec::encode_body: HTTP message ", p_encoding_buffer); + _ec.length = p_encoding_buffer.lengthof(); + loggers::get_instance().log("http_codec::encode_body: HTTP message length: %d", _ec.length); + + return 0; +} + +int http_codec::decode_body(TTCN_Buffer& decoding_buffer, LibItsHttp__MessageBodyTypes::HttpMessageBody& message_body) { + loggers::get_instance().log(">>> http_codec::decode_body"); + loggers::get_instance().log_to_hexa("http_codec::decode_body", decoding_buffer); + loggers::get_instance().log("http_codec::decode_body: # of codecs=%d", _codecs.size()); + + // Sanity check + if (decoding_buffer.get_len() - decoding_buffer.get_pos() <= 0) { + return -1; + } + + OCTETSTRING s(decoding_buffer.get_len() - decoding_buffer.get_pos(), decoding_buffer.get_data() + decoding_buffer.get_pos()); + loggers::get_instance().log_msg("http_codec::decode_body: raw body=", s); + // Align the payload length with the specified Content-lenght value + loggers::get_instance().log("http_codec::decode_body: _dc.length=%d - body length=%d", _dc.length, s.lengthof()); + OCTETSTRING body; + if (_dc.length != 0) { + const unsigned char* p = static_cast(s); + if ((unsigned int)s.lengthof() <= _dc.length) { + body = OCTETSTRING(s.lengthof(), p); + } else { + body = OCTETSTRING(_dc.length, p); + } + } else { + loggers::get_instance().warning("http_codec::decode_body: No Conten-Length header, process all remaining bytes"); + body = s; + } + loggers::get_instance().log_msg("http_codec::decode_body: Aligned body=", body); + // Remove CRLF if any + int counter = 0; + if ((body[body.lengthof() - 1].get_octet() == 0x0d) || (body[body.lengthof() - 1].get_octet() == 0x0a)) { + counter += 1; + if ((body[body.lengthof() - 2].get_octet() == 0x0d) || (body[body.lengthof() - 2].get_octet() == 0x0a)) { + counter += 1; + } + } + loggers::get_instance().log("http_codec::decode_body: Counter=%d", counter); + body = OCTETSTRING(body.lengthof() - counter, static_cast(body)); + loggers::get_instance().log_msg("http_codec::decode_body: Finalised body=", body); + // Check if HTTP message body contains binary characters + for (int i = 0; i < body.lengthof(); i++) { + unsigned char c = body[i].get_octet(); + if (!std::isprint(c) && !std::isspace(c) && !std::ispunct(c)) { + loggers::get_instance().log("http_codec::decode_body: Byte #%d is not printable: 0x%02x", i, body[i].get_octet()); + _dc.is_binary = 0x01; + break; + } + } // End of 'for' statement + loggers::get_instance().log("http_codec::decode_body: Binary mode: %x", _dc.is_binary); + LibItsHttp__MessageBodyTypes::HttpMessageBody v; + if (_dc.is_binary == 0x01) { + LibItsHttp__BinaryMessageBodyTypes::BinaryBody bb; + bb.raw() = body; + message_body.binary__body() = bb; + } else { + // Convert into string + params p; + p["decode_str"] = std::string(static_cast(body), body.lengthof() + static_cast(body)); + // Try to identify xml + if (p["decode_str"].find("" + if (p["decode_str"].find("xmlns=\"urn:ietf:params:xml:ns:geopriv:held\">") != std::string::npos) { + loggers::get_instance().log("http_codec::decode_body: Find 'urn:ietf:params:xml:ns:geopriv:held'"); + if (_codecs["held"].get() != nullptr) { + loggers::get_instance().log("http_codec::decode_body: Call 'held_codec'"); + if (_codecs["held"]->decode(body, (Record_Type&)xml_body, &p) == -1) { + loggers::get_instance().warning("http_codec::decode_body: Failed to decode HELD message"); + xml_body.raw() = CHARSTRING(body.lengthof(), (char*)static_cast(body)); + } else { + loggers::get_instance().log_msg("http_codec::decode_body: Decoded message:", xml_body); + message_body.xml__body() = xml_body; + } + } else { + loggers::get_instance().warning("http_codec::decode_body: No codec for HELD"); + xml_body.raw() = CHARSTRING(body.lengthof(), (char*)static_cast(body)); + } + message_body.xml__body() = xml_body; + } else if (p["decode_str"].find("xmlns=\"urn:ietf:params:xml:ns:lost1\">") != std::string::npos) { + loggers::get_instance().log("http_codec::decode_body: Find 'urn:ietf:params:xml:ns:loat1'"); + if (_codecs["lost"].get() != nullptr) { + loggers::get_instance().log("http_codec::decode_body: Call 'lost_codec'"); + if (_codecs["lost"]->decode(body, (Record_Type&)xml_body, &p) == -1) { + loggers::get_instance().warning("http_codec::decode_body: Failed to decode LOST message"); + xml_body.raw() = CHARSTRING(body.lengthof(), (char*)static_cast(body)); + } else { + loggers::get_instance().log_msg("http_codec::decode_body: Decoded message:", xml_body); + message_body.xml__body() = xml_body; + } + } else { + loggers::get_instance().warning("http_codec::decode_body: No codec for LOST"); + xml_body.raw() = CHARSTRING(body.lengthof(), (char*)static_cast(body)); + } + message_body.xml__body() = xml_body; + } + } else if (p["decode_str"].find("") != std::string::npos) { // Try to identify HTML + loggers::get_instance().log("http_codec::decode_body: Find html message"); + LibItsHttp__MessageBodyTypes::TextBody txt_body; + loggers::get_instance().error("http_codec::decode_body: Not supported"); + } else { + loggers::get_instance().log("http_codec::decode_body: Use textBdy as default"); + LibItsHttp__MessageBodyTypes::TextBody text_body; + message_body.text__body() = CHARSTRING(body.lengthof(), (char*)static_cast(body)); + } + } + + return 0; +} + +int http_codec::get_line(TTCN_Buffer& buffer, CHARSTRING& to, const bool concatenate_header_lines) { + unsigned int i = 0; + const unsigned char *cc_to = buffer.get_read_data(); + + // Sanity checks + if(buffer.get_read_len() == 0) { + return -1; + } + + while (true) { + // Skip spaces, and empty lines + for( ; i < buffer.get_read_len() && cc_to[i] != '\0' && cc_to[i] != '\r' && cc_to[i] != '\n'; i++); + if(i >= buffer.get_read_len()) { // No more characters to process + to = CHARSTRING(""); + return -1; + } else if(cc_to[i] == '\n') { // New line found, we don't care is '\r' is missing + if ((i > 0) && ((i + 1) < buffer.get_read_len()) && concatenate_header_lines && ((cc_to[i + 1] == ' ') || (cc_to[i + 1] == '\t'))) { + i += 1; // Skip it + } else { + to = CHARSTRING(i, (const char*)cc_to); + buffer.set_pos(buffer.get_pos() + i + 1); + return i == 0 ? 1 : 0; + } + } else { + if ((i + 1) < buffer.get_read_len() && cc_to[i + 1] != '\n') { + return -1; + } else if(i > 0 && (i + 2) < buffer.get_read_len() && concatenate_header_lines && (cc_to[i+2] == ' ' || cc_to[i+2] == '\t')) { + i += 2; + } else { + to = CHARSTRING(i, (const char*)cc_to); + buffer.set_pos(buffer.get_pos() + i + 2); + return i == 0 ? 1 : 0; + } + } + } // End of 'while' statement +} + +void http_codec::set_payload_codecs(const std::string& p_codecs) { + loggers::get_instance().log(">>> http_codec::set_payload_codecs: %s", p_codecs.c_str()); + + // Sanity check + if (p_codecs.length() == 0) { + return; + } + + // Extract codecs + try { + std::regex rgx("(\\w+):(\\w+)(;(\\w+):(\\w+))*"); + std::sregex_iterator begin(p_codecs.cbegin(), p_codecs.cend(), rgx); + std::sregex_iterator end = std::sregex_iterator(); + // E.g. 9 - xml - :held_codec - held_codec - ;html:html_codec - html:html_codec - html - :html_codec - html_codec + for (std::sregex_iterator it = begin; it != end; ++it) { + std::smatch m = *it; + loggers::get_instance().log("http_codec::set_payload_codecs: %d - %s - %s - %s - %s - %s - %s - %s - %s", m.size(), m[1].str().c_str(), m[2].str().c_str(), m[3].str().c_str(), m[4].str().c_str(), m[5].str().c_str(), m[6].str().c_str(), m[7].str().c_str(), m[8].str().c_str()); + for (unsigned int j = 1; j < m.size() - 1; j += 3) { // Exclude m[0] + loggers::get_instance().log("http_codec::set_payload_codecs: insert (%s, %s), j = %d", m[j].str().c_str(), m[j + 1].str().c_str(), j); + std::string key(m[j].str()); + _codecs.insert(std::make_pair(key, std::unique_ptr >(codec_stack_builder::get_instance()->get_codec(m[j + 1].str().c_str())))); + } // End of 'for' statement + } // End of 'for' statement + //loggers::get_instance().log("http_codec::set_payload_codecs: _codecs length=%d", _codecs.size()); + } + catch(const std::logic_error& e){ + loggers::get_instance().warning("http_codec::set_payload_codecs: std::logic_error: %s", e.what()); + _codecs.clear(); + } +} diff --git a/ccsrc/Protocols/Http/http_codec.hh b/ccsrc/Protocols/Http/http_codec.hh new file mode 100644 index 0000000000000000000000000000000000000000..1a0f651ee79019f77da6b1010548982d5ae5b136 --- /dev/null +++ b/ccsrc/Protocols/Http/http_codec.hh @@ -0,0 +1,66 @@ +#pragma once + +#include + +#include "codec.hh" +#include "params.hh" + +class Base_Type; +class Record_Type; +class TTCN_Typedescriptor_t; +class TTCN_Buffer; + +namespace LibItsHttp__TypesAndValues { + class HttpMessage; + class Request; + class Response; + class HeaderLines; + class HeaderLine; +} +namespace LibItsHttp__MessageBodyTypes { + class HttpMessageBody; +} + +struct encoding_context { + unsigned int length; + unsigned char is_content_length_present; + + encoding_context() { reset(); }; + void reset() { length = -1; is_content_length_present = 0x00; }; +}; + +struct decoding_context { + unsigned int length; + unsigned char is_binary; + + decoding_context() { reset(); }; + void reset() { length = -1; is_binary = 0x00; }; +}; + +class http_codec: public codec < +LibItsHttp__TypesAndValues::HttpMessage, +LibItsHttp__TypesAndValues::HttpMessage> +{ + encoding_context _ec; + decoding_context _dc; + std::map > > _codecs; +public: + explicit http_codec() : codec(), _ec(), _dc(), _codecs() { }; + virtual ~http_codec() { }; + + virtual int encode (const LibItsHttp__TypesAndValues::HttpMessage&, OCTETSTRING& data); + virtual int decode (const OCTETSTRING& data, LibItsHttp__TypesAndValues::HttpMessage&, params* params = NULL); + + void set_payload_codecs(const std::string& p_codecs); + +private: + int encode_request (const LibItsHttp__TypesAndValues::Request& p_request, TTCN_Buffer& p_encoding_buffer); + int encode_response (const LibItsHttp__TypesAndValues::Response& p_response, TTCN_Buffer& p_encoding_buffer); + int encode_body(const LibItsHttp__MessageBodyTypes::HttpMessageBody& p_message_body, OCTETSTRING& p_encoding_buffer); + + int decode_headers(TTCN_Buffer& decoding_buffer, LibItsHttp__TypesAndValues::HeaderLines& headers); + int decode_header(CHARSTRING& header_line, LibItsHttp__TypesAndValues::HeaderLine& header); + int decode_body(TTCN_Buffer& decoding_buffer, LibItsHttp__MessageBodyTypes::HttpMessageBody& message_body); + int get_line(TTCN_Buffer& buffer, CHARSTRING& to, const bool concatenate_header_lines = false); + +}; // End of class http_codec diff --git a/ccsrc/Protocols/Http/http_layer.cc b/ccsrc/Protocols/Http/http_layer.cc new file mode 100644 index 0000000000000000000000000000000000000000..482e9dc511a3befca2b30f7f9450a95540d0f50d --- /dev/null +++ b/ccsrc/Protocols/Http/http_layer.cc @@ -0,0 +1,57 @@ +#include "LibItsHttp_TypesAndValues.hh" + +#include "http_layer_factory.hh" +#include "codec_stack_builder.hh" + +#include "loggers.hh" + +#include "converter.hh" + +using namespace std; // Required for isnan() +#include "LibItsHttp_TypesAndValues.hh" +#include "LibItsHttp_TestSystem.hh" + +http_layer::http_layer(const std::string & p_type, const std::string & param) : t_layer(p_type), _params()//, _device_mode{false} +{ + loggers::get_instance().log(">>> http_layer::http_layer: %s, %s", to_string().c_str(), param.c_str()); + // Setup parameters + params::convert(_params, param); + + params::const_iterator it = _params.find(params::codecs); + if (it != _params.cend()) { + _codec.set_payload_codecs(it->second); + } +} + +void http_layer::sendMsg(const LibItsHttp__TypesAndValues::HttpMessage& p_http_message, params& p_param) { + loggers::get_instance().log_msg(">>> http_layer::sendMsg: ", p_http_message); + + // Encode HttpMessage + OCTETSTRING data; + _codec.encode(p_http_message, data); + send_data(data, _params); +} + +void http_layer::send_data(OCTETSTRING& data, params& params) { + loggers::get_instance().log_msg(">>> http_layer::send_data: ", data); + + send_to_all_layers(data, params); +} + +void http_layer::receive_data(OCTETSTRING& data, params& params) +{ + loggers::get_instance().log_msg(">>> http_layer::receive_data: ", data); + + // Decode HTTP message + LibItsHttp__TypesAndValues::HttpMessage http_message; + if (_codec.decode(data, http_message) == -1) { + loggers::get_instance().warning("http_layer::receive_data: Failed to decode data"); + return; + } + + // Pass it to the ports + to_all_upper_ports(http_message, params); +} + +http_layer_factory http_layer_factory::_f; + diff --git a/ccsrc/Protocols/Http/http_layer.hh b/ccsrc/Protocols/Http/http_layer.hh new file mode 100644 index 0000000000000000000000000000000000000000..0a31e0081074dcd0a590af0f048e3385c6f4ec1a --- /dev/null +++ b/ccsrc/Protocols/Http/http_layer.hh @@ -0,0 +1,82 @@ +/*! + * \file http_layer.hh + * \brief Header file for ITS HTTP protocol layer. + * \author ETSI STF549 + * \copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + * \version 0.1 + */ +#pragma once + +#include + +#include "t_layer.hh" + +#include "http_codec.hh" + +namespace LibItsHttp__TestSystem { + class HttpPort; +} + +namespace LibItsHttp__TypesAndValues { + class HttpMessage; //! Forward declaration of TITAN class +} + +class OCTETSTRING; //! Forward declaration of TITAN class + +/*! + * \class http_layer + * \brief This class provides a factory class to create an tcp_layer class instance + */ +class http_layer : public t_layer { + params _params; + http_codec _codec; + +public: //! \publicsection + /*! + * \brief Specialised constructor + * Create a new instance of the http_layer class + * \param[in] p_type \todo + * \param[in] p_param \todo + */ + http_layer() : t_layer(), _params() { }; + /*! + * \brief Specialised constructor + * Create a new instance of the http_layer class + * \param[in] p_type \todo + * \param[in] p_param \todo + */ + http_layer(const std::string& p_type, const std::string& p_param); + /*! + * \brief Default destructor + */ + virtual ~http_layer() { }; + + /*! + * \fn void sendMsg(const LibItsHttp__TypesAndValues::HttpMessage& p_http_message, params& p_param); + * \brief Send HTTP message to the lower layers + * \param[in] p_http_message The GeoNetworking message to be sent + * \param[in] p_params Some parameters to overwrite default value of the lower layers parameters + */ + void sendMsg(const LibItsHttp__TypesAndValues::HttpMessage& p_http_message, params& p_param); + + /*! + * \virtual + * \fn void send_data(OCTETSTRING& data, params& params); + * \brief Send bytes formated data to the lower layers + * \param[in] p_data The data to be sent + * \param[in] p_params Some parameters to overwrite default value of the lower layers parameters + */ + virtual void send_data(OCTETSTRING& data, params& params); + /*! + * \virtual + * \fn void receive_data(OCTETSTRING& data, params& params); + * \brief Receive bytes formated data from the lower layers + * \param[in] p_data The bytes formated data received + * \param[in] p_params Some lower layers parameters values when data was received + */ + virtual void receive_data(OCTETSTRING& data, params& info); +}; // End of class http_layer + diff --git a/ccsrc/Protocols/Http/http_layer_factory.hh b/ccsrc/Protocols/Http/http_layer_factory.hh new file mode 100644 index 0000000000000000000000000000000000000000..8f7956056565abbf0a0b3626bc8f336624467738 --- /dev/null +++ b/ccsrc/Protocols/Http/http_layer_factory.hh @@ -0,0 +1,45 @@ +/*! + * \file http_layer_factory.hh + * \brief Header file for ITS Http protocol layer factory. + * \author ETSI STF525 + * \copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + * \version 0.1 + */ +#pragma once + +#include "layer_stack_builder.hh" + +#include "http_layer.hh" + +/*! + * \class http_layer_factory + * \brief This class provides a factory class to create an http_layer class instance + */ +class http_layer_factory : public layer_factory { + static http_layer_factory _f; //! Reference to the unique instance of this class +public: //! \publicsection + /*! + * \brief Default constructor + * Create a new instance of the tcp_layer_factory class + * \remark The HTTP layer identifier is HTTP + */ + http_layer_factory() { + // Register factory + layer_stack_builder::register_layer_factory("HTTP", this); + }; + /*! + * \fn layer* create_layer(const std::string & type, const std::string & param); + * \brief Create the layers stack based on the provided layers stack description + * \param[in] p_type The provided layers stack description + * \param[in] p_params Optional parameters + * \return 0 on success, -1 otherwise + * \inline + */ + inline virtual layer* create_layer(const std::string& p_type, const std::string& p_param){ + return new http_layer(p_type, p_param); + }; +}; // End of class http_layer_factory + diff --git a/ccsrc/Protocols/Lost/lost_codec.cc b/ccsrc/Protocols/Lost/lost_codec.cc new file mode 100644 index 0000000000000000000000000000000000000000..edf064330ba76a44fb66dfb428c9e35d835704ac --- /dev/null +++ b/ccsrc/Protocols/Lost/lost_codec.cc @@ -0,0 +1,78 @@ +#include +#include +#include + +#include "lost_codec_factory.hh" + +#include "loggers.hh" + +#include "LibItsHttp_XmlMessageBodyTypes.hh" + +#include "urn_ietf_params_xml_ns_lost1.hh" + +int lost_codec::encode (const LibItsHttp__XmlMessageBodyTypes::XmlBody& msg, OCTETSTRING& data) +{ + loggers::get_instance().log_msg(">>> lost_codec::encode: ", (const Base_Type&)msg); + + TTCN_EncDec::clear_error(); + TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_DEFAULT); + TTCN_Buffer encoding_buffer; + + if (msg.ischosen(LibItsHttp__XmlMessageBodyTypes::XmlBody::ALT_findServiceRequest)) { + const urn__ietf__params__xml__ns__lost1::FindService& find_service = msg.findServiceRequest(); + loggers::get_instance().log_msg("lost_codec::encode: Process FindService", (const Base_Type&)find_service); + find_service.encode(urn__ietf__params__xml__ns__lost1::FindService_descr_, encoding_buffer, TTCN_EncDec::CT_XER, XER_EXTENDED); + } else if (msg.ischosen(LibItsHttp__XmlMessageBodyTypes::XmlBody::ALT_findServiceResponse)) { + const urn__ietf__params__xml__ns__lost1::FindServiceResponse& find_service_response = msg.findServiceResponse(); + loggers::get_instance().log_msg("lost_codec::encode: Process FindServiceResponse", (const Base_Type&)find_service_response); + find_service_response.encode(urn__ietf__params__xml__ns__lost1::FindServiceResponse_descr_, encoding_buffer, TTCN_EncDec::CT_XER, XER_EXTENDED); + } else { + loggers::get_instance().warning("lost_codec::encode: Unsupported variant"); + return -1; + } + data = OCTETSTRING(encoding_buffer.get_len(), encoding_buffer.get_data()); + loggers::get_instance().log_msg("lost_codec::decode: After encoding: ", data); + + loggers::get_instance().log("<<< lost_codec::encode"); + return 0; +} + +int lost_codec::decode (const OCTETSTRING& p_data, LibItsHttp__XmlMessageBodyTypes::XmlBody& msg, params* p_params) +{ + loggers::get_instance().log_msg(">>> lost_codec::decode: p_data=", p_data); + + TTCN_EncDec::set_error_behavior(TTCN_EncDec::ET_ALL, TTCN_EncDec::EB_DEFAULT); + TTCN_EncDec::clear_error(); + TTCN_Buffer decoding_buffer(p_data); + + // Sanity checks + params::const_iterator it; + if (p_params == nullptr) { + loggers::get_instance().warning("lost_codec::decode: Failed to access p_params (null pointer)"); + return -1; + } else { + it = p_params->find("decode_str"); + if (it == p_params->cend()) { + loggers::get_instance().warning("lost_codec::decode: Failed to access p_params item (decode_str)"); + return -1; + } + } + + if (it->second.find("second.find(" +{ +public: + explicit lost_codec() : codec() { }; + virtual ~lost_codec() { }; + + virtual int encode (const LibItsHttp__XmlMessageBodyTypes::XmlBody&, OCTETSTRING& data); + virtual int decode (const OCTETSTRING& p_data, LibItsHttp__XmlMessageBodyTypes::XmlBody&, params* p_params = NULL); + +}; // End of class lost_codec diff --git a/ccsrc/Protocols/Lost/lost_codec_factory.hh b/ccsrc/Protocols/Lost/lost_codec_factory.hh new file mode 100644 index 0000000000000000000000000000000000000000..5015116948f5254c6484f6eb0b22e29218146d70 --- /dev/null +++ b/ccsrc/Protocols/Lost/lost_codec_factory.hh @@ -0,0 +1,46 @@ +/*! + * \file lost_codec_factory.hh + * \brief Header file for ITS LOST/IP protocol codec factory. + * \author ETSI STF525 + * \copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + * \version 0.1 + */ +#pragma once + +#include "codec_stack_builder.hh" + +#include "lost_codec.hh" + +class Record_Type; //! TITAN forward declaration + +/*! + * \class lost_codec_factory + * \brief This class provides a factory class to create an lost_codec class instance + */ +class lost_codec_factory: public codec_factory { + static lost_codec_factory _f; //! Reference to the unique instance of this class +public: //! \publicsection + /*! + * \brief Default constructor + * Create a new instance of the lost_codec_factory class + * \remark The LOST/IP codec identifier is LOST + */ + lost_codec_factory() { + // register factory + codec_stack_builder::register_codec_factory("lost_codec", this); + }; + /*! + * \fn codec* create_codec(const std::string & type, const std::string & param); + * \brief Create the codecs stack based on the provided codecs stack description + * \param[in] p_type The provided codecs stack description + * \param[in] p_params Optional parameters + * \return 0 on success, -1 otherwise + * \inline + */ + inline virtual codec* create_codec() { + return (codec*)new lost_codec(); + }; +}; // End of class lost_codec_factory diff --git a/ccsrc/Protocols/Pcap/pcap_layer.cc b/ccsrc/Protocols/Pcap/pcap_layer.cc new file mode 100644 index 0000000000000000000000000000000000000000..8872a33070aa763ba8300461fa31c6f7984953ba --- /dev/null +++ b/ccsrc/Protocols/Pcap/pcap_layer.cc @@ -0,0 +1,264 @@ +#if (OSTYPE == linux) + +#include +#include +#include +#include +#include + +#include "Port.hh" + +#include "pcap_layer_factory.hh" + +#include "loggers.hh" + +pcap_layer::pcap_layer(const std::string& p_type, const std::string& param) : layer(p_type), PORT(p_type.c_str()), _params(), _device(NULL), _pcap_h(-1), _thread(NULL), _running(FALSE), _resume(), _sent_file(NULL), _time_key("pcap_layer::Handle_Fd_Event_Readable") { + loggers::get_instance().log(">>> pcap_layer::pcap_layer: %s, %s", to_string().c_str(), param.c_str()); + _fd[0] = -1; _fd[1] = -1; + // Setup parameters + params::convert(_params, param); + //_params.log(); + // Prepare capture processing + char error_buffer[PCAP_ERRBUF_SIZE]; + params::const_iterator it = _params.find(params::nic); + if ((it != _params.end()) && !it->second.empty()) { // Use online capture + // Fetch the network address and network mask + bpf_u_int32 mask; // subnet mask + bpf_u_int32 net; // ip address + if (pcap_lookupnet(_params[params::nic].c_str(), &net, &mask, error_buffer) != 0) { + loggers::get_instance().error("pcap_layer::pcap_layer: pcap_layer::pcap_layer: Failed to fetch newtork address for device %s", _params[params::nic].c_str()); + } + loggers::get_instance().log("pcap_layer::pcap_layer: Device %s Network address: %d", _params[params::nic].c_str(), net); + // Open the device + _device = pcap_open_live(_params[params::nic].c_str(), 65536, 1, 1000, error_buffer); // TODO Replace hard coded values by pcap_layer:: + if (_device == NULL) { + loggers::get_instance().error("pcap_layer::pcap_layer: Failed to open device %s", _params[params::nic].c_str()); + } // else, continue + // Set non-blocking flag for the polling procedure + if (pcap_setnonblock(_device, 1, error_buffer) != 0) { + loggers::get_instance().error("pcap_layer::pcap_layer: Failed to set blocking mode: %s", error_buffer); + } + // Retrieve the device file handler + _pcap_h = pcap_get_selectable_fd(_device); + if (_pcap_h == -1) { + loggers::get_instance().error("pcap_layer::pcap_layer: Failed to get device handler"); + } + } else { + // Check file name + it = _params.find(std::string("file")); + if ((it != _params.cend()) && !it->second.empty()) { // Use offline capture + struct stat s = {0}; + if ((stat(_params["file"].c_str(), &s) != 0) || !S_ISREG(s.st_mode)) { + loggers::get_instance().error("pcap_layer::pcap_layer: Failed to acces PCAP file %s", _params["file"].c_str()); + } + // File exist, open it + _device = pcap_open_offline(_params["file"].c_str(), error_buffer); + if (_device == NULL) { + loggers::get_instance().error("pcap_layer::pcap_layer: Failed to open PCAP file %s", error_buffer); + } // else, continue + // Create the dump file for the sent packet based on the openned file name and the current time in milliseconds + it = _params.find("save_mode"); + if ((it != _params.cend()) && (it->second.compare("1") == 0)) { + unsigned long ms = std::chrono::system_clock::now().time_since_epoch() / std::chrono::milliseconds(1); + std::string ext("_" + std::to_string(ms)); + int i = _params["file"].find(".pcap"); + if (i > 0) { + std::string f(_params["file"].substr(0, i) + ext + ".pcap"); + loggers::get_instance().log("pcap_layer::pcap_layer: Save file name: %s", f.c_str()); + if ((_sent_file = pcap_dump_open(_device, f.c_str())) == NULL) { + loggers::get_instance().warning("pcap_layer::pcap_layer: Failed to open save file %s", f.c_str()); + } + } + } // else, nothing to do + } else { + loggers::get_instance().error("pcap_layer::pcap_layer: Failed to open PCAP file %s", error_buffer); + } + } + // Setup filter + std::string filter = ""; + it = _params.find(params::mac_src); + if (it == _params.end()) { // Not found + loggers::get_instance().error("pcap_layer::pcap_layer: mac_src parameter not found, cannot continue"); + } else { + // Reject ITS messages sent by this component + filter = "not ether src " + _params[params::mac_src]; + // Accept ITS broadcasted to this componenet + filter += " and (ether dst " + _params[params::mac_src]; + // Accept ITS broadcasted messages + it = _params.find(params::mac_bc); + if ((it != _params.end()) && !it->second.empty()) { + filter += " or ether dst " + it->second + ")"; + } else { + filter += " or ether dst ffffffffffff) "; + } + // Add user defined filter + it = _params.find(std::string("filter")); + if ((it != _params.end()) && !it->second.empty()) { + filter += _params["filter"]; + } // else nothing to do + } + // Log final PCAP filter + loggers::get_instance().user("pcap_layer::pcap_layer: Filter: %s", filter.c_str()); + if (!filter.empty()) { + struct bpf_program f = {0}; + if (pcap_compile(_device, &f, filter.c_str(), 1, PCAP_NETMASK_UNKNOWN) != 0) { + loggers::get_instance().error("pcap_layer::pcap_layer: Failed to compile PCAP filter"); + } + if (pcap_setfilter(_device, &f) != 0) { + loggers::get_instance().error("pcap_layer::pcap_layer: Failed to set PCAP filter"); + } + pcap_freecode(&f); + } + // Pass the device file handler to the polling procedure + if (_pcap_h != -1) { // Live capture + Handler_Add_Fd_Read(_pcap_h); + } else { // Offline capture + // Create a pipe + if (pipe2(_fd, O_NONBLOCK) == -1) { + loggers::get_instance().error("pcap_layer::pcap_layer: Failed to create a pipe: %s", ::strerror(errno)); + } + // Pass the pipe handler to the polling procedure + loggers::get_instance().log("pcap_layer::pcap_layer: Call handler with descriptor %d", _fd[0]); + Handler_Add_Fd_Read(_fd[0]); + // Create the offline reader thread + _thread = new std::thread(&pcap_layer::run, (void *)this); + if (_thread == NULL) { + loggers::get_instance().error("pcap_layer::pcap_layer: Failed to start offline thread"); + } + // Start it to dispatch packet to a pipe + while (_running == FALSE) { + std::this_thread::sleep_for(std::chrono::milliseconds(500)); + } + // Thread was started + loggers::get_instance().log("<<< pcap_layer::pcap_layer"); + } +} // End of ctor + +pcap_layer::~pcap_layer() { + loggers::get_instance().log(">>> pcap_layer::~pcap_layer"); + + if (_device != NULL) { + if (_thread != NULL) { + _running = FALSE; + // Wait for the working thread to terminate + _thread->join(); + loggers::get_instance().log("pcap_layer::~pcap_layer: Thread were stops"); + // Cleanup + delete _thread; + close(_fd[0]); + close(_fd[1]); + } + if (_sent_file != NULL) { + pcap_dump_close(_sent_file); + } + pcap_close(_device); + } +} // End of dtor + +void* pcap_layer::run(void* p_this) { + loggers::get_instance().log(">>> pcap_layer::run"); + + // Pointer the main object + pcap_layer& p = *static_cast(p_this); + // Wait a little bit before to start sending packet + std::this_thread::sleep_for(std::chrono::milliseconds(500)); + params::const_iterator it = p._params.find("frame_offset"); + if ((it != p._params.cend()) && (it->second.compare("0") != 0)) { + // TODO Try t use PCAP filter to start directly to the correct frame offset + /*try { + unsigned int offset = std::stoul(str_dec, &s); + // Skip frames + struct pcap_pkthdr *pkt_header; + const u_char *pkt_data; + int result = pcap_next_ex(_device, &pkt_header, &pkt_data); + if (result == 1) { // Succeed + } + } + catch (invalid_argument& i) { + } + catch (out_of_range& o) { + }*/ + } + // Let's go + p._running = TRUE; + while (p._running) { // Loop while _running flag is up + if (p._resume.try_lock() == TRUE) { // Previous packet was consumed, lock for the next one + write(p._fd[1], "\n", 1); // Any character will do the job + } else { // not ready yet + std::this_thread::sleep_for(std::chrono::milliseconds(100)); + } + } + + loggers::get_instance().log("<<< pcap_layer::run"); + return NULL; +} + +void pcap_layer::send_data(OCTETSTRING& data, params& params) { + loggers::get_instance().log_msg(">>> pcap_layer::send_data: ", data); + + if (_pcap_h != -1) { // Check if offline mode is used + if (pcap_sendpacket(_device, static_cast(data), data.lengthof()) == -1) { + loggers::get_instance().error("pcap_layer::send_data: Failed to send packet: %s", pcap_geterr(_device)); + } + } else if (_sent_file != NULL) { + struct pcap_pkthdr hdr; + std::chrono::system_clock::time_point now = std::chrono::system_clock::now(); + std::chrono::milliseconds ms = std::chrono::duration_cast(now.time_since_epoch()); + hdr.ts.tv_sec = ms.count() / 1000; + hdr.ts.tv_usec = (ms.count() % 1000) * 1000; + hdr.caplen = data.lengthof(); + hdr.len = hdr.caplen; + pcap_dump((u_char *)_sent_file, &hdr, static_cast(data)); + } else { + loggers::get_instance().log("pcap_layer::send_data: Offline mode, operation was skipped"); + } +} + +void pcap_layer::receive_data(OCTETSTRING& data, params& params) { + loggers::get_instance().log(">>> pcap_layer::receive_data: Received %d bytes", data.lengthof()); + loggers::get_instance().log_to_hexa("Packet dump", data); + + // Pass the packet to the upper layers + receive_to_all_layers(data, params); +} + +void pcap_layer::Handle_Fd_Event_Readable(int fd) { + //loggers::get_instance().log(">>> pcap_layer::Handle_Fd_Event_Readable: %d", fd); + + struct pcap_pkthdr *pkt_header; + const u_char *pkt_data; + int result = pcap_next_ex(_device, &pkt_header, &pkt_data); + if (result == 1) { // Succeed + if (pkt_header->caplen > 14) { // Reject too small packet + //loggers::get_instance().log("pcap_layer::Handle_Fd_Event_Readable: %.6d - %d", pkt_header->ts.tv_usec, pkt_header->len); + // Fill parameters from PCAP layer + params params; + params.insert(std::pair(std::string("timestamp"), std::to_string(pkt_header->ts.tv_usec))); + // Process the packet at this layer + OCTETSTRING os(pkt_header->caplen, pkt_data); + //loggers::get_instance().log_to_hexa("pcap_layer::Handle_Fd_Event_Readable: ", os); + // TODO Case of caplen != len !!! + float duration; + loggers::get_instance().set_start_time(_time_key); + this->receive_data(os, params); // TODO Check execution time for decoding operation + loggers::get_instance().set_stop_time(_time_key, duration); + } + } // else, skip the packet + // Specific to offline mode + if (_fd[0] != -1) { // Check if offline mode is used + //loggers::get_instance().log("pcap_layer::Handle_Fd_Event_Readable: Read pipe"); + char c[2]; + read(_fd[0], &c, 1); + if (result == -2) { // End of file, therminate worker thread + _running = FALSE; + } else { // Get next packet + //loggers::get_instance().log("pcap_layer::Handle_Fd_Event_Readable: pcap_next_ex failed: result=%d", result); + _resume.unlock(); + } + } // else, nothing to do +} + +pcap_layer_factory pcap_layer_factory::_f; + +#endif + diff --git a/ccsrc/Protocols/Pcap/pcap_layer.hh b/ccsrc/Protocols/Pcap/pcap_layer.hh new file mode 100644 index 0000000000000000000000000000000000000000..9b37f41eee064b13bba26cab6f08d83b75ba78a1 --- /dev/null +++ b/ccsrc/Protocols/Pcap/pcap_layer.hh @@ -0,0 +1,73 @@ +/*! + * \file pcap_layer.hh + * \brief Header file for ITS Pcap port layer. + * \author ETSI STF525 + * \copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + * \version 0.1 + */ +#pragma once + +#if (OSTYPE == linux) + +#include +#include +#include + +#include "t_layer.hh" +#include "params.hh" + +class PORT; //! Forward declaration of TITAN class + +/*! + * \class pcap_layer + * \brief This class provides description of ITS PCAP port protocol layer + */ +class pcap_layer : public layer, public PORT { + params _params; //! Layer parameters + pcap_t* _device; //! Device handle + int _pcap_h; //! PCAP instance handle + std::thread* _thread; //! Thread handle, used to read PCAP file instead of NIC, used in file mode + bool _running; //! Set to true when the thread is running, used in file mode + std::mutex _resume; //! \todo + pcap_dumper_t* _sent_file; //! Write file handle to save sent packet, used in file mode + std::string _time_key; //! \todo + int _fd[2]; //! \todo + + static void* run(void* p_this); +public: //! \publicsection + /*! + * \brief Specialised constructor + * Create a new instance of the pcap_layer class + * \param[in] p_type \todo + * \param[in] p_param \todo + */ + pcap_layer(const std::string& p_type, const std::string& param); + /*! + * \brief Default destructor + */ + virtual ~pcap_layer(); + + /*! + * \virtual + * \fn void send_data(OCTETSTRING& data, params& params); + * \brief Send bytes formated data to the lower layers + * \param[in] p_data The data to be sent + * \param[in] p_params Some parameters to overwrite default value of the lower layers parameters + */ + virtual void send_data(OCTETSTRING& data, params& params); + /*! + * \virtual + * \fn void receive_data(OCTETSTRING& data, params& params); + * \brief Receive bytes formated data from the lower layers + * \param[in] p_data The bytes formated data received + * \param[in] p_params Some lower layers parameters values when data was received + */ + virtual void receive_data(OCTETSTRING& data, params& info); + + void Handle_Fd_Event_Readable(int fd); +}; + +#endif diff --git a/ccsrc/Protocols/Pcap/pcap_layer_factory.hh b/ccsrc/Protocols/Pcap/pcap_layer_factory.hh new file mode 100644 index 0000000000000000000000000000000000000000..123b96aab0e6a077d401bc8bea6c1a6182f5c171 --- /dev/null +++ b/ccsrc/Protocols/Pcap/pcap_layer_factory.hh @@ -0,0 +1,49 @@ +/*! + * \file pcap_layer_factory.hh + * \brief Header file for Pcap layer factory. + * \author ETSI STF525 + * \copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + * \version 0.1 + */ +#pragma once + +#if (OSTYPE == linux) + +#include "layer_stack_builder.hh" + +#include "pcap_layer.hh" + +/*! + * \class pcap_layer_factory + * \brief This class provides a factory class to create an pcap_layer class instance + */ +class pcap_layer_factory: public layer_factory { + static pcap_layer_factory _f; //! Reference to the unique instance of this class +public: //! \publicsection + /*! + * \brief Default constructor + * Create a new instance of the udp_layer_factory class + * \remark The PCAP layer identifier is PCAP + */ + pcap_layer_factory() { + // register factory + layer_stack_builder::register_layer_factory("PCAP", this); + }; + /*! + * \fn layer* create_layer(const std::string & type, const std::string & param); + * \brief Create the layers stack based on the provided layers stack description + * \param[in] p_type The provided layers stack description + * \param[in] p_params Optional parameters + * \return 0 on success, -1 otherwise + * \inline + */ + inline virtual layer* create_layer(const std::string& p_type, const std::string& p_param) { + return new pcap_layer(p_type, p_param); + }; +}; // End of class pcap_layer_factory + +#endif + diff --git a/ccsrc/Protocols/Sip/sip_codec_invite_request.cc b/ccsrc/Protocols/Sip/sip_codec_invite_request.cc new file mode 100644 index 0000000000000000000000000000000000000000..a9b290650530b6db70cc27b9ec96a7477132efb0 --- /dev/null +++ b/ccsrc/Protocols/Sip/sip_codec_invite_request.cc @@ -0,0 +1,46 @@ +#include "LibSip_SIPTypesAndValues.hh" + +#include "sip_codec_invite_request.hh" +#include "loggers.hh" + +int sip_codec_invite_request::encode (const LibSip__SIPTypesAndValues::INVITE__Request& msg, OCTETSTRING& data) +{ + loggers::get_instance().log_msg(">>> sip_codec_invite_request::encode: ", (const Base_Type&)msg); + + if (_codec.encode((LibSip__SIPTypesAndValues::Request&)msg, data) == -1) { + loggers::get_instance().warning("sip_codec_invite_request::encode: Failed to encode message"); + return -1; + } + + loggers::get_instance().log_msg("<<< sip_codec_invite_request::encode: data=", data); + return 0; +} + +int sip_codec_invite_request::decode (const OCTETSTRING& data, LibSip__SIPTypesAndValues::INVITE__Request& msg, params* p_params) +{ + loggers::get_instance().log_msg(">>> sip_codec_invite_request::decode: data=", data); + + // Sanity checks + if (data.lengthof() == 0) { + loggers::get_instance().warning("sip_codec_invite_request::decode: Wrong parameters"); + return -1; + } + + // LibSip__SIPTypesAndValues::Request request; + if (_codec.decode(data, (LibSip__SIPTypesAndValues::Request&)msg) == -1) { + // if (_codec.decode(data, request) == -1) { + loggers::get_instance().warning("sip_codec_invite_request::decode: Failed to decode message"); + return -1; + } + // msg.requestLine() = request.requestLine(); + // msg.msgHeader() = request.msgHeader(); + // msg.messageBody() = request.messageBody(); + // msg.payload() = request.payload(); + + if (msg.requestLine().method() != LibSip__SIPTypesAndValues::Method::INVITE__E) { + loggers::get_instance().warning("sip_codec_invite_request::decode: Wrong SIP Method, expected INVITE"); + return -1; + } + + return 0; +} diff --git a/ccsrc/Protocols/Sip/sip_codec_invite_request.hh b/ccsrc/Protocols/Sip/sip_codec_invite_request.hh new file mode 100644 index 0000000000000000000000000000000000000000..7c1dab1386aef0b8e31c2c68d5867a4e415768cd --- /dev/null +++ b/ccsrc/Protocols/Sip/sip_codec_invite_request.hh @@ -0,0 +1,27 @@ +#pragma once + +#include "codec.hh" +#include "params.hh" + +#include "sip_codec_request.hh" + +class Base_Type; +class TTCN_Typedescriptor_t; +class TTCN_Buffer; + +namespace LibSip__SIPTypesAndValues { + class INVITE__Request; +} + +class sip_codec_invite_request: public codec < +LibSip__SIPTypesAndValues::INVITE__Request, +LibSip__SIPTypesAndValues::INVITE__Request> +{ + sip_codec_request _codec; +public: + explicit sip_codec_invite_request() : codec(), _codec() { }; + virtual ~sip_codec_invite_request() { }; + + virtual int encode (const LibSip__SIPTypesAndValues::INVITE__Request& msg, OCTETSTRING& data); + virtual int decode (const OCTETSTRING& data, LibSip__SIPTypesAndValues::INVITE__Request& msg, params* p_params = NULL); +}; // End of class sip_codec_invite_request diff --git a/ccsrc/Protocols/Sip/sip_codec_register_request.cc b/ccsrc/Protocols/Sip/sip_codec_register_request.cc new file mode 100644 index 0000000000000000000000000000000000000000..af45a9810f9e45c2456086dc122c97a13f78a1b6 --- /dev/null +++ b/ccsrc/Protocols/Sip/sip_codec_register_request.cc @@ -0,0 +1,46 @@ +#include "LibSip_SIPTypesAndValues.hh" + +#include "sip_codec_register_request.hh" +#include "loggers.hh" + +int sip_codec_register_request::encode (const LibSip__SIPTypesAndValues::REGISTER__Request& msg, OCTETSTRING& data) +{ + loggers::get_instance().log_msg(">>> sip_codec_register_request::encode: ", (const Base_Type&)msg); + + if (_codec.encode((LibSip__SIPTypesAndValues::Request&)msg, data) == -1) { + loggers::get_instance().warning("sip_codec_register_request::encode: Failed to encode message"); + return -1; + } + + loggers::get_instance().log_msg("<<< sip_codec_register_request::encode: data=", data); + return 0; +} + +int sip_codec_register_request::decode (const OCTETSTRING& data, LibSip__SIPTypesAndValues::REGISTER__Request& msg, params* p_params) +{ + loggers::get_instance().log_msg(">>> sip_codec_register_request::decode: data=", data); + + // Sanity checks + if (data.lengthof() == 0) { + loggers::get_instance().warning("sip_codec_register_request::decode: Wrong parameters"); + return -1; + } + + // LibSip__SIPTypesAndValues::Request request; + if (_codec.decode(data, (LibSip__SIPTypesAndValues::Request&)msg) == -1) { + // if (_codec.decode(data, request) == -1) { + loggers::get_instance().warning("sip_codec_register_request::decode: Failed to decode message"); + return -1; + } + // msg.requestLine() = request.requestLine(); + // msg.msgHeader() = request.msgHeader(); + // msg.messageBody() = request.messageBody(); + // msg.payload() = request.payload(); + + if (msg.requestLine().method() != LibSip__SIPTypesAndValues::Method::REGISTER__E) { + loggers::get_instance().warning("sip_codec_register_request::decode: Wrong SIP Method, expected REGISTER"); + return -1; + } + + return 0; +} diff --git a/ccsrc/Protocols/Sip/sip_codec_register_request.hh b/ccsrc/Protocols/Sip/sip_codec_register_request.hh new file mode 100644 index 0000000000000000000000000000000000000000..b0765fdd54eedebe8b97c2b3898ce108ff46a810 --- /dev/null +++ b/ccsrc/Protocols/Sip/sip_codec_register_request.hh @@ -0,0 +1,27 @@ +#pragma once + +#include "codec.hh" +#include "params.hh" + +#include "sip_codec_request.hh" + +class Base_Type; +class TTCN_Typedescriptor_t; +class TTCN_Buffer; + +namespace LibSip__SIPTypesAndValues { + class REGISTER__Request; +} + +class sip_codec_register_request: public codec < +LibSip__SIPTypesAndValues::REGISTER__Request, +LibSip__SIPTypesAndValues::REGISTER__Request> +{ + sip_codec_request _codec; +public: + explicit sip_codec_register_request() : codec(), _codec() { }; + virtual ~sip_codec_register_request() { }; + + virtual int encode (const LibSip__SIPTypesAndValues::REGISTER__Request& msg, OCTETSTRING& data); + virtual int decode (const OCTETSTRING& data, LibSip__SIPTypesAndValues::REGISTER__Request& msg, params* p_params = NULL); +}; // End of class sip_codec_register_request diff --git a/ccsrc/Protocols/Sip/sip_codec_request.cc b/ccsrc/Protocols/Sip/sip_codec_request.cc new file mode 100644 index 0000000000000000000000000000000000000000..7391e6a5b8d53d2ec1ee7dcf614afff3ded76257 --- /dev/null +++ b/ccsrc/Protocols/Sip/sip_codec_request.cc @@ -0,0 +1,1240 @@ +#include "LibSip_SIPTypesAndValues.hh" +#include "LibSip_Common.hh" + +#include "sip_codec_request.hh" +#include "loggers.hh" + +int sip_codec_request::encode (const LibSip__SIPTypesAndValues::Request& msg, OCTETSTRING& data) +{ + loggers::get_instance().log_msg(">>> sip_codec_request::encode: ", (const Base_Type&)msg); + + osip_message_t* sip_message = nullptr; // TODO Use smart pointer + ::parser_init(); + int result = ::osip_message_init(&sip_message); + if (result != 0) { + loggers::get_instance().warning("sip_codec_request::encode: Failed to initialise internal data structures"); + return -1; + } + + if (encode_request(msg, sip_message) == -1) { + loggers::get_instance().warning("sip_codec_request::encode: Failed to encode Request"); + ::osip_message_free(sip_message); + sip_message = nullptr; + return -1; + } + + char* buffer = nullptr; + size_t length = 0; + result = ::osip_message_to_str(sip_message, &buffer, &length); + if (result != 0) { + loggers::get_instance().warning("sip_codec_request::encode: Failed to encode data structures"); + ::osip_message_free(sip_message); + return -1; + } + loggers::get_instance().log("sip_codec_request::encode: Message:%s", buffer); + data = OCTETSTRING(length, (const unsigned char*)buffer); + osip_free(buffer); + ::osip_message_free(sip_message); + + loggers::get_instance().log_msg("<<< sip_codec_request::encode: data=", data); + return result; +} + +int sip_codec_request::decode (const OCTETSTRING& data, LibSip__SIPTypesAndValues::Request& msg, params* p_params) +{ + loggers::get_instance().log_msg(">>> sip_codec_request::decode: data=", data); + + // Sanity checks + if (data.lengthof() == 0) { + loggers::get_instance().warning("sip_codec_request::decode: Wrong parameters"); + return -1; + } + + osip_message_t* sip_message; + ::parser_init(); + int result = ::osip_message_init(&sip_message); + if (result != 0) { + loggers::get_instance().warning("sip_codec_request::decode: Failed to initialise internal data structures"); + return -1; + } + result = ::osip_message_parse(sip_message, (const char*)static_cast(data), data.lengthof()); + if (result != 0) { + loggers::get_instance().warning("sip_codec_request::decode: Failed to parse SIP message"); + ::osip_message_free(sip_message); + return -1; + } + + // Fill RequestLine + decode_request_line(sip_message, msg); + + // Fill Headers + decode_headers(sip_message, msg); + + // Fill MessageBody + decode_message_body(sip_message, msg); + + // Fill Payload + decode_payload(sip_message, msg); + + ::osip_message_free(sip_message); + loggers::get_instance().log_msg("sip_codec_request::decode: ", msg); + + return 0; +} + +int sip_codec_request::encode_request(const LibSip__SIPTypesAndValues::Request& p_request, osip_message_t* p_sip_message) +{ + loggers::get_instance().log(">>> sip_codec_request::encode_request"); + + encode_request_line(p_request.requestLine(), p_sip_message); + + encode_request_headers(p_request.msgHeader(), p_sip_message); + + if (p_request.messageBody().is_present()) { + const LibSip__MessageBodyTypes::MessageBody& m = static_cast(*p_request.messageBody().get_opt_value()); + encode_request_message_body(m, p_sip_message); + } + + if (p_request.payload().is_present()) { + const LibSip__SIPTypesAndValues::Payload& p = static_cast(*p_request.payload().get_opt_value()); + encode_request_payload(p, p_sip_message); + } + + return 0; +} // End of method encode_request + +int sip_codec_request::encode_request_line(const LibSip__SIPTypesAndValues::RequestLine& p_request_line, osip_message_t* p_sip_message) +{ + loggers::get_instance().log(">>> sip_codec_request::encode_request_line"); + + // Sip method + std::string str(LibSip__SIPTypesAndValues::Method::enum_to_str(p_request_line.method())); + char *p = (char*)osip_malloc(str.length() - 2 + 1); // Will be freed by osip_message_free + ::strcpy(p, str.substr(0, str.length() - 2).c_str()); // Remove _E + ::osip_message_set_method(p_sip_message, p); + + // Sip uri + osip_uri_t *uri; + if (encode_sip_url(p_request_line.requestUri(), &uri) == -1) { + loggers::get_instance().warning("sip_codec_request::encode_request_line: Faile to encode SipUrl"); + return -1; + } + ::osip_message_set_uri(p_sip_message, uri); + + // SIP version + p = (char*)osip_malloc(p_request_line.sipVersion().lengthof() + 1); + ::strcpy(p, (char*)static_cast(p_request_line.sipVersion())); + ::osip_message_set_version(p_sip_message, p); + + return 0; +} // End of method encode_request_line + +int sip_codec_request::encode_request_headers(const LibSip__SIPTypesAndValues::MessageHeader& p_msg_header, osip_message_t* p_sip_message) +{ + loggers::get_instance().log_msg(">>> sip_codec_request::encode_request_headers: ", p_msg_header); + + // Encode mandatory fieds + // From + const LibSip__SIPTypesAndValues::From from = p_msg_header.fromField(); + osip_from_t* from_header = nullptr; + if (encode_from_header(p_msg_header.fromField(), from_header) == -1) { + return -1; + } + char* hvalue; + ::osip_from_to_str(from_header, &hvalue); + ::osip_message_set_from(p_sip_message, hvalue); + ::osip_from_free(from_header); + + // To + const LibSip__SIPTypesAndValues::To to = p_msg_header.toField(); + osip_to_t* to_header = nullptr; + if (encode_to_header(p_msg_header.toField(), to_header) == -1) { + return -1; + } + ::osip_to_to_str(to_header, &hvalue); + ::osip_message_set_to(p_sip_message, hvalue); + ::osip_to_free(to_header); + + // Via + const LibSip__SIPTypesAndValues::Via via = p_msg_header.via(); + osip_via_t* via_header = nullptr; + if (encode_via_header(p_msg_header.via(), via_header) == -1) { + return -1; + } + ::osip_via_to_str(via_header, &hvalue); + ::osip_message_set_via(p_sip_message, hvalue); + ::osip_via_free(via_header); + + return 0; +} // End of method encode_request_headers + +int sip_codec_request::encode_request_message_body(const LibSip__MessageBodyTypes::MessageBody& p_message_body, osip_message_t* p_sip_message) +{ + loggers::get_instance().log(">>> sip_codec_request::encode_request_message_body"); + + return 0; +} // End of method encode_request_message_body + +int sip_codec_request::encode_request_payload(const LibSip__SIPTypesAndValues::Payload& p_payload, osip_message_t* p_sip_message) +{ + loggers::get_instance().log(">>> sip_codec_request::encode_request_payload"); + + return 0; +} // End of method encode_request_payload + +int sip_codec_request::encode_sip_url(const LibSip__SIPTypesAndValues::SipUrl& p_sip_uri, osip_uri_t** p_uri) +{ + loggers::get_instance().log_msg(">>> sip_codec_request::encode_sip_uri: ", p_sip_uri); + + std::string host; + std::string port; + osip_uri_t *uri = nullptr; + ::osip_uri_init(&uri); + ::osip_uri_set_scheme(uri, (char*)static_cast(p_sip_uri.scheme())); + const LibSip__SIPTypesAndValues::UriComponents& components = p_sip_uri.components(); + if (components.ischosen(LibSip__SIPTypesAndValues::UriComponents::ALT_sip)) { + const LibSip__SIPTypesAndValues::SipUriComponents& s = p_sip_uri.components().sip(); + if (s.userInfo().is_present()) { + const LibSip__SIPTypesAndValues::UserInfo& u = static_cast(s.userInfo()); + ::osip_uri_set_username(uri, (char*)static_cast(static_cast(u.userOrTelephoneSubscriber()))); + if (u.password().is_present()) { + const CHARSTRING& c = static_cast(u.password()); + ::osip_uri_set_password(uri, (char*)static_cast(c)); + } + } + encode_host_port(s.hostPort(), host, port); + if (!host.empty()) { + ::osip_uri_set_host(uri, (char*)host.c_str()); + } + if (!port.empty()) { + ::osip_uri_set_port(uri, (char*)port.c_str()); + } + } else if (components.ischosen(LibSip__SIPTypesAndValues::UriComponents::ALT_tel)) { + const LibSip__SIPTypesAndValues::TelUriComponents& t = p_sip_uri.components().tel(); + loggers::get_instance().error("sip_codec_request::encode_request_line: Unsupported LibSip__SIPTypesAndValues::UriComponents::ALT_tel"); + } else if (components.ischosen(LibSip__SIPTypesAndValues::UriComponents::ALT_urn)) { + const LibSip__SIPTypesAndValues::UrnUriComponents& u = p_sip_uri.components().urn(); + loggers::get_instance().error("sip_codec_request::encode_request_line: Unsupported LibSip__SIPTypesAndValues::UriComponents::ALT_urn"); + } else if (components.ischosen(LibSip__SIPTypesAndValues::UriComponents::ALT_other)) { + loggers::get_instance().error("sip_codec_request::encode_request_line: Unsupported LibSip__SIPTypesAndValues::UriComponents::ALT_other"); + } // else, noting to do + + if (uri != nullptr) { + ::osip_uri_clone(uri, p_uri); + } else { + *p_uri = nullptr; + } + + return 0; +} // End of method encode_sip_url + +void sip_codec_request::encode_host_port(const LibSip__SIPTypesAndValues::HostPort& p_host_port, std::string& p_host, std::string& p_port) +{ + loggers::get_instance().log(">>> sip_codec_request::encode_host_port"); + + if (p_host_port.host().is_present()) { + p_host.assign(static_cast(static_cast(p_host_port.host()))); + } else { + p_host.clear(); + } + if (p_host_port.portField().is_present()) { + p_port.assign(std::to_string(static_cast(static_cast(p_host_port.portField())))); + } else { + p_port.clear(); + } +} // End of method encode_host_port + +int sip_codec_request::encode_from_header(const LibSip__SIPTypesAndValues::From& p_from, osip_from_t* p_from_header) { + loggers::get_instance().log(">>> sip_codec_request::encode_from_header"); + + ::osip_from_init(&p_from_header); + const LibSip__SIPTypesAndValues::Addr__Union& a = p_from.addressField(); + if (a.ischosen(LibSip__SIPTypesAndValues::Addr__Union::ALT_nameAddr)) { + const LibSip__SIPTypesAndValues::NameAddr& addr = a.nameAddr(); + osip_uri_t *uri; + if (encode_sip_url(addr.addrSpec(), &uri) == -1) { + loggers::get_instance().warning("sip_codec_request::encode_from_header: Failed to encode SipUrl"); + ::osip_from_free(p_from_header); + p_from_header = nullptr; + return -1; + } + ::osip_from_set_url(p_from_header, uri); + if (addr.displayName().is_present()) { + const LibSip__SIPTypesAndValues::DisplayName& n = static_cast(addr.displayName()); + if (n.ischosen(LibSip__SIPTypesAndValues::DisplayName::ALT_token)) { + ::osip_from_set_displayname(p_from_header, (char*)static_cast(static_cast(n.token()))); + } else if (n.ischosen(LibSip__SIPTypesAndValues::DisplayName::ALT_quotedString)) { + ::osip_from_set_displayname(p_from_header, (char*)static_cast(static_cast(n.quotedString()))); + } else { + loggers::get_instance().warning("sip_codec_request::encode_from_header: Failed to encode DisplayName"); + ::osip_from_free(p_from_header); + p_from_header = nullptr; + return -1; + } + } + } else if (a.ischosen(LibSip__SIPTypesAndValues::Addr__Union::ALT_addrSpecUnion)) { + osip_uri_t *uri; + if (encode_sip_url(a.addrSpecUnion(), &uri) == -1) { + loggers::get_instance().warning("sip_codec_request::encode_from_header: Failed to encode SipUrl"); + ::osip_from_free(p_from_header); + p_from_header = nullptr; + return -1; + } + ::osip_from_set_url(p_from_header, uri); + } else { + loggers::get_instance().warning("sip_codec_request::encode_from_header: Failed to encode Addr__Union"); + ::osip_from_free(p_from_header); + p_from_header = nullptr; + return -1; + } + if (p_from.fromParams().is_present()) { + const LibSip__Common::SemicolonParam__List& l = static_cast(p_from.fromParams()); + // TODO encode_semi_colon_params(l, ); + loggers::get_instance().warning("sip_codec_request::encode_from_header: Failed to encode SemicolonParam__List"); + ::osip_from_free(p_from_header); + p_from_header = nullptr; + return -1; + } + + return 0; +} // End of method encode_from_header + +int sip_codec_request::encode_to_header(const LibSip__SIPTypesAndValues::To& p_to, osip_to_t* p_to_header) { + loggers::get_instance().log(">>> sip_codec_request::encode_to_header"); + + ::osip_to_init(&p_to_header); + const LibSip__SIPTypesAndValues::Addr__Union& a = p_to.addressField(); + if (a.ischosen(LibSip__SIPTypesAndValues::Addr__Union::ALT_nameAddr)) { + const LibSip__SIPTypesAndValues::NameAddr& addr = a.nameAddr(); + osip_uri_t *uri; + if (encode_sip_url(addr.addrSpec(), &uri) == -1) { + loggers::get_instance().warning("sip_codec_request::encode_to_header: Failed to encode SipUrl"); + ::osip_to_free(p_to_header); + p_to_header = nullptr; + return -1; + } + ::osip_to_set_url(p_to_header, uri); + //::osip_uri_free(uri); + if (addr.displayName().is_present()) { + const LibSip__SIPTypesAndValues::DisplayName& n = static_cast(addr.displayName()); + if (n.ischosen(LibSip__SIPTypesAndValues::DisplayName::ALT_token)) { + ::osip_to_set_displayname(p_to_header, (char*)static_cast(static_cast(n.token()))); + } else if (n.ischosen(LibSip__SIPTypesAndValues::DisplayName::ALT_quotedString)) { + ::osip_to_set_displayname(p_to_header, (char*)static_cast(static_cast(n.quotedString()))); + } else { + loggers::get_instance().warning("sip_codec_request::encode_to_header: Failed to encode DisplayName"); + ::osip_to_free(p_to_header); + p_to_header = nullptr; + return -1; + } + } + } else if (a.ischosen(LibSip__SIPTypesAndValues::Addr__Union::ALT_addrSpecUnion)) { + osip_uri_t *uri; + if (encode_sip_url(a.addrSpecUnion(), &uri) == -1) { + loggers::get_instance().warning("sip_codec_request::encode_to_header: Failed to encode SipUrl"); + ::osip_to_free(p_to_header); + p_to_header = nullptr; + return -1; + } + ::osip_to_set_url(p_to_header, uri); + } else { + loggers::get_instance().warning("sip_codec_request::encode_to_header: Failed to encode Addr__Union"); + ::osip_to_free(p_to_header); + p_to_header = nullptr; + return -1; + } + if (p_to.toParams().is_present()) { + const LibSip__Common::SemicolonParam__List& l = static_cast(p_to.toParams()); + // TODO encode_semi_colon_params(l, ); + loggers::get_instance().warning("sip_codec_request::encode_to_header: Failed to encode SemicolonParam__List"); + ::osip_to_free(p_to_header); + p_to_header = nullptr; + return -1; + } + + return 0; +} // End of method encode_to_header + +int sip_codec_request::encode_via_header(const LibSip__SIPTypesAndValues::Via& p_via, osip_via_t* p_via_header) { + loggers::get_instance().log(">>> sip_codec_request::encode_via_header"); + + ::osip_via_init(&p_via_header); + const LibSip__SIPTypesAndValues::ViaBody__List& l = p_via.viaBody(); + for (int i = 0; i < l.size_of(); i++) { + const LibSip__SIPTypesAndValues::ViaBody v = l[i]; + + ::via_set_protocol(p_via_header, (char*)static_cast(v.sentProtocol().protocolName())); + ::via_set_version(p_via_header, (char*)static_cast(v.sentProtocol().protocolVersion())); + ::via_set_comment(p_via_header, (char*)static_cast(v.sentProtocol().transport())); + std::string host; + std::string port; + encode_host_port(v.sentBy(), host, port); + if (!host.empty()) { + ::via_set_host(p_via_header, (char*)host.c_str()); + } + if (!port.empty()) { + ::via_set_port (p_via_header, (char*)port.c_str()); + } + + if (v.viaParams().is_present()) { + const LibSip__Common::SemicolonParam__List& params = static_cast(v.viaParams()); + // TODO encode_semi_colon_params(l, ); + loggers::get_instance().warning("sip_codec_request::encode_via_header: Failed to encode SemicolonParam__List"); + ::osip_via_free(p_via_header); + p_via_header = nullptr; + return -1; + } + + } // End of 'for' statement + + return 0; +} // End of method encode_via_header + + + + + + + + + + +void sip_codec_request::decode_headers(const osip_message_t* p_sip_message, LibSip__SIPTypesAndValues::Request& p_request) +{ + loggers::get_instance().log(">>> sip_codec_request::decode_headers"); + + LibSip__SIPTypesAndValues::MessageHeader headers; + // Fill mandatory fields + // From + LibSip__SIPTypesAndValues::From from_header; + decode_from_header(::osip_message_get_from(p_sip_message), from_header); + if (from_header.is_value()) { + headers.fromField() = from_header; + } else { + headers.fromField().set_to_omit(); + } + // To + LibSip__SIPTypesAndValues::To to_header; + decode_to_header(::osip_message_get_to(p_sip_message), to_header); + if (to_header.is_value()) { + headers.toField() = to_header; + } else { + headers.toField().set_to_omit(); + } + // Via + LibSip__SIPTypesAndValues::Via via_header; + decode_via_header(p_sip_message, via_header); + if (via_header.is_value()) { + headers.via() = via_header; + } else { + headers.via().set_to_omit(); + } + + // Fill Optional fields + LibSip__SIPTypesAndValues::Accept accept_header; + decode_accept_header(p_sip_message, accept_header); + if (accept_header.is_value()) { + headers.accept() = accept_header; + } else { + headers.accept().set_to_omit(); + } + + LibSip__SIPTypesAndValues::AcceptContact accept_contact_header; + decode_accept_contact_header(p_sip_message, accept_contact_header); + if (accept_contact_header.is_value()) { + headers.acceptContact() = accept_contact_header; + } else { + headers.acceptContact().set_to_omit(); + } + + LibSip__SIPTypesAndValues::AcceptEncoding accept_encoding_header; + decode_accept_encoding_header(p_sip_message, accept_encoding_header); + if (accept_encoding_header.is_value()) { + headers.acceptEncoding() = accept_encoding_header; + } else { + headers.acceptEncoding().set_to_omit(); + } + + LibSip__SIPTypesAndValues::AcceptLanguage accept_language_header; + decode_accept_language_header(p_sip_message, accept_language_header); + if (accept_language_header.is_value()) { + headers.acceptLanguage() = accept_language_header; + } else { + headers.acceptLanguage().set_to_omit(); + } + + LibSip__SIPTypesAndValues::AlertInfo alert_info_header; + decode_alert_info_header(p_sip_message, alert_info_header); + if (alert_info_header.is_value()) { + headers.alertInfo() = alert_info_header; + } else { + headers.alertInfo().set_to_omit(); + } + + LibSip__SIPTypesAndValues::Allow allow_header; + decode_allow_header(p_sip_message, allow_header); + if (allow_header.is_value()) { + headers.allow() = allow_header; + } else { + headers.allow().set_to_omit(); + } + + LibSip__SIPTypesAndValues::AllowEvents allow_events_header; + decode_allow_events_header(p_sip_message, allow_events_header); + if (allow_events_header.is_value()) { + headers.allowEvents() = allow_events_header; + } else { + headers.allowEvents().set_to_omit(); + } + + LibSip__SIPTypesAndValues::Authorization authorization_header; + decode_authorization_header(p_sip_message, authorization_header); + if (authorization_header.is_value()) { + headers.authorization() = authorization_header; + } else { + headers.authorization().set_to_omit(); + } + + headers.authenticationInfo().set_to_omit(); + + LibSip__SIPTypesAndValues::CallId call_id_header; + decode_call_id_header(p_sip_message, call_id_header); + if (call_id_header.is_value()) { + headers.callId() = call_id_header; + } else { + headers.callId().set_to_omit(); + } + + headers.callInfo().set_to_omit(); + headers.contact().set_to_omit(); + headers.contentDisposition().set_to_omit(); + headers.contentEncoding().set_to_omit(); + headers.contentLanguage().set_to_omit(); + + LibSip__SIPTypesAndValues::ContentLength content_length_header; + decode_content_length_header(p_sip_message, content_length_header); + if (content_length_header.is_value()) { + headers.contentLength() = content_length_header; + } else { + headers.contentLength().set_to_omit(); + } + + LibSip__SIPTypesAndValues::ContentType content_type_header; + decode_content_type_header(p_sip_message, content_type_header); + if (content_type_header.is_value()) { + headers.contentType() = content_type_header; + } else { + headers.contentType().set_to_omit(); + } + + LibSip__SIPTypesAndValues::CSeq c_seq_header; + decode_c_seq_header(p_sip_message, c_seq_header); + if (c_seq_header.is_value()) { + headers.cSeq() = c_seq_header; + } else { + headers.cSeq().set_to_omit(); + } + + headers.date().set_to_omit(); + headers.errorInfo().set_to_omit(); + headers.event().set_to_omit(); + headers.expires().set_to_omit(); + headers.featureCaps().set_to_omit(); + headers.geolocation().set_to_omit(); + headers.geolocationRouting().set_to_omit(); + headers.historyInfo().set_to_omit(); + headers.infoPackage().set_to_omit(); + headers.inReplyTo().set_to_omit(); + + LibSip__SIPTypesAndValues::MaxForwards max_forwards_header; + decode_max_forwards_header(p_sip_message, max_forwards_header); + if (max_forwards_header.is_value()) { + headers.maxForwards() = max_forwards_header; + } else { + headers.maxForwards().set_to_omit(); + } + + headers.mimeVersion().set_to_omit(); + headers.minExpires().set_to_omit(); + headers.minSE().set_to_omit(); + headers.organization().set_to_omit(); + headers.pAccessNetworkInfo().set_to_omit(); + headers.pAssertedID().set_to_omit(); + headers.pAssertedService().set_to_omit(); + headers.pAssociatedURI().set_to_omit(); + headers.path().set_to_omit(); + headers.pCalledPartyID().set_to_omit(); + headers.pChargingFunctionAddresses().set_to_omit(); + headers.pChargingVector().set_to_omit(); + headers.pEarlyMedia().set_to_omit(); + headers.pMediaAuthorization().set_to_omit(); + headers.pPreferredID().set_to_omit(); + headers.pPreferredService().set_to_omit(); + headers.priority().set_to_omit(); + headers.privacy().set_to_omit(); + headers.proxyAuthenticate().set_to_omit(); + headers.proxyAuthorization().set_to_omit(); + headers.proxyRequire().set_to_omit(); + headers.pVisitedNetworkID().set_to_omit(); + headers.rAck().set_to_omit(); + headers.rSeq().set_to_omit(); + headers.reason().set_to_omit(); + headers.recordRoute().set_to_omit(); + headers.recvInfo().set_to_omit(); + headers.requestDisposition().set_to_omit(); + headers.referredBy().set_to_omit(); + headers.referTo().set_to_omit(); + headers.referSub().set_to_omit(); + headers.replaces().set_to_omit(); + headers.replyTo().set_to_omit(); + headers.require().set_to_omit(); + headers.retryAfter().set_to_omit(); + headers.route().set_to_omit(); + headers.securityClient().set_to_omit(); + headers.securityServer().set_to_omit(); + headers.securityVerify().set_to_omit(); + headers.server().set_to_omit(); + headers.serviceRoute().set_to_omit(); + headers.sessionExpires().set_to_omit(); + headers.sessionId().set_to_omit(); + headers.sipETag().set_to_omit(); + headers.sipIfMatch().set_to_omit(); + headers.subject().set_to_omit(); + headers.subscriptionState().set_to_omit(); + + LibSip__SIPTypesAndValues::Supported supported_header; + decode_supported_header(p_sip_message, supported_header); + if (supported_header.is_value()) { + headers.supported() = supported_header; + } else { + headers.supported().set_to_omit(); + } + + headers.timestamp().set_to_omit(); + headers.unsupported().set_to_omit(); + headers.userToUser().set_to_omit(); + headers.userAgent().set_to_omit(); + headers.warning().set_to_omit(); + headers.wwwAuthenticate().set_to_omit(); + headers.resourcePriority().set_to_omit(); + headers.answerMode().set_to_omit(); + headers.privAnswerMode().set_to_omit(); + headers.targetDialog().set_to_omit(); + headers.pAnswerState().set_to_omit(); + headers.undefinedHeader__List().set_to_omit(); + + p_request.msgHeader() = headers; + + loggers::get_instance().log_msg("sip_codec_request::decode_headers: ", p_request); +} // End of method decode_headers + +void sip_codec_request::decode_message_body(const osip_message_t* p_sip_message, LibSip__SIPTypesAndValues::Request& p_request) +{ + loggers::get_instance().log(">>> sip_codec_request::decode_message_body"); + + p_request.messageBody().set_to_omit(); +} // End of method decode_message_body + +void sip_codec_request::decode_payload(const osip_message_t* p_sip_message, LibSip__SIPTypesAndValues::Request& p_request) +{ + loggers::get_instance().log(">>> sip_codec_request::decode_payload"); + + p_request.payload().set_to_omit(); + +} // End of method decode_payload + +void sip_codec_request::decode_semi_colon_params(const osip_list_t& p_sip_list, OPTIONAL& p_list) { + loggers::get_instance().log(">>> sip_codec_request::decode_semi_colon_params"); + + if (::osip_list_size(&p_sip_list) != 0) { + LibSip__Common::SemicolonParam__List l; + for (int i = 0; i < ::osip_list_size(&p_sip_list); i++) { + osip_generic_param_t* p = (osip_generic_param_t*)::osip_list_get(&p_sip_list, i); + loggers::get_instance().log("sip_codec_request::decode_semi_colon_params: After cast: %p", p); + CHARSTRING name(p->gname); + if (p->gvalue == nullptr) { + l[i] = LibSip__Common::GenericParam(name, OPTIONAL(OMIT_VALUE)); + } else { + LibSip__Common::GenValue g; + g.tokenOrHost() = CHARSTRING(p->gvalue); + l[i] = LibSip__Common::GenericParam(name, g); + } + } // End of 'for' statement + p_list = OPTIONAL(l); + } else { + p_list.set_to_omit(); + } + + loggers::get_instance().log_msg("<<< sip_codec_request::decode_semi_colon_params: ", p_list); +} // End of method decode_semi_colon_params + +void sip_codec_request::decode_ampersand_params(const osip_list_t& p_sip_list, OPTIONAL& p_list) { + loggers::get_instance().log(">>> sip_codec_request::decode_ampersand_params"); + + if (::osip_list_size(&p_sip_list) != 0) { + LibSip__Common::AmpersandParam__List l; + for (int i = 0; i < ::osip_list_size(&p_sip_list); i++) { + osip_generic_param_t* p = (osip_generic_param_t*)::osip_list_get(&p_sip_list, i); + loggers::get_instance().log("sip_codec_request::decode_ampersand_params: After cast: %p", p); + CHARSTRING name(p->gname); + if (p->gvalue == nullptr) { + l[i] = LibSip__Common::GenericParam(name, OPTIONAL(OMIT_VALUE)); + } else { + LibSip__Common::GenValue g; + g.tokenOrHost() = CHARSTRING(p->gvalue); + l[i] = LibSip__Common::GenericParam(name, g); + } + } // End of 'for' statement + p_list = OPTIONAL(l); + } else { + p_list.set_to_omit(); + } + + loggers::get_instance().log_msg("<<< sip_codec_request::decode_ampersand_params: ", p_list); +} // End of method decode_ampersand_params + +void sip_codec_request::decode_option_tag_list(const char* p_list, OPTIONAL& p_options_tags) +{ + loggers::get_instance().log(">>> sip_codec_request::decode_option_tag_list"); + + if (p_list != nullptr) { + LibSip__SIPTypesAndValues::OptionTag__List l; + std::string str(p_list); + std::size_t i = str.find(","); // See RFC 3261 - Page 231 / LibSip__SIPTypesAndValues::OptionTag__List + if (i == std::string::npos) { // Only on item + l[0] = CHARSTRING(p_list); + } else { + int idx = 0; + while(i != std::string::npos) { + l[idx++] = CHARSTRING(str.substr(0, i - 1).c_str()); + str = str.substr(i); + i = str.find(","); + } // End of 'while' statement + } + p_options_tags = OPTIONAL(l); + } else { + p_options_tags.set_to_omit(); + } + + loggers::get_instance().log_msg("<<< sip_codec_request::decode_option_tag_list: ", p_options_tags); +} // End of method decode_option_tag_list + +void sip_codec_request::decode_host_port(const char* p_host, const char* p_port, LibSip__SIPTypesAndValues::HostPort& p_host_port) { + loggers::get_instance().log(">>> sip_codec_request::decode_host_port"); + + if (p_host == nullptr) { + p_host_port.host().set_to_omit(); + } else { + p_host_port.host() = OPTIONAL(CHARSTRING(p_host)); + } + OPTIONAL port; + if (p_port == nullptr) { + p_host_port.portField().set_to_omit(); + } else { + p_host_port.portField() = OPTIONAL(INTEGER(std::stoi(p_port))); + } + + loggers::get_instance().log_msg("<<< sip_codec_request::decode_host_port: ", p_host_port); +} // End of method decode_host_port" + +void sip_codec_request::decode_request_line(const osip_message_t* p_sip_message, LibSip__SIPTypesAndValues::Request& p_request) +{ + loggers::get_instance().log(">>> sip_codec_request::decode_request_line"); + + LibSip__SIPTypesAndValues::RequestLine request_line; + std::string str(::osip_message_get_method(p_sip_message)); + str += "_E"; + request_line.method() = LibSip__SIPTypesAndValues::Method(LibSip__SIPTypesAndValues::Method::str_to_enum(str.c_str())); + loggers::get_instance().log_msg("sip_codec_request::decode_request_line: Method: ", request_line.method()); + LibSip__SIPTypesAndValues::SipUrl uri; + decode_uri(uri, ::osip_message_get_uri(p_sip_message)); + loggers::get_instance().log_msg("sip_codec_request::decode_request_line: SipUrl: ", uri); + request_line.requestUri() = uri; + request_line.sipVersion() = CHARSTRING(::osip_message_get_version(p_sip_message)); + p_request.requestLine() = request_line; + // FIXME To be continued + + loggers::get_instance().log_msg("<<< sip_codec_request::decode_request_line: ", p_request); +} + +void sip_codec_request::decode_uri(LibSip__SIPTypesAndValues::SipUrl& p_sip_url, const osip_uri_t* p_uri) { + loggers::get_instance().log(">>> sip_codec_request::decode_uri"); + + // Scheme + LibSip__SIPTypesAndValues::UriComponents uri_components; + if (::osip_uri_get_scheme((osip_uri_t*)p_uri) != nullptr) { + p_sip_url.scheme() = CHARSTRING(::osip_uri_get_scheme((osip_uri_t*)p_uri)); + loggers::get_instance().log_msg("sip_codec_request::decode_uri: scheme", p_sip_url.scheme()); + // SipUriComponents + if (strcmp(::osip_uri_get_scheme((osip_uri_t*)p_uri), "sip") == 0) { + // User Info + OPTIONAL user_info; + if (::osip_uri_get_username((osip_uri_t*)p_uri) == nullptr) { + user_info.set_to_omit(); + } else { + OPTIONAL password; + if (::osip_uri_get_password((osip_uri_t*)p_uri) == nullptr) { + password.set_to_omit(); + } else { + password = CHARSTRING(::osip_uri_get_password((osip_uri_t*)p_uri)); + } + LibSip__SIPTypesAndValues::UserInfo u(CHARSTRING(::osip_uri_get_username((osip_uri_t*)p_uri)), password); + user_info = OPTIONAL(u); + } + loggers::get_instance().log_msg("sip_codec_request::decode_uri: user_info: ", user_info); + // HostPort + LibSip__SIPTypesAndValues::HostPort host_port; + decode_host_port(::osip_uri_get_host((osip_uri_t*)p_uri), ::osip_uri_get_port((osip_uri_t*)p_uri), host_port); + loggers::get_instance().log_msg("sip_codec_request::decode_uri: host_port: ", host_port); + uri_components.sip() = LibSip__SIPTypesAndValues::SipUriComponents(user_info, host_port); + } else if (strcmp(::osip_uri_get_scheme((osip_uri_t*)p_uri), "tel") == 0) { + // FIXME uri_components.tel() = LibSip__SIPTypesAndValues::TelUriComponents(user_info, host_port); + } else if (strcmp(::osip_uri_get_scheme((osip_uri_t*)p_uri), "urn") == 0) { + // FIXME uri_components.urn() = LibSip__SIPTypesAndValues::UrnUriComponents(user_info, host_port); + } else { + char *buffer = nullptr; + ::osip_uri_to_str_canonical((osip_uri_t*)p_uri, &buffer); + uri_components.other() = CHARSTRING(buffer); + osip_free(buffer); // Macro + } + } else { + char *buffer = nullptr; + ::osip_uri_to_str_canonical((osip_uri_t*)p_uri, &buffer); + uri_components.other() = CHARSTRING(buffer); + osip_free(buffer); // Macro + } + p_sip_url.components() = uri_components; + // UrlParameters + OPTIONAL params; + decode_semi_colon_params(p_uri->url_params, params); + p_sip_url.urlParameters() = params; + // Headers + OPTIONAL headers; + decode_ampersand_params(p_uri->url_headers, headers); + p_sip_url.headers() = headers; + + loggers::get_instance().log_msg("<<< sip_codec_request::decode_uri: ", p_sip_url); +} // End of method decode_uri + +void sip_codec_request::decode_accept_header(const osip_message_t* p_sip_message, LibSip__SIPTypesAndValues::Accept& p_accept_header) +{ + loggers::get_instance().log(">>> sip_codec_request::decode_accept_header: %p", p_sip_message->accepts); + + // Sanity checks + osip_accept_t *sip_accept = nullptr; + ::osip_message_get_accept(p_sip_message, 0, &sip_accept); + if (sip_accept == nullptr) { + return; + } + + // FieldName + p_accept_header.fieldName() = LibSip__SIPTypesAndValues::FieldName(LibSip__SIPTypesAndValues::FieldName::str_to_enum("ACCEPT_E")); + // AcceptArgs + // TODO To be done + p_accept_header.acceptArgs().set_to_omit(); + + loggers::get_instance().log_msg("<<< sip_codec_request::decode_accept_header: ", p_accept_header); +} // End of method decode_accept_header + +void sip_codec_request::decode_accept_contact_header(const osip_message_t* p_sip_message, LibSip__SIPTypesAndValues::AcceptContact& p_accept_contact_header) +{ + loggers::get_instance().log(">>> sip_codec_request::decode_accept_contact_header: %p", p_sip_message->contacts); + + // Sanity checks + osip_header_t *sip_accept_contact = nullptr; + osip_message_header_get_byname(p_sip_message,(const char *)"accept-contact", 0, &sip_accept_contact); + if (sip_accept_contact == nullptr) { + return; + } + + // FieldName + p_accept_contact_header.fieldName() = LibSip__SIPTypesAndValues::FieldName(LibSip__SIPTypesAndValues::FieldName::str_to_enum("ACCEPT_CONTACT_E")); + // AcRcValue + LibSip__SIPTypesAndValues::AcRcValue__List l; + // TODO To be done + l[0] = LibSip__SIPTypesAndValues::AcRcValue(CHARSTRING("*"), OPTIONAL(OMIT_VALUE)); + p_accept_contact_header.acValues() = l; + + loggers::get_instance().log_msg("<<< sip_codec_request::decode_accept_contact_header: ", p_accept_contact_header); +} // End of method decode_accept_contact_header + +void sip_codec_request::decode_accept_encoding_header(const osip_message_t* p_sip_message, LibSip__SIPTypesAndValues::AcceptEncoding& p_accept_encoding_header) +{ + loggers::get_instance().log(">>> sip_codec_request::decode_accept_encoding_header: %p", p_sip_message->accept_encodings); + + // Sanity checks + osip_accept_encoding_t *sip_accept_encoding = nullptr; + ::osip_message_get_accept_encoding(p_sip_message, 0, &sip_accept_encoding); + if (sip_accept_encoding == nullptr) { + return; + } + // FieldName + p_accept_encoding_header.fieldName() = LibSip__SIPTypesAndValues::FieldName(LibSip__SIPTypesAndValues::FieldName::str_to_enum("ACCEPT_ENCODING_E")); + // ContentCoding + p_accept_encoding_header.contentCoding().set_to_omit(); + + loggers::get_instance().log_msg("<<< sip_codec_request::decode_accept_encoding_header: ", p_accept_encoding_header); +} // End of method decode_accept_encoding_header + +void sip_codec_request::decode_accept_language_header(const osip_message_t* p_sip_message, LibSip__SIPTypesAndValues::AcceptLanguage& p_accept_language_header) +{ + loggers::get_instance().log(">>> sip_codec_request::decode_accept_language_header: %p", p_sip_message->accept_languages); + + // Sanity checks + osip_accept_language_t *sip_accept_language = nullptr; + ::osip_message_get_accept_language(p_sip_message, 0, &sip_accept_language); + if (sip_accept_language == nullptr) { + return; + } + + // FieldName + p_accept_language_header.fieldName() = LibSip__SIPTypesAndValues::FieldName(LibSip__SIPTypesAndValues::FieldName::str_to_enum("ACCEPT_LANGUAGE_E")); + // LanguageBody + p_accept_language_header.languageBody().set_to_omit(); + + loggers::get_instance().log_msg("<<< sip_codec_request::decode_accept_language_header: ", p_accept_language_header); +} // End of method decode_accept_language_header + +void sip_codec_request::decode_alert_info_header(const osip_message_t* p_sip_message, LibSip__SIPTypesAndValues::AlertInfo& p_alert_info_header) +{ + loggers::get_instance().log(">>> sip_codec_request::decode_alert_info_header: %p", p_sip_message->alert_infos); + + // Sanity checks + osip_alert_info_t *sip_alert_info = nullptr; + ::osip_message_get_alert_info(p_sip_message, 0, &sip_alert_info); + if (sip_alert_info == nullptr) { + return; + } + + // FieldName + p_alert_info_header.fieldName() = LibSip__SIPTypesAndValues::FieldName(LibSip__SIPTypesAndValues::FieldName::str_to_enum("ALERT_INFO_E")); + // AlertInfoBody + p_alert_info_header.alertInfoBody().set_to_omit(); + + loggers::get_instance().log_msg("<<< sip_codec_request::decode_alert_info_header: ", p_alert_info_header); +} // End of method decode_alert_info_header + +void sip_codec_request::decode_allow_header(const osip_message_t* p_sip_message, LibSip__SIPTypesAndValues::Allow& p_allow_header) +{ + loggers::get_instance().log(">>> sip_codec_request::decode_allow_header: %p", p_sip_message->allows); + + // Sanity checks + osip_allow_t *sip_allow = nullptr; + ::osip_message_get_allow(p_sip_message, 0, &sip_allow); + if (sip_allow == nullptr) { + return; + } + + // FieldName + p_allow_header.fieldName() = LibSip__SIPTypesAndValues::FieldName(LibSip__SIPTypesAndValues::FieldName::str_to_enum("ALLOW_E")); + // Methods + p_allow_header.methods().set_to_omit(); + + loggers::get_instance().log_msg("<<< sip_codec_request::decode_allow_header: ", p_allow_header); +} // End of method decode_allow_header + +void sip_codec_request::decode_allow_events_header(const osip_message_t* p_sip_message, LibSip__SIPTypesAndValues::AllowEvents& p_allow_events_header) +{ + loggers::get_instance().log(">>> sip_codec_request::decode_allow_events_header: %p", p_sip_message->headers); + + // Sanity checks + osip_header_t *sip_allow_events = nullptr; + osip_message_header_get_byname(p_sip_message,(const char *)"allow_events", 0, &sip_allow_events); + if (sip_allow_events == nullptr) { + return; + } + + // FieldName + p_allow_events_header.fieldName() = LibSip__SIPTypesAndValues::FieldName(LibSip__SIPTypesAndValues::FieldName::str_to_enum("ALLOW_EVENTS_E")); + // EventTypes + LibSip__SIPTypesAndValues::EventType__List l; + // TODO To be done + l[0] = CHARSTRING("*"); + p_allow_events_header.eventTypes() = l; + + loggers::get_instance().log_msg("<<< sip_codec_request::decode_allow_events_header: ", p_allow_events_header); +} // End of method decode_allow_events_header + +void sip_codec_request::decode_authorization_header(const osip_message_t* p_sip_message, LibSip__SIPTypesAndValues::Authorization& p_authorization_header) +{ + loggers::get_instance().log(">>> sip_codec_request::decode_authorization_header"); + + // Sanity checks + osip_authorization_t *sip_authorization = nullptr; + ::osip_message_get_authorization(p_sip_message, 0, &sip_authorization); + if (sip_authorization == nullptr) { + return; + } + + // FieldName + p_authorization_header.fieldName() = LibSip__SIPTypesAndValues::FieldName(LibSip__SIPTypesAndValues::FieldName::str_to_enum("AUTHORIZATION_E")); + // CredentialsList + LibSip__SIPTypesAndValues::CredentialsList l; + int i = 0; + do { + loggers::get_instance().log("sip_codec_request::decode_authorization_header: Processing item #%d", i); + LibSip__SIPTypesAndValues::Credentials v; + LibSip__Common::CommaParam__List cl; + int j = 0; + if (::osip_authorization_get_digest(sip_authorization) != nullptr) { + LibSip__Common::GenValue v; + v.tokenOrHost() = CHARSTRING(::osip_authorization_get_digest(sip_authorization)); + cl[j++] = LibSip__Common::GenericParam( + CHARSTRING("Digest"), + OPTIONAL(v) + ); + } + if (::osip_authorization_get_realm(sip_authorization) != nullptr) { + LibSip__Common::GenValue v; + v.tokenOrHost() = CHARSTRING(::osip_authorization_get_realm(sip_authorization)); + cl[j++] = LibSip__Common::GenericParam( + CHARSTRING("Realm"), + OPTIONAL(v) + ); + } + // FIXME To be contiuened + v.digestResponse() = cl; + l[i++] = v; + } while(::osip_message_get_authorization(p_sip_message, i, &sip_authorization) == 0); // End of 'do-while' statement + p_authorization_header.body() = l; + + loggers::get_instance().log_msg("<<< sip_codec_request::decode_authorization_header: ", p_authorization_header); +} // End of method decode_authorization_header + +void sip_codec_request::decode_call_id_header(const osip_message_t* p_sip_message, LibSip__SIPTypesAndValues::CallId& p_call_id_header) +{ + loggers::get_instance().log(">>> sip_codec_request::decode_call_id_header: %p", p_sip_message->call_id); + + // Sanity check + if (p_sip_message->call_id == nullptr) { + return; + } + + // FieldName + p_call_id_header.fieldName() = LibSip__SIPTypesAndValues::FieldName(LibSip__SIPTypesAndValues::FieldName::str_to_enum("CALL_ID_E")); + // CallId + char *buffer; + ::osip_call_id_to_str(p_sip_message->call_id, &buffer); + if (buffer != nullptr) { + p_call_id_header.callid() = CHARSTRING(buffer); + osip_free(buffer); + } +} // End of method decode_call_id_header + +void sip_codec_request::decode_c_seq_header(const osip_message_t* p_sip_message, LibSip__SIPTypesAndValues::CSeq& p_c_seq_header) +{ + loggers::get_instance().log(">>> sip_codec_request::decode_c_seq_header: %p", p_sip_message->cseq); + + // Sanity check + if (p_sip_message->cseq == nullptr) { + return; + } + + // FieldName + p_c_seq_header.fieldName() = LibSip__SIPTypesAndValues::FieldName(LibSip__SIPTypesAndValues::FieldName::str_to_enum("C_SEQ_E")); + // Sequence number + p_c_seq_header.seqNumber() = INTEGER(std::stoi(osip_cseq_get_number(p_sip_message->cseq))); + // Method + p_c_seq_header.method() = CHARSTRING(::osip_cseq_get_method(p_sip_message->cseq)); +} // End of method decode_c_seq_header + +void sip_codec_request::decode_content_length_header(const osip_message_t* p_sip_message, LibSip__SIPTypesAndValues::ContentLength& p_content_length_header) +{ + loggers::get_instance().log(">>> sip_codec_request::decode_content_length_header: %p", p_sip_message->content_length); + + // Sanity check + if (p_sip_message->content_length == nullptr) { + return; + } + + // FieldName + p_content_length_header.fieldName() = LibSip__SIPTypesAndValues::FieldName(LibSip__SIPTypesAndValues::FieldName::str_to_enum("CONTENT_LENGTH_E")); + // Length + char *buffer; + ::osip_content_length_to_str(p_sip_message->content_length, &buffer); + if (buffer != nullptr) { + p_content_length_header.len() = INTEGER(std::stoi(buffer)); + osip_free(buffer); + } +} // End of method decode_content_length_header + +void sip_codec_request::decode_content_type_header(const osip_message_t* p_sip_message, LibSip__SIPTypesAndValues::ContentType& p_content_type_header) +{ + loggers::get_instance().log(">>> sip_codec_request::decode_content_type_header: %p", p_sip_message->content_type); + + // Sanity check + if (p_sip_message->content_type == nullptr) { + return; + } + + // FieldName + p_content_type_header.fieldName() = LibSip__SIPTypesAndValues::FieldName(LibSip__SIPTypesAndValues::FieldName::str_to_enum("CONTENT_TYPE_E")); + // SubType + if (p_sip_message->content_type->subtype != nullptr) { + p_content_type_header.mTypeSubtype() = CHARSTRING(p_sip_message->content_type->subtype); + } + // Parameters + OPTIONAL params; + decode_semi_colon_params(p_sip_message->content_type->gen_params, params); + p_content_type_header.mParams() = params; +} // End of method decode_content_type_header + + + + + + + + + + + + + + + + + + +void sip_codec_request::decode_from_header(const osip_from_t* p_sip_from, LibSip__SIPTypesAndValues::From& p_from_header) +{ + loggers::get_instance().log("sip_codec_request::decode_from_header"); + + // Sanity check + if (p_sip_from == nullptr) { + return; + } + + // FieldName + p_from_header.fieldName() = LibSip__SIPTypesAndValues::FieldName(LibSip__SIPTypesAndValues::FieldName::str_to_enum("FROM_E")); + // Addr_Union + LibSip__SIPTypesAndValues::SipUrl uri; + decode_uri(uri, ::osip_from_get_url((osip_from_t*)p_sip_from)); + OPTIONAL display_name; + if (::osip_from_get_displayname((osip_from_t*)p_sip_from) != nullptr) { + LibSip__SIPTypesAndValues::DisplayName n; + n.token() = CHARSTRING(::osip_from_get_displayname((osip_from_t*)p_sip_from)); + display_name = OPTIONAL(n); + } else { + display_name.set_to_omit(); + } + LibSip__SIPTypesAndValues::NameAddr name_addr(display_name, uri); + LibSip__SIPTypesAndValues::Addr__Union addr; + addr.nameAddr() = name_addr; + p_from_header.addressField() = addr; + // Params + OPTIONAL params; + decode_semi_colon_params(p_sip_from->gen_params, params); + p_from_header.fromParams() = params; + + loggers::get_instance().log_msg("<<< sip_codec_request::decode_from_header: ", p_from_header); +} // End of method decode_from_header + +void sip_codec_request::decode_max_forwards_header(const osip_message_t* p_sip_message, LibSip__SIPTypesAndValues::MaxForwards& p_max_forwards_header) +{ + loggers::get_instance().log("sip_codec_request::decode_max_forwards_header: %p", p_sip_message->headers); + + // Sanity checks + osip_header_t *dest = nullptr; + osip_message_get_max_forwards(p_sip_message, 0, &dest); + if (dest == nullptr) { + return; + } + + // FieldName + p_max_forwards_header.fieldName() = LibSip__SIPTypesAndValues::FieldName(LibSip__SIPTypesAndValues::FieldName::str_to_enum("MAX_FORWARDS_E")); + // Forwards + loggers::get_instance().log("sip_codec_request::decode_max_forwards_header: got it: %s:%s", dest->hname, dest->hvalue); + p_max_forwards_header.forwards() = INTEGER(std::stoi(dest->hvalue)); +} // End of method decode_max_forwards_header + +void sip_codec_request::decode_supported_header(const osip_message_t* p_sip_message, LibSip__SIPTypesAndValues::Supported& p_supported_header) +{ + loggers::get_instance().log("sip_codec_request::decode_supported_header: %p", p_sip_message->headers); + + // Sanity checks + osip_header_t *dest = nullptr; + osip_message_get_supported(p_sip_message, 0, &dest); + if (dest == nullptr) { + return; + } + + // FieldName + p_supported_header.fieldName() = LibSip__SIPTypesAndValues::FieldName(LibSip__SIPTypesAndValues::FieldName::str_to_enum("SUPPORTED_E")); + // OptionTags + loggers::get_instance().log("sip_codec_request::decode_supported_header: got it: %s:%s", dest->hname, dest->hvalue); + OPTIONAL& l = p_supported_header.optionsTags(); + decode_option_tag_list(dest->hvalue, l); +} // End of method decode_supported_header + +void sip_codec_request::decode_to_header(const osip_to_t* p_sip_to, LibSip__SIPTypesAndValues::To& p_to_header) +{ + loggers::get_instance().log("sip_codec_request::decode_to_header"); + + // Sanity check + if (p_sip_to == nullptr) { + return; + } + + // FieldName + p_to_header.fieldName() = LibSip__SIPTypesAndValues::FieldName(LibSip__SIPTypesAndValues::FieldName::str_to_enum("TO_E")); + // Addr_Union + LibSip__SIPTypesAndValues::SipUrl uri; + decode_uri(uri, ::osip_to_get_url((osip_to_t*)p_sip_to)); + OPTIONAL display_name; + if (::osip_to_get_displayname((osip_to_t*)p_sip_to) != nullptr) { + LibSip__SIPTypesAndValues::DisplayName n; + n.token() = CHARSTRING(::osip_to_get_displayname((osip_to_t*)p_sip_to)); + display_name = OPTIONAL(n); + } else { + display_name.set_to_omit(); + } + LibSip__SIPTypesAndValues::NameAddr name_addr(display_name, uri); + LibSip__SIPTypesAndValues::Addr__Union addr; + addr.nameAddr() = name_addr; + p_to_header.addressField() = addr; + // Params + OPTIONAL params; + decode_semi_colon_params(p_sip_to->gen_params, params); + p_to_header.toParams() = params; + + loggers::get_instance().log_msg("<<< sip_codec_request::decode_to_header: ", p_to_header); +} // End of method decode_to_header + +void sip_codec_request::decode_via_header(const osip_message_t* p_sip_message, LibSip__SIPTypesAndValues::Via& p_via_header) +{ + loggers::get_instance().log(">>> sip_codec_request::decode_via_header: %p", p_sip_message->vias); + + // Sanity checks + osip_via_t *sip_via = nullptr; + ::osip_message_get_via(p_sip_message, 0, &sip_via); + if (sip_via == nullptr) { + return; + } + + // FieldName + p_via_header.fieldName() = LibSip__SIPTypesAndValues::FieldName(LibSip__SIPTypesAndValues::FieldName::str_to_enum("VIA_E")); + // ViaBody + LibSip__SIPTypesAndValues::ViaBody__List l; + int i = 0; + do { + loggers::get_instance().log("sip_codec_request::decode_via_header: Processing item #%d", i); + LibSip__SIPTypesAndValues::ViaBody v; + v.sentProtocol() = LibSip__SIPTypesAndValues::SentProtocol( + CHARSTRING(::via_get_protocol(sip_via)), + CHARSTRING(::via_get_version(sip_via)), + CHARSTRING(::via_get_comment(sip_via)) + ); + OPTIONAL host_port; + decode_host_port(::via_get_host(sip_via), ::via_get_port(sip_via), host_port); + loggers::get_instance().log_msg("sip_codec_request::decode_via_uri: host_port: ", host_port); + v.sentBy() = host_port; + OPTIONAL params; + decode_semi_colon_params(sip_via->via_params, params); + v.viaParams() = params; + l[i++] = v; + } while(::osip_message_get_via(p_sip_message, i, &sip_via) == 0); // End of 'while' statement + p_via_header.viaBody() = l; + + loggers::get_instance().log_msg("<<< sip_codec_request::decode_via_header: ", p_via_header); +} // End of method decode_via_header diff --git a/ccsrc/Protocols/Sip/sip_codec_request.hh b/ccsrc/Protocols/Sip/sip_codec_request.hh new file mode 100644 index 0000000000000000000000000000000000000000..daa473543899271853d174ea106438f7a67ac931 --- /dev/null +++ b/ccsrc/Protocols/Sip/sip_codec_request.hh @@ -0,0 +1,96 @@ +#pragma once + +#include "codec.hh" +#include "params.hh" + +#include "osipparser2/osip_parser.h" + +class Base_Type; +class TTCN_Typedescriptor_t; +class TTCN_Buffer; + +namespace LibSip__SIPTypesAndValues { + class Request; + class RequestLine; + class MessageHeader; + class Payload; + class HostPort; + class Authorization; + class From; + class To; + class Via; + class CallId; + class ContentLength; + class ContentType; + class CSeq; + class PreGenRecordOf; + // class OptionTag__List; +} + +namespace LibSip__MessageBodyTypes { + class MessageBody; +} + +namespace LibSip__Common { + class SemicolonParam__List; + class AmpersandParam__List; +} +// class OPTIONAL; +// class OPTIONAL; + +class sip_codec_request: public codec < +LibSip__SIPTypesAndValues::Request, +LibSip__SIPTypesAndValues::Request> +{ +public: + explicit sip_codec_request() : codec() { }; + virtual ~sip_codec_request() { }; + + virtual int encode (const LibSip__SIPTypesAndValues::Request& msg, OCTETSTRING& data); + virtual int decode (const OCTETSTRING& data, LibSip__SIPTypesAndValues::Request& msg, params* p_params = NULL); +private: //! \todo Move this section into a sip_codec_helper class, need to decode Response too + int encode_request(const LibSip__SIPTypesAndValues::Request& p_request, osip_message_t* p_sip_message); + int encode_request_line(const LibSip__SIPTypesAndValues::RequestLine& p_request_line, osip_message_t* p_sip_message); + int encode_request_headers(const LibSip__SIPTypesAndValues::MessageHeader& p_msg_header, osip_message_t* p_sip_message); + int encode_request_message_body(const LibSip__MessageBodyTypes::MessageBody& p_message_body, osip_message_t* p_sip_message); + int encode_request_payload(const LibSip__SIPTypesAndValues::Payload& p_payload, osip_message_t* p_sip_message); + int encode_from_header(const LibSip__SIPTypesAndValues::From& p_from, osip_from_t* p_from_header); + int encode_to_header(const LibSip__SIPTypesAndValues::To& p_to, osip_to_t* p_to_header); + int encode_via_header(const LibSip__SIPTypesAndValues::Via& p_via, osip_via_t* p_via_header); + + int encode_sip_url(const LibSip__SIPTypesAndValues::SipUrl& p_sip_uri, osip_uri_t** p_uri); + void encode_host_port(const LibSip__SIPTypesAndValues::HostPort& p_host_port, std::string& p_host, std::string& p_port); + +private: //! \todo Move this section into a sip_codec_helper class, need to decode Response too + void decode_message_body(const osip_message_t* p_sip_message, LibSip__SIPTypesAndValues::Request& p_request); + void decode_payload(const osip_message_t* p_sip_message, LibSip__SIPTypesAndValues::Request& p_request); + void decode_uri(LibSip__SIPTypesAndValues::SipUrl& p_sip_url, const osip_uri_t* p_uri); + void decode_request_line(const osip_message_t* p_sip_message, LibSip__SIPTypesAndValues::Request& msg); + void decode_headers(const osip_message_t* p_sip_message, LibSip__SIPTypesAndValues::Request& msg); + + // TODO Replace const osip_message_t* p_sip_message by header specific type using osip_parser.h/macros such as osip_message_get_accept/osip_accept_t + void decode_accept_header(const osip_message_t* p_sip_message, LibSip__SIPTypesAndValues::Accept& p_accept_header); + void decode_accept_contact_header(const osip_message_t* p_sip_message, LibSip__SIPTypesAndValues::AcceptContact& p_accept_contact_header); + void decode_accept_encoding_header(const osip_message_t* p_sip_message, LibSip__SIPTypesAndValues::AcceptEncoding& p_accept_encoding_header); + void decode_accept_language_header(const osip_message_t* p_sip_message, LibSip__SIPTypesAndValues::AcceptLanguage& p_accept_language_header); + void decode_alert_info_header(const osip_message_t* p_sip_message, LibSip__SIPTypesAndValues::AlertInfo& p_alert_info_header); + void decode_allow_header(const osip_message_t* p_sip_message, LibSip__SIPTypesAndValues::Allow& p_allow_header); + void decode_allow_events_header(const osip_message_t* p_sip_message, LibSip__SIPTypesAndValues::AllowEvents& p_allow_events_header); + void decode_authorization_header(const osip_message_t* p_sip_message, LibSip__SIPTypesAndValues::Authorization& p_authorization_header); + void decode_call_id_header(const osip_message_t* p_sip_message, LibSip__SIPTypesAndValues::CallId& p_call_id_header); + void decode_content_length_header(const osip_message_t* p_sip_message, LibSip__SIPTypesAndValues::ContentLength& p_content_length_header); + void decode_content_type_header(const osip_message_t* p_sip_message, LibSip__SIPTypesAndValues::ContentType& p_content_type_header); + void decode_c_seq_header(const osip_message_t* p_sip_message, LibSip__SIPTypesAndValues::CSeq& p_c_seq_header); + + void decode_from_header(const osip_from_t* p_sip_from, LibSip__SIPTypesAndValues::From& p_from_header); + void decode_max_forwards_header(const osip_message_t* p_sip_message, LibSip__SIPTypesAndValues::MaxForwards& p_max_forwards_header); + void decode_supported_header(const osip_message_t* p_sip_message, LibSip__SIPTypesAndValues::Supported& p_supported_header); + void decode_to_header(const osip_to_t* p_sip_to, LibSip__SIPTypesAndValues::To& p_to_header); + void decode_via_header(const osip_message_t* p_sip_via_list, LibSip__SIPTypesAndValues::Via& p_via_header); + + void decode_host_port(const char* p_host, const char* p_port, LibSip__SIPTypesAndValues::HostPort& p_host_port); + void decode_semi_colon_params(const osip_list_t& p_sip_list, OPTIONAL& p_list); + void decode_ampersand_params(const osip_list_t& p_sip_list, OPTIONAL& p_list); + void decode_option_tag_list(const char* p_list, OPTIONAL& p_options_tags); + +}; // End of class sip_codec_request diff --git a/ccsrc/Protocols/Sip/sip_layer.cc b/ccsrc/Protocols/Sip/sip_layer.cc new file mode 100644 index 0000000000000000000000000000000000000000..3a1f345d241f78c661a7a73d1e28c2b7f16dff56 --- /dev/null +++ b/ccsrc/Protocols/Sip/sip_layer.cc @@ -0,0 +1,35 @@ +#include "LibSip_Interface.hh" +#include "LibSip_SIPTypesAndValues.hh" + +#include "sip_layer_factory.hh" + +#include "loggers.hh" + +#include "converter.hh" + +sip_layer::sip_layer(const std::string & p_type, const std::string & p_param) : t_layer(p_type), _params() { + loggers::get_instance().log(">>> sip_layer::sip_layer: %s, %s", to_string().c_str(), p_param.c_str()); + // Setup parameters + params::convert(_params, p_param); +} + +void sip_layer::send_data(OCTETSTRING& data, params& p_params) { + loggers::get_instance().log_msg(">>> sip_layer::send_data: ", data); + + OCTETSTRING os; + // Encode SIP message +// _codec.encode(msg, os); + send_to_all_layers(os, p_params); +} + +void sip_layer::receive_data(OCTETSTRING& data, params& p_params) +{ + loggers::get_instance().log_msg(">>> sip_layer::receive_data: ", data); + + // Decode SIP message + OCTETSTRING payload; + receive_to_all_layers(payload, p_params); +} + +sip_layer_factory sip_layer_factory::_f; + diff --git a/ccsrc/Protocols/Sip/sip_layer.hh b/ccsrc/Protocols/Sip/sip_layer.hh new file mode 100644 index 0000000000000000000000000000000000000000..1adf44c70c9bffff15ba694f06c2a0831c7aad6b --- /dev/null +++ b/ccsrc/Protocols/Sip/sip_layer.hh @@ -0,0 +1,73 @@ +/*! + * \file sip_layer.hh + * \brief Header file for ITS HTTP protocol layer. + * \author ETSI STF549 + * \copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + * \version 0.1 + */ +#pragma once + +#include + +#include "t_layer.hh" + +#include "sip_codec_register_request.hh" + +namespace LibSip__Interface { + class SipPort; //! Forward declaration of TITAN class +} + +namespace LibSip__SIPTypesAndValues { + class REGISTER__Request; //! Forward declaration of TITAN class +} + +class OCTETSTRING; //! Forward declaration of TITAN class + +/*! + * \class sip_layer + * \brief This class provides a factory class to create an sip_layer class instance + */ +class sip_layer : public t_layer { + params _params; + +public: //! \publicsection + /*! + * \brief Specialised constructor + * Create a new instance of the sip_layer class + * \param[in] p_type \todo + * \param[in] p_param \todo + */ + sip_layer() : t_layer(), _params() {}; + /*! + * \brief Specialised constructor + * Create a new instance of the sip_layer class + * \param[in] p_type \todo + * \param[in] p_param \todo + */ + sip_layer(const std::string& p_type, const std::string& p_param); + /*! + * \brief Default destructor + */ + virtual ~sip_layer() { }; + + /*! + * \virtual + * \fn void send_data(OCTETSTRING& data, params& p_params); + * \brief Send bytes formated data to the lower layers + * \param[in] p_data The data to be sent + * \param[in] p_params Some parameters to overwrite default value of the lower layers parameters + */ + virtual void send_data(OCTETSTRING& data, params& p_params); + /*! + * \virtual + * \fn void receive_data(OCTETSTRING& data, params& p_params); + * \brief Receive bytes formated data from the lower layers + * \param[in] p_data The bytes formated data received + * \param[in] p_params Some lower layers parameters values when data was received + */ + virtual void receive_data(OCTETSTRING& data, params& info); +}; // End of class sip_layer + diff --git a/ccsrc/Protocols/Sip/sip_layer_factory.hh b/ccsrc/Protocols/Sip/sip_layer_factory.hh new file mode 100644 index 0000000000000000000000000000000000000000..115dbd707e3888a88751a796342e2ada3c42e8f5 --- /dev/null +++ b/ccsrc/Protocols/Sip/sip_layer_factory.hh @@ -0,0 +1,45 @@ +/*! + * \file sip_layer_factory.hh + * \brief Header file for ITS Sip protocol layer factory. + * \author ETSI STF525 + * \copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + * \version 0.1 + */ +#pragma once + +#include "layer_stack_builder.hh" + +#include "sip_layer.hh" + +/*! + * \class sip_layer_factory + * \brief This class provides a factory class to create an sip_layer class instance + */ +class sip_layer_factory : public layer_factory { + static sip_layer_factory _f; //! Reference to the unique instance of this class +public: //! \publicsection + /*! + * \brief Default constructor + * Create a new instance of the udp_layer_factory class + * \remark The HTTP layer identifier is HTTP + */ + sip_layer_factory() { + // Register factory + layer_stack_builder::register_layer_factory("SIP", this); + }; + /*! + * \fn layer* create_layer(const std::string & type, const std::string & param); + * \brief Create the layers stack based on the provided layers stack description + * \param[in] p_type The provided layers stack description + * \param[in] p_params Optional parameters + * \return 0 on success, -1 otherwise + * \inline + */ + inline virtual layer* create_layer(const std::string& p_type, const std::string& p_param){ + return new sip_layer(p_type, p_param); + }; +}; // End of class sip_layer_factory + diff --git a/ccsrc/Protocols/Tcp/tcp_layer.cc b/ccsrc/Protocols/Tcp/tcp_layer.cc new file mode 100644 index 0000000000000000000000000000000000000000..6b9796c80807b56fefeab066e04332dc43d6f810 --- /dev/null +++ b/ccsrc/Protocols/Tcp/tcp_layer.cc @@ -0,0 +1,181 @@ +#include +#include +#include +#include +#include + +#include "tcp_layer_factory.hh" + +#include "loggers.hh" + +tcp_layer::tcp_layer(const std::string & p_type, const std::string & param) : layer(p_type), SSL_Socket(), PORT(p_type.c_str()), _params(), _client_id{-1}, _time_key("tcp_layer::Handle_Fd_Event_Readable"), _reconnect_on_send{false} { + loggers::get_instance().log(">>> tcp_layer::tcp_layer: %s, %s", to_string().c_str(), param.c_str()); + // Setup parameters + params::convert(_params, param); + _params.log(); + + set_socket_debugging(false); + params::const_iterator it = _params.find(params::debug); + if (it == _params.cend()) { + _params.insert(std::pair(std::string("debug"), "0")); + } else if (it->second.compare("1") == 0) { + set_socket_debugging(true); + } + it = _params.find(params::server); + if (it == _params.cend()) { + _params.insert(std::pair(std::string("server"), "127.0.0.1")); + } + if (!parameter_set(params::server.c_str(), _params[params::server].c_str())) { + loggers::get_instance().warning("tcp_layer::set_parameter: Unprocessed parameter: %s", params::server.c_str()); + } + set_ssl_use_ssl(false); + it = _params.find(params::use_ssl); + if (it == _params.cend()) { + _params.insert(std::pair(std::string("use_ssl"), "0")); + } else if (it->second.compare("1") == 0) { + set_ssl_use_ssl(true); + } + it = _params.find(params::port); + if (it == _params.cend()) { + if (_params[params::use_ssl].compare("0") == 0) { // Use standard HTTP port + _params.insert(std::pair(std::string("port"), "80")); + } else { // Use standard HTTPS port + _params.insert(std::pair(std::string("port"), "443")); + } + } + if (!parameter_set(params::port.c_str(), _params[params::port].c_str())) { + loggers::get_instance().warning("tcp_layer::set_parameter: Unprocessed parameter: %s", params::server.c_str()); + } + + parameter_set(use_connection_ASPs_name(), "yes"); + parameter_set(server_backlog_name(), "1024"); + set_server_mode(false); + set_ttcn_buffer_usercontrol(true); + set_handle_half_close(true); + + map_user(); + + if (!_reconnect_on_send) { + open_client_connection(_params[params::server].c_str(), _params[params::port].c_str(), NULL, NULL); + } + } + +tcp_layer::~tcp_layer() { + loggers::get_instance().log(">>> tcp_layer::~tcp_layer: %d", _client_id); + if (_client_id != -1) { + remove_client(_client_id); + } + + unmap_user(); +} + +void tcp_layer::Handle_Fd_Event(int fd, boolean is_readable, boolean is_writable, boolean is_error) +{ + loggers::get_instance().log(">>> tcp_layer::Handle_Fd_Event: %d", fd); + Handle_Socket_Event(fd, is_readable, is_writable, is_error); + log_debug("<<< tcp_layer::Handle_Fd_Event"); +} + +void tcp_layer::Handle_Timeout(double time_since_last_call) +{ + loggers::get_instance().log(">>> tcp_layer::Handle_Timeout: %f", time_since_last_call); + Handle_Timeout_Event(time_since_last_call); + loggers::get_instance().log("<<< tcp_layer::Handle_Timeout"); +} + +void tcp_layer::send_data(OCTETSTRING& data, params& params) { + loggers::get_instance().log_msg(">>> tcp_layer::send_data: ", data); + + loggers::get_instance().log("tcp_layer::send_data: SSL mode: %x", get_ssl_use_ssl()); + + send_outgoing(static_cast(data), data.lengthof(), _client_id); +} + +void tcp_layer::receive_data(OCTETSTRING& data, params& params) { + loggers::get_instance().log_msg(">>> tcp_layer::receive_data: ", data); + + receive_to_all_layers(data, params); +} + +void tcp_layer::message_incoming(const unsigned char* message_buffer, int length, int client_id) { + loggers::get_instance().log(">>> tcp_layer::message_incoming"); + loggers::get_instance().log_to_hexa("tcp_layer::message_incoming: ", message_buffer, length); + + + float duration; + loggers::get_instance().set_start_time(_time_key); + OCTETSTRING data(length, message_buffer); + params params; + this->receive_data(data, params); // TODO Check execution time for decoding operation + loggers::get_instance().set_stop_time(_time_key, duration); +} + +void tcp_layer::client_connection_opened(int p_client_id) +{ + loggers::get_instance().log(">>> tcp_layer::client_connection_opened: %d", p_client_id); + _client_id = p_client_id; +} + +bool tcp_layer::add_user_data(int p_client_id) +{ + loggers::get_instance().log(">>> tcp_layer::add_user_data: %d", p_client_id); + if (_params[params::use_ssl].compare("0") == 0) { + loggers::get_instance().log("tcp_layer::add_user_data: Non secured mode"); + return Abstract_Socket::add_user_data(p_client_id); + } + loggers::get_instance().log("tcp_layer::add_user_data: SSL mode"); + return SSL_Socket::add_user_data(p_client_id); +} + +int tcp_layer::send_message_on_fd(int p_client_id, const unsigned char * message_buffer, int length_of_message) +{ + loggers::get_instance().log(">>> tcp_layer::send_message_on_fd: %d", p_client_id); + + if(get_user_data(p_client_id)) + { + loggers::get_instance().log("tcp_layer::send_message_on_fd: SSL mode"); + return SSL_Socket::send_message_on_fd(p_client_id, message_buffer, length_of_message); + } + + loggers::get_instance().log("tcp_layer::send_message_on_fd: Non secured mode"); + return Abstract_Socket::send_message_on_fd(p_client_id, message_buffer, length_of_message); +} + +int tcp_layer::send_message_on_nonblocking_fd(int p_client_id, const unsigned char * message_buffer, int length_of_message) +{ + loggers::get_instance().log(">>> tcp_layer::send_message_on_nonblocking_fd: %d", p_client_id); + + if(get_user_data(p_client_id)) + { + loggers::get_instance().log("tcp_layer::send_message_on_nonblocking_fd: SSL mode"); + return SSL_Socket::send_message_on_nonblocking_fd(p_client_id, message_buffer, length_of_message); + } + + loggers::get_instance().log("tcp_layer::send_message_on_nonblocking_fd: Non secured mode"); + return Abstract_Socket::send_message_on_nonblocking_fd(p_client_id, message_buffer, length_of_message); +} + +int tcp_layer::receive_message_on_fd(int p_client_id) +{ + loggers::get_instance().log(">>> tcp_layer::receive_message_on_fd: %d", p_client_id); + + if(get_user_data(p_client_id)) { + // INFO: it is assumed that only SSL_Socket assigns user data to each peer + loggers::get_instance().log("tcp_layer::receive_message_on_fd: SSL mode"); + return SSL_Socket::receive_message_on_fd(p_client_id); + } + + loggers::get_instance().log("tcp_layer::receive_message_on_fd: Non secured mode"); + return Abstract_Socket::receive_message_on_fd(p_client_id); +} + +void tcp_layer::peer_disconnected(int p_client_id) +{ + loggers::get_instance().log(">>> tcp_layer::peer_disconnected: %d", p_client_id); + + Abstract_Socket::peer_disconnected(p_client_id); + _client_id = -1; +} + +tcp_layer_factory tcp_layer_factory::_f; + diff --git a/ccsrc/Protocols/Tcp/tcp_layer.hh b/ccsrc/Protocols/Tcp/tcp_layer.hh new file mode 100644 index 0000000000000000000000000000000000000000..166a1456b6f7333ca791aa188ad46a7f229fb670 --- /dev/null +++ b/ccsrc/Protocols/Tcp/tcp_layer.hh @@ -0,0 +1,99 @@ +/*! + * \file tcp_layer.hh + * \brief Header file for ITS TCP socket based protocol port layer. + * \author ETSI STF525 + * \copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + * \version 0.1 + */ +#pragma once + +#include "layer.hh" + +#include "Abstract_Socket.hh" + +class PORT; //! Forward declaration of TITAN class + +/*! + * \class tcp_layer + * \brief This class provides description of ITS TCP port protocol layer + */ +class tcp_layer : public layer, public SSL_Socket, public PORT { + params _params; //! Layer parameters + int _client_id; //! Connection identifier + std::string _time_key; //! \todo + bool _reconnect_on_send; //! Set to true if connection shall be done when sending data. Otherwise, connection is established by the \see constructor + +public: //! \publicsection + /*! + * \brief Specialised constructor + * Create a new instance of the tcp_layer class + * \param[in] p_type \todo + * \param[in] p_param \todo + */ + tcp_layer(const std::string& p_type, const std::string& p_param); + /*! + * \brief Default destructor + * \remark If \see _reconnect_on_send is set to false, the disconnection is done by the destructor + */ + virtual ~tcp_layer(); + + /*! + * \virtual + * \fn void send_data(OCTETSTRING& data, params& params); + * \brief Send bytes formated data to the lower layers + * \param[in] p_data The data to be sent + * \param[in] p_params Some parameters to overwrite default value of the lower layers parameters + * \virtual + */ + virtual void send_data(OCTETSTRING& data, params& params); + /*! + * \virtual + * \fn void receive_data(OCTETSTRING& data, params& params); + * \brief Receive bytes formated data from the lower layers + * \param[in] p_data The bytes formated data received + * \param[in] p_params Some lower layers parameters values when data was received + */ + virtual void receive_data(OCTETSTRING& data, params& info); + + /*! + * \virtual + * \fn void message_incoming(const unsigned char* message_buffer, int length, int client_id = -1); + * \brief Receive bytes formated data from the lower layers + * \param[in] p_buffer The bytes formated data received + * \param[in] p_length The number of bytes received + * \param[in] p_client_id The connection identifier.Default: -1 + */ + virtual void message_incoming(const unsigned char* p_buffer, int p_length, int p_client_id = -1); + +protected: //! \protectedsection + void Add_Fd_Read_Handler(int fd) { Handler_Add_Fd_Read(fd); }; + void Add_Fd_Write_Handler(int fd) { Handler_Add_Fd_Write(fd); }; + void Remove_Fd_Read_Handler(int fd) { Handler_Remove_Fd_Read(fd); }; + void Remove_Fd_Write_Handler(int fd) { Handler_Remove_Fd_Write(fd); }; + void Remove_Fd_All_Handlers(int fd) { Handler_Remove_Fd(fd); }; + void Handler_Uninstall() { Uninstall_Handler(); } + void Timer_Set_Handler(double call_interval, boolean is_timeout = TRUE, + boolean call_anyway = TRUE, boolean is_periodic = TRUE) { + Handler_Set_Timer(call_interval, is_timeout, call_anyway, is_periodic); + }; + + const char* remote_address_name() { return params::server.c_str(); }; + const char* remote_port_name() { return params::port.c_str(); }; + const char* socket_debugging_name() { return params::debug.c_str(); }; + const char* ssl_use_ssl_name() { return params::use_ssl.c_str(); }; + + void client_connection_opened(int p_client_id); + bool add_user_data(int p_client_id); + int send_message_on_fd(int p_client_id, const unsigned char * message_buffer, int length_of_message); + int send_message_on_nonblocking_fd(int client_id, const unsigned char * message_buffer, int length_of_message); + int receive_message_on_fd(int p_client_id); + void peer_disconnected(int p_client_id); + +private: //! \privatesection + void Handle_Fd_Event(int fd, boolean is_readable, boolean is_writable, boolean is_error); + void Handle_Timeout(double time_since_last_call); +}; // End of class tcp_layer + diff --git a/ccsrc/Protocols/Tcp/tcp_layer_factory.hh b/ccsrc/Protocols/Tcp/tcp_layer_factory.hh new file mode 100644 index 0000000000000000000000000000000000000000..47a1613e83cccf769ebf70b285cf943a487ab63d --- /dev/null +++ b/ccsrc/Protocols/Tcp/tcp_layer_factory.hh @@ -0,0 +1,44 @@ +/*! + * \file tcp_layer_factory.hh + * \brief Header file for ITS TCP socket based protocol layer factory. + * \author ETSI STF525 + * \copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + * \version 0.1 + */ +#pragma once + +#include "layer_stack_builder.hh" + +#include "tcp_layer.hh" + +/*! + * \class tcp_layer_factory + * \brief This class provides a factory class to create an tcp_layer class instance + */ +class tcp_layer_factory : public layer_factory { + static tcp_layer_factory _f; //! Reference to the unique instance of this class +public: //! \publicsection + /*! + * \brief Default constructor + * Create a new instance of the tcp_layer class + * \remark The TCP socket based layer identifier is TCP + */ + tcp_layer_factory() { + // Register factory + layer_stack_builder::register_layer_factory("TCP", this); + }; + /*! + * \fn layer* create_layer(const std::string & type, const std::string & param); + * \brief Create the layers stack based on the provided layers stack description + * \param[in] p_type The provided layers stack description + * \param[in] p_params Optional parameters + * \return 0 on success, -1 otherwise + */ + inline virtual layer* create_layer(const std::string& p_type, const std::string& p_param){ + return new tcp_layer(p_type, p_param); + }; +}; // End of class tcp_layer_factory + diff --git a/ccsrc/Protocols/UDP/udp_layer.cc b/ccsrc/Protocols/UDP/udp_layer.cc new file mode 100644 index 0000000000000000000000000000000000000000..5bb8640f95774648df99dea393e7bb519f81da43 --- /dev/null +++ b/ccsrc/Protocols/UDP/udp_layer.cc @@ -0,0 +1,125 @@ +#include "udp_layer_factory.hh" + +#include "loggers.hh" + +udp_layer::udp_layer(const std::string & p_type, const std::string & param) : layer(p_type), _params() { + loggers::get_instance().log(">>> udp_layer::udp_layer: %s, %s", to_string().c_str(), param.c_str()); + // Setup parameters + params::convert(_params, param); + params::const_iterator it = _params.find("src_ip"); + if (it == _params.cend()) { + _params.insert(std::pair(std::string("src_ip"), "127.0.0.1")); + } + it = _params.find("src_port"); + if (it == _params.cend()) { + _params.insert(std::pair(std::string("src_port"), "12345")); + } + it = _params.find("dst_ip"); + if (it == _params.cend()) { + _params.insert(std::pair(std::string("dst_ip"), "127.0.0.1")); + } + it = _params.find("dst_port"); + if (it == _params.cend()) { + _params.insert(std::pair(std::string("dst_port"), "12346")); + } + + //_params.log(); +} + +void udp_layer::send_data(OCTETSTRING& data, params& params) { + loggers::get_instance().log_msg(">>> udp_layer::send_data: ", data); + + // Create IP/UDP packet + unsigned int len = sizeof(struct iphdr) + sizeof(struct udphdr) + data.lengthof(); + unsigned char *buffer = new unsigned char[len]; + // Set ip header + _iphdr = (struct iphdr *)buffer; + _daddr.sin_family = AF_INET; + _saddr.sin_family = AF_INET; + params::const_iterator it = _params.find("dst_port"); + _daddr.sin_port = htons(std::strtoul(it->second.c_str(), NULL, 10)); + it = _params.find("src_port"); + _saddr.sin_port = htons(std::strtoul(it->second.c_str(), NULL, 10)); + it = _params.find("dst_ip"); + inet_pton(AF_INET, it->second.c_str(), (struct in_addr *)&_daddr.sin_addr.s_addr); + it = _params.find("src_ip"); + inet_pton(AF_INET, it->second.c_str(), (struct in_addr *)&_saddr.sin_addr.s_addr); + _iphdr->ihl = 5; + _iphdr->version = 4; + _iphdr->tos = IPTOS_LOWDELAY; + _iphdr->id = 0; + _iphdr->frag_off = htons(0x4000); /* Don't fragment */ + _iphdr->ttl = 64; + _iphdr->tot_len = htons(sizeof(struct iphdr) + sizeof(struct udphdr) + data.lengthof()); + _iphdr->protocol = IPPROTO_UDP; + _iphdr->saddr = _saddr.sin_addr.s_addr; + _iphdr->daddr = _daddr.sin_addr.s_addr; + _iphdr->check = 0; + _iphdr->check = inet_check_sum((const void *)_iphdr, sizeof(struct iphdr)); + // Set udp header + _udphdr = (struct udphdr *)(buffer + sizeof(struct iphdr)); + _udphdr->source = _saddr.sin_port; + _udphdr->dest = _daddr.sin_port; + _udphdr->len = htons(sizeof(struct udphdr) + data.lengthof()); + _udphdr->check = 0; + // Set payload + unsigned char *payload = buffer + sizeof(struct iphdr) + sizeof(struct udphdr); + memcpy(payload, static_cast(data), data.lengthof()); + // Calculate UDP checksum + _udphdr->check = inet_check_sum( + (const void *)_udphdr, + sizeof(struct udphdr), + inet_check_sum( + static_cast(data), + data.lengthof(), + inet_check_sum( + (const unsigned char*)(&(_iphdr->saddr)), + 2 * sizeof(_iphdr->saddr), + IPPROTO_UDP + static_cast(ntohs(_udphdr->len)) + ) + ) + ); + // Send data lower layers + OCTETSTRING udp(len, buffer); + send_to_all_layers(udp, params); + // Free buffer + delete [] buffer; +} + +void udp_layer::receive_data(OCTETSTRING& data, params& params) { + loggers::get_instance().log_msg(">>> udp_layer::receive_data: ", data); + + // Decode UDP packet + const unsigned char* buffer = static_cast(data); + _iphdr = (struct iphdr*)buffer; + _udphdr = (struct udphdr*)(buffer + sizeof(struct iphdr)); + loggers::get_instance().log("udp_layer::receive_data: src_port = %d, payload length = %d", ntohs(_udphdr->source), ntohs(_udphdr->len)); + // TODO To be refined + data = OCTETSTRING(ntohs(_udphdr->len) - sizeof(struct udphdr), (unsigned char*)(buffer + sizeof(struct iphdr) + sizeof(struct udphdr))); + //loggers::get_instance().log_msg("udp_layer::receive_data: message payload", data); + + receive_to_all_layers(data, params); +} + +unsigned short udp_layer::inet_check_sum(const void *buf, size_t len, const unsigned short p_initial_sum) { + unsigned long sum = p_initial_sum; + unsigned int i; + + // Checksum all the pairs of bytes first... + for (i = 0; i < (len & ~1U); i += 2) { + sum += (u_int16_t)ntohs(*((u_int16_t *)((unsigned char*)buf + i))); + if (sum > 0xFFFF) + sum -= 0xFFFF; + } // End of 'for' statement + // If there's a single byte left over, checksum it, too + if (i < len) { + sum += *((unsigned char*)buf + i) << 8; + if (sum > 0xFFFF) { + sum -= 0xFFFF; + } + } + + return htons((~sum & 0xffff)); +} + +udp_layer_factory udp_layer_factory::_f; diff --git a/ccsrc/Protocols/UDP/udp_layer.hh b/ccsrc/Protocols/UDP/udp_layer.hh new file mode 100644 index 0000000000000000000000000000000000000000..c012aba99e94859e5d61fd7e419d54c9c6e93fb0 --- /dev/null +++ b/ccsrc/Protocols/UDP/udp_layer.hh @@ -0,0 +1,97 @@ +/*! + * \file udp_layer.hh + * \brief Header file for ITS UDP/IP protocol layer definition. + * \author ETSI STF525 + * \copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + * \version 0.1 + */ +#pragma once + +#include +#if !defined(LINUX) +#include +#include +struct iphdr { + #if __BYTE_ORDER == __LITTLE_ENDIAN + u_int8_t ihl:4, + version:4; + #elif __BYTE_ORDER == __BIG_ENDIAN + u_int8_t version:4, + ihl:4; + #else + #error "Please fix " + #endif + u_int8_t tos; + u_int16_t tot_len; + u_int16_t id; + u_int16_t frag_off; + u_int8_t ttl; + u_int8_t protocol; + u_int16_t check; + struct in_addr saddr; + struct in_addr daddr; + //The options start here. +}; +#else // LINUX +#include +#include +#endif // LINUX + +#include "t_layer.hh" +#include "params.hh" + +/*! + * \class udp_layer + * \brief This class provides description of ITS UDP/IP protocol layer + */ +class udp_layer : public layer { + params _params; //! Layer parameters + struct iphdr* _iphdr; //! IP layer description + struct udphdr* _udphdr; //! UDP layer description + struct sockaddr_in _saddr; //! Source socket address description + struct sockaddr_in _daddr; //! Destination socket address description + + /*! + * \fn unsigned short inet_check_sum(const void *buf, size_t hdr_len, const unsigned short p_initial_sum = 0); + * \brief Compute the UDP checksum + * \param[in] p_buffer The data to be sent + * \param[in] p_header_length The UDP header length + * \param [in] p_initial_sum The initial checksum value. Default: 0 + * \return The checksum value + */ + unsigned short inet_check_sum(const void *p_buffer, size_t p_header_length, const unsigned short p_initial_sum = 0); + +public: //! \publicsection + /*! + * \brief Specialised constructor + * Create a new instance of the udp_layer class + * \param[in] p_type \todo + * \param[in] p_param \todo + */ + udp_layer(const std::string & p_type, const std::string & p_param); + /*! + * \brief Default destructor + */ + virtual ~udp_layer() {} + + /*! + * \virtual + * \fn void send_data(OCTETSTRING& data, params& params); + * \brief Send bytes formated data to the lower layers + * \param[in] p_data The data to be sent + * \param[in] p_params Some parameters to overwrite default value of the lower layers parameters + */ + virtual void send_data(OCTETSTRING& data, params& params); + /*! + * \virtual + * \fn void receive_data(OCTETSTRING& data, params& params); + * \brief Receive bytes formated data from the lower layers + * \param[in] p_data The bytes formated data received + * \param[in] p_params Some lower layers parameters values when data was received + */ + virtual void receive_data(OCTETSTRING& data, params& info); +}; // End of class udp_layer + diff --git a/ccsrc/Protocols/UDP/udp_layer_factory.hh b/ccsrc/Protocols/UDP/udp_layer_factory.hh new file mode 100644 index 0000000000000000000000000000000000000000..2a9204343a684908918cf455dcf3edbd599c5b6a --- /dev/null +++ b/ccsrc/Protocols/UDP/udp_layer_factory.hh @@ -0,0 +1,44 @@ +/*! + * \file udp_layer_factory.hh + * \brief Header file for ITS UDP/IP protocol layer factory. + * \author ETSI STF525 + * \copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + * \version 0.1 + */ +#pragma once + +#include "layer_stack_builder.hh" + +#include "udp_layer.hh" + +/*! + * \class udp_layer_factory + * \brief This class provides a factory class to create an udp_layer class instance + */ +class udp_layer_factory: public layer_factory { + static udp_layer_factory _f; //! Reference to the unique instance of this class +public: //! \publicsection + /*! + * \brief Default constructor + * Create a new instance of the udp_layer_factory class + * \remark The UDP/IP layer identifier is UDP + */ + udp_layer_factory() { + // register factory + layer_stack_builder::register_layer_factory("UDP", this); + }; + /*! + * \fn layer* create_layer(const std::string & type, const std::string & param); + * \brief Create the layers stack based on the provided layers stack description + * \param[in] p_type The provided layers stack description + * \param[in] p_params Optional parameters + * \return 0 on success, -1 otherwise + * \inline + */ + inline virtual layer* create_layer(const std::string& p_type, const std::string& p_param) { + return new udp_layer(p_type, p_param); + }; +}; // End of class udp_layer_factory diff --git a/ccsrc/README.md b/ccsrc/README.md index a3daa21660e132440ade9d859dc28ed99b694f7e..10a50221b33bb0ba0fa336be66e73d2b95fa488d 100644 --- a/ccsrc/README.md +++ b/ccsrc/README.md @@ -1 +1,6 @@ This folder will contain the TITAN test adapter code. + +Required configuration: +- Operating System: Ubuntu 16.04 LTS/17.10 LTS +- Eclipse Version: Neon.3 Release (4.6.3) +- Titan Core Version, accessible [here](https://github.com/eclipse/titan.core) diff --git a/docker/Dockerfile b/docker/Dockerfile index 69120a4c937a5277c23b03c88e3f57bd5f9936bb..0cfc2cf1d578bec575259af737033ca894bcb833 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,37 +1,35 @@ -# Copyright ETSI 2018 -# See: https://forge.etsi.org/etsi-forge-copyright-statement.txt +FROM ubuntu:18.04 -FROM gcc:latest - -MAINTAINER STF549 +MAINTAINER ETSI STF 549 LABEL description="STF549 Docker Image" -ENV TERM=linux +ENV TERM=xterm ENV HOSTNAME docker-titan-STF549 -ARG USERNAME -ARG PASSWORD +RUN DEBIAN_FRONTEND=noninteractive apt-get update \ + && DEBIAN_FRONTEND=noninteractive apt-get install software-properties-common -y \ + && DEBIAN_FRONTEND=noninteractive add-apt-repository ppa:linuxuprising/java -y -RUN echo "docker-titan" > /etc/hostname \ - && DEBIAN_FRONTEND=noninteractive apt-get update \ - && DEBIAN_FRONTEND=noninteractive apt-get dist-upgrade -y \ - && DEBIAN_FRONTEND=noninteractive apt-get autoremove -y \ - && DEBIAN_FRONTEND=noninteractive apt-get autoclean -y \ - && DEBIAN_FRONTEND=noninteractive apt-get install -y \ +RUN DEBIAN_FRONTEND=noninteractive apt-get update \ + && DEBIAN_FRONTEND=noninteractive apt-get --allow-unauthenticated install -y \ autoconf \ bison \ build-essential \ cmake \ curl \ + dos2unix \ doxygen \ emacs \ expect \ flex \ - graphviz \ - gdb \ + g++-8 \ + gcc-8 \ + gdb \ git-core \ gnutls-bin \ + graphviz \ + inetutils-ping \ libglib2.0-dev \ libpcap-dev \ libgcrypt-dev \ @@ -43,8 +41,10 @@ RUN echo "docker-titan" > /etc/hostname \ libxml2-dev \ lsof \ ntp \ + openssh-server \ pkg-config \ qt5-default \ + qttools5-dev \ qtmultimedia5-dev \ libqt5svg5-dev \ subversion \ @@ -53,44 +53,72 @@ RUN echo "docker-titan" > /etc/hostname \ tcpdump \ texlive-font-utils \ tshark \ + tzdata \ valgrind \ + vim \ vsftpd \ xutils-dev \ tree \ unzip \ wget \ - && DEBIAN_FRONTEND=noninteractive apt-get autoremove -y \ - && DEBIAN_FRONTEND=noninteractive apt-get autoclean -y \ - && useradd --create-home --shell /bin/bash stf549 \ - && echo "stf549:stf549" | chpasswd \ - && adduser stf549 sudo \ - && su - stf549 \ - && whoami \ - && cd /home/stf549 \ - && mkdir -p bin lib include dev tmp frameworks docs \ - && ls -ltr \ - && cd /home/stf549/dev \ - && git clone http://forge.etsi.org/gitlab/emergency-communications/NG112.git STF549_Ng112 \ - && cd /home/stf549/dev/STF549_Ng112/ttcn \ - && svn co --username $USERNAME --password $PASSWORD --non-interactive https://oldforge.etsi.org/svn/LibCommon/tags/v1.4.0/ttcn \ - && svn co --username $USERNAME --password $PASSWORD --non-interactive https://oldforge.etsi.org/svn/LibSip/trunk \ - && cd /home/stf549/dev/STF549_Ng112/scripts \ - && chmod 775 *.bash devenv.bash.ubuntu \ - && cd /home/stf549 \ - && ln -sf /home/stf549/dev/STF549_Ng112/scripts/devenv.bash.ubuntu /home/stf549/devenv.bash \ - && export HOME=/home/stf549 \ - && . /home/stf549/devenv.bash \ - && echo "" >> /home/stf549/.bashrc \ - && echo ". ./devenv.bash" >> /home/stf549/.bashrc \ - && echo "" >> /home/stf549/.bashrc \ - && cd /home/stf549/dev/STF549_Ng112/scripts \ - && ./build_titan.bash \ - && cd /home/stf549 \ - && . /home/stf549/devenv.bash \ - && cd /home/stf549/dev/STF549_Ng112/scripts + xsltproc \ + && DEBIAN_FRONTEND=noninteractive apt-get autoremove --purge -y \ + && DEBIAN_FRONTEND=noninteractive apt-get autoclean \ + && rm -rf /var/lib/apt/lists/* + +RUN echo "docker-titan-STF549" > /etc/hostname \ + && echo "root:etsi" | chpasswd + +RUN useradd --create-home --shell /bin/bash --groups sudo etsi \ + && echo "etsi:etsi" | chpasswd \ + && adduser etsi sudo + +RUN cd /home/etsi \ + && echo "" >> /home/etsi/.bashrc \ + && echo "export HOME=/home/etsi" >> /home/etsi/.bashrc \ + && echo "export LD_LIBRARY_PATH=/home/etsi/dev/etsi_emcom/lib:$LD_LIBRARY_PATH" >> /home/etsi/.bashrc \ + && echo "export PATH=/home/etsi/bin:$PATH" >> /home/etsi/.bashrc \ + && echo "cd /home/etsi" >> /home/etsi/.bashrc \ + && echo ". ./devenv.bash" >> /home/etsi/.bashrc \ + && . /home/etsi/.bashrc \ + && mkdir -p bin lib include tmp frameworks docs man dev \ + && chown etsi:etsi bin lib include tmp frameworks docs man dev \ + && echo "etsi ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers + +COPY . /home/etsi/dev/STF549_Ng112/ +RUN chown -R etsi /home/etsi/dev/STF549_Ng112/ + +COPY . /home/etsi/dev/STF549_Ng112/ +RUN chown -R etsi /home/etsi/dev/STF549_Ng112/ +USER etsi + +RUN cd /home/etsi/frameworks \ + && git clone https://github.com/YannGarcia/osip.git ./osip \ + && cd osip \ + && ./autogen.sh \ + && ./configure --prefix=/home/etsi \ + && make && make install +RUN cd /home/etsi/frameworks \ + && wget -q 'http://ftp.halifax.rwth-aachen.de/eclipse//technology/epp/downloads/release/oxygen/2/eclipse-cpp-oxygen-2-linux-gtk-x86_64.tar.gz' -Oeclipse-cpp-oxygen-2-linux-gtk-x86_64.tar.gz \ + && tar -zxvf ./eclipse-cpp-oxygen-2-linux-gtk-x86_64.tar.gz \ + && rm -f ./eclipse-cpp-oxygen-2-linux-gtk-x86_64.tar.gz -CMD ["/bin/bash"] +RUN cd /home/etsi/dev/STF549_Ng112 \ + && ls \ + && cd /home/etsi/dev/STF549_Ng112/ttcn \ + && svn co --username svnusers --password svnusers --non-interactive --trust-server-cert https://oldforge.etsi.org/svn/LibSip/trunk ./LibSip \ + && svn co --username svnusers --password svnusers --non-interactive --trust-server-cert https://oldforge.etsi.org/svn/LibCommon/trunk/ttcn ./LibCommon \ + && svn co --username svnusers --password svnusers --non-interactive --trust-server-cert https://oldforge.etsi.org/svn/LibIts/branches/STF525/ttcn/Http ./LibHttp \ + && cd /home/etsi/dev/STF549_Ng112/scripts \ + && chmod 775 *.bash devenv.bash.* \ + && cd /home/etsi \ + && ln -sf /home/etsi/dev/STF549_Ng112/scripts/devenv.bash.ubuntu /home/etsi/devenv.bash \ + && ls -ltr /home/etsi \ + && export HOME=/home/etsi \ + && . /home/etsi/devenv.bash \ + && cd /home/etsi/dev/STF549_Ng112/scripts \ + && ./build_titan.bash # That's all Floks diff --git a/docker/build-container.sh b/docker/build-container.sh old mode 100644 new mode 100755 index 5e30b3486c16afb823222abf1e8750f4659aa151..549a490e746deda313e56d3ad1db4986de44deae --- a/docker/build-container.sh +++ b/docker/build-container.sh @@ -2,17 +2,13 @@ # Copyright ETSI 2018 # See: https://forge.etsi.org/etsi-forge-copyright-statement.txt -set -e +#set -e #set -vx -USERNAME= -PASSWORD= - DOCKER_FILE=./Dockerfile if [ -f ${DOCKER_FILE} ] then - docker rmi -f $(docker images -q) - docker build --tag stf549_ng112 --force-rm --build-arg USERNAME=${USERNAME} --build-arg PASSWORD=${PASSWORD} . + docker build --tag stf549_ng112 . # --force-rm if [ "$?" != "0" ] then echo "Docker build failed: $?" diff --git a/docker/run-container.sh b/docker/run-container.sh old mode 100644 new mode 100755 index e1b7f49f189c85e6f1812d779951dc1d821e8bd5..93f8a0f3d97f8f3e842782272904a528c8299069 --- a/docker/run-container.sh +++ b/docker/run-container.sh @@ -5,7 +5,12 @@ #set -e #set -vx -docker run -it --rm stf549_ng112:latest /bin/bash +docker run stf549_ng112:latest "/bin/bash" \ + -c "source /home/etsi/devenv.bash \ + && /home/etsi/dev/STF549_Ng112/scripts/update_emcom_project.bash \ + && cd ${HOME}/dev/etsi_emcom/src/AtsNg112/objs \ + && ../bin/ng112.bash \ + && ../bin/run_all.bash" # That's all Floks exit 0 diff --git a/docker/validate-in-docker.sh b/docker/validate-in-docker.sh old mode 100644 new mode 100755 diff --git a/docs/AtsNg112/o2.cfg b/docs/AtsNg112/o2.cfg new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/docs/TestCodec/o2.cfg b/docs/TestCodec/o2.cfg new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/etc/AtsNg112/AtsNg112.cfg b/etc/AtsNg112/AtsNg112.cfg index 6076fb29602cc2a27027a934696d41126c45bee6..11710ba3b50fce63b21896e2596251ee0d9a9f17 100644 --- a/etc/AtsNg112/AtsNg112.cfg +++ b/etc/AtsNg112/AtsNg112.cfg @@ -1,7 +1,17 @@ [MODULE_PARAMETERS] # This section shall contain the values of all parameters that are defined in your TTCN-3 modules. -LibCommon_Time.PX_TAC := 10.0 +LibCommon_Time.PX_TAC := 30.0 + +LibItsHttp_Pics.PICS_HEADER_HOST := "location-information-service.azurewebsites.net" + +LibNg112_Pics.PICS_LIS_URI := "/api/held"; + +#LibNg112_Pixits.PX_DEVICE_URI_TEL := "+331234567890" # Position +LibNg112_Pixits.PX_DEVICE_URI_TEL := "+331234567891" # Circle +LibNg112_Pixits.PX_DEVICE_NUMBER_POINT := { 43.616891, 7.053179 } +LibNg112_Pixits.PX_CIRCLE_POS := { 43.617174, 7.05275 } +LibNg112_Pixits.PX_CIRCLE_RADIUS := 15.000 [LOGGING] # In this section you can specify the name of the log file and the classes of events @@ -19,8 +29,9 @@ LogEventTypes:= Yes [TESTPORT_PARAMETERS] # In this section you can specify parameters that are passed to Test Ports. -system.sipPort.params := "SIP/UDP(dst_ip=192.168.1.250,dst_port=5060,src_ip=192.168.1.253,src_port=5060)/ETH(mac_src=080027d2b658,mac_dst=90fd61e61902,eth_type=0800)/PCAP(mac_src=080027d2b658,nic=eth1,filter=and udp port 12345)" -#system.pemeaPort.params := "PEMEA/HTTP/TCP(debug=1,server=httpbin.org,port=80,use_ssl=0)" +system.httpPort.params := "HTTP(codecs=lost:lost_codec;held:held_codec)/TCP(debug=1,server=location-information-service.azurewebsites.net,port=80,use_ssl=0)" +#system.httpPort.params := "HTTP(codecs=lost:lost_codec;held:held_codec)/TCP(debug=1,server=ptsv2.com,port=80,use_ssl=0)" +#system.SIPP.params := "SIP/UDP(dst_ip=192.168.1.250,dst_port=5060,src_ip=192.168.1.253,src_port=5060)/ETH(mac_src=080027d2b658,mac_dst=90fd61e61902,eth_type=0800)/PCAP(mac_src=080027d2b658,nic=eth1,filter=and udp port 12345)" [DEFINE] # In this section you can create macro definitions, @@ -45,7 +56,13 @@ system.sipPort.params := "SIP/UDP(dst_ip=192.168.1.250,dst_port=5060,src_ip=192. [EXECUTE] # In this section you can specify what parts of your test suite you want to execute. -#AtsNg112_TestCases.TC_1 +#AtsNg112_TestCases.TC_LIS_HTTP_POST_BV_01 +#AtsNg112_TestCases.TC_LIS_HTTP_POST_BV_02 +#AtsNg112_TestCases.TC_LIS_HTTP_POST_BV_03 +#AtsNg112_TestCases.TC_LIS_HTTP_POST_BV_04 +#AtsNg112_TestCases.TC_LIS_HTTP_POST_BV_05 +AtsNg112_TestCases.TC_LIS_HTTP_GET_BV_01 +#AtsNg112_TestCases.TC_ECRF_HTTP_POST_BV_01 [GROUPS] # In this section you can specify groups of hosts. These groups can be used inside the diff --git a/etc/TestCodec/TestCodec.cfg b/etc/TestCodec/TestCodec.cfg new file mode 100644 index 0000000000000000000000000000000000000000..b2ed184a59bd4680a2ffea566c9588e6070f2c8c --- /dev/null +++ b/etc/TestCodec/TestCodec.cfg @@ -0,0 +1,76 @@ +[MODULE_PARAMETERS] +# This section shall contain the values of all parameters that are defined in your TTCN-3 modules. + +#LibItsHttp_Pics.PICS_HEADER_HOST := "httpbin.org" +LibItsHttp_Pics.PICS_HEADER_HOST := "ptsv2.com" +#LibItsHttp_Pics.PICS_HEADER_CONTENT_TYPE := "application/held+xml;charset=utf-8"; + +LibCommon_Time.PX_TAC := 30.0 + +[LOGGING] +# In this section you can specify the name of the log file and the classes of events +# you want to log into the file or display on console (standard error). + +LogFile := "../logs/%e.%h-%r.%s" +FileMask := LOG_ALL | USER | DEBUG | MATCHING +ConsoleMask := LOG_ALL | USER | DEBUG | MATCHING +#FileMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP +#ConsoleMask := ERROR | WARNING | USER | MATCHING | EXECUTOR_RUNTIME | VERDICTOP +LogSourceInfo := Stack +LogEntityName:= Yes +LogEventTypes:= Yes +#TimeStampFormat := DateTime + +[TESTPORT_PARAMETERS] +# In this section you can specify parameters that are passed to Test Ports. +system.httpPort.params := "HTTP(codecs=held:held_codec;html:html_codec;json:json_codec)/TCP(debug=1,server=ptsv2.com,port=80,use_ssl=0)" +# For manual testing, use this command: openssl s_client -connect nghttp2.org:443 -msg +#system.httpPort.params := "HTTP(codecs=held:held_codec;html:html_codec;json:json_codec)/TCP(debug=1,server=nghttp2.org,port=443,use_ssl=1)" + +#system.sipPort.params := "SIP/UDP(dst_ip=192.168.1.250,dst_port=5060,src_ip=192.168.1.253,src_port=5060)/ETH(mac_src=080027d2b658,mac_dst=90fd61e61902,eth_type=0800)/PCAP(mac_src=080027d2b658,nic=eth1,filter=and udp port 12345)" +#system.pemeaPort.params := "PEMEA/HTTP/TCP(debug=1,server=httpbin.org,port=80,use_ssl=0)" + +[DEFINE] +# In this section you can create macro definitions, +# that can be used in other configuration file sections except [INCLUDE] and [ORDERED_INCLUDE]. + +[INCLUDE] +# To use configuration settings given in other configuration files, +# the configuration files just need to be listed in this section, with their full or relative pathnames. + +[ORDERED_INCLUDE] +# To use configuration settings given in other configuration files, +# the configuration files just need to be listed in this section, with their full or relative pathnames. + +[EXTERNAL_COMMANDS] +# This section can define external commands (shell scripts) to be executed by the ETS +# whenever a control part or test case is started or terminated. + +#BeginTestCase := "" +#EndTestCase := "" +#BeginControlPart := "" +#EndControlPart := "" + +[EXECUTE] +# In this section you can specify what parts of your test suite you want to execute. +#TestCodec_Register.tc_register_request_1 +#TestCodec_Register.tc_register_request_2 +#TestCodec_Register.tc_invite_request_2 +#TestCodec_Register.tc_invite_request_2 +#TestCodec_HttpRequest.tc_http_get_1 +#TestCodec_HttpResponse.tc_http_200_ok_1 +TestCodec_HttpPort.tc_http_map_1 + +[GROUPS] +# In this section you can specify groups of hosts. These groups can be used inside the +# [COMPONENTS] section to restrict the creation of certain PTCs to a given set of hosts. + +[COMPONENTS] +# This section consists of rules restricting the location of created PTCs. + +[MAIN_CONTROLLER] +# The options herein control the behavior of MC. +KillTimer := 10.0 +LocalAddress := 127.0.0.1 +TCPPort := 12000 +NumHCs := 1 diff --git a/representations.aird b/representations.aird index cfa79288f4e940ac5b1f1aee0601398569fa5c53..abc5d341a6b88e3cfeb1b78e7cf66f6dc70cca32 100644 --- a/representations.aird +++ b/representations.aird @@ -1,7 +1,6 @@ model.tdl - test_purposes/lis.tplan2 diff --git a/scripts/build_titan.bash b/scripts/build_titan.bash old mode 100644 new mode 100755 diff --git a/scripts/devenv.bash.ubuntu b/scripts/devenv.bash.ubuntu old mode 100644 new mode 100755 index ea2777a895e7956921d3d7ac11bc89d8fe6f5df0..6ae44cd54715f1fca7678cb533b81ab21dcd9014 --- a/scripts/devenv.bash.ubuntu +++ b/scripts/devenv.bash.ubuntu @@ -9,6 +9,7 @@ set -e #export PS1="\w\$ " #export PS1="\D{%Y-%m-%d %H:%M:%S} \w\n\$ " +export TERM=xterm export EDITOR=emacs set -o emacs @@ -58,9 +59,9 @@ then export TTCN3_LICENSE_FILE=${TTCN3_DIR}/etc/license/license.dat export PATH_DEV_TTCN=${HOME}/dev/ttcn3 # ITS support - export PATH_DEV_ITS=${HOME}/TriesAndDelete/etsi_its + export PATH_DEV_ITS=${HOME}/dev/etsi_its # Emergency Communication support - export PATH_DEV_EMCOM=${HOME}/TriesAndDelete/etsi_emcom + export PATH_DEV_EMCOM=${HOME}/dev/etsi_emcom fi export BROWSER=netsurf diff --git a/scripts/merge_emcom_project.bash b/scripts/merge_emcom_project.bash new file mode 100755 index 0000000000000000000000000000000000000000..2b24b81cbbab5b7ee5333b5679e5e5ce3f9985b8 --- /dev/null +++ b/scripts/merge_emcom_project.bash @@ -0,0 +1,239 @@ +#!/bin/bash + +# Debug mode +#set -e +set -vx + +# Usage: sudo ./merge_emcom_project.bash +# TODO Use git clone in temporary directory + +OLDPWD=`pwd` + +# Storing path +VAGRANT_DIR=~/tmp +if [ ! -d ${VAGRANT_DIR} ] +then + exit -1 +else + VAGRANT_DIR=${VAGRANT_DIR}/to_be_merged + if [ -d ${VAGRANT_DIR} ] + then + rm -f ${VAGRANT_DIR}/* + else + mkdir ${VAGRANT_DIR} + fi +fi +chmod 775 ${VAGRANT_DIR} + +# Execution path +RUN_PATH="${0%/*}" +PATH_DEV_EMCOM=`pwd`/../../etsi_emcom + +# Update ETSI Framework files +echo 'Merging ETSI Framework files' +FWK_SRC_PATH=${SRC_EMCOM_PATH}/ccsrc +FWK_DST_PATH=${PATH_DEV_EMCOM}/framework +FWK_DIR_LIST_HH=`find ${FWK_SRC_PATH}/Protocols/ -name "*.h*" -type f` +for i in ${FWK_DIR_LIST_HH} +do + BN=`basename $i` + s1=`sha256sum -b $i | cut -d' ' -f1` + s2=`sha256sum -b ${FWK_DST_PATH}/include/${BN} | cut -d' ' -f1` + if [ "${s1}" != "${s2}" ] + then + cp ${FWK_DST_PATH}/include/${BN} ${VAGRANT_DIR} + if [ -f ${FWK_DST_PATH}/include/${BN}~ ] + then + rm ${FWK_DST_PATH}/include/${BN}~ + fi + fi +done +FWK_DIR_LIST_CC=`find ${FWK_SRC_PATH}/Protocols/ -name "*.c*" -type f` +for i in ${FWK_DIR_LIST_CC} +do + BN=`basename $i` + s1=`sha256sum -b $i | cut -d' ' -f1` + s2=`sha256sum -b ${FWK_DST_PATH}/src/${BN} | cut -d' ' -f1` + if [ "${s1}" != "${s2}" ] + then + cp ${FWK_DST_PATH}/src/${BN} ${VAGRANT_DIR} + if [ -f ${FWK_DST_PATH}/src/${BN}~ ] + then + rm ${FWK_DST_PATH}/src/${BN}~ + fi + fi +done +FWK_DIR_LIST_Y=`find ${FWK_SRC_PATH}/Protocols/ -name "*.y" -type f` +for i in ${FWK_DIR_LIST_Y} +do + BN=`basename $i` + s1=`sha256sum -b $i | cut -d' ' -f1` + s2=`sha256sum -b ${FWK_DST_PATH}/src/${BN} | cut -d' ' -f1` + if [ "${s1}" != "${s2}" ] + then + cp ${FWK_DST_PATH}/src/${BN} ${VAGRANT_DIR} + if [ -f ${FWK_DST_PATH}/src/${BN}~ ] + then + rm ${FWK_DST_PATH}/src/${BN}~ + fi + fi +done +FWK_DIR_LIST_L=`find ${FWK_SRC_PATH}/Protocols/ -name "*.l" -type f` +for i in ${FWK_DIR_LIST_L} +do + BN=`basename $i` + s1=`sha256sum -b $i | cut -d' ' -f1` + s2=`sha256sum -b ${FWK_DST_PATH}/src/${BN} | cut -d' ' -f1` + if [ "${s1}" != "${s2}" ] + then + cp ${FWK_DST_PATH}/src/${BN} ${VAGRANT_DIR} + if [ -f ${FWK_DST_PATH}/src/${BN}~ ] + then + rm ${FWK_DST_PATH}/src/${BN}~ + fi + fi +done +FWK_DIR_LIST_HH=`find ${FWK_SRC_PATH}/Framework/ -name "*.h*" -type f` +FWK_DIR_LIST_CC=`find ${FWK_SRC_PATH}/Framework/ -name "*.c*" -type f` +for i in ${FWK_DIR_LIST_HH} +do + BN=`basename $i` + s1=`sha256sum -b $i | cut -d' ' -f1` + s2=`sha256sum -b ${FWK_DST_PATH}/include/${BN} | cut -d' ' -f1` + if [ "${s1}" != "${s2}" ] + then + cp ${FWK_DST_PATH}/include/${BN} ${VAGRANT_DIR} + if [ -f ${FWK_DST_PATH}/include/${BN}~ ] + then + rm ${FWK_DST_PATH}/include/${BN}~ + fi + fi +done +for i in ${FWK_DIR_LIST_CC} +do + BN=`basename $i` + s1=`sha256sum -b $i | cut -d' ' -f1` + s2=`sha256sum -b ${FWK_DST_PATH}/src/${BN} | cut -d' ' -f1` + if [ "${s1}" != "${s2}" ] + then + cp ${FWK_DST_PATH}/src/${BN} ${VAGRANT_DIR} + if [ -f ${FWK_DST_PATH}/src/${BN}~ ] + then + rm ${FWK_DST_PATH}/src/${BN}~ + fi + fi +done +FWK_DIR_LIST_HH=`find ${FWK_SRC_PATH}/loggers/ -name "*.h*" -type f` +for i in ${FWK_DIR_LIST_HH} +do + BN=`basename $i` + s1=`sha256sum -b $i | cut -d' ' -f1` + s2=`sha256sum -b ${FWK_DST_PATH}/include/${BN} | cut -d' ' -f1` + if [ "${s1}" != "${s2}" ] + then + cp ${FWK_DST_PATH}/include/${BN} ${VAGRANT_DIR} + if [ -f ${FWK_DST_PATH}/include/${BN}~ ] + then + rm ${FWK_DST_PATH}/include/${BN}~ + fi + fi +done +FWK_DIR_LIST_CC=`find ${FWK_SRC_PATH}/loggers/ -name "*.c*" -type f` +for i in ${FWK_DIR_LIST_CC} +do + BN=`basename $i` + s1=`sha256sum -b $i | cut -d' ' -f1` + s2=`sha256sum -b ${FWK_DST_PATH}/src/${BN} | cut -d' ' -f1` + if [ "${s1}" != "${s2}" ] + then + cp ${FWK_DST_PATH}/src/${BN} ${VAGRANT_DIR} + if [ -f ${FWK_DST_PATH}/src/${BN}~ ] + then + rm ${FWK_DST_PATH}/src/${BN}~ + fi + fi +done +# Update ATS TTCN-3 files +echo 'Update TTCN-3 files' +TTCN_3_ORG_PATH=${SRC_EMCOM_PATH}/ttcn +TTCN_3_DST_PATH=${PATH_DEV_EMCOM}/src +TTCN_3_ATS_LIST='AtsNg112 LibEmcom/LibNg112 LibCommon LibSip LibItsHttp' +for i in ${TTCN_3_ATS_LIST} +do + # TTCN-3 files + LIST_TTCN_FILES=`find ${TTCN_3_ORG_PATH}/$i -name "*.ttcn" -type f` + for j in ${LIST_TTCN_FILES} + do + BN=`basename $j` + s1=`sha256sum -b $j | cut -d' ' -f1` + s2=`sha256sum -b ${TTCN_3_DST_PATH}/$i/ttcn/${BN} | cut -d' ' -f1` + if [ "${s1}" != "${s2}" ] + then + cp ${TTCN_3_DST_PATH}/$i/ttcn/${BN} ${VAGRANT_DIR} + fi + done + # XSD files + LIST_TTCN_FILES=`find ${TTCN_3_ORG_PATH}/$i -name "*.xsd" -type f` + for j in ${LIST_TTCN_FILES} + do + BN=`basename $j` + s1=`sha256sum -b $j | cut -d' ' -f1` + s2=`sha256sum -b ${TTCN_3_DST_PATH}/$i/ttcn/${BN} | cut -d' ' -f1` + if [ "${s1}" != "${s2}" ] + then + cp ${TTCN_3_DST_PATH}/$i/xsd/${BN} ${VAGRANT_DIR} + fi + done + # Other files + if [ -f ${SRC_EMCOM_PATH}/docs/$i/o2.cfg ] + then + s1=`sha256sum -b ${PATH_DEV_EMCOM}/src/$i/docs/o2.cfg | cut -d' ' -f1` + s2=`sha256sum -b ${SRC_EMCOM_PATH}/docs/$i/o2.cfg | cut -d' ' -f1` + if [ "${s1}" != "${s2}" ] + then + mkdir -p ${VAGRANT_DIR}/docs/$i + cp ${PATH_DEV_EMCOM}/src/$i/docs/o2.cfg ${VAGRANT_DIR}/docs/$i + fi + fi + if [ -f ${SRC_EMCOM_PATH}/etc/$i/$i.cfg ] + then + s1=`sha256sum -b ${PATH_DEV_EMCOM}/src/$i/etc/$i.cfg | cut -d' ' -f1` + s2=`sha256sum -b ${SRC_EMCOM_PATH}/etc/$i/$i.cfg | cut -d' ' -f1` + if [ "${s1}" != "${s2}" ] + then + mkdir -p ${VAGRANT_DIR}/etc/$i + cp ${PATH_DEV_EMCOM}/src/$i/etc/%i.cfg ${VAGRANT_DIR}/etc/$i + fi + fi +done + +TTCN_3_LIB_LIST='LibHttp LibPemea' +for i in ${TTCN_3_LIB_LIST} +do + LIST_TTCN_FILES=`find ${TTCN_3_ORG_PATH}/$i -name "*.ttcn" -type f` + for j in ${LIST_TTCN_FILES} + do + BN=`basename $j` + s1=`sha256sum -b $j | cut -d' ' -f1` + s2=`sha256sum -b ${TTCN_3_DST_PATH}/$i/ttcn/${BN} | cut -d' ' -f1` + if [ "${s1}" != "${s2}" ] + then + cp ${TTCN_3_DST_PATH}/$i/ttcn/${BN} ${VAGRANT_DIR} + rm ${TTCN_3_DST_PATH}/$i/ttcn/${BN}~ + fi + done +done + + +LIST_FILES=`find ${PATH_DEV_EMCOM} -name "*~" -type f` +for i in ${LIST_FILES} +do + BN=$i + BN=${BN:: -1} # Remove the last character + cp ${BN} ${VAGRANT_DIR} + rm $i +done + +chmod -R 664 ${VAGRANT_DIR}/*.* +exit 0 + diff --git a/scripts/ng112.bash b/scripts/ng112.bash new file mode 100755 index 0000000000000000000000000000000000000000..cb18dc3f97c8df69953115a2eb077e931b00f3bb --- /dev/null +++ b/scripts/ng112.bash @@ -0,0 +1,242 @@ +#!/bin/bash +#set -e +set -vx + +function f_exit { + cd ${CURPWD} + + unset TTCN_FILES + unset CC_FILES + unset CFG_FILES + unset EXECUTABLE + echo $1 + exit $2 +} + +function f_usage { + echo "build.bash: This script import from External Disk the " + echo "Optional arguments:" + echo " prof: Generate a makefile including profiling options (e.g. ./build.bash prof)" + exit 0 +} + +clear + +if [ "$1" == "help" ] +then + f_usage +fi + +ATS_NAME=Ng112 + +#CURPWD=`pwd` +if [ ! "${PWD##*/}" == "objs" ] +then + cd ../objs + if [ ! $? == 0 ] + then + echo "Please move to PROJECT/obj directory" + exit 1 + fi +fi +# Remove everything +rm -fr ../objs/*.hh +rm -fr ../objs/*.cc +rm -fr ../objs/*.log +rm -fr ../objs/*.o +rm -fr ../objs/Makefile + +# Remove useless files +find .. -type f -name "*~" -exec rm {} \; +find .. -type f -name "*.bak" -exec rm {} \; +find .. -type f -name "*.log" -exec rm {} \; + +# Build XSD files if any and put them in objs directory +#XSD_PATH=${PATH_DEV_EMCOM}/src/LibSip/xsd +XSD_PATH=${PATH_DEV_EMCOM}/null # Do not use xsd2ttcn for now, need to fix issues first +if [ -d ${XSD_PATH} ] +then + XSD_FILES=`find ${XSD_PATH} -name '*.xsd'` + + if [ "${OSTYPE}" == "cygwin" ] + then + xsd2ttcn.exe ${XSD_FILES} + else + xsd2ttcn ${XSD_FILES} + fi + if [ "$?" != "0" ] + then + f_exit "Failed to generate XSD source code" 2 + fi + XSD_FILES=`find . -name '*.ttcn'` +fi + +REFERENCES="LibCommon LibHttp LibEmcom/LibNg112 LibSip" +for i in ${REFERENCES} +do + # TTCN code + for j in `find ${PATH_DEV_EMCOM}/src/$i/ttcn -type f -name "*.ttcn"`; + do + ln -sf $j ../ttcn/`basename $j` + done + # Include source code + files=`find ${PATH_DEV_EMCOM}/src/$i/include -type f` + if [ "${files}" != " " ] + then + for j in ${files}; + do + ln -sf $j ../include/`basename $j` + done + fi + # CC source code + files=`find ${PATH_DEV_EMCOM}/src/$i/src -type f` + if [ "${files}" != " " ] + then + for j in ${files}; + do + ln -sf $j ../src/`basename $j` + done + fi +done + +# Generate the list of the TTCN-3 files +TTCN_FILES=`find .. -name '*.ttcn*'` + +# Start ATS generation - Step 1 +if [ "${OSTYPE}" == "cygwin" ] +then + rm ../bin/*.exe ../lib/*.dll + compiler.exe -e -f -g -l -L -M -n -O -t -R -U none ${TTCN_FILES} 2>&1 3>&1 | tee build.log + if [ "$?" == "1" ] + then + f_exit "Failed to compile ATS" 4 + fi +else + compiler -e -f -g -l -L -M -n -O -t -R -U none ${TTCN_FILES} 2>&1 3>&1 | tee build.log + if [ "$?" == "1" ] + then + f_exit "Failed to generate ATS source code" 6 + fi +fi + +# Sart ATS generation - Step 2 +# Create working variables +CC_FILES=`find ../src -name '*.c*'` +FWK_FILES=`find ${PATH_DEV_EMCOM}/framework/ -name '*.c*'` +CFG_FILES=`find ../etc -name '*.cfg'` + +# Sart ATS generation - Step 3 +if [ "${OSTYPE}" == "cygwin" ] +then + ttcn3_makefilegen.exe -d -f -g -m -M -R -U none -e Ats${ATS_NAME} ${TTCN_FILES} ${CC_FILES} ${FWK_FILES} ${CFG_FILES} | tee --append build.log + if [ "$?" == "1" ] + then + f_exit "Failed to compile ATS" 5 + fi +else + ttcn3_makefilegen -d -f -g -m -M -R -U none -e Ats${ATS_NAME} ${TTCN_FILES} ${CC_FILES} ${FWK_FILES} ${CFG_FILES} | tee --append build.log + if [ "$?" == "1" ] + then + f_exit "Failed to generate ATS source code" 7 + fi +fi + +# Bug xsd2ttcn +for i in ${XSD_FILES} +do + VARIANT='s/ variant (\[\-\]) ;//g' + sed --in-place "${VARIANT}" $i +done + +# Remove port skeletons to use src/ +for i in `ls ../include/*.hh` +do + if [ -f ./`basename $i` ] + then + rm ./`basename $i` + fi +done +for i in `ls ../src/*.cc` +do + if [ -f ./`basename $i` ] + then + rm ./`basename $i` + fi +done + +# Check if Makefile was generated +if [ ! -f ./Makefile ] +then + f_exit "Failed to generate ATS source code" 8 +fi + +# Patch ATS generated files +#./bin/patch.bash 2>&1 3>&1 | tee --append build.log +# Add compiler/linker options +# -DASN_DISABLE_OER_SUPPORT is required for CAMCodec and DENMCodec +if [ "$1" == "prof" ] +then + if [ "${OSTYPE}" == "cygwin" ] + then + CXXFLAGS_DEBUG_MODE='s/-Wall/-pg -Wall -std=c++11 -fPIC -D_XOPEN_SOURCE=700 -DAS_USE_SSL -pthreads -fstack-check -fstack-protector -fsanitize=leak -fsanitize=address -fno-omit-frame-pointer/g' + else + CXXFLAGS_DEBUG_MODE='s/-Wall/-pg -Wall -std=c++11 -fPIC -DAS_USE_SSL -pthreads -fstack-check -fstack-protector -fsanitize=leak -fsanitize=address -fno-omit-frame-pointer/g' + fi + LDFLAGS_DEBUG_MODE='s/LDFLAGS = /LDFLAGS = -pg -pthread -fPIC -fstack-check -fstack-protector -fsanitize=leak -fsanitize=address -fno-omit-frame-pointer/g' +else + if [ "${OSTYPE}" == "cygwin" ] + then + CXXFLAGS_DEBUG_MODE='s/-Wall/-ggdb -O0 -Wall -std=c++11 -fPIC -DAS_USE_SSL -D_XOPEN_SOURCE=700 -pthread -fstack-check -fstack-protector -fsanitize=leak -fsanitize=address -fno-omit-frame-pointer/g' + else + CXXFLAGS_DEBUG_MODE='s/-Wall/-ggdb -O0 -Wall -std=c++11 -fPIC -DAS_USE_SSL -pthread -fstack-check -fstack-protector -fsanitize=leak -fsanitize=address -fno-omit-frame-pointer/g' + fi + LDFLAGS_DEBUG_MODE='s/LDFLAGS = /LDFLAGS = -g -pthread -fPIC -fstack-check -fstack-protector -fsanitize=leak -fsanitize=address -fno-omit-frame-pointer/g' +fi +ADD_INCLUDE='/CPPFLAGS = /a\\CPPFLAGS += -I/usr/local/share -I$(PATH_DEV_EMCOM)/include -I$(PATH_DEV_EMCOM)/framework/include -I../include -I../../LibEmcom/Common/include -I../../LibEmcom/LibNg112/include -I$(HOME_FRAMEWORKS)/osip/include -I$(HOME_INC) -I.' +ADD_LIBRARIES='s/LINUX_LIBS = -lxml2/LINUX_LIBS = -lrt -lxml2 -lpcap -lstdc++fs -lssl -L\$\(HOME_FRAMEWORKS\)\/osip\/src\/osipparser2\/\.libs -losipparser2/g' +sed --in-place "${CXXFLAGS_DEBUG_MODE}" ./Makefile +sed --in-place "${LDFLAGS_DEBUG_MODE}" ./Makefile +sed --in-place "${ADD_INCLUDE}" ./Makefile +sed --in-place "${ADD_LIBRARIES}" ./Makefile +# Update COMPILER_FLAGS +COMPILER_FLAGS='s/COMPILER_FLAGS = /COMPILER_FLAGS = -e -O /g' +sed --in-place "${COMPILER_FLAGS}" ./Makefile +# Update clean clause +CLEAN_LINE='s/$(RM) $(EXECUTABLE)/$(RM) ..\/bin\/$(EXECUTABLE) ..\/src\/*.o/g' +sed --in-place "${CLEAN_LINE}" ./Makefile +# Move binary file command +EXECUTABLE=MyExample +MV_CMD='s/all: $(TARGET) ;/all: $(TARGET) ; @if [ -f ..\/objs\/$(EXECUTABLE) ]; then mv ..\/objs\/$(EXECUTABLE) ..\/bin; fi ;/g' +sed --in-place "${MV_CMD}" ./Makefile +# Add run command +ADD_HOST='/PLATFORM = /aHOST=127.0.0.1' +ADD_PORT='/PLATFORM = /aPORT=12000' +sed --in-place "${ADD_PORT}" ./Makefile +sed --in-place "${ADD_HOST}" ./Makefile +ADD_RUN_LINE_1='$arun: all' +ADD_RUN_LINE_2='$a\\t@sudo LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) $(PWD)/../bin/$(EXECUTABLE) $(HOST) $(PORT)' +sed --in-place "${ADD_RUN_LINE_1}" ./Makefile +sed --in-place "${ADD_RUN_LINE_2}" ./Makefile +ADD_RUN_LINE_1='$arun_d: all' +ADD_RUN_LINE_2='$a\\t@gdb --args $(PWD)/../bin/$(EXECUTABLE) $(HOST) $(PORT)' +sed --in-place "${ADD_RUN_LINE_1}" ./Makefile +sed --in-place "${ADD_RUN_LINE_2}" ./Makefile +ADD_RUN_LINE_1='$arun_v: all' +ADD_RUN_LINE_2='$a\\t@sudo LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) valgrind -v --tool=memcheck --leak-check=yes --show-reachable=yes --track-fds=yes --run-cxx-freeres=yes $(PWD)/../bin/$(EXECUTABLE) $(HOST) $(PORT)' +sed --in-place "${ADD_RUN_LINE_1}" ./Makefile +sed --in-place "${ADD_RUN_LINE_2}" ./Makefile +# Add gendoc entry +ADD_RUN_LINE_1='$agendoc: ../docs/o2.cfg' +ADD_RUN_LINE_2='$a\\tdoxygen ../docs/o2.cfg' +sed --in-place "${ADD_RUN_LINE_1}" ./Makefile +sed --in-place "${ADD_RUN_LINE_2}" ./Makefile + +# Build all +make all 2>&1 3>&1 | tee --append build.log +if [ "$?" == "1" ] +then + f_exit "Failed to generate ATS source code" 9 +fi +export LD_LIBRARY_PATH=~/frameworks/osip/src/osipparser2/.libs:$LD_LIBRARY_PATH +../bin/Ats${ATS_NAME} -v +f_exit "Build done successfully" 0 diff --git a/scripts/run_all.bash b/scripts/run_all.bash new file mode 100755 index 0000000000000000000000000000000000000000..55c00e054ba6a12789adb95c56e9e7624026a6a4 --- /dev/null +++ b/scripts/run_all.bash @@ -0,0 +1,47 @@ +#!/bin/bash +#set -e +#set -vx + +clear + +export LD_LIBRARY_PATH=/home/${USER}/frameworks/osip/src/osipparser2/.libs:$LD_LIBRARY_PATH + +if ! [[ $1 =~ "^[0-9]+$" ]] +then + COUNTER=$1 +else + COUNTER=1 +fi + +CURPWD=`pwd` +if [ ! "${PWD##*/}" == "objs" ] +then + cd ../objs + if [ ! $? == 0 ] + then + echo "Please move to PROJECT/obj directory" + exit 1 + fi +fi + +rm ../logs/merged.log.* + +for i in $(seq 1 1 $COUNTER) +do + LD_LIBRARY_PATH=/home/${USER}/frameworks/osip/src/osipparser2/.libs:$LD_LIBRARY_PATH ../bin/run_mtc.bash & + LD_LIBRARY_PATH=/home/${USER}/frameworks/osip/src/osipparser2/.libs:$LD_LIBRARY_PATH ../bin/run_ptcs.bash $2 + + dup=$(ps -ef | grep "$0" | grep -v grep | wc -l) + while [ ${dup} -eq 3 ] + do + sleep 1 + dup=$(ps -ef | grep "$0" | grep -v grep | wc -l) + done + sleep 1 + + mv ../logs/merged.log ../logs/merged.log.`date +'%Y%m%d%S'` +done + +exit 0 + + diff --git a/scripts/run_mtc.bash b/scripts/run_mtc.bash new file mode 100755 index 0000000000000000000000000000000000000000..a4932c24103634b54ee5343fbea8162d1e841680 --- /dev/null +++ b/scripts/run_mtc.bash @@ -0,0 +1,55 @@ +#!/bin/bash +#set -evx + +clear + +CURPWD=`pwd` +if [ ! "${PWD##*/}" == "objs" ] +then + cd ../objs + if [ ! $? == 0 ] + then + echo "Please move to PROJECT/obj directory" + exit 1 + fi +fi + +TITAN_LOG_DIR=../logs +if [ ! -d ${TITAN_LOG_DIR} ] +then + mkdir ${TITAN_LOG_DIR} +else + rm -f ${TITAN_LOG_DIR}/*.log +fi + +CFG_FILES=`find ../etc -name '*.cfg'` +#LOG_FILES=`find ${TITAN_LOG_DIR} -name '*.log'` +#mv ${LOG_FILES} ../logs + +#if [ "${OSTYPE}" == "cygwin" ] +#then +# # Remove dll +# rm ./*.dll +# ## Copy the new ones +# cp ~/lib/libhelper.dll . +# cp ~/lib/libconverter.dll . +# cp ~/lib/liblogger.dll . +# cp ~/lib/libttcn3_tri.dll . +# cp ~/lib/libcomm.dll . +#fi + +echo "> cmtc: to create the MTC server" +echo "> smtc [module_name[[.control]|.testcase_name|.*]: when MyExample is connected, run the TCs in [EXECUTE] section" +echo "> emtc: Terminate MTC." +mctr ${CFG_FILES} + +LOG_FILES=`find ${TITAN_LOG_DIR} -name '*.log'` +if [ "${TITAN_LOG_DIR}" != "" ] +then + ttcn3_logmerge -o ${TITAN_LOG_DIR}/merged.log ${LOG_FILES} + ttcn3_logformat -o ${TITAN_LOG_DIR}/merged_formated.log ${TITAN_LOG_DIR}/merged.log + mv ${TITAN_LOG_DIR}/merged_formated.log ${TITAN_LOG_DIR}/merged.log + echo "log files were merged into ${TITAN_LOG_DIR}/merged.log" +fi + +cd ${CURPWD} diff --git a/scripts/run_ptcs.bash b/scripts/run_ptcs.bash new file mode 100755 index 0000000000000000000000000000000000000000..869220b927916d4fb61ae17656659a0d9c1a8f6a --- /dev/null +++ b/scripts/run_ptcs.bash @@ -0,0 +1,38 @@ +#!/bin/bash +#set -e +#set -vx + +clear + +CURPWD=`pwd` +if [ ! "${PWD##*/}" == "objs" ] +then + cd ../objs + if [ ! $? == 0 ] + then + echo "Please move to PROJECT/obj directory" + exit 1 + fi +fi + +if [ -f ./core ] +then + rm -f ./core +fi +if [ "$1" == "d" ] +then + make run_d +elif [ "$1" == "v" ] +then + make run_v +else + make run +fi +#if [ "${OSTYPE}" == "cygwin" ] +#then +# ../bin/SIPmsg.exe 127.0.0.1 12000 +#else +# ../bin/SIPmsg 127.0.0.1 12000 +#fi + +cd ${CURPWD} diff --git a/scripts/run_tshark.bash b/scripts/run_tshark.bash new file mode 100755 index 0000000000000000000000000000000000000000..7b12fa40fc256be2ba529f2a5671d9a3b1870b62 --- /dev/null +++ b/scripts/run_tshark.bash @@ -0,0 +1,7 @@ +#!/bin/bash + +# Debug mode +#set -vx +set -e + +~/frameworks/wireshark-build/run/tshark -ieth1 -V -f"ether proto 0x8947 or udp src port 12345 or udp dst port 12345" -Tfields -eframe.time -eeth.dst -eeth.src -eeth.type -edata diff --git a/scripts/testcodec_generate_makefile.bash b/scripts/testcodec_generate_makefile.bash new file mode 100755 index 0000000000000000000000000000000000000000..4b7949281eac460ccde8d823c2b2d1333f86d733 --- /dev/null +++ b/scripts/testcodec_generate_makefile.bash @@ -0,0 +1,242 @@ +#!/bin/bash +#set -e +set -vx + +function f_exit { + cd ${CURPWD} + + unset TTCN_FILES + unset CC_FILES + unset CFG_FILES + unset EXECUTABLE + echo $1 + exit $2 +} + +function f_usage { + echo "build.bash: This script import from External Disk the " + echo "Optional arguments:" + echo " prof: Generate a makefile including profiling options (e.g. ./build.bash prof)" + exit 0 +} + +clear + +if [ "$1" == "help" ] +then + f_usage +fi + +ATS_NAME=TestCodec + +#CURPWD=`pwd` +if [ ! "${PWD##*/}" == "objs" ] +then + cd ../objs + if [ ! $? == 0 ] + then + echo "Please move to PROJECT/obj directory" + exit 1 + fi +fi +# Remove everything +rm -fr ../objs/*.hh +rm -fr ../objs/*.cc +rm -fr ../objs/*.log +rm -fr ../objs/*.o +rm -fr ../objs/Makefile + +# Remove useless files +find .. -type f -name "*~" -exec rm {} \; +find .. -type f -name "*.bak" -exec rm {} \; +find .. -type f -name "*.log" -exec rm {} \; + +# Build XSD files if any and put them in objs directory +#XSD_PATH=${PATH_DEV_EMCOM}/xsd +XSD_PATH=${PATH_DEV_EMCOM}/null # Do not use xsd2ttcn for now, need to fix issues first +if [ -d ${XSD_PATH} ] +then + XSD_FILES=`find ${XSD_PATH} -name '*.xsd'` + + if [ "${OSTYPE}" == "cygwin" ] + then + xsd2ttcn.exe ${XSD_FILES} + else + xsd2ttcn ${XSD_FILES} + fi + if [ "$?" != "0" ] + then + f_exit "Failed to generate XSD source code" 2 + fi + XSD_FILES=`find . -name '*.ttcn'` +fi + +REFERENCES="LibCommon LibHttp LibEmcom/LibNg112 LibSip" +for i in ${REFERENCES} +do + # TTCN code + for j in `find ${PATH_DEV_EMCOM}/src/$i/ttcn -type f -name "*.ttcn"`; + do + ln -sf $j ../ttcn/`basename $j` + done + # Include source code + files=`find ${PATH_DEV_EMCOM}/src/$i/include -type f` + if [ "${files}" != " " ] + then + for j in ${files}; + do + ln -sf $j ../include/`basename $j` + done + fi + # CC source code + files=`find ${PATH_DEV_EMCOM}/src/$i/src -type f` + if [ "${files}" != " " ] + then + for j in ${files}; + do + ln -sf $j ../src/`basename $j` + done + fi +done + +# Generate the list of the TTCN-3 files +TTCN_FILES=`find .. -name '*.ttcn*'` + +# Start ATS generation - Step 1 +if [ "${OSTYPE}" == "cygwin" ] +then + rm ../bin/*.exe ../lib/*.dll + compiler.exe -e -f -g -l -L -M -n -O -t -R -U none ${TTCN_FILES} 2>&1 3>&1 | tee build.log + if [ "$?" == "1" ] + then + f_exit "Failed to compile ATS" 4 + fi +else + compiler -e -f -g -l -L -M -n -O -t -R -U none ${TTCN_FILES} 2>&1 3>&1 | tee build.log + if [ "$?" == "1" ] + then + f_exit "Failed to generate ATS source code" 6 + fi +fi + +# Sart ATS generation - Step 2 +# Create working variables +CC_FILES=`find ../src -name '*.c*'` +FWK_FILES=`find ${PATH_DEV_EMCOM}/framework/ -name '*.c*'` +CFG_FILES=`find ../etc -name '*.cfg'` + +# Sart ATS generation - Step 3 +if [ "${OSTYPE}" == "cygwin" ] +then + ttcn3_makefilegen.exe -d -f -g -m -M -R -U none -e Ats${ATS_NAME} ${TTCN_FILES} ${CC_FILES} ${FWK_FILES} ${CFG_FILES} | tee --append build.log + if [ "$?" == "1" ] + then + f_exit "Failed to compile ATS" 5 + fi +else + ttcn3_makefilegen -d -f -g -m -M -R -U none -e Ats${ATS_NAME} ${TTCN_FILES} ${CC_FILES} ${FWK_FILES} ${CFG_FILES} | tee --append build.log + if [ "$?" == "1" ] + then + f_exit "Failed to generate ATS source code" 7 + fi +fi + +# Bug xsd2ttcn +for i in ${XSD_FILES} +do + VARIANT='s/ variant (\[\-\]) ;//g' + sed --in-place "${VARIANT}" $i +done + +# Remove port skeletons to use src/ +for i in `ls ../include/*.hh` +do + if [ -f ./`basename $i` ] + then + rm ./`basename $i` + fi +done +for i in `ls ../src/*.cc` +do + if [ -f ./`basename $i` ] + then + rm ./`basename $i` + fi +done + +# Check if Makefile was generated +if [ ! -f ./Makefile ] +then + f_exit "Failed to generate ATS source code" 8 +fi + +# Patch ATS generated files +#./bin/patch.bash 2>&1 3>&1 | tee --append build.log +# Add compiler/linker options +# -DASN_DISABLE_OER_SUPPORT is required for CAMCodec and DENMCodec +if [ "$1" == "prof" ] +then + if [ "${OSTYPE}" == "cygwin" ] + then + CXXFLAGS_DEBUG_MODE='s/-Wall/-pg -Wall -std=c++11 -fPIC -D_XOPEN_SOURCE=700 -DAS_USE_SSL -pthreads -fstack-check -fstack-protector -fsanitize=leak -fsanitize=address -fno-omit-frame-pointer/g' + else + CXXFLAGS_DEBUG_MODE='s/-Wall/-pg -Wall -std=c++11 -fPIC -DAS_USE_SSL -pthreads -fstack-check -fstack-protector -fsanitize=leak -fsanitize=address -fno-omit-frame-pointer/g' + fi + LDFLAGS_DEBUG_MODE='s/LDFLAGS = /LDFLAGS = -pg -pthread -fPIC -fstack-check -fstack-protector -fsanitize=leak -fsanitize=address -fno-omit-frame-pointer/g' +else + if [ "${OSTYPE}" == "cygwin" ] + then + CXXFLAGS_DEBUG_MODE='s/-Wall/-ggdb -O0 -Wall -std=c++11 -fPIC -DAS_USE_SSL -D_XOPEN_SOURCE=700 -pthread -fstack-check -fstack-protector -fsanitize=leak -fsanitize=address -fno-omit-frame-pointer/g' + else + CXXFLAGS_DEBUG_MODE='s/-Wall/-ggdb -O0 -Wall -std=c++11 -fPIC -DAS_USE_SSL -pthread -fstack-check -fstack-protector -fsanitize=leak -fsanitize=address -fno-omit-frame-pointer/g' + fi + LDFLAGS_DEBUG_MODE='s/LDFLAGS = /LDFLAGS = -g -pthread -fPIC -fstack-check -fstack-protector -fsanitize=address -fno-omit-frame-pointer -fsanitize=leak -fsanitize=address -fno-omit-frame-pointer/g' +fi +ADD_INCLUDE='/CPPFLAGS = /a\\CPPFLAGS += -I/usr/local/share -I$(PATH_DEV_EMCOM)/include -I$(PATH_DEV_EMCOM)/framework/include -I../include -I../../LibEmcom/Common/include -I../../LibEmcom/LibNg112/include -I$(HOME_FRAMEWORKS)/osip/include -I$(HOME_INC) -I.' +ADD_LIBRARIES='s/LINUX_LIBS = -lxml2/LINUX_LIBS = -lrt -lxml2 -lpcap -lstdc++fs -lssl -L\$\(HOME_FRAMEWORKS\)\/osip\/src\/osipparser2\/\.libs -losipparser2/g' +sed --in-place "${CXXFLAGS_DEBUG_MODE}" ./Makefile +sed --in-place "${LDFLAGS_DEBUG_MODE}" ./Makefile +sed --in-place "${ADD_INCLUDE}" ./Makefile +sed --in-place "${ADD_LIBRARIES}" ./Makefile +# Update COMPILER_FLAGS +COMPILER_FLAGS='s/COMPILER_FLAGS = /COMPILER_FLAGS = -e -O /g' +sed --in-place "${COMPILER_FLAGS}" ./Makefile +# Update clean clause +CLEAN_LINE='s/$(RM) $(EXECUTABLE)/$(RM) ..\/bin\/$(EXECUTABLE) ..\/src\/*.o/g' +sed --in-place "${CLEAN_LINE}" ./Makefile +# Move binary file command +EXECUTABLE=MyExample +MV_CMD='s/all: $(TARGET) ;/all: $(TARGET) ; @if [ -f ..\/objs\/$(EXECUTABLE) ]; then mv ..\/objs\/$(EXECUTABLE) ..\/bin; fi ;/g' +sed --in-place "${MV_CMD}" ./Makefile +# Add run command +ADD_HOST='/PLATFORM = /aHOST=127.0.0.1' +ADD_PORT='/PLATFORM = /aPORT=12000' +sed --in-place "${ADD_PORT}" ./Makefile +sed --in-place "${ADD_HOST}" ./Makefile +ADD_RUN_LINE_1='$arun: all' +ADD_RUN_LINE_2='$a\\t@sudo LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) $(PWD)/../bin/$(EXECUTABLE) $(HOST) $(PORT)' +sed --in-place "${ADD_RUN_LINE_1}" ./Makefile +sed --in-place "${ADD_RUN_LINE_2}" ./Makefile +ADD_RUN_LINE_1='$arun_d: all' +ADD_RUN_LINE_2='$a\\t@gdb --args $(PWD)/../bin/$(EXECUTABLE) $(HOST) $(PORT)' +sed --in-place "${ADD_RUN_LINE_1}" ./Makefile +sed --in-place "${ADD_RUN_LINE_2}" ./Makefile +ADD_RUN_LINE_1='$arun_v: all' +ADD_RUN_LINE_2='$a\\t@sudo LD_LIBRARY_PATH=$(LD_LIBRARY_PATH) valgrind -v --tool=memcheck --leak-check=yes --show-reachable=yes --track-fds=yes --run-cxx-freeres=yes $(PWD)/../bin/$(EXECUTABLE) $(HOST) $(PORT)' +sed --in-place "${ADD_RUN_LINE_1}" ./Makefile +sed --in-place "${ADD_RUN_LINE_2}" ./Makefile +# Add gendoc entry +ADD_RUN_LINE_1='$agendoc: ../docs/o2.cfg' +ADD_RUN_LINE_2='$a\\tdoxygen ../docs/o2.cfg' +sed --in-place "${ADD_RUN_LINE_1}" ./Makefile +sed --in-place "${ADD_RUN_LINE_2}" ./Makefile + +# Build all +make all 2>&1 3>&1 | tee --append build.log +if [ "$?" == "1" ] +then + f_exit "Failed to generate ATS source code" 9 +fi +export LD_LIBRARY_PATH=~/frameworks/osip/src/osipparser2/.libs:$LD_LIBRARY_PATH +../bin/Ats${ATS_NAME} -v +f_exit "Build done successfully" 0 diff --git a/scripts/titan_repos.txt b/scripts/titan_repos.txt index 288a3165fa96fba3ef6600b6e882a36c491a813d..67f6bac5e5713bf90f760ee43b20f4fd4363036c 100644 --- a/scripts/titan_repos.txt +++ b/scripts/titan_repos.txt @@ -55,27 +55,27 @@ https://github.com/eclipse/titan.ProtocolModules.SRTP.git https://github.com/eclipse/titan.ProtocolModules.WebSocket.git https://github.com/eclipse/titan.ProtocolModules.HTTP2.0.git https://github.com/eclipse/titan.Libraries.TCCUsefulFunctions.git -git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.CoAP.git -git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.DSS1_ETSI.git -git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.DUA.git -git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.EAP.git -git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.GRE.git -git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.M2PA.git -git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.M2UA.git -git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.MobileL3_v13.4.0.git -git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.MongoDB.git -git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.MQTT.git -git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.NDP.git -git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.NTAF.git -git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.ROSE.git -git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.SCTP.git -git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.SDP.git -git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.SNDCP_v7.0.0.git -git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.STOMP.git -git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.STUN_RFC5389.git -git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.SUA.git -git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.TLS.git -git://git.eclipse.org/gitroot/titan/titan.ProtocolModules.WTP.git -git://git.eclipse.org/gitroot/titan/titan.TestPorts.GPIO.git -git://git.eclipse.org/gitroot/titan/titan.TestPorts.MTP3asp.git -git://git.eclipse.org/gitroot/titan/titan.TestPorts.Serial.git +https://git.eclipse.org/r/titan/titan.ProtocolModules.CoAP.git +https://git.eclipse.org/r/titan/titan.ProtocolModules.DSS1_ETSI.git +https://git.eclipse.org/r/titan/titan.ProtocolModules.DUA.git +https://git.eclipse.org/r/titan/titan.ProtocolModules.EAP.git +https://git.eclipse.org/r/titan/titan.ProtocolModules.GRE.git +https://git.eclipse.org/r/titan/titan.ProtocolModules.M2PA.git +https://git.eclipse.org/r/titan/titan.ProtocolModules.M2UA.git +https://git.eclipse.org/r/titan/titan.ProtocolModules.MobileL3_v13.4.0.git +https://git.eclipse.org/r/titan/titan.ProtocolModules.MongoDB.git +https://git.eclipse.org/r/titan/titan.ProtocolModules.MQTT.git +https://git.eclipse.org/r/titan/titan.ProtocolModules.NDP.git +https://git.eclipse.org/r/titan/titan.ProtocolModules.NTAF.git +https://git.eclipse.org/r/titan/titan.ProtocolModules.ROSE.git +https://git.eclipse.org/r/titan/titan.ProtocolModules.SCTP.git +https://git.eclipse.org/r/titan/titan.ProtocolModules.SDP.git +https://git.eclipse.org/r/titan/titan.ProtocolModules.SNDCP_v7.0.0.git +https://git.eclipse.org/r/titan/titan.ProtocolModules.STOMP.git +https://git.eclipse.org/r/titan/titan.ProtocolModules.STUN_RFC5389.git +https://git.eclipse.org/r/titan/titan.ProtocolModules.SUA.git +https://git.eclipse.org/r/titan/titan.ProtocolModules.TLS.git +https://git.eclipse.org/r/titan/titan.ProtocolModules.WTP.git +https://git.eclipse.org/r/titan/titan.TestPorts.GPIO.git +https://git.eclipse.org/r/titan/titan.TestPorts.MTP3asp.git +https://git.eclipse.org/r/titan/titan.TestPorts.Serial.git diff --git a/scripts/update_emcom_project.bash b/scripts/update_emcom_project.bash old mode 100644 new mode 100755 index 93c18c8010f726c9fa2c056611eb979db8bad08b..7234e5b83b84cd56ffd161a91bbfa1e40ea11074 --- a/scripts/update_emcom_project.bash +++ b/scripts/update_emcom_project.bash @@ -8,20 +8,26 @@ set -vx # TODO Use git clone in temporary directory OLDPWD=`pwd` -cd ${HOME}/dev/STF549_ng112 # Execution path RUN_PATH="${0%/*}" -SRC_EMCOM_PATH=${HOME}/dev/STF549_ng112 -PATH_DEV_EMCOM=`pwd`/../etsi_emcom +USER=`whoami` +CHOWN_USER_GROUP=${USER}:${USER} +SRC_EMCOM_PATH=${HOME}/dev/STF549_Ng112 + +if [ "${PATH_DEV_EMCOM}" == "" ] +then + PATH_DEV_EMCOM=${HOME}/dev/etsi_emcom +fi if [ -d ${PATH_DEV_EMCOM} ] then if [ -f ${HOME}/tmp/emcom.tar.bz2 ] then - mv ${HOME}/tmp/emcom.tar.bz2 ${HOME}/tmp/emcom.tar.`date +'%Y%m%d'`.bz2 + mv ${HOME}/tmp/emcom.tar.bz2 ${HOME}/tmp/emcom.tar.`date +'%Y%m%d'`.bz2 fi + find ${PATH_DEV_EMCOM} -name "*.o" -exec rm {} \; tar jcvf ${HOME}/tmp/emcom.tar.bz2 ${PATH_DEV_EMCOM} rm -fr ${PATH_DEV_EMCOM} fi @@ -55,28 +61,28 @@ FWK_DIR_LIST_L=`find ${FWK_SRC_PATH}/Protocols/ -name "*.l" -type f` FWK_DIR_LIST_Y=`find ${FWK_SRC_PATH}/Protocols/ -name "*.y" -type f` for i in ${FWK_DIR_LIST_HH} do - cp $i ${FWK_DST_PATH}/include + cp $i ${FWK_DST_PATH}/include done for i in ${FWK_DIR_LIST_THH} do - cp $i ${FWK_DST_PATH}/include + cp $i ${FWK_DST_PATH}/include done for i in ${FWK_DIR_LIST_CC} do - cp $i ${FWK_DST_PATH}/src + cp $i ${FWK_DST_PATH}/src done if [ "${FWK_DIR_LIST_L}" != "" ] then for i in ${FWK_DIR_LIST_L} do - cp $i ${FWK_DST_PATH}/src + cp $i ${FWK_DST_PATH}/src done fi if [ "${FWK_DIR_LIST_Y}" != "" ] then for i in ${FWK_DIR_LIST_Y} do - cp $i ${FWK_DST_PATH}/src + cp $i ${FWK_DST_PATH}/src done fi FWK_DIR_LIST_HH=`find ${FWK_SRC_PATH}/Framework/ -name "*.h*" -type f` @@ -95,13 +101,13 @@ echo 'Update TTCN-3 files' TTCN_3_ORG_PATH=${SRC_EMCOM_PATH}/ttcn TTCN_3_DST_PATH=${PATH_DEV_EMCOM}/src CC_SRC_PATH=${SRC_EMCOM_PATH}/ccsrc -TTCN_3_ATS_LIST='AtsNg112' +TTCN_3_ATS_LIST='AtsNg112 TestCodec' for i in ${TTCN_3_ATS_LIST} do if [ ! -d ${TTCN_3_DST_PATH}/$i ] then - mkdir -p ${TTCN_3_DST_PATH}/$i/bin ${TTCN_3_DST_PATH}/$i/lib ${TTCN_3_DST_PATH}/$i/src ${TTCN_3_DST_PATH}/$i/include ${TTCN_3_DST_PATH}/$i/ttcn ${TTCN_3_DST_PATH}/$i/objs ${TTCN_3_DST_PATH}/$i/etc ${TTCN_3_DST_PATH}/$i/docs - chmod -R 775 ${TTCN_3_DST_PATH}/$i + mkdir -p ${TTCN_3_DST_PATH}/$i/bin ${TTCN_3_DST_PATH}/$i/lib ${TTCN_3_DST_PATH}/$i/src ${TTCN_3_DST_PATH}/$i/include ${TTCN_3_DST_PATH}/$i/ttcn ${TTCN_3_DST_PATH}/$i/objs ${TTCN_3_DST_PATH}/$i/etc ${TTCN_3_DST_PATH}/$i/docs + chmod -R 775 ${TTCN_3_DST_PATH}/$i fi cp ${TTCN_3_ORG_PATH}/$i/*.ttcn ${TTCN_3_DST_PATH}/$i/ttcn cp ${TTCN_3_ORG_PATH}/../etc/$i/*.cfg ${TTCN_3_DST_PATH}/$i/etc @@ -114,56 +120,81 @@ for i in ${TTCN_3_LIB_LIST} do if [ ! -d ${TTCN_3_DST_PATH}/$i ] then - mkdir -p ${TTCN_3_DST_PATH}/$i/docs ${TTCN_3_DST_PATH}/$i/src ${TTCN_3_DST_PATH}/$i/include ${TTCN_3_DST_PATH}/$i/ttcn ${TTCN_3_DST_PATH}/$i/xsd + mkdir -p ${TTCN_3_DST_PATH}/$i/docs ${TTCN_3_DST_PATH}/$i/src ${TTCN_3_DST_PATH}/$i/include ${TTCN_3_DST_PATH}/$i/ttcn ${TTCN_3_DST_PATH}/$i/xsd fi cp ${TTCN_3_ORG_PATH}/$i/*.ttcn ${TTCN_3_DST_PATH}/$i/ttcn - # Update CC files - if [ "$i" == "LibNg112" ] + # Update files + if [ "$i" == "LibEmcom/LibNg112" ] then - cp ${CC_SRC_PATH}/include/$i/*.hh ${TTCN_3_DST_PATH}/$i/include - cp ${CC_SRC_PATH}/src/$i/*.cc ${TTCN_3_DST_PATH}/$i/src - fi - if [ "$i" == "LibSip" ] + cp ${TTCN_3_ORG_PATH}/$i/ttcn/*.ttcn ${TTCN_3_DST_PATH}/$i/ttcn + cp ${TTCN_3_ORG_PATH}/$i/xsd/*.xsd ${TTCN_3_DST_PATH}/$i/xsd + cp ${TTCN_3_ORG_PATH}/$i/xsd/*.ttcn ${TTCN_3_DST_PATH}/$i/ttcn + cp ${CC_SRC_PATH}/include/$i/*.hh ${TTCN_3_DST_PATH}/$i/include + cp ${CC_SRC_PATH}/src/$i/*.cc ${TTCN_3_DST_PATH}/$i/src + elif [ "$i" == "LibSip" ] then cp ${TTCN_3_ORG_PATH}/$i/ttcn/*.ttcn ${TTCN_3_DST_PATH}/$i/ttcn cp ${TTCN_3_ORG_PATH}/$i/xsd/*.xsd ${TTCN_3_DST_PATH}/$i/xsd cp ${TTCN_3_ORG_PATH}/$i/xsd/*.ttcn ${TTCN_3_DST_PATH}/$i/ttcn - cp ${CC_SRC_PATH}/EncDec/LibSip_Encdec.cc ${TTCN_3_DST_PATH}/$i/src - cp ${CC_SRC_PATH}/Ports/$i/*.hh ${TTCN_3_DST_PATH}/$i/include - cp ${CC_SRC_PATH}/Ports/$i/*.cc ${TTCN_3_DST_PATH}/$i/src - cp ${CC_SRC_PATH}/include/$i/*.hh ${TTCN_3_DST_PATH}/$i/include - cp ${CC_SRC_PATH}/src/$i/*.cc ${TTCN_3_DST_PATH}/$i/src + cp ${CC_SRC_PATH}/EncDec/$i/*_Encdec.cc ${TTCN_3_DST_PATH}/$i/src + cp ${CC_SRC_PATH}/Ports/$i/*.hh ${TTCN_3_DST_PATH}/$i/include + cp ${CC_SRC_PATH}/Ports/$i/*.cc ${TTCN_3_DST_PATH}/$i/src + cp ${CC_SRC_PATH}/include/$i/*.hh ${TTCN_3_DST_PATH}/$i/include + cp ${CC_SRC_PATH}/src/$i/*.cc ${TTCN_3_DST_PATH}/$i/src + # Patch TITAN due to issues in xsd2ttcn + cp ${SRC_EMCOM_PATH}/ttcn/patch_sip_titan/*.ttcn ${TTCN_3_DST_PATH}/$i/ttcn + elif [ "$i" == "LibHttp" ] + then + cp ${TTCN_3_ORG_PATH}/$i/*.ttcn ${TTCN_3_DST_PATH}/$i/ttcn + cp ${CC_SRC_PATH}/EncDec/$i/*_Encdec.cc ${TTCN_3_DST_PATH}/$i/src + cp ${CC_SRC_PATH}/Ports/$i/*.hh ${TTCN_3_DST_PATH}/$i/include + cp ${CC_SRC_PATH}/Ports/$i/*.cc ${TTCN_3_DST_PATH}/$i/src + cp ${CC_SRC_PATH}/include/$i/*.hh ${TTCN_3_DST_PATH}/$i/include + cp ${CC_SRC_PATH}/src/$i/*.cc ${TTCN_3_DST_PATH}/$i/src + # Patch due to svn/gitlab moving + cp ${SRC_EMCOM_PATH}/ttcn/patch_lib_http/*.ttcn ${TTCN_3_DST_PATH}/$i/ttcn + elif [ "$i" == "LibCommon" ] + then + # Patch TITAN due to issues in xsd2ttcn + cp ${SRC_EMCOM_PATH}/ttcn/patch_lib_common_titan/*.ttcn ${TTCN_3_DST_PATH}/$i/ttcn fi done # Generate Bison parsers is any -cd ${FWK_DST_PATH}/src -if [ "${FWK_DIR_LIST_Y}" != "" ] -then - for i in ${FWK_DIR_LIST_Y} - do - BASE_NAME=$(basename "$i" .y) - bison -dv -p${BASE_NAME}_ -b${BASE_NAME}_ ${BASE_NAME}.y #--defines=../include/${BASE_NAME}.h -o${BASE_NAME}.c - done -fi -if [ "${FWK_DIR_LIST_L}" != "" ] -then - for i in ${FWK_DIR_LIST_L} - do - BASE_NAME=$(basename "$i" .l) - flex -Cfr -8 -Bvpp -P${BASE_NAME}_ ${BASE_NAME}.l # -o${BASE_NAME}_flex.c ${BASE_NAME}.l - done - mv ${BASE_NAME}_.tab.h ../include -fi -cd - +#cd ${FWK_DST_PATH}/src +#if [ "${FWK_DIR_LIST_Y}" != "" ] +#then +# for i in ${FWK_DIR_LIST_Y} +# do +# BASE_NAME=$(basename "$i" .y) +# bison -dv -p${BASE_NAME}_ -b${BASE_NAME}_ ${BASE_NAME}.y #--defines=../include/${BASE_NAME}.h -o${BASE_NAME}.c +# done +#fi +#if [ "${FWK_DIR_LIST_L}" != "" ] +#then +# for i in ${FWK_DIR_LIST_L} +# do +# BASE_NAME=$(basename "$i" .l) +# flex -Cfr -8 -Bvpp -P${BASE_NAME}_ ${BASE_NAME}.l # -o${BASE_NAME}_flex.c ${BASE_NAME}.l +# done +# mv ${BASE_NAME}_.tab.h ../include +#fi +#cd - # Apply patches -PATH_PATCHES=`pwd`/etsi_emcom_patches +PATH_PATCHES=`pwd` if [ -d ${PATH_PATCHES} ] then + # Update Ng112 cp ${PATH_PATCHES}/ng112.bash ${PATH_DEV_EMCOM}/src/AtsNg112/bin - cp ${PATH_PATCHES}/../run_mtc.bash ${PATH_DEV_EMCOM}/src/AtsNg112/bin - cp ${PATH_PATCHES}/../run_ptcs.bash ${PATH_DEV_EMCOM}/src/AtsNg112/bin + cp ${PATH_PATCHES}/run_mtc.bash ${PATH_DEV_EMCOM}/src/AtsNg112/bin + cp ${PATH_PATCHES}/run_ptcs.bash ${PATH_DEV_EMCOM}/src/AtsNg112/bin + cp ${PATH_PATCHES}/run_all.bash ${PATH_DEV_EMCOM}/src/AtsNg112/bin + # Update TestCodec + cp ${PATH_PATCHES}/testcodec_generate_makefile.bash ${PATH_DEV_EMCOM}/src/TestCodec/bin + cp ${PATH_PATCHES}/run_mtc.bash ${PATH_DEV_EMCOM}/src/TestCodec/bin + cp ${PATH_PATCHES}/run_ptcs.bash ${PATH_DEV_EMCOM}/src/TestCodec/bin + cp ${PATH_PATCHES}/run_all.bash ${PATH_DEV_EMCOM}/src/TestCodec/bin fi # Set rights diff --git a/test_purposes/ECRF_HTTP_POST_BV_xx.tplan2 b/test_purposes/ECRF_HTTP_POST_BV_xx.tplan2 new file mode 100644 index 0000000000000000000000000000000000000000..5407811b53ffa33a13b3480c01c9291c0fcfecab --- /dev/null +++ b/test_purposes/ECRF_HTTP_POST_BV_xx.tplan2 @@ -0,0 +1,318 @@ +/* ETSI Software License +* As long as the hereunder conditions are respected, non-exclusive permission is hereby granted, +* free of charge, to use, reproduce and modify this software source code, under the following conditions: +* This source code is provided AS IS with no warranties, express or implied, including but not limited to, +* the warranties of merchantability, fitness for a particular purpose and warranties for non-infringement +* of intellectual property rights. +* ETSI shall not be held liable in any event for any direct or indirect damages whatsoever (including, without +* limitation, damages for loss of profits, business interruption, loss of information, or any other pecuniary +* loss) arising out of or related to the use of or inability to use the source code. +* This permission is granted to facilitate the implementation of the related ETSI standard, provided that +* ETSI is given the right to use, reproduce and amend the modified source code under the same conditions +* as the present permission. +* This permission does not apply to any documentation associated with this source code for which ETSI keeps +* all rights reserved. +* The present ETSI Source Code license shall be included in all copies of whole or part of this source code +* and shall not imply any sub-license right. +* (c) ETSI 2018 +*/ + + +Package NG112_ECRF { + Domain { + pics: + - PICS_HTTP_POST_REQUEST + - PICS_SERVICE_LOST + ; + entities: + - IUT + - MTC + ; + events: + - receives //for packets coming from the network to the IUT + - sends //for packets sent by the IUT to the network + - havingServiceBoundaryFor //IUT is provisioned with the relevant service boundary + - serviceMappingFor //IUT is provisioned with the relevant service mapping + - isRequestedToSend //an upper layer requests the IUT to send a packet + - generates //for internal event generation + ; + } + +// Const { +// SERVICE_URN_1: "urn:service:sos.police"; +// SIP_URI_1: "sip:police@city.com"; +// SERVICE_URN_2: "urn:service:sos.fire"; +// SIP_URI_2: "sip:fire@city.com"; +// SERVICE_BOUNDARY_1: "[ +// [ +// [ +// 10.00, +// 50.00 +// ], +// [ +// 15.00, +// 50.00 +// ], +// [ +// 15.00, +// 55.00 +// ], +// [ +// 10.00, +// 55.00 +// ], +// [ +// 10.00, +// 50.00 +// ] +// ] +// ]"; +// SERVICE_BOUNDARY_2: "[ +// [ +// [ +// 20.00, +// 50.00 +// ], +// [ +// 25.00, +// 50.00 +// ], +// [ +// 25.00, +// 55.00 +// ], +// [ +// 20.00, +// 55.00 +// ], +// [ +// 20.00, +// 50.00 +// ] +// ] +// ]"; +// POINT_IN_SERVICE_BOUNDARY_1: "12.00, 53.00" +// CIRCLE_IN_SERVICE_BOUNDARY_2_POS: "22.00 52.00"; +// CIRCLE_IN_SERVICE_BOUNDARY_2_RADIUS: "1"; +// } + +// Data { +// type PDU; +// } +// Configuration { +// Interface Type defaultGT accepts PDU; +// Component Type NG112Comp with gate g of type defaultGT; +// Test Configuration CFG_ESRP_01 +// containing +// Tester component BCF of type NG112Comp +// Tester component LIS of type NG112Comp +// Tester component ECRF of type NG112Comp +// SUT component IUT of type NG112Comp +// connection between BCF.g and IUT.g +// connection between LIS.g and IUT.g +// connection between ECRF.g and IUT.g; +// } + +Test Purpose { +TP Id TP_ECRF_HTTP_POST_BV_01 +Test objective + "IUT successfully responds with a service URI for a Point in the service boundary" +Reference + "ETSI TS 103 479 Vm.t.e (yyyy-mm) Clause XXX EMERGENCY CALL ROUTING FUNCTION (ECRF)", + "Next Generation 112 Long Term Definition http://www.eena.org/uploads/gallery/files/pdf/2013-03-15-eena_ng_longtermdefinitionupdated.pdf Clause 4.4", + "https://tools.ietf.org/html/rfc5222" +//Config Id CFG_ECRF_01 +PICS Selection PICS_HTTP_POST_REQUEST PICS_SERVICE_LOST +Initial conditions with { + the IUT entity havingServiceBoundaryFor the SERVICE_BOUNDARY_1 containing + serviceMappingFor SERVICE_URN_1 containing + URI indicating value SIP_URI_1; + ; + and the IUT entity havingServiceBoundaryFor the SERVICE_BOUNDARY_2 containing + serviceMappingFor SERVICE_URN_2 containing + URI indicating value SIP_URI_2; + ; +} +Expected behaviour + ensure that { + when { + the IUT entity receives a POST containing + Uri indicating value "/service", + Host, + not Accept, + Content_type indicating value "application/lost+xml;charset=utf-8", + body containing + xmlMessage containing + version indicating value "1.0", + element "findService" inNamespace "urn:ietf:params:xml:ns:lost1" containing + element "location" containing + element "Point" inNamespace "http://www.opengis.net/gml" containing + attribute "srsName" indicating value "urn:ogc:def:crs:EPSG::4326", + element "pos" indicating value POINT_IN_SERVICE_BOUNDARY_1; + , + element "service" indicating value SERVICE_URN_1; + ; + ; + ; + ; + } + then { + the IUT entity sends a httpResponse containing + Status_Code indicating value "200 OK", + version indicating value "1.0", + Content_type indicating value "application/lost+xml;charset=utf-8", + body containing + xmlMessage containing + version indicating value "1.0", + element "findServiceResponse" inNamespace "urn:ietf:params:xml:ns:lost1" containing + element "mapping" containing + attribute "source", + attribute "sourceId", + attribute "lastUpdated", + attribute "expires", + element "service" indicating value SERVICE_URN_1, + element "uri" indicating value SIP_URI_1; + , + element "locationUsed" + ; + ; + ; + ; + } + } +} //End of TP_ECRF_HTTP_POST_BV_01 + +Test Purpose { +TP Id TP_ECRF_HTTP_POST_BV_02 +Test objective + "IUT successfully responds with a service URI for a Circle in the service boundary" +Reference + "ETSI TS 103 479 Vm.t.e (yyyy-mm) Clause XXX EMERGENCY CALL ROUTING FUNCTION (ECRF)", + "Next Generation 112 Long Term Definition http://www.eena.org/uploads/gallery/files/pdf/2013-03-15-eena_ng_longtermdefinitionupdated.pdf Clause 4.4", + "https://tools.ietf.org/html/rfc5222" +//Config Id CFG_ECRF_01 +PICS Selection PICS_HTTP_POST_REQUEST PICS_SERVICE_LOST +Initial conditions with { + the IUT entity havingServiceBoundaryFor the SERVICE_BOUNDARY_1 containing + serviceMappingFor SERVICE_URN_1 containing + URI indicating value SIP_URI_1; + ; + and the IUT entity havingServiceBoundaryFor the SERVICE_BOUNDARY_2 containing + serviceMappingFor SERVICE_URN_2 containing + URI indicating value SIP_URI_2; + ; +} +Expected behaviour + ensure that { + when { + the IUT entity receives a POST containing + Uri indicating value "/service", + Host, + not Accept, + Content_type indicating value "application/lost+xml;charset=utf-8", + body containing + xmlMessage containing + version indicating value "1.0", + element "findService" inNamespace "urn:ietf:params:xml:ns:lost1" containing + element "location" containing + element "Circle" inNamespace "http://www.opengis.net/pidflo/1.0" containing + attribute "srsName" indicating value "urn:ogc:def:crs:EPSG::4326", + element "pos" inNamespace "http://www.opengis.net/gml" indicating value CIRCLE_IN_SERVICE_BOUNDARY_2_POS, + element "radius" indicating value CIRCLE_IN_SERVICE_BOUNDARY_2_RADIUS containing + attribute "uom" indicating value "urn:ogc:def:uom:EPSG::9001" + ; + ; + , + element "service" indicating value SERVICE_URN_2; + ; + ; + ; + ; + } + then { + the IUT entity sends a httpResponse containing + Status_Code indicating value "200 OK", + version indicating value "1.0", + Content_type indicating value "application/lost+xml;charset=utf-8", + body containing + xmlMessage containing + version indicating value "1.0", + element "findServiceResponse" inNamespace "urn:ietf:params:xml:ns:lost1" containing + element "mapping" containing + attribute "source", + attribute "sourceId", + attribute "lastUpdated", + attribute "expires", + element "service" indicating value SERVICE_URN_2, + element "uri" indicating value SIP_URI_2; + , + element "locationUsed" + ; + ; + ; + ; + } + } +} //End of TP_ECRF_HTTP_POST_BV_02 + +Test Purpose { +TP Id TP_ECRF_HTTP_POST_BV_03 +Test objective + "IUT successfully responds with an error response for an unknown Service URN in the service boundary" +Reference + "ETSI TS 103 479 Vm.t.e (yyyy-mm) Clause XXX EMERGENCY CALL ROUTING FUNCTION (ECRF)", + "Next Generation 112 Long Term Definition http://www.eena.org/uploads/gallery/files/pdf/2013-03-15-eena_ng_longtermdefinitionupdated.pdf Clause 4.4", + "https://tools.ietf.org/html/rfc5222" +//Config Id CFG_ECRF_01 +PICS Selection PICS_HTTP_POST_REQUEST PICS_SERVICE_LOST +Initial conditions with { + the IUT entity havingServiceBoundaryFor the SERVICE_BOUNDARY_1 containing + serviceMappingFor SERVICE_URN_1 containing + URI indicating value SIP_URI_1; + ; + and the IUT entity havingServiceBoundaryFor the SERVICE_BOUNDARY_2 containing + serviceMappingFor SERVICE_URN_2 containing + URI indicating value SIP_URI_2; + ; +} +Expected behaviour + ensure that { + when { + the IUT entity receives a POST containing + Uri indicating value "/service", + Host, + not Accept, + Content_type indicating value "application/lost+xml;charset=utf-8", + body containing + xmlMessage containing + version indicating value "1.0", + element "findService" inNamespace "urn:ietf:params:xml:ns:lost1" containing + element "location" containing + element "Point" inNamespace "http://www.opengis.net/gml" containing + attribute "srsName" indicating value "urn:ogc:def:crs:EPSG::4326", + element "pos" indicating value POINT_IN_SERVICE_BOUNDARY_1; + , + element "service" indicating value SERVICE_URN_2; + ; + ; + ; + ; + } + then { + the IUT entity sends a httpResponse containing + Status_Code indicating value "200 OK", + version indicating value "1.0", + Content_type indicating value "application/lost+xml;charset=utf-8", + body containing + xmlMessage containing + version indicating value "1.0", + element "errors" inNamespace "urn:ietf:params:xml:ns:lost1" containing + element "serviceNotImplemented" + ; + ; + ; + ; + } + } +} //End of TP_ECRF_HTTP_POST_BV_03 +} diff --git a/test_purposes/ESRP_HTTP_POST_BV_xx.tplan2 b/test_purposes/ESRP_HTTP_POST_BV_xx.tplan2 new file mode 100644 index 0000000000000000000000000000000000000000..3a0d08eafef0358ac0e77f8af47a6f1742652dde --- /dev/null +++ b/test_purposes/ESRP_HTTP_POST_BV_xx.tplan2 @@ -0,0 +1,180 @@ +/* ETSI Software License +* As long as the hereunder conditions are respected, non-exclusive permission is hereby granted, +* free of charge, to use, reproduce and modify this software source code, under the following conditions: +* This source code is provided AS IS with no warranties, express or implied, including but not limited to, +* the warranties of merchantability, fitness for a particular purpose and warranties for non-infringement +* of intellectual property rights. +* ETSI shall not be held liable in any event for any direct or indirect damages whatsoever (including, without +* limitation, damages for loss of profits, business interruption, loss of information, or any other pecuniary +* loss) arising out of or related to the use of or inability to use the source code. +* This permission is granted to facilitate the implementation of the related ETSI standard, provided that +* ETSI is given the right to use, reproduce and amend the modified source code under the same conditions +* as the present permission. +* This permission does not apply to any documentation associated with this source code for which ETSI keeps +* all rights reserved. +* The present ETSI Source Code license shall be included in all copies of whole or part of this source code +* and shall not imply any sub-license right. +* (c) ETSI 2018 +*/ + + +Package NG112_ESRP { + Domain { + pics: + - PICS_SERVICE_ESRP + ; + entities: + - IUT + - ECRF + - PSAP + ; + events: + - receives //for packets coming from the network to the IUT + - sends //for packets sent by the IUT to the network + - forwards //forwards the previously received message to the next hop + - isConfiguredWith //IUT is configured to use the ECRF + - isReachableWith // the PSAP is reachable via the specified URI + - receivedInitialInviteRequestAndSentLostQueryToEcrf // [ref esrp.txt:RECEIVED_INITITAL_INVITE_AND_SENT_LOST_REQUEST] + - receivesLostResponseFor // IUT receives a LoST response for the give target URI [ref esrp.txt:RECEIVES_LOST_RESPONSE_FOR] + ; + } + +// Const { +// SDP_AND_PIDF_MULTIPART [ref esrp.txt:SDP_AND_PIDF_MULTIPART]; +// SERVICE_URN_1: "urn:service:sos.police"; +// SIP_URI_1: "sip:police@city.com"; +// LOCATION_1: "12.00, 53.00" +// } + +// Data { +// type PDU; +// } +// Configuration { +// Interface Type defaultGT accepts PDU; +// Component Type NG112Comp with gate g of type defaultGT; +// Test Configuration CFG_ESRP_01 +// containing +// Tester component BCF of type NG112Comp +// Tester component LIS of type NG112Comp +// Tester component ECRF of type NG112Comp +// SUT component IUT of type NG112Comp +// connection between BCF.g and IUT.g +// connection between LIS.g and IUT.g +// connection between ECRF.g and IUT.g; +// } + +Test Purpose { +TP Id TP_ESRP_SIP_INVITE_BV_01 +Test objective + "IUT successfully forwards an incoming SIP INVITE to the correct downstream element, based on the ECRF response" +Reference + "Next Generation 112 Long Term Definition http://www.eena.org/uploads/gallery/files/pdf/2013-03-15-eena_ng_longtermdefinitionupdated.pdf Clause 4.3", + "https://tools.ietf.org/html/rfc5222" +//Config Id CFG_ESRP_01 +PICS Selection PICS_SERVICE_ESRP +Initial conditions with { + the IUT entity isConfiguredWith the ECRF + and the PSAP entity isReachableWith the SIP_URI_1 + and the IUT entity receivedInitialInviteRequestAndSentLostQueryToEcrf +} +Expected behaviour + ensure that { + when { + the IUT entity receives a SIP_INVITE containing + Request_URI indicating value SERVICE_URN_1, + Content_Type indicating value "multipart/mixed", + body containing + SDP_AND_PIDF_MULTIPART + ; + ; + and the IUT entity sends a POST containing + Content_type indicating value "application/lost+xml;charset=utf-8", + body containing + xmlMessage containing + version indicating value "1.0", + element "findService" inNamespace "urn:ietf:params:xml:ns:lost1" containing + element "location" containing + element "Point" inNamespace "http://www.opengis.net/gml" containing + attribute "srsName" indicating value "urn:ogc:def:crs:EPSG::4326", + element "pos" indicating value LOCATION_1; + , + element "service" indicating value SERVICE_URN_1; + ; + ; + ; + ; to the ECRF entity + and the IUT entity receives a httpResponse containing + Status_Code indicating value "200 OK", + version indicating value "1.0", + Content_type indicating value "application/lost+xml;charset=utf-8", + body containing + xmlMessage containing + version indicating value "1.0", + element "findServiceResponse" inNamespace "urn:ietf:params:xml:ns:lost1" containing + element "mapping" containing + attribute "source", + attribute "sourceId", + attribute "lastUpdated", + attribute "expires", + element "service" indicating value SERVICE_URN_1, + element "uri" indicating value SIP_URI_1; + , + element "locationUsed" + ; + ; + ; + ; from the ECRF entity + } + then { + the IUT entity forwards a SIP_INVITE containing + Request_URI indicating value SERVICE_URN_1, + Content_Type indicating value "multipart/mixed", + Route_Header indicating value SIP_URI_1 + body containing + SDP_AND_PIDF_MULTIPART + ; + ; to the PSAP entity + } + } +} //End of TP_ESRP_SIP_INVITE_BV_01 + +Test Purpose { +TP Id TP_ESRP_SIP_INVITE_BV_02 +Test objective + "IUT adds Incident-ID and Call-ID INFO headers" +Reference + "Next Generation 112 Long Term Definition http://www.eena.org/uploads/gallery/files/pdf/2013-03-15-eena_ng_longtermdefinitionupdated.pdf Clause 4.3", + "https://tools.ietf.org/html/rfc5222" +//Config Id CFG_ESRP_01 +PICS Selection PICS_SERVICE_ESRP +Initial conditions with { + the IUT entity isConfiguredWith the ECRF + and the PSAP entity isReachableWith the SIP_URI_1 + and the IUT entity receivedInitialInviteRequestAndSentLostQueryToEcrf +} +Expected behaviour + ensure that { + when { + the IUT entity receivesLostResponseFor the SIP_URI_1 from the ECRF entity + } + then { + the IUT entity forwards the SIP_INVITE containing + Request_URI indicating value SERVICE_URN_1, + Content_Type indicating value "multipart/mixed", + Route indicating value SIP_URI_1, + Call_Info containing + uri indicating value valid "Incident Tracking Identifier", + purpose "EES-IncidentId" + ;, + Call_Info containing + uri indicating value valid "Call Identifier", + purpose "EES-CallId" + ;, + body containing + SDP_AND_PIDF_MULTIPART + ; + ; to the PSAP entity + } + } +} //End of TP_ESRP_SIP_INVITE_BV_02 +} diff --git a/test_purposes/LIS_HTTP_GET_BV_xx.tplan2 b/test_purposes/LIS_HTTP_GET_BV_xx.tplan2 new file mode 100644 index 0000000000000000000000000000000000000000..9402dc78713361b5617067de0fa9f86db344e924 --- /dev/null +++ b/test_purposes/LIS_HTTP_GET_BV_xx.tplan2 @@ -0,0 +1,124 @@ +/* ETSI Software License +* As long as the hereunder conditions are respected, non-exclusive permission is hereby granted, +* free of charge, to use, reproduce and modify this software source code, under the following conditions: +* This source code is provided AS IS with no warranties, express or implied, including but not limited to, +* the warranties of merchantability, fitness for a particular purpose and warranties for non-infringement +* of intellectual property rights. +* ETSI shall not be held liable in any event for any direct or indirect damages whatsoever (including, without +* limitation, damages for loss of profits, business interruption, loss of information, or any other pecuniary +* loss) arising out of or related to the use of or inability to use the source code. +* This permission is granted to facilitate the implementation of the related ETSI standard, provided that +* ETSI is given the right to use, reproduce and amend the modified source code under the same conditions +* as the present permission. +* This permission does not apply to any documentation associated with this source code for which ETSI keeps +* all rights reserved. +* The present ETSI Source Code license shall be included in all copies of whole or part of this source code +* and shall not imply any sub-license right. +* (c) ETSI 2018 +*/ + + +Package NG112_LIS { + Domain { + pics: + - PICS_HTTP_POST_REQUEST + - PICS_LOCATION_HELD + ; + entities: + - IUT + - MTC + ; + events: + - receives //for packets coming from the network to the IUT + - sends //for packets sent by the IUT to the network + - havingLocationMappingFor //IUT is provisioned with the relevant location data + - havingReturnedLocationUriFor //[ref lis.txt:havingReturnedLocationUriFor] IUT returned a locationURI for the relevant location data after a HELD request + ; + } + +// Const { +// DEVICE_NUMBER_POINT: "+331234567890"; +// POINT_POS: "43.616891, 7.053179"; // lat: 43.616891, lon: 7.053179 +// DEVICE_NUMBER_CIRCLE: "+331234567891"; +// CIRCLE_POS: "43.617174, 7.052750"; // lat: 43.617174, lon: 7.052750 +// CIRCLE_RADIUS: "15"; +// } + +// Data { +// type PDU; +// } +// Configuration { +// Interface Type defaultGT accepts PDU; +// Component Type NG112Comp with gate g of type defaultGT; +// Test Configuration CFG_ESRP_01 +// containing +// Tester component BCF of type NG112Comp +// Tester component LIS of type NG112Comp +// Tester component ECRF of type NG112Comp +// SUT component IUT of type NG112Comp +// connection between BCF.g and IUT.g +// connection between LIS.g and IUT.g +// connection between ECRF.g and IUT.g; +// } + +Test Purpose { +TP Id TP_LIS_HTTP_GET_BV_01 +Test objective + "IUT successfully returns the location when a locationURI is dereferenced" +Reference + "ETSI TS 103 479 Vm.t.e (yyyy-mm) Clause 5.5 Location Information Server (LIS)", + "Next Generation 112 Long Term Definition http://www.eena.org/uploads/gallery/files/pdf/2013-03-15-eena_ng_longtermdefinitionupdated.pdf Clause 4.10", + "https://tools.ietf.org/html/rfc5985" +//Config Id CFG_LIS_01 +PICS Selection PICS_HTTP_POST_REQUEST PICS_LOCATION_HELD +Initial conditions with { + the IUT entity havingLocationMappingFor the DEVICE_NUMBER_CIRCLE containing + "circle" containing + "position" indicating value CIRCLE_POS, + "radius" indicating value CIRCLE_RADIUS + ; + ; and the IUT entity havingReturnedLocationUriFor the DEVICE_NUMBER_CIRCLE containing + element "locationURI" indicating value LOCATION_URI + ; +} +Expected behaviour + ensure that { + when { + the IUT entity receives a GET containing + Uri indicating value LOCATION_URI + ; + } + then { + the IUT entity sends a httpResponse containing + Status_Code indicating value "200 OK", + version indicating value "1.0", + Content_type indicating value "application/pidf+xml;charset=utf-8", + body containing + xmlMessage containing + version indicating value "1.0", + element "presence" inNamespace "urn:ietf:params:xml:ns:pidf" containing + attribute "entity" indicating value valid "pres:" uri, + element "tuple" containing + attribute "id", + element "status" containing + element "geopriv" inNamespace "urn:ietf:params:xml:ns:pidf:geopriv10" containing + element "location-info" containing + element "Circle" inNamespace "http://www.opengis.net/pidflo/1.0" containing + attribute "srsName" indicating value "urn:ogc:def:crs:EPSG::4326", + element "pos" inNamespace "http://www.opengis.net/gml" indicating value CIRCLE_POS, + element "radius" indicating value CIRCLE_RADIUS containing + attribute "uom" indicating value "urn:ogc:def:uom:EPSG::9001" + ; + ; + ; + ; + ; + ; + ; + ; + ; + ; + } + } +} //End of TP_LIS_HTTP_GET_BV_01 +} diff --git a/test_purposes/LIS_HTTP_POST_BV_xx.tplan2 b/test_purposes/LIS_HTTP_POST_BV_xx.tplan2 new file mode 100644 index 0000000000000000000000000000000000000000..a4d8edfb59cde5b42643eb5202a9d8ef68ec2dfb --- /dev/null +++ b/test_purposes/LIS_HTTP_POST_BV_xx.tplan2 @@ -0,0 +1,462 @@ +/* ETSI Software License +* As long as the hereunder conditions are respected, non-exclusive permission is hereby granted, +* free of charge, to use, reproduce and modify this software source code, under the following conditions: +* This source code is provided AS IS with no warranties, express or implied, including but not limited to, +* the warranties of merchantability, fitness for a particular purpose and warranties for non-infringement +* of intellectual property rights. +* ETSI shall not be held liable in any event for any direct or indirect damages whatsoever (including, without +* limitation, damages for loss of profits, business interruption, loss of information, or any other pecuniary +* loss) arising out of or related to the use of or inability to use the source code. +* This permission is granted to facilitate the implementation of the related ETSI standard, provided that +* ETSI is given the right to use, reproduce and amend the modified source code under the same conditions +* as the present permission. +* This permission does not apply to any documentation associated with this source code for which ETSI keeps +* all rights reserved. +* The present ETSI Source Code license shall be included in all copies of whole or part of this source code +* and shall not imply any sub-license right. +* (c) ETSI 2018 +*/ + + +Package NG112_LIS { + Domain { + pics: + - PICS_HTTP_POST_REQUEST + - PICS_LOCATION_HELD + ; + entities: + - IUT + - MTC + ; + events: + - receives //for packets coming from the network to the IUT + - sends //for packets sent by the IUT to the network + - havingLocationMappingFor //IUT is provisioned with the relevant location data + - havingReturnedLocationUriFor //[ref lis.txt:havingReturnedLocationUriFor] IUT returned a locationURI for the relevant location data after a HELD request + ; + } + +// Const { +// DEVICE_NUMBER_POINT: "+331234567890"; +// POINT_POS: "43.616891, 7.053179"; // lat: 43.616891, lon: 7.053179 +// DEVICE_NUMBER_CIRCLE: "+331234567891"; +// CIRCLE_POS: "43.617174, 7.052750"; // lat: 43.617174, lon: 7.052750 +// CIRCLE_RADIUS: "15"; +// } + +// Data { +// type PDU; +// } +// Configuration { +// Interface Type defaultGT accepts PDU; +// Component Type NG112Comp with gate g of type defaultGT; +// Test Configuration CFG_ESRP_01 +// containing +// Tester component BCF of type NG112Comp +// Tester component LIS of type NG112Comp +// Tester component ECRF of type NG112Comp +// SUT component IUT of type NG112Comp +// connection between BCF.g and IUT.g +// connection between LIS.g and IUT.g +// connection between ECRF.g and IUT.g; +// } + +Test Purpose { +TP Id TP_LIS_HTTP_POST_BV_01 +Test objective + "IUT successfully responds with a Point when it receives a HTTP POST location request without location type" +Reference + "ETSI TS 103 479 Vm.t.e (yyyy-mm) Clause 5.5 Location Information Server (LIS)", + "Next Generation 112 Long Term Definition http://www.eena.org/uploads/gallery/files/pdf/2013-03-15-eena_ng_longtermdefinitionupdated.pdf Clause 4.10", + "https://tools.ietf.org/html/rfc5985" +//Config Id CFG_LIS_01 +PICS Selection PICS_HTTP_POST_REQUEST PICS_LOCATION_HELD +Initial conditions with { + the IUT entity havingLocationMappingFor the DEVICE_NUMBER containing + "point" containing + "position" indicating value POINT_POS + ; + ; +} +Expected behaviour + ensure that { + when { + the IUT entity receives a POST containing + Uri indicating value "/location", + Host, + not Accept, + Content_type indicating value "application/held+xml;charset=utf-8", + body containing + xmlMessage containing + version indicating value "1.0", + element "locationRequest" inNamespace "urn:ietf:params:xml:ns:geopriv:held" containing + element "device" inNamespace "urn:ietf:params:xml:ns:geopriv:held:id" containing + element "uri" inNamespace "urn:ietf:params:xml:ns:geopriv:held:id" indicating value DEVICE_NUMBER + ; + ; + ; + ; + ; + } + then { + the IUT entity sends a httpResponse containing + Status_Code indicating value "200 OK", + version indicating value "1.0", + Content_type indicating value "application/held+xml;charset=utf-8", + body containing + xmlMessage containing + version indicating value "1.0", + element "locationResponse" inNamespace "urn:ietf:params:xml:ns:geopriv:held" containing + element "presence" inNamespace "urn:ietf:params:xml:ns:pidf" containing + attribute "entity" indicating value valid "pres:" uri, + element "tuple" containing + attribute "id", + element "status" containing + element "geopriv" inNamespace "urn:ietf:params:xml:ns:pidf:geopriv10" containing + element "location-info" containing + element "Point" inNamespace "http://www.opengis.net/gml" containing + attribute "srsName" indicating value "urn:ogc:def:crs:EPSG::4326", + element "pos" indicating value POINT_POS + ; + ; + ; + ; + ; + ; + ; + ; + ; + ; + } + } +} //End of TP_LIS_HTTP_POST_BV_01 + +Test Purpose { +TP Id TP_LIS_HTTP_POST_BV_02 +Test objective + "IUT successfully responds with a Circle when it receives a HTTP POST location request without location type" +Reference + "ETSI TS 103 479 Vm.t.e (yyyy-mm) Clause 5.5 Location Information Server (LIS)", + "Next Generation 112 Long Term Definition http://www.eena.org/uploads/gallery/files/pdf/2013-03-15-eena_ng_longtermdefinitionupdated.pdf Clause 4.10", + "https://tools.ietf.org/html/rfc5985" +//Config Id CFG_LIS_01 +PICS Selection PICS_HTTP_POST_REQUEST PICS_LOCATION_HELD +Initial conditions with { + the IUT entity havingLocationMappingFor the DEVICE_NUMBER_CIRCLE containing + "circle" containing + "position" indicating value CIRCLE_POS, + "radius" indicating value CIRCLE_RADIUS + ; + ; +} +Expected behaviour + ensure that { + when { + the IUT entity receives a POST containing + Uri indicating value "/location", + Host, + not Accept, + Content_type indicating value "application/held+xml;charset=utf-8", + body containing + xmlMessage containing + version indicating value "1.0", + element "locationRequest" inNamespace "urn:ietf:params:xml:ns:geopriv:held" containing + element "device" inNamespace "urn:ietf:params:xml:ns:geopriv:held:id" containing + element "uri" inNamespace "urn:ietf:params:xml:ns:geopriv:held:id" indicating value DEVICE_NUMBER + ; + ; + ; + ; + ; + } + then { + the IUT entity sends a httpResponse containing + Status_Code indicating value "200 OK", + version indicating value "1.0", + Content_type indicating value "application/held+xml;charset=utf-8", + body containing + xmlMessage containing + version indicating value "1.0", + element "locationResponse" inNamespace "urn:ietf:params:xml:ns:geopriv:held" containing + element "presence" inNamespace "urn:ietf:params:xml:ns:pidf" containing + attribute "entity" indicating value valid "pres:" uri, + element "tuple" containing + attribute "id", + element "status" containing + element "geopriv" inNamespace "urn:ietf:params:xml:ns:pidf:geopriv10" containing + element "location-info" containing + element "Circle" inNamespace "http://www.opengis.net/pidflo/1.0" containing + attribute "srsName" indicating value "urn:ogc:def:crs:EPSG::4326", + element "pos" inNamespace "http://www.opengis.net/gml" indicating value CIRCLE_POS, + element "radius" indicating value CIRCLE_RADIUS containing + attribute "uom" indicating value "urn:ogc:def:uom:EPSG::9001" + ; + ; + ; + ; + ; + ; + ; + ; + ; + ; + ; + } + } +} //End of TP_LIS_HTTP_POST_BV_02 + +Test Purpose { +TP Id TP_LIS_HTTP_POST_BV_03 +Test objective + "IUT successfully responds with a reference when it receives a HTTP POST location request with location type locationURI and exact attribute" +Reference + "ETSI TS 103 479 Vm.t.e (yyyy-mm) Clause 5.5 Location Information Server (LIS)", + "Next Generation 112 Long Term Definition http://www.eena.org/uploads/gallery/files/pdf/2013-03-15-eena_ng_longtermdefinitionupdated.pdf Clause 4.10", + "https://tools.ietf.org/html/rfc5985" +//Config Id CFG_LIS_01 +PICS Selection PICS_HTTP_POST_REQUEST PICS_LOCATION_HELD +Initial conditions with { + the IUT entity havingLocationMappingFor the DEVICE_NUMBER_CIRCLE containing + "circle" containing + "position" indicating value CIRCLE_POS, + "radius" indicating value CIRCLE_RADIUS + ; + ; +} +Expected behaviour + ensure that { + when { + the IUT entity receives a POST containing + Uri indicating value "/location", + Host, + not Accept, + Content_type indicating value "application/held+xml;charset=utf-8", + body containing + xmlMessage containing + version indicating value "1.0", + element "locationRequest" inNamespace "urn:ietf:params:xml:ns:geopriv:held" containing + element "locationType" indicating value "locationURI" containing + attribute "exact" indicating value "true" + ;, + element "device" inNamespace "urn:ietf:params:xml:ns:geopriv:held:id" containing + element "uri" inNamespace "urn:ietf:params:xml:ns:geopriv:held:id" indicating value DEVICE_NUMBER + ; + ; + ; + ; + ; + } + then { + the IUT entity sends a httpResponse containing + Status_Code indicating value "200 OK", + version indicating value "1.0", + Content_type indicating value "application/held+xml;charset=utf-8", + body containing + xmlMessage containing + version indicating value "1.0", + element "locationResponse" inNamespace "urn:ietf:params:xml:ns:geopriv:held" containing + element "locationUriSet" containing + attribute "expires", + element "locationURI" indicating value valid urn + ; + ; + ; + ; + ; + } + } +} //End of TP_LIS_HTTP_POST_BV_03 + +Test Purpose { +TP Id TP_LIS_HTTP_POST_BV_04 +Test objective + "IUT successfully responds with a reference and geodetic location when it receives a HTTP POST location request with location types locationURI and geodetic and exact attribute" +Reference + "ETSI TS 103 479 Vm.t.e (yyyy-mm) Clause 5.5 Location Information Server (LIS)", + "Next Generation 112 Long Term Definition http://www.eena.org/uploads/gallery/files/pdf/2013-03-15-eena_ng_longtermdefinitionupdated.pdf Clause 4.10", + "https://tools.ietf.org/html/rfc5985" +//Config Id CFG_LIS_01 +PICS Selection PICS_HTTP_POST_REQUEST PICS_LOCATION_HELD +Initial conditions with { + the IUT entity havingLocationMappingFor the DEVICE_NUMBER_CIRCLE containing + "circle" containing + "position" indicating value CIRCLE_POS, + "radius" indicating value CIRCLE_RADIUS + ; + ; +} +Expected behaviour + ensure that { + when { + the IUT entity receives a POST containing + Uri indicating value "/location", + Host, + not Accept, + Content_type indicating value "application/held+xml;charset=utf-8", + body containing + xmlMessage containing + version indicating value "1.0", + element "locationRequest" inNamespace "urn:ietf:params:xml:ns:geopriv:held" containing + element "locationType" indicating value "locationURI geodetic" containing + attribute "exact" indicating value "true" + ;, + element "device" inNamespace "urn:ietf:params:xml:ns:geopriv:held:id" containing + element "uri" inNamespace "urn:ietf:params:xml:ns:geopriv:held:id" indicating value DEVICE_NUMBER + ; + ; + ; + ; + ; + } + then { + the IUT entity sends a httpResponse containing + Status_Code indicating value "200 OK", + version indicating value "1.0", + Content_type indicating value "application/held+xml;charset=utf-8", + body containing + xmlMessage containing + version indicating value "1.0", + element "locationResponse" inNamespace "urn:ietf:params:xml:ns:geopriv:held" containing + element "locationUriSet" containing + attribute "expires", + element "locationURI" indicating value valid urn + ; + ;, + element "presence" inNamespace "urn:ietf:params:xml:ns:pidf" containing + attribute "entity" indicating value valid "pres:" uri, + element "tuple" containing + attribute "id", + element "status" containing + element "geopriv" inNamespace "urn:ietf:params:xml:ns:pidf:geopriv10" containing + element "location-info" containing + element "Circle" inNamespace "http://www.opengis.net/pidflo/1.0" containing + attribute "srsName" indicating value "urn:ogc:def:crs:EPSG::4326", + element "pos" inNamespace "http://www.opengis.net/gml" indicating value CIRCLE_POS, + element "radius" indicating value CIRCLE_RADIUS containing + attribute "uom" indicating value "urn:ogc:def:uom:EPSG::9001" + ; + ; + ; + ; + ; + ; + ; + ; + ; + ; + } + } +} //End of TP_LIS_HTTP_POST_BV_04 + +Test Purpose { +TP Id TP_LIS_HTTP_POST_BV_05 +Test objective + "IUT successfully responds with an error response when it receives a HTTP POST location request for an unknown device" +Reference + "ETSI TS 103 479 Vm.t.e (yyyy-mm) Clause 5.5 Location Information Server (LIS)", + "Next Generation 112 Long Term Definition http://www.eena.org/uploads/gallery/files/pdf/2013-03-15-eena_ng_longtermdefinitionupdated.pdf Clause 4.10", + "https://tools.ietf.org/html/rfc5985" +//Config Id CFG_LIS_01 +PICS Selection PICS_HTTP_POST_REQUEST PICS_LOCATION_HELD +Initial conditions with { + the IUT entity not havingLocationMappingFor the DEVICE_NUMBER +} +Expected behaviour + ensure that { + when { + the IUT entity receives a POST containing + Uri indicating value "/location", + Host, + not Accept, + Content_type indicating value "application/held+xml;charset=utf-8", + body containing + xmlMessage containing + version indicating value "1.0", + element "locationRequest" inNamespace "urn:ietf:params:xml:ns:geopriv:held" containing + element "device" inNamespace "urn:ietf:params:xml:ns:geopriv:held:id" containing + element "uri" inNamespace "urn:ietf:params:xml:ns:geopriv:held:id" indicating value DEVICE_NUMBER + ; + ; + ; + ; + ; + } + then { + the IUT entity sends a httpResponse containing + Status_Code indicating value "200 OK", + version indicating value "1.0", + Content_type indicating value "application/held+xml;charset=utf-8", + body containing + xmlMessage containing + version indicating value "1.0", + element "error" inNamespace "urn:ietf:params:xml:ns:geopriv:held" containing + attribute "code" indicating value "locationUnknown" + ; + ; + ; + ; + } + } +} //End of TP_LIS_HTTP_POST_BV_05 + +Test Purpose { +TP Id TP_LIS_HTTP_GET_BV_01 +Test objective + "IUT successfully returns the location when a locationURI is dereferenced" +Reference + "ETSI TS 103 479 Vm.t.e (yyyy-mm) Clause 5.5 Location Information Server (LIS)", + "Next Generation 112 Long Term Definition http://www.eena.org/uploads/gallery/files/pdf/2013-03-15-eena_ng_longtermdefinitionupdated.pdf Clause 4.10", + "https://tools.ietf.org/html/rfc5985" +//Config Id CFG_LIS_01 +PICS Selection PICS_HTTP_POST_REQUEST PICS_LOCATION_HELD +Initial conditions with { + the IUT entity havingLocationMappingFor the DEVICE_NUMBER_CIRCLE containing + "circle" containing + "position" indicating value CIRCLE_POS, + "radius" indicating value CIRCLE_RADIUS + ; + ; and the IUT entity havingReturnedLocationUriFor the DEVICE_NUMBER_CIRCLE containing + element "locationURI" indicating value LOCATION_URI + ; +} +Expected behaviour + ensure that { + when { + the IUT entity receives a GET containing + Uri indicating value LOCATION_URI + ; + } + then { + the IUT entity sends a httpResponse containing + Status_Code indicating value "200 OK", + version indicating value "1.0", + Content_type indicating value "application/pidf+xml;charset=utf-8", + body containing + xmlMessage containing + version indicating value "1.0", + element "presence" inNamespace "urn:ietf:params:xml:ns:pidf" containing + attribute "entity" indicating value valid "pres:" uri, + element "tuple" containing + attribute "id", + element "status" containing + element "geopriv" inNamespace "urn:ietf:params:xml:ns:pidf:geopriv10" containing + element "location-info" containing + element "Circle" inNamespace "http://www.opengis.net/pidflo/1.0" containing + attribute "srsName" indicating value "urn:ogc:def:crs:EPSG::4326", + element "pos" inNamespace "http://www.opengis.net/gml" indicating value CIRCLE_POS, + element "radius" indicating value CIRCLE_RADIUS containing + attribute "uom" indicating value "urn:ogc:def:uom:EPSG::9001" + ; + ; + ; + ; + ; + ; + ; + ; + ; + ; + } + } +} //End of TP_LIS_HTTP_GET_BV_01 +} diff --git a/test_purposes/PSAP_SIP_BV_xx.tplan2 b/test_purposes/PSAP_SIP_BV_xx.tplan2 new file mode 100644 index 0000000000000000000000000000000000000000..1cbc2e166a1245756cff6d63f8d4fd109bde82b4 --- /dev/null +++ b/test_purposes/PSAP_SIP_BV_xx.tplan2 @@ -0,0 +1,118 @@ +/* ETSI Software License +* As long as the hereunder conditions are respected, non-exclusive permission is hereby granted, +* free of charge, to use, reproduce and modify this software source code, under the following conditions: +* This source code is provided AS IS with no warranties, express or implied, including but not limited to, +* the warranties of merchantability, fitness for a particular purpose and warranties for non-infringement +* of intellectual property rights. +* ETSI shall not be held liable in any event for any direct or indirect damages whatsoever (including, without +* limitation, damages for loss of profits, business interruption, loss of information, or any other pecuniary +* loss) arising out of or related to the use of or inability to use the source code. +* This permission is granted to facilitate the implementation of the related ETSI standard, provided that +* ETSI is given the right to use, reproduce and amend the modified source code under the same conditions +* as the present permission. +* This permission does not apply to any documentation associated with this source code for which ETSI keeps +* all rights reserved. +* The present ETSI Source Code license shall be included in all copies of whole or part of this source code +* and shall not imply any sub-license right. +* (c) ETSI 2018 +*/ + + +Package NG112_PSAP { + Domain { + pics: + - PICS_SERVICE_PSAP + ; + entities: + - IUT + - MTC + ; + events: + - acceptingIncomingCalls //PSAP ready to receive incoming calls + - receives //for packets coming from the network to the IUT + - sends //for packets sent by the IUT to the network + - establishesIncomingCall //[ref psap.txt:establishesIncomingCall] the incoming call is established + ; + } + +// Const { +// SDP: [ref psap.txt:SDP]; +// SDP_AND_PIDF_MULTIPART [ref psap.txt:SDP_AND_PIDF_MULTIPART]; +// } + + +// Data { +// type PDU; +// } +// Configuration { +// Interface Type defaultGT accepts PDU; +// Component Type NG112Comp with gate g of type defaultGT; +// Test Configuration CFG_ESRP_01 +// containing +// Tester component BCF of type NG112Comp +// Tester component LIS of type NG112Comp +// Tester component ECRF of type NG112Comp +// SUT component IUT of type NG112Comp +// connection between BCF.g and IUT.g +// connection between LIS.g and IUT.g +// connection between ECRF.g and IUT.g; +// } + +Test Purpose { +TP Id TP_PSAP_SIP_INVITE_BV_01 +Test objective + "IUT successfully handles SIP INVITE with service urn" +Reference + "Next Generation 112 Long Term Definition http://www.eena.org/uploads/gallery/files/pdf/2013-03-15-eena_ng_longtermdefinitionupdated.pdf Clause 4.7", + "https://tools.ietf.org/html/rfc5031" +//Config Id CFG_PSAP_01 +PICS Selection PICS_SERVICE_PSAP +Initial conditions with { + the IUT entity acceptingIncomingCalls +} +Expected behaviour + ensure that { + when { + the IUT entity receives a SIP_INVITE containing + Request_URI indicating value "urn:service:sos.police", + Content_Type indicating value "application/sdp", + body containing + SDP + ; + ; + } + then { + the IUT entity establishesIncomingCall + } + } +} //End of TP_PSAP_SIP_INVITE_BV_01 + +Test Purpose { +TP Id TP_PSAP_SIP_INVITE_BV_02 +Test objective + "IUT successfully handles SIP INVITE with SDP and PIDF-LO content" +Reference + "Next Generation 112 Long Term Definition http://www.eena.org/uploads/gallery/files/pdf/2013-03-15-eena_ng_longtermdefinitionupdated.pdf Clause 4.7", + "https://tools.ietf.org/html/rfc5031" +//Config Id CFG_PSAP_01 +PICS Selection PICS_SERVICE_PSAP +Initial conditions with { + the IUT entity acceptingIncomingCalls +} +Expected behaviour + ensure that { + when { + the IUT entity receives a SIP_INVITE containing + Request_URI indicating value "urn:service:sos.police", + Content_Type indicating value "multipart/mixed", + body containing + SDP_AND_PIDF_MULTIPART + ; + ; + } + then { + the IUT entity establishesIncomingCall + } + } +} //End of TP_PSAP_SIP_INVITE_BV_02 +} diff --git a/test_purposes/example.tplan2 b/test_purposes/example.tplan2 deleted file mode 100644 index dd027db0ffec1f347f144a00692dc3534181b00e..0000000000000000000000000000000000000000 --- a/test_purposes/example.tplan2 +++ /dev/null @@ -1,105 +0,0 @@ -/* ETSI Software License -* As long as the hereunder conditions are respected, non-exclusive permission is hereby granted, -* free of charge, to use, reproduce and modify this software source code, under the following conditions: -* This source code is provided “AS IS” with no warranties, express or implied, including but not limited to, -* the warranties of merchantability, fitness for a particular purpose and warranties for non-infringement -* of intellectual property rights. -* ETSI shall not be held liable in any event for any direct or indirect damages whatsoever (including, without -* limitation, damages for loss of profits, business interruption, loss of information, or any other pecuniary -* loss) arising out of or related to the use of or inability to use the source code. -* This permission is granted to facilitate the implementation of the related ETSI standard, provided that -* ETSI is given the right to use, reproduce and amend the modified source code under the same conditions -* as the present permission. -* This permission does not apply to any documentation associated with this source code for which ETSI keeps -* all rights reserved. -* The present ETSI Source Code license shall be included in all copies of whole or part of this source code -* and shall not imply any sub-license right. -* (c) ETSI 2018 -*/ - - -Package NG112_LIS { - - - - Domain { - pics: - - PICS_HTTP_POST_REQUEST - - PICS_LOCATION_HELD; - entities: - - IUT - - MTC; - events: - - receives //for packets coming from the network to the IUT - - sends //for packets sent by the IUT to the network - - havingLocationMappingFor //IUT is provisioned with the relevant location data - - isRequestedToSend //an upper layer requests the IUT to send a packet - - generates //for internal event generation - ; - } - - -// Data { -// type PDU; -// } -// Configuration { -// Interface Type defaultGT accepts PDU; -// Component Type NG112Comp with gate g of type defaultGT; -// Test Configuration CFG_ESRP_01 -// containing -// Tester component BCF of type NG112Comp -// Tester component LIS of type NG112Comp -// Tester component ECRF of type NG112Comp -// SUT component IUT of type NG112Comp -// connection between BCF.g and IUT.g -// connection between LIS.g and IUT.g -// connection between ECRF.g and IUT.g; -// } - - - Test Purpose { - TP Id TP_LIS_HTTP_POST_BV_01 - - Test objective - "IUT successfully processes all mandatory HTTP headers when it receives a HTTP POST request" - Reference - "ETSI TS 103 479 Vm.t.e (yyyy-mm) Clause 5.5 Location Information Server (LIS)", - "https://tools.ietf.org/html/rfc5985" - //Config Id CFG_LIS_01 - PICS Selection PICS_HTTP_POST_REQUEST PICS_LOCATION_HELD - Initial conditions with { - the IUT entity havingLocationMappingFor the "identifier" - } - Expected behaviour - ensure that { - when { - the IUT entity receives a POST containing - Uri indicating value "location", - Host, - "not" Accept, - Content_type indicating value "application/held+xml", - body containing - xmlMessage containing - version indicating value "1.0", - presence containing - uri indicating value "urn:ietf:params:xml:ns:held"; - ; - ; - ; - } - then { - the IUT entity sends a httpResponse containing - Status_Code indicating value "200 OK", - body containing - xmlMessage containing - version indicating value "1.0", - locationRequest containing - Uri indicating value "urn:ietf:params:xml:ns:geopriv:held"; - ; - ; - ; - } - } - } - -} \ No newline at end of file diff --git a/test_purposes/lis.tplan2 b/test_purposes/lis.tplan2 deleted file mode 100644 index 82e3b3d6c40c5a76f7181884204d45286129b95f..0000000000000000000000000000000000000000 --- a/test_purposes/lis.tplan2 +++ /dev/null @@ -1,131 +0,0 @@ -/* ETSI Software License -* As long as the hereunder conditions are respected, non-exclusive permission is hereby granted, -* free of charge, to use, reproduce and modify this software source code, under the following conditions: -* This source code is provided �AS IS� with no warranties, express or implied, including but not limited to, -* the warranties of merchantability, fitness for a particular purpose and warranties for non-infringement -* of intellectual property rights. -* ETSI shall not be held liable in any event for any direct or indirect damages whatsoever (including, without -* limitation, damages for loss of profits, business interruption, loss of information, or any other pecuniary -* loss) arising out of or related to the use of or inability to use the source code. -* This permission is granted to facilitate the implementation of the related ETSI standard, provided that -* ETSI is given the right to use, reproduce and amend the modified source code under the same conditions -* as the present permission. -* This permission does not apply to any documentation associated with this source code for which ETSI keeps -* all rights reserved. -* The present ETSI Source Code license shall be included in all copies of whole or part of this source code -* and shall not imply any sub-license right. -* (c) ETSI 2018 -*/ - - -Package NG112_LIS { - Domain { - pics: - - PICS_HTTP_POST_REQUEST - - PICS_LOCATION_HELD - ; - entities: - - IUT - - MTC - ; - events: - - receives //for packets coming from the network to the IUT - - sends //for packets sent by the IUT to the network - - havingLocationMappingFor //IUT is provisioned with the relevant location data - - isRequestedToSend //an upper layer requests the IUT to send a packet - - generates //for internal event generation - ; - } - -// Const { -// POS1: "-34.407 150.88001"; -// } - -// Data { -// type PDU; -// } -// Configuration { -// Interface Type defaultGT accepts PDU; -// Component Type NG112Comp with gate g of type defaultGT; -// Test Configuration CFG_ESRP_01 -// containing -// Tester component BCF of type NG112Comp -// Tester component LIS of type NG112Comp -// Tester component ECRF of type NG112Comp -// SUT component IUT of type NG112Comp -// connection between BCF.g and IUT.g -// connection between LIS.g and IUT.g -// connection between ECRF.g and IUT.g; -// } - - Test Purpose { - TP Id TP_LIS_HTTP_POST_BV_01 - - Test objective - "IUT successfully processes all mandatory HTTP headers when it receives a HTTP POST request" - Reference - "ETSI TS 103 479 Vm.t.e (yyyy-mm) Clause 5.5 Location Information Server (LIS)", - "Next Generation 112 Long Term Definition http://www.eena.org/uploads/gallery/files/pdf/2013-03-15-eena_ng_longtermdefinitionupdated.pdf Clause 4.10", - "https://tools.ietf.org/html/rfc5985" - - //Config Id CFG_LIS_01 - - PICS Selection PICS_HTTP_POST_REQUEST PICS_LOCATION_HELD - Initial conditions with { - the IUT entity havingLocationMappingFor the "deviceNumber" containing - "point" indicating value POS1 - ; - } - Expected behaviour - ensure that { - when { - the IUT entity receives a POST containing - Uri indicating value "/location", - Host, - not Accept, - Content_type indicating value "application/held+xml;charset=utf-8", - body containing - xmlMessage containing - version indicating value "1.0", - element "locationRequest" inNamespace "urn:ietf:params:xml:ns:geopriv:held" containing - element "device" inNamespace "urn:ietf:params:xml:ns:geopriv:held:id" containing - element "uri" inNamespace "urn:ietf:params:xml:ns:geopriv:held:id" indicating value "deviceNumber" - ; - ; - ; - ; - ; - } - then { - the IUT entity sends a httpResponse containing - Status_Code indicating value "200 OK", - version indicating value "1.0", - Content_type indicating value "application/held+xml;charset=utf-8", - body containing - xmlMessage containing - version indicating value "1.0", - element "locationResponse" inNamespace "urn:ietf:params:xml:ns:geopriv:held" containing - element "presence" inNamespace "urn:ietf:params:xml:ns:pidf" containing - attribute "entity" indicating value valid "pres:" uri, - element "tuple" containing - attribute "id", - element "status" containing - element "geopriv" inNamespace "urn:ietf:params:xml:ns:pidf:geopriv10" containing - element "location-info" containing - element "Point" inNamespace "http://www.opengis.net/gml" containing - attribute "srsName" indicating value "urn:ogc:def:crs:EPSG::4326", - element "pos" indicating value POS1 - ; - ; - ; - ; - ; - ; - ; - ; - ; - ; - } - } - } -} \ No newline at end of file diff --git a/testdata/SIP_ACK_Request.pcap b/testdata/SIP_ACK_Request.pcap new file mode 100644 index 0000000000000000000000000000000000000000..4a6da5ab0d6f94a9fd62dcc66f43c3dd56db52c6 Binary files /dev/null and b/testdata/SIP_ACK_Request.pcap differ diff --git a/testdata/SIP_BYE_Request.pcap b/testdata/SIP_BYE_Request.pcap new file mode 100644 index 0000000000000000000000000000000000000000..4d00d33f1339edb76177371d22a141fc62d80e1a Binary files /dev/null and b/testdata/SIP_BYE_Request.pcap differ diff --git a/testdata/SIP_INVITE_Request.pcap b/testdata/SIP_INVITE_Request.pcap new file mode 100644 index 0000000000000000000000000000000000000000..5f1421f74244242120a7de05922e1c406c3b86b4 Binary files /dev/null and b/testdata/SIP_INVITE_Request.pcap differ diff --git a/testdata/SIP_INVITE_Request_sdp.pcap b/testdata/SIP_INVITE_Request_sdp.pcap new file mode 100644 index 0000000000000000000000000000000000000000..1466cbd2a19de37a96e14995bc9f96180c0c26ea Binary files /dev/null and b/testdata/SIP_INVITE_Request_sdp.pcap differ diff --git a/testdata/SIP_MESSAGE_Request.pcap b/testdata/SIP_MESSAGE_Request.pcap new file mode 100644 index 0000000000000000000000000000000000000000..071f60b963d95b598d0038283523c5d90754f41a Binary files /dev/null and b/testdata/SIP_MESSAGE_Request.pcap differ diff --git a/testdata/SIP_REGISTER_Request.pcap b/testdata/SIP_REGISTER_Request.pcap new file mode 100644 index 0000000000000000000000000000000000000000..8204be0acfbe3ae4c24a636c37e92599870ff604 Binary files /dev/null and b/testdata/SIP_REGISTER_Request.pcap differ diff --git a/testdata/SIP_STATUS_100trying.pcap b/testdata/SIP_STATUS_100trying.pcap new file mode 100644 index 0000000000000000000000000000000000000000..ee90beb19801f31f2bf8b5fcf1d4d68fa1b104a3 Binary files /dev/null and b/testdata/SIP_STATUS_100trying.pcap differ diff --git a/testdata/SIP_STATUS_200ok.pcap b/testdata/SIP_STATUS_200ok.pcap new file mode 100644 index 0000000000000000000000000000000000000000..fa03b13c7676d6bb381edfa5e6d2a2748d58734d Binary files /dev/null and b/testdata/SIP_STATUS_200ok.pcap differ diff --git a/ttcn/AtsNg112/AtsNg112_TestCases.ttcn b/ttcn/AtsNg112/AtsNg112_TestCases.ttcn index f2ba7d81d78da4ebd0e8362a40033a681c8d6f55..9cdcfe068b876966baa0b42f75867d4eab611110 100644 --- a/ttcn/AtsNg112/AtsNg112_TestCases.ttcn +++ b/ttcn/AtsNg112/AtsNg112_TestCases.ttcn @@ -10,23 +10,972 @@ * @see ETSI TS 103 478 */ module AtsNg112_TestCases { + + // RFC5985 Held + import from urn_ietf_params_xml_ns_geopriv_held language "XSD" all + with { + extension "File:../xsd/RFC5985_held.xsd"; + } + // RFC6155 Held ID + import from urn_ietf_params_xml_ns_geopriv_held_id language "XSD" all + with { + extension "File:../xsd/RFC6155_held_id.xsd"; + } + import from urn_ietf_params_xml_ns_pidf_geopriv10 language "XSD" all + with { + extension "File:../xsd/RFC4119_geopriv10.xsd"; + } + import from urn_ietf_params_xml_ns_pidf_geopriv10_basicPolicy language "XSD" all + with { + extension "File:../xsd/RFC4119_geopriv10_basic_policy.xsd"; + } + import from urn_ietf_params_xml_ns_pidf_geopriv10_civicLoc language "XSD" all + with { + extension "File:../xsd/RFC4119_geopriv10_civicloc.xsd"; + } + + // RFC3863 + import from urn_ietf_params_xml_ns_pidf language "XSD" all + with { + extension "File:../xsd/RFC3863_pidf.xsd"; + } + + // RFC5222 + import from urn_ietf_params_xml_ns_lost1 language "XSD" all + with { + extension "File:../xsd/RFC5222_lost.xsd"; + } + + // OpenGIS + import from http_www_opengis_net_pidflo_1_0 language "XSD" all + with { + extension "File:../xsd/GLM_pidf_lo_shape.xsd"; + } + import from http_www_opengis_net_gml language "XSD" all + with { + extension "File:../xsd/gmlBase.xsd"; + extension "File:../xsd/basicTypes.xsd"; + extension "File:../xsd/measures.xsd"; + extension "File:../xsd/geometryPrimitives.xsd"; + extension "File:../xsd/geometryBasic0d1d.xsd"; + extension "File:../xsd/geometryBasic2d.xsd"; + } + + // Libcommon + import from LibCommon_Time all; + import from LibCommon_VerdictControl all; + import from LibCommon_Sync all; + + // LibHttp + import from LibItsHttp_TypesAndValues all; + import from LibItsHttp_XmlMessageBodyTypes all; + import from LibItsHttp_Functions all; + import from LibItsHttp_Templates all; + import from LibItsHttp_XmlTemplates all; + import from LibItsHttp_TestSystem all; + + // LibSip + import from LibSip_Interface all; + + // LibNg112 + import from LibNg112_TypesAndValues all; + import from LibNg112_Templates all; + import from LibNg112_Functions all; + import from LibNg112_TestSystem all; + import from LibNg112_Pics all; + import from LibNg112_Pixits all; + + group lis_role { - // LibCommon + /** + * @desc "IUT successfully responds with a Point when it receives a HTTP POST location request without location type" + * @reference + * "ETSI TS 103 479 Vm.t.e (yyyy-mm) Clause 5.5 Location Information Server (LIS)", + * "Next Generation 112 Long Term Definition http://www.eena.org/uploads/gallery/files/pdf/2013-03-15-eena_ng_longtermdefinitionupdated.pdf Clause 4.10", + * "https://tools.ietf.org/html/rfc5985" + * @remark PICS Selection PICS_HTTP_POST_REQUEST PICS_LOCATION_HELD + *
+     * Initial conditions with {
+     *   the IUT entity havingLocationMappingFor the DEVICE_NUMBER containing
+     *     "point" containing
+     *       "position" indicating value POINT_POS
+     *     ;
+     *   ;
+     * }
+     * 
+ */ + testcase TC_LIS_HTTP_POST_BV_01() runs on HttpComponent system TestAdapter { + // Local variables + var HeaderLines v_headers; + var HttpMessage v_response; + + + + // Test control + if (not(PICS_LIS_IUT) or (not PICS_HTTP_POST_REQUEST) or (not PICS_LOCATION_HELD)) { + log("*** " & testcasename() & ": PICS_LIS_IUT and PICS_HTTP_POST_REQUEST and PICS_LOCATION_HELD required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(v_headers); + f_remove_headears_list({ c_header_accept }, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_LIS_URI, + v_headers, + m_http_message_body_xml(m_body_xml_location_request( + m_locationRequest( + { encvalue_unichar(valueof(m_device({ PX_DEVICE_URI_TEL }))) } + ) + ) + ) + ) + ) + ); + f_selfOrClientSyncAndVerdictTestBody(c_prDone, e_success); + + // Test body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_xml( + mw_body_xml_location_response( + mw_locationResponse(-, ?) + ))))) -> value v_response { + var Presence v_presence; + var Tuple v_tuple; + var Geopriv v_geopriv; + var PointProperty v_point; + var universal charstring v_temp; + var integer v_result; + + tc_ac.stop; + + // Extract presence element from Location-Response + v_temp := v_response.response.body.xml_body.locationResponse.elem_list[0]; + v_result := decvalue_unichar(v_temp, v_presence); + if (v_result == 0) { + log(match(v_presence, mw_presence)); // FIXME Required by TITAN to get details in case of mismatch + if (match(v_presence, mw_presence)) { + // Extract first Tuple element from Presence + v_tuple := v_presence.tuple_list[0]; + v_temp := v_tuple.status.elem_list[0]; + // Extract Geopriv element from Tuple + v_result := decvalue_unichar(v_temp, v_geopriv); + if (v_result == 0) { + log(match(v_geopriv, mw_geopriv(mw_location_info({ ? })))); // FIXME Required by TITAN to get details in case of mismatch + if (match(v_geopriv, mw_geopriv(mw_location_info({ ? })))) { + // Extract Circle element from Tuple + v_temp := v_geopriv.location_info.elem_list[0]; + v_result := decvalue_unichar(v_temp, v_point); + log(match(v_point, mw_point(PX_DEVICE_NUMBER_POINT))); // FIXME Required by TITAN to get details in case of mismatch + if (match(v_point, mw_point(PX_DEVICE_NUMBER_POINT))) { + log("*** " & testcasename() & ": PASS: IUT successfully responds with a Point ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } else { + log("*** " & testcasename() & ": FAIL: Incorrect Circle position ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + } else { + log("*** " & testcasename() & ": FAIL: Unexpected response ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + } else { + log("*** " & testcasename() & ": FAIL: Unexpected response ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + } else { + log("*** " & testcasename() & ": FAIL: Unexpected response ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + } else { + log("*** " & testcasename() & ": FAIL: Unexpected response ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_LIS_HTTP_POST_BV_01 - // LibSip - import from LibSip_Interface all; + /** + * @desc IUT successfully responds with a Circle when it receives a HTTP POST location request without location type + * @reference + * ETSI TS 103 479 Vm.t.e (yyyy-mm) Clause 5.5 Location Information Server (LIS) + * Next Generation 112 Long Term Definition http://www.eena.org/uploads/gallery/files/pdf/2013-03-15-eena_ng_longtermdefinitionupdated.pdf Clause 4.10 + * https://tools.ietf.org/html/rfc5985 + * @remark PICS Selection PICS_HTTP_POST_REQUEST PICS_LOCATION_HELD + *
+     * Initial conditions with {
+     *   the IUT entity havingLocationMappingFor the DEVICE_NUMBER containing
+     *     "circle" containing
+     *       "position" indicating value CIRCLE_POS,
+     *       "radius"    indicating value CIRCLE_RADIUS
+     *     ;
+     *   ;
+     * }
+     * 
+ */ + testcase TC_LIS_HTTP_POST_BV_02() runs on HttpComponent system TestAdapter { + // Local variables + var HeaderLines v_headers; + var HttpMessage v_response; + + // Test control + if (not(PICS_LIS_IUT) or (not PICS_HTTP_POST_REQUEST) or (not PICS_LOCATION_HELD)) { + log("*** " & testcasename() & ": PICS_LIS_IUT and PICS_HTTP_POST_REQUEST and PICS_LOCATION_HELD required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(v_headers); + f_remove_headears_list({ c_header_accept }, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_LIS_URI, + v_headers, + m_http_message_body_xml(m_body_xml_location_request( + m_locationRequest( + { encvalue_unichar(valueof(m_device({ PX_DEVICE_URI_TEL }))) } + ) + ) + ) + ) + ) + ); + f_selfOrClientSyncAndVerdictTestBody(c_prDone, e_success); + + // Test body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_xml( + mw_body_xml_location_response( + mw_locationResponse(-, ?) + ))))) -> value v_response { + var Presence v_presence; + var Tuple v_tuple; + var Geopriv v_geopriv; + var Circle v_circle; + var universal charstring v_temp; + var integer v_result; + + tc_ac.stop; + + // Extract presence element from Location-Response + v_temp := v_response.response.body.xml_body.locationResponse.elem_list[0]; + v_result := decvalue_unichar(v_temp, v_presence); + if (v_result == 0) { + log(match(v_presence, mw_presence)); // FIXME Required by TITAN to get details in case of mismatch + if (match(v_presence, mw_presence)) { + // Extract first Tuple element from Presence + v_tuple := v_presence.tuple_list[0]; + v_temp := v_tuple.status.elem_list[0]; + // Extract Geopriv element from Tuple + v_result := decvalue_unichar(v_temp, v_geopriv); + if (v_result == 0) { + log(match(v_geopriv, mw_geopriv(mw_location_info({ ? })))); // FIXME Required by TITAN to get details in case of mismatch + if (match(v_geopriv, mw_geopriv(mw_location_info({ ? })))) { + // Extract Circle element from Tuple + v_temp := v_geopriv.location_info.elem_list[0]; + v_result := decvalue_unichar(v_temp, v_circle); + log(match(v_circle, mw_circle(mw_center_group_pos(PX_CIRCLE_POS), mw_radius(PX_CIRCLE_UOM, (PX_CIRCLE_RADIUS - PX_DOUBLE_CMP_EPSILON .. PX_CIRCLE_RADIUS + PX_DOUBLE_CMP_EPSILON)), PX_SRS_NAME))); // FIXME Required by TITAN to get details in case of mismatch + if (match(v_circle, mw_circle(mw_center_group_pos(PX_CIRCLE_POS), mw_radius(PX_CIRCLE_UOM, (PX_CIRCLE_RADIUS - PX_DOUBLE_CMP_EPSILON .. PX_CIRCLE_RADIUS + PX_DOUBLE_CMP_EPSILON)), PX_SRS_NAME))) { + log("*** " & testcasename() & ": PASS: IUT successfully responds with a Point ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } else { + log("*** " & testcasename() & ": FAIL: Incorrect Circle position ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + } else { + log("*** " & testcasename() & ": FAIL: Unexpected response ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + } else { + log("*** " & testcasename() & ": FAIL: Unexpected response ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + } else { + log("*** " & testcasename() & ": FAIL: Unexpected response ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + } else { + log("*** " & testcasename() & ": FAIL: Unexpected response ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_LIS_HTTP_POST_BV_02 - // LibNg112 - import from LibNg112_TypesAndValues all; - import from LibNg112_Templates all; - import from LibNg112_TestSystem all; + /** + * @desc IUT successfully responds with a reference when it receives a HTTP POST location request with location type locationURI and exact attribute + * @reference + * ETSI TS 103 479 Vm.t.e (yyyy-mm) Clause 5.5 Location Information Server (LIS) + * Next Generation 112 Long Term Definition http://www.eena.org/uploads/gallery/files/pdf/2013-03-15-eena_ng_longtermdefinitionupdated.pdf Clause 4.10 + * https://tools.ietf.org/html/rfc5985 + * @remark PICS Selection PICS_HTTP_POST_REQUEST PICS_LOCATION_HELD + *
+     * Initial conditions with {
+     *   the IUT entity havingLocationMappingFor the DEVICE_NUMBER containing
+     *     "circle" containing
+     *       "position" indicating value CIRCLE_POS,
+     *       "radius"    indicating value CIRCLE_RADIUS
+     *     ;
+     *   ;
+     * }
+     * 
+ */ + testcase TC_LIS_HTTP_POST_BV_03() runs on HttpComponent system TestAdapter { + // Local variables + var HeaderLines v_headers; + var HttpMessage v_response; + + // Test control + if (not(PICS_LIS_IUT) or (not PICS_HTTP_POST_REQUEST) or (not PICS_LOCATION_HELD)) { + log("*** " & testcasename() & ": PICS_LIS_IUT and PICS_HTTP_POST_REQUEST and PICS_LOCATION_HELD required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(v_headers); + f_remove_headears_list({ c_header_accept }, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_LIS_URI, + v_headers, + m_http_message_body_xml(m_body_xml_location_request( + m_locationRequest( + { encvalue_unichar(valueof(m_device({ PX_DEVICE_URI_TEL }))) }, + m_locationTypeType( + m_locationTypeBase_locationUri, + true + ) + ) + ) + ) + ) + ) + ); + f_selfOrClientSyncAndVerdictTestBody(c_prDone, e_success); + + // Test body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_xml( + mw_body_xml_location_response( + mw_locationResponse(-, ?) + ))))) -> value v_response { + var Presence v_presence; + var Tuple v_tuple; + var Geopriv v_geopriv; + var Circle v_circle; + var universal charstring v_temp; + var integer v_result; + + tc_ac.stop; + + // Extract presence element from Location-Response + v_temp := v_response.response.body.xml_body.locationResponse.elem_list[0]; + v_result := decvalue_unichar(v_temp, v_presence); + if (v_result == 0) { + log(match(v_presence, mw_presence)); // FIXME Required by TITAN to get details in case of mismatch + if (match(v_presence, mw_presence)) { + // Extract first Tuple element from Presence + v_tuple := v_presence.tuple_list[0]; + v_temp := v_tuple.status.elem_list[0]; + // Extract Geopriv element from Tuple + v_result := decvalue_unichar(v_temp, v_geopriv); + if (v_result == 0) { + log(match(v_geopriv, mw_geopriv(mw_location_info({ ? })))); // FIXME Required by TITAN to get details in case of mismatch + if (match(v_geopriv, mw_geopriv(mw_location_info({ ? })))) { + // Extract Circle element from Tuple + v_temp := v_geopriv.location_info.elem_list[0]; + v_result := decvalue_unichar(v_temp, v_circle); + log(match(v_circle, mw_circle(mw_center_group_pos(PX_CIRCLE_POS), mw_radius(PX_CIRCLE_UOM, (PX_CIRCLE_RADIUS - PX_DOUBLE_CMP_EPSILON .. PX_CIRCLE_RADIUS + PX_DOUBLE_CMP_EPSILON)), PX_SRS_NAME))); // FIXME Required by TITAN to get details in case of mismatch + if (match(v_circle, mw_circle(mw_center_group_pos(PX_CIRCLE_POS), mw_radius(PX_CIRCLE_UOM, (PX_CIRCLE_RADIUS - PX_DOUBLE_CMP_EPSILON .. PX_CIRCLE_RADIUS + PX_DOUBLE_CMP_EPSILON)), PX_SRS_NAME))) { + log("*** " & testcasename() & ": PASS: IUT successfully responds with a Point ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } else { + log("*** " & testcasename() & ": FAIL: Incorrect Circle position ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + } else { + log("*** " & testcasename() & ": FAIL: Unexpected response ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + } else { + log("*** " & testcasename() & ": FAIL: Unexpected response ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + } else { + log("*** " & testcasename() & ": FAIL: Unexpected response ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + } else { + log("*** " & testcasename() & ": FAIL: Unexpected response ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_LIS_HTTP_POST_BV_03 - testcase TC_1() runs on SipComponent system TestAdapter { + /** + * @desc IUT successfully responds with a reference and geodetic location when it receives a HTTP POST location request with location types locationURI and geodetic and exact attribute + * @reference + * ETSI TS 103 479 Vm.t.e (yyyy-mm) Clause 5.5 Location Information Server (LIS) + * Next Generation 112 Long Term Definition http://www.eena.org/uploads/gallery/files/pdf/2013-03-15-eena_ng_longtermdefinitionupdated.pdf Clause 4.10 + * https://tools.ietf.org/html/rfc5985 + * @remark PICS Selection PICS_HTTP_POST_REQUEST PICS_LOCATION_HELD + *
+     * Initial conditions with {
+     *   the IUT entity havingLocationMappingFor the DEVICE_NUMBER containing
+     *     "circle" containing
+     *       "position" indicating value CIRCLE_POS,
+     *       "radius"    indicating value CIRCLE_RADIUS
+     *     ;
+     *   ;
+     * }
+     * 
+ */ + testcase TC_LIS_HTTP_POST_BV_04() runs on HttpComponent system TestAdapter { + // Local variables + var HeaderLines v_headers; + var HttpMessage v_response; - map(self:SIPP, system:SIPP); + // Test control + if (not(PICS_LIS_IUT) or (not PICS_HTTP_POST_REQUEST) or (not PICS_LOCATION_HELD)) { + log("*** " & testcasename() & ": PICS_LIS_IUT and PICS_HTTP_POST_REQUEST and PICS_LOCATION_HELD required for executing the TC ***"); + setverdict(inconc); + stop; + } + // Test component configuration + f_cf_01_http_up(); - unmap(self:SIPP, system:SIPP); - } + // Test adapter configuration + + // Preamble + f_init_default_headers_list(v_headers); + f_remove_headears_list({ c_header_accept }, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_LIS_URI, + v_headers, + m_http_message_body_xml(m_body_xml_location_request( + m_locationRequest( + { encvalue_unichar(valueof(m_device({ PX_DEVICE_URI_TEL }))) }, + m_locationTypeType( + m_locationTypeBase_geodetic, + true + ) + ) + ) + ) + ) + ) + ); + f_selfOrClientSyncAndVerdictTestBody(c_prDone, e_success); + + // Test body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_xml( + mw_body_xml_location_response( + mw_locationResponse(-, ?) + ))))) -> value v_response { + var Presence v_presence; + var Tuple v_tuple; + var Geopriv v_geopriv; + var Circle v_circle; + var universal charstring v_temp; + var integer v_result; + + tc_ac.stop; + + // Extract presence element from Location-Response + v_temp := v_response.response.body.xml_body.locationResponse.elem_list[0]; + v_result := decvalue_unichar(v_temp, v_presence); + if (v_result == 0) { + log(match(v_presence, mw_presence)); // FIXME Required by TITAN to get details in case of mismatch + if (match(v_presence, mw_presence)) { + // Extract first Tuple element from Presence + v_tuple := v_presence.tuple_list[0]; + v_temp := v_tuple.status.elem_list[0]; + // Extract Geopriv element from Tuple + v_result := decvalue_unichar(v_temp, v_geopriv); + if (v_result == 0) { + log(match(v_geopriv, mw_geopriv(mw_location_info({ ? })))); // FIXME Required by TITAN to get details in case of mismatch + if (match(v_geopriv, mw_geopriv(mw_location_info({ ? })))) { + // Extract Circle element from Tuple + v_temp := v_geopriv.location_info.elem_list[0]; + v_result := decvalue_unichar(v_temp, v_circle); + log(match(v_circle, mw_circle(mw_center_group_pos(PX_CIRCLE_POS), mw_radius(PX_CIRCLE_UOM, (PX_CIRCLE_RADIUS - PX_DOUBLE_CMP_EPSILON .. PX_CIRCLE_RADIUS + PX_DOUBLE_CMP_EPSILON)), PX_SRS_NAME))); // FIXME Required by TITAN to get details in case of mismatch + if (match(v_circle, mw_circle(mw_center_group_pos(PX_CIRCLE_POS), mw_radius(PX_CIRCLE_UOM, (PX_CIRCLE_RADIUS - PX_DOUBLE_CMP_EPSILON .. PX_CIRCLE_RADIUS + PX_DOUBLE_CMP_EPSILON)), PX_SRS_NAME))) { + log("*** " & testcasename() & ": PASS: IUT successfully responds with a Point ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } else { + log("*** " & testcasename() & ": FAIL: Incorrect Circle position ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + } else { + log("*** " & testcasename() & ": FAIL: Unexpected response ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + } else { + log("*** " & testcasename() & ": FAIL: Unexpected response ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + } else { + log("*** " & testcasename() & ": FAIL: Unexpected response ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + } else { + log("*** " & testcasename() & ": FAIL: Unexpected response ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_LIS_HTTP_POST_BV_04 + + /** + * @desc "IUT successfully responds with an error response when it receives a HTTP POST location request for an unknown device" + * @reference + * "ETSI TS 103 479 Vm.t.e (yyyy-mm) Clause 5.5 Location Information Server (LIS)", + * "Next Generation 112 Long Term Definition http://www.eena.org/uploads/gallery/files/pdf/2013-03-15-eena_ng_longtermdefinitionupdated.pdf Clause 4.10", + * "https://tools.ietf.org/html/rfc5985" + * @remark PICS Selection PICS_HTTP_POST_REQUEST PICS_LOCATION_HELD + *
+     * Initial conditions with {
+     *   the IUT entity havingLocationMappingFor the DEVICE_NUMBER containing
+     *     "circle" containing
+     *       "position" indicating value CIRCLE_POS,
+     *       "radius"    indicating value CIRCLE_RADIUS
+     *     ;
+     *   ;
+     * }
+     * 
+ */ + testcase TC_LIS_HTTP_POST_BV_05() runs on HttpComponent system TestAdapter { + // Local variables + var HeaderLines v_headers; + var HttpMessage v_response; + + // Test control + if (not(PICS_LIS_IUT) or (not PICS_HTTP_POST_REQUEST) or (not PICS_LOCATION_HELD)) { + log("*** " & testcasename() & ": PICS_LIS_IUT and PICS_HTTP_POST_REQUEST and PICS_LOCATION_HELD required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(v_headers); + f_remove_headears_list({ c_header_accept }, v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_LIS_URI, + v_headers, + m_http_message_body_xml(m_body_xml_location_request( + m_locationRequest( + { encvalue_unichar(valueof(m_device({ PX_UNKNOWN_DEVICE_URI }))) }, + m_locationTypeType(m_locationTypeBase_geodetic, true) + ) + ) + ) + ) + ) + ); + f_selfOrClientSyncAndVerdictTestBody(c_prDone, e_success); + + // Test body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_xml( + mw_body_xml_location_response_error( + mw_error_type + ))))) { + tc_ac.stop; + log("*** " & testcasename() & ": PASS: Error message received ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_LIS_HTTP_POST_BV_05 + + /** + * @desc IUT successfully returns the location when a locationURI is dereferenced + * @reference + * ETSI TS 103 479 Vm.t.e (yyyy-mm) Clause 5.5 Location Information Server (LIS) + * Next Generation 112 Long Term Definition http://www.eena.org/uploads/gallery/files/pdf/2013-03-15-eena_ng_longtermdefinitionupdated.pdf Clause 4.10 + * https://tools.ietf.org/html/rfc5985 + * @remark PICS Selection PICS_HTTP_POST_REQUEST PICS_LOCATION_HELD + *
+     * Initial conditions with {
+     *   the IUT entity havingLocationMappingFor the DEVICE_NUMBER containing
+     *     "circle" containing
+     *       "position" indicating value CIRCLE_POS,
+     *       "radius"    indicating value CIRCLE_RADIUS
+     *     ;
+     *   ; and the IUT entity havingReturnedLocationUriFor the DEVICE_NUMBER_CIRCLE containing
+            element "locationURI" indicating value LOCATION_URI
+     *      ;
+     * }
+     * 
+ */ + testcase TC_LIS_HTTP_GET_BV_01() runs on HttpComponent system TestAdapter { + // Local variables + var HeaderLines v_headers; + var HttpMessage v_response; + + // Test control + if (not(PICS_LIS_IUT) or (not PICS_HTTP_GET_REQUEST) or (not PICS_LOCATION_HELD)) { + log("*** " & testcasename() & ": PICS_LIS_IUT and PICS_HTTP_GET_REQUEST and PICS_LOCATION_HELD required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(v_headers); + f_remove_headears_list({ c_header_accept }, v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + PICS_LIS_URI, + v_headers + ) + ) + ); + f_selfOrClientSyncAndVerdictTestBody(c_prDone, e_success); + + // Test body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_xml( + mw_body_xml_location_response( + mw_locationResponse(-, ?) + ))))) -> value v_response { + var Presence v_presence; + var Tuple v_tuple; + var Geopriv v_geopriv; + var Circle v_circle; + var universal charstring v_temp; + var integer v_result; + + tc_ac.stop; + + // Extract presence element from Location-Response + v_temp := v_response.response.body.xml_body.locationResponse.elem_list[0]; + v_result := decvalue_unichar(v_temp, v_presence); + if (v_result == 0) { + log(match(v_presence, mw_presence)); // FIXME Required by TITAN to get details in case of mismatch + if (match(v_presence, mw_presence)) { + // Extract first Tuple element from Presence + v_tuple := v_presence.tuple_list[0]; + v_temp := v_tuple.status.elem_list[0]; + // Extract Geopriv element from Tuple + v_result := decvalue_unichar(v_temp, v_geopriv); + if (v_result == 0) { + log(match(v_geopriv, mw_geopriv(mw_location_info({ ? })))); // FIXME Required by TITAN to get details in case of mismatch + if (match(v_geopriv, mw_geopriv(mw_location_info({ ? })))) { + // Extract Circle element from Tuple + v_temp := v_geopriv.location_info.elem_list[0]; + v_result := decvalue_unichar(v_temp, v_circle); + log(match(v_circle, mw_circle(mw_center_group_pos(PX_CIRCLE_POS), mw_radius(PX_CIRCLE_UOM, (PX_CIRCLE_RADIUS - PX_DOUBLE_CMP_EPSILON .. PX_CIRCLE_RADIUS + PX_DOUBLE_CMP_EPSILON)), PX_SRS_NAME))); // FIXME Required by TITAN to get details in case of mismatch + if (match(v_circle, mw_circle(mw_center_group_pos(PX_CIRCLE_POS), mw_radius(PX_CIRCLE_UOM, (PX_CIRCLE_RADIUS - PX_DOUBLE_CMP_EPSILON .. PX_CIRCLE_RADIUS + PX_DOUBLE_CMP_EPSILON)), PX_SRS_NAME))) { + log("*** " & testcasename() & ": PASS: IUT successfully responds with a Point ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + } else { + log("*** " & testcasename() & ": FAIL: Incorrect Circle position ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + } else { + log("*** " & testcasename() & ": FAIL: Unexpected response ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + } else { + log("*** " & testcasename() & ": FAIL: Unexpected response ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + } else { + log("*** " & testcasename() & ": FAIL: Unexpected response ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + } else { + log("*** " & testcasename() & ": FAIL: Unexpected response ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_LIS_HTTP_GET_BV_01 + + } // End of group lis_role + + group ecrf_role { + + /** + * @desc "IUT successfully responds with a service URI for a Point in the service boundary" + * @reference + * "ETSI TS 103 479 Vm.t.e (yyyy-mm) Clause XXX EMERGENCY CALL ROUTING FUNCTION (ECRF)", + * "Next Generation 112 Long Term Definition http://www.eena.org/uploads/gallery/files/pdf/2013-03-15-eena_ng_longtermdefinitionupdated.pdf Clause 4.4", + * "https://tools.ietf.org/html/rfc5222" + * @remark PICS Selection PICS_HTTP_POST_REQUEST PICS_SERVICE_LOST + *
+     * Initial conditions with {
+     *   the IUT entity havingServiceBoundaryFor the SERVICE_BOUNDARY_1 containing
+     *     serviceMappingFor SERVICE_URN_1 containing
+     *        URI indicating value SIP_URI_1;
+     *   ;
+     *   and the IUT entity havingServiceBoundaryFor the SERVICE_BOUNDARY_2 containing
+     *     serviceMappingFor SERVICE_URN_2 containing
+     *        URI indicating value SIP_URI_2;
+     *   ;
+     * }
+     * 
+ */ + testcase TC_ECRF_HTTP_POST_BV_01() runs on HttpComponent system TestAdapter { + // Local variables + var HeaderLines v_headers; + + // Test control + if (not(PICS_ECRF_IUT) or (not PICS_HTTP_POST_REQUEST) or (not PICS_SERVICE_LOST)) { + log("*** " & testcasename() & ": PICS_ECRF_IUT and PICS_HTTP_POST_REQUEST and PICS_SERVICE_LOST required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ECRF_REQUEST_URIs[0], + v_headers, + m_http_message_body_xml( + m_body_xml_find_service_request( + m_find_service_request( + { + m_location( + PX_LOST_ID, + { m_extension_point( { m_notLost(encvalue_unichar(valueof(m_point(PX_LOST_NO_LOST, PX_SRS_NAME, "point1")))) } ) }, + "geodetic-2d" // TODO Use a Pixit + ) + }, + { m_notLost(encvalue_unichar(valueof(m_point(PX_LOST_NO_LOST, PX_SRS_NAME, "point1")))) }, + PX_LOST_SERVICE_URN_1, + true, + value_ + ))) + ))); + f_selfOrClientSyncAndVerdictTestBody(c_prDone, e_success); + + // Test body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_xml( + mw_body_xml_find_service_response( + mw_find_service_response( + { mw_mapping } + )))))) { + tc_ac.stop; + // TODO Need to decode content + log("*** " & testcasename() & ": PASS: IUT successfully responds with a Point ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_ECRF_HTTP_POST_BV_01 + + /** + * @desc "IUT successfully responds with a service URI for a Circle in the service boundary" + * @reference + * "ETSI TS 103 479 Vm.t.e (yyyy-mm) Clause XXX EMERGENCY CALL ROUTING FUNCTION (ECRF)", + * "Next Generation 112 Long Term Definition http://www.eena.org/uploads/gallery/files/pdf/2013-03-15-eena_ng_longtermdefinitionupdated.pdf Clause 4.4", + * "https://tools.ietf.org/html/rfc5222" + * @remark PICS Selection PICS_HTTP_POST_REQUEST PICS_SERVICE_LOST + *
+     * Initial conditions with {
+     *   the IUT entity havingServiceBoundaryFor the SERVICE_BOUNDARY_1 containing
+     *     serviceMappingFor SERVICE_URN_1 containing
+     *        URI indicating value SIP_URI_1;
+     *   ;
+     *   and the IUT entity havingServiceBoundaryFor the SERVICE_BOUNDARY_2 containing
+     *     serviceMappingFor SERVICE_URN_2 containing
+     *        URI indicating value SIP_URI_2;
+     *   ;
+     * }
+     * 
+ */ + testcase TC_ECRF_HTTP_POST_BV_02() runs on HttpComponent system TestAdapter { + // Local variables + var HeaderLines v_headers; + + // Test control + if (not(PICS_ECRF_IUT) or (not PICS_HTTP_POST_REQUEST) or (not PICS_SERVICE_LOST)) { + log("*** " & testcasename() & ": PICS_ECRF_IUT and PICS_HTTP_POST_REQUEST and PICS_SERVICE_LOST required for executing the TC ***"); + setverdict(inconc); + stop; + } + + // Test component configuration + f_cf_01_http_up(); + + // Test adapter configuration + + // Preamble + f_init_default_headers_list(v_headers); + httpPort.send( + m_http_request( + m_http_request_post( + PICS_ECRF_REQUEST_URIs[1], + v_headers, + m_http_message_body_xml( + m_body_xml_find_service_request( + m_find_service_request( + { + m_location( + PX_LOST_ID, + { m_extension_point( { m_notLost(encvalue_unichar(valueof(m_circle(m_center_group_pos(PX_CIRCLE_POS), m_radius(PX_CIRCLE_UOM, PX_CIRCLE_RADIUS), PX_SRS_NAME, "circle1")))) } ) }, + "geodetic-2d" // TODO Use a Pixit + ) + }, + { m_notLost(encvalue_unichar(valueof(m_circle(mw_center_group_pos(PX_CIRCLE_POS), m_radius(PX_CIRCLE_UOM, PX_CIRCLE_RADIUS), PX_SRS_NAME, "circle1")))) }, + PX_LOST_SERVICE_URN_2, + true, + value_ + ))) + ))); + f_selfOrClientSyncAndVerdictTestBody(c_prDone, e_success); + + // Test body + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_xml( + mw_body_xml_find_service_response( + mw_find_service_response( + { mw_mapping } + )))))) { + tc_ac.stop; + // TODO Need to decode content + log("*** " & testcasename() & ": PASS: IUT successfully responds with a Circle ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success); + + } + [] tc_ac.timeout { + log("*** " & testcasename() & ": INCONC: Expected message not received ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout); + } + } // End of 'alt' statement + + // Postamble + f_cf_01_http_down(); + } // End of testcase TC_ECRF_HTTP_POST_BV_02 + } // End of group ecrf_role + } // End of module AtsNg112_TestCases diff --git a/ttcn/AtsNg112/AtsNg112_TestControl.ttcn b/ttcn/AtsNg112/AtsNg112_TestControl.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..a178075803f17fd09415bed4bdbba1e5496074d3 --- /dev/null +++ b/ttcn/AtsNg112/AtsNg112_TestControl.ttcn @@ -0,0 +1,30 @@ +module AtsNg112_TestControl { + + // LibNg112 + import from LibNg112_Pics all; + + // AtsNg112 + import from AtsNg112_TestCases all; + + // Test Execution + control { + if (PICS_LIS_IUT) { + if (PICS_HTTP_POST_REQUEST and PICS_LOCATION_HELD) { + execute(TC_LIS_HTTP_POST_BV_01()); + execute(TC_LIS_HTTP_POST_BV_02()); + execute(TC_LIS_HTTP_POST_BV_03()); + execute(TC_LIS_HTTP_POST_BV_04()); + execute(TC_LIS_HTTP_POST_BV_05()); + } + if (PICS_HTTP_GET_REQUEST and PICS_LOCATION_HELD) { + execute(TC_LIS_HTTP_GET_BV_01()); + } + } + if (PICS_ECRF_IUT) { + if (PICS_HTTP_POST_REQUEST and PICS_SERVICE_LOST) { + execute(TC_ECRF_HTTP_POST_BV_01()); + } + } + } // End of 'control' statement + +} // End of module AtsNg112_TestControl diff --git a/ttcn/LibEmcom/LibNg112/LibNg112_TypesAndValues.ttcn b/ttcn/LibEmcom/LibNg112/LibNg112_TypesAndValues.ttcn deleted file mode 100644 index 6ae23cd2b6d807622b01596f15d80067d97347d5..0000000000000000000000000000000000000000 --- a/ttcn/LibEmcom/LibNg112/LibNg112_TypesAndValues.ttcn +++ /dev/null @@ -1,3 +0,0 @@ -module LibNg112_TypesAndValues { - -} // End of module LibNg112_TypesAndValues diff --git a/ttcn/LibEmcom/LibNg112/ttcn/LibNg112_EncdecDeclarations.ttcn b/ttcn/LibEmcom/LibNg112/ttcn/LibNg112_EncdecDeclarations.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..1386730a15ee18ea6e3ae8c0feaf52df5731ecf0 --- /dev/null +++ b/ttcn/LibEmcom/LibNg112/ttcn/LibNg112_EncdecDeclarations.ttcn @@ -0,0 +1,85 @@ +module LibNg112_EncdecDeclarations { + + import from XSD all; + + // RFC5985 Held + import from urn_ietf_params_xml_ns_geopriv_held language "XSD" all + with { + extension "File:../xsd/RFC5985_held.xsd"; + } + // RFC6155 Held ID + import from urn_ietf_params_xml_ns_geopriv_held_id language "XSD" all + with { + extension "File:../xsd/RFC6155_held_id.xsd"; + } + import from urn_ietf_params_xml_ns_pidf_geopriv10 language "XSD" all + with { + extension "File:../xsd/RFC4119_geopriv10.xsd"; + } + import from urn_ietf_params_xml_ns_pidf_geopriv10_basicPolicy language "XSD" all + with { + extension "File:../xsd/RFC4119_geopriv10_basic_policy.xsd"; + } + + import from urn_ietf_params_xml_ns_pidf_geopriv10_civicLoc language "XSD" all + with { + extension "File:../xsd/RFC4119_geopriv10_civicloc.xsd"; + } + + // RFC3863 + import from urn_ietf_params_xml_ns_pidf language "XSD" all + with { + extension "File:../xsd/RFC3863_pidf.xsd"; + } + + // OpenGIS + import from urn_ietf_params_xml_ns_pidf_geopriv10_geoShape language "XSD" all + with { + extension "File:../xsd/OGC_GLM_Geoshape.xsd"; + } + import from http_www_opengis_net_gml language "XSD" all + with { + extension "File:../xsd/gmlBase.xsd"; + extension "File:../xsd/basicTypes.xsd"; + extension "File:../xsd/measures.xsd"; + extension "File:../xsd/geometryPrimitives.xsd"; + extension "File:../xsd/geometryBasic0d1d.xsd"; + extension "File:../xsd/geometryBasic2d.xsd"; + } + + external function enc_LocationRequest(in LocationRequest p_loction_request) return octetstring + with { extension "prototype (convert) encode(XER:XER_EXTENDED)" }; + external function dec_LocationRequest(in octetstring p_pdu) return LocationRequest + with { extension "prototype (convert) decode(XER:XER_EXTENDED)" }; + external function enc_LocationResponse(in LocationResponse p_loction_response) return octetstring + with { extension "prototype (convert) encode(XER:XER_EXTENDED)" }; + external function dec_LocationResponse(in octetstring p_pdu) return LocationResponse + with { extension "prototype (convert) decode(XER:XER_EXTENDED)" }; + + + external function enc_Device(in Device p_device) return octetstring + with { extension "prototype (convert) encode(XER:XER_EXTENDED)" }; + external function dec_Device(in octetstring p_pdu) return Device + with { extension "prototype (convert) decode(XER:XER_EXTENDED)" }; + + external function enc_Presence(in Presence p_presence) return octetstring + with { extension "prototype (convert) encode(XER:XER_EXTENDED)" }; + external function dec_Presence(in octetstring p_pdu) return Presence + with { extension "prototype (convert) decode(XER:XER_EXTENDED)" }; + + external function enc_Tuple(in Tuple p_tuple) return octetstring + with { extension "prototype (convert) encode(XER:XER_EXTENDED)" }; + external function dec_Tuple(in octetstring p_pdu) return Tuple + with { extension "prototype (convert) decode(XER:XER_EXTENDED)" }; + + external function enc_Geopriv(in Geopriv p_geopriv) return octetstring + with { extension "prototype (convert) encode(XER:XER_EXTENDED)" }; + external function dec_Geopriv(in octetstring p_pdu) return Geopriv + with { extension "prototype (convert) decode(XER:XER_EXTENDED)" }; + + external function enc_Circle(in Circle p_circle) return octetstring + with { extension "prototype (convert) encode(XER:XER_EXTENDED)" }; + external function dec_Circle(in octetstring p_pdu) return Circle + with { extension "prototype (convert) decode(XER:XER_EXTENDED)" }; + +} // End of module LibNg112_EncdecDeclarations diff --git a/ttcn/LibEmcom/LibNg112/ttcn/LibNg112_Functions.ttcn b/ttcn/LibEmcom/LibNg112/ttcn/LibNg112_Functions.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..3b407d7c9a28b60581644262d735ba92861da470 --- /dev/null +++ b/ttcn/LibEmcom/LibNg112/ttcn/LibNg112_Functions.ttcn @@ -0,0 +1,110 @@ +module LibNg112_Functions { + + // Libcommon + import from LibCommon_Time all; + import from LibCommon_VerdictControl all; + import from LibCommon_Sync all; + + // LibHttp + import from LibItsHttp_TypesAndValues all; + import from LibItsHttp_Templates all; + import from LibItsHttp_XmlTemplates all; + import from LibItsHttp_TestSystem all; + + // LibNg112 + import from LibNg112_TypesAndValues all; + import from LibNg112_TestSystem all; + + group preambles { + + function f_cf_01_http_up() runs on HttpComponent { + + // Map ports + map(self:httpPort, system:httpPort); + + // Connect + f_connect4SelfOrClientSync(); + + activate(a_cf_01_http_down()); + activate(a_default_requests()); + activate(a_default_responses()); + + } // End of function f_cf_01_http_up + + /** + * @desc Default handling cf01 de-initialisation. + */ + altstep a_cf_01_http_down() runs on HttpComponent { + [] a_shutdown() { + f_cf_01_http_down(); + log("*** a_cf_01_http_down: INFO: TEST COMPONENT NOW STOPPING ITSELF! ***"); + stop; + } + } // End of altstep a_cf_01_http_down + + } // End of group preambles + + group postambles { + + function f_cf_01_http_down() runs on HttpComponent { + + // Unmap ports + unmap(self:httpPort, system:httpPort); + + // Disconnect ports + f_disconnect4SelfOrClientSync(); + + deactivate; + } // End of function f_cf_01_http_down + + } // End of group postambles + + group altsteps { + + altstep a_default_requests() runs on HttpComponent { + [] httpPort.receive(mw_http_request) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: Server error: Receive request istead of response ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + } // End of altstep a_default_requests + + altstep a_default_responses() runs on HttpComponent { + var HttpMessage v_response; + + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_xml + ))) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: Unexpected XML response ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_binary + ))) { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: Unexpected binary response ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + [] httpPort.receive( + mw_http_response( + mw_http_response_ko + )) -> value v_response { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: Server error: " & int2str(v_response.response.statuscode) & "/" & v_response.response.statustext & " ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + [] httpPort.receive(mw_http_response) -> value v_response { + tc_ac.stop; + log("*** " & testcasename() & ": FAIL: Server error: " & int2str(v_response.response.statuscode) & "/" & v_response.response.statustext & " ***"); + f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error); + } + } // End of altstep a_default_responses + + } // end of group altsteps + +} // End of module LibNg112_Functions diff --git a/ttcn/LibEmcom/LibNg112/ttcn/LibNg112_Pics.ttcn b/ttcn/LibEmcom/LibNg112/ttcn/LibNg112_Pics.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..531b2b62880996e84b980553d1d5242490edbdbc --- /dev/null +++ b/ttcn/LibEmcom/LibNg112/ttcn/LibNg112_Pics.ttcn @@ -0,0 +1,57 @@ +module LibNg112_Pics { + + type record of charstring request_uri_list; + + /** + * @desc Has the IUT the role of LIS? + */ + modulepar boolean PICS_LIS_IUT := true; + + /** + * @desc Has the IUT the role of ECRF? + */ + modulepar boolean PICS_ECRF_IUT := true; + + /** + * @desc Does the IUT support HTTP GET request method? + */ + modulepar boolean PICS_HTTP_GET_REQUEST := true; + + /** + * @desc Does the IUT support HTTP POST request method? + */ + modulepar boolean PICS_HTTP_POST_REQUEST := true; + + /** + * @desc Does the IUT support HELD protocol? + */ + modulepar boolean PICS_LOCATION_HELD := true; + + /** + * @desc Does the IUT support LoST protocol? + */ + modulepar boolean PICS_SERVICE_LOST := true; + + /** + * @desc + */ + modulepar charstring PICS_LIS_URI := "/location"; + + /** + * @desc HTTP POST Uris + * @see RFC 2616 Hypertext Transfer Protocol -- HTTP/1.1 + */ + // modulepar request_uri_list PICS_LIS_REQUEST_URIs := { "/api/held", "/api/held", "/api/held" }; //{ "/t/9rk8l-1531130342/post", "/t/r143f-1528105031/post", "/t/6ouem-1531201238/post" }; + + /** + * @desc + */ + modulepar charstring PICS_ECRF_URI := "/service"; + + /** + * @desc HTTP POST Uris + * @see RFC 2616 Hypertext Transfer Protocol -- HTTP/1.1 + */ + modulepar request_uri_list PICS_ECRF_REQUEST_URIs := { "/t/0ahy0-1531830377/post" }; + +} // End of module LibNg112_Pics diff --git a/ttcn/LibEmcom/LibNg112/ttcn/LibNg112_Pixits.ttcn b/ttcn/LibEmcom/LibNg112/ttcn/LibNg112_Pixits.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..81dbcb1a5d181c088209dd7ffb13e35151b8a30f --- /dev/null +++ b/ttcn/LibEmcom/LibNg112/ttcn/LibNg112_Pixits.ttcn @@ -0,0 +1,72 @@ +module LibNg112_Pixits { + + import from XSD all; + + // RFC5222 + import from urn_ietf_params_xml_ns_lost1 language "XSD" all + with { + extension "File:../xsd/RFC5222_lost.xsd"; + } + + // OpenGIS + import from http_www_opengis_net_pidflo_1_0 language "XSD" all + with { + extension "File:../xsd/GLM_pidf_lo_shape.xsd"; + } + import from http_www_opengis_net_gml language "XSD" all + with { + extension "File:../xsd/gmlBase.xsd"; + extension "File:../xsd/basicTypes.xsd"; + extension "File:../xsd/measures.xsd"; + extension "File:../xsd/geometryPrimitives.xsd"; + extension "File:../xsd/geometryBasic0d1d.xsd"; + extension "File:../xsd/geometryBasic2d.xsd"; + } + + /** + * @desc Epsilon for Double valules comparison + */ + modulepar XSD.Double PX_DOUBLE_CMP_EPSILON := 0.00001; + /** + * @desc Device identifier using SIP uri + */ + modulepar charstring PX_DEVICE_URI_SIP := "sip:user@example.net;gr=kjh29x97us97d"; + + /** + * @desc Device identifier using TEL uri + */ + modulepar charstring PX_DEVICE_URI_TEL := "+436501234567"; + + /** + * @desc Unknown device identifier + */ + modulepar charstring PX_UNKNOWN_DEVICE_URI := "sip:no_one@example.net;gr=kjh29x97us97d"; + + /** + * @desc Device point position + */ + modulepar DoubleList PX_DEVICE_NUMBER_POINT := { 43.616891, 7.053179 }; + + /** + * @desc Device position with a circle of conficence + */ + modulepar DoubleList PX_CIRCLE_POS := { 43.617174, 7.05275 }; + + modulepar XSD.AnyURI PX_CIRCLE_UOM := "urn:ogc:def:uom:EPSG::9001"; + + modulepar XSD.Double PX_CIRCLE_RADIUS := 15.000; + + modulepar XSD.AnyURI PX_SRS_NAME := "urn:ogc:def:crs:EPSG::4326"; + + modulepar XSD.Token PX_LOST_ID := "6020688f1ce1896d"; + + modulepar XSD.AnyURI PX_LOST_SERVICE_URN_1 := "urn:service:sos.police"; + + modulepar XSD.AnyURI PX_LOST_SERVICE_URN_2 := "urn:service:sos.police"; + + modulepar XSD.AnyURI PX_LOST_SERVICE := "urn:service:sos.police"; + + modulepar DoubleList PX_LOST_NO_LOST := { 48.2153879, 16.2903 }; + + +} // End of module LibNg112_Pixits diff --git a/ttcn/LibEmcom/LibNg112/LibNg112_Templates.ttcn b/ttcn/LibEmcom/LibNg112/ttcn/LibNg112_Templates.ttcn similarity index 76% rename from ttcn/LibEmcom/LibNg112/LibNg112_Templates.ttcn rename to ttcn/LibEmcom/LibNg112/ttcn/LibNg112_Templates.ttcn index 6efbfe4f590dfca0452087e2d4532236f6e2f161..198d808bc865abbbb7c8e7461199bd67116942ee 100644 --- a/ttcn/LibEmcom/LibNg112/LibNg112_Templates.ttcn +++ b/ttcn/LibEmcom/LibNg112/ttcn/LibNg112_Templates.ttcn @@ -1,3 +1,5 @@ module LibNg112_Templates { - + + // LibNg112 + } // End of module LibNg112_Templates diff --git a/ttcn/LibEmcom/LibNg112/LibNg112_TestSystem.ttcn b/ttcn/LibEmcom/LibNg112/ttcn/LibNg112_TestSystem.ttcn similarity index 54% rename from ttcn/LibEmcom/LibNg112/LibNg112_TestSystem.ttcn rename to ttcn/LibEmcom/LibNg112/ttcn/LibNg112_TestSystem.ttcn index a46a9af8a033ee010453cfd2c114008950caed4e..70f855d4b758966da4137c7e3d56b4dd6178eea4 100644 --- a/ttcn/LibEmcom/LibNg112/LibNg112_TestSystem.ttcn +++ b/ttcn/LibEmcom/LibNg112/ttcn/LibNg112_TestSystem.ttcn @@ -1,12 +1,16 @@ module LibNg112_TestSystem { // LibCommon + + // LibHttp + import from LibItsHttp_TestSystem all; // LibSip import from LibSip_Interface all; type component TestAdapter { - port SipPort SIPP; - } + port SipPort SIPP; + port HttpPort httpPort; + } // End of component TestAdapter } // End of module LibNg112_TestSystem diff --git a/ttcn/LibEmcom/LibNg112/ttcn/LibNg112_TypesAndValues.ttcn b/ttcn/LibEmcom/LibNg112/ttcn/LibNg112_TypesAndValues.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..9512e74c695ffecfec1716df4a64840ca2f4ce0a --- /dev/null +++ b/ttcn/LibEmcom/LibNg112/ttcn/LibNg112_TypesAndValues.ttcn @@ -0,0 +1,14 @@ +module LibNg112_TypesAndValues { + + type set of charstring XmlNs; + + type set of charstring XmlItems; + + type record xml_item { + charstring name, + XmlNs ns, + charstring uri, + XmlItems elem_list + } // End of type xml_item + +} // End of module LibNg112_TypesAndValues diff --git a/ttcn/LibEmcom/LibNg112/xsd/GML-pidf-lo-shape.xsd b/ttcn/LibEmcom/LibNg112/xsd/GML-pidf-lo-shape.xsd new file mode 100644 index 0000000000000000000000000000000000000000..fc092d1267e2b6107b083a2e311d49d4908235ad --- /dev/null +++ b/ttcn/LibEmcom/LibNg112/xsd/GML-pidf-lo-shape.xsd @@ -0,0 +1,119 @@ + + + + + + Geodetic Shapes for PIDF-LO + + + This document defines geodetic shape types for PIDF-LO. + + Copyright (c) 2007,2009 Open Geospatial Consortium. + To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ttcn/LibEmcom/LibNg112/xsd/NoTargetNamespace.ttcn b/ttcn/LibEmcom/LibNg112/xsd/NoTargetNamespace.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..9bf9d29269920a8a5474fbf692abe6ea02dcf512 --- /dev/null +++ b/ttcn/LibEmcom/LibNg112/xsd/NoTargetNamespace.ttcn @@ -0,0 +1,183 @@ +/******************************************************************************* +* Copyright (c) 2000-2016 Ericsson Telecom AB +* +* XSD to TTCN-3 Translator version: CRL 113 200/5 R4D +* +* All rights reserved. This program and the accompanying materials +* are made available under the terms of the Eclipse Public License v1.0 +* which accompanies this distribution, and is available at +* http://www.eclipse.org/legal/epl-v10.html +*******************************************************************************/ +// +// File: NoTargetNamespace.ttcn +// Description: +// References: +// Rev: +// Prodnr: +// Updated: Fri Mar 4 09:23:30 2016 +// Contact: http://ttcn.ericsson.se +// +//////////////////////////////////////////////////////////////////////////////// +// Generated from file(s): +// - Ims3gpp.xsd +// /* xml version = "1.0" encoding = "UTF-8" */ +// /* targetnamespace = "NoTargetNamespace" */ +//////////////////////////////////////////////////////////////////////////////// +// Modification header(s): +//----------------------------------------------------------------------------- +// Modified by: +// Modification date: +// Description: +// Modification contact: +//------------------------------------------------------------------------------ +//////////////////////////////////////////////////////////////////////////////// + + +module NoTargetNamespace { + + +import from XSD all; + + +type record TIMS3GPP +{ + XSD.Decimal version, + record of XSD.String attr optional, + union { + TAlternativeService alternative_service, + XSD.String service_info + } choice, + record of XSD.String elem_list +} +with { + variant "name as uncapitalized"; + variant (version) "attribute"; + variant (attr) "anyAttributes"; + variant (choice) "untagged"; + variant (choice.alternative_service) "name as 'alternative-service'"; + variant (choice.service_info) "name as 'service-info'"; + variant (elem_list) "untagged"; + variant (elem_list[-]) "anyElement"; +}; + + +type record TAlternativeService +{ + record of XSD.String attr optional, + TType type_, + XSD.String reason, + record of XSD.String elem_list +} +with { + variant "name as uncapitalized"; + variant (attr) "anyAttributes"; + variant (type_) "name as 'type'"; + variant (elem_list) "untagged"; + variant (elem_list[-]) "anyElement"; +}; + + +type record TType +{ + record of XSD.String attr optional, + record of XSD.String elem_list +} +with { + variant "name as uncapitalized"; + variant (attr) "anyAttributes"; + variant (elem_list) "untagged"; + variant (elem_list[-]) "anyElement"; +}; + + +type record TAction +{ + record of XSD.String attr optional, + record of XSD.String elem_list +} +with { + variant "name as uncapitalized"; + variant (attr) "anyAttributes"; + variant (elem_list) "untagged"; + variant (elem_list[-]) "anyElement"; +}; + + +/* root element */ + + +type TIMS3GPP Ims_3gpp +with { + variant "name as 'ims-3gpp'"; + variant "element"; +}; + + +/* emergency element for //ims-3gpp//alternative-service//type */ + + +type record Emergency +{ + +} +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +/* restoration element for //ims-3gpp//alternative-service//type */ + + +type record Restoration +{ + +} +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +/* action element for //ims-3gpp//alternative-service */ + + +type TAction Action +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +/* emergency-registration element for //ims-3gpp//alternative-service//action */ + + +type record Emergency_registration +{ + +} +with { + variant "name as 'emergency-registration'"; + variant "element"; +}; + + +/* initial-registration element for //ims-3gpp//alternative-service//action */ + + +type record Initial_registration +{ + +} +with { + variant "name as 'initial-registration'"; + variant "element"; +}; + + +} +with { + encode "XML"; + variant "controlNamespace 'http://www.w3.org/2001/XMLSchema-instance' prefix 'xsi'"; + variant "elementFormQualified"; +} diff --git a/ttcn/LibEmcom/LibNg112/xsd/RFC3863_pidf.xsd b/ttcn/LibEmcom/LibNg112/xsd/RFC3863_pidf.xsd new file mode 100644 index 0000000000000000000000000000000000000000..c60828a4231807faa64527b04d21ddf85ad96f41 --- /dev/null +++ b/ttcn/LibEmcom/LibNg112/xsd/RFC3863_pidf.xsd @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This attribute may be used on any element within an optional + PIDF extension to indicate that the corresponding element must + be understood by the PIDF processor if the enclosing optional + element is to be handled. + + + + diff --git a/ttcn/LibEmcom/LibNg112/xsd/RFC4119_geopriv10.xsd b/ttcn/LibEmcom/LibNg112/xsd/RFC4119_geopriv10.xsd new file mode 100644 index 0000000000000000000000000000000000000000..ca88f4c5bb4764b02b534935d5571cd8826ad0e8 --- /dev/null +++ b/ttcn/LibEmcom/LibNg112/xsd/RFC4119_geopriv10.xsd @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ttcn/LibEmcom/LibNg112/xsd/RFC4119_geopriv10_basic_policy.xsd b/ttcn/LibEmcom/LibNg112/xsd/RFC4119_geopriv10_basic_policy.xsd new file mode 100644 index 0000000000000000000000000000000000000000..225c4dc23a971d6525d160deeff5e392ac30851a --- /dev/null +++ b/ttcn/LibEmcom/LibNg112/xsd/RFC4119_geopriv10_basic_policy.xsd @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/ttcn/LibEmcom/LibNg112/xsd/RFC4119_geopriv10_civiloc.xsd b/ttcn/LibEmcom/LibNg112/xsd/RFC4119_geopriv10_civiloc.xsd new file mode 100644 index 0000000000000000000000000000000000000000..a037487f85d8b906a510057ecc1fa73a928f15dd --- /dev/null +++ b/ttcn/LibEmcom/LibNg112/xsd/RFC4119_geopriv10_civiloc.xsd @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ttcn/LibEmcom/LibNg112/xsd/RFC5222_lost.xsd b/ttcn/LibEmcom/LibNg112/xsd/RFC5222_lost.xsd new file mode 100644 index 0000000000000000000000000000000000000000..58e1f05afaa805368b1e6065afbaefcf74344e21 --- /dev/null +++ b/ttcn/LibEmcom/LibNg112/xsd/RFC5222_lost.xsd @@ -0,0 +1,345 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Exception pattern. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Any element not in the LoST namespace. + + + + + + + + + + + A wildcard pattern for including any element + from any other namespace. + + + + + + + + + + A wildcard pattern for including any element + from any other namespace. + + + + + + + + A point where future extensions + (elements from other namespaces) + can be added. + + + + + + + diff --git a/ttcn/LibEmcom/LibNg112/xsd/RFC5985_held.xsd b/ttcn/LibEmcom/LibNg112/xsd/RFC5985_held.xsd new file mode 100644 index 0000000000000000000000000000000000000000..3e78deab17d83c2cf99c679eaf9cbf866cf85790 --- /dev/null +++ b/ttcn/LibEmcom/LibNg112/xsd/RFC5985_held.xsd @@ -0,0 +1,136 @@ + + + + + This document (RFC 5985) defines HELD messages. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ttcn/LibEmcom/LibNg112/xsd/RFC6155_held_id.xsd b/ttcn/LibEmcom/LibNg112/xsd/RFC6155_held_id.xsd new file mode 100644 index 0000000000000000000000000000000000000000..45689870d7e47ffe292c39d48af1fe8ac74462b5 --- /dev/null +++ b/ttcn/LibEmcom/LibNg112/xsd/RFC6155_held_id.xsd @@ -0,0 +1,108 @@ + + + + + +HELD Device Identity + + +This document defines Device identity elements for HELD. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ttcn/LibEmcom/LibNg112/xsd/RFC7459_pidf_lo.xsd b/ttcn/LibEmcom/LibNg112/xsd/RFC7459_pidf_lo.xsd new file mode 100644 index 0000000000000000000000000000000000000000..53276f379b662f96794c20f6a948d8c54eaf2d48 --- /dev/null +++ b/ttcn/LibEmcom/LibNg112/xsd/RFC7459_pidf_lo.xsd @@ -0,0 +1,50 @@ + + + + + PIDF-LO Confidence + + + This schema defines an element that is used for indicating + confidence in PIDF-LO documents. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ttcn/LibEmcom/LibNg112/xsd/UsefulTtcn3Types.ttcn b/ttcn/LibEmcom/LibNg112/xsd/UsefulTtcn3Types.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..8301238811b9d76dd65c638b8fd836f4707d1f27 --- /dev/null +++ b/ttcn/LibEmcom/LibNg112/xsd/UsefulTtcn3Types.ttcn @@ -0,0 +1,95 @@ +/******************************************************************************* +* Copyright (c) 2000-2016 Ericsson Telecom AB +* +* XSD to TTCN-3 Translator version: CRL 113 200/5 R4D +* +* All rights reserved. This program and the accompanying materials +* are made available under the terms of the Eclipse Public License v1.0 +* which accompanies this distribution, and is available at +* http://www.eclipse.org/legal/epl-v10.html +*******************************************************************************/ +// +// File: UsefulTtcn3Types.ttcn +// Description: +// References: +// Rev: +// Prodnr: +// Updated: +// Contact: http://ttcn.ericsson.se +// +//////////////////////////////////////////////////////////////////////////////// +module UsefulTtcn3Types { + + + type integer byte (-128 .. 127) with { variant "/* 8 bit */" }; + + type integer unsignedbyte (0 .. 255) with { variant "/*unsigned 8 bit*/" }; + + type integer short (-32768 .. 32767) with { variant "/*16 bit*/" }; + + type integer unsignedshort (0 .. 65535) with { variant "/*unsigned 16 bit*/" }; + + type integer long (-2147483648 .. 2147483647) with { variant "/*32 bit*/" }; + + type integer unsignedlong (0 .. 4294967295) with { variant "/*unsigned 32 bit*/" }; + + type integer longlong /* ( -9223372036854775808 .. 9223372036854775807 ) */ with { variant "/*64 bit*/" }; + + type integer unsignedlonglong /* ( 0 .. 18446744073709551615 ) */ with { variant "/*unsigned 64 bit*/" }; + + type float IEEE754float with { variant "/*IEEE754 float*/" }; + + type float IEEE754double with { variant "/*IEEE754 double*/" }; + + type float IEEE754extfloat with { variant "/*IEEE754 extended float*/" }; + + type float IEEE754extdouble with { variant "/*IEEE754 extended double*/" }; + + type universal charstring utf8string with { variant "/*UTF-8*/" }; + + type universal charstring bmpstring ( char ( 0,0,0,0 ) .. char ( 0,0,255,255) ) with { variant "/*UCS-2*/" }; + + type universal charstring utf16string ( char ( 0,0,0,0 ) .. char ( 0,16,255,255) ) with { variant "/*UTF-16*/" }; + + type universal charstring iso8859string ( char ( 0,0,0,0 ) .. char ( 0,0,0,255) ) with { variant "/*8 bit*/" }; + + type record IDLfixed + { + unsignedshort digits, + short scale, + charstring value_ + } + with { + variant "/*IDL:fixed FORMAL/01-12-01 v.2.6*/"; + }; + + /* + type charstring char length (1); + + NOTE 1: The name of this useful type is the same as the TTCN-3 keyword used to denote universal + charstring values in the quadraple form. In general it is disallowed to use TTCN-3 keywords as + identifiers. The "char" useful type is a solitary exception and allowed only for backward compatibility + with previous versions of the TTCN-3 standard. (except Titan doesn't) + + NOTE 2: The special string "8 bit" defined in clause 28.2.3 may be used with this type to specify a given encoding + for its values. Also, other properties of the base type can be changed by using attribute mechanisms. + */ + + type universal charstring uchar length (1); + + /* + NOTE: Special strings defined in clause 28.2.3 except "8 bit" may be used with this type to specify a given + encoding for its values. Also, other properties of the base type can be changed by using attribute + mechanisms. + */ + + type bitstring bit length (1); + + type hexstring hex length (1); + + type octetstring octet length (1); + +} +with { +encode "XML"; +} diff --git a/ttcn/LibEmcom/LibNg112/xsd/XSD.ttcn b/ttcn/LibEmcom/LibNg112/xsd/XSD.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..00fba8f49362da33013632663f4c409f4ab1c67a --- /dev/null +++ b/ttcn/LibEmcom/LibNg112/xsd/XSD.ttcn @@ -0,0 +1,337 @@ +/******************************************************************************* +* Copyright (c) 2000-2016 Ericsson Telecom AB +* +* XSD to TTCN-3 Translator version: CRL 113 200/5 R4D +* +* All rights reserved. This program and the accompanying materials +* are made available under the terms of the Eclipse Public License v1.0 +* which accompanies this distribution, and is available at +* http://www.eclipse.org/legal/epl-v10.html +*******************************************************************************/ +// +// File: XSD.ttcn +// Description: +// References: +// Rev: +// Prodnr: +// Updated: +// Contact: http://ttcn.ericsson.se +// +//////////////////////////////////////////////////////////////////////////////// +module XSD { + +import from UsefulTtcn3Types all; + +//These constants are used in the XSD date/time type definitions +const charstring + dash := "-", + cln := ":", + year := "[0-9]#4", + yearExpansion := "(-([1-9][0-9]#(0,))#(,1))#(,1)", + month := "(0[1-9]|1[0-2])", + dayOfMonth := "(0[1-9]|[12][0-9]|3[01])", + hour := "([01][0-9]|2[0-3])", + minute := "([0-5][0-9])", + second := "([0-5][0-9])", + sFraction := "(.[0-9]#(1,))#(,1)", + endOfDayExt := "24:00:00(.0#(1,))#(,1)", + nums := "[0-9]#(1,)", + ZorTimeZoneExt := "(Z|[+-]((0[0-9]|1[0-3]):[0-5][0-9]|14:00))#(,1)", + durTime := "(T[0-9]#(1,)"& + "(H([0-9]#(1,)(M([0-9]#(1,)(S|.[0-9]#(1,)S))#(,1)|.[0-9]#(1,)S|S))#(,1)|"& + "M([0-9]#(1,)(S|.[0-9]#(1,)S)|.[0-9]#(1,)M)#(,1)|"& + "S|"& + ".[0-9]#(1,)S))" + +//anySimpleType + +type XMLCompatibleString AnySimpleType +with { +variant "XSD:anySimpleType"; +}; + +//anyType; + +type record AnyType +{ + record of String embed_values optional, + record of String attr optional, + record of String elem_list +} +with { +variant "XSD:anyType"; +variant "embedValues"; +variant (attr) "anyAttributes"; +variant (elem_list) "anyElement"; +}; +// String types + +type XMLCompatibleString String +with { +variant "XSD:string"; +}; + +type XMLStringWithNoCRLFHT NormalizedString +with { +variant "XSD:normalizedString"; +}; + +type NormalizedString Token +with { +variant "XSD:token"; +}; + +type XMLStringWithNoWhitespace Name +with { +variant "XSD:Name"; +}; + +type XMLStringWithNoWhitespace NMTOKEN +with { +variant "XSD:NMTOKEN"; +}; + +type Name NCName +with { +variant "XSD:NCName"; +}; + +type NCName ID +with { +variant "XSD:ID"; +}; + +type NCName IDREF +with { +variant "XSD:IDREF"; +}; + +type NCName ENTITY +with { +variant "XSD:ENTITY"; +}; + +type octetstring HexBinary +with { +variant "XSD:hexBinary"; +}; + +type octetstring Base64Binary +with { +variant "XSD:base64Binary"; +}; + +type XMLStringWithNoCRLFHT AnyURI +with { +variant "XSD:anyURI"; +}; + +type charstring Language (pattern "[a-zA-Z]#(1,8)(-\w#(1,8))#(0,)") +with { +variant "XSD:language"; +}; +// Integer types + +type integer Integer +with { +variant "XSD:integer"; +}; + +type integer PositiveInteger (1 .. infinity) +with { +variant "XSD:positiveInteger"; +}; + +type integer NonPositiveInteger (-infinity .. 0) +with { +variant "XSD:nonPositiveInteger"; +}; + +type integer NegativeInteger (-infinity .. -1) +with { +variant "XSD:negativeInteger"; +}; + +type integer NonNegativeInteger (0 .. infinity) +with { +variant "XSD:nonNegativeInteger"; +}; + +type longlong Long +with { +variant "XSD:long"; +}; + +type unsignedlonglong UnsignedLong +with { +variant "XSD:unsignedLong"; +}; + +type long Int +with { +variant "XSD:int"; +}; + +type unsignedlong UnsignedInt +with { +variant "XSD:unsignedInt"; +}; + +type short Short +with { +variant "XSD:short"; +}; + +type unsignedshort UnsignedShort +with { +variant "XSD:unsignedShort"; +}; + +type byte Byte +with { +variant "XSD:byte"; +}; + +type unsignedbyte UnsignedByte +with { +variant "XSD:unsignedByte"; +}; + +// Float types + +type float Decimal +with { +variant "XSD:decimal"; +}; + +type IEEE754float Float +with { +variant "XSD:float"; +}; + +type IEEE754double Double +with { +variant "XSD:double"; +}; + +// Time types + +type charstring Duration (pattern + "{dash}#(,1)P({nums}(Y({nums}(M({nums}D{durTime}#(,1)|{durTime}#(,1))|D{durTime}#(,1))|" & + "{durTime}#(,1))|M({nums}D{durTime}#(,1)|{durTime}#(,1))|D{durTime}#(,1))|{durTime})") +with { +variant "XSD:duration"; +}; + +type charstring DateTime (pattern + "{yearExpansion}{year}{dash}{month}{dash}{dayOfMonth}T({hour}{cln}{minute}{cln}{second}" & + "{sFraction}|{endOfDayExt}){ZorTimeZoneExt}" ) +with { +variant "XSD:dateTime"; +}; + +type charstring Time (pattern + "({hour}{cln}{minute}{cln}{second}{sFraction}|{endOfDayExt}){ZorTimeZoneExt}" ) +with { +variant "XSD:time"; +}; + +type charstring Date (pattern + "{yearExpansion}{year}{dash}{month}{dash}{dayOfMonth}{ZorTimeZoneExt}" ) +with { +variant "XSD:date"; +}; + +type charstring GYearMonth (pattern + "{yearExpansion}{year}{dash}{month}{ZorTimeZoneExt}" ) +with { +variant "XSD:gYearMonth"; +}; + +type charstring GYear (pattern + "{yearExpansion}{year}{ZorTimeZoneExt}" ) +with { +variant "XSD:gYear"; +}; + +type charstring GMonthDay (pattern + "{dash}{dash}{month}{dash}{dayOfMonth}{ZorTimeZoneExt}" ) +with { +variant "XSD:gMonthDay"; +}; + +type charstring GDay (pattern + "{dash}{dash}{dash}{dayOfMonth}{ZorTimeZoneExt}" ) +with { +variant "XSD:gDay"; +}; + +type charstring GMonth (pattern + "{dash}{dash}{month}{ZorTimeZoneExt}" ) +with { +variant "XSD:gMonth"; +}; + +// Sequence types + +type record of NMTOKEN NMTOKENS +with { +variant "XSD:NMTOKENS"; +}; + +type record of IDREF IDREFS +with { +variant "XSD:IDREFS"; +}; + +type record of ENTITY ENTITIES +with { +variant "XSD:ENTITIES"; +}; + +type record QName +{ + AnyURI uri optional, + NCName name +} +with { +variant "XSD:QName"; +}; + +// Boolean type + +type boolean Boolean +with { +variant "XSD:boolean"; +}; + +//TTCN-3 type definitions supporting the mapping of W3C XML Schema built-in datatypes + +type utf8string XMLCompatibleString +( + char(0,0,0,9)..char(0,0,0,9), + char(0,0,0,10)..char(0,0,0,10), + char(0,0,0,12)..char(0,0,0,12), + char(0,0,0,32)..char(0,0,215,255), + char(0,0,224,0)..char(0,0,255,253), + char(0,1,0,0)..char(0,16,255,253) +) + +type utf8string XMLStringWithNoWhitespace +( + char(0,0,0,33)..char(0,0,215,255), + char(0,0,224,0)..char(0,0,255,253), + char(0,1,0,0)..char(0,16,255,253) +) + +type utf8string XMLStringWithNoCRLFHT +( + char(0,0,0,32)..char(0,0,215,255), + char(0,0,224,0)..char(0,0,255,253), + char(0,1,0,0)..char(0,16,255,253) +) + +} +with{ +encode "XML" +} diff --git a/ttcn/LibEmcom/LibNg112/xsd/basicTypes.xsd b/ttcn/LibEmcom/LibNg112/xsd/basicTypes.xsd new file mode 100644 index 0000000000000000000000000000000000000000..b4c99d66d6bc52a9d7d2ba334beaf53a5370a657 --- /dev/null +++ b/ttcn/LibEmcom/LibNg112/xsd/basicTypes.xsd @@ -0,0 +1,49 @@ + + + + + + Copyright (c) 2007,2009 Open Geospatial Consortium. + To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ttcn/LibEmcom/LibNg112/xsd/geometryBasic0d1d.xsd b/ttcn/LibEmcom/LibNg112/xsd/geometryBasic0d1d.xsd new file mode 100644 index 0000000000000000000000000000000000000000..be5a2e17fd8039de8755b58e8d154cd592687008 --- /dev/null +++ b/ttcn/LibEmcom/LibNg112/xsd/geometryBasic0d1d.xsd @@ -0,0 +1,147 @@ + + + + + + Copyright (c) 2007,2009 Open Geospatial Consortium. + To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ttcn/LibEmcom/LibNg112/xsd/geometryBasic2d.xsd b/ttcn/LibEmcom/LibNg112/xsd/geometryBasic2d.xsd new file mode 100644 index 0000000000000000000000000000000000000000..fe08646615d731e58f46b527bfa89f7d7316eaa8 --- /dev/null +++ b/ttcn/LibEmcom/LibNg112/xsd/geometryBasic2d.xsd @@ -0,0 +1,77 @@ + + + + + + Copyright (c) 2007,2009 Open Geospatial Consortium. + To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ttcn/LibEmcom/LibNg112/xsd/geometryPrimitives.xsd b/ttcn/LibEmcom/LibNg112/xsd/geometryPrimitives.xsd new file mode 100644 index 0000000000000000000000000000000000000000..c7950625e22e1a2fa012ba15d51725eaab75cd29 --- /dev/null +++ b/ttcn/LibEmcom/LibNg112/xsd/geometryPrimitives.xsd @@ -0,0 +1,218 @@ + + + + + + Copyright (c) 2007,2009 Open Geospatial Consortium. + To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ttcn/LibEmcom/LibNg112/xsd/gmlBase.xsd b/ttcn/LibEmcom/LibNg112/xsd/gmlBase.xsd new file mode 100644 index 0000000000000000000000000000000000000000..2324d63bbfe1d43e111159765ec31bf917db29d4 --- /dev/null +++ b/ttcn/LibEmcom/LibNg112/xsd/gmlBase.xsd @@ -0,0 +1,25 @@ + + + + + + Copyright (c) 2007,2009 Open Geospatial Consortium. + To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ . + + + + + + + + + + + + + + diff --git a/ttcn/LibEmcom/LibNg112/xsd/http_www_opengis_net_gml.ttcn b/ttcn/LibEmcom/LibNg112/xsd/http_www_opengis_net_gml.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..7baef900ee3fbc0876f8dd9a2f1960ea2f426597 --- /dev/null +++ b/ttcn/LibEmcom/LibNg112/xsd/http_www_opengis_net_gml.ttcn @@ -0,0 +1,1000 @@ +/******************************************************************************* +* Copyright (c) 2000-2018 Ericsson Telecom AB +* +* XSD to TTCN-3 Translator version: CRL 113 200/6 R4A +* +* All rights reserved. This program and the accompanying materials +* are made available under the terms of the Eclipse Public License v1.0 +* which accompanies this distribution, and is available at +* http://www.eclipse.org/legal/epl-v10.html +*******************************************************************************/ +// +// File: http_www_opengis_net_gml.ttcn +// Description: +// References: +// Rev: +// Prodnr: +// Updated: Tue Jul 3 08:58:44 2018 +// Contact: http://ttcn.ericsson.se +// +//////////////////////////////////////////////////////////////////////////////// +// Generated from file(s): +// - basicTypes.xsd +// /* xml version = "1.0" */ +// /* targetnamespace = "http://www.opengis.net/gml" */ +// - gmlBase.xsd +// /* xml version = "1.0" */ +// /* targetnamespace = "http://www.opengis.net/gml" */ +// - measures.xsd +// /* xml version = "1.0" */ +// /* targetnamespace = "http://www.opengis.net/gml" */ +// - geometryBasic0d1d.xsd +// /* xml version = "1.0" */ +// /* targetnamespace = "http://www.opengis.net/gml" */ +// - geometryBasic2d.xsd +// /* xml version = "1.0" */ +// /* targetnamespace = "http://www.opengis.net/gml" */ +// - geometryPrimitives.xsd +// /* xml version = "1.0" */ +// /* targetnamespace = "http://www.opengis.net/gml" */ +//////////////////////////////////////////////////////////////////////////////// +// Modification header(s): +//----------------------------------------------------------------------------- +// Modified by: +// Modification date: +// Description: +// Modification contact: +//------------------------------------------------------------------------------ +//////////////////////////////////////////////////////////////////////////////// + + +module http_www_opengis_net_gml { + + +import from XSD all; + + +/* Copyright (c) 2007,2009 Open Geospatial Consortium. + To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ . */ + + +type enumerated SignType +{ + x, + x_1 +} +with { + variant "text 'x' as '-'"; + variant "text 'x_1' as '+'"; +}; + + +type record of XSD.Boolean BooleanList +with { + variant "name as uncapitalized"; + variant "list"; + //variant "text 'true' as '1'"; + //variant "text 'false' as '0'"; +}; + + +type record of XSD.Name NameList +with { + variant "list"; +}; + + +type record of XSD.Double DoubleList +with { + variant "name as uncapitalized"; + variant "list"; +}; + + +type record of XSD.Integer IntegerList +with { + variant "name as uncapitalized"; + variant "list"; +}; + + +type record MeasureType +{ + XSD.AnyURI uom, + XSD.Double base +} +with { + variant (uom) "attribute"; + variant (base) "untagged"; +}; + + +type record of XSD.NCName NCNameList +with { + variant "list"; +}; + + +/* Copyright (c) 2007,2009 Open Geospatial Consortium. + To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ . */ + + +type record AbstractGMLType +{ + Id id optional +} +with { + variant "abstract"; + variant (id) "attribute"; +}; + + +type XSD.ID Id +with { + variant "name as uncapitalized"; + variant "attribute"; +}; +/* + +type union Object_group +{ + XSD.AnyType object, + GML_group gML +} +with { + variant "untagged"; + variant (object) "name as '_Object'"; + variant (object) "form as qualified"; + variant (object) "abstract"; + variant (gML) "name as '_GML'"; +}; + + +type union GML_group +{ + AbstractGMLType gML, + Geometry_group geometry +} +with { + variant "untagged"; + variant (gML) "name as '_GML'"; + variant (gML) "form as qualified"; + variant (gML) "abstract"; + variant (geometry) "name as '_Geometry'"; +}; + +*/ +/* Copyright (c) 2007,2009 Open Geospatial Consortium. + To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ . */ + + +type MeasureType Measure +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +type MeasureType LengthType; + + +type MeasureType Angle +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +type MeasureType AngleType; + + +/* Copyright (c) 2007,2009 Open Geospatial Consortium. + To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ . */ +/* + +type record GeometryPropertyType +{ + Geometry_group geometry +} +with { + variant (geometry) "name as '_Geometry'"; +}; + + + +type record GeometryArrayPropertyType +{ + record of Geometry_group geometry_list +} +with { + variant (geometry_list) "untagged"; + variant (geometry_list[-]) "name as '_Geometry'"; +}; +*/ + +type record AbstractGeometryType +{ + NCNameList axisLabels optional, + XSD.String gid optional, + Id id optional, + XSD.PositiveInteger srsDimension optional, + XSD.AnyURI srsName optional, + NCNameList uomLabels optional +} +with { + variant "abstract"; + variant (axisLabels) "attribute"; + variant (gid) "attribute"; + variant (id) "attribute"; + variant (srsDimension) "attribute"; + variant (srsName) "attribute"; + variant (uomLabels) "attribute"; +}; + + +type AbstractGeometryType AbstractGeometricPrimitiveType +with { + variant "abstract"; +}; + + +type PointType Point +with { + variant "element"; +}; + + +type record PointType +{ + NCNameList axisLabels optional, + XSD.String gid optional, + Id id optional, + XSD.PositiveInteger srsDimension optional, + XSD.AnyURI srsName optional, + NCNameList uomLabels optional, + Pos pos +} +with { + variant (axisLabels) "attribute"; + variant (gid) "attribute"; + variant (id) "attribute"; + variant (srsDimension) "attribute"; + variant (srsName) "attribute"; + variant (uomLabels) "attribute"; +}; + + +type PointPropertyType PointProperty +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +type record PointPropertyType +{ + Point point +} +with { + variant (point) "name as capitalized"; +}; + + +type AbstractGeometricPrimitiveType AbstractCurveType +with { + variant "abstract"; +}; + + +type CurvePropertyType CurveProperty +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +type record CurvePropertyType +{ + Curve_group curve +} +with { + variant (curve) "name as '_Curve'"; +}; + + +type LineStringType LineString +with { + variant "element"; +}; + + +type record LineStringType +{ + NCNameList axisLabels optional, + XSD.String gid optional, + Id id optional, + XSD.PositiveInteger srsDimension optional, + XSD.AnyURI srsName optional, + NCNameList uomLabels optional, + union { + record length(2 .. infinity) of union { + Pos pos, + PointProperty pointProperty + } choice_list, + PosList posList + } choice +} +with { + variant (axisLabels) "attribute"; + variant (gid) "attribute"; + variant (id) "attribute"; + variant (srsDimension) "attribute"; + variant (srsName) "attribute"; + variant (uomLabels) "attribute"; + variant (choice) "untagged"; + variant (choice.choice_list) "untagged"; + variant (choice.choice_list[-]) "untagged"; +}; + + +type DirectPositionType Pos +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +type DoubleList DirectPositionType; + + +type DirectPositionListType PosList +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +type record DirectPositionListType +{ + XSD.PositiveInteger count optional, + DoubleList base +} +with { + variant (count) "attribute"; + variant (base) "untagged"; +}; + + +type EnvelopeType Envelope +with { + variant "element"; +}; + + +type record EnvelopeType +{ + NCNameList axisLabels optional, + XSD.PositiveInteger srsDimension optional, + XSD.AnyURI srsName optional, + NCNameList uomLabels optional, + union { + record { + DirectPositionType lowerCorner, + DirectPositionType upperCorner + } sequence, + record length(2) of Pos pos_list + } choice +} +with { + variant (axisLabels) "attribute"; + variant (srsDimension) "attribute"; + variant (srsName) "attribute"; + variant (uomLabels) "attribute"; + variant (choice) "untagged"; + variant (choice.sequence) "untagged"; + variant (choice.pos_list) "untagged"; + variant (choice.pos_list[-]) "name as 'pos'"; +}; + +/* + +type union Geometry_group +{ + AbstractGeometryType geometry, + GeometricPrimitive_group geometricPrimitive, + Ring_group ring +} +with { + variant "untagged"; + variant (geometry) "name as '_Geometry'"; + variant (geometry) "form as qualified"; + variant (geometry) "abstract"; + variant (geometricPrimitive) "name as '_GeometricPrimitive'"; + variant (ring) "name as '_Ring'"; +}; + + +type union GeometricPrimitive_group +{ + AbstractGeometricPrimitiveType geometricPrimitive, + Curve_group curve, + Point point, + Solid_group solid, + Surface_group_1 surface +} +with { + variant "untagged"; + variant (geometricPrimitive) "name as '_GeometricPrimitive'"; + variant (geometricPrimitive) "form as qualified"; + variant (geometricPrimitive) "abstract"; + variant (curve) "name as '_Curve'"; + variant (point) "name as capitalized"; + variant (solid) "name as '_Solid'"; + variant (surface) "name as '_Surface'"; +}; + +*/ +type union Curve_group +{ + AbstractCurveType curve, + Curve curve_1, + LineString lineString +} +with { + variant "untagged"; + variant (curve) "name as '_Curve'"; + variant (curve) "form as qualified"; + variant (curve) "abstract"; + variant (curve_1) "name as 'Curve'"; + variant (lineString) "name as capitalized"; +}; + + +/* Copyright (c) 2007,2009 Open Geospatial Consortium. + To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ . */ + + +type AbstractGeometricPrimitiveType AbstractSurfaceType; + +/* +type SurfacePropertyType SurfaceProperty +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +type record SurfacePropertyType +{ + Surface_group_1 surface +} +with { + variant (surface) "name as '_Surface'"; +}; + +*/ + + +type PolygonType Polygon +with { + variant "element"; +}; + + +type record PolygonType +{ + NCNameList axisLabels optional, + XSD.String gid optional, + Id id optional, + XSD.PositiveInteger srsDimension optional, + XSD.AnyURI srsName optional, + NCNameList uomLabels optional, + Exterior exterior optional +} +with { + variant (axisLabels) "attribute"; + variant (gid) "attribute"; + variant (id) "attribute"; + variant (srsDimension) "attribute"; + variant (srsName) "attribute"; + variant (uomLabels) "attribute"; +}; + + +type AbstractGeometryType AbstractRingType +with { + variant "abstract"; +}; + + +type AbstractRingPropertyType Exterior +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +type record AbstractRingPropertyType +{ + Ring_group ring +} +with { + variant (ring) "name as '_Ring'"; +}; + + +type LinearRingType LinearRing +with { + variant "element"; +}; + + +type record LinearRingType +{ + NCNameList axisLabels optional, + XSD.String gid optional, + Id id optional, + XSD.PositiveInteger srsDimension optional, + XSD.AnyURI srsName optional, + NCNameList uomLabels optional, + union { + record length(4 .. infinity) of union { + Pos pos, + PointProperty pointProperty + } choice_list, + PosList posList + } choice +} +with { + variant (axisLabels) "attribute"; + variant (gid) "attribute"; + variant (id) "attribute"; + variant (srsDimension) "attribute"; + variant (srsName) "attribute"; + variant (uomLabels) "attribute"; + variant (choice) "untagged"; + variant (choice.choice_list) "untagged"; + variant (choice.choice_list[-]) "untagged"; +}; + +/* +type union Surface_group_1 +{ + AbstractSurfaceType surface, + ArcBand arcBand, + Circle circle, + Ellipse ellipse, + Polygon polygon, + Surface_group surface_1 +} +with { + variant "untagged"; + variant (surface) "name as '_Surface'"; + variant (surface) "form as qualified"; + variant (surface) "abstract"; + variant (arcBand) "name as capitalized"; + variant (circle) "name as capitalized"; + variant (ellipse) "name as capitalized"; + variant (polygon) "name as capitalized"; + variant (surface_1) "name as 'Surface'"; +}; + +*/ +type union Ring_group +{ + AbstractRingType ring, + LinearRing linearRing +} +with { + variant "untagged"; + variant (ring) "name as '_Ring'"; + variant (ring) "form as qualified"; + variant (ring) "abstract"; + variant (linearRing) "name as capitalized"; +}; + + +const XSD.Integer c_defaultForEmpty_1 := 0; + + +const CurveInterpolationType c_defaultForEmpty_2 := linear; + + +const CurveInterpolationType c_defaultForEmpty_3 := circularArcCenterPointWithRadius; + + +const XSD.Integer c_defaultForEmpty_4 := 1; + + +const SurfaceInterpolationType c_defaultForEmpty_5 := planar; + + +/* Copyright (c) 2007,2009 Open Geospatial Consortium. + To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ . */ + + +type CurveType Curve +with { + variant "element"; +}; + + +type record CurveType +{ + NCNameList axisLabels optional, + XSD.String gid optional, + Id id optional, + XSD.PositiveInteger srsDimension optional, + XSD.AnyURI srsName optional, + NCNameList uomLabels optional, + Segments segments +} +with { + variant (axisLabels) "attribute"; + variant (gid) "attribute"; + variant (id) "attribute"; + variant (srsDimension) "attribute"; + variant (srsName) "attribute"; + variant (uomLabels) "attribute"; +}; + + +type record AbstractCurveSegmentType +{ + XSD.Integer numDerivativeInterior optional, + XSD.Integer numDerivativesAtEnd optional, + XSD.Integer numDerivativesAtStart optional +} +with { + variant "abstract"; + variant (numDerivativeInterior) "defaultForEmpty as c_defaultForEmpty_1"; + variant (numDerivativeInterior) "attribute"; + variant (numDerivativesAtEnd) "defaultForEmpty as c_defaultForEmpty_1"; + variant (numDerivativesAtEnd) "attribute"; + variant (numDerivativesAtStart) "defaultForEmpty as c_defaultForEmpty_1"; + variant (numDerivativesAtStart) "attribute"; +}; + + +type CurveSegmentArrayPropertyType Segments +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +type record CurveSegmentArrayPropertyType +{ + record of CurveSegment_group curveSegment_list +} +with { + variant (curveSegment_list) "untagged"; + variant (curveSegment_list[-]) "name as '_CurveSegment'"; +}; + + +type LineStringSegmentType LineStringSegment +with { + variant "element"; +}; + + +type record LineStringSegmentType +{ + CurveInterpolationType interpolation (c_defaultForEmpty_2) optional, + XSD.Integer numDerivativeInterior optional, + XSD.Integer numDerivativesAtEnd optional, + XSD.Integer numDerivativesAtStart optional, + union { + record length(2 .. infinity) of union { + Pos pos, + PointProperty pointProperty + } choice_list, + PosList posList + } choice +} +with { + variant (interpolation) "defaultForEmpty as c_defaultForEmpty_2"; + variant (interpolation) "attribute"; + variant (numDerivativeInterior) "defaultForEmpty as c_defaultForEmpty_1"; + variant (numDerivativeInterior) "attribute"; + variant (numDerivativesAtEnd) "defaultForEmpty as c_defaultForEmpty_1"; + variant (numDerivativesAtEnd) "attribute"; + variant (numDerivativesAtStart) "defaultForEmpty as c_defaultForEmpty_1"; + variant (numDerivativesAtStart) "attribute"; + variant (choice) "untagged"; + variant (choice.choice_list) "untagged"; + variant (choice.choice_list[-]) "untagged"; +}; + + +type record ArcByCenterPointType +{ + CurveInterpolationType interpolation (c_defaultForEmpty_3) optional, + XSD.Integer numArc (c_defaultForEmpty_4), + XSD.Integer numDerivativeInterior optional, + XSD.Integer numDerivativesAtEnd optional, + XSD.Integer numDerivativesAtStart optional, + union { + Pos pos, + PointProperty pointProperty + } choice, + LengthType radius, + AngleType startAngle optional, + AngleType endAngle optional +} +with { + variant (interpolation) "defaultForEmpty as c_defaultForEmpty_3"; + variant (interpolation) "attribute"; + variant (numArc) "defaultForEmpty as c_defaultForEmpty_4"; + variant (numArc) "attribute"; + variant (numDerivativeInterior) "defaultForEmpty as c_defaultForEmpty_1"; + variant (numDerivativeInterior) "attribute"; + variant (numDerivativesAtEnd) "defaultForEmpty as c_defaultForEmpty_1"; + variant (numDerivativesAtEnd) "attribute"; + variant (numDerivativesAtStart) "defaultForEmpty as c_defaultForEmpty_1"; + variant (numDerivativesAtStart) "attribute"; + variant (choice) "untagged"; +}; + + +type CircleByCenterPointType CircleByCenterPoint +with { + variant "element"; +}; + + +type ArcByCenterPointType CircleByCenterPointType; + + +type record SurfaceType +{ + NCNameList axisLabels optional, + XSD.String gid optional, + Id id optional, + XSD.PositiveInteger srsDimension optional, + XSD.AnyURI srsName optional, + NCNameList uomLabels optional, + Patches_group patches +} +with { + variant (axisLabels) "attribute"; + variant (gid) "attribute"; + variant (id) "attribute"; + variant (srsDimension) "attribute"; + variant (srsName) "attribute"; + variant (uomLabels) "attribute"; +}; + + +type record AbstractSurfacePatchType +{ + +} +with { + variant "abstract"; +}; + + +type record SurfacePatchArrayPropertyType +{ + record of record { + SurfacePatch_group surfacePatch + } sequence_list +} +with { + variant (sequence_list) "untagged"; + variant (sequence_list[-]) "untagged"; + variant (sequence_list[-].surfacePatch) "name as '_SurfacePatch'"; +}; + + +type PolygonPatchType PolygonPatch +with { + variant "element"; +}; + + +type record PolygonPatchType +{ + SurfaceInterpolationType interpolation (c_defaultForEmpty_5) optional, + Exterior exterior optional +} +with { + variant (interpolation) "defaultForEmpty as c_defaultForEmpty_5"; + variant (interpolation) "attribute"; +}; + + +type RectangleType Rectangle +with { + variant "element"; +}; + + +type record RectangleType +{ + SurfaceInterpolationType interpolation (c_defaultForEmpty_5) optional, + Exterior exterior +} +with { + variant (interpolation) "defaultForEmpty as c_defaultForEmpty_5"; + variant (interpolation) "attribute"; +}; + + +type PolyhedralSurfaceType PolyhedralSurface +with { + variant "element"; +}; + + +type record PolyhedralSurfaceType +{ + NCNameList axisLabels optional, + XSD.String gid optional, + Id id optional, + XSD.PositiveInteger srsDimension optional, + XSD.AnyURI srsName optional, + NCNameList uomLabels optional +} +with { + variant (axisLabels) "attribute"; + variant (gid) "attribute"; + variant (id) "attribute"; + variant (srsDimension) "attribute"; + variant (srsName) "attribute"; + variant (uomLabels) "attribute"; +}; + + +type PolygonPatchArrayPropertyType PolygonPatches +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +type SurfacePatchArrayPropertyType PolygonPatchArrayPropertyType; + + +type AbstractGeometricPrimitiveType AbstractSolidType; + +/* +type SolidType Solid +with { + variant "element"; +}; + + +type record SolidType +{ + NCNameList axisLabels optional, + XSD.String gid optional, + Id id optional, + XSD.PositiveInteger srsDimension optional, + XSD.AnyURI srsName optional, + NCNameList uomLabels optional, + SurfacePropertyType exterior optional +} +with { + variant (axisLabels) "attribute"; + variant (gid) "attribute"; + variant (id) "attribute"; + variant (srsDimension) "attribute"; + variant (srsName) "attribute"; + variant (uomLabels) "attribute"; +}; + +*/ +type enumerated CurveInterpolationType +{ + circularArc3Points, + circularArcCenterPointWithRadius, + geodesic, + linear +}; + + +type enumerated SurfaceInterpolationType +{ + planar +}; + + +type union CurveSegment_group +{ + AbstractCurveSegmentType curveSegment, + ArcByCenterPoint_group arcByCenterPoint, + LineStringSegment lineStringSegment +} +with { + variant "untagged"; + variant (curveSegment) "name as '_CurveSegment'"; + variant (curveSegment) "form as qualified"; + variant (curveSegment) "abstract"; + variant (arcByCenterPoint) "name as capitalized"; + variant (lineStringSegment) "name as capitalized"; +}; + + +type union ArcByCenterPoint_group +{ + ArcByCenterPointType arcByCenterPoint, + CircleByCenterPoint circleByCenterPoint +} +with { + variant "untagged"; + variant (arcByCenterPoint) "name as capitalized"; + variant (arcByCenterPoint) "form as qualified"; + variant (circleByCenterPoint) "name as capitalized"; +}; + + +type union SurfacePatch_group +{ + AbstractSurfacePatchType surfacePatch, + PolygonPatch polygonPatch, + Rectangle rectangle +} +with { + variant "untagged"; + variant (surfacePatch) "name as '_SurfacePatch'"; + variant (surfacePatch) "form as qualified"; + variant (surfacePatch) "abstract"; + variant (polygonPatch) "name as capitalized"; + variant (rectangle) "name as capitalized"; +}; + + +type union Surface_group +{ + SurfaceType surface, + PolyhedralSurface polyhedralSurface +} +with { + variant "untagged"; + variant (surface) "name as capitalized"; + variant (surface) "form as qualified"; + variant (polyhedralSurface) "name as capitalized"; +}; + + +type union Patches_group +{ + SurfacePatchArrayPropertyType patches, + PolygonPatches polygonPatches +} +with { + variant "untagged"; + variant (patches) "form as qualified"; +}; + +/* +type union Solid_group +{ + AbstractSolidType solid, + Ellipsoid ellipsoid, + Prism prism, + Solid solid_1, + Sphere sphere +} +with { + variant "untagged"; + variant (solid) "name as '_Solid'"; + variant (solid) "form as qualified"; + variant (solid) "abstract"; + variant (ellipsoid) "name as capitalized"; + variant (prism) "name as capitalized"; + variant (solid_1) "name as 'Solid'"; + variant (sphere) "name as capitalized"; +}; +*/ + +} +with { + encode "XML"; + variant "namespace as 'http://www.opengis.net/gml' prefix 'gml'"; + variant "controlNamespace 'http://www.w3.org/2001/XMLSchema-instance' prefix 'xsi'"; + variant "elementFormQualified"; +} diff --git a/ttcn/LibEmcom/LibNg112/xsd/http_www_opengis_net_pidflo_1_0.ttcn b/ttcn/LibEmcom/LibNg112/xsd/http_www_opengis_net_pidflo_1_0.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..a370b030b8e481f8151ddcdb3b6e571fe5f5d766 --- /dev/null +++ b/ttcn/LibEmcom/LibNg112/xsd/http_www_opengis_net_pidflo_1_0.ttcn @@ -0,0 +1,407 @@ +/******************************************************************************* +* Copyright (c) 2000-2018 Ericsson Telecom AB +* +* XSD to TTCN-3 Translator version: CRL 113 200/6 R4A +* +* All rights reserved. This program and the accompanying materials +* are made available under the terms of the Eclipse Public License v1.0 +* which accompanies this distribution, and is available at +* http://www.eclipse.org/legal/epl-v10.html +*******************************************************************************/ +// +// File: http_www_opengis_net_pidflo_1_0.ttcn +// Description: +// References: +// Rev: +// Prodnr: +// Updated: Tue Jul 3 08:58:44 2018 +// Contact: http://ttcn.ericsson.se +// +//////////////////////////////////////////////////////////////////////////////// +// Generated from file(s): +// - GML-pidf-lo-shape.xsd +// /* xml version = "1.0" */ +// /* targetnamespace = "http://www.opengis.net/pidflo/1.0" */ +//////////////////////////////////////////////////////////////////////////////// +// Modification header(s): +//----------------------------------------------------------------------------- +// Modified by: +// Modification date: +// Description: +// Modification contact: +//------------------------------------------------------------------------------ +//////////////////////////////////////////////////////////////////////////////// + + +module http_www_opengis_net_pidflo_1_0 { + + +import from XSD all; + + +import from http_www_opengis_net_gml all; + + +/* This document defines geodetic shape types for PIDF-LO. + + Copyright (c) 2007,2009 Open Geospatial Consortium. + To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ . */ + + +type CircleType Circle +with { + variant "element"; +}; + + +type record CircleType +{ + NCNameList axisLabels optional, + XSD.String gid optional, + Id id optional, + XSD.PositiveInteger srsDimension optional, + XSD.AnyURI srsName optional, + NCNameList uomLabels optional, + CenterGroup centerGroup, + LengthType radius +} +with { + variant (axisLabels) "attribute"; + variant (gid) "attribute"; + variant (id) "attribute"; + variant (srsDimension) "attribute"; + variant (srsName) "attribute"; + variant (uomLabels) "attribute"; +}; + + +type EllipseType Ellipse +with { + variant "element"; +}; + + +type record EllipseType +{ + NCNameList axisLabels optional, + XSD.String gid optional, + Id id optional, + XSD.PositiveInteger srsDimension optional, + XSD.AnyURI srsName optional, + NCNameList uomLabels optional, + CenterGroup centerGroup, + LengthType semiMajorAxis, + LengthType semiMinorAxis, + AngleType orientation +} +with { + variant (axisLabels) "attribute"; + variant (gid) "attribute"; + variant (id) "attribute"; + variant (srsDimension) "attribute"; + variant (srsName) "attribute"; + variant (uomLabels) "attribute"; +}; + + +type ArcBandType ArcBand +with { + variant "element"; +}; + + +type record ArcBandType +{ + NCNameList axisLabels optional, + XSD.String gid optional, + Id id optional, + XSD.PositiveInteger srsDimension optional, + XSD.AnyURI srsName optional, + NCNameList uomLabels optional, + CenterGroup centerGroup, + LengthType innerRadius, + LengthType outerRadius, + AngleType startAngle, + AngleType openingAngle +} +with { + variant (axisLabels) "attribute"; + variant (gid) "attribute"; + variant (id) "attribute"; + variant (srsDimension) "attribute"; + variant (srsName) "attribute"; + variant (uomLabels) "attribute"; +}; + + +type PrismType Prism +with { + variant "element"; +}; + + +type record PrismType +{ + NCNameList axisLabels optional, + XSD.String gid optional, + Id id optional, + XSD.PositiveInteger srsDimension optional, + XSD.AnyURI srsName optional, + NCNameList uomLabels optional, + SurfacePropertyType base, + LengthType height +} +with { + variant (axisLabels) "attribute"; + variant (gid) "attribute"; + variant (id) "attribute"; + variant (srsDimension) "attribute"; + variant (srsName) "attribute"; + variant (uomLabels) "attribute"; +}; + + +type SphereType Sphere +with { + variant "element"; +}; + + +type record SphereType +{ + NCNameList axisLabels optional, + XSD.String gid optional, + Id id optional, + XSD.PositiveInteger srsDimension optional, + XSD.AnyURI srsName optional, + NCNameList uomLabels optional, + CenterGroup centerGroup, + LengthType radius +} +with { + variant (axisLabels) "attribute"; + variant (gid) "attribute"; + variant (id) "attribute"; + variant (srsDimension) "attribute"; + variant (srsName) "attribute"; + variant (uomLabels) "attribute"; +}; + + +type EllipsoidType Ellipsoid +with { + variant "element"; +}; + + +type record EllipsoidType +{ + NCNameList axisLabels optional, + XSD.String gid optional, + Id id optional, + XSD.PositiveInteger srsDimension optional, + XSD.AnyURI srsName optional, + NCNameList uomLabels optional, + CenterGroup centerGroup, + LengthType semiMajorAxis, + LengthType semiMinorAxis, + LengthType verticalAxis, + AngleType orientation +} +with { + variant (axisLabels) "attribute"; + variant (gid) "attribute"; + variant (id) "attribute"; + variant (srsDimension) "attribute"; + variant (srsName) "attribute"; + variant (uomLabels) "attribute"; +}; + + +type union CenterGroup +{ + Pos pos, + PointProperty pointProperty +} +with { + variant "untagged"; + variant (pos) "namespace as 'http://www.opengis.net/gml' prefix 'gml'"; + variant (pointProperty) "namespace as 'http://www.opengis.net/gml' prefix 'gml'"; +}; + + + + + +type union Object_group +{ + XSD.AnyType object, + GML_group gML +} +with { + variant "untagged"; + variant (object) "name as '_Object'"; + variant (object) "form as qualified"; + variant (object) "abstract"; + variant (gML) "name as '_GML'"; +}; + + +type union GML_group +{ + AbstractGMLType gML, + Geometry_group geometry +} +with { + variant "untagged"; + variant (gML) "name as '_GML'"; + variant (gML) "form as qualified"; + variant (gML) "abstract"; + variant (geometry) "name as '_Geometry'"; +}; + + +type record GeometryPropertyType +{ + Geometry_group geometry +} +with { + variant (geometry) "name as '_Geometry'"; +}; + + +type record GeometryArrayPropertyType +{ + record of Geometry_group geometry_list +} +with { + variant (geometry_list) "untagged"; + variant (geometry_list[-]) "name as '_Geometry'"; +}; + +type union Geometry_group +{ + AbstractGeometryType geometry, + GeometricPrimitive_group geometricPrimitive, + Ring_group ring +} +with { + variant "untagged"; + variant (geometry) "name as '_Geometry'"; + variant (geometry) "form as qualified"; + variant (geometry) "abstract"; + variant (geometricPrimitive) "name as '_GeometricPrimitive'"; + variant (ring) "name as '_Ring'"; +}; + + +type union GeometricPrimitive_group +{ + AbstractGeometricPrimitiveType geometricPrimitive, + Curve_group curve, + Point point, + Solid_group solid, + Surface_group_1 surface +} +with { + variant "untagged"; + variant (geometricPrimitive) "name as '_GeometricPrimitive'"; + variant (geometricPrimitive) "form as qualified"; + variant (geometricPrimitive) "abstract"; + variant (curve) "name as '_Curve'"; + variant (point) "name as capitalized"; + variant (solid) "name as '_Solid'"; + variant (surface) "name as '_Surface'"; +}; + +type SolidType Solid +with { + variant "element"; +}; + + +type record SolidType +{ + NCNameList axisLabels optional, + XSD.String gid optional, + Id id optional, + XSD.PositiveInteger srsDimension optional, + XSD.AnyURI srsName optional, + NCNameList uomLabels optional, + SurfacePropertyType exterior optional +} +with { + variant (axisLabels) "attribute"; + variant (gid) "attribute"; + variant (id) "attribute"; + variant (srsDimension) "attribute"; + variant (srsName) "attribute"; + variant (uomLabels) "attribute"; +}; + + +type union Solid_group +{ + AbstractSolidType solid, + Ellipsoid ellipsoid, + Prism prism, + Solid solid_1, + Sphere sphere +} +with { + variant "untagged"; + variant (solid) "name as '_Solid'"; + variant (solid) "form as qualified"; + variant (solid) "abstract"; + variant (ellipsoid) "name as capitalized"; + variant (prism) "name as capitalized"; + variant (solid_1) "name as 'Solid'"; + variant (sphere) "name as capitalized"; +}; + + +type SurfacePropertyType SurfaceProperty +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +type record SurfacePropertyType +{ + Surface_group_1 surface +} +with { + variant (surface) "name as '_Surface'"; +}; + + +type union Surface_group_1 +{ + AbstractSurfaceType surface, + ArcBand arcBand, + Circle circle, + Ellipse ellipse, + Polygon polygon, + Surface_group surface_1 +} +with { + variant "untagged"; + variant (surface) "name as '_Surface'"; + variant (surface) "form as qualified"; + variant (surface) "abstract"; + variant (arcBand) "name as capitalized"; + variant (circle) "name as capitalized"; + variant (ellipse) "name as capitalized"; + variant (polygon) "name as capitalized"; + variant (surface_1) "name as 'Surface'"; +}; + + +} +with { + encode "XML"; + variant "namespace as 'http://www.opengis.net/pidflo/1.0' prefix 'gs'"; + variant "controlNamespace 'http://www.w3.org/2001/XMLSchema-instance' prefix 'xsi'"; + variant "elementFormQualified"; +} diff --git a/ttcn/LibEmcom/LibNg112/xsd/http_www_w3_org_XML_1998_namespace.ttcn b/ttcn/LibEmcom/LibNg112/xsd/http_www_w3_org_XML_1998_namespace.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..6f13e878635c68f622a10396e75ff673bf07cdf6 --- /dev/null +++ b/ttcn/LibEmcom/LibNg112/xsd/http_www_w3_org_XML_1998_namespace.ttcn @@ -0,0 +1,154 @@ +/******************************************************************************* +* Copyright (c) 2000-2018 Ericsson Telecom AB +* +* XSD to TTCN-3 Translator version: CRL 113 200/6 R4A +* +* All rights reserved. This program and the accompanying materials +* are made available under the terms of the Eclipse Public License v2.0 +* which accompanies this distribution, and is available at +* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html +*******************************************************************************/ +// +// File: http_www_w3_org_XML_1998_namespace.ttcn +// Description: +// References: +// Rev: +// Prodnr: +// Updated: Mon Jul 2 13:12:58 2018 +// Contact: http://ttcn.ericsson.se +// +//////////////////////////////////////////////////////////////////////////////// +// Generated from file(s): +// - xml_2001.xsd +// /* xml version = "1.0" */ +// /* targetnamespace = "http://www.w3.org/XML/1998/namespace" */ +//////////////////////////////////////////////////////////////////////////////// +// Modification header(s): +//----------------------------------------------------------------------------- +// Modified by: +// Modification date: +// Description: +// Modification contact: +//------------------------------------------------------------------------------ +//////////////////////////////////////////////////////////////////////////////// + + +module http_www_w3_org_XML_1998_namespace { + + +import from XSD all; + + +const Space c_defaultForEmpty_1 := preserve; + + +/* See http://www.w3.org/XML/1998/namespace.html and */ +/* http://www.w3.org/TR/REC-xml for information about this namespace. */ +/* This schema document describes the XML namespace, in a form + suitable for import by other schema documents. + + Note that local names in this namespace are intended to be defined + only by the World Wide Web Consortium or its subgroups. The + following names are currently defined in this namespace and should + not be used with conflicting semantics by any Working Group, + specification, or document instance: + + base (as an attribute name): denotes an attribute whose value + provides a URI to be used as the base for interpreting any + relative URIs in the scope of the element on which it + appears; its value is inherited. This name is reserved + by virtue of its definition in the XML Base specification. + + lang (as an attribute name): denotes an attribute whose value + is a language code for the natural language of the content of + any element; its value is inherited. This name is reserved + by virtue of its definition in the XML specification. + + space (as an attribute name): denotes an attribute whose + value is a keyword indicating what whitespace processing + discipline is intended for the content of the element; its + value is inherited. This name is reserved by virtue of its + definition in the XML specification. + + Father (in any context at all): denotes Jon Bosak, the chair of + the original XML Working Group. This name is reserved by + the following decision of the W3C XML Plenary and + XML Coordination groups: + + In appreciation for his vision, leadership and dedication + the W3C XML Plenary on this 10th day of February, 2000 + reserves for Jon Bosak in perpetuity the XML name + xml:Father */ + + +/* This schema defines attributes and an attribute group */ +/* suitable for use by */ +/* schemas wishing to allow xml:base, xml:lang or xml:space attributes */ +/* on elements they define. */ +/* To enable this, such a schema must import this schema + for the XML namespace, e.g. as follows: + */ +/* . . . */ +/* */ +/* Subsequently, qualified reference to any of the attributes + or the group defined below will have the desired effect, e.g. + + */ +/* . . . */ +/* */ +/* will define a type which will schema-validate an instance */ +/* element with any of those attributes */ + + +/* In keeping with the XML Schema WG's standard versioning */ +/* policy, this schema document will persist at */ +/* http://www.w3.org/2001/03/xml.xsd. */ +/* At the date of issue it can also be found at */ +/* http://www.w3.org/2001/xml.xsd. */ +/* The schema document at that URI may however change in the future, */ +/* in order to remain compatible with the latest version of XML Schema */ +/* itself. In other words, if the XML Schema namespace changes, the version */ +/* of this document at */ +/* http://www.w3.org/2001/xml.xsd will change */ +/* accordingly; the version at */ +/* http://www.w3.org/2001/03/xml.xsd will not change. */ + + +/* In due course, we should install the relevant ISO 2- and 3-letter */ +/* codes as the enumerated possible values . . . */ +type XSD.Language Lang +with { + variant "name as uncapitalized"; + variant "attribute"; +}; + + +type enumerated Space +{ + default_, + preserve +} +with { + variant "text 'default_' as 'default'"; + variant "defaultForEmpty as c_defaultForEmpty_1"; + variant "name as uncapitalized"; + variant "attribute"; +}; + + +/* See http://www.w3.org/TR/xmlbase/ for */ +/* information about this attribute. */ +type XSD.AnyURI Base +with { + variant "name as uncapitalized"; + variant "attribute"; +}; + + +} +with { + encode "XML"; + variant "namespace as 'http://www.w3.org/XML/1998/namespace' prefix 'xml'"; + variant "controlNamespace 'http://www.w3.org/2001/XMLSchema-instance' prefix 'xsi'"; +} diff --git a/ttcn/LibEmcom/LibNg112/xsd/measures.xsd b/ttcn/LibEmcom/LibNg112/xsd/measures.xsd new file mode 100644 index 0000000000000000000000000000000000000000..fa70d1c537fe2e6fb3e2fb29729801ed1d0a7b99 --- /dev/null +++ b/ttcn/LibEmcom/LibNg112/xsd/measures.xsd @@ -0,0 +1,30 @@ + + + + + + Copyright (c) 2007,2009 Open Geospatial Consortium. + To obtain additional rights of use, visit http://www.opengeospatial.org/legal/ . + + + + + + + + + + + + + + + + + + + + diff --git a/ttcn/LibEmcom/LibNg112/xsd/urn_ietf_params_xml_ns_geopriv_conf.ttcn b/ttcn/LibEmcom/LibNg112/xsd/urn_ietf_params_xml_ns_geopriv_conf.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..3250680fca39425374a69bcb8759453a057d2c8e --- /dev/null +++ b/ttcn/LibEmcom/LibNg112/xsd/urn_ietf_params_xml_ns_geopriv_conf.ttcn @@ -0,0 +1,101 @@ +/******************************************************************************* +* Copyright (c) 2000-2018 Ericsson Telecom AB +* +* XSD to TTCN-3 Translator version: CRL 113 200/6 R4A +* +* All rights reserved. This program and the accompanying materials +* are made available under the terms of the Eclipse Public License v2.0 +* which accompanies this distribution, and is available at +* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html +*******************************************************************************/ +// +// File: urn_ietf_params_xml_ns_geopriv_conf.ttcn +// Description: +// References: +// Rev: +// Prodnr: +// Updated: Wed Jul 18 13:53:23 2018 +// Contact: http://ttcn.ericsson.se +// +//////////////////////////////////////////////////////////////////////////////// +// Generated from file(s): +// - RFC7459_pidf_lo.xsd +// /* xml version = "1.0" */ +// /* targetnamespace = "urn:ietf:params:xml:ns:geopriv:conf" */ +//////////////////////////////////////////////////////////////////////////////// +// Modification header(s): +//----------------------------------------------------------------------------- +// Modified by: +// Modification date: +// Description: +// Modification contact: +//------------------------------------------------------------------------------ +//////////////////////////////////////////////////////////////////////////////// + + +module urn_ietf_params_xml_ns_geopriv_conf { + + +import from XSD all; + + +const PdfType c_defaultForEmpty_1 := unknown; + + +/* This schema defines an element that is used for indicating + confidence in PIDF-LO documents. */ + + +type ConfidenceType Confidence +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +type record ConfidenceType +{ + PdfType pdf optional, + ConfidenceBase base +} +with { + variant "name as uncapitalized"; + variant (pdf) "defaultForEmpty as c_defaultForEmpty_1"; + variant (pdf) "attribute"; + variant (base) "untagged"; +}; + + +type union ConfidenceBase +{ + XSD.Decimal alt_ (!0.0 .. !100.0), + enumerated { + unknown + } alt_1 +} +with { + variant "name as uncapitalized"; + variant "useUnion"; + variant (alt_) "name as ''"; + variant (alt_1) "name as ''"; +}; + + +type enumerated PdfType +{ + normal, + rectangular, + unknown +} +with { + variant "name as uncapitalized"; +}; + + +} +with { + encode "XML"; + variant "namespace as 'urn:ietf:params:xml:ns:geopriv:conf' prefix 'conf'"; + variant "controlNamespace 'http://www.w3.org/2001/XMLSchema-instance' prefix 'xsi'"; + variant "elementFormQualified"; +} diff --git a/ttcn/LibEmcom/LibNg112/xsd/urn_ietf_params_xml_ns_geopriv_held.ttcn b/ttcn/LibEmcom/LibNg112/xsd/urn_ietf_params_xml_ns_geopriv_held.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..09b1e63536151e11ee4b65c9c6291a64b11ca069 --- /dev/null +++ b/ttcn/LibEmcom/LibNg112/xsd/urn_ietf_params_xml_ns_geopriv_held.ttcn @@ -0,0 +1,241 @@ +/******************************************************************************* +* Copyright (c) 2000-2018 Ericsson Telecom AB +* +* XSD to TTCN-3 Translator version: CRL 113 200/6 R4A +* +* All rights reserved. This program and the accompanying materials +* are made available under the terms of the Eclipse Public License v2.0 +* which accompanies this distribution, and is available at +* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html +*******************************************************************************/ +// +// File: urn_ietf_params_xml_ns_geopriv_held.ttcn +// Description: +// References: +// Rev: +// Prodnr: +// Updated: Wed Jul 18 13:53:23 2018 +// Contact: http://ttcn.ericsson.se +// +//////////////////////////////////////////////////////////////////////////////// +// Generated from file(s): +// - RFC5985_held.xsd +// /* xml version = "1.0" */ +// /* targetnamespace = "urn:ietf:params:xml:ns:geopriv:held" */ +//////////////////////////////////////////////////////////////////////////////// +// Modification header(s): +//----------------------------------------------------------------------------- +// Modified by: +// Modification date: +// Description: +// Modification contact: +//------------------------------------------------------------------------------ +//////////////////////////////////////////////////////////////////////////////// + + +module urn_ietf_params_xml_ns_geopriv_held { + + +import from XSD all; + + +import from http_www_w3_org_XML_1998_namespace all; + + +const XSD.Boolean c_defaultForEmpty_1 := false; + + +/* This document (RFC 5985) defines HELD messages. */ + + +/* Return Location */ + + +type record ReturnLocationType +{ + XSD.DateTime expires, + record length(1 .. infinity) of XSD.AnyURI locationURI_list +} +with { + variant "name as uncapitalized"; + variant (expires) "attribute"; + variant (locationURI_list) "untagged"; + variant (locationURI_list[-]) "name as 'locationURI'"; +}; + + +/* responseTime Type */ + + +type union ResponseTimeType +{ + enumerated { + emergencyRouting, + emergencyDispatch + } alt_, + XSD.NonNegativeInteger alt_1 (0 .. infinity) +} +with { + variant "name as uncapitalized"; + variant "useUnion"; + variant (alt_) "name as ''"; + variant (alt_1) "name as ''"; +}; + + +/* Location Type */ + + +type union LocationTypeBase +{ + enumerated { + any_ + } alt_, + LocationTypeList alt_1 length(1 .. infinity) +} +with { + variant "name as uncapitalized"; + variant "useUnion"; + variant (alt_) "name as ''"; + variant (alt_) "text 'any_' as 'any'"; + variant (alt_1) "name as ''"; +}; + + +type record of enumerated +{ + civic, + geodetic, + locationURI +} LocationTypeList +with { + variant "name as uncapitalized"; + variant "list"; +}; + + +type record LocationTypeType +{ + XSD.Boolean exact optional, + LocationTypeBase base +} +with { + variant "name as uncapitalized"; + variant (exact) "defaultForEmpty as c_defaultForEmpty_1"; + variant (exact) "attribute"; + //variant (exact) "text 'true' as '1'"; + //variant (exact) "text 'false' as '0'"; + variant (base) "untagged"; +}; + + +/* Message Definitions */ + + +type record BaseRequestType +{ + ResponseTimeType responseTime optional, + record of XSD.String attr optional +} +with { + variant "name as uncapitalized"; + variant (responseTime) "attribute"; + variant (attr) "anyAttributes"; +}; + + +type record ErrorType +{ + XSD.Token code, + record of XSD.String attr optional, + record of ErrorMsgType message_list, + record of XSD.String elem_list +} +with { + variant "name as uncapitalized"; + variant (code) "attribute"; + variant (attr) "anyAttributes"; + variant (message_list) "untagged"; + variant (message_list[-]) "name as 'message'"; + variant (elem_list) "untagged"; + variant (elem_list[-]) "anyElement except unqualified, 'urn:ietf:params:xml:ns:geopriv:held'"; +}; + + +type record ErrorMsgType +{ + Lang lang optional, + record of XSD.String attr optional, + XSD.Token base +} +with { + variant "name as uncapitalized"; + variant (lang) "namespace as 'http://www.w3.org/XML/1998/namespace' prefix 'xml'"; + variant (lang) "attribute"; + variant (attr) "anyAttributes"; + variant (base) "untagged"; +}; + + +type ErrorType Error +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +/* Location Response */ + + +type record LocationResponseType +{ + ReturnLocationType locationUriSet optional, + record of XSD.String elem_list +} +with { + variant "name as uncapitalized"; + variant (elem_list) "untagged"; + variant (elem_list[-]) "anyElement except unqualified, 'urn:ietf:params:xml:ns:geopriv:held'"; +}; + + +type LocationResponseType LocationResponse +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +/* Location Request */ + + +type record LocationRequestType +{ + ResponseTimeType responseTime optional, + record of XSD.String attr optional, + LocationTypeType locationType optional, + record of XSD.String elem_list +} +with { + variant "name as uncapitalized"; + variant (responseTime) "attribute"; + variant (attr) "anyAttributes"; + variant (elem_list) "untagged"; + variant (elem_list[-]) "anyElement except unqualified, 'urn:ietf:params:xml:ns:geopriv:held'"; +}; + + +type LocationRequestType LocationRequest +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +} +with { + encode "XML"; + variant "namespace as 'urn:ietf:params:xml:ns:geopriv:held' prefix 'held'"; + variant "controlNamespace 'http://www.w3.org/2001/XMLSchema-instance' prefix 'xsi'"; + variant "elementFormQualified"; +} diff --git a/ttcn/LibEmcom/LibNg112/xsd/urn_ietf_params_xml_ns_geopriv_held_id.ttcn b/ttcn/LibEmcom/LibNg112/xsd/urn_ietf_params_xml_ns_geopriv_held_id.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..dbcf055d2e10a5b50946220eb85081a4dffbaa4b --- /dev/null +++ b/ttcn/LibEmcom/LibNg112/xsd/urn_ietf_params_xml_ns_geopriv_held_id.ttcn @@ -0,0 +1,242 @@ +/******************************************************************************* +* Copyright (c) 2000-2018 Ericsson Telecom AB +* +* XSD to TTCN-3 Translator version: CRL 113 200/6 R4A +* +* All rights reserved. This program and the accompanying materials +* are made available under the terms of the Eclipse Public License v2.0 +* which accompanies this distribution, and is available at +* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html +*******************************************************************************/ +// +// File: urn_ietf_params_xml_ns_geopriv_held_id.ttcn +// Description: +// References: +// Rev: +// Prodnr: +// Updated: Wed Jul 18 13:53:23 2018 +// Contact: http://ttcn.ericsson.se +// +//////////////////////////////////////////////////////////////////////////////// +// Generated from file(s): +// - RFC6155_held_id.xsd +// /* xml version = "1.0" encoding = "UTF-8" */ +// /* targetnamespace = "urn:ietf:params:xml:ns:geopriv:held:id" */ +//////////////////////////////////////////////////////////////////////////////// +// Modification header(s): +//----------------------------------------------------------------------------- +// Modified by: +// Modification date: +// Description: +// Modification contact: +//------------------------------------------------------------------------------ +//////////////////////////////////////////////////////////////////////////////// + + +module urn_ietf_params_xml_ns_geopriv_held_id { + + +import from XSD all; + + +/* This document defines Device identity elements for HELD. */ + + +type DeviceIdentity Device +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +type record DeviceIdentity +{ + record of XSD.String elem_list +} +with { + variant "name as uncapitalized"; + variant (elem_list) "untagged"; + variant (elem_list[-]) "anyElement"; +}; + + +type QnameList RequiredIdentifiers +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +type record of XSD.QName QnameList +with { + variant "name as uncapitalized"; + variant "list"; +}; + + +type IpAddress Ip +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +type record IpAddress +{ + XSD.Token v (pattern "[\da-fA-F]"), + XSD.Token base +} +with { + variant "name as uncapitalized"; + variant (v) "attribute"; + variant (base) "untagged"; +}; + + +type MacAddress Mac +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +type XSD.Token MacAddress (pattern "[\da-fA-F]#(2)(-[\da-fA-F]#(2))#(5)((-[\da-fA-F]#(2))#(2))#(0,1)") +with { + variant "name as uncapitalized"; +}; + + +type PortNumber Udpport +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +type PortNumber Tcpport +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +type PortNumber Sctpport +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +type PortNumber Dccpport +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +type XSD.NonNegativeInteger PortNumber (0 .. 65535) +with { + variant "name as uncapitalized"; +}; + + +type NaiType Nai +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +type XSD.Token NaiType (pattern "([\^\\]|\\[\dA-Fa-f]#(2))* (@([A-Za-z\d]([A-Za-z\d\-]*[A-Za-z\d])*.)+ [A-Za-z\d]([A-Za-z\d\-]*[A-Za-z\d])*)#(0,1)") +with { + variant "name as uncapitalized"; +}; + + +type XSD.AnyURI Uri +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +type XSD.Token Fqdn +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +type XSD.HexBinary Duid +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +type E164 Msisdn +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +type E164 Imsi +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +type Digit15 Imei +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +type Digit10 Min +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +type E164 Mdn +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +type XSD.Token Digits (pattern "[\d]+") +with { + variant "name as uncapitalized"; +}; + + +type XSD.Token E164 (pattern "[\d]+") length(6 .. 15) +with { + variant "name as uncapitalized"; +}; + + +type XSD.Token Digit15 (pattern "[\d]+") length(0 .. 15) +with { + variant "name as uncapitalized"; +}; + + +type XSD.Token Digit10 (pattern "[\d]+") length(10) +with { + variant "name as uncapitalized"; +}; + + +} +with { + encode "XML"; + variant "namespace as 'urn:ietf:params:xml:ns:geopriv:held:id' prefix 'id'"; + variant "controlNamespace 'http://www.w3.org/2001/XMLSchema-instance' prefix 'xsi'"; + variant "elementFormQualified"; +} diff --git a/ttcn/LibEmcom/LibNg112/xsd/urn_ietf_params_xml_ns_lost1.ttcn b/ttcn/LibEmcom/LibNg112/xsd/urn_ietf_params_xml_ns_lost1.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..191bf87ce4db338b3b0875b8454d4e2d5f71e84e --- /dev/null +++ b/ttcn/LibEmcom/LibNg112/xsd/urn_ietf_params_xml_ns_lost1.ttcn @@ -0,0 +1,722 @@ +/******************************************************************************* +* Copyright (c) 2000-2018 Ericsson Telecom AB +* +* XSD to TTCN-3 Translator version: CRL 113 200/6 R4A +* +* All rights reserved. This program and the accompanying materials +* are made available under the terms of the Eclipse Public License v2.0 +* which accompanies this distribution, and is available at +* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html +*******************************************************************************/ +// +// File: urn_ietf_params_xml_ns_lost1.ttcn +// Description: +// References: +// Rev: +// Prodnr: +// Updated: Tue Jul 10 13:34:10 2018 +// Contact: http://ttcn.ericsson.se +// +//////////////////////////////////////////////////////////////////////////////// +// Generated from file(s): +// - RelaxNG.xsd +// /* xml version = "1.0" encoding = "UTF-8" */ +// /* targetnamespace = "urn:ietf:params:xml:ns:lost1" */ +//////////////////////////////////////////////////////////////////////////////// +// Modification header(s): +//----------------------------------------------------------------------------- +// Modified by: +// Modification date: +// Description: +// Modification contact: +//------------------------------------------------------------------------------ +//////////////////////////////////////////////////////////////////////////////// + + +module urn_ietf_params_xml_ns_lost1 { + + +import from XSD all; + + +import from http_www_w3_org_XML_1998_namespace all; + + +type record FindService +{ + XSD.Boolean recursive_ optional, + enumerated { + reference, + value_ + } serviceBoundary optional, + XSD.Boolean validateLocation optional, + record length(1 .. infinity) of Location location_list, + Path path optional, + Service service optional, + record of NotLost notLost_list +} +with { + variant "name as uncapitalized"; + variant "element"; + variant (recursive_) "name as 'recursive'"; + variant (recursive_) "attribute"; + //variant (recursive_) "text 'true' as '1'"; + //variant (recursive_) "text 'false' as '0'"; + variant (serviceBoundary) "text 'value_' as 'value'"; + variant (serviceBoundary) "attribute"; + variant (validateLocation) "attribute"; + //variant (validateLocation) "text 'true' as '1'"; + //variant (validateLocation) "text 'false' as '0'"; + variant (location_list) "untagged"; + variant (location_list[-]) "name as 'location'"; + variant (notLost_list) "untagged"; +}; + + +type record ListServices +{ + Path path optional, + Service service optional, + record of NotLost notLost_list +} +with { + variant "name as uncapitalized"; + variant "element"; + variant (notLost_list) "untagged"; +}; + + +type record ListServicesByLocation +{ + XSD.Boolean recursive_ optional, + record length(1 .. infinity) of Location location_list, + Path path optional, + Service service optional, + record of NotLost notLost_list +} +with { + variant "name as uncapitalized"; + variant "element"; + variant (recursive_) "name as 'recursive'"; + variant (recursive_) "attribute"; + //variant (recursive_) "text 'true' as '1'"; + //variant (recursive_) "text 'false' as '0'"; + variant (location_list) "untagged"; + variant (location_list[-]) "name as 'location'"; + variant (notLost_list) "untagged"; +}; + + +type record GetServiceBoundary +{ + XSD.Token key, + record of NotLost notLost_list +} +with { + variant "name as uncapitalized"; + variant "element"; + variant (key) "attribute"; + variant (notLost_list) "untagged"; +}; + + +type record FindServiceResponse +{ + record length(1 .. infinity) of Mapping mapping_list, + LocationValidation locationValidation optional, + record of Warnings warnings_list, + Path path, + record of NotLost notLost_list, + LocationUsed locationUsed optional +} +with { + variant "name as uncapitalized"; + variant "element"; + variant (mapping_list) "untagged"; + variant (mapping_list[-]) "name as 'mapping'"; + variant (warnings_list) "untagged"; + variant (warnings_list[-]) "name as 'warnings'"; + variant (notLost_list) "untagged"; +}; + + +type record ListServicesResponse +{ + ServiceList serviceList, + record of Warnings warnings_list, + Path path, + record of NotLost notLost_list +} +with { + variant "name as uncapitalized"; + variant "element"; + variant (warnings_list) "untagged"; + variant (warnings_list[-]) "name as 'warnings'"; + variant (notLost_list) "untagged"; +}; + + +type record ListServicesByLocationResponse +{ + ServiceList serviceList, + record of Warnings warnings_list, + Path path, + record of NotLost notLost_list, + LocationUsed locationUsed optional +} +with { + variant "name as uncapitalized"; + variant "element"; + variant (warnings_list) "untagged"; + variant (warnings_list[-]) "name as 'warnings'"; + variant (notLost_list) "untagged"; +}; + + +type record GetServiceBoundaryResponse +{ + record length(1 .. infinity) of ServiceBoundary serviceBoundary_list, + record of Warnings warnings_list, + Path path, + record of NotLost notLost_list +} +with { + variant "name as uncapitalized"; + variant "element"; + variant (serviceBoundary_list) "untagged"; + variant (serviceBoundary_list[-]) "name as 'serviceBoundary'"; + variant (warnings_list) "untagged"; + variant (warnings_list[-]) "name as 'warnings'"; + variant (notLost_list) "untagged"; +}; + + +type record CommonRequestPattern +{ + Path path optional, + Service service optional, + record of NotLost notLost_list +} +with { + variant "untagged"; + variant (notLost_list) "untagged"; +}; + + +type record CommonResponsePattern +{ + record of Warnings warnings_list, + Path path, + record of NotLost notLost_list +} +with { + variant "untagged"; + variant (warnings_list) "untagged"; + variant (warnings_list[-]) "name as 'warnings'"; + variant (notLost_list) "untagged"; +}; + + +type record RequestLocation +{ + record length(1 .. infinity) of Location location_list +} +with { + variant "untagged"; + variant (location_list) "untagged"; + variant (location_list[-]) "name as 'location'"; +}; + + +type record Location +{ + XSD.Token id, + XSD.NMTOKEN profile optional, + record length(1 .. infinity) of ExtensionPoint extensionPoint_list +} +with { + variant "name as uncapitalized"; + variant "element"; + variant (id) "attribute"; + variant (profile) "attribute"; + variant (extensionPoint_list) "untagged"; +}; + + +type record LocationInformation +{ + XSD.NMTOKEN profile optional, + record length(1 .. infinity) of ExtensionPoint extensionPoint_list +} +with { + variant "name as uncapitalized"; + variant (profile) "attribute"; + variant (extensionPoint_list) "untagged"; +}; + + +type record ServiceBoundary_1 +{ + record length(1 .. infinity) of ServiceBoundary serviceBoundary_list +} +with { + variant "untagged"; + variant (serviceBoundary_list) "untagged"; + variant (serviceBoundary_list[-]) "name as 'serviceBoundary'"; +}; + + +type LocationInformation ServiceBoundary +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +type record ServiceBoundaryReference +{ + XSD.Token key, + AppUniqueString source, + record of NotLost notLost_list +} +with { + variant "name as uncapitalized"; + variant "element"; + variant (key) "attribute"; + variant (source) "attribute"; + variant (notLost_list) "untagged"; +}; + + +type record Path +{ + record length(1 .. infinity) of Via via_list +} +with { + variant "name as uncapitalized"; + variant "element"; + variant (via_list) "untagged"; + variant (via_list[-]) "name as 'via'"; +}; + + +type record Via +{ + AppUniqueString source, + record of NotLost notLost_list +} +with { + variant "name as uncapitalized"; + variant "element"; + variant (source) "attribute"; + variant (notLost_list) "untagged"; +}; + + +type record LocationUsed_1 +{ + LocationUsed locationUsed optional +} +with { + variant "untagged"; +}; + + +type record LocationUsed +{ + XSD.Token id +} +with { + variant "name as uncapitalized"; + variant "element"; + variant (id) "attribute"; +}; + + +type record of XSD.QName QnameList +with { + variant "name as uncapitalized"; + variant "list"; +}; + + +type record Mapping +{ + Lang lang optional, + union + { + XSD.DateTime dateTime, + enumerated + { + nO_CACHE + } alt_, + enumerated + { + nO_EXPIRATION + } alt_1 + } expires, + XSD.DateTime lastUpdated, + XSD.Token message_ optional, + AppUniqueString source, + XSD.Token sourceId, + record of DisplayName displayName_list, + union { + ServiceBoundary_1 serviceBoundary, + ServiceBoundaryReference serviceBoundaryReference + } choice optional, + record of Uri uri_list, + ServiceNumber serviceNumber optional, + Service service optional, + record of NotLost notLost_list +} +with { + variant "name as uncapitalized"; + variant "element"; + variant (lang) "namespace as 'http://www.w3.org/XML/1998/namespace' prefix 'xml'"; + variant (lang) "namespace as 'http://www.w3.org/XML/1998/namespace' prefix 'xml'"; + variant (lang) "attribute"; + variant(expires, lang, lastUpdated, message_, source, sourceId) "attribute"; + variant(expires.alt_1) "text 'nO_EXPIRATION' as 'NO-EXPIRATION'"; + variant(expires, expires.alt_, expires.alt_1, expires.dateTime, lastUpdated, message_, source, sourceId) "form as unqualified"; + variant(expires.alt_, expires.alt_1) "name as ''"; + variant(expires.alt_) "text 'nO_CACHE' as 'NO-CACHE'"; + variant "element"; + variant(expires) "useUnion"; + variant (lastUpdated) "attribute"; + variant (message_) "name as 'message'"; + variant (message_) "attribute"; + variant (source) "attribute"; + variant (sourceId) "attribute"; + variant (displayName_list) "untagged"; + variant (displayName_list[-]) "name as 'displayName'"; + variant (choice) "untagged"; + variant (uri_list) "untagged"; + variant (uri_list[-]) "name as 'uri'"; + variant (notLost_list) "untagged"; +}; + + +type record DisplayName +{ + Lang lang, + XSD.String base +} +with { + variant "name as uncapitalized"; + variant "element"; + variant (lang) "namespace as 'http://www.w3.org/XML/1998/namespace' prefix 'xml'"; + variant (lang) "attribute"; + variant (base) "untagged"; +}; + + +type XSD.AnyURI Uri +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +type XSD.Token ServiceNumber (pattern "[0-9*#]+") +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +type record LocationValidation +{ + Valid valid optional, + Invalid invalid optional, + Unchecked unchecked optional, + record of NotLost notLost_list +} +with { + variant "name as uncapitalized"; + variant "element"; + variant (notLost_list) "untagged"; +}; + + +type QnameList Valid +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +type QnameList Invalid +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +type QnameList Unchecked +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +type record ExceptionContainer +{ + AppUniqueString source, + record of union { + BadRequest badRequest, + InternalError internalError, + ServiceSubstitution serviceSubstitution, + DefaultMappingReturned defaultMappingReturned, + Forbidden forbidden, + NotFound notFound, + Loop loop, + ServiceNotImplemented serviceNotImplemented, + ServerTimeout serverTimeout, + ServerError serverError, + LocationInvalid locationInvalid, + LocationProfileUnrecognized locationProfileUnrecognized + } choice_list, + record of NotLost notLost_list +} +with { + variant "name as uncapitalized"; + variant (source) "attribute"; + variant (choice_list) "untagged"; + variant (choice_list[-]) "untagged"; + variant (notLost_list) "untagged"; +}; + + +type ExceptionContainer Errors +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +type ExceptionContainer Warnings +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +/* Exception pattern. */ +type record BasicException +{ + Lang lang optional, + XSD.Token message_ optional, + record of NotLost notLost_list +} +with { + variant "name as uncapitalized"; + variant (lang) "namespace as 'http://www.w3.org/XML/1998/namespace' prefix 'xml'"; + variant (lang) "namespace as 'http://www.w3.org/XML/1998/namespace' prefix 'xml'"; + variant (lang) "attribute"; + variant (message_) "name as 'message'"; + variant (message_) "attribute"; + variant (notLost_list) "untagged"; +}; + + +type BasicException BadRequest +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +type BasicException InternalError +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +type BasicException ServiceSubstitution +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +type BasicException DefaultMappingReturned +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +type BasicException Forbidden +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +type BasicException NotFound +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +type BasicException Loop +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +type BasicException ServiceNotImplemented +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +type BasicException ServerTimeout +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +type BasicException ServerError +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +type BasicException LocationInvalid +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +type BasicException LocationValidationUnavailable +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +type record LocationProfileUnrecognized +{ + Lang lang optional, + XSD.Token message_ optional, + XSD.NMTOKENS unsupportedProfiles, + record of NotLost notLost_list +} +with { + variant "name as uncapitalized"; + variant "element"; + variant (lang) "namespace as 'http://www.w3.org/XML/1998/namespace' prefix 'xml'"; + variant (lang) "namespace as 'http://www.w3.org/XML/1998/namespace' prefix 'xml'"; + variant (lang) "attribute"; + variant (message_) "name as 'message'"; + variant (message_) "attribute"; + variant (unsupportedProfiles) "attribute"; + variant (notLost_list) "untagged"; +}; + + +type record Redirect +{ + Lang lang optional, + XSD.Token message_ optional, + AppUniqueString source, + AppUniqueString target, + record of NotLost notLost_list +} +with { + variant "name as uncapitalized"; + variant "element"; + variant (lang) "namespace as 'http://www.w3.org/XML/1998/namespace' prefix 'xml'"; + variant (lang) "namespace as 'http://www.w3.org/XML/1998/namespace' prefix 'xml'"; + variant (lang) "attribute"; + variant (message_) "name as 'message'"; + variant (message_) "attribute"; + variant (source) "attribute"; + variant (target) "attribute"; + variant (notLost_list) "untagged"; +}; + + +type record Service_1 +{ + Service service optional +} +with { + variant "untagged"; +}; + + +type XSD.AnyURI Service +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +type XSD.Token AppUniqueString (pattern "([a-zA-Z0-9\-]+.)+[a-zA-Z0-9]+") +with { + variant "name as uncapitalized"; +}; + + +type record of XSD.AnyURI ServiceList +with { + variant "name as uncapitalized"; + variant "list"; + variant "element"; +}; + + +/* Any element not in the LoST namespace. */ +/* xs:any namespace="##other" processContents="skip"/ */ +type union NotLost +{ + XSD.String elem +} +with { + variant "untagged"; + variant (elem) "anyElement from unqualified"; +}; + + +/* A wildcard pattern for including any element + from any other namespace. */ +type record AnyElement +{ + record of XSD.String elem_list +} +with { + variant "untagged"; + variant (elem_list) "untagged"; + variant (elem_list[-]) "anyElement"; +}; + + +/* A point where future extensions + (elements from other namespaces) + can be added. */ +type record ExtensionPoint +{ + record of NotLost notLost_list +} +with { + variant "untagged"; + variant (notLost_list) "untagged"; +}; + + +} +with { + encode "XML"; + variant "namespace as 'urn:ietf:params:xml:ns:lost1' prefix 'ns1'"; + variant "controlNamespace 'http://www.w3.org/2001/XMLSchema-instance' prefix 'xsi'"; + variant "elementFormQualified"; +} diff --git a/ttcn/LibEmcom/LibNg112/xsd/urn_ietf_params_xml_ns_pidf.ttcn b/ttcn/LibEmcom/LibNg112/xsd/urn_ietf_params_xml_ns_pidf.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..e15272f7b1e2d1c5afcf4f020f51ee52083441fe --- /dev/null +++ b/ttcn/LibEmcom/LibNg112/xsd/urn_ietf_params_xml_ns_pidf.ttcn @@ -0,0 +1,174 @@ +/******************************************************************************* +* Copyright (c) 2000-2018 Ericsson Telecom AB +* +* XSD to TTCN-3 Translator version: CRL 113 200/6 R4A +* +* All rights reserved. This program and the accompanying materials +* are made available under the terms of the Eclipse Public License v2.0 +* which accompanies this distribution, and is available at +* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html +*******************************************************************************/ +// +// File: urn_ietf_params_xml_ns_pidf.ttcn +// Description: +// References: +// Rev: +// Prodnr: +// Updated: Wed Jul 18 13:53:23 2018 +// Contact: http://ttcn.ericsson.se +// +//////////////////////////////////////////////////////////////////////////////// +// Generated from file(s): +// - RFC3863_pidf.xsd +// /* xml version = "1.0" encoding = "UTF-8" */ +// /* targetnamespace = "urn:ietf:params:xml:ns:pidf" */ +//////////////////////////////////////////////////////////////////////////////// +// Modification header(s): +//----------------------------------------------------------------------------- +// Modified by: +// Modification date: +// Description: +// Modification contact: +//------------------------------------------------------------------------------ +//////////////////////////////////////////////////////////////////////////////// + + +module urn_ietf_params_xml_ns_pidf { + + +import from XSD all; + + +import from http_www_w3_org_XML_1998_namespace all; + + +const XSD.Boolean c_defaultForEmpty_1 := false; + + +/* This import brings in the XML language attribute xml:lang */ + + +type Presence_1 Presence +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +type record Presence_1 +{ + XSD.AnyURI entity, + record of Tuple tuple_list, + record of Note note_list, + record of XSD.String elem_list +} +with { + variant "name as 'presence'"; + variant (entity) "attribute"; + variant (tuple_list) "untagged"; + variant (tuple_list[-]) "name as 'tuple'"; + variant (note_list) "untagged"; + variant (note_list[-]) "name as 'note'"; + variant (elem_list) "untagged"; + variant (elem_list[-]) "anyElement except unqualified, 'urn:ietf:params:xml:ns:pidf'"; +}; + + +type record Tuple +{ + XSD.ID id, + Status status, + record of XSD.String elem_list, + Contact contact optional, + record of Note note_list, + XSD.DateTime timestamp optional +} +with { + variant "name as uncapitalized"; + variant (id) "attribute"; + variant (elem_list) "untagged"; + variant (elem_list[-]) "anyElement except unqualified, 'urn:ietf:params:xml:ns:pidf'"; + variant (note_list) "untagged"; + variant (note_list[-]) "name as 'note'"; +}; + + +type record Status +{ + Basic basic optional, + record of XSD.String elem_list +} +with { + variant "name as uncapitalized"; + variant (elem_list) "untagged"; + variant (elem_list[-]) "anyElement except unqualified, 'urn:ietf:params:xml:ns:pidf'"; +}; + + +type enumerated Basic +{ + closed, + open +} +with { + variant "name as uncapitalized"; +}; + + +type record Contact +{ + Qvalue priority optional, + XSD.AnyURI base +} +with { + variant "name as uncapitalized"; + variant (priority) "attribute"; + variant (base) "untagged"; +}; + + +type record Note +{ + Lang lang optional, + XSD.String base +} +with { + variant "name as uncapitalized"; + variant (lang) "namespace as 'http://www.w3.org/XML/1998/namespace' prefix 'xml'"; + variant (lang) "attribute"; + variant (base) "untagged"; +}; + + +/* xs:pattern value="0(.[0-9]{0,3})?"/> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ttcn/LibEmcom/LibNg112/xsd/xml_2001.xsd b/ttcn/LibEmcom/LibNg112/xsd/xml_2001.xsd new file mode 100644 index 0000000000000000000000000000000000000000..d662b4236cd346b34b09c87ac9f9893904c2d5f3 --- /dev/null +++ b/ttcn/LibEmcom/LibNg112/xsd/xml_2001.xsd @@ -0,0 +1,117 @@ + + + + + + + See http://www.w3.org/XML/1998/namespace.html and + http://www.w3.org/TR/REC-xml for information about this namespace. + + This schema document describes the XML namespace, in a form + suitable for import by other schema documents. + + Note that local names in this namespace are intended to be defined + only by the World Wide Web Consortium or its subgroups. The + following names are currently defined in this namespace and should + not be used with conflicting semantics by any Working Group, + specification, or document instance: + + base (as an attribute name): denotes an attribute whose value + provides a URI to be used as the base for interpreting any + relative URIs in the scope of the element on which it + appears; its value is inherited. This name is reserved + by virtue of its definition in the XML Base specification. + + lang (as an attribute name): denotes an attribute whose value + is a language code for the natural language of the content of + any element; its value is inherited. This name is reserved + by virtue of its definition in the XML specification. + + space (as an attribute name): denotes an attribute whose + value is a keyword indicating what whitespace processing + discipline is intended for the content of the element; its + value is inherited. This name is reserved by virtue of its + definition in the XML specification. + + Father (in any context at all): denotes Jon Bosak, the chair of + the original XML Working Group. This name is reserved by + the following decision of the W3C XML Plenary and + XML Coordination groups: + + In appreciation for his vision, leadership and dedication + the W3C XML Plenary on this 10th day of February, 2000 + reserves for Jon Bosak in perpetuity the XML name + xml:Father + + + + + This schema defines attributes and an attribute group + suitable for use by + schemas wishing to allow xml:base, xml:lang or xml:space attributes + on elements they define. + + To enable this, such a schema must import this schema + for the XML namespace, e.g. as follows: + <schema . . .> + . . . + <import namespace="http://www.w3.org/XML/1998/namespace" + schemaLocation="http://www.w3.org/2001/03/xml.xsd"/> + + Subsequently, qualified reference to any of the attributes + or the group defined below will have the desired effect, e.g. + + <type . . .> + . . . + <attributeGroup ref="xml:specialAttrs"/> + + will define a type which will schema-validate an instance + element with any of those attributes + + + + In keeping with the XML Schema WG's standard versioning + policy, this schema document will persist at + http://www.w3.org/2001/03/xml.xsd. + At the date of issue it can also be found at + http://www.w3.org/2001/xml.xsd. + The schema document at that URI may however change in the future, + in order to remain compatible with the latest version of XML Schema + itself. In other words, if the XML Schema namespace changes, the version + of this document at + http://www.w3.org/2001/xml.xsd will change + accordingly; the version at + http://www.w3.org/2001/03/xml.xsd will not change. + + + + + + In due course, we should install the relevant ISO 2- and 3-letter + codes as the enumerated possible values . . . + + + + + + + + + + + + + + + See http://www.w3.org/TR/xmlbase/ for + information about this attribute. + + + + + + + + + + diff --git a/ttcn/README.md b/ttcn/README.md index 7710d17cc0aff17b6fb38ae7fc3ac019435df71f..dd0d5ffaef82a247ea240d4501942b521b4a4763 100644 --- a/ttcn/README.md +++ b/ttcn/README.md @@ -7,3 +7,4 @@ This folder will contain the TTCN-3 files. This Abstract Test Suite requires the following TTCN-3 libraries to be compiled properly: - The ETSI TTCN-3 Common Library, accessible [here](https://oldforge.etsi.org/svn/LibCommon/tags/v1.4.0/ttcn "LibSip") - The ETSI TTCN-3 SIP Library, accessible [here](https://oldforge.etsi.org/svn/LibSip/trunk "ETSI LibSip") +- The ETSI TTCN-3 HTTP Library, accessible [here](https://oldforge.etsi.org/svn/LibIts/branches/STF525/ttcn/Http "ETSI LibItsHttp") diff --git a/ttcn/TestCodec/TestCodec_HttpPort.ttcn b/ttcn/TestCodec/TestCodec_HttpPort.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..abfa41b89990d2a292802d5ec487756dead783a0 --- /dev/null +++ b/ttcn/TestCodec/TestCodec_HttpPort.ttcn @@ -0,0 +1,120 @@ +/** + * @author ETSI / STF549 + * @version $URL:$ + * $ID:$ + * @desc This module provides the codec validation test cases. + * @copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + * @see ETSI TS 103 478 + */ +module TestCodec_HttpPort { + + import from XSD all; + + // RFC5985 Held + import from urn_ietf_params_xml_ns_geopriv_held language "XSD" all; + import from urn_ietf_params_xml_ns_geopriv_held_id language "XSD" all; + import from urn_ietf_params_xml_ns_pidf_geopriv10 language "XSD" all; + import from urn_ietf_params_xml_ns_pidf_geopriv10_basicPolicy language "XSD" all; + + import from urn_ietf_params_xml_ns_pidf_geopriv10_civicLoc language "XSD" all; + + // + import from urn_ietf_params_xml_ns_pidf language "XSD" all; + + // OpenGIS + import from urn_ietf_params_xml_ns_pidf_geopriv10_geoShape language "XSD" all; + import from http_www_opengis_net_gml language "XSD" all; + + // LibCommon + + // LibHttp + import from LibItsHttp_TypesAndValues all; + import from LibItsHttp_XmlMessageBodyTypes all; + import from LibItsHttp_Functions all; + import from LibItsHttp_Templates all; + import from LibItsHttp_XmlTemplates all; + import from LibItsHttp_TestSystem all; + + testcase tc_http_map_1() runs on HttpComponent system HttpTestAdapter { + // Local variables + var HeaderLines v_headers; + var HttpMessage v_response; + + map(self:httpPort, system:httpPort); + + // Preamble + f_init_default_headers_list(v_headers); + httpPort.send( + m_http_request( + m_http_request_get( + "/t/r143f-1528105031/post", + v_headers, + m_http_message_body_xml(m_body_xml_location_request( + m_locationRequest( + { encvalue_unichar(valueof(m_device({ "+436501234567" }))) }, + m_locationTypeType(m_locationTypeBase_geodetic, true) + ) + ) + ) + ) + ) + ); + tc_ac.start; + alt { + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_xml( + mw_body_xml_location_response( + mw_locationResponse(-, ?) + ))))) -> value v_response { + var Presence v_presence; + var Tuple v_tuple; + var Geopriv v_geopriv; + var Circle v_circle; + var universal charstring v_temp; + var integer v_result; + + tc_ac.stop; + + v_temp := v_response.response.body.xml_body.locationResponse.elem_list[0]; + v_result := decvalue_unichar(v_temp, v_presence); + v_tuple := v_presence.tuple_list[0]; + log("v_tuple = ", v_tuple); + + v_temp := v_tuple.status.elem_list[0]; + v_result := decvalue_unichar(v_temp, v_geopriv); + log("v_geopriv = ", v_geopriv); + + v_temp := v_geopriv.location_info.elem_list[0]; + v_result := decvalue_unichar(v_temp, v_circle); + log("v_circle = ", v_circle); + + setverdict(pass, "Get a response"); + } + [] httpPort.receive( + mw_http_response( + mw_http_response_ok( + mw_http_message_body_xml( + XmlBody: ? + )))) { + tc_ac.stop; + setverdict(fail, "Unexpected response"); + } + [] tc_ac.timeout { + setverdict(inconc, "No response"); + } + } // End of 'alt' statement + + unmap(self:httpPort, system:httpPort); + + } // End of testcase tc_http_map_1 + + control { + execute(tc_http_map_1()); + } + +} // End of module TestCodec_HttpPort diff --git a/ttcn/TestCodec/TestCodec_HttpRequest.ttcn b/ttcn/TestCodec/TestCodec_HttpRequest.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..85a56ec2f59ce57c034787daf525bb3619c74d21 --- /dev/null +++ b/ttcn/TestCodec/TestCodec_HttpRequest.ttcn @@ -0,0 +1,63 @@ +/** + * @author ETSI / STF549 + * @version $URL:$ + * $ID:$ + * @desc This module provides the codec validation test cases. + * @copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + * @see ETSI TS 103 478 + */ +module TestCodec_HttpRequest { + + // LibCommon + + // LibHttp + import from LibItsHttp_TypesAndValues all; + import from LibItsHttp_XmlMessageBodyTypes all; + import from LibItsHttp_Functions all; + import from LibItsHttp_Templates all; + import from LibItsHttp_TestSystem all; + import from LibItsHttp_EncdecDeclarations all; + + // TestCodec + import from TestCodec_TestAndSystem all; + + testcase tc_http_get_1() runs on TCType system TCType { + var bitstring v_raw_message := oct2bit('504f5354202f6c69732f6170692f68656c6420485454502f312e310d0a486f73743a207270693a383037310d0a436f6e74656e742d547970653a206170706c69636174696f6e2f68656c642b786d6c3b636861727365743d7574662d380d0a436f6e74656e742d4c656e6774683a203239370d0a0d0a3c3f786d6c2076657273696f6e3d22312e30223f3e0d0a3c6c6f636174696f6e5265717565737420786d6c6e733d2275726e3a696574663a706172616d733a786d6c3a6e733a67656f707269763a68656c642220786d6c6e733a6e73323d2275726e3a696574663a706172616d733a786d6c3a6e733a67656f707269763a68656c643a6964223e0d0a093c6e73323a6465766963653e0d0a20202020093c6e73323a7572693e74656c3a2b3433363530313233343536373c2f6e73323a7572693e0d0a202020203c2f6e73323a6465766963653e0d0a093c6c6f636174696f6e547970652065786163743d2274727565223e0d0a202020200967656f64657469630d0a093c2f6c6f636174696f6e547970653e0d0a3c2f6c6f636174696f6e526571756573743e0d0a'O); + var charstring v_expected_xml_body := oct2str('3C3F786D6C2076657273696F6E3D22312E30223F3E0D0A3C6C6F636174696F6E5265717565737420786D6C6E733D2275726E3A696574663A706172616D733A786D6C3A6E733A67656F707269763A68656C642220786D6C6E733A6E73323D2275726E3A696574663A706172616D733A786D6C3A6E733A67656F707269763A68656C643A6964223E0D0A093C6E73323A6465766963653E0D0A20202020093C6E73323A7572693E74656C3A2B3433363530313233343536373C2F6E73323A7572693E0D0A202020203C2F6E73323A6465766963653E0D0A093C6C6F636174696F6E547970652065786163743D2274727565223E0D0A202020200967656F64657469630D0A093C2F6C6F636174696F6E547970653E0D0A3C2F6C6F636174696F6E526571756573743E'O); + var bitstring v_enc_raw_message; + var template (present) HttpMessage v_expected_msg := { request := { method := "POST", uri := "/lis/api/held", version_major := 1, version_minor := 1, header := { { header_name := "Host", header_value := { "rpi:8071" } }, { header_name := "Content-Type", header_value := { "application/held+xml;charset=utf-8" } }, { header_name := "Content-Length", header_value := { "297" } } }, body := { xml_body := { raw := ?/*v_expected_xml_body*/ } } } }; + var HttpMessage v_dec_msg; + var integer v_result; + + v_result := decvalue(v_raw_message, v_dec_msg); + if (v_result == 0) { + if (match(v_dec_msg, v_expected_msg)) { + setverdict(pass, "Decode match"); + } else { + setverdict(fail, "Mismatch values"); + } + } else { + setverdict(fail, "Decode failure"); + } + + v_enc_raw_message := encvalue(v_dec_msg); + if (not isbound(v_enc_raw_message)) { + setverdict(fail, "Encoding failed!"); + } else { + if (match(v_enc_raw_message, v_raw_message)) { + setverdict(pass, "Encode match"); + } else { + setverdict(fail, "Encoding mismatch"); + } + } + + } // End of testcase tc_http_get_1 + + control { + execute(tc_http_get_1()); + } + +} // End of module TestCodec_HttpRequest diff --git a/ttcn/TestCodec/TestCodec_HttpResponse.ttcn b/ttcn/TestCodec/TestCodec_HttpResponse.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..702f50a3b5206cbd21a2a5c7349b15c3ea54feab --- /dev/null +++ b/ttcn/TestCodec/TestCodec_HttpResponse.ttcn @@ -0,0 +1,74 @@ +/** + * @author ETSI / STF549 + * @version $URL:$ + * $ID:$ + * @desc This module provides the codec validation test cases. + * @copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + * @see ETSI TS 103 478 + */ +module TestCodec_HttpResponse { + + // LibCommon + + // LibHttp + import from LibItsHttp_TypesAndValues all; + import from LibItsHttp_XmlMessageBodyTypes all; + import from LibItsHttp_Functions all; + import from LibItsHttp_Templates all; + import from LibItsHttp_TestSystem all; + import from LibItsHttp_EncdecDeclarations all; + + // TestCodec + import from TestCodec_TestAndSystem all; + + testcase tc_http_200_ok_1() runs on TCType system TCType { + var bitstring v_raw_message := oct2bit('485454502f312e3120323030200d0a582d436f6e74656e742d547970652d4f7074696f6e733a206e6f736e6966660d0a582d5853532d50726f74656374696f6e3a20313b206d6f64653d626c6f636b0d0a43616368652d436f6e74726f6c3a206e6f2d63616368652c206e6f2d73746f72652c206d61782d6167653d302c206d7573742d726576616c69646174650d0a507261676d613a206e6f2d63616368650d0a457870697265733a20300d0a436f6e74656e742d547970653a206170706c69636174696f6e2f68656c642b786d6c3b636861727365743d5554462d380d0a436f6e74656e742d4c656e6774683a20313030340d0a446174653a205475652c203239204d617920323031382031333a32383a353920474d540d0a0d0a3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d3822207374616e64616c6f6e653d226e6f223f3e0a3c6c6f636174696f6e526573706f6e736520786d6c6e733d2275726e3a696574663a706172616d733a786d6c3a6e733a67656f707269763a68656c64223e0a202020203c70726573656e636520656e746974793d22707265733a67787074697874696d6870306c66372220786d6c6e733d2275726e3a696574663a706172616d733a786d6c3a6e733a70696466223e0a20202020202020203c7475706c652069643d2239676d646972636671616a796c7931223e0a2020202020202020202020203c7374617475733e0a202020202020202020202020202020203c67656f7072697620786d6c6e733d2275726e3a696574663a706172616d733a786d6c3a6e733a706964663a67656f707269763130223e0a20202020202020202020202020202020202020203c6c6f636174696f6e2d696e666f3e0a2020202020202020202020202020202020202020202020203c67733a436972636c6520786d6c6e733a676d6c3d22687474703a2f2f7777772e6f70656e6769732e6e65742f676d6c22207372734e616d653d2275726e3a6f67633a6465663a6372733a455053473a3a343332362220786d6c6e733a67733d22687474703a2f2f7777772e6f70656e6769732e6e65742f706964666c6f2f312e30223e0a202020202020202020202020202020202020202020202020202020203c676d6c3a706f733e34382e323135333837392031362e323930333c2f676d6c3a706f733e0a202020202020202020202020202020202020202020202020202020203c67733a72616469757320756f6d3d2275726e3a6f67633a6465663a756f6d3a455053473a3a39303031223e32332e3630303030303338313436393732373c2f67733a7261646975733e0a2020202020202020202020202020202020202020202020203c2f67733a436972636c653e0a20202020202020202020202020202020202020203c2f6c6f636174696f6e2d696e666f3e0a20202020202020202020202020202020202020203c75736167652d72756c65732f3e0a20202020202020202020202020202020202020203c6d6574686f643e6770733c2f6d6574686f643e0a202020202020202020202020202020203c2f67656f707269763e0a2020202020202020202020203c2f7374617475733e0a2020202020202020202020203c74696d657374616d703e323031372d30322d31395431303a35353a30302b30303a30303c2f74696d657374616d703e0a20202020202020203c2f7475706c653e0a202020203c2f70726573656e63653e0a3c2f6c6f636174696f6e526573706f6e73653e0a'O); + var bitstring v_enc_raw_message; + var template (present) HttpMessage v_expected_msg := { response := { version_major := 1, version_minor := 1, statuscode := 200, statustext := "", header := { { header_name := "X-Content-Type-Options", header_value := { "nosniff" } }, { header_name := "X-XSS-Protection", header_value := { "1; mode=block" } }, { header_name := "Cache-Control", header_value := { "no-cache, no-store, max-age=0, must-revalidate" } }, { header_name := "Pragma", header_value := { "no-cache" } }, { header_name := "Expires", header_value := { "0" } }, { header_name := "Content-Type", header_value := { "application/held+xml;charset=UTF-8" } }, { header_name := "Content-Length", header_value := { "1004" } }, { header_name := "Date", header_value := { "Tue, 29 May 2018 13:28:59 GMT" } } }, body := { xml_body := { raw := ?/*v_expected_xml_body*/ } } } }; + var HttpMessage v_dec_msg; + var integer v_result; + + v_result := decvalue(v_raw_message, v_dec_msg); + if (v_result == 0) { + if (match(v_dec_msg, v_expected_msg)) { + setverdict(pass, "Decode match"); + } else { + setverdict(fail, "Mismatch values"); + } + } else { + setverdict(fail, "Decode failure"); + } + + v_enc_raw_message := encvalue(v_dec_msg); + if (not isbound(v_enc_raw_message)) { + setverdict(fail, "Encoding failed!"); + } else { + // Raw HTTP response does not end with CRLF ==> Content-Length are different + var bitstring v1 := substr(v_enc_raw_message, 0, 240 * 8); // Byte #240..244: 31303034 + var bitstring v2 := substr(v_raw_message, 0, 240 * 8); // Byte #240..244: 31303035 + if (match(v1, v2)) { + setverdict(pass, "Encode match"); + } else { + setverdict(fail, "Encoding mismatch"); + } + v1 := substr(v_enc_raw_message, 244 * 8, lengthof(v_enc_raw_message) - (244 + 2) * 8); + v2 := substr(v_raw_message, 244 * 8, lengthof(v_raw_message) - (244 + 1) * 8); + log("v1=", bit2oct(v1)); + log("v2=", bit2oct(v2)); + if (match(v1, v2)) { + setverdict(pass, "Encode match"); + } else { + setverdict(fail, "Encoding mismatch"); + } + } + + } // End of testcase tc_http_200_ok_1 + + control { + execute(tc_http_200_ok_1()); + } + +} // End of module TestCodec_HttpResponse diff --git a/ttcn/TestCodec/TestCodec_Invite.ttcn b/ttcn/TestCodec/TestCodec_Invite.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..91c39789b8bff7849681f76cb68f1ce908f9aef4 --- /dev/null +++ b/ttcn/TestCodec/TestCodec_Invite.ttcn @@ -0,0 +1,54 @@ +/** + * @author ETSI / STF549 + * @version $URL:$ + * $ID:$ + * @desc This module provides the codec validation test cases. + * @copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + * @see ETSI TS 103 478 + */ +module TestCodec_Invite { + + // LibCommon + + // LibSip + import from LibSip_SIPTypesAndValues all; + import from LibSip_Templates all; + import from LibSip_EncdecDeclarations all; + + // LibNg112 + import from LibNg112_TypesAndValues all; + import from LibNg112_Templates all; + import from LibNg112_TestSystem all; + + // TestCodec + import from TestCodec_TestAndSystem all; + + testcase tc_invite_request_1() runs on TCType system TCType { + var bitstring v_raw_message := oct2bit('494e56495445207369703a757365723140657473692e6f7267205349502f322e300d0a43616c6c2d49443a2037343239323933324031302e3130302e342e31310d0a436f6e746163743a203c7369703a494d533155454031302e3130302e342e35303a353036303e0d0a436f6e74656e742d4c656e6774683a203134360d0a436f6e74656e742d547970653a206170706c69636174696f6e2f7364700d0a437365713a203230323020494e564954450d0a46726f6d3a203c7369703a494d533155454074657374657473692e6f72673a353036303e3b7461673d35303638393734350d0a4d61782d466f7277617264733a2037300d0a502d4368617267696e672d566563746f723a20696369642d76616c75653d3132336162633b696369642d67656e6572617465642d61743d3139322e312e312e31303b6f7269672d696f693d74657374657473692e6f72670d0a546f3a203c7369703a757365723140657473692e6f72673e0d0a5669613a205349502f322e302f5544502031302e3130302e342e31313a353036303b6272616e63683d7a39684734624b393236383135300d0a0d0a763d300d0a6f3d766f69636573657373696f6e203330303030203020494e204950342031302e3130302e342e35300d0a733d566f6963652053657373696f6e0d0a633d494e204950342031302e3130302e342e35300d0a623d41533a36340d0a743d3020300d0a6d3d617564696f2038353030205254502f4156502034350d0a613d7274706d61703a343520455453490d0a'O); + var INVITE_Request v_dec_msg; + var integer v_result := fx_dec_INVITE_Request (v_raw_message, v_dec_msg); + + if (v_result == 0) { + setverdict(pass, "Decode match"); + log(match(v_dec_msg, mw_INVITE_Request_Base)); + if (match(v_dec_msg, mw_INVITE_Request_Base)) { + setverdict(pass, "Decoding match"); + } else { + setverdict(fail, "decoding mismatch"); + } + } else { + setverdict(fail, "Decode failure"); + } + } // End of testcase tc_invite_request_1 + + testcase tc_invite_request_2() runs on TCType system TCType {} // End of testcase tc_invite_request_2 + + control { + execute(tc_invite_request_1()); + execute(tc_invite_request_2()); + } + +} // End of module TestCodec_Invite diff --git a/ttcn/TestCodec/TestCodec_Register.ttcn b/ttcn/TestCodec/TestCodec_Register.ttcn index 706aa517a938dda480ca7a5cab5b45ef188f9209..763e239a25642f17d6620c420ee63a0f7aafed1a 100644 --- a/ttcn/TestCodec/TestCodec_Register.ttcn +++ b/ttcn/TestCodec/TestCodec_Register.ttcn @@ -26,22 +26,42 @@ module TestCodec_Register { // TestCodec import from TestCodec_TestAndSystem all; - testcase register_request_1() runs on TCType system TCType { - var bitstring v_raw_message := oct2bit('4d455353414745207369703a757365723140657473692e6f7267205349502f322e300d0a43616c6c2d49443a2031373731353939344031302e3130302e342e31310d0a436f6e74656e742d4c656e6774683a20300d0a437365713a2032303130204d4553534147450d0a46726f6d3a203c7369703a494d533155454074657374657473692e6f72673a353036303e3b7461673d36373638373036300d0a4d61782d466f7277617264733a2037300d0a502d4368617267696e672d46756e6374696f6e2d4164647265737365733a206363663d3139322e312e312e313b6563663d3139322e312e312e320d0a502d4368617267696e672d566563746f723a20696369642d76616c75653d3132336162633b696369642d67656e6572617465642d61743d3139322e312e312e31303b6f7269672d696f693d74657374657473692e6f72670d0a546f3a203c7369703a757365723140657473692e6f72673e0d0a5669613a205349502f322e302f5544502031302e3130302e342e31313a353036303b6272616e63683d7a39684734624b34333731323138300d0a0d0a'O); + testcase tc_register_request_1() runs on TCType system TCType { + var bitstring v_raw_message := oct2bit('5245474953544552207369703a657473692e6f7267205349502f322e300d0a417574686f72697a6174696f6e3a2044696765737420757365726e616d653d22757365723140657473692e6f7267222c7265616c6d3d22657473692e6f7267222c7572693d227369703a657473692e6f7267222c6e6f6e63653d22222c726573706f6e73653d22220d0a43616c6c2d49443a20343834393639354031302e3130302e342e310d0a436f6e746163743a203c7369703a75736572314031302e3130302e342e313a353036303e3b657870697265733d333630300d0a436f6e74656e742d4c656e6774683a20300d0a437365713a20313030302052454749535445520d0a46726f6d3a2022455453492054657374657222203c7369703a757365723140657473692e6f72673e3b7461673d31383930383431310d0a4d61782d466f7277617264733a2037300d0a537570706f727465643a20706174680d0a546f3a2022455453492054657374657222203c7369703a757365723140657473692e6f72673e0d0a5669613a205349502f322e302f5544502031302e3130302e342e313a353036303b6272616e63683d7a39684734624b33373539353139350d0a0d0a'O); var REGISTER_Request v_dec_msg; var integer v_result := fx_dec_REGISTER_Request (v_raw_message, v_dec_msg); if (v_result == 0) { setverdict(pass, "Decode match"); + log(match(v_dec_msg, mw_REGISTER_Request_Base)); + if (match(v_dec_msg, mw_REGISTER_Request_Base)) { + setverdict(pass, "Decoding match"); + } else { + setverdict(fail, "decoding mismatch"); + } } else { setverdict(fail, "Decode failure"); } - } // End of testcase register_request_1 + } // End of testcase tc_register_request_1 - testcase register_request_2() runs on TCType system TCType { - var REGISTER_Request v_org_msg := valueof(m_REGISTER_Dummy); - var bitstring v_enc_msg := fx_enc_REGISTER_Request (v_org_msg); + testcase tc_register_request_2() runs on TCType system TCType { var REGISTER_Request v_dec_msg; + var REGISTER_Request v_org_msg := valueof( + m_REGISTER_Request_Base( + m_SipUrl_Anonymous, + -, -, + { fieldName := FROM_E, addressField := { addrSpecUnion := m_SipUrl_Anonymous }, fromParams := omit }, + { fieldName := TO_E, addressField := { addrSpecUnion := m_SipUrl_Anonymous }, toParams := omit }, + { fieldName := VIA_E, viaBody := { + { + sentProtocol := { protocolName := "abcdefghij", protocolVersion := "a", transport := "a" }, + sentBy := { host := "hostnamehost", portField:= 10 }, + viaParams := omit + } + } + } + )); + var bitstring v_enc_msg := fx_enc_REGISTER_Request (v_org_msg); var integer v_result := fx_dec_REGISTER_Request (v_enc_msg, v_dec_msg); if (v_result == 0) { @@ -53,6 +73,11 @@ module TestCodec_Register { } else { setverdict(fail, "Decode failure"); } - } // End of testcase register_request_2 + } // End of testcase tc_register_request_2 + + control { + execute(tc_register_request_1()); + execute(tc_register_request_2()); + } -} // End of module AtsNg112_TestCases +} // End of module TestCodec_Register diff --git a/ttcn/patch_lib_common_titan/LibCommon_Sync.ttcn b/ttcn/patch_lib_common_titan/LibCommon_Sync.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..38e29df924fe40e808448a50008ad62ccc765d27 --- /dev/null +++ b/ttcn/patch_lib_common_titan/LibCommon_Sync.ttcn @@ -0,0 +1,1358 @@ +/** + * @author ETSI + * @version $URL: https://oldforge.etsi.org/svn/LibCommon/tags/v1.4.0/ttcn/LibCommon_Sync.ttcn $ + * $Id: LibCommon_Sync.ttcn 66 2017-03-06 09:59:41Z filatov $ + * @desc This module implements _one_ generic synchronization mechanism + * for TTCN-3 test cases with one or more test components. + * Key concept is here that one test component acts as a + * synchronization server which listens and triggers one or more + * synchronization clients. It is recomended to use the MTC always as + * the synchronization server but in theory also a PTC can act as such + * a server.

+ * This synchronization is used by calling a function on + * the server test component to wait for a desired amount of clients + * to notify the server that they have reached a specific synchronization + * point. Each client test component must call another + * function to perform this notification.

+ * In the event that a client is not able to reach a synchronization + * point the server sends out a signal to all clients to abort the + * test case. This signal is a STOP message which can be caught by + * a test component default which in turn can then run a proper + * shut down behavior based on the current state of the test + * component.

+ * Note that this synchronization mechanism can also be used + * in a special mode called "self synchronization" when a test case + * only has one test component. Here, the test component in essence + * acts as a server and client at the same time. The main benefit of + * using self synchoronization is that the same shutdown mechanisms + * can also be reused fomr the multi component test cases.

+ * This module contains a lot of TTCN-3 definitions. It has been + * structured into tree main groups to help the user to identify + * quickly relevant TTCN-3 definitions. For rookie users of this + * module basicUserRelevantDefinitions should offer all the needed + * definitions. Advanced users can consider use of definitions in + * advancedUserRelevantDefinitions. Finally, internalDefinitions + * are definitions which are required for the module to work + * properly but do not need to be used in your code. Remember that + * the main motiviation of this sychronization module is to offer + * are _simple_ user interface. Practice has shown that when writing + * actual test component behavior _only a handful_ of functions + * usually wind up being used! Also check the synchronization examples + * module for example uses of this synchronization mechanism.

+ * The invocation of the sync functions is also closely tied + * to the verdict control functions which should also be reviewed + * prior to using this module.

+ * This module has been derived from EtsiCommon_Synchronization + * which was created in ETSIs STF256/276. It has been kept + * intentionally separate to avoid conflicts with future ETSI + * test suite releases. + * @see LibCommon_Sync.basicUserRelevantDefinitions + * @see LibCommon_Sync.advancedUserRelevantDefinitions + * @remark End users should be aware that any changes made to the in + * definitions this module may be overwritten in future releases. + * End users are encouraged to contact the distributers of this + * module regarding their modifications or additions so that future + * updates will include your changes. + * @copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + * + */ +module LibCommon_Sync { + + //Common + import from LibCommon_BasicTypesAndValues { type UInt } ; + import from LibCommon_AbstractData all; + import from LibCommon_VerdictControl all; + + group basicUserRelevantDefinitions { + + group importantSyncTypeDefinitions { + + group compTypeRelated { + + /** + * @desc This type is used to be the base of any synchronization + * behavior which is to be executed on a sync server + * component. The test component which acts as a + * sync server in a test case must NOT directly use + * this component type in its runs on clause! + * Note that server synchronization functions may be + * invoked by a test component as long as its + * component type is type compatible to this component + * type definition! + */ + type component BaseSyncComp { + port SyncPort syncPort; + timer tc_sync := PX_TSYNC_TIME_LIMIT; + } + + /** + * @desc This type is used to define any synchronization + * behavior which is to be executed on a sync server + * component. The test component which acts as a + * sync server in a test case may - but does + * not have to - directly use this component type its + * runs on clause. + * Note that server synchronization functions may be + * invoked by a test component as long as its + * component type is type compatible to this component + * type definition! + */ + type component ServerSyncComp extends BaseSyncComp { + timer tc_shutDown := PX_TSHUT_DOWN_TIME_LIMIT; + } + + /** + * @desc This type is used to define any synchronization + * behavior which is to be executed on a sync client + * component. The test component(s) which act as a + * sync client in a test case may - but do not have + * to - directly use this component type their runs + * on clause. + * Note that server synchronization functions may be + * invoked by a test component as long as its + * component type is type compatible to this component + * type definition! + */ + type component ClientSyncComp extends BaseSyncComp { + var StringStack v_stateStack:= c_initStringStack; + var TestcaseStep vc_testcaseStep := e_preamble; + } + + /** + * @desc This type is used to define any synchronization + * behavior which is relevant to non-concurrent test + * cases. + * Note that self synchronization functions may be + * invoked by a test component as long as its + * component type is type compatible to this component + * type definition! + * Note also that this type is type compatible to the + * ClientSyncComp type so that shutdown altsteps from + * concurrent test cases can also be reused in single + * component test cases! + * @see LibCommon_Sync.ClientSyncComp + */ + type component SelfSyncComp extends ClientSyncComp { + port SyncPort syncSendPort; + } + + /** + * @desc This port type must be imported into test suites + * when defining test component types which are + * type compatible to a synchronization component + * type + * @see LibCommon_Sync.SelfSyncComp + * @see LibCommon_Sync.ServerSyncComp + * @see LibCommon_Sync.ClientSyncComp + */ + type port SyncPort message { + inout SyncCmd + } with { + extension "internal" + } + + + /** + * @desc Describes in which step of execution is the testcase + */ + type enumerated TestcaseStep { + e_preamble, + e_testBody, + e_postamble + } + + } // end compTypeRelated + + group standardSyncPointNames { + const charstring c_prDone := "preambleDone"; + const charstring c_poDone := "postambleDone"; + const charstring c_tbDone := "testBodyDone"; + const charstring c_initDone := "initDone"; + } + + } // end group importantSyncTypeDefinitions + + group syncCompTestConfiguration { + + /** + * @desc Calls self connect function if invoking + * component is the MTC or otherwise connects the client + * the server. This function allows to implement preambles + * in a way that they can be used by test components + * in both non-concurrent as well as concurrent test + * cases! + * @remark This function should _not_ be called if the MTC + * acts as a client (and not a server) in a concurrent + * test case. In this case f_connect4ClientSync + * should be used instead. + * @see LibCommon_Sync.f_connect4SelfSync + * @see LibCommon_Sync.f_connect4ClientSync + */ + function f_connect4SelfOrClientSync() + runs on SelfSyncComp { + if ( self == mtc ) { + f_connect4SelfSync(); + } else { + f_connect4ClientSync(); + } + } + + /** + * @desc Calls self connect function if the invoking + * component is the MTC or otherwise disconnects the client + * from the server. This function allows to implement + * postambles in a way that they can be used in both + * non-concurrent as well as concurrent test cases. + * @remark This function should _not_ be called if the MTC + * acts as a client (and not a server) in a concurrent + * test case. In this case f_disconnect4ClientSync + * should be used instead. + * @see LibCommon_Sync.f_disconnect4SelfSync + * @see LibCommon_Sync.f_disconnect4ClientSync + */ + function f_disconnect4SelfOrClientSync() + runs on SelfSyncComp { + if ( self == mtc ) { + f_disconnect4SelfSync(); + } else { + f_disconnect4ClientSync(); + } + } + + } // end group syncCompTestConfiguration + + group syncFunctions { + + /** + * @desc Implements synchronization of 2 clients from server side + * on one or more synchronization points. + * If problem occurs, then server sends STOP to all clients. + * Waits for PX_TSYNC_TIME_LIMIT to let clients + * finish executing their behavior until this + * synchronization point. After passing all synchronization + * points successfuly the server waits for all clients + * to stop. + * See f_serverSyncClientsTimed for overwriting this + * the timing constraint! + * This function sets the server component verdict. + * @remark The use of this function requires prior connection of + * the server sync ports! + * @see LibCommon_Sync.f_connect4SelfOrClientSync + * @see LibCommon_Sync.PX_TSYNC_TIME_LIMIT + * @see LibCommon_Sync.f_serverSyncClientsTimed + * @see LibCommon_Sync.f_serverWaitForAllClientsToStop + * @param p_syncPointIds list of synchronization point name/ids + */ + function f_serverSync2ClientsAndStop( in SyncPointList p_syncPointIds ) + runs on ServerSyncComp { + f_serverSyncNClientsAndStop(2, p_syncPointIds); + } + + /** + * @desc Implements synchronization of 3 clients from server side + * on one or more synchronization points. + * If problem occurs, then server sends STOP to all clients. + * Waits for PX_TSYNC_TIME_LIMIT to let clients + * finish executing their behavior until this + * synchronization point. After passing all synchronization + * points successfuly the server waits for all clients + * to stop. + * See f_serverSyncClientsTimed for overwriting this + * the timing constraint! + * This function sets the server component verdict. + * @remark The use of this function requires prior connection of + * the server sync ports! + * @see LibCommon_Sync.f_connect4SelfOrClientSync + * @see LibCommon_Sync.PX_TSYNC_TIME_LIMIT + * @see LibCommon_Sync.f_serverSyncClientsTimed + * @see LibCommon_Sync.f_serverWaitForAllClientsToStop + * @param p_syncPointIds list of synchronization point name/ids + */ + function f_serverSync3ClientsAndStop( in SyncPointList p_syncPointIds ) + runs on ServerSyncComp { + f_serverSyncNClientsAndStop(3, p_syncPointIds); + } + + /** + * @desc Implements synchronization of 4 clients from server side + * on one or more synchronization points. + * If problem occurs, then server sends STOP to all clients. + * Waits for PX_TSYNC_TIME_LIMIT to let clients + * finish executing their behavior until this + * synchronization point. After passing all synchronization + * points successfuly the server waits for all clients + * to stop. + * See f_serverSyncClientsTimed for overwriting this + * the timing constraint! + * This function sets the server component verdict. + * @remark The use of this function requires prior connection of + * the server sync ports! + * @see LibCommon_Sync.f_connect4SelfOrClientSync + * @see LibCommon_Sync.PX_TSYNC_TIME_LIMIT + * @see LibCommon_Sync.f_serverSyncClientsTimed + * @see LibCommon_Sync.f_serverWaitForAllClientsToStop + * @param p_syncPointIds list of synchronization point name/ids + */ + function f_serverSync4ClientsAndStop( in SyncPointList p_syncPointIds ) + runs on ServerSyncComp { + f_serverSyncNClientsAndStop(4, p_syncPointIds); + } + + /** + * @desc Implements synchronization of N clients from server side + * on one or more synchronization points. + * If problem occurs, then server sends STOP to all clients. + * Waits for PX_TSYNC_TIME_LIMIT to let clients + * finish executing their behavior until this + * synchronization point. After passing all synchronization + * points successfuly the server waits for all clients + * to stop. + * See f_serverSyncClientsTimed for overwriting this + * the timing constraint! + * This function sets the server component verdict. + * @remark The use of this function requires prior connection of + * the server sync ports! + * @see LibCommon_Sync.f_connect4SelfOrClientSync + * @see LibCommon_Sync.PX_TSYNC_TIME_LIMIT + * @see LibCommon_Sync.f_serverSyncClientsTimed + * @see LibCommon_Sync.f_serverWaitForAllClientsToStop + * @param p_numClients number of synchronization clients + * @param p_syncPointIds list of synchronization point name/ids + */ + function f_serverSyncNClientsAndStop ( + in UInt p_numClients, + in SyncPointList p_syncPointIds ) + runs on ServerSyncComp { + var integer i, v_noOfSyncIds := sizeof(p_syncPointIds); + for ( i := 0; i < v_noOfSyncIds; i := i+1 ) { + f_serverSyncClientsTimed ( + p_numClients, + valueof(p_syncPointIds[i]), + PX_TSYNC_TIME_LIMIT ); + } + f_serverWaitForAllClientsToStop(); + } + + /** + * @desc Implements synchronization of 2 clients and 1 UT from server side + * on one or more synchronization points. + * If problem occurs, then server sends STOP to all clients. + * Waits for PX_TSYNC_TIME_LIMIT to let clients + * finish executing their behavior until this + * synchronization point. After passing all synchronization + * points successfuly the server waits for all clients + * to stop. + * See f_serverSyncClientsTimed for overwriting this + * the timing constraint! + * This function sets the server component verdict. + * @remark The use of this function requires prior connection of + * the server sync ports! + * @see LibCommon_Sync.f_connect4SelfOrClientSync + * @see LibCommon_Sync.PX_TSYNC_TIME_LIMIT + * @see LibCommon_Sync.f_serverSyncClientsTimed + * @see LibCommon_Sync.f_serverWaitForAllClientsToStop + * @param p_syncPointIds list of synchronization point name/ids + */ + function f_serverSync2ClientsUtAndStop( in SyncPointList p_syncPointIds ) + runs on ServerSyncComp { + var integer i, v_noOfSyncIds := sizeof(p_syncPointIds); + for ( i := 0; i < v_noOfSyncIds; i := i+1 ) { + f_serverSyncClientsTimed(3,valueof(p_syncPointIds[i]), PX_TSYNC_TIME_LIMIT); + } + f_serverWaitForAllClientsToStop(); + } + + /** + * @desc Calls either self synchronization function if + * invoking component is the MTC, otherwise + * calls client synchronization. After that it + * sets the verdict based on the specified return code. + * This function allows to implement TTCN-3 functions + * in a way that they can be used in both non-concurrent + * as well as concurrent test cases. + * @remark This function should _not_ be called if the MTC + * acts as a client (and not a server) in a concurrent + * test case. In this case f_clientSyncAndVerdict + * should be used instead. + * @param p_syncPoint Synchronization point name/id + * @param p_ret Current behavior execution status + * @see LibCommon_Sync.f_clientSyncAndVerdict + * @see LibCommon_VerdictControl.f_setVerdict + */ + function f_selfOrClientSyncAndVerdict( in charstring p_syncPoint, + in FncRetCode p_ret) + runs on SelfSyncComp { + if ( self == mtc ) { + // then assume we are running non-conurrent test case + f_selfSyncAndVerdict(p_syncPoint, p_ret); + } else { + f_clientSyncAndVerdict(p_syncPoint, p_ret); + } + } + + /** + * @desc Calls either self synchronization function if + * invoking component is the MTC, otherwise + * calls client synchronization. After that it + * sets a preamble specific verdict based on the + * specified return code. + * This function allows to implement TTCN-3 functions + * in a way that they can be used in both non-concurrent + * as well as concurrent test cases. + * @remark This function should _not_ be called if the MTC + * acts as a client (and not a server) in a concurrent + * test case. In this case f_clientSyncAndVerdictPreamble + * should be used instead. + * @param p_syncPoint Synchronization point name/id + * @param p_ret Current behavior execution status + * @see LibCommon_Sync.f_clientSyncAndVerdict + * @see LibCommon_VerdictControl.f_setVerdictPreamble + */ + function f_selfOrClientSyncAndVerdictPreamble( in charstring p_syncPoint, + in FncRetCode p_ret) + runs on SelfSyncComp { + if ( self == mtc ) { + // then assume we are running non-conurrent test case + f_selfSyncAndVerdictPreamble(p_syncPoint, p_ret); + } else { + f_clientSyncAndVerdictPreamble(p_syncPoint, p_ret); + } + } + + /** + * @desc Calls either self synchronization function if + * invoking component is the MTC, otherwise + * calls client synchronization. After that it + * sets a preamble specific verdict based on the + * specified return code. + * This function allows to implement TTCN-3 functions + * in a way that they can be used in both non-concurrent + * as well as concurrent test cases. + * @remark This function should _not_ be called if the MTC + * acts as a client (and not a server) in a concurrent + * test case. In this case f_clientSyncAndVerdictTestBody + * should be used instead. + * @param p_syncPoint Synchronization point name/id + * @param p_ret Current behavior execution status + * @see LibCommon_Sync.f_clientSyncAndVerdict + * @see LibCommon_VerdictControl.f_setVerdictPreamble + */ + function f_selfOrClientSyncAndVerdictTestBody( in charstring p_syncPoint, + in FncRetCode p_ret) + runs on SelfSyncComp { + if ( self == mtc ) { + // then assume we are running non-conurrent test case + f_selfSyncAndVerdictTestBody(p_syncPoint, p_ret); + } else { + f_clientSyncAndVerdictTestBody(p_syncPoint, p_ret); + } + } + + /** + * @desc Function kept for backward compatibility + * @see f_selfOrClientSyncAndVerdictPreamble + * + */ + function f_selfOrClientSyncAndVerdictPR( in charstring p_syncPoint, + in FncRetCode p_ret) + runs on SelfSyncComp { + f_selfOrClientSyncAndVerdictPreamble(p_syncPoint, p_ret); + } + + } // end group syncFunctions + + group syncCompStateHandling { + + /** + * + * @desc This function updates the state (stack) of a + * sync client or self sync component. This stack is + * key in the shutdown handling of test components. + * It adds the new state name to the top of the + * sync component stack of states. + * The state will only be added in case of a current + * execution status of e_success. + * @param p_newSyncCompState Name of state which was attempted to be reached. + * @param p_ret Current behavior execution status + * @remark If the state of component changes this function must be + * _at least_ called from your test suite prior to f_selfSync + * or f_clientSync which is the only definite place for the + * shutdown default invocation! + * @see LibCommon_Sync.a_dummyShutDown + * @see LibCommon_Sync.f_selfSync + * @see LibCommon_Sync.f_clientSync + */ + function f_addSyncCompState(in charstring p_newSyncCompState, + in FncRetCode p_ret) + runs on ClientSyncComp { + if ( p_ret == e_success ) { + if ( f_isItemOnStringStack(v_stateStack,p_newSyncCompState) ) { + log("**** f_addSyncCompState: WARNING: Attempt to add state which is already on sync state stack! No additition done.****"); + } else { + f_pushStringStack(v_stateStack,p_newSyncCompState); + } + } + } // end function f_addSyncCompState + + /** + * + * @desc This function returns the top state on the sync + * state stack of a sync client or self sync + * component and removes it from the stack + * This function cna be used, e.g., in a while + * statement within a postamble or shutdown + * implementation + * @param p_state State on top of the state stack. + * @return false if state stack is empty, true otherwise + * @see LibCommon_Sync.a_dummyShutDown + */ + function f_getTopSyncCompState( out charstring p_state ) + runs on ClientSyncComp + return boolean { + if ( not f_peekStringStackTop(v_stateStack,p_state) ) { + p_state := "IDLE"; + return false; + } + f_popStringStack(v_stateStack); + return true; + } // end function f_getTopSyncCompState + + /* + * @desc This function removes the last state on the state stack + * of a sync client or self sync component. + * This stack is key in the shutdown handling of test + * components. + * @see LibCommon_Sync.a_dummyShutDown + */ + function f_popSyncCompState() + runs on ClientSyncComp { + f_popStringStack(v_stateStack); + } // end function f_popSyncCompState + + /** + * + * @desc This function returns the top state on the sync state + * stack of a sync client or self sync component. It + * does not remove it from the stack + * This stack is key in the shutdown handling of test + * components. + * @param p_state State on top of the state stack. + * @return false if state stack is empty, true otherwise + * @see LibCommon_Sync.a_dummyShutDown + */ + function f_peekTopSyncCompState(out charstring p_state) + runs on ClientSyncComp + return boolean { + return f_peekStringStackTop(v_stateStack,p_state); + } // end function f_peekTopSyncCompState + + /** + * @desc This function checks if the sync state stack + * of a sync client or self sync component is empty. + * This stack is key in the shutdown handling of test + * components. + * @see LibCommon_Sync.a_dummyShutDown + */ + function f_isSyncCompStateStackEmpty() + runs on ClientSyncComp + return boolean { + return f_isStringStackEmpty(v_stateStack); + } // end function f_isSyncCompStateStackEmpty + + } // end group syncCompStateHandling + + group shutDownAltsteps { + + /** + * @desc This is an example of a shutdown altstep which can be + * used as a "template" for a interface specific shutdown + * altstep or possily as a first temporary solution in + * test case development.

+ * This altstep shall be activated as a default as the + * first statement in each test case function which drives + * an interface, i.e., in MTC behavior of single component + * and in each client behavior of multi component test + * cases.
+ * The required behavior from this altstep is to:

+ * 1) expect the STOP either via the test component + * syncPort

+ * 2) upon its arrival it should shut down the SUT + * gracefully based on the current component state

+ * The current component state should have been + * previously kept uptodate from a test suite via the + * f_addSyncCompState function. This default will then be + * (automatically) invoked either from within f_selfSync + * or f_clientSync.
+ * Note that shutdown defaults can be written as + * _interface specific_ - they do not need to be test case + * or test component specific! See another example of a + * shutdown altstep in the sync module. + * @see LibCommon_Sync.f_addSyncCompState + * @see LibCommon_Sync.f_selfSync + * @see LibCommon_Sync.f_clientSync + * @see LibCommon_SyncExamples.a_exampleShutDown + * @remark Your application specific shutdown altstep + * implementation(s) should _not_ be defined in this + * module but as part of your test suite or application specific + * modules. + */ + altstep a_dummyShutDown() + runs on SelfSyncComp { + [] syncPort.receive(m_syncServerStop){ + var charstring v_state := ""; + tc_sync.stop; + log("**** a_dummyShutDown: Test component received STOP signal from sync server - going to IDLE state ****"); + while ( f_getTopSyncCompState(v_state) ) { + if ( v_state == "x" ) { + // then do something + } else if ( v_state == "y" ) { + // then do something else + } + } // end while + f_disconnect4SelfOrClientSync(); + // unmap/disconnect more if needed + log("**** a_dummyShutDown: -> Test component stopping itself now! ****") ; + stop ; + } + } // end altstep a_dummyShutDown + + /** + * @desc Shutdown alstep in case the sync server is requesting shutdown. + * + * @remark User shall stop the component + */ + altstep a_shutdown() + runs on ClientSyncComp { + [] syncPort.receive(m_syncServerStop){ + tc_sync.stop ; + log("**** a_shutdown: Test component received STOP signal from MTC **** "); + } + } + + } // end group shutDownAltsteps + + } // end group basicUserRelevantDefinitions + + group advancedUserRelevantDefinitions { + + group serverRelated { + + /** + * @desc Implements synchronization of "n" clients from server + * side. If a problem occurs, then server sends STOP to + * all clients. Waits for PX_TSYNC_TIME_LIMIT to let + * clients finish executing their behavior until this + * synchronization point. See f_serverSyncClientsTimed for + * overwriting this later timing constraint! + * This function sets the server component verdict. + * @remark The use of this function requires prior connection of + * the server sync port! + * @see LibCommon_Sync.f_connect4SelfOrClientSync + * @see LibCommon_Sync.PX_TSYNC_TIME_LIMIT + * @see LibCommon_Sync.f_serverSyncClientsTimed + * @param p_noOfClients number of clients to be synchronized + * @param p_syncId synchronization point name/id + */ + function f_serverSyncClients( in UInt p_noOfClients, in charstring p_syncId ) + runs on ServerSyncComp { + f_serverSyncClientsTimed(p_noOfClients,p_syncId, PX_TSYNC_TIME_LIMIT); + } + + /** + * @desc Implements synchronization of "n" clients from server + * side including intermediate synchronization. + * If a problem occurs, then server sends STOP to + * all clients. Waits for PX_TSYNC_TIME_LIMIT to let + * clients finish executing their behavior until this + * synchronization point. See f_serverSyncClientsTimed for + * overwriting this later timing constraint! + * This function sets the server component verdict. + * @remark The use of this function requires prior connection of + * the server sync port! + * @see LibCommon_Sync.f_connect4SelfOrClientSync + * @see LibCommon_Sync.PX_TSYNC_TIME_LIMIT + * @see LibCommon_Sync.f_serverSyncClientsTimed + * @param p_noOfClients number of clients to be synchronized + * @param p_syncId synchronization point name/id + */ + function f_serverSyncClientsIntermediateSync( in UInt p_noOfClients, in charstring p_syncId, in UInt p_NoOfClientIntermediate, in template (present) charstring p_syncIdIntermediate ) + runs on ServerSyncComp { + f_serverSyncClientsTimedIntermediateSync(p_noOfClients,p_syncId, p_NoOfClientIntermediate, p_syncIdIntermediate, PX_TSYNC_TIME_LIMIT); + } + + /** + * @desc Handles synchronization of clients from server side. + * If problem occurs, then server sends STOP to all clients. + * This function sets the server verdict. + * @remark The use of this function requires prior connection of + * the server sync ports! + * @param p_NoOfClients number of clients to be synchronized + * @param p_syncId synchronization point name/id + * @param p_execTimeLimit time limit given to all clients to finish the execution + * of their behavior up to this synchronization point + * @see LibCommon_Sync.f_connect4SelfOrClientSync + */ + function f_serverSyncClientsTimed(in UInt p_NoOfClients, + in charstring p_syncId, + float p_execTimeLimit ) + runs on ServerSyncComp { + f_serverSyncClientsTimedIntermediateSync(p_NoOfClients, p_syncId, 0, ?, p_execTimeLimit ) + } // end function f_serverSyncClientsTimed + + /** @desc Handles synchronization of clients from server side including + * intermediate synchronization. + * If problem occurs, then server sends STOP to all clients. + * This function sets the server verdict. + * @remark The use of this function requires prior connection of + * the server sync ports! + * @param p_NoOfClients number of clients to be synchronized + * @param p_syncId synchronization point name/id + * @param p_execTimeLimit time limit given to all clients to finish the execution + * of their behavior up to this synchronization point + * @see LibCommon_Sync.f_connect4SelfOrClientSync + * @return execution status + */ + function f_serverSyncClientsTimedIntermediateSync( in UInt p_NoOfClients, + in charstring p_syncId, in UInt p_NoOfClientIntermediate, in template (present) charstring p_syncIdIntermediate, + float p_execTimeLimit ) + runs on ServerSyncComp { + + var integer v_noOfRecvdSyncMsgs := 0, v_noOfRecvdSyncMsgsIntermediate := 0; + var boolean v_stopClients := false; + var ClientSyncCompList v_clientRefs := {}, v_clientRefsIntermediate := {}; + var ClientSyncComp v_clientRef; + + if ( p_syncId == c_prDone ) { + log("**** f_serverSyncClientsTimed: Sync server now starting PREAMBLE synchronization ... ****") ; + } else if ( p_syncId == c_tbDone ) { + log("**** f_serverSyncClientsTimed: Sync server now starting TEST BODY synchronization ... ****") ; + } else if ( p_syncId == c_initDone ) { + log("**** f_serverSyncClientsTimed: Sync server now starting UPPER TESTER synchronization ... ****") ; + } else { + log("**** f_serverSyncClientsTimed: Sync server now starting handling of next synchronization point ... ****") ; + } + tc_sync.start(p_execTimeLimit) ; + alt{ + [v_noOfRecvdSyncMsgsIntermediate != p_NoOfClientIntermediate] syncPort.receive(m_syncClientReady(p_syncIdIntermediate)) -> sender v_clientRef { + if(not f_isPresentInArray(v_clientRef, v_clientRefsIntermediate)) { + v_clientRefsIntermediate[v_noOfRecvdSyncMsgsIntermediate] := v_clientRef; + v_noOfRecvdSyncMsgsIntermediate := v_noOfRecvdSyncMsgsIntermediate + 1; + if (v_noOfRecvdSyncMsgsIntermediate == p_NoOfClientIntermediate) { + f_serverSendToAllClients(v_clientRefsIntermediate, m_syncServerReady(p_syncIdIntermediate)); + } + } + repeat; + } + [] syncPort.receive(m_syncClientReady(p_syncId)) -> sender v_clientRef { + if(not f_isPresentInArray(v_clientRef, v_clientRefs)) { + v_clientRefs[v_noOfRecvdSyncMsgs] := v_clientRef; + v_noOfRecvdSyncMsgs := v_noOfRecvdSyncMsgs + 1; + } + if ( v_noOfRecvdSyncMsgs != p_NoOfClients ) { repeat; } + } + [] syncPort.receive(m_syncClientStop) -> sender v_clientRef { + log("**** f_serverSyncClientsTimed: Sync server received STOP signal from a client - server will wait for all clients to reach their next synchronization point and then stop them! ****") ; + v_stopClients := true; + if(not f_isPresentInArray(v_clientRef, v_clientRefs)) { + v_clientRefs[v_noOfRecvdSyncMsgs] := v_clientRef; + v_noOfRecvdSyncMsgs := v_noOfRecvdSyncMsgs + 1; + } + if ( v_noOfRecvdSyncMsgs != p_NoOfClients ) { repeat; } + + } + [] syncPort.receive(m_syncClientReady(?)) -> sender v_clientRef { + log("**** f_serverSyncClientsTimed: Sync server received client sync message with incorrect synchronization point id which is currently not handled - server will stop all clients! ****") ; + v_stopClients := true; + if(not f_isPresentInArray(v_clientRef, v_clientRefs)) { + v_clientRefs[v_noOfRecvdSyncMsgs] := v_clientRef; + } + } + [] syncPort.receive(SyncCmd :? ) { + log("**** f_serverSyncClientsTimed: Sync server received (invalid) sync message from other sync server - server will stop all clients! ****") ; + v_stopClients := true; } + [] any port.receive { + // leave it to be ok to receive anything else + // in case that the user has added any non-sync ports to + // his/her server component type definition! + } + [] tc_sync.timeout{ + log("**** f_serverSyncClientsTimed: A client is not responding within specified time limit - sync server is sending stop to all clients! ****"); + v_stopClients := true; } + } //end alt + if (v_noOfRecvdSyncMsgsIntermediate != p_NoOfClientIntermediate) { + v_stopClients := true; + } + tc_sync.stop ; + if ( v_stopClients ) { + setverdict(inconc); + // then send out STOP sync msg + f_serverSendToAllClients(v_clientRefs, m_syncServerStop); + f_serverWaitForAllClientsToShutDown(); // function will never return! + } else { + setverdict(pass); + // then send out READY sync msg + f_serverSendToAllClients(v_clientRefs, m_syncServerReady(p_syncId)); + if ( p_syncId == c_prDone ) { + log("**** f_serverSyncClientsTimed: Sync server successfully passed PREAMBLE synchronization point. ****") ; + } else if ( p_syncId == c_tbDone ) { + log("**** f_serverSyncClientsTimed: Sync server successfully passed TEST BODY synchronization point. ****") ; + } else { + log("**** f_serverSyncClientsTimed: Sync server successfully passed synchronization point. ****") ; + } + } + } // end function f_serverSyncClientsTimedIntermediateSync + + /** + * @desc This function is intended only for use on the sync + * server component in concurrent TTCN-3 test cases. + * It waits for all components to finish execution within + * the PX_TSYNC_TIME_LIMIT. If a timeout occurs + * the server will stop all clients. + * This function sets the server component verdict. + */ + function f_serverWaitForAllClientsToStop() + runs on ServerSyncComp { + tc_sync.start; + alt { + [] all component.done { + tc_sync.stop; + log("**** f_serverWaitForAllClientsToStop: All sync clients have finished their execution. Sync server now terminating test case. ****") ; + } + [] tc_sync.timeout { + log("**** f_serverWaitForAllClientsToStop: Not all sync clients have finshed execution within the sync time limit. Sync server will stop test case! ****") ; + stop; + } + } // end alt + setverdict(pass); + } // end function f_serverWaitForAllClientsToStop + + } // end group serverRelated + + group clientRelated { + + /** + * @desc This function creates the connection needed to + * execute client synchronization functions + * @see LibCommon_Sync.f_clientSync + * @see LibCommon_Sync.f_clientSendStop + */ + function f_connect4ClientSync() + runs on ClientSyncComp { + connect(self:syncPort, mtc:syncPort); + }// end function f_connect4ClientSync + + /** + * @desc This function removes the connection needed + * to execute client synchronization functions + * @see LibCommon_Sync.f_clientSync + * @see LibCommon_Sync.f_clientSendStop + */ + function f_disconnect4ClientSync() + runs on ClientSyncComp { + disconnect(self:syncPort, mtc:syncPort); + }// end function f_disconnect4ClientSync + + /** + * @desc This function combines client verdict setting with its + * synchronization for use,e.g, after or within a + * test body implementation. + * Note that such premables can _not_ be reused in non- + * concurrent test cases. This can be achieved by using + * the f_selfOrClientSyncAndVerdict function instead. + * This function sets the client component verdict. + * @param p_syncId Synchronization point name/id + * @param p_ret Current behavior execution status + * @remark The use of this function requires prior connection + * of the client sync port! + * @see LibCommon_Sync.f_connect4ClientSync + * @see LibCommon_Sync.f_connect4SelfOrClientSync + * @see LibCommon_VerdictControl.f_setVerdict + * @see LibCommon_Sync.f_selfOrClientSyncAndVerdict + */ + function f_clientSyncAndVerdict(in charstring p_syncId, + in FncRetCode p_ret) + runs on ClientSyncComp { + if(vc_testcaseStep == e_preamble) { + f_clientSyncAndVerdictPreamble(p_syncId, p_ret); + } else if(vc_testcaseStep == e_testBody) { + f_clientSyncAndVerdictTestBody(p_syncId, p_ret); + } + else { + f_clientSyncAndVerdictPostamble(p_syncId, p_ret); + } + } + + /** + * @desc This function combines client verdict setting with its + * synchronization for use after or within a preamble + * implementation. + * Note that such preambles can _not_ be reused in non- + * concurrent test cases. + * This function sets the client component verdict. + * @remark The use of this function requires prior connection + * of the client sync port! + * @see LibCommon_Sync.f_connect4ClientSync + * @see LibCommon_Sync.f_connect4SelfOrClientSync + * @see LibCommon_VerdictControl.f_setVerdictPreamble + * @param p_syncId Synchronization point name/id + * @param p_ret Current behavior execution status + */ + function f_clientSyncAndVerdictPreamble(in charstring p_syncId , + FncRetCode p_ret) + runs on ClientSyncComp { + f_setVerdictPreamble(p_ret); + f_clientSync(p_syncId,p_ret); + vc_testcaseStep := e_testBody; + } + + /** + * @desc This function combines client verdict setting with its + * synchronization for use,e.g, after or within a + * test body implementation. + * Note that such premables can _not_ be reused in non- + * concurrent test cases. This can be achieved by using + * the f_selfOrClientSyncAndVerdict function instead. + * This function sets the client component verdict. + * @param p_syncId Synchronization point name/id + * @param p_ret Current behavior execution status + * @remark The use of this function requires prior connection + * of the client sync port! + * @see LibCommon_Sync.f_connect4ClientSync + * @see LibCommon_Sync.f_connect4SelfOrClientSync + * @see LibCommon_VerdictControl.f_setVerdict + * @see LibCommon_Sync.f_selfOrClientSyncAndVerdict + */ + function f_clientSyncAndVerdictTestBody(in charstring p_syncId, + in FncRetCode p_ret) + runs on ClientSyncComp { + f_setVerdict(p_ret); + f_clientSync(p_syncId,p_ret); + vc_testcaseStep := e_postamble; + } + + /** + * @desc This function combines client verdict setting with its + * synchronization for use after or within a + * postamble implementation. + * Note that such prostambles can _not_ be reused in non- + * concurrent test cases. + * This function sets the client component verdict. + * @remark The use of this function requires prior connection + * of the client sync port! + * @see LibCommon_Sync.f_connect4ClientSync + * @see LibCommon_Sync.f_connect4SelfOrClientSync + * @see LibCommon_VerdictControl.f_setVerdictPostamble + * @param p_syncId Synchronization point name/id + * @param p_ret Current behavior execution status + */ + function f_clientSyncAndVerdictPostamble(in charstring p_syncId , + in FncRetCode p_ret) + runs on ClientSyncComp { + f_setVerdictPostamble(p_ret); + f_clientSync(p_syncId,p_ret); + } + + /** + * @desc This function handles synchronization of a sync client + * with the server. In case of successful execution it sends + * a READY message to the server and waits the READY back. + * The time used for waiting is defined by PX_TSYNC_TIME_LIMIT. + * In case of a non successful execution status it + * sends a STOP message to the server. + * In both cases the receipt of a STOP message or no + * response from the server it will trigger the shutdown + * default (if activated). + * This function will set only the client verdict to INCONC + * (and stop its execution) if no STOP response is received + * from the server within the PX_TSYNC_TIME_LIMIT + * or if no shutdown default is activated. In all other + * cases the client verdict is NOT set. + * @param p_syncId Synchronization point name/id + * @param p_ret Current behavior execution status + * @remark The use of this function requires prior connection + * of the client sync port! + * @see LibCommon_Sync.f_connect4ClientSync + * @see LibCommon_Sync.f_connect4SelfOrClientSync + * @see LibCommon_Sync.PX_TSYNC_TIME_LIMIT + * @see LibCommon_Sync.a_dummyShutDown + * @see LibCommon_Sync.f_clientSendStop + * @return Updated execution status + */ + function f_clientSync( in charstring p_syncId , + in FncRetCode p_ret ) + runs on ClientSyncComp + return FncRetCode{ + + if (p_ret == e_success){ + syncPort.send(m_syncClientReady(p_syncId)); + tc_sync.start; + alt{ + [] syncPort.receive(m_syncServerReady(p_syncId)){ + tc_sync.stop ; } + [] tc_sync.timeout{ + log("**** f_clientSync: Sync client did not receive message from sync server within the specified time limit - sync client will ask sync server to stop test case! ****") ; + f_clientSendStop(); } // function will not return! + } //end alt + } //end if + else { + log("**** f_clientSync: Execution status indicates that execution of test component behavior was not successful - sync client will ask sync server to stop test case! ****") ; + f_clientSendStop(); // function will not return! + } + if ( p_syncId == c_prDone ) { + log("**** f_clientSync: Sync client successfully passed PREAMBLE synchronization point. ****") ; + } else if ( p_syncId == c_tbDone ) { + log("**** f_clientSync: Sync client successfully passed TEST BODY synchronization point. ****") ; + } else { + log("**** f_clientSync: Sync client successfully passed synchronization point. ****") ; + } + return e_success ; + + } // end function f_clientSync + + /** + * @desc This function can be used to request the shutdown a + * multi component test case _prior_ to reaching a + * synchronization point. It sends a STOP message to + * the sync server and awaits then the STOP from the server + * which will trigger the shutdown default (if activated). + * This function will set the server verdict to INCONC (and + * stop the test case) if no shutdown default is activated. + * This function will set only the client verdict to INCONC + * (and stop its execution) if no STOP response is received + * from the server within the PX_TSYNC_TIME_LIMIT + * or if no shutdown default is activated. In all other + * cases the client verdict is NOT set. + * @remark The use of this function requires prior connection + * of the client sync port! + * @see LibCommon_Sync.f_connect4ClientSync + * @see LibCommon_Sync.f_connect4SelfOrClientSync + * @see LibCommon_Sync.PX_TSYNC_TIME_LIMIT + * @see LibCommon_Sync.a_dummyShutDown + */ + function f_clientSendStop() + runs on ClientSyncComp { + log("**** f_clientSendStop: Sync client requesting from server to stop test case (including itself). ****") ; + syncPort.send(m_syncClientStop) ; + tc_sync.start; + alt{ + [] tc_sync.timeout{ + log("**** f_clientSendStop: Stopping sync client without shutdown - either no shutdown default active or no stop received from server. ****") ; + setverdict(inconc); + stop ; + } + }//end alt + tc_sync.stop; + stop; // stop here if shutdown default does not stop + } + + } // end group clientRelated + + } // end group advancedUserRelevantDefinitions + + group otherSyncModuleDefinitions { + + group syncModuleparams { + /** + * + * @desc Default time limit for a sync client to reach a + * synchronization point + */ + modulepar float PX_TSYNC_TIME_LIMIT := 120.0; + + /* + * @desc Default time limit for a sync client to finish + * its execution of the shutdown default + */ + modulepar float PX_TSHUT_DOWN_TIME_LIMIT := 120.0; + } + + group otherSyncTypes { + + type record of charstring SyncPointList; + + type record of ClientSyncComp ClientSyncCompList; + + } // end group otherSyncTypes + + group otherSelfSyncRelatedDefinitions { + + /** + * @desc This function creates the connection needed to + * execute self sync functions + * @see LibCommon_Sync.f_selfSync + * @see LibCommon_Sync.f_selfSyncStop + */ + function f_connect4SelfSync() + runs on SelfSyncComp { + connect(self:syncSendPort, self:syncPort); + }// end function f_connect4SelfSync + + /** + * @desc This function removes the connection needed + * to execute self sync functions + * @see LibCommon_Sync.f_selfSync + * @see LibCommon_Sync.f_selfSyncStop + */ + function f_disconnect4SelfSync() + runs on SelfSyncComp { + disconnect(self:syncSendPort, self:syncPort); + }// end function f_disconnect4SelfSync + + /** + * @desc This function combines MTC verdict setting with self + * synchronization for use in the preamble / test body / postamble + * @param p_syncId Synchronization point name/id + * @param p_ret Current behavior execution status + * @see LibCommon_VerdictControl.f_setVerdict + * @see LibCommon_Sync.f_selfSync + * @see LibCommon_Sync.a_dummyShutDown + */ + function f_selfSyncAndVerdict( in charstring p_syncId, + in FncRetCode p_ret ) + runs on SelfSyncComp { + if(vc_testcaseStep == e_preamble) { + f_selfSyncAndVerdictPreamble(p_syncId, p_ret); + } else if(vc_testcaseStep == e_testBody) { + f_selfSyncAndVerdictTestBody(p_syncId, p_ret); + } + else { + f_selfSyncAndVerdictPostamble(p_syncId, p_ret); + } + } + + /** + * @desc This function combines MTC verdict setting with self + * synchronization for use after the preamble. + * @param p_syncId Synchronization point name/id + * @param p_ret Current behavior execution status + * @see LibCommon_VerdictControl.f_setVerdictPreamble + * @see LibCommon_Sync.f_selfSync + */ + function f_selfSyncAndVerdictPreamble( in charstring p_syncId, + in FncRetCode p_ret ) + runs on SelfSyncComp { + f_setVerdictPreOrPostamble(p_ret); + f_selfSync(p_syncId,p_ret); + vc_testcaseStep := e_testBody; + } + + /** + * @desc This function combines MTC verdict setting with self + * synchronization for use after the test body. + * @param p_syncId Synchronization point name/id + * @param p_ret Current behavior execution status + * @see LibCommon_VerdictControl.f_setVerdict + * @see LibCommon_Sync.f_selfSync + */ + function f_selfSyncAndVerdictTestBody( in charstring p_syncId, + in FncRetCode p_ret ) + runs on SelfSyncComp { + f_setVerdict(p_ret); + f_selfSync(p_syncId,p_ret); + vc_testcaseStep := e_postamble; + } + + /** + * @desc This function combines MTC verdict setting with self + * synchronization for use after the postamble. + * @param p_syncId Synchronization point name/id + * @param p_ret Current behavior execution status + * @see LibCommon_VerdictControl.f_setVerdictPostamble + * @see LibCommon_Sync.f_selfSync + */ + function f_selfSyncAndVerdictPostamble( in charstring p_syncId , + in FncRetCode p_ret ) + runs on SelfSyncComp { + f_setVerdictPreOrPostamble(p_ret); + f_selfSync(p_syncId,p_ret); + } + + /** + * @desc This function synchronizes a MTC with itself. In case + * of a non successful execution status it sends a STOP + * message to itself and invokes that way the + * shutdown default (if activated). + * This function will set the server verdict to INCONC (and + * stop the test case) if no shutdown default is activated. + * Otherwise no verdict is set. + * @remark Sync ports should be connected prior to the invocation + * of this function! + * @param p_syncId Synchronization point name/id + * @param p_ret Current behavior execution status + * @return Updated execution status + * @see LibCommon_Sync.f_connect4SelfSync + * @see LibCommon_Sync.a_dummyShutDown + */ + function f_selfSync( in charstring p_syncId , + in FncRetCode p_ret ) + runs on SelfSyncComp + return FncRetCode{ + if (p_ret != e_success){ + f_selfSyncStop() ; // function will not return! + } + if ( p_syncId == c_prDone ) { + log("**** f_selfSync: Successfully passed PREAMBLE synchronization point. ****") ; + } else if ( p_syncId == c_tbDone ) { + log("**** f_selfSync: Successfully passed TEST BODY synchronization point. ****") ; + } else { + log("**** f_selfSync: Successfully passed synchronization point. ****") ; + } + return e_success ; + }// end function f_selfSync + + /** + * @desc This function can be used to shut down a test case _prior_ + * to reaching a synchronization point. it sends a STOP + * message to itself and invokes that way the + * shutdown default (if activated). + * This function will set the server verdict to INCONC (and + * stop the test case) if no shutdown default is activated. + * Otherwise no verdict is set. + * @remark Sync ports should be connected prior to the invocation + * of this function! + * @see LibCommon_Sync.f_connect4SelfSync + */ + function f_selfSyncStop() + runs on SelfSyncComp { + + log("**** f_selfSyncStop: MTC requests to stop test case (itself). ****") ; + syncSendPort.send(m_syncServerStop) ; // this MUST be _server_ for the default to catch! + tc_sync.start(PX_TSYNC_TIME_LIMIT); + alt{ + [] tc_sync.timeout{ + log("**** f_selfSyncStop: Stopping MTC without shutdown - either no shutdown default active or missing syncPort connection ****") ; + setverdict(inconc); + stop ; + } + }//end alt + tc_sync.stop; + stop; // if shutdown default is not activated or if it does not stop + } // end function f_selfSyncStop + + } // end group otherSelfSyncRelatedDefinitions + + /** + * + * @desc The sychronization protocol is conceptually based on + * named synchronization. Each synchronization point + * has it own specific synchronization message. This + * makes each synchronization unique, and allows, e.g., to + * ensure that a server synchronizes only clients which have + * reached the same synchronization point. + */ + group syncProtocolDefinition { + + type union SyncCmd { + ClientReady clientReady, + ServerReady serverReady, + ClientStop clientStop, + ServerStop serverStop + } + + type record ClientReady { + charstring syncPointId + } + + type record ServerReady { + charstring syncPointId + } + + type record ClientStop {} + + type record ServerStop {} + + } // end group syncProtocolDefinition + + group syncMessages { + template SyncCmd m_syncClientReady( template (present) charstring p_syncId ) := { + clientReady := { p_syncId } + } + + template SyncCmd m_syncServerReady( template (present) charstring p_syncId ) := { + serverReady := { p_syncId } + } + + template SyncCmd m_syncClientStop := { + clientStop := {} + } + + template SyncCmd m_syncServerStop := { + serverStop := {} + } + + } // end group syncMessages + + group otherSyncFunctions { + + /** + * @desc Makes server send a sync message to all known clients + * @param p_clientRefs List of client references to which the message is to be send + * @param p_syncCmd The actual synchronization message to be sent out + */ + function f_serverSendToAllClients( in ClientSyncCompList p_clientRefs, + in template (value) SyncCmd p_syncCmd) + runs on ServerSyncComp { + var integer i:=0; + for (i:=0; i< sizeof(p_clientRefs); i:=i+1 ){ + syncPort.send(p_syncCmd) to valueof(p_clientRefs[i]); + } + } // end function f_serverSendToAllClients + + /** + * @desc This function is intended only for use on server in concurrent + * TTCN-3 test cases. It waits for all components to shut down + * within the PX_TSHUT_DOWN_TIME_LIMIT. If a timeout occurs + * it aborts the test case (no matter how far clients got with their + * shutdown). + * This function sets the server verdict. + */ + function f_serverWaitForAllClientsToShutDown() + runs on ServerSyncComp { + + tc_shutDown.start(PX_TSHUT_DOWN_TIME_LIMIT); + alt { + [] syncPort.receive { + // clients may still try to send some sync message + } + [] all component.done { + tc_shutDown.stop; + log("**** f_serverWaitForAllClientsToShutDown: All components have properly shut down. Sync server will now terminate the test case. ****") ; + } + [] tc_shutDown.timeout { + log("**** f_serverWaitForAllClientsToShutDown: Not all clients have properly shutdown within the shut down time limit. Sync server will now terminate test case! ****") ; + } + } // end alt + // cover case that shut down default is NOT activated + setverdict(inconc); + //mtc.stop; + syncPort.send(m_syncServerStop) to self; // this MUST be _server_ for the default to catch! + tc_sync.start(PX_TSYNC_TIME_LIMIT); + alt{ + [] tc_sync.timeout{ + log("**** f_selfSyncStop: Stopping MTC without shutdown - either no shutdown default active or missing syncPort connection ****") ; + setverdict(inconc); + stop ; + } + }//end alt + tc_sync.stop; + stop; // if shutdown default is not activated or if it does not stop + } // end function f_serverWaitForAllClientsToShutDown + + function f_isPresentInArray(in ClientSyncComp p_clientRef, in ClientSyncCompList p_clientRefs) + return boolean { + var integer i; + for(i:=0; i < sizeof(p_clientRefs); i:=i+1) { + if(p_clientRefs[i] == p_clientRef) { + return true; + } + } + return false; + } + } // end group otherSyncFunctions + + } // end group otherSyncDefinitions + +} // end module LibCommon_Sync diff --git a/ttcn/patch_lib_http/LibItsHttp_XMLTypes.ttcn b/ttcn/patch_lib_http/LibItsHttp_XMLTypes.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..02202b7e97f0c33f4bfa88d8cca04eb2888510c2 --- /dev/null +++ b/ttcn/patch_lib_http/LibItsHttp_XMLTypes.ttcn @@ -0,0 +1,11 @@ +module LibItsHttp_XMLTypes { // FIXME To be removed + + /** + * This file is volontary empry. You have to declare all XSD files required by your project + * In addition, the TTCN-3 module LibItsHttp_XmlMessageBodyTypes have to be updated too. + */ + // TODO Add here your custom RFCs import + + //import from XSD all; + +} // End of module LibItsHttp_XMLTypes diff --git a/ttcn/patch_lib_http/LibItsHttp_XmlMessageBodyTypes.ttcn b/ttcn/patch_lib_http/LibItsHttp_XmlMessageBodyTypes.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..2d19c177b54860168891a0560c2763c94e00814f --- /dev/null +++ b/ttcn/patch_lib_http/LibItsHttp_XmlMessageBodyTypes.ttcn @@ -0,0 +1,40 @@ +module LibItsHttp_XmlMessageBodyTypes { + + // LibItsHttp + import from LibItsHttp_XMLTypes all; + + import from XSD all; + + // RFC5985 Held + import from urn_ietf_params_xml_ns_geopriv_held language "XSD" all + with { + extension "File:../xsd/RFC5985_held.xsd"; + } + + // RFC5222 + import from urn_ietf_params_xml_ns_lost1 language "XSD" all + with { + extension "File:../xsd/RFC5222_lost.xsd"; + } + + /** + * This file volontary contains a trivial declaration of the type XmlBodu. + * In accordance with your TTCN-3 module LibItsHttp_XMLTypes, you have to change the XmlBody typing. + */ + // TODO Add here your custom RFCs import + + type union XmlBody { + // TODO Add here your custom variants + LocationRequest locationRequest, + LocationResponse locationResponse, + ErrorType errorType, + FindService findServiceRequest, + FindServiceResponse findServiceResponse, + charstring raw + } with { + variant "" + } + +} with { + variant "" +} // End of LibItsHttp_XmlMessageBodyTypes diff --git a/ttcn/patch_lib_http/LibItsHttp_XmlTemplates.ttcn b/ttcn/patch_lib_http/LibItsHttp_XmlTemplates.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..93854045fed8a4c2ddf1a7488b077d6deb2bf5bb --- /dev/null +++ b/ttcn/patch_lib_http/LibItsHttp_XmlTemplates.ttcn @@ -0,0 +1,437 @@ +/** + * @author ETSI / STF545 + * @version $URL: https://oldforge.etsi.org/svn/LibIts/branches/STF525/ttcn/Http/LibItsHttp_Templates.ttcn $ + * $ID:$ + * @desc This module provides the custom templates for ITS HTTP based protocols. + * @copyright ETSI Copyright Notification + * No part may be reproduced except as authorized by written permission. + * The copyright and the foregoing restriction extend to reproduction in all media. + * All rights reserved. + */ +module LibItsHttp_XmlTemplates { + + import from XSD all; + + // RFC5985 Held + import from urn_ietf_params_xml_ns_geopriv_held language "XSD" all + with { + extension "File:../xsd/RFC5985_held.xsd"; + } + // RFC6155 Held ID + import from urn_ietf_params_xml_ns_geopriv_held_id language "XSD" all + with { + extension "File:../xsd/RFC6155_held_id.xsd"; + } + import from urn_ietf_params_xml_ns_pidf_geopriv10 language "XSD" all + with { + extension "File:../xsd/RFC4119_geopriv10.xsd"; + } + import from urn_ietf_params_xml_ns_pidf_geopriv10_basicPolicy language "XSD" all + with { + extension "File:../xsd/RFC4119_geopriv10_basic_policy.xsd"; + } + + import from urn_ietf_params_xml_ns_pidf_geopriv10_civicLoc language "XSD" all + with { + extension "File:../xsd/RFC4119_geopriv10_civicloc.xsd"; + } + + // RFC3863 + import from urn_ietf_params_xml_ns_pidf language "XSD" all + with { + extension "File:../xsd/RFC3863_pidf.xsd"; + } + + // RFC5222 + import from urn_ietf_params_xml_ns_lost1 language "XSD" all + with { + extension "File:../xsd/RFC5222_lost.xsd"; + } + + // OpenGIS + import from http_www_opengis_net_pidflo_1_0 language "XSD" all + with { + extension "File:../xsd/GLM_pidf_lo_shape.xsd"; + } + import from http_www_opengis_net_gml language "XSD" all + with { + extension "File:../xsd/gmlBase.xsd"; + extension "File:../xsd/basicTypes.xsd"; + extension "File:../xsd/measures.xsd"; + extension "File:../xsd/geometryPrimitives.xsd"; + extension "File:../xsd/geometryBasic0d1d.xsd"; + extension "File:../xsd/geometryBasic2d.xsd"; + } + + // LibHttp + import from LibItsHttp_XmlMessageBodyTypes all; + import from LibItsHttp_XMLTypes all; + + template (value) XmlBody m_xml_body_raw( + in template (value) charstring p_raw + ) := { + raw := p_raw + } // End of template m_xml_body_raw + + template (present) XmlBody mw_xml_body_raw( + template (present) charstring p_raw := ? + ) := { + raw := p_raw + } // End of template mw_xml_body_raw + + group rfc5985_held { + + group http_xml_body { + + template (value) XmlBody m_body_xml_location_request( + in template (value) LocationRequest p_locationRequest + ) := { + locationRequest := p_locationRequest + } // End of template m_body_xml_location_request + + template (present) XmlBody mw_body_xml_location_response( + in template (present) LocationResponse p_locationResponse := ? + ) := { + locationResponse := p_locationResponse + } // End of template mw_body_xml_location_response + + template (present) XmlBody mw_body_xml_location_response_error( + in template (present) ErrorType p_error_type := ? + ) := { + errorType := p_error_type + } // End of template mw_body_xml_location_response_error + + template (value) XmlBody m_body_xml_find_service_request( + in template (value) FindService p_findServiceRequest + ) := { + findServiceRequest := p_findServiceRequest + } // End of template m_body_xml_find_service_request + + template (present) XmlBody mw_body_xml_find_service_response( + in template (present) FindServiceResponse p_findServiceResponse := ? + ) := { + findServiceResponse := p_findServiceResponse + } // End of template mw_body_xml_find_service_response + + } // End of group http_xml_body + + template (omit) LocationRequest m_locationRequest( + in template (value) LocationRequestType.elem_list p_elem_list, + in template (omit) LocationTypeType p_locationType := omit, + in template (omit) ResponseTimeType p_responseTime := omit, + in template (omit) LocationRequestType.attr p_attr := omit + ) := { + responseTime := p_responseTime, + attr := p_attr, + locationType := p_locationType, + elem_list := p_elem_list + } // End of template m_locationRequest + + //template (value) Uri m_uri(in template (value) Uri p_uri) := p_uri; + + template LocationResponseType mw_locationResponse( + template ReturnLocationType p_locationUriSet := *, + template LocationResponseType.elem_list p_elem_list := * + ) := { + locationUriSet := p_locationUriSet, + elem_list := p_elem_list + } // End of template mw_locationResponse + + template (omit) LocationTypeType m_locationTypeType( + in template (value) LocationTypeBase p_base, + in template (omit) XSD.Boolean p_exact := omit + ) := { + exact := p_exact, + base := p_base + } // End of template m_locationTypeType + + template (value) LocationTypeBase m_locationTypeBase_civic := { + alt_1 := { + civic + } + } // End of template m_locationTypeBase_civic + + template (value) LocationTypeBase m_locationTypeBase_geodetic := { + alt_1 := { + geodetic + } + } // End of template m_locationTypeBase_geodetic + + template (value) LocationTypeBase m_locationTypeBase_locationUri := { + alt_1 := { + locationURI + } + } // End of template m_locationTypeBase_locationUri + + template (value) LocationTypeBase m_locationTypeBase_all := { + alt_1 := { + geodetic, civic + } + } // End of template m_locationTypeBase_all + + template ErrorType mw_error_type( + template (present) XSD.Token p_code := ?, + template (present) ErrorType.message_list p_message_list := ?, + template (present) ErrorType.elem_list p_elem_list := {}, + template ErrorType.attr p_attr := * + ) := { + code := p_code, + attr := p_attr, + message_list := p_message_list, + elem_list := p_elem_list + } // End of template mw_error_type + + } // End of group rfc5985_held + + group rfc6155_held_id { + + template (value) Device m_device( + in template (value) Device.elem_list p_elem_list + ) := { + elem_list := p_elem_list + } // End of template m_device + + template (present) Device mw_device( + template (present) DeviceIdentity.elem_list p_elem_list := ? + ) := { + elem_list := p_elem_list + } // End of template mw_device + + } // End of group rfc6155_held_id + + group rfc3863_pidf { + + template (present) Presence mw_presence( + template (present) XSD.AnyURI p_entity := ?, + template (present) Presence.tuple_list p_tuple_list := ? + ) := { + entity := p_entity, + tuple_list := p_tuple_list, + note_list := {}, + elem_list := {} + } // End of template mw_presence + + template (present) Tuple mw_tuple( + template (present) universal charstring p_id, + template (present) Status p_status := ?, + template (present) Tuple.elem_list p_elem_list := {}, + template (present) Tuple.note_list p_note_list := {}, + template Contact p_contact := * + // TODO To be completed + ) := { + id := p_id, + status := p_status, + elem_list := p_elem_list, + contact := p_contact, + note_list := p_note_list, + timestamp := * + } // End of template mw_tuple + + } // End of group rfc3863_pidf + + group rfc4119_geopriv10 { + + template (present) LocInfoType mw_location_info( + template (present) LocInfoType.elem_list p_elem_list := ? + ) := { + elem_list := p_elem_list + } // End of template mw_location_info + + template (present) Geopriv mw_geopriv( + template (present) LocInfoType p_location_info := ?, + template (present) LocPolicyType p_usage_rules := ?, + template LocMethod p_method := ?, + template LocProvidedBy p_provided_by := *, + template Geopriv.elem_list p_elem_list := * + ) := { + location_info := p_location_info, + usage_rules := p_usage_rules, + method := p_method, + provided_by := p_provided_by, + elem_list := p_elem_list + } // End of template mw_geopriv + + } // End of group rfc4119_geopriv10 + + group rfc5222_lost { + + template (omit) FindService m_find_service_request( + in template (value) FindService.location_list p_location_list, + in template (value) FindService.notLost_list p_notLost_list, + in template (omit) Service p_service := omit, + in template (omit) XSD.Boolean p_recursive_ := omit, + in template (omit) FindService.serviceBoundary p_serviceBoundary := omit, + in template (omit) XSD.Boolean p_validateLocation := omit, + in template (omit) Path p_path := omit + ) := { + recursive_ := p_recursive_, + serviceBoundary := p_serviceBoundary, + validateLocation := p_validateLocation, + location_list := p_location_list, + path := p_path, + service := p_service, + notLost_list := p_notLost_list + } // End of template m_find_service_request + + template (omit) Location m_location( + in template (value) XSD.Token p_id, + in template (value) Location.extensionPoint_list p_extensionPoint_list, + in template (omit) XSD.NMTOKEN p_profile := omit + ) := { + id := p_id, + profile := p_profile, + extensionPoint_list := p_extensionPoint_list + } // End of template m_location + + template (value) NotLost m_notLost( + in template (value) XSD.String p_elem + ) := { + elem := p_elem + } // End of template m_notLost + + template (value) ExtensionPoint m_extension_point( + in template (value) ExtensionPoint.notLost_list p_notLost_list + ) := { + notLost_list := p_notLost_list + } // End of template m_extension_point + + template FindServiceResponse mw_find_service_response( + template (present) FindServiceResponse.mapping_list p_mapping_list := ?, + template (present) FindServiceResponse.warnings_list p_warnings_list := ?, + template (present) Path p_path := ?, + template (present) FindServiceResponse.notLost_list p_notLost_list := ?, + template LocationValidation p_locationValidation := *, + template LocationUsed p_locationUsed := * + ) := { + mapping_list := p_mapping_list, + locationValidation := p_locationValidation, + warnings_list := p_warnings_list, + path := p_path, + notLost_list := p_notLost_list, + locationUsed := p_locationUsed + } // End of template mw_find_service_response + + template Mapping mw_mapping( + template (present) Mapping.expires p_expires := ?, + template (present) XSD.DateTime p_lastUpdated := ?, + template (present) AppUniqueString p_source := ?, + template (present) XSD.Token p_sourceId := ?, + template (present) Mapping.displayName_list p_displayName_list := ?, + template (present) Mapping.uri_list p_uri_list := ?, + template (present) Mapping.notLost_list p_notLost_list := ?, + template Mapping.lang p_lang := *, + template XSD.Token p_message_ := *, + template ServiceNumber p_serviceNumber := *, + template Service p_service := * + ) := { + lang := p_lang, + expires := p_expires, + lastUpdated := p_lastUpdated, + message_ := p_message_, + source := p_source, + sourceId := p_sourceId, + displayName_list := p_displayName_list, + choice := *, + uri_list := p_uri_list, + serviceNumber := p_serviceNumber, + service := p_service, + notLost_list := p_notLost_list + } // End of template mw_mapping + + } // End of group rfc5222_lost + + group open_gis { + + template (omit) PointProperty m_point( + in template (value) Pos p_position, + in template (omit) XSD.AnyURI p_srsName := omit, + in template (omit) XSD.AnyURI p_id := omit + ) := { + point := { + axisLabels := omit, + gid := omit, + id := p_id, + srsDimension := omit, + srsName := p_srsName, + uomLabels := omit, + pos := p_position + } + } // End of template m_point + + template PointProperty mw_point( + template (present) Pos p_position := ?, + template XSD.AnyURI p_srsName := * + ) := { + point := { + axisLabels := *, + gid := *, + id := *, + srsDimension := *, + srsName := p_srsName, + uomLabels := *, + pos := p_position + } + } // End of template mw_point + + template (omit) CircleType m_circle( + in template (value) CenterGroup p_centerGroup, + in template (value) LengthType p_radius, + in template (omit) XSD.AnyURI p_srsName := omit, + in template (omit) XSD.AnyURI p_id := omit + ) := { + axisLabels := omit, + gid := omit, + id := omit, + srsDimension := omit, + srsName := p_srsName, + uomLabels := omit, + centerGroup := p_centerGroup, + radius := p_radius + } // End of template m_circle + + template CircleType mw_circle( + template (present) CenterGroup p_centerGroup := ?, + template (present) LengthType p_radius := ?, + template XSD.AnyURI p_srsName := * + ) := { + axisLabels := *, + gid := *, + id := *, + srsDimension := *, + srsName := p_srsName, + uomLabels := *, + centerGroup := p_centerGroup, + radius := p_radius + } // End of template mw_circle + + template (value) CenterGroup m_center_group_pos( + in template (value) CenterGroup.pos p_pos + ) := { + pos := p_pos + } // End of template m_center_group_pos + + template (present) CenterGroup mw_center_group_pos( + template (present) CenterGroup.pos p_pos := ? + ) := { + pos := p_pos + } // End of template mw_center_group_pos + + template (value) LengthType m_radius( + in template (value) XSD.AnyURI p_uom, + in template (value) XSD.Double p_base + ) := { + uom := p_uom, + base := p_base + } // End of template m_radius + + template (present) LengthType mw_radius( + template (present) XSD.AnyURI p_uom := ?, + template (present) XSD.Double p_base := ? + ) := { + uom := p_uom, + base := p_base + } // End of template mw_radius + + } // End of group open_gis + +} // End of module LibItsHttp_XmlTemplates diff --git a/ttcn/patch_sip_titan/LibSip_Common.ttcn b/ttcn/patch_sip_titan/LibSip_Common.ttcn new file mode 100755 index 0000000000000000000000000000000000000000..88beed84d82ab905e7873c96d491a2a01a92bbad --- /dev/null +++ b/ttcn/patch_sip_titan/LibSip_Common.ttcn @@ -0,0 +1,42 @@ +/** + * @author STF160, STF471 + * @version $Id: LibSip_Common.ttcn 488 2014-09-18 10:17:19Z rennoch $ + * @desc This module provides the common definitions for SIP messages. + * This module is part of LibSipV3. +*/ +module LibSip_Common { + + type set length (1..infinity) of charstring Charstring_List; + + // [20.1, 20.3, 20.4, 20.7, 20.9, 20.10, 20.11, 20.18, 20.20, 20.27, 20.28, 20.30, 20.31, + // 20.33, 20.34, 20.39, 20.42, 20.44] + + + type union GenValue { + charstring tokenOrHost, + charstring quotedString + } + + type record GenericParam + { + charstring id, + GenValue paramValue optional + } + + + type set of GenericParam GenericParam_List; + + // [?] + type set of GenericParam SemicolonParam_List; + + // [?] + type set of GenericParam AmpersandParam_List; + + // [?] + type set of GenericParam CommaParam_List; + //------------------------------------------------------------------------------ + +} +with { + encode "LibSip V3"; +} // end module LibSip_Common diff --git a/ttcn/patch_sip_titan/LibSip_EncdecDeclarations.ttcn b/ttcn/patch_sip_titan/LibSip_EncdecDeclarations.ttcn new file mode 100755 index 0000000000000000000000000000000000000000..13c0f7830536a7010bf1253be42ca12b995dc55c --- /dev/null +++ b/ttcn/patch_sip_titan/LibSip_EncdecDeclarations.ttcn @@ -0,0 +1,120 @@ +module LibSip_EncdecDeclarations { + + import from LibSip_SIPTypesAndValues all; + import from LibSip_SMSTypesAndValues all; + import from LibSip_SimpleMsgSummaryTypes all; + import from LibSip_MessageBodyTypes all; + + external function fx_enc_Request (Request p) return bitstring + with {extension "prototype(convert) encode(SIPCodec)"} + + external function fx_enc_REGISTER_Request (REGISTER_Request p) return bitstring + with {extension "prototype(convert) encode(SIPCodec)"} + + external function fx_enc_INVITE_Request (INVITE_Request p) return bitstring + with {extension "prototype(convert) encode(SIPCodec)"} + + external function fx_enc_OPTIONS_Request (OPTIONS_Request p) return bitstring + with {extension "prototype(convert) encode(SIPCodec)"} + + external function fx_enc_BYE_Request (BYE_Request p) return bitstring + with {extension "prototype(convert) encode(SIPCodec)"} + + + external function fx_enc_CANCEL_Request (CANCEL_Request p) return bitstring + with {extension "prototype(convert) encode(SIPCodec)"} + + external function fx_enc_ACK_Request (ACK_Request p) return bitstring + with {extension "prototype(convert) encode(SIPCodec)"} + + external function fx_enc_PRACK_Request (PRACK_Request p) return bitstring + with {extension "prototype(convert) encode(SIPCodec)"} + + external function fx_enc_NOTIFY_Request (NOTIFY_Request p) return bitstring + with {extension "prototype(convert) encode(SIPCodec)"} + + external function fx_enc_SUBSCRIBE_Request (SUBSCRIBE_Request p) return bitstring + with {extension "prototype(convert) encode(SIPCodec)"} + + external function fx_enc_PUBLISH_Request (PUBLISH_Request p) return bitstring + with {extension "prototype(convert) encode(SIPCodec)"} + + external function fx_enc_UPDATE_Request (UPDATE_Request p) return bitstring + with {extension "prototype(convert) encode(SIPCodec)"} + + external function fx_enc_REFER_Request (REFER_Request p) return bitstring + with {extension "prototype(convert) encode(SIPCodec)"} + + external function fx_enc_MESSAGE_Request (MESSAGE_Request p) return bitstring + with {extension "prototype(convert) encode(SIPCodec)"} + + external function fx_enc_INFO_Request (INFO_Request p) return bitstring + with {extension "prototype(convert) encode(SIPCodec)"} + + external function fx_enc_Response (Response p) return bitstring + with {extension "prototype(convert) encode(SIPCodec)"} + + external function fx_enc_Raw (Raw p) return bitstring + with {extension "prototype(convert) encode(SIPCodec)"} + + external function fx_enc_SMS(SimpleMsgSummary pdu) return bitstring + with { extension "prototype(convert) encode(SIPCodec)" }; + + external function fx_enc_MessageBody(in MessageBody pdu) return bitstring + with { extension "prototype(convert) encode(SIPCodec)" }; + + external function fx_dec_Request (inout bitstring pdu, out Request p) return integer + with {extension "prototype(sliding) decode(SIPCodec)"} + + external function fx_dec_REGISTER_Request (inout bitstring pdu, out REGISTER_Request p) return integer + with {extension "prototype(sliding) decode(SIPCodec)"} + + external function fx_dec_INVITE_Request (inout bitstring pdu, out INVITE_Request p) return integer + with {extension "prototype(sliding) decode(SIPCodec)"} + + external function fx_dec_OPTIONS_Request (inout bitstring pdu, out OPTIONS_Request p) return integer + with {extension "prototype(sliding) decode(SIPCodec)"} + + external function fx_dec_BYE_Request (inout bitstring pdu, out BYE_Request p) return integer + with {extension "prototype(sliding) decode(SIPCodec)"} + + external function fx_dec_CANCEL_Request (inout bitstring pdu, out CANCEL_Request p) return integer + with {extension "prototype(sliding) decode(SIPCodec)"} + + external function fx_dec_ACK_Request (inout bitstring pdu, out ACK_Request p) return integer + with {extension "prototype(sliding) decode(SIPCodec)"} + + external function fx_dec_PRACK_Request (inout bitstring pdu, out PRACK_Request p) return integer + with {extension "prototype(sliding) decode(SIPCodec)"} + + external function fx_dec_NOTIFY_Request (inout bitstring pdu, out NOTIFY_Request p) return integer + with {extension "prototype(sliding) decode(SIPCodec)"} + + external function fx_dec_SUBSCRIBE_Request (inout bitstring pdu, out SUBSCRIBE_Request p) return integer + with {extension "prototype(sliding) decode(SIPCodec)"} + + external function fx_dec_PUBLISH_Request (inout bitstring pdu, out PUBLISH_Request p) return integer + with {extension "prototype(sliding) decode(SIPCodec)"} + + external function fx_dec_UPDATE_Request (inout bitstring pdu, out UPDATE_Request p) return integer + with {extension "prototype(sliding) decode(SIPCodec)"} + + external function fx_dec_REFER_Request (inout bitstring pdu, out REFER_Request p) return integer + with {extension "prototype(sliding) decode(SIPCodec)"} + + external function fx_dec_MESSAGE_Request (inout bitstring pdu, out MESSAGE_Request p) return integer + with {extension "prototype(sliding) decode(SIPCodec)"} + + external function fx_dec_INFO_Request (inout bitstring pdu, out INFO_Request p) return integer + with {extension "prototype(sliding) decode(SIPCodec)"} + + external function fx_dec_Response (inout bitstring pdu, out Response p) return integer + with {extension "prototype(sliding) decode(SIPCodec)"} + + external function fx_dec_SMS(inout bitstring pdu, out SimpleMsgSummary p) return integer + with { extension "prototype(sliding) decode(SIPCodec)" }; + + external function fx_dec_MessageBody(inout bitstring pdu, out MessageBody p) return integer + with { extension "prototype(sliding) decode(SIPCodec)" }; + +} // End of module module LibSip_EncdecDeclarations diff --git a/ttcn/patch_sip_titan/LibSip_MessageBodyTypes.ttcn b/ttcn/patch_sip_titan/LibSip_MessageBodyTypes.ttcn new file mode 100755 index 0000000000000000000000000000000000000000..332c98957a9acc2e886bfcaa10076f0567f74f5e --- /dev/null +++ b/ttcn/patch_sip_titan/LibSip_MessageBodyTypes.ttcn @@ -0,0 +1,62 @@ +/****************************************************************************** + * @author STF 346, STF366, STF368, STF369, STF450, STF471 + * @version $Id: LibSip_MessageBodyTypes.ttcn 622 2014-07-10 14:50:54Z nikolajev $ + * @desc This module provides the types used for alternative SIP message + * body variants and combinations. + * This module is part of LibSipV3. + */ + +module LibSip_MessageBodyTypes { + import from LibSip_SDPTypes all; + import from LibSip_SimpleMsgSummaryTypes all; + import from LibSip_XMLTypes all; + + /* + * Simple body types that can be used instead of the more detailed XML and SDP + * without codec support + * */ + //type charstring XmlBody; + //type charstring SDP_Message; + type octetstring MsdBody; + + group MIMETypes { + type union MIME_Encapsulated_Parts { + SDP_Message sdpMessageBody, + XmlBody xmlBody, // if there is XML body + MsdBody msdBody // RFC 8147: Minimum Set of Data octets + } + + type record MIME_Encapsulated_Part { + charstring content_type, + charstring content_disposition optional, + charstring content_id optional, + MIME_Encapsulated_Parts mime_encapsulated_part + } + + type record MIME_Message { + charstring boundary, // len: + MimeEncapsulatedList mimeEncapsulatedList + } + + type record of MIME_Encapsulated_Part MimeEncapsulatedList; + + + } // group MIMETypes + + type union MessageBody { + SDP_Message sdpMessageBody, // if there is only SDP part + // XMLMessage xmlMessage, // if there is XML message (with header and body) + XmlBody xmlBody, // if there is XML body + MIME_Message mimeMessageBody, // if there is SDP and encapsulated ISUP part + charstring sipfrag, // if content-Type is message/sipfrag (cp. NOTIFY, cp TS124147 A.4.3.1.2) + charstring textplain, // if content type is text/plain (for testing long messages) + SimpleMsgSummary simpleMsgSummary, // RFC 3842 + octetstring smsMessage // encoded SMS message 3GPP 23.040, 24.011 + } with { + variant "" + } + +} with { + variant "" + encode "SIPCodec" +} diff --git a/ttcn/patch_sip_titan/LibSip_SDPTypes.ttcn b/ttcn/patch_sip_titan/LibSip_SDPTypes.ttcn new file mode 100755 index 0000000000000000000000000000000000000000..1d866f500ed1e10bf8964f889e4899a7366133e1 --- /dev/null +++ b/ttcn/patch_sip_titan/LibSip_SDPTypes.ttcn @@ -0,0 +1,406 @@ +/** + * @author STF 346, STF366, STF368, STF369, STF450, STF471 + * @version $Id: LibSip_SDPTypes.ttcn 653 2017-12-14 11:16:59Z rennoch $ + * @desc This module defines message, attribute, structured and simple + * SDP types as well constants used by LipSip constructs.
+ * Note that any changes made to the definitions in this module + * may be overwritten by future releases of this library + * End users are encouraged to contact the distributers of this + * module regarding their modifications or additions + * This module is part of LibSipV3. + * @remark Adding of new attributes types is ok; Adding of new optional attributes in @see SDP_attribute type is ok; Existing attribute types shall not be changed or removed - change requests shall be made to http://t-ort.etsi.org + */ +module LibSip_SDPTypes { + import from LibSip_Common all; + group Constants { + group SimpleConstants { + // SDP net_type + const charstring c_in := "IN"; + + // SDP addr_type + const charstring c_ip4 := "IP4"; + const charstring c_ip6 := "IP6"; + + // SDP_media_desc: media + const charstring c_audio := "audio"; + const charstring c_image := "image"; + const charstring c_video := "video"; + const charstring c_text := "text"; + const charstring c_msrp := "msrp"; + + // SDP_media_desc: transport + const charstring c_rtpAvp := "RTP/AVP"; + const charstring c_rtpAvpf := "RTP/AVPF"; + const charstring c_msrpTcp := "TCP/MSRP"; + const charstring c_udptl := "Udptl"; + + // SDP_attribute_list constants: + const charstring c_local := "local"; + const charstring c_mandatory := "mandatory"; + const charstring c_optional := "optional"; + const charstring c_none := "none"; + const charstring c_qos := "qos"; + const charstring c_remote := "remote"; + const charstring c_sendrecv := "sendrecv"; + const charstring c_sendonly := "sendonly"; + const charstring c_inactive := "inactive"; + const charstring c_send := "send"; + const charstring c_recv := "recv"; + const charstring c_e2e := "e2e"; + } + } + group Types { + group SubTypes { + group AttributeTypes { + type record SDP_attribute_cat { + charstring attr_value + } + + type record SDP_attribute_keywds { + charstring attr_value + } + + type record SDP_attribute_tool { + charstring attr_value + } + + type record SDP_attribute_ptime { + charstring attr_value + } + + type record SDP_attribute_recvonly { + } + + type record SDP_attribute_sendrecv { + } + + type record SDP_attribute_sendonly { + } + + type record SDP_attribute_inactive { + } + + type record SDP_attribute_orient { + charstring attr_value + } + + type record SDP_attribute_type { + charstring attr_value + } + + type record SDP_attribute_charset { + charstring attr_value + } + + type record SDP_attribute_sdplang { + charstring attr_value + } + + type record SDP_attribute_lang { + charstring attr_value + } + + type record SDP_attribute_framerate { + charstring attr_value + } + + type record SDP_attribute_quality { + charstring attr_value + } + + type union SDP_attribute_fmtp_format_specific_params { + SemicolonParam_List paramList, + charstring unstructured + } + + type record SDP_attribute_fmtp { + charstring format, + SDP_attribute_fmtp_format_specific_params params + } + + type record SDP_attribute_curr { + charstring preconditionType, + charstring statusType, + charstring direction + } + + type record SDP_attribute_des { + charstring preconditionType, + charstring strength, + charstring statusType, + charstring direction + } + + type record SDP_attribute_conf { + charstring preconditionType, + charstring statusType, + charstring direction + } + + type record SDP_attribute_rtpmap_codec { + charstring encoding, + charstring clockrate, + charstring parameters optional + } + + type record SDP_attribute_rtpmap { + charstring payload_type, + SDP_attribute_rtpmap_codec codec + } + + type record SDP_attribute_rtcp { + integer portnumber, + SDP_connection connection optional + } + + type record SDP_attribute_msrp { + charstring attr_value + } + + type record SDP_attribute_unknown { + charstring name, + charstring attr_value optional + } + + type record SDP_attribute_maxptime { + charstring attr_value + } + + type record SDP_attribute_tcap { + integer trpr_cap_num, + Charstring_List proto_list + } + + type record SDP_attribute_pcfg { + integer config_number, + Charstring_List pot_cfg_list optional + } + + type record SDP_attribute_acfg { + integer config_number, + Charstring_List sel_cfg_list optional + } + + type record SDP_attribute_ecn_capable_rtp { + Charstring_List init_list, + Charstring_List parm_list optional + } + + type record SDP_attribute_rtcp_fb { + charstring rtcp_fb_pt, + charstring rtcp_fb_val + } + + type record SDP_attribute_rtcp_xr { + Charstring_List xr_format_list optional + } + + type record SDP_attribute_rtcp_rsize { + } + + type record SDP_attribute_3ge2ae { + charstring indicator + } + + type record SDP_attribute_crypto { + charstring tag, + charstring crypto_suite, + charstring key_params, + Charstring_List session_params optional + } + + type record SDP_attribute_content { + Charstring_List content_params + } + + type record SDP_attribute_keymgmt { + charstring prtcl_id, + charstring data + } + + type union SDP_attribute { + SDP_attribute_cat cat, + SDP_attribute_keywds keywds, + SDP_attribute_tool tool, + SDP_attribute_ptime ptime, + SDP_attribute_recvonly recvonly, + SDP_attribute_sendrecv sendrecv, + SDP_attribute_sendonly sendonly, + SDP_attribute_inactive inactive, + SDP_attribute_orient orient, + SDP_attribute_type sdp_type, + SDP_attribute_charset charset, + SDP_attribute_sdplang sdplang, + SDP_attribute_lang lang, + SDP_attribute_framerate framerate, + SDP_attribute_quality quality, + SDP_attribute_fmtp fmtp, + SDP_attribute_curr curr, + SDP_attribute_des des, + SDP_attribute_conf conf, + SDP_attribute_rtpmap rtpmap, + SDP_attribute_rtcp rtcp, + SDP_attribute_msrp msrp, + SDP_attribute_maxptime maxptime, + SDP_attribute_tcap tcap, + SDP_attribute_pcfg pcfg, + SDP_attribute_acfg acfg, + SDP_attribute_ecn_capable_rtp ecn_capable_rtp, + SDP_attribute_rtcp_fb rtcp_fb, + SDP_attribute_rtcp_xr rtcp_xr, + SDP_attribute_rtcp_rsize rtcp_rsize, + SDP_attribute_3ge2ae e2ae, + SDP_attribute_crypto crypto, + SDP_attribute_content content, + SDP_attribute_keymgmt keymgmt, + //* unknown has to be the last else encoding/decoding won't work! + SDP_attribute_unknown unknown + } + + } //* group AttributeTypes + + type set of SDP_attribute SDP_attribute_list; + + type record SDP_bandwidth { + charstring modifier, + integer bandwidth + } + + type set of SDP_bandwidth SDP_bandwidth_list; + + type record SDP_connection { + charstring net_type, + charstring addr_type, + SDP_conn_addr conn_addr + } + + type record SDP_conn_addr { + charstring addr, + integer ttl optional, + integer num_of_addr optional + } + + type set of SDP_connection SDP_connection_list; + + type record SDP_contact { + charstring addr_or_phone, + charstring disp_name optional + } + + type SDP_contact SDP_contact_tel; + + type SDP_contact SDP_contact_email; + + type set of SDP_contact_email SDP_email_list; + + type record of charstring SDP_fmt_list; + + type record SDP_key { + charstring method, + charstring key optional + } + + type record SDP_media_desc { + SDP_media_field media_field, + charstring information optional, + SDP_connection_list connections optional, + SDP_bandwidth_list bandwidth optional, + SDP_key key optional, + SDP_attribute_list attributes optional + } + + type set of SDP_media_desc SDP_media_desc_list; + + type record SDP_media_port { + integer port_number, + integer num_of_ports optional + } + + type record SDP_media_field { + charstring media, + SDP_media_port ports, + charstring transport, + SDP_fmt_list fmts + } + + type record SDP_time { + SDP_time_field time_field, + SDP_repeat_list time_repeat optional + } + + type record SDP_time_field { + charstring start_time, + //* field is numeric strings that may not fit into 32-bit signed int + charstring + stop_time //* field is numeric strings that may not fit into 32-bit signed int + } + + type record SDP_repeat { + SDP_typed_time repeat_interval, + SDP_typed_time active, + SDP_typed_time_list offsets + } + + type set of SDP_repeat SDP_repeat_list; + + type record SDP_typed_time { + integer time, + charstring unit optional + } + + type set of SDP_typed_time SDP_typed_time_list; + + type set of SDP_time SDP_time_list; + + type record SDP_timezone { + charstring adjustment_time, + SDP_typed_time offset + } + + type set of SDP_timezone SDP_timezone_list; + + type record SDP_Origin { + charstring user_name, + charstring session_id, + //* field is numeric strings that may not fit into 32-bit signed int + charstring session_version, + //* field is numeric strings that may not fit into 32-bit signed int + charstring net_type, + charstring addr_type, + charstring addr + } + + type set of SDP_contact_tel SDP_phone_list; + + } //* group SubTypes + + + group MessageTypes { + type record SDP_Message { + integer protocol_version, + SDP_Origin origin, + charstring session_name, + charstring information optional, + charstring uri optional, + SDP_email_list emails optional, + SDP_phone_list phone_numbers optional, + SDP_connection connection optional, + SDP_bandwidth_list bandwidth optional, + SDP_time_list times, + SDP_timezone_list timezone_adjustments optional, + SDP_key key optional, + SDP_attribute_list attributes optional, + SDP_media_desc_list media_list optional + } + with { + encode "SDPCodec"; + } + + } // group MessageTypes + + } // group Types +} +with { + variant "" + encode "SIPCodec" +} // end module LibSip_SDPTypes diff --git a/ttcn/patch_sip_titan/LibSip_SIPTypesAndValues.ttcn b/ttcn/patch_sip_titan/LibSip_SIPTypesAndValues.ttcn new file mode 100755 index 0000000000000000000000000000000000000000..4d0ac333b1f210d98c7ab5acf7a9743451b73d04 --- /dev/null +++ b/ttcn/patch_sip_titan/LibSip_SIPTypesAndValues.ttcn @@ -0,0 +1,1984 @@ +/** + * @author STF 346, STF366, STF368, STF369, STF450, STF471, STF160 + * @version $Id: LibSip_SIPTypesAndValues.ttcn 658 2018-06-14 06:44:44Z genoudoli $ + * @desc This module defines message, header, structured and simple SIP + * types as well constants used by LipSip constructs.
+ * Note that any changes made to the definitions in this module + * may be overwritten by future releases of this library + * End users are encouraged to contact the distributers of this + * module regarding their modifications or additions + * This module is part of LibSipV3. + * @remark Adding of new message and header types is ok; Adding of new optional header fields in + * @see MessageHeader type is ok but should be done at same time as dummy template updates; Existing message or header types shall not be changed or removed - change requests shall be made to http://t-ort.etsi.org + */ +module LibSip_SIPTypesAndValues { + import from LibSip_MessageBodyTypes all; + import from LibSip_Common all; + + group Constants { + group SimpleConstants { + // SIP name protocol plus version + const charstring c_sipNameVersion := "SIP/2.0"; + + // SIP name protocol + const charstring c_sipName := "SIP"; + + // SIP version + const charstring c_sipVersion := "2.0"; + + // SIP scheme + const charstring c_sipScheme := "sip"; + + // TEL scheme + const charstring c_telScheme := "tel"; + + // URN schema + const charstring c_urnScheme := "urn"; + + // TAG_ID + const charstring c_tagId := "tag"; + + // BRANCH_ID + const charstring c_branchId := "branch"; + + // BRANCH_COOKIE + const charstring c_branchCookie := "z9hG4bK"; + + // EXPIRES_ID + const charstring c_expiresId := "expires"; + + // MADDR_ID + const charstring c_maddrId := "maddr"; + + // METHOD_ID + const charstring c_methodId := "method"; + + // RECEIVED_ID + const charstring c_receivedId := "received"; + + // TTL_ID + const charstring c_ttlId := "ttl"; + + // USER_ID + const charstring c_userId := "user"; + + // SDP name application + const charstring c_sdpApplication := "application/sdp"; + + // XML name application + const charstring c_xmlApplication := "application/xml"; + + // XML name application + const charstring c_xmlreginfoApplication := "application/reginfo+xml"; + + // XML name resource-list + const charstring c_xmlresourcelistApplication := "application/resource-lists+xml"; + + // IMS 3GPP name application + const charstring c_ims3gppApplication := "application/3gpp-ims+xml"; + + // IMS 3GPP name CW application + const charstring c_ims3gppCwApplication := "application/vnd.3gpp.cw+xml"; + + // IMS ETSI name MCID application + const charstring c_imsEtsiMcidApplication := "application/vnd.etsi.mcid+xml"; + + // IMS ETSI name CUG application + const charstring c_imsEtsiCugApplication := "application/vnd.etsi.cug+xml"; + + // IMS ETSI name Simservs application(TIP/TIR, ACR, CDIV, OIP/OIR, CUG) + const charstring c_imsEtsiSimservsApplication := "application/vnd.etsi.simservs+xml"; + + // OCTET-STREAM name application + const charstring c_octetApplication := "application/octet-stream"; + + // PLAIN-TEXT name application + const charstring c_plainText := "text/plain"; + + // SIP fragment message + const charstring c_sipfragMessage := "message/sipfrag"; + + // text content of 1300 bytes for messages with message body + const charstring c_longMessageContent_1300Bytes := + "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" & "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" & "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" & "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" & "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" & "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" & "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" & + "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" & "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" & "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" & "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" & "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" & "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" & oct2char('0D'O) & oct2char('0A'O); // CRLF + // Default SIP port number : 5060 + const integer c_defaultSipPort := 5060; + + // Default SIP protocol : UDP + const charstring c_defaultSipProt := "UDP"; + + // Fixed IP multicast address + const charstring c_mcastSipIpaddr := "224.0.1.75"; + + // Short delta-second used in expires parameter to acknowledge a registration + const charstring c_shortRegistration := "3600"; + + // ([RFC3891 ] Sec 6.1) + const charstring c_earlyFlag := "early-only"; + + // option tag replaces ([RFC3261 ] ) + const charstring c_replaces := "replaces"; + + // option tag 100rel (reliable provisional response [RFC3262 ] ) + const charstring c_tag100rel := "100rel"; + + // option tag from-change ([RFC4916 ] ) + const charstring c_tagFromChange := "from-change"; + + // option tag precondition (ch.11 [RFC3312 ] ) + const charstring c_tagPrecond := "precondition"; + + // due to problem with TAU compiler because hardcoded return statement constant is created + const HostPort c_hostport_dummy := { + host := "", + portField := c_defaultSipPort + }; + + // CLIP/CLIR information + const PrivacyValue c_privacy_none := "none"; + const PrivacyValue c_privacy_id := "id"; + const PrivacyValue c_privacy_header := "header"; + const PrivacyValue c_privacy_user := "user"; + const PrivacyValue c_privacy_critical := "critical"; + const PrivacyValue c_privacy_session := "session"; + + // + const charstring c_AT := "@"; // MRO + const charstring c_SP := oct2char('20'O); + const charstring c_SLASH := oct2char('2F'O); + const charstring c_LT := oct2char('3C'O); + const charstring c_GT := oct2char('3E'O); + + // * (wildchard) sign + const charstring c_WILDCARD := "*"; + + const integer c_CRlen := 2; + // length of new line (0d0a) + const GenericParam c_Integrity_protected_yes := {"integrity-protected", {tokenOrHost := "yes"}}; + const GenericParam c_Integrity_protected_no := {"integrity-protected", {tokenOrHost := "no"}}; + const GenericParam c_Integrity_protected_ip_assoc_pending := {"integrity-protected", {tokenOrHost := "ip-assoc-pending"}}; + + const charstring c_algorithm := "MD5"; + + } // end group SimpleConstants + + group AuthorizationConstants { + + const charstring c_ik := ""; + const charstring c_ck := ""; + const charstring c_nonce := ""; + const charstring c_nonce_value := "0edff6c521cc3f407f2d9e01cf6ed82b"; + + + } // end group AuthorizationConstants + + group PChargingVectorConstants { + + const charstring c_icid := "icid-value"; + const charstring c_icid_value := "123abc"; + const charstring c_icid_generated_at := "icid-generated-at"; + const charstring c_orig_ioi := "orig-ioi"; + const charstring c_term_ioi := "term-ioi"; + const charstring c_access_network_charging_info := "access-network-charging-info"; + + + } // end group PChargingVectorConstants + + group HeaderFieldConstants { + + const CallId c_empty_CallId := { + fieldName := CALL_ID_E, + callid := "" + }; + + const ContentType c_empty_ContentType := { + fieldName := CONTENT_TYPE_E, + mTypeSubtype := "", + mParams := omit + }; + + const CSeq c_empty_cSeq := { + fieldName := CSEQ_E, + seqNumber := 0, + method := "EMPTY" + }; + + const From c_empty_From := { + fieldName := FROM_E, + addressField := { + nameAddr := { + displayName := omit, + addrSpec := { + scheme := c_sipScheme, + components := { + sip := { + userInfo := omit, + hostPort := { + host := "127.0.0.1", + portField := c_defaultSipPort + } + } + }, + urlParameters := omit, + headers := omit + } + } + }, + fromParams := omit + }; + + const MaxForwards c_maxForwards70 := { + fieldName := MAX_FORWARDS_E, + forwards := 70 + }; + + const SipUrl c_empty_RequestUri := { + scheme := c_sipScheme, + components := { + sip := { + userInfo := omit, + hostPort := { + host := "127.0.0.1", + portField := c_defaultSipPort + } + } + }, + urlParameters := omit, + headers := omit + }; + + const SipUrl c_unavailableUri := { + scheme := c_sipScheme, + components := { + sip := { + userInfo := { + userOrTelephoneSubscriber := "unavailable", + password := omit + }, + hostPort := { + host := "anonymous.invalid", + portField := c_defaultSipPort + } + } + }, + urlParameters := omit, + headers := omit + }; + + const To c_empty_To := { // value of To header + fieldName := TO_E, + addressField := { + nameAddr := { + displayName := omit, + addrSpec := { + scheme := c_sipScheme, + components := { + sip := { + userInfo := omit, + hostPort := { + host := "127.0.0.1", + portField := c_defaultSipPort + } + } + }, + urlParameters := omit, + headers := omit + } + } + }, + toParams := omit + }; + + const Via c_empty_Via := { + fieldName := VIA_E, + viaBody := { + { + sentProtocol := { + protocolName := c_sipName, + protocolVersion := c_sipVersion, + transport := c_defaultSipProt + }, + sentBy := { + host := "127.0.0.1", + portField := c_defaultSipPort + }, + viaParams := omit + } + } + }; + + + } + + + group UserProfileConstants { + // number of user profile from 1-10 for SIP profile + const integer c_userProfile_SIP1_home := 1; + const integer c_userProfile_SIP2_home := 2; + + + } // end group UserProfileConstants + + group StatusLines { + const StatusLine c_statusLine100 := {c_sipNameVersion, 100, "Trying"}; + const StatusLine c_statusLine180 := {c_sipNameVersion, 180, "Ringing"}; + const StatusLine c_statusLine181 := {c_sipNameVersion, 181, "Call Is Being Forwarded"}; + const StatusLine c_statusLine182 := {c_sipNameVersion, 182, "Queued"}; + const StatusLine c_statusLine183 := {c_sipNameVersion, 183, "Session Progress"}; + + const StatusLine c_statusLine200 := {c_sipNameVersion, 200, "OK"}; + const StatusLine c_statusLine202 := {c_sipNameVersion, 202, "Accepted"}; + + const StatusLine c_statusLine300 := {c_sipNameVersion, 300, "Multiple Choices"}; + const StatusLine c_statusLine301 := {c_sipNameVersion, 301, "Moved Permanently"}; + const StatusLine c_statusLine302 := {c_sipNameVersion, 302, "Moved Temporarily"}; + const StatusLine c_statusLine305 := {c_sipNameVersion, 305, "Use Proxy"}; + const StatusLine c_statusLine380 := {c_sipNameVersion, 380, "Alternative Service"}; + + const StatusLine c_statusLine400 := {c_sipNameVersion, 400, "Bad Request"}; + const StatusLine c_statusLine401 := {c_sipNameVersion, 401, "Unauthorized"}; + const StatusLine c_statusLine402 := {c_sipNameVersion, 402, "Payment Required"}; + const StatusLine c_statusLine403 := {c_sipNameVersion, 403, "Forbidden"}; + const StatusLine c_statusLine404 := {c_sipNameVersion, 404, "Not Found"}; + const StatusLine c_statusLine405 := {c_sipNameVersion, 405, "Method Not Allowed"}; + const StatusLine c_statusLine406 := {c_sipNameVersion, 406, "Not Acceptable"}; + const StatusLine c_statusLine407 := {c_sipNameVersion, 407, "Proxy Authentication Required"}; + const StatusLine c_statusLine408 := {c_sipNameVersion, 408, "Request Timeout"}; + const StatusLine c_statusLine410 := {c_sipNameVersion, 410, "Gone"}; + const StatusLine c_statusLine413 := {c_sipNameVersion, 413, "Request Entity Too Large"}; + const StatusLine c_statusLine414 := {c_sipNameVersion, 414, "Request-URI Too Long"}; + const StatusLine c_statusLine415 := {c_sipNameVersion, 415, "Unsupported Media Type"}; + const StatusLine c_statusLine416 := {c_sipNameVersion, 416, "Unsupported URI Scheme"}; + const StatusLine c_statusLine420 := {c_sipNameVersion, 420, "Bad Extension"}; + const StatusLine c_statusLine421 := {c_sipNameVersion, 421, "Extension Required"}; + const StatusLine c_statusLine422 := {c_sipNameVersion, 422, "Session Interval Too Small"}; + const StatusLine c_statusLine423 := {c_sipNameVersion, 423, "Interval Too Brief"}; + const StatusLine c_statusLine433 := {c_sipNameVersion, 433, "Anonymity Disallowed"}; + const StatusLine c_statusLine480 := {c_sipNameVersion, 480, "Temporarily Unavailable"}; + const StatusLine c_statusLine481 := {c_sipNameVersion, 481, "Call/Transaction Does Not Exist"}; + const StatusLine c_statusLine482 := {c_sipNameVersion, 482, "Loop Detected"}; + const StatusLine c_statusLine483 := {c_sipNameVersion, 483, "Too Many Hops"}; + const StatusLine c_statusLine484 := {c_sipNameVersion, 484, "Address Incomplete"}; + const StatusLine c_statusLine485 := {c_sipNameVersion, 485, "Ambiguous"}; + const StatusLine c_statusLine486 := {c_sipNameVersion, 486, "Busy Here"}; + const StatusLine c_statusLine487 := {c_sipNameVersion, 487, "Request Terminated"}; + const StatusLine c_statusLine488 := {c_sipNameVersion, 488, "Not Acceptable Here"}; + const StatusLine c_statusLine493 := {c_sipNameVersion, 493, "Undecipherable"}; + const StatusLine c_statusLine500 := {c_sipNameVersion, 500, "Server Internal Error"}; + const StatusLine c_statusLine501 := {c_sipNameVersion, 501, "Not implemented"}; + const StatusLine c_statusLine502 := {c_sipNameVersion, 502, "Bad Gateway"}; + const StatusLine c_statusLine503 := {c_sipNameVersion, 503, "Service Unavailable"}; + const StatusLine c_statusLine504 := {c_sipNameVersion, 504, "Server Time-out"}; + const StatusLine c_statusLine505 := {c_sipNameVersion, 505, "Version Not Supported"}; + const StatusLine c_statusLine513 := {c_sipNameVersion, 513, "Message Too Large"}; + const StatusLine c_statusLine580 := {c_sipNameVersion, 580, "Precondition Failure"}; + const StatusLine c_statusLine600 := {c_sipNameVersion, 600, "Busy Everywhere"}; + const StatusLine c_statusLine603 := {c_sipNameVersion, 603, "Decline"}; + const StatusLine c_statusLine604 := {c_sipNameVersion, 604, "Does Not Exist Anywhere"}; + const StatusLine c_statusLine606 := {c_sipNameVersion, 606, "Not Acceptable"}; + + + } // end StatusLines + + group SIPSyncPointNames { + const charstring c_Ringing := "Ringing"; + const charstring c_uPlane := "uPlane"; + const charstring c_sync1 := "sync1"; + const charstring c_sync2 := "sync2"; + const charstring c_sync3 := "sync3"; + const charstring c_sync4 := "sync4"; + const charstring c_uPlaneStop := "uPlaneStop"; + const charstring c_annoucA := "announcementA"; + const charstring c_annoucB := "announcementB"; + const charstring c_annouc := "announcement"; + const charstring c_voicem := "voiceMessage"; + } + + + } // end group Constants + + group Types { + group SubTypes { + // Subtypes + group TokenTypes // TokensTypes + { + // [20 ] + type enumerated FieldName { + ACCEPT_E, + ACCEPT_ENCODING_E, + ACCEPT_LANGUAGE_E, + ALERT_INFO_E, + ALLOW_E, + AUTHENTICATION_INFO_E, + AUTHORIZATION_E, + CALL_ID_E, + CALL_INFO_E, + CONTACT_E, + CONTENT_DISPOSITION_E, + CONTENT_ENCODING_E, + CONTENT_LANGUAGE_E, + CONTENT_LENGTH_E, + CONTENT_TYPE_E, + CSEQ_E, + DATE_E, + ERROR_INFO_E, + EXPIRES_E, + FROM_E, + IN_REPLY_TO_E, + MAX_FORWARDS_E, + MIME_VERSION_E, + MIN_EXPIRES_E, + ORGANIZATION_E, + PRIORITY_E, + PROXY_AUTHENTICATE_E, + PROXY_AUTHORIZATION_E, + PROXY_REQUIRE_E, + RECORD_ROUTE_E, + REPLY_TO_E, + REQUIRE_E, + RETRY_AFTER_E, + ROUTE_E, + SERVER_E, + SUBJECT_E, + SUPPORTED_E, + TIMESTAMP_E, + TO_E, + UNSUPPORTED_E, + USER_AGENT_E, + VIA_E, + WARNING_E, + WWW_AUTHENTICATE_E, + // [3262/7.1 ] + RACK_E, + RSEQ_E, + // [3265/7.2 ] + ALLOW_EVENTS_E, + EVENT_E, + SUBSCRIPTION_STATE_E, + // [3313 ] + P_MEDIA_AUTHORIZATION_E, + // [3323 ] + PRIVACY_E, + // [3325 ] + P_ASSERTED_ID_E, + P_PREFERRED_ID_E, + P_PREFERRED_SERVICE_E, + // [3326 ] + REASON_E, + // [3515 ] - REFER method + REFER_TO_E, + // [4488 ] - REFER method + REFER_SUB_E, + // [3891 ] + REPLACES_E, + // [3892 ] - REFER method + REFERRED_BY_E, + // [4244 ] + HISTORY_INFO_E, + // [3313 ] + P_MEDIA_AUTH_E, + // [3327 ] + PATH_E, + // [3329 ] + SECURITY_CLIENT_E, + SECURITY_SERVER_E, + SECURITY_VERIFY_E, + // [3455 ] + P_ACCESS_NETWORK_INFO_E, + P_ASSOCIATED_URI_E, + P_CALLED_PARTY_E, + P_CHARGING_FUNCTION_ADDRESSES_E, + P_CHARGING_VECTOR_E, + P_VISITED_NETWORK_E, + // [3608 ] + SERVICE_ROUTE_E, + // [3841 ] + ACCEPT_CONTACT_E, + REQUEST_DISPOSITION_E, + // [4028 ] + MIN_SE_E, + SESSION_EXPIRES_E, + P_ASSERTED_SERVICE_E, + // [5009 ] + P_EARLY_MEDIA_E, + // http://tools.ietf.org/html/draft-johnston-sipping-cc-uui-07 + // Transporting User to User Call Control Information in SIP for ISDN Interworking + USER_TO_USER_E, + // [6442 ] /* + GEOLOCATION_E, + GEOLOCATION_ROUTING_E, + SESSION_ID_E, + SIP_ETAG_E, + SIP_IF_MATCH_E, + FEATURE_CAPS_E, + // 6086 + RECV_INFO_E, + INFO_PACKAGE_E, + // 2616 + HOST_E, + // + RESOURCE_PRIORITY_E, //4412 + ANSWER_MODE_E, //5373 + PRIV_ANSWER_MODE_E, //5373 + TARGET_DIALOG_E, //4538 + P_ANSWER_STATE_E //4964 + } + + // [7.1 ] + type enumerated Method { + ACK_E, + BYE_E, + CANCEL_E, + INVITE_E, + OPTIONS_E, + REGISTER_E, + PRACK_E // Note: this element is not defined in [5 ] + , + SUBSCRIBE_E, + NOTIFY_E // [3265 ] + , + PUBLISH_E // [3903/12 ] + , + REFER_E // [3515 ] + , + UPDATE_E // [3311 ] + , + MESSAGE_E // [3428 ] + , + INFO_E // [2976 ] + , + UNKNOWN_METHOD_E + } + + // [20.10, 20.20, 20.30, 20.31, 20.34, 20.39, 20.42, 20.43 ] + type record HostPort { + charstring host optional, // hostname, IPv4 or IPv6 + integer portField optional // represented as an integer + } + + // [20.10, 20.20, 20.30, 20.31, 20.34, 20.39 ] + /** + * @desc identifier for user or telephone subscriber + * @member userOrTelephoneSubscriber provides the username or a phone name identifying the subscriber + * @member password related password information + */ + type record UserInfo { + charstring userOrTelephoneSubscriber, + charstring password optional + } + + // [19.1.1 ;used in: 20.10, 20.20, 20.30, 20.31, 20.34, 20.39 ] + /** + * @desc Uniform Resource Identifier (URI) + * @member scheme distinguishes call types, e.g. voice, fax etc. or related address scheme, e.g. tel, sip + * @member userInfo Contains user information (also in non-SIP URLs) with optional parameter as passwords + * @member hostPort Hostname or IP address information and port identifier of the target + * @member urlParameters Contains either SIP or TEL URL parameters, separated by semicolons, e.g. transport=tcp or user=phone + * @member headers Additional information added after the parameters, e.g. priority=urgent + */ + type record SipUriComponents { // sip-uri acc. to RFC 3261 cl. 19.1 + UserInfo userInfo optional, + HostPort hostPort + } + + type record TelUriComponents { // tel-uri acc. to RFC 3966 + charstring subscriber + } + + type record UrnUriComponents { // urn-uri acc. to RFC 2141 + charstring namespaceId, // e.g. "service" as acc. to RFC 5031 + charstring namespaceSpecificString // e.g. "sos" + } + + type union UriComponents { + SipUriComponents sip, // scheme: "sip" or sips" + TelUriComponents tel, // scheme: "tel" + UrnUriComponents urn, // scheme: "urn" + charstring other // scheme: none of the above schemes + } + + type record SipUrl { + charstring scheme, // e.g "sip" or "tel" + UriComponents components, // corresponding to the scheme + SemicolonParam_List urlParameters optional, + AmpersandParam_List headers optional + } + + // [20.1, RFC2616 14.1 ] + type record AcceptBody { + charstring mediaRange, + SemicolonParam_List acceptParam optional + } + + // [20.1, RFC2616 14.1 ] + type set of AcceptBody AcceptBody_List; + + // [20.4 ] + type record AlertInfoBody { + charstring url, // any URI + SemicolonParam_List genericParams optional + } + + // [20.4 ] + type set of AlertInfoBody AlertInfoBody_List; + + // [20.8 ] + type charstring CallidString; + // token [" + // [20.8 ] + type set of CallidString CallidString_List; + + // [20.9 ] + type record CallInfoBody { + charstring url, // any URI + SemicolonParam_List infoParams optional + } + + // [20.9 ] + type set of CallInfoBody CallInfoBody_List; + + // [20.27, 20.44, .......10.32, 10.48; RFC2616 14.33, 14.47; RFC2617 1.2 ] + type union Challenge { + CommaParam_List digestCln, + OtherAuth otherChallenge + } + + // [20.10, 20.20, 20.30, 20.31, 20.34, 20.39 ] + type union DisplayName + { + charstring token, + charstring quotedString + } + + // [20.10, 20.20, 20.30, 20.31, 20.34, 20.39 ] + type record NameAddr { + DisplayName displayName optional, + SipUrl addrSpec + } + + // [20.10, 20.20, 20.31, 20.39 ] + type union Addr_Union { + NameAddr nameAddr, + SipUrl addrSpecUnion // STS: "Union" added to filed name to avoid dangerous name equivalence with 2nd NameAddr field + } + + // [20.10 ] + type record ContactAddress { + Addr_Union addressField, + SemicolonParam_List contactParams optional + } + + // [20.10 ] + type set of ContactAddress ContactAddress_List; // 1 or more elements + // [20.10 ] + type union ContactBody { + charstring wildcard, + ContactAddress_List contactAddresses + } + + // [20.2, 20.12; RFC2616 14.3, 14.11 ] + type charstring ContentCoding; + + // [20.2, 20.12; RFC2616 14.3, 14.11 ] + type set of ContentCoding ContentCoding_List; + + // [20.7, 20.28; RFC2616 14.35 RFC2617 1.2 ] + type union Credentials { + CommaParam_List digestResponse, + OtherAuth otherResponse + } + + // allow multiple Authorization headers due to RFC3261 ch. 20.7 and 20.28 + type record of Credentials CredentialsList; + + // [20.19, 20.23, 20.33 ] + type charstring DeltaSec; // an external operation can handle this field + // [20.18 ] + type record ErrorInfoBody { + charstring uri, // any URI + SemicolonParam_List genericParams optional + } + + // [20.18 ] + type set of ErrorInfoBody ErrorInfoBody_List; + + // [20.3 RFC2616 14.4 ] + type record LanguageBody { + charstring languageRange, + SemicolonParam_List acceptParam optional + } + + // [20.3 RFC2616 14.4 ] + type set of LanguageBody LanguageBody_List; + + // [20.13; RFC2616 14.12 ] + type charstring LanguageTag; + + // [20.13; RFC2616 14.12 ] + type set of LanguageTag LanguageTag_List; + + // [20.5 ] + type set of charstring Method_List; + + // [20.29, 20.32, 20.37, 20.40 ] + type charstring OptionTag; + + // [20.29, 20.32, 20.37, 20.40 ] + type set of OptionTag OptionTag_List; + + // [20.7, 20.27, 20.28, 20.44 ; RFC2616 14.33, 14.47; RFC2617 1.2 ] + type record OtherAuth { + charstring authScheme, + CommaParam_List authParams + } + + type record Payload { + integer payloadlength, + charstring payloadvalue + } + + // [20.30,20.34 ] + type record RouteBody { + NameAddr nameAddr, + SemicolonParam_List rrParam optional + } + + // [20.30,20.34 ] + type record of RouteBody RouteBody_List; + + // [20.42 ] + type record SentProtocol { + charstring protocolName, + charstring protocolVersion, + charstring transport + } + + // [20.35, 20.41; RFC2616 14.43 ] + type charstring ServerVal; + + // [20.35, 20.41; RFC2616 14.43 ] + type set of ServerVal ServerVal_List; + + // [20.38 ] + type record TimeValue { + integer majorDigit, // represented as an integer + integer minorDigit optional // represented as an integer + } + + // [20.42 ] + type record ViaBody { + SentProtocol sentProtocol, + HostPort sentBy, + SemicolonParam_List viaParams optional + } + + // [20.42 ] + type record of ViaBody ViaBody_List; + + // [20.43 ] + type union WarnAgent { + HostPort hostPort, + charstring pseudonym + } + + // [20.43 ] + type record WarningValue { + integer warnCode, // represented as an integer + WarnAgent warnAgent, + charstring warnText + } + + // [20.43 ] + type set of WarningValue WarningValue_List; + + type Addr_Union PAssertedIDValue; + + type record of PAssertedIDValue PAssertedIDValue_List; + + type charstring PAssertedServiceValue; + + type Addr_Union PPreferredIDValue; + + type record of PPreferredIDValue PPreferredIDValue_List; + + type charstring PrivacyValue; + + type record of PrivacyValue PrivacyValue_List; + + type set of FcValue FcValue_List; + type record FcValue { + charstring wildcard(c_WILDCARD), + SemicolonParam_List fcParams optional + } + + + } // end group TokensType + + + group HeaderFieldTypes // Header Fields + { + group CommonHeaderFieldTypes { + // [20.1, RFC2616 14.1 ] + type record Accept { + FieldName fieldName (ACCEPT_E) , + AcceptBody_List acceptArgs optional + } + + // [20.2, RFC2616 14.3 ] + type record AcceptEncoding { + FieldName fieldName (ACCEPT_ENCODING_E) , + ContentCoding_List contentCoding optional + } + + // [20.3, RFC2616 14.4 ] + type record AcceptLanguage { + FieldName fieldName (ACCEPT_LANGUAGE_E) , + LanguageBody_List languageBody optional + } + + // [20.4 ] + type record AlertInfo { + FieldName fieldName (ALERT_INFO_E) , + AlertInfoBody_List alertInfoBody optional + } + + // [20.5 ] + type record Allow { + FieldName fieldName (ALLOW_E) , + Method_List methods optional + } + + // [20.6 ] + type record AuthenticationInfo { + FieldName fieldName (AUTHENTICATION_INFO_E) , + CommaParam_List ainfo + } + + // [20.7 RFC2617 3.2.2 ] + type record Authorization { + FieldName fieldName (AUTHORIZATION_E) , + CredentialsList body // changed from Credentials to allow multiple Authorization headers + } + + // [20.8 ] + type record CallId { + FieldName fieldName (CALL_ID_E) , + CallidString callid + } + + // [20.9 ] + type record CallInfo { + FieldName fieldName (CALL_INFO_E) , + CallInfoBody_List callInfoBody optional + } + + // [20.10 ] + type record Contact { + FieldName fieldName (CONTACT_E) , + ContactBody contactBody + } + + // [20.11 ] + type record ContentDisposition { + FieldName fieldName (CONTENT_DISPOSITION_E) , + charstring dispositionType, + SemicolonParam_List dispositionParams optional + } + + // [20.12 RFC2616 14.11 ] + type record ContentEncoding { + FieldName fieldName (CONTENT_ENCODING_E) , + ContentCoding_List contentCoding + } + + // [20.13 RFC2616 14.12 ] + type record ContentLanguage { + FieldName fieldName (CONTENT_LANGUAGE_E) , + LanguageTag_List languageTag + } + + // [20.14 ] + type record ContentLength { + FieldName fieldName (CONTENT_LENGTH_E) , + integer len // this field is represented as an integer + } + + // [20.15 ] + type record ContentType { + FieldName fieldName (CONTENT_TYPE_E) , + charstring mTypeSubtype , + SemicolonParam_List mParams optional + } + + // [20.16 ] + type record CSeq { + FieldName fieldName (CSEQ_E) , + integer seqNumber, // this field is represented as an integer + charstring method + } + + // [20.17 ] + type record Date { + FieldName fieldName (DATE_E) , + charstring sipDate + } + + // [20.18 ] + type record ErrorInfo { + FieldName fieldName (ERROR_INFO_E) , + ErrorInfoBody_List errorInfo optional + } + + // [20.19 ] + type record Expires { + FieldName fieldName (EXPIRES_E) , + DeltaSec deltaSec + } + + //[6809] + type record FeatureCaps { + FieldName fieldName(FEATURE_CAPS_E), + FcValue_List fcValues + } + + // [20.20 ] + type record From { + FieldName fieldName (FROM_E) , + Addr_Union addressField, + SemicolonParam_List fromParams optional + } + + // [2616] + type record Host { + FieldName fieldName(HOST_E), + charstring host, // an empty value is represented by the empty charstring "" + integer portField optional + } + + // [20.21 ] + type record InReplyTo { + FieldName fieldName (IN_REPLY_TO_E) , + CallidString_List callids + } + + // [20.22 ] + type record MaxForwards { + FieldName fieldName (MAX_FORWARDS_E) , + integer forwards // this field is represented as an integer + } + + // [20.23 ] + type record MinExpires { + FieldName fieldName (MIN_EXPIRES_E) , + DeltaSec deltaSec + } + + // [20.24 RFC2616 19.4.1 ] + type record MimeVersion { + FieldName fieldName (MIME_VERSION_E) , + integer majorNumber, // this field is represented as an integer + integer minorNumber // this field is represented as an integer + } + + // [20.25 ] + type record Organization { + FieldName fieldName (ORGANIZATION_E) , + charstring organization + } + + // [20.26 ] + type record Priority { + FieldName fieldName (PRIORITY_E) , + charstring priorityValue + } + + // [20.27 RFC2616 14.33 RFC2617 1.2 ] + type record ProxyAuthenticate { + FieldName fieldName (PROXY_AUTHENTICATE_E) , + Challenge challenge + } + + // [20.28 RFC2616 14.35 RFC2617 1.2 ] + type record ProxyAuthorization { + FieldName fieldName (PROXY_AUTHORIZATION_E) , + CredentialsList + credentials // changed from Credentials to allow multiple Authorization headers + } + + // [20.29 ] + type record ProxyRequire { + FieldName fieldName (PROXY_REQUIRE_E) , + OptionTag_List optionsTags + } + + // [20.30 ] + type record RecordRoute { + FieldName fieldName (RECORD_ROUTE_E) , + RouteBody_List routeBody + } + + type set of InfoPackage_Type InfoPackage_List; + + type record InfoPackage_Type { + charstring infoPackageName, + SemicolonParam_List infoPackageParams optional + + } + + //[6086] + type record RecvInfo { + FieldName fieldName(RECV_INFO_E), + InfoPackage_List infoPackageList + } + + //[6086] + type record InfoPackage { + FieldName fieldName(INFO_PACKAGE_E), + InfoPackage_Type infoPackageType + } + + // [20.31 ] + type record ReplyTo { + FieldName fieldName (REPLY_TO_E) , + Addr_Union addressField, + SemicolonParam_List replyToParams optional + } + + // [20.32 ] + type record Require { + FieldName fieldName (REQUIRE_E) , + OptionTag_List optionsTags + } + + // [20.33 ] + type record RetryAfter { + FieldName fieldName (RETRY_AFTER_E) , + DeltaSec deltaSec, + charstring comment optional, + SemicolonParam_List retryParams optional + } + + // [20.34 ] + type record Route { + FieldName fieldName (ROUTE_E) , + RouteBody_List routeBody + } + + // [20.35 RFC2616 14.38 ] + type record Server { + FieldName fieldName (SERVER_E) , + ServerVal_List serverBody + } + + // [20.36 ] + type record Subject { + FieldName fieldName (SUBJECT_E) , + charstring summary + } + + // [20.37 ] + type record Supported { + FieldName fieldName (SUPPORTED_E) , + OptionTag_List optionsTags optional + } + + // [20.38 ] + type record Timestamp { + FieldName fieldName (TIMESTAMP_E) , + TimeValue timeValue optional, + TimeValue delay optional + } + + // [20.39 ] + type record To { + FieldName fieldName (TO_E) , + Addr_Union addressField, + SemicolonParam_List toParams optional + } + + // [20.40 ] + type record Unsupported { + FieldName fieldName (UNSUPPORTED_E) , + OptionTag_List optionsTags + } + + // Undefined header field + type record UndefinedHeader { + charstring headerName, + charstring headerValue + } + + type set of UndefinedHeader UndefinedHeader_List; + + // [20.41 RFC2616 14.43 ] + type record UserAgent { + FieldName fieldName (USER_AGENT_E) , + ServerVal_List userAgentBody + } + + // [20.42 ] + type record Via { + FieldName fieldName (VIA_E) , + ViaBody_List viaBody + } + + // [20.43 ] + type record Warning { + FieldName fieldName (WARNING_E) , + WarningValue_List warningValue + } + + // [20.44 RFC2616 14.47 RFC2617 1.2 ] + type record WwwAuthenticate { + FieldName fieldName (WWW_AUTHENTICATE_E) , + Challenge challenge + } + + } // end group CommonHeaderFieldTypes + group RFC3262HeaderFieldTypes { + // [3262/7.1 ] + type record RSeq { + FieldName fieldName (RSEQ_E) , + integer responseNum + } + + // [3262/7.2 ] + type record RAck { + FieldName fieldName (RACK_E) , + integer responseNum, + integer seqNumber, + charstring method + } + + } // end group RFC3262HeaderFieldTypes + + group RFC3265HeaderFieldTypes { + // [3265/7.2 ] + type record AllowEvents { + FieldName fieldName (ALLOW_EVENTS_E) , + EventType_List eventTypes + } + + type set of EventType EventType_List; + type charstring EventType; + + // [3265/7.2 ] + type record Event { + FieldName fieldName (EVENT_E) , + EventType eventType, + SemicolonParam_List eventParams optional + } + + // [3265/7.2 ] + type record SubscriptionState { + FieldName fieldName (SUBSCRIPTION_STATE_E) , + SubState subState, + SemicolonParam_List substateParams optional + } + + type charstring SubState; + + } // end group RFC3265HeaderFieldTypes + + group RFC3313HeaderFieldTypes { + // [3313/5 ] + type record PMediaAuthorization { + FieldName fieldName (P_MEDIA_AUTHORIZATION_E) , + PMediaAuthorization_List pMediaAuthorizations + } + + type charstring PMediaAuthValue; // HEXDIG "0"-"9", "A"-"F" + type record of PMediaAuthValue PMediaAuthorization_List; + + + } // end group RFC3265HeaderFieldTypes + + group RFC3323HeaderFieldTypes { + // [3323 ] + type record Privacy { + FieldName fieldName (PRIVACY_E) , + PrivacyValue_List privValueList + } + + } // end group RFC3323HeaderFieldTypes + + group RFC3325HeaderFieldTypes { + // [3325 ] + type record PAssertedID { + FieldName fieldName (P_ASSERTED_ID_E) , + PAssertedIDValue_List pAssertedIDValueList + } + + // [3325 ] + type record PPreferredID { + FieldName fieldName (P_PREFERRED_ID_E) , + PPreferredIDValue_List pPreferredIDValueList + } + // draft-drage-sipping-service-identification-01 (July 2007) + type record PPreferredService { + FieldName fieldName (P_PREFERRED_SERVICE_E) , + charstring serviceId + } + + + } // end group RFC3325HeaderFieldTypes + + group RFC3326HeaderFieldTypes { + // [3326 ] + type record of ReasonValue ReasonValues; + + type record ReasonValue { + charstring token, + SemicolonParam_List reasonParams optional + } + + type record Reason { + FieldName fieldName (REASON_E) , + ReasonValues reasonValues + } + + } // end group RFC3326HeaderFieldTypes + + group RFC3327HeaderFieldTypes { + // [3327 ] + type record Path { + FieldName fieldName (PATH_E) , + PathValues pathValues + } + + type record of PathValue PathValues; + + type record PathValue { + NameAddr nameAddr, + SemicolonParam_List rrParam optional + } + + } // end group RFC3515HeaderFieldTypes + + + group RFC4488HeaderFieldTypes { + // [4488 ] + type record ReferSub { + FieldName fieldName (REFER_SUB_E) , + boolean referSubValue, + SemicolonParam_List referSubParams optional + } + + } // end group RFC4488HeaderFieldTypes + + group RFC3329HeaderFieldTypes { + // [RFC3329/2.2 ] + type record SecurityMechanism { + charstring mechName, + SemicolonParam_List mechParams optional + } + + type set of SecurityMechanism SecurityMechanism_List; + + type record SecurityClient { + FieldName fieldName (SECURITY_CLIENT_E) , + SecurityMechanism_List securityMech + } + + type record SecurityServer { + FieldName fieldName (SECURITY_SERVER_E) , + SecurityMechanism_List securityMech + } + + type record SecurityVerify { + FieldName fieldName (SECURITY_VERIFY_E) , + SecurityMechanism_List securityMech + } + + } // end group RFC3329HeaderFieldTypes + + group RFC3455HeaderFieldTypes { + type record of NameAddrParam NameAddrParam_List; + + type record NameAddrParam { + NameAddr nameAddr, + SemicolonParam_List genericParams optional + } + // [3455/5.1 ] + type record PAssociatedURI { + FieldName fieldName (P_ASSOCIATED_URI_E) , + NameAddrParam_List nameAddrList + } + // [3455/5.2 ] + type record PCalledPartyID { + FieldName fieldName (P_CALLED_PARTY_E) , + NameAddrParam nameAddParams + } + + type record of VnetworkSpec VnetworkSpec_List; + + type record VnetworkSpec { + charstring vNetworkSpecToken, + SemicolonParam_List genericParams optional + } + + // [3455/5.3 ] + type record PVisitedNetworkID { + FieldName fieldName (P_VISITED_NETWORK_E) , + VnetworkSpec_List vNetWorkSpec + } + + // [3455/5.4 ] + type record PAccessNetworkInfo { + FieldName fieldName (P_ACCESS_NETWORK_INFO_E) , + charstring accessType, + SemicolonParam_List genericParams optional + } + + // [3455/5.5 ] + type record PChargingFunctionAddresses { + FieldName fieldName (P_CHARGING_FUNCTION_ADDRESSES_E) , + SemicolonParam_List chargeAddrParams optional + } + + // [3455/5.6 ] + type record PChargingVector { + FieldName fieldName (P_CHARGING_VECTOR_E) , + charstring icidValue, + SemicolonParam_List chargeParams optional + } + + } // end group RFC33455HeaderFieldTypes + + group RFC3515HeaderFieldTypes { + // [3515 ] + type record ReferTo { + FieldName fieldName (REFER_TO_E) , + NameAddr nameAddr, + SemicolonParam_List referToParams optional + } + + } // end group RFC3515HeaderFieldTypes + + group RFC3608HeaderFieldTypes { + // [3608 ] + type record ServiceRoute { + FieldName fieldName (SERVICE_ROUTE_E) , + RouteBody_List routeBody + } + + } // end group RFC33608HeaderFieldTypes + + + group RFC3841HeaderFieldTypes { + // [3841 ] + type record AcceptContact { + FieldName fieldName (ACCEPT_CONTACT_E) , + AcRcValue_List acValues + } + + type set of AcRcValue AcRcValue_List; + + type record AcRcValue { + charstring wildcard (c_WILDCARD) , + SemicolonParam_List acRcParams optional + } + // [RFC 3841 ] + type charstring Directive; + type set of Directive Directive_List; + type record RequestDisposition { + FieldName fieldName (REQUEST_DISPOSITION_E) , + Directive_List directives + } + + + } // end group RFC3841HeaderFieldTypes + + group RFC3891HeaderFieldTypes { + // [3891 ] + type record Replaces { + FieldName fieldName (REPLACES_E) , + CallidString callid, + SemicolonParam_List replacesParams optional + } + + } // end group RFC3891HeaderFieldTypes + + group RFC3892HeaderFieldTypes { + // [3892 ] + type record ReferredBy { + FieldName fieldName (REFERRED_BY_E) , + NameAddr nameAddr, + SemicolonParam_List referredbyIdParams optional + } + + } // end group RFC3892HeaderFieldTypes + + group RFC4028HeaderFieldTypes { + // [4028 ] + type record MinSE { + FieldName fieldName (MIN_SE_E) , + DeltaSec deltaSec, + SemicolonParam_List minSeParam optional + } + // [4028 ] + type record SessionExpires { + FieldName fieldName (SESSION_EXPIRES_E) , + DeltaSec deltaSec, + SemicolonParam_List seParam optional + } + + } // end group RFC4028HeaderFieldTypes + + group RFC4244HeaderFieldTypes { + // [4244 ] + type record HistoryInfo { + FieldName fieldName (HISTORY_INFO_E) , + HistoryInfo_List historyInfoList + } + + type record of HistoryInfoEntry HistoryInfo_List; + + type record of integer IntegerList; + + type record HistoryInfoEntry { + NameAddr nameAddr, + IntegerList hiIndex optional, + SemicolonParam_List hiExtention optional + } + + type record of charstring StringList; + + } // end group RFC4244HeaderFieldTypes + + group RFC5009PEarlyMediaHeader { + // [5009 ] + type record PEarlyMedia { + FieldName fieldName (P_EARLY_MEDIA_E) , + EM_Param_List em_param + } + type charstring EM_Param; + type set of EM_Param EM_Param_List; + + } // end group RFC5009PEarlyMediaHeader + + // http://tools.ietf.org/html/draft-johnston-sipping-cc-uui-07, expires 16.Aug.2009 + // Transporting User to User Call Control Information in SIP for ISDN Interworking + // type definition of SIP header mechanism + group UserToUser_PreliminaryRFCDraft { + type record UserToUser { + FieldName fieldName (USER_TO_USER_E) , + charstring uuiData length(256), + /*length limitation due to ISDN, max of allowed 128 hex digits are represented by 256 characters*/ + GenericParam uuiParam + } + + + } // end group UserToUser_PreliminaryRFCDraft + + type record PAssertedService { + FieldName fieldName (P_ASSERTED_SERVICE_E) , + PAssertedServiceValue pAssertedServiceValue + } + + group RFC6442GeolocationConveyance { + // [6442 ] + type record Geolocation { + // RFC6442 clause 4.1 + FieldName fieldName (GEOLOCATION_E) , + SipUrl addrSpec, + SemicolonParam_List geolocParam optional + } + type enumerated GeolocationRoutingState { + GEOLOCATION_ROUTING_YES_E, GEOLOCATION_ROUTING_NO_E, GEOLOCATION_ROUTING_OTHER_E + } + type record GeolocationRouting { + // RFC6442 clause 4.2 + FieldName fieldName (GEOLOCATION_ROUTING_E) , + GeolocationRoutingState state, + GenericParam genericValue optional + } + + } // end group RFC6442GeolocationConveyance + + type charstring SessIdString length(32); + + type record SessionId { + FieldName fieldName (SESSION_ID_E) , + SessIdString sessid, + GenericParam sessidParam optional + } + + type charstring EntityTag; + + type record SIP_ETag { + FieldName fieldName (SIP_ETAG_E) , + EntityTag entityTag + } + + type record SIP_If_Match { + FieldName fieldName (SIP_IF_MATCH_E) , + EntityTag entityTag + } + + // RFC4412 + type record ResourcePriority { + FieldName fieldName (RESOURCE_PRIORITY_E) , + ResourcePriority_List resourcePriorityList + } + type set of R_Value ResourcePriority_List; + type record R_Value { + charstring namespace, + charstring rPriority + } + + // RFC5373 + type record AnswerMode { + FieldName fieldName (ANSWER_MODE_E), + AnswerMode_Value answerMode_Value, + SemicolonParam_List answerModeParams optional + } + type record PrivAnswerMode { + FieldName fieldName (PRIV_ANSWER_MODE_E), + AnswerMode_Value answerMode_Value, + SemicolonParam_List answerModeParams optional + } + type charstring AnswerMode_Value; + + // RFC4538 + type record TargetDialog { + FieldName fieldName (TARGET_DIALOG_E), + CallidString callid, + TdParam tdParam optional + } + type record TdParam { + charstring remoteParam optional, + charstring localParam optional, + SemicolonParam_List genericParams optional + } + + // RFC4964 + type record PAnswerState { + FieldName fieldName (P_ANSWER_STATE_E), + charstring answerType, + SemicolonParam_List genericParams optional + } + + + } // end group HeaderFieldTypes + + group MessageHeaderTypes { + + // Message-Header for all SIP requests and responses [20 ] + type set MessageHeader { + Accept accept optional, + AcceptContact acceptContact optional, + AcceptEncoding acceptEncoding optional, + AcceptLanguage acceptLanguage optional, + AlertInfo alertInfo optional, + Allow allow optional, + AllowEvents allowEvents optional, + // 3265/7.2 + AuthenticationInfo authenticationInfo optional, + // only in responses + Authorization authorization optional, + // only in requests + CallId callId optional, + // optional only in Invalid test cases mandatory otherwise + CallInfo callInfo optional, + Contact contact optional, + // optional in response and all requests except INVITE where mandatory + ContentDisposition contentDisposition optional, + ContentEncoding contentEncoding optional, + ContentLanguage contentLanguage optional, + ContentLength contentLength optional, + // optional in responses and all requests except ACK where mandatory + ContentType contentType optional, + CSeq cSeq optional, + // optional only in Invalid test cases mandatory otherwise + Date date optional, + ErrorInfo errorInfo optional, + // only in responses + Event event optional, + // 3265/7.2 + Expires expires optional, + FeatureCaps featureCaps optional, // 6809 + From fromField, + Geolocation geolocation optional, + // 6442 + GeolocationRouting geolocationRouting optional, + // 6442 + HistoryInfo historyInfo optional, + // 4244 + InfoPackage infoPackage optional, + // 6086 + InReplyTo inReplyTo optional, + // only in requests + MaxForwards maxForwards optional, + // mandatory in requests not required in responses! + MimeVersion mimeVersion optional, + MinExpires minExpires optional, + // only in responses + MinSE minSE optional, + // 4028 + Organization organization optional, + PAccessNetworkInfo pAccessNetworkInfo optional, + // 3455 + PAssertedID pAssertedID optional, + // 3325 + PAssertedService pAssertedService optional, + PAssociatedURI pAssociatedURI optional, + // 3455 + Path path optional, + // 3327 + PCalledPartyID pCalledPartyID optional, + // 3455 + PChargingFunctionAddresses pChargingFunctionAddresses optional, + // 3455 + PChargingVector pChargingVector optional, + // 3455 + PEarlyMedia pEarlyMedia optional, + // 5009 + PMediaAuthorization pMediaAuthorization optional, + // 3313 + PPreferredID pPreferredID optional, + // 3325 + PPreferredService pPreferredService optional, + // draft-drage-sipping-service-identification-01 (July 2007) + Priority priority optional, + // only in requests + Privacy privacy optional, + // 3323 + ProxyAuthenticate proxyAuthenticate optional, + // only in responses + ProxyAuthorization proxyAuthorization optional, + // only in requests + ProxyRequire proxyRequire optional, + // only in requests + PVisitedNetworkID pVisitedNetworkID optional, + // 3455 + RAck rAck optional, + // 3262/7.1 + RSeq rSeq optional, + // 3262/7.1 + Reason reason optional, + // 3326 + RecordRoute recordRoute optional, + RecvInfo recvInfo optional, + // 6086 + RequestDisposition requestDisposition optional, + // 3841 + ReferredBy referredBy optional, + // 3892 - REFER method + ReferTo referTo optional, + // 3515 - REFER method + ReferSub referSub optional, + // 4488 - REFER method + Replaces replaces optional, + // 3891 + ReplyTo replyTo optional, + // optional in responses and INVITE requests + Require require optional, + RetryAfter retryAfter optional, + // only in responses + Route route optional, + // only in requests + SecurityClient securityClient optional, + // 3329 + SecurityServer securityServer optional, + // 3329 + SecurityVerify securityVerify optional, + // 3329 + Server server optional, + // only in responses + ServiceRoute serviceRoute optional, + // 3608 + SessionExpires sessionExpires optional, + // 4028 + SessionId sessionId optional, + SIP_ETag sipETag optional, + SIP_If_Match sipIfMatch optional, + Subject subject optional, + // only in requests + SubscriptionState subscriptionState optional, + // 3265/7.2 + Supported supported optional, + Timestamp timestamp optional, + To toField, + Unsupported unsupported optional, + // only in responses + UserToUser userToUser optional, + UserAgent userAgent optional, + Via via, + Warning warning optional, + WwwAuthenticate wwwAuthenticate optional, + ResourcePriority resourcePriority optional, + // RFC4412 + AnswerMode answerMode optional, + // RFC5373 + PrivAnswerMode privAnswerMode optional, + // RFC5373 + TargetDialog targetDialog optional, + // RFC4538 + PAnswerState pAnswerState optional, + // RFC4964 + // only in responses + UndefinedHeader_List undefinedHeader_List optional + } + + + } // end group MessageHeaderTypes + + group StartLineTypes { + // Request-Line [7.1 ] + type record RequestLine { + Method method, + SipUrl requestUri, + charstring sipVersion + } + + // Status-Line [7.2 ] + type record StatusLine { + charstring sipVersion, + integer statusCode, + charstring reasonPhrase + } + + + } // end group StartLineTypes + + + group otherTypes { + + type record SipUserProfile { + /** + * @desc integer for the userprofile identifier + */ + integer id, + /** + * @desc integer for Port number to exchange SIP messages + */ + integer currPort, + /** + * @desc charstring for IP address to exchange SIP messages + */ + charstring currIpaddr, + /** + * @desc integer for Port number to exchange SIP messages + */ + integer contactPort, + /** + * @desc charstring for IP address to exchange SIP messages + */ + charstring contactIpaddr, + /** + * @desc charstring for IP address used by the TS to exchange media streams + */ + charstring bearerIpaddr, + /** + * @desc charstring for identity of the tester local domain + */ + charstring homeDomain, + /** + * @desc charstring for identity of the tester local user + */ + charstring publUsername, + /** + * @desc charstring for RFC 2617 3.2.1 qop options: Quoted string of one or more tokens indicating the "quality of protection" values supported by the server. The value "auth" indicates authentication; the value "auth-int" indicates authentication with integrity protection. + */ + charstring qop, + /** + * @desc charstring for RFC 2617 3.2.2 username for authentication The name of user in the specified realm + */ + charstring privUsername, + /** + * @desc charstring for RFC 2617 3.2.2.2 passwd: A known shared secret, the password of user of the specified username + */ + charstring passwd, + /** + * @desc charstring for registrar domain for authentication and request line + */ + charstring registrarDomain + } + + + + } // end group otherTypes + + + } // end group Subtypes + + + + group MSGtypes { + + group RequestTypes { + // [7.1 ] + /** + * @desc generic type of a SIP request message + * @member statusLine contains a method name, a Request-URI, and the protocol version + * @member msgHeader include all possible header fields that are allowed to be present according to RFCs and other standards + * @member messageBody depends on the request method, includes e.g. SDP message. + * @member payload contains the whole message as it has been received in its text format + */ + type record Request { + RequestLine requestLine, + MessageHeader msgHeader, + MessageBody messageBody optional, + Payload payload optional + } + + // Note: the introduction of the following specific types is to enable better means for logging + // on the other side the generic type is useful for functions dealing with multiple SIP message types + type record REGISTER_Request { + RequestLine requestLine, + MessageHeader msgHeader, + MessageBody messageBody optional, + Payload payload optional + } + + type record INVITE_Request { + RequestLine requestLine, + MessageHeader msgHeader, + MessageBody messageBody optional, + Payload payload optional + } + + type record OPTIONS_Request { + RequestLine requestLine, + MessageHeader msgHeader, + MessageBody messageBody optional, + Payload payload optional + } + + type record BYE_Request { + RequestLine requestLine, + MessageHeader msgHeader, + MessageBody messageBody optional, + Payload payload optional + } + + type record CANCEL_Request { + RequestLine requestLine, + MessageHeader msgHeader, + MessageBody messageBody optional, + Payload payload optional + } + + type record ACK_Request { + RequestLine requestLine, + MessageHeader msgHeader, + MessageBody messageBody optional, + Payload payload optional + } + + // [3262/7.1 ] + type record PRACK_Request { + RequestLine requestLine, + MessageHeader msgHeader, + MessageBody messageBody optional, + Payload payload optional + } + + // [3265/7.1 ] + type record NOTIFY_Request { + RequestLine requestLine, + MessageHeader msgHeader, + MessageBody messageBody optional, + Payload payload optional + } + + // [3265/7.1 ] + type record SUBSCRIBE_Request { + RequestLine requestLine, + MessageHeader msgHeader, + MessageBody messageBody optional, + Payload payload optional + } + + // [3903/11.1 ] + type record PUBLISH_Request { + RequestLine requestLine, + MessageHeader msgHeader, + MessageBody messageBody optional, + Payload payload optional + } + + // [3311/7 ] + type record UPDATE_Request { + RequestLine requestLine, + MessageHeader msgHeader, + MessageBody messageBody optional, + Payload payload optional + } + + type record REFER_Request { + RequestLine requestLine, + MessageHeader msgHeader, + MessageBody messageBody optional, + Payload payload optional + } + + type record MESSAGE_Request { + RequestLine requestLine, + MessageHeader msgHeader, + MessageBody messageBody optional, + Payload payload optional + } + + type record INFO_Request { + RequestLine requestLine, + MessageHeader msgHeader, + MessageBody messageBody optional, + Payload payload optional + } + + type union RequestUnion { + REGISTER_Request Register, + INVITE_Request Invite, + OPTIONS_Request Options, + BYE_Request Bye, + CANCEL_Request Cancel, + ACK_Request Ack, + PRACK_Request Prack, + NOTIFY_Request Notify, + SUBSCRIBE_Request Subscribe, + PUBLISH_Request Publish, + UPDATE_Request Update, + REFER_Request Refer, + MESSAGE_Request Message, + INFO_Request Info// [2976 ] + } + + } // end group RequestTypes + + group ResponseTypes { + // [7.2 ] + /** + * @desc generic type of a SIP response message + * @member statusLine consists of the protocol version followed by a numeric Status-Code and its associated textual phrase + * @member msgHeader include all possible header fields that are allowed to be present according to RFCs and other standards + * @member messageBody depends on the response method, includes e.g. SDP message. + * @member payload contains the whole message as it has been received in its text format + */ + type record Response { + StatusLine statusLine, + MessageHeader msgHeader, + MessageBody messageBody optional, + Payload payload optional + } + + } // end group ResponseTypes + + // This MSG type is defined for sending synctactic variations, ans syntactically + // erroneous messages, and receving messages failed parsing. + group SyntacticTypes { + type charstring Raw; + + } // end group SyntacticTypes + + + // This type is defined for particular SIP message body types like SDP + } // end group MSGTypes + + } // end group Types +} +with { + encode "SIPCodec"; variant ""; +} // end module LibSip_TypesAndValues diff --git a/ttcn/patch_sip_titan/LibSip_SMSFunctions.ttcn b/ttcn/patch_sip_titan/LibSip_SMSFunctions.ttcn new file mode 100755 index 0000000000000000000000000000000000000000..7f1d2b8ca3be68b43d96eb3ac68e02939fd04f53 --- /dev/null +++ b/ttcn/patch_sip_titan/LibSip_SMSFunctions.ttcn @@ -0,0 +1,48 @@ +/** + * @author STF 435, 471 + * @version $Id$ + * @desc This module provides the functions used by the test component + * for SIP-SMS over IMS as specified in 3GPP 24-341 tests. + * This module is part of LibSipV3. + */ +module LibSip_SMSFunctions { + import from LibSip_SMSTypesAndValues all; + + function f_IA5_2oct( + charstring p_ASCII_String + ) return octetstring { + var integer i; + var integer j; + var integer v_Length := lengthof(p_ASCII_String); + var integer v_Temp; + var octetstring v_Noctets := ''O; + var bitstring v_TempBitSrc := ''B; + var bitstring v_TempBitDes := ''B; + + if ((v_Length <= 0) or (v_Length > 160) or (((v_Length * 7) mod 8) != 0)) { + log("*** " & __SCOPE__ & "INFO: Invalid value of input string length ***"); + } + + for (i := 0; i < v_Length; i := i + 1) { + v_Temp := char2int(p_ASCII_String[i]); + v_TempBitSrc := int2bit(v_Temp, 8); + + for (j := 1; j <= 7; j := j + 1) { + + v_TempBitDes := v_TempBitSrc[8 - j] & v_TempBitDes; + + if (((7 * i + j) mod 8) == 0) { + + v_Noctets := v_Noctets & bit2oct(v_TempBitDes); + v_TempBitDes := ''B; + } + } + } + + return v_Noctets; + } // f_IA5_2oct + + external function fx_GetSC_TimeStamp( + integer p_TimeZone + ) return TP_ServiceCentreTimeStamp_Type; +} // End of module LibSip_SMSFunctions \ No newline at end of file diff --git a/ttcn/patch_sip_titan/LibSip_SMSTemplates.ttcn b/ttcn/patch_sip_titan/LibSip_SMSTemplates.ttcn new file mode 100755 index 0000000000000000000000000000000000000000..ba482418bd5eca5cb888b5453833345765d9cc39 --- /dev/null +++ b/ttcn/patch_sip_titan/LibSip_SMSTemplates.ttcn @@ -0,0 +1,304 @@ +/** + * @author STF 435, STF 471 + * @version $Id$ + * @desc This module provides the types used by the test component + * for SIP-SMS over IMS as specified in 3GPP 24-341 tests. + * This module is part of LibSipV3. + */ +module LibSip_SMSTemplates { + import from LibCommon_DataStrings all; + import from LibSip_SMSTypesAndValues all; + import from LibSip_SMSFunctions all; + + group SMS_Templates_Group { + + /* Non-SMS Type Constraints */ + template(present) TypeOfNumberingPlan mw_TypeOfNumberingPlanAny := { + extBit := ?, + typeOfNumber := ?, + numberingPlanId := ? + } + + template(value) TypeOfNumberingPlan m_TypeOfNumberingPlan := { + extBit := '1'B, + typeOfNumber := '001'B, // international number + numberingPlanId := + '0001'B // ISDN/telephony numbering plan (Rec. E.164/E.163) + } + + template(present) TypeOfNumberingPlan mw_TypeOfNumberingPlan := mw_TypeOfNumberingPlanAny; + + /* End Non-SMS Type Constraints */ + template(value) RP_OriginatorAddress_dl m_RP_OriginatorAddress_dl := { + spare := omit, + iei := omit, + iel := '06'O, // 6 semi-octets + typeOfNumberingPlan := m_TypeOfNumberingPlan, + digits := '001122'O + } + + template(present) RP_OriginatorAddress_ul mw_RP_OriginatorAddress_ul := { + spare := omit, + iei := omit, + iel := '00'O + } + + template(present) RP_DestinationAddress_ul mw_RP_DestinationAddress_ul := { + spare := omit, + iei := omit, + iel := ?, + typeOfNumberingPlan := mw_TypeOfNumberingPlan, + digits := ? + } + template(omit) RP_DestinationAddress_dl m_RP_DestinationAddress_dl := { + spare := omit, + iei := omit, + iel := '00'O + } + + template(omit) RP_UserData m_RP_UserData_DELIVER( + octetstring p_Digits + ) := { + spare := omit, + iei := omit, + iel := int2oct((153 + lengthof(p_Digits)), 1), + tP_PDU := {SMS_DELIVER := m_SMS_DELIVER(p_Digits)} + } + + template(value) RP_UserData m_RP_UserData_SUBMIT_REPORT := { + spare := '0'B, + iei := c_IEI_RP_UserData, + iel := '0A'O, // the TPDU data length is 10 octets + tP_PDU := {SMS_SUBMIT_REPORT := m_SMS_SUBMIT_REPORT} + } + template(value) RP_UserData m_RP_UserData_STATUS_REPORT( + template(value) TP_MessageReference_Type p_MessageRef, + template(value) TP_Address_Type p_RecipientAddress, + template(value) TP_ServiceCentreTimeStamp_Type p_SCTP + ) modifies m_RP_UserData_SUBMIT_REPORT := { + tP_PDU := {SMS_STATUS_REPORT := m_SMS_STATUS_REPORT(p_MessageRef, p_RecipientAddress, p_SCTP)} + } + + template(present) RP_UserData mw_RP_UserData_SUBMIT := { + spare := omit, + iei := omit, + iel := ?, + tP_PDU := {SMS_SUBMIT := mw_SMS_SUBMIT_VPF_REF} + } + + template(present) RP_UserData mw_RP_UserData_DELIVER_REPORT := { + spare := '0'B, + iei := c_IEI_RP_UserData, + iel := ?, + tP_PDU := {SMS_DELIVER_REPORT := mw_SMS_DELIVER_REPORT} + } + + /* End SM-RP Type Constraints */ + /* SM-RP PDU Constraints */ + template(value) RP_DATA_dl_Type m_RP_DATA_dl_base := { + spare5 := '00000'B, + rP_MessageTypeIndicator := c_MT_RP_DATA_dl, + rP_MessageReference := '00'O, + rP_OriginatorAddress := m_RP_OriginatorAddress_dl, + rP_DestinationAddress := m_RP_DestinationAddress_dl, + rP_UserData := m_RP_UserData_DELIVER('0000'O) + } + + template(value) RP_DATA_dl_Type m_RP_DATA_dl_DELIVER( + octetstring p_Digits + ) modifies m_RP_DATA_dl_base := {rP_UserData := m_RP_UserData_DELIVER(p_Digits)} + + template(value) RP_DATA_dl_Type m_RP_DATA_dl_STATUS_REPORT( + template(value) TP_MessageReference_Type p_MessageRef, + template(value) TP_Address_Type p_RecipientAddress, + template(value) TP_ServiceCentreTimeStamp_Type p_SCTP + ) modifies m_RP_DATA_dl_base := { + rP_UserData := m_RP_UserData_STATUS_REPORT(p_MessageRef, p_RecipientAddress, p_SCTP) + } + + + template(present) RP_DATA_ul_Type mw_RP_DATA_ul_SUBMIT := { + spare5 := '00000'B, + rP_MessageTypeIndicator := c_MT_RP_DATA_ul, + rP_MessageReference := ?, + rP_OriginatorAddress := mw_RP_OriginatorAddress_ul, + rP_DestinationAddress := mw_RP_DestinationAddress_ul, + rP_UserData := mw_RP_UserData_SUBMIT + } + + template(value) RP_ACK_Type m_RP_ACK_SUBMIT_REPORT( + template(value) Oct1 p_msgReference := '00'O + ) := { + spare5 := '00000'B, + rP_MessageTypeIndicator := c_MT_RP_ACK_dl, + rP_MessageReference := p_msgReference, + rP_UserData := m_RP_UserData_SUBMIT_REPORT + } + + template(present) RP_ACK_Type mw_RP_ACK_DELIVER_REPORT := { + spare5 := '00000'B, + rP_MessageTypeIndicator := c_MT_RP_ACK_ul, + rP_MessageReference := ?, + rP_UserData := mw_RP_UserData_DELIVER_REPORT + } + + /* End SM-RP PDU Constraints */ + /* SM-TP Type Constraints */ + template(value) TP_ProtocolIdentifier_Type mw_TP_ProtocolIdentifier := { + pidType := '01'B, + interworking := '0'B, + pidValue := '00000'B + } + + template(value) TP_ProtocolIdentifier_Type m_TP_ProtocolIdentifier := { + pidType := '01'B, + interworking := '0'B, + pidValue := '00000'B + } + + template(value) TP_DataCodingScheme_Type m_TP_DataCodingScheme := { + codingGroup := '0000'B, + codeValue := '0000'B + } + + template(present) TP_Address_Type mw_TP_AddressAny := { + iel := ?, + typeOfNumberingPlan := mw_TypeOfNumberingPlanAny, + digits := * + } + + template(value) TP_Address_Type m_TP_Address( + octetstring p_Digits + ) := { + iel := int2oct(2 * lengthof(p_Digits), 1), + // length is number of useful semi-octets + // as p_digits is declared as octetstring the number must be even + typeOfNumberingPlan := m_TypeOfNumberingPlan, + digits := p_Digits + } + + template(value) TP_ParameterIndicator_Type m_TP_ParameterIndicator := { + extBit1 := '0'B, + spare4 := '0000'B, + tP_UDL := '0'B, + tP_DCS := '0'B, + tP_PID := '1'B + } + + /* End SM-TP Type Constraints */ + /* SM-TP PDU Constraints */ + template(value) SMS_DELIVER_Type m_SMS_DELIVER( + octetstring p_Digits + ) := { + tP_ReplyPath := '0'B, + tP_UserDataHeaderIndicator := '0'B, + tP_StatusReportIndication := '1'B, + spare2 := '00'B, + tP_MoreMessagesToSend := '0'B, + tP_MessageTypeIndicator := c_MT_SMS_DELIVER, + tP_OriginatingAddress := m_TP_Address(p_Digits), + tP_ProtocolIdentifier := m_TP_ProtocolIdentifier, + tP_DataCodingScheme_Type := m_TP_DataCodingScheme, + tP_ServiceCentreTimeStamp := fx_GetSC_TimeStamp(0), // Time Zone 0 assumed + tP_UserDataLength := int2oct(160, 1), + tP_UserData := f_IA5_2oct(c_Fox) + } + + template(present) SMS_DELIVER_REPORT_Type mw_SMS_DELIVER_REPORT := { + spare1 := '0'B, + tP_UserDataHeaderIndicator := '0'B, + spare4 := '0000'B, + tP_MessageTypeIndicator := c_MT_SMS_DELIVER_REPORT, + tP_FailureCause := omit, + tP_ParameterIndicator := ?, + tP_ProtocolIdentifier := mw_TP_ProtocolIdentifier, + tP_DataCodingScheme_Type := *, + tP_UserDataLength := *, + tP_UserData := * + } + + template(present) SMS_SUBMIT_Type mw_SMS_SUBMIT := { + tP_ReplyPath := '0'B, + tP_UserDataHeaderIndicator := '0'B, + tP_StatusReportRequest := '1'B, + tP_ValidityPeriodFormat := '??'B, + tP_RejectDuplicates := '0'B, + tP_MessageTypeIndicator := c_MT_SMS_SUBMIT, + tP_MessageReference := ?, + tP_DestinationAddress := mw_TP_AddressAny, + tP_ProtocolIdentifier := mw_TP_ProtocolIdentifier, + tP_DataCodingScheme_Type := ?, + tP_ValidityPeriod := *, + tP_UserDataLength := int2oct(160, 1), + tP_UserData := + ? // any data will do: 140 octets + } + + template(present) SMS_SUBMIT_Type mw_SMS_SUBMIT_VPF_NP modifies mw_SMS_SUBMIT := { + tP_ValidityPeriodFormat := '00'B, + tP_ValidityPeriod := omit + } + + template(present) SMS_SUBMIT_Type mw_SMS_SUBMIT_VPF_REF modifies mw_SMS_SUBMIT := { + tP_ValidityPeriodFormat := '10'B, + tP_ValidityPeriod := ? + } + + template(present) SMS_SUBMIT_Type mw_SMS_SUBMIT_VPF_ENH modifies mw_SMS_SUBMIT := { + tP_ValidityPeriodFormat := '01'B, + tP_ValidityPeriod := ? + } + + template(present) SMS_SUBMIT_Type mw_SMS_SUBMIT_VPF_ABS modifies mw_SMS_SUBMIT := { + tP_ValidityPeriodFormat := '11'B, + tP_ValidityPeriod := ? + } + + template(value) SMS_SUBMIT_REPORT_Type m_SMS_SUBMIT_REPORT := { + spare1 := '0'B, + tP_UserDataHeaderIndicator := '0'B, + spare4 := '0000'B, + tP_MessageTypeIndicator := c_MT_SMS_SUBMIT_REPORT, + tP_FailureCause := omit, + tP_ParameterIndicator := m_TP_ParameterIndicator, + tP_ServiceCentreTimeStamp := fx_GetSC_TimeStamp(0), // Time Zone 0 assumed + tP_ProtocolIdentifier := m_TP_ProtocolIdentifier, + tP_DataCodingScheme_Type := omit, + tP_UserDataLength := omit, + tP_UserData := omit + } + + template(value) SMS_STATUS_REPORT_Type m_SMS_STATUS_REPORT( + template(value) TP_MessageReference_Type p_MessageRef, + template(value) TP_Address_Type p_RA, + template(value) TP_ServiceCentreTimeStamp_Type p_SCTP + ) := { + // TS 34.229-1 clause A.7.5 + spare1 := '0'B, + tP_UserDataHeaderIndicator := '0'B, + tP_StatusReportQualifier := '0'B, + spare2 := '00'B, + tP_MoreMessagesToSend := '0'B, + tP_MessageTypeIndicator := c_MT_SMS_STATUS_REPORT, + tP_MessageReference := p_MessageRef, + tP_RecipientAddress := p_RA, + tP_ServiceCentreTimeStamp := p_SCTP, + tP_DischargeTime := '00000000000000'H, + tP_Status := { + reserved := '0'B, + status := '0000000'B + }, + tP_ParameterIndicator := m_TP_ParameterIndicator, + tP_ProtocolIdentifier := m_TP_ProtocolIdentifier, + tP_DataCodingScheme_Type := omit, + tP_UserDataLength := omit, + tP_UserData := omit + } + + + + + + /* End SM-TP PDU Constraints */ + } // group SMS_Templates_Group +} // End of module LibSip_SMSTypesAndValues diff --git a/ttcn/patch_sip_titan/LibSip_SMSTypesAndValues.ttcn b/ttcn/patch_sip_titan/LibSip_SMSTypesAndValues.ttcn new file mode 100755 index 0000000000000000000000000000000000000000..71ddf4ce3a113d02017f0f411f71c442327462aa --- /dev/null +++ b/ttcn/patch_sip_titan/LibSip_SMSTypesAndValues.ttcn @@ -0,0 +1,485 @@ +/****************************************************************************** + * @author STF 435, STF471 + * @version $Id$ + * @desc This module contains the type definitions for SMS messages as specified in + * 3GPP 24-011 and 3GPP 23-040 Rel 8 and 9. + * SMS over IMS is specified in 3GPP 24-341. + * This module is part of LibSipV3. + */ +module LibSip_SMSTypesAndValues { + import from LibCommon_DataStrings all; + + group SMS_Declarations { + + const RP_MessageTypeIndicator_Type c_MT_RP_DATA_ul := '000'B; + /* RP_DATA_ul */ + const RP_MessageTypeIndicator_Type c_MT_RP_DATA_dl := '001'B; + /* RP_DATA_dl */ + const RP_MessageTypeIndicator_Type c_MT_RP_ACK_ul := '010'B; + /* RP_ACK_ul */ + const RP_MessageTypeIndicator_Type c_MT_RP_ACK_dl := '011'B; + /* RP_ACK_dl */ + const RP_MessageTypeIndicator_Type c_MT_RP_ERROR_ul := '100'B; + /* RP_ERROR_ul */ + const RP_MessageTypeIndicator_Type c_MT_RP_ERROR_dl := '101'B; + /* RP_ERROR_dl */ + const RP_MessageTypeIndicator_Type c_MT_RP_SMMA := '110'B; + /* RP_SMMA */ + const TP_MessageTypeIndicator_Type c_MT_SMS_DELIVER := '00'B; + /* SMS DELIVER */ + const TP_MessageTypeIndicator_Type c_MT_SMS_DELIVER_REPORT := '00'B; + /* SMS DELIVER REPORT */ + const TP_MessageTypeIndicator_Type c_MT_SMS_STATUS_REPORT := '10'B; + /* SMS STATUS REPORT */ + const TP_MessageTypeIndicator_Type c_MT_SMS_COMMAND := '10'B; + /* SMS COMMAND */ + const TP_MessageTypeIndicator_Type c_MT_SMS_SUBMIT := '01'B; + /* SMS SUBMIT, SMS SUBMIT REPORT */ + const TP_MessageTypeIndicator_Type c_MT_SMS_SUBMIT_REPORT := '01'B; + /* SMS SUBMIT, SMS SUBMIT REPORT */ + const Bit7 c_IEI_RP_UserData := '1000001'B; + /* 24.011 cl. 8.2.5.3 */ + const charstring c_Fox := "The quick brown fox jumps over the lazy dog's back. Kaufen Sie Ihrer Frau vier bequeme Pelze. - 0123456789 - THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG'S BACK."; + + + + type record TypeOfNumberingPlan { + /* 24.008 cl. 10.5.4.7, 10.5.4.9, 10.5.4.13 */ + Bit1 extBit, + /* Extension Bit */ + Bit3 typeOfNumber, + /* Type Of Number */ + Bit4 numberingPlanId /* Numbering Plan Identification */ + } + /* SM-RP Type Declarations */ + type Bit3 RP_MessageTypeIndicator_Type; + /* 24.011 cl. 8.2.2 */ + type Oct1 RP_MessageReference_Type; + /* 24.011 cl. 8.2.3 */ + type record RP_OriginatorAddress_dl { + /* 24.011 cl. 8.2.5.1 */ + Bit1 spare optional, + /* 0 */ + Bit7 iei optional, + /* 0101 1110 */ + Oct1 iel, + /* min value 2 and max value is 11 */ + TypeOfNumberingPlan typeOfNumberingPlan, + /* */ + octetstring digits length(1 .. 10) + } + + type record RP_OriginatorAddress_ul { + /* 24.011 cl. 8.2.5.1 */ + Bit1 spare optional, + /* 0 */ + Bit7 iei optional, + /* 0101 1110 */ + Oct1 iel /* 0 */ + } + + type record RP_DestinationAddress_ul { + /* 24.011 cl. 8.2.5.2 */ + Bit1 spare optional, + /* 0 */ + Bit7 iei optional, + /* 0101 1110 */ + Oct1 iel, + /* min value 2 and max value is 11 */ + TypeOfNumberingPlan typeOfNumberingPlan, + /* */ + octetstring digits length(1 .. 10) + } + type record RP_DestinationAddress_dl { + /* 24.011 cl. 8.2.5.2 */ + Bit1 spare optional, + /* 0 */ + Bit7 iei optional, + /* 0101 1110 */ + Oct1 iel /* 0 */ + } + + type record RP_UserData { + /* 24.011 cl. 8.2.5.3 */ + Bit1 spare optional, + /* 0, present in case of TLV; omit in case of LV */ + Bit7 iei optional, + /* 1000001, present in case of TLV; omit in case of LV */ + Oct1 iel, + /* */ + TP_PDU_Type tP_PDU /* <= 232 octets */ + } + + type record RP_Cause { + /* 24.011 cl. 8.2.5.4 */ + Bit1 spare optional, + /* present in case of TLV; omit in case of LV */ + Bit7 iei optional, + /* present in case of TLV; omit in case of LV */ + Oct1 iel, + /* 2 or 3 */ + Bit1 extBit1, + /* 0 */ + Bit7 causeValue1, + /* Table 8.4/3GPP TS 24.011 */ + Bit1 extBit2, + /* 0 */ + Bit7 causeValue2, + /* Table 8.4/3GPP TS 24.011 */ + Oct1 diagnostic optional /* Parameters included in the return error from MAP */ + } + + /* End SM-RP Type Declarations */ + /* SM-RP PDU Declarations */ + type record RP_DATA_dl_Type { + /* 24.011 cl. 7.3.1.1 + Direction: n -> ue */ + Bit5 spare5, + /* cl. 8.2.2 M V 5 bits */ + RP_MessageTypeIndicator_Type rP_MessageTypeIndicator, + /* cl. 8.2.2 M V 3 bits */ + RP_MessageReference_Type rP_MessageReference, + /* cl. 8.2.3 M LV 1 */ + RP_OriginatorAddress_dl rP_OriginatorAddress, + /* cl. 8.2.5.1 M LV 1-12 octets */ + RP_DestinationAddress_dl rP_DestinationAddress, + /* cl. 8.2.5.2 M LV 1 */ + RP_UserData rP_UserData /* cl. 8.2.5.3 M LV <= 233 octets */ + } + + type record RP_DATA_ul_Type { + /* 24.011 cl. 7.3.1.2 + Direction: ue -> n */ + Bit5 spare5, + /* cl. 8.2.2 M V 5 bits */ + RP_MessageTypeIndicator_Type rP_MessageTypeIndicator, + /* cl. 8.2.2 M V 3 bits */ + RP_MessageReference_Type rP_MessageReference, + /* cl. 8.2.3 M LV 1 */ + RP_OriginatorAddress_ul rP_OriginatorAddress, + /* cl. 8.2.5.1 M LV 1 */ + RP_DestinationAddress_ul rP_DestinationAddress, + /* cl. 8.2.5.2 M LV 1 */ + RP_UserData rP_UserData /* cl. 8.2.5.3 M LV <= 233 octets */ + } + + type record RP_SMMA_Type { + /* 24.011 cl. 7.3.2 + Direction: ue -> n */ + Bit5 spare5, + /* cl. 8.2.2 M V 5 bits */ + RP_MessageTypeIndicator_Type rP_MessageTypeIndicator, + /* cl. 8.2.2 M V 3 bits */ + RP_MessageReference_Type rP_MessageReference /* cl. 8.2.3 M LV 1 */ + } + + type record RP_ACK_Type { + /* 24.011 cl. 7.3.3 + Direction: ue <-> n */ + Bit5 spare5, + /* cl. 8.2.2 M V 5 bits */ + RP_MessageTypeIndicator_Type rP_MessageTypeIndicator, + /* cl. 8.2.2 M V 3 bits */ + RP_MessageReference_Type rP_MessageReference, + /* cl. 8.2.3 M LV 1 */ + RP_UserData rP_UserData optional /* cl. 8.2.5.3 O TLV <= 234 octets */ + } + + type record RP_ERROR_Type { + /* 24.011 cl. 7.3.4 + Direction: ue <-> n */ + Bit5 spare5, + /* cl. 8.2.2 M V 5 bits */ + RP_MessageTypeIndicator_Type rP_MessageTypeIndicator, + /* cl. 8.2.2 M V 3 bits */ + RP_MessageReference_Type rP_MessageReference, + /* cl. 8.2.3 M LV 1 */ + RP_Cause rP_Cause, + /* cl. 8.2.5.4 M LV 2-3 */ + RP_UserData rP_UserData optional /* cl. 8.2.5.3 O TLV <= 234 octets */ + } + + type union RP_PDU_Type { + RP_DATA_dl_Type RP_DATA_dl, + RP_DATA_ul_Type RP_DATA_ul, + RP_SMMA_Type RP_SMMA, + RP_ACK_Type RP_ACK, + RP_ERROR_Type RP_ERROR + } + + /* End SM-RP PDU Declarations */ + /* SM-TP Type Declarations */ + type record TP_Address_Type { + /* 23.040 cl. 9.1.2.5 */ + Oct1 iel, + /* min value 2 and max value is 11 */ + TypeOfNumberingPlan typeOfNumberingPlan, + octetstring digits length(0 .. 10) optional + } + + type Bit2 TP_MessageTypeIndicator_Type; + /* 23.040 cl. 9.2.3.1 */ + type Oct1 TP_MessageReference_Type; + /* 23.040 cl. 9.2.3.6 */ + type Oct1 TP_UserDataLength_Type; + /* 23.040 cl. 9.2.3.16 */ + type record TP_ProtocolIdentifier_Type { + /* 23.040 cl. 9.2.3.9 */ + Bit2 pidType, + /* */ + Bit1 interworking, + /* */ + Bit5 pidValue /* */ + } + + type record TP_DataCodingScheme_Type { + /* 23.040 cl. 9.2.3.10 + 23.040 cl. 4 */ + Bit4 codingGroup, + /* */ + Bit4 codeValue /* */ + } + + type hexstring TP_ServiceCentreTimeStamp_Type length(14); + /* 23.040 cl. 9.2.3.11 */ + type Oct1 TP_ValidityPeriodRelative_Type; + /* 23.040 cl. 9.2.3.12.1 */ + type hexstring TP_ValidityPeriodAbsolute_Type length(14); + /* 23.040 cl. 9.2.3.12.2 */ + type record TP_ValidityPeriodEnhanced_Type { + /* 23.040 cl. 9.2.3.12.3 */ + Bit1 extBit, + /* */ + Bit1 singleShot, + /* */ + Bit3 spare3, + /* */ + Bit3 validityPeriodFormat, + /* */ + Oct6 validityPeriod /* */ + } + + type union TP_ValidityPeriod_Type { + /* 23.040 cl. 9.2.3.3 */ + TP_ValidityPeriodRelative_Type TP_ValidityPeriodRelative, + /* Relative format */ + TP_ValidityPeriodAbsolute_Type TP_ValidityPeriodAbsolute, + /* Absolute format */ + TP_ValidityPeriodEnhanced_Type TP_ValidityPeriodEnhanced /* Enhanced format */ + } + + type record TP_Status_Type { + /* 23.040 cl. 9.2.3.15 */ + Bit1 reserved, + /* */ + Bit7 status /* */ + } + + type Bit8 TP_Command_Type; + /* 23.040 cl. 9.2.3.19 */ + type record TP_ParameterIndicator_Type { + /* 23.040 cl. 9.2.3.27 */ + Bit1 extBit1, + /* */ + Bit4 spare4, + /* */ + Bit1 tP_UDL, + /* */ + Bit1 tP_DCS, + /* */ + Bit1 tP_PID /* */ + } + + /* End SM-TP Type Declarations */ + /* SM-TP PDU Declarations */ + type record SMS_DELIVER_Type { + /* 23.040 cl. 9.2.2.1 + Direction: n -> ue */ + Bit1 tP_ReplyPath, + /* 23.040 cl. 9.2.3.17 */ + Bit1 tP_UserDataHeaderIndicator, + /* 23.040 cl. 9.2.3.23 */ + Bit1 tP_StatusReportIndication, + /* 23.040 cl. 9.2.3.4 */ + Bit2 spare2, + /* */ + Bit1 tP_MoreMessagesToSend, + /* 23.040 cl. 9.2.3.2 */ + TP_MessageTypeIndicator_Type tP_MessageTypeIndicator, + /* 23.040 cl. 9.2.3.1 */ + TP_Address_Type tP_OriginatingAddress, + /* 23.040 cl. 9.1.2.5 */ + TP_ProtocolIdentifier_Type tP_ProtocolIdentifier, + /* 23.040 cl. 9.2.3.9 */ + TP_DataCodingScheme_Type tP_DataCodingScheme_Type, + /* 23.040 cl. 9.2.3.10 */ + TP_ServiceCentreTimeStamp_Type tP_ServiceCentreTimeStamp, + /* 23.040 cl. 9.2.3.11 */ + TP_UserDataLength_Type tP_UserDataLength, + /* 23.040 cl. 9.2.3.16, derived from SUBMIT */ + octetstring tP_UserData length(0 .. 140) optional /* 23.040 cl. 9.2.3.24, derived from SUBMIT */ + } + + type record SMS_DELIVER_REPORT_Type { + /* 23.040 cl. 9.2.2.1a + Direction: ue -> n */ + Bit1 spare1, + /* */ + Bit1 tP_UserDataHeaderIndicator, + /* 23.040 cl. 9.2.3.23 */ + Bit4 spare4, + /* */ + TP_MessageTypeIndicator_Type tP_MessageTypeIndicator, + /* 23.040 cl. 9.2.3.1 */ + Oct1 tP_FailureCause optional, + /* 23.040 cl. 9.2.3.22, provided if RP_ERROR, not if RP_ACK */ + TP_ParameterIndicator_Type tP_ParameterIndicator, + /* 23.040 cl. 9.2.3.27 */ + TP_ProtocolIdentifier_Type tP_ProtocolIdentifier optional, + /* 23.040 cl. 9.2.3.9 */ + TP_DataCodingScheme_Type tP_DataCodingScheme_Type optional, + /* 23.040 cl. 9.2.3.10 */ + TP_UserDataLength_Type tP_UserDataLength optional, + /* 23.040 cl. 9.2.3.16 */ + octetstring tP_UserData length(0 .. 159) optional /* 23.040 cl. 9.2.3.24 */ + } + + type record SMS_SUBMIT_Type { + /* 23.040 cl. 9.2.2.2 + Direction: ue -> n */ + Bit1 tP_ReplyPath, + /* 23.040 cl. 9.2.3.17 */ + Bit1 tP_UserDataHeaderIndicator, + /* 23.040 cl. 9.2.3.23 */ + Bit1 tP_StatusReportRequest, + /* 23.040 cl. 9.2.3.5 */ + Bit2 tP_ValidityPeriodFormat, + /* 23.040 cl. 9.2.3.3 */ + Bit1 tP_RejectDuplicates, + /* 23.040 cl. 9.2.3.25 */ + TP_MessageTypeIndicator_Type tP_MessageTypeIndicator, + /* 23.040 cl. 9.2.3.1 */ + TP_MessageReference_Type tP_MessageReference, + /* 23.040 cl. 9.2.3.6 */ + TP_Address_Type tP_DestinationAddress, + /* 23.040 cl. 9.1.2.5 */ + TP_ProtocolIdentifier_Type tP_ProtocolIdentifier, + /* 23.040 cl. 9.2.3.9 */ + TP_DataCodingScheme_Type tP_DataCodingScheme_Type, + /* 23.040 cl. 9.2.3.10 */ + // one of the subsequent ValidityPeriod solutions has be removed + TP_ValidityPeriod_Type tP_ValidityPeriod optional, + /* 23.040 cl. 9.2.3.12 */ + // TP_ValidityPeriodRelative_Type tP_ValidityPeriodRelative optional, /* 23.040 cl. 9.2.3.12.1 */ + // TP_ValidityPeriodAbsolute_Type tP_ValidityPeriodAbsolute optional, /* 23.040 cl. 9.2.3.12.2 */ + // TP_ValidityPeriodEnhanced_Type tP_ValidityPeriodEnhanced optional, /* 23.040 cl. 9.2.3.12.3 */ + TP_UserDataLength_Type tP_UserDataLength, + /* 23.040 cl. 9.2.3.16 */ + octetstring tP_UserData length(0 .. 140) optional /* 23.040 cl. 9.2.3.24 */ + } + type record SMS_SUBMIT_REPORT_Type { + /* 23.040 cl. 9.2.2.2a + Direction: n -> ue */ + Bit1 spare1, + /* */ + Bit1 tP_UserDataHeaderIndicator, + /* 23.040 cl. 9.2.3.23 */ + Bit4 spare4, + /* */ + TP_MessageTypeIndicator_Type tP_MessageTypeIndicator, + /* 23.040 cl. 9.2.3.1 */ + Oct1 tP_FailureCause optional, + /* 23.040 cl. 9.2.3.22, provided if RP_ERROR, not if RP_ACK */ + TP_ParameterIndicator_Type tP_ParameterIndicator, + /* 23.040 cl. 9.2.3.27 */ + TP_ServiceCentreTimeStamp_Type tP_ServiceCentreTimeStamp, + /* 23.040 cl. 9.2.3.11 */ + TP_ProtocolIdentifier_Type tP_ProtocolIdentifier optional, + /* 23.040 cl. 9.2.3.9 */ + TP_DataCodingScheme_Type tP_DataCodingScheme_Type optional, + /* 23.040 cl. 9.2.3.10 */ + TP_UserDataLength_Type tP_UserDataLength optional, + /* 23.040 cl. 9.2.3.16 */ + octetstring tP_UserData length(0 .. 152) optional /* 23.040 cl. 9.2.3.24 */ + } + + type record SMS_STATUS_REPORT_Type { + /* 23.040 cl. 9.2.2.3 + Direction: n -> ue */ + Bit1 spare1, + /* */ + Bit1 tP_UserDataHeaderIndicator, + /* 23.040 cl. 9.2.3.23 */ + Bit1 tP_StatusReportQualifier, + /* 23.040 cl. 9.2.3.26 */ + Bit2 spare2, + /* */ + Bit1 tP_MoreMessagesToSend, + /* 23.040 cl. 9.2.3.2 */ + TP_MessageTypeIndicator_Type tP_MessageTypeIndicator, + /* 23.040 cl. 9.2.3.1 */ + TP_MessageReference_Type tP_MessageReference, + /* 23.040 cl. 9.2.3.6 */ + TP_Address_Type tP_RecipientAddress, + /* 23.040 cl. 9.1.2.5 */ + TP_ServiceCentreTimeStamp_Type tP_ServiceCentreTimeStamp, + /* 23.040 cl. 9.2.3.11 */ + TP_ServiceCentreTimeStamp_Type tP_DischargeTime, + /* 23.040 cl. 9.2.3.12 */ + TP_Status_Type tP_Status, + /* 23.040 cl. 9.2.3.15 */ + TP_ParameterIndicator_Type tP_ParameterIndicator optional, + /* 23.040 cl. 9.2.3.27 */ + TP_ProtocolIdentifier_Type tP_ProtocolIdentifier optional, + /* 23.040 cl. 9.2.3.9 */ + TP_DataCodingScheme_Type tP_DataCodingScheme_Type optional, + /* 23.040 cl. 9.2.3.10 */ + TP_UserDataLength_Type tP_UserDataLength optional, + /* 23.040 cl. 9.2.3.16 */ + octetstring tP_UserData length(0 .. 143) optional /* 23.040 cl. 9.2.3.24 */ + } + + type record SMS_COMMAND_Type { + /* 23.040 cl. 9.2.2.4 + Direction: ue -> n */ + Bit1 spare1, + /* */ + Bit1 tP_UserDataHeaderIndicator, + /* 23.040 cl. 9.2.3.23 */ + Bit1 tP_StatRptReq, + /* Table 8.4/3GPP TS 24.011 */ + Bit3 spare3, + /* */ + TP_MessageTypeIndicator_Type tP_MessageTypeIndicator, + /* 23.040 cl. 9.2.3.1 */ + TP_MessageReference_Type tP_MessageReference, + /* 23.040 cl. 9.2.3.6 */ + TP_ProtocolIdentifier_Type tP_ProtocolIdentifier, + /* 23.040 cl. 9.2.3.9 */ + TP_Command_Type tP_CommandType, + /* 23.040 cl. 9.2.3.19 */ + TP_MessageReference_Type tP_MessageNumber, + /* 23.040 cl. 9.2.3.18 */ + TP_Address_Type tP_DestinationAddress, + /* 23.040 cl. 9.1.2.5 */ + TP_UserDataLength_Type tP_CommandDataLength, + /* 23.040 cl. 9.2.3.20 (number of octets) */ + octetstring tP_CommandData length(0 .. 156) optional /* 23.040 cl. 9.2.3.21 */ + } + + type union TP_PDU_Type { + SMS_DELIVER_Type SMS_DELIVER, + SMS_DELIVER_REPORT_Type SMS_DELIVER_REPORT, + SMS_SUBMIT_Type SMS_SUBMIT, + SMS_SUBMIT_REPORT_Type SMS_SUBMIT_REPORT, + SMS_STATUS_REPORT_Type SMS_STATUS_REPORT, + SMS_COMMAND_Type SMS_COMMAND + } + + + + /* End SM-TP PDU Declarations */ + } + with { + encode "SMSTypes"; + } // group SMS_Declarations +} // End of module LibSip_SMSTypesAndValues diff --git a/ttcn/patch_sip_titan/LibSip_SimpleMsgSummaryTypes.ttcn b/ttcn/patch_sip_titan/LibSip_SimpleMsgSummaryTypes.ttcn new file mode 100755 index 0000000000000000000000000000000000000000..a4ecf1dd81bd5b7005977e415b48d638a4083d0e --- /dev/null +++ b/ttcn/patch_sip_titan/LibSip_SimpleMsgSummaryTypes.ttcn @@ -0,0 +1,61 @@ +/** + * @author STF 406, 471 + * @version $Id: LibSip_SimpleMsgSummaryTypes.ttcn 488 2010-11-08 10:17:19Z pintar $ + * @desc This module provides the SMS type system for SIP tests. + * This module is part of LibSipV3. +*/ +module LibSip_SimpleMsgSummaryTypes { + // RFC 3842 + group SMSConstants { + + // IMS ETSI name MWI application + const charstring c_imsEtsiMwiApplication := "application/simple-message-summary"; + + // msg_status line := "Message-Waiting" + const charstring c_messageWaiting := "Message-Waiting"; + + // msg_status line := "Message-Account" + const charstring c_messageAccount := "Message-Account"; + + // msg_summary line := "Voice-Message" + const charstring c_voiceMessage := "Voice-Message"; + + } + + group SMSTypes { + type record SimpleMsgSummary { + // Simple_message_summary + Msg_status_line msg_status_line, + Msg_account msg_account optional, + Msg_summary_line_list msg_summary_line_list optional, + Opt_msg_headers opt_msg_headers optional + } + + type record Msg_status_line { + charstring msg_type, + charstring msg_status + } + + type record Msg_account { + charstring msg_type_account, + charstring account_URI + } + + type set of Msg_summary_line Msg_summary_line_list; + + type record Msg_summary_line { + charstring msg_context_class, + charstring msgs, + charstring urgent_msgs optional + } + + type set of charstring Opt_msg_headers; + + + // type integer msgcount length(1); //msgs and urgent_msgs can be dividet into subtypes + } +} +with { + variant "" + encode "SIPCodec" +} \ No newline at end of file diff --git a/ttcn/patch_sip_titan/LibSip_Steps.ttcn b/ttcn/patch_sip_titan/LibSip_Steps.ttcn new file mode 100755 index 0000000000000000000000000000000000000000..9fbc7bda55ca43f569c86017d47c23d9b7eabe41 --- /dev/null +++ b/ttcn/patch_sip_titan/LibSip_Steps.ttcn @@ -0,0 +1,4925 @@ +/** + * @author STF 346, STF366, STF368, STF369, STF450, STF471 + * @version $Id: LibSip_Steps.ttcn 645 2016-12-01 13:50:32Z pintar $ + * @desc This module provides the functions, altsteps and external functions used + * for SIP-IMS tests. + * This module is part of LibSipV3. +*/ +module LibSip_Steps { + // LibCommon + import from LibCommon_Sync all; + import from LibCommon_VerdictControl all; + // LibSip + import from LibSip_SIPTypesAndValues all; + import from LibSip_SDPTypes all; + import from LibSip_Templates all; + import from LibSip_Interface all; + import from LibSip_PIXITS all; + import from LibSip_XMLTypes all; + import from LibSip_Common all; + + group externalfunctions { + + /** + * @desc External function to return random charstring + */ + external function fx_rndStr( + ) return charstring; + + /** + * @desc External function to return the equivalent string in lower case + */ + external function fx_putInLowercase( + charstring p_string + ) return charstring; + + /** + * @desc External function to get IP address. + */ + external function fx_getIpAddr( + charstring p_host_name + ) return charstring; + + /** + * @desc External function to generate a digest response. + * @reference RFC 2617 HTTP Authentication: Basic and Digest Access Authentication, and RFC 1321 The MD5 Message-Digest Algorithm + * @see RFC 2617, chapter 5 Sample implementation, for example usage, as the signature of calculateDigestResponse is according to the example given in the RFC. + */ + external function fx_calculateDigestResponse( + charstring p_nonce, + charstring p_cnonce, + charstring p_user, + charstring p_realm, + charstring p_passwd, + charstring p_alg, + charstring p_nonceCount, + charstring p_method, + charstring p_qop, + charstring p_URI, + charstring p_HEntity + ) return charstring; + + } + + group ParameterOperations { + + /** + * @desc function to generate a 32 bits random number as a charstring for tag field (used as e.g.: tag in from-header field, or branch parameter in via header) + * @return random value with at least 32 bits of randomness + */ + function f_getRndTag( + ) return charstring { + var charstring v_tag_value; + // tag_value is initialized with a random value with at least 32 bits of randomness + // 4294967296 is a 32 bits integer + v_tag_value := fx_rndStr() & fx_rndStr(); + return (v_tag_value); + } + + /** + * @desc Function to prepare credentials for request that has an empty entity body such as a REGISTER message. + * @param p_userprofile to get important parameters + * @param p_algorithm Algorthm to be used. Default: omit + * @return Credentials field + */ + function f_calculatecCredentials_empty( + in SipUserProfile p_userprofile, + in boolean p_algorithm := false + ) return Credentials { + var Credentials v_result; + + + // RFC 2617 3.2.2 username: + // The name of user in the specified realm. + var charstring v_username := p_userprofile.privUsername; + var charstring v_realm := p_userprofile.registrarDomain; + var charstring v_uri := c_sipScheme & ":" & p_userprofile.registrarDomain; + var CommaParam_List v_digestResponse := {}; + // Construct credentials for an Authorization field of a request. + v_digestResponse := f_addCommaParameter(v_digestResponse, { + id := "username", + paramValue := { quotedString := v_username } + }); + v_digestResponse := f_addCommaParameter(v_digestResponse, { + id := "realm", + paramValue := { quotedString := v_realm } + }); + v_digestResponse := f_addCommaParameter(v_digestResponse, { + id := "uri", + paramValue := { quotedString := v_uri } + }); + v_digestResponse := f_addCommaParameter(v_digestResponse, { + id := "nonce", + paramValue := { quotedString := "" } + }); // already enclosed to " characters + v_digestResponse := f_addCommaParameter(v_digestResponse, { + id := "response", + paramValue := { quotedString := "" } + }); // already enclosed to " characters + + if (p_algorithm) { + v_digestResponse := f_addCommaParameter(v_digestResponse, { + id := "algorithm", + paramValue := { tokenOrHost := PX_AUTH_ALGORITHM } + }); // already enclosed to " characters + } + v_result := {digestResponse := v_digestResponse}; + + return v_result; + } + + + /** + * @desc Function to calculate credentials for request that has an empty entity body such as a REGISTER message. + * @param p_userprofile to get important parameters + * @param p_method (can be "REGISTER", "INVITE",....) + * @param p_challenge parameter from 4xx response + * @return Credentials field + * @verdict + */ + function f_calculatecCredentials( + in SipUserProfile p_userprofile, + in charstring p_method, + in CommaParam_List p_challenge + ) return Credentials { + var Credentials v_result; + var charstring v_nonce := ""; + var charstring v_cnonce := int2str(float2int(int2float(13172657659 - 1317266) * rnd()) + 1317265); + + // RFC 2617 3.2.2 username: + // The name of user in the specified realm. + var charstring v_username := p_userprofile.privUsername; + var charstring v_realm; + + // RFC 2617 3.2.2.2 passwd: + // A known shared secret, the password of user of the specified + // username. + var charstring v_passwd := p_userprofile.passwd; + var charstring v_algorithm; + + // a new pseudo-random cnonce value is used every time + // that assumes it is only used once + const charstring cl_nonceCount := "00000001"; + var charstring v_qop := p_userprofile.qop; + var charstring v_uri := c_sipScheme & ":" & p_userprofile.registrarDomain; + + // MD5 hash of empty entity body. + const charstring cl_hEntity := "d41d8cd98f00b204e9800998ecf8427e"; + var charstring v_response; + var charstring v_opaque; + var CommaParam_List v_digestResponse := {}; + + + // extract nonce, realm, algorithm, and opaque from challenge + v_nonce := f_extractParamValueFromChallenge(p_challenge, "nonce"); + v_realm := f_extractParamValueFromChallenge(p_challenge, "realm"); + v_algorithm := f_extractParamValueFromChallenge(p_challenge, "algorithm"); + v_opaque := f_extractParamValueFromChallenge(p_challenge, "opaque"); + + // calculate a digest response for the Authorize header + v_response := fx_calculateDigestResponse(v_nonce, v_cnonce, v_username, v_realm, v_passwd, v_algorithm, cl_nonceCount, p_method, v_qop, v_uri, cl_hEntity); + + // Construct credentials for an Authorization field of a request. + v_digestResponse := f_addCommaParameter(v_digestResponse, { + id := "username", + paramValue := { quotedString := v_username } + }); + v_digestResponse := f_addCommaParameter(v_digestResponse, { + id := "realm", + paramValue := { quotedString := v_realm } + }); + v_digestResponse := f_addCommaParameter(v_digestResponse, { + id := "nonce", + paramValue := { quotedString := v_nonce } + }); + v_digestResponse := f_addCommaParameter(v_digestResponse, { + id := "uri", + paramValue := { quotedString := v_uri } + }); + v_digestResponse := f_addCommaParameter(v_digestResponse, { + id := "response", + paramValue := { quotedString := v_response } + }); + v_digestResponse := f_addCommaParameter(v_digestResponse, { + id := "algorithm", + paramValue := { tokenOrHost := "md5" } + }); // algorithm is not enclosed to " characters + v_digestResponse := f_addCommaParameter(v_digestResponse, { + id := "cnonce", + paramValue := { quotedString := v_cnonce } + }); + v_digestResponse := f_addCommaParameter(v_digestResponse, { + id := "qop", + paramValue := { tokenOrHost := v_qop } + }); // qop + v_digestResponse := f_addCommaParameter(v_digestResponse, { + id := "nc", + paramValue := { tokenOrHost := cl_nonceCount } + }); // nonceCount + if (v_opaque != "") { + v_digestResponse := f_addCommaParameter(v_digestResponse, { + id := "opaque", + paramValue := { quotedString := v_opaque } + }); // already enclosed to " characters + } + v_result := {digestResponse := v_digestResponse}; + + return v_result; + } + + /** + * @desc Function to calculate credentials for request that has an empty entity body such as a REGISTER message. NO RESPONSE value to cause an error! + * @param p_userprofile to get important parameters + * @param p_method (can be "REGISTER", "INVITE",....) + * @param p_challenge parameter from 4xx response + * @return Credentials field + * @verdict + */ + function f_calculatecCredentials_wo_response( + in SipUserProfile p_userprofile, + in charstring p_method, + in CommaParam_List p_challenge + ) return Credentials { + var Credentials v_result; + var charstring v_nonce := ""; + var charstring v_cnonce := int2str(float2int(int2float(13172657659 - 1317266) * rnd()) + 1317265); + + // RFC 2617 3.2.2 username: + // The name of user in the specified realm. + var charstring v_username := p_userprofile.privUsername; + var charstring v_realm; + + // RFC 2617 3.2.2.2 passwd: + // A known shared secret, the password of user of the specified + // username. + var charstring v_passwd := p_userprofile.passwd; + var charstring v_algorithm; + + + // a new pseudo-random cnonce value is used every time + // that assumes it is only used once + const charstring cl_nonceCount := "00000001"; + var charstring v_qop := p_userprofile.qop; + var charstring v_uri := c_sipScheme & ":" & p_userprofile.registrarDomain; + + // MD5 hash of empty entity body. + const charstring cl_hEntity := "d41d8cd98f00b204e9800998ecf8427e"; + var charstring v_response; + var charstring v_opaque; + var CommaParam_List v_digestResponse := {}; + + // extract nonce, realm, algorithm, and opaque from challenge + v_nonce := f_extractParamValueFromChallenge(p_challenge, "nonce"); + v_realm := f_extractParamValueFromChallenge(p_challenge, "realm"); + v_algorithm := f_extractParamValueFromChallenge(p_challenge, "algorithm"); + v_opaque := f_extractParamValueFromChallenge(p_challenge, "opaque"); + + // calculate a digest response for the Authorize header + v_response := fx_calculateDigestResponse(v_nonce, v_cnonce, v_username, v_realm, v_passwd, v_algorithm, cl_nonceCount, p_method, v_qop, v_uri, cl_hEntity); + + v_digestResponse := f_addCommaParameter(v_digestResponse, { + id := "username", + paramValue := { quotedString := v_username } + }); + v_digestResponse := f_addCommaParameter(v_digestResponse, { + id := "realm", + paramValue := { quotedString := v_realm } + }); + v_digestResponse := f_addCommaParameter(v_digestResponse, { + id := "nonce", + paramValue := { quotedString := v_nonce } + }); + v_digestResponse := f_addCommaParameter(v_digestResponse, { + id := "uri", + paramValue := { quotedString := v_uri } + }); + v_digestResponse := f_addCommaParameter(v_digestResponse, { + id := "algorithm", + paramValue := { tokenOrHost := "md5" } + }); // algorithm is not enclosed to " characters + v_digestResponse := f_addCommaParameter(v_digestResponse, { + id := "cnonce", + paramValue := { quotedString := v_cnonce } + }); + v_digestResponse := f_addCommaParameter(v_digestResponse, { + id := "qop", + paramValue := { tokenOrHost := v_qop } + }); // qop + v_digestResponse := f_addCommaParameter(v_digestResponse, { + id := "nc", + paramValue := { tokenOrHost := cl_nonceCount } + }); // nonceCount + if (v_opaque == "") { + v_digestResponse := f_addCommaParameter(v_digestResponse, { + id := "opaque", + paramValue := { quotedString := v_opaque } + }); // already enclosed to " characters + } + v_result := {digestResponse := v_digestResponse}; + + return v_result; + } + + /** + * @desc Function to calculate credentials for response 401 - WWW-Authorization + * @param p_qop of the peer UE (alternatively ) + * @param p_authorization parameter from 1st REGISTER request + * @return Credentials field + * @verdict + */ + function f_calculatecChallenge_forWWWAuthorizationBody( + in charstring p_qop, + in Authorization p_authorization + ) return Challenge { + var CommaParam_List v_challenge; + + if (ischosen(p_authorization.body[0].digestResponse)) { + v_challenge := p_authorization.body[0].digestResponse; + } + else { + v_challenge := p_authorization.body[0].otherResponse.authParams; + } + + return (f_calculatecChallenge_forWWWAuthorization(p_qop, v_challenge)); + } + + /** + * @desc Function to calculate credentials for response 401 - WWW-Authorization + * @param p_qop of the peer UE (alternatively ) + * @param p_challenge parameter from 1st REGISTER request + * @return Credentials field + * @verdict + */ + function f_calculatecChallenge_forWWWAuthorization( + in charstring p_qop, + in CommaParam_List p_challenge + ) return Challenge { + var Challenge v_result; + + var charstring v_realm; + + var charstring v_qop := p_qop; + + v_realm := f_extractParamValueFromChallenge(p_challenge, "realm"); + + // Construct credentials for an Authorization field of a request. + v_result := { + digestCln := { + { + id := "realm", + paramValue := { quotedString := v_realm } + }, + { + id := "nonce", + paramValue := { quotedString := "0edff6c521cc3f407f2d9e01cf6ed82b" } + }, + { + id := "algorithm", + paramValue := { tokenOrHost := PX_AUTH_ALGORITHM } + }, // algorithm is not enclosed with " characters + { + id := "ck", + paramValue := { quotedString := "00112233445566778899aabbccddeeff" } + }, + { + id := "ik", + paramValue := { quotedString := "ffeeddccbbaa99887766554433221100" } + }, // already enclosed to " characters + { + /** + * This directive is optional, but is made so only for backward compatibility with RFC 2069 + * it SHOULD be used by all implementations compliant with this version of the Digest scheme + */ + id := "qop", + paramValue := { tokenOrHost := v_qop } + } // qop + } + }; + + return v_result; + } + + /** + * @desc Function to calculate credentials for request that has an empty entity body such as a REGISTER message and at the end put different private name + * @param p_userprofile to get important parameters + * @param p_method (can be "REGISTER", "INVITE",....) + * @param p_challenge parameter from 4xx response + * @return Credentials field + * @verdict + */ + function f_calculatecCredentialsAndChangeUserName( + in SipUserProfile p_userprofile, + in charstring p_method, + in CommaParam_List p_challenge + ) return Credentials { + var Credentials v_result; + var charstring v_nonce := ""; + var charstring v_cnonce := int2str(float2int(int2float(13172657659 - 1317266) * rnd()) + 1317265); + + // RFC 2617 3.2.2 username: + // The name of user in the specified realm. + var charstring v_username := p_userprofile.privUsername; + var charstring v_realm; + + // RFC 2617 3.2.2.2 passwd: + // A known shared secret, the password of user of the specified + // username. + var charstring v_passwd := p_userprofile.passwd; + var charstring v_algorithm; + + + // a new pseudo-random cnonce value is used every time + // that assumes it is only used once + const charstring cl_nonceCount := "00000001"; + var charstring v_qop := p_userprofile.qop; + var charstring v_uri := c_sipScheme & ":" & p_userprofile.registrarDomain; + + + // MD5 hash of empty entity body. + const charstring cl_hEntity := "d41d8cd98f00b204e9800998ecf8427e"; + var charstring v_response; + var charstring v_opaque; + var CommaParam_List v_digestResponse := {}; + + + // extract nonce, realm, algorithm, and opaque from challenge + v_nonce := f_extractParamValueFromChallenge(p_challenge, "nonce"); + v_realm := f_extractParamValueFromChallenge(p_challenge, "realm"); + v_algorithm := f_extractParamValueFromChallenge(p_challenge, "algorithm"); + v_opaque := f_extractParamValueFromChallenge(p_challenge, "opaque"); + + // calculate a digest response for the Authorize header + v_response := fx_calculateDigestResponse(v_nonce, v_cnonce, v_username, v_realm, v_passwd, v_algorithm, cl_nonceCount, p_method, v_qop, v_uri, cl_hEntity); + + // Construct credentials for an Authorization field of a request. + v_digestResponse := f_addCommaParameter(v_digestResponse, { + id := "username", + paramValue := { quotedString := "DifferentToPrivateUser" } + }); + v_digestResponse := f_addCommaParameter(v_digestResponse, { + id := "realm", + paramValue := { quotedString := v_realm } + }); + v_digestResponse := f_addCommaParameter(v_digestResponse, { + id := "nonce", + paramValue := { quotedString := v_nonce } + }); + v_digestResponse := f_addCommaParameter(v_digestResponse, { + id := "uri", + paramValue := { quotedString := v_uri } + }); + v_digestResponse := f_addCommaParameter(v_digestResponse, { + id := "response", + paramValue := { quotedString := v_response } + }); + v_digestResponse := f_addCommaParameter(v_digestResponse, { + id := "algorithm", + paramValue := { tokenOrHost := "md5" } + }); // algorithm is not enclosed to " characters + v_digestResponse := f_addCommaParameter(v_digestResponse, { + id := "cnonce", + paramValue := { quotedString := v_cnonce } + }); + v_digestResponse := f_addCommaParameter(v_digestResponse, { + id := "qop", + paramValue := { tokenOrHost := v_qop } + }); // qop + v_digestResponse := f_addCommaParameter(v_digestResponse, { + id := "nc", + paramValue := { tokenOrHost := cl_nonceCount } + }); + if (v_opaque != "") { + v_digestResponse := f_addCommaParameter(v_digestResponse, { + id := "opaque", + paramValue := { quotedString := "" } + }); // already enclosed to " characters + } + v_result := {digestResponse := v_digestResponse}; + + return v_result; + } + + + /** + * @desc Function to check if param related to id from CommanParam_List exist containing challenge. + * @param p_challenge parameter from 4xx response + * @param p_id name of parameter("nonce", "realm", "ck", "ik"...) + * @return parameter p_id value + */ + function f_checkParamValueFromChallengeIfPresent( + in CommaParam_List p_challenge, + in charstring p_id + ) return boolean { + var boolean v_result := false; + var integer v_len := lengthof(p_challenge); + var charstring v_id := fx_putInLowercase(p_id); + var integer i; + + for (i := 0; i < v_len; i := i + 1) { + if (fx_putInLowercase(p_challenge[i].id) == v_id) { + v_result := true; + } + } + + return v_result; + } + + /** + * @desc Function to check if tag is present in SemicolonParam_List + * @param p_param_l SemicolonParam_List + * @return boolean true if tag is present + */ + function f_checkTagPresent( + SemicolonParam_List p_param_l + ) runs on SipComponent + return boolean { + var integer v_numberOfParams; + var integer i := 0; + + v_numberOfParams := lengthof(p_param_l); + while (i < v_numberOfParams) { + if (fx_putInLowercase(p_param_l[i].id) == c_tagId) { + return (true); + } + i := i + 1; + } + return (false); + } + + /** + * @desc Function to remove a parameter from SemicolonParam_List + * @param p_param_l SemicolonParam_List + * @return SemicolonParam_List new parameter list + */ + function f_removeParameter( + SemicolonParam_List p_param_l, + charstring p_id + ) runs on SipComponent + return SemicolonParam_List { + var integer v_numberOfParams; + var integer i := 0; + var integer j := 0; + var SemicolonParam_List v_newParamList; + + v_numberOfParams := lengthof(p_param_l); + while (i < v_numberOfParams) { + if (not fx_putInLowercase(p_param_l[i].id) == p_id) { + v_newParamList[j] := p_param_l[i]; + j := j + 1; + } + i := i + 1; + } + return v_newParamList; + } + + /** + * @desc Function to add a parameter to SemicolonParam_List + * @param p_param_l SemicolonParam_List + * @return SemicolonParam_List new parameter list + */ + function f_addParameter( + SemicolonParam_List p_param_l, + GenericParam p_genparam + ) + return SemicolonParam_List { + var SemicolonParam_List v_newParamList := p_param_l; + var integer v_numberOfParams := lengthof(p_param_l); + v_newParamList[v_numberOfParams] := p_genparam; + return v_newParamList; + } + + /** + * @desc Function to add a parameter to CommaParam_List + * @param p_param_l SemicolonParam_List + * @return SemicolonParam_List new parameter list + */ + function f_addCommaParameter( + CommaParam_List p_param_l, + GenericParam p_genparam + ) + return CommaParam_List { + var CommaParam_List v_newParamList := p_param_l; + var integer v_numberOfParams := lengthof(p_param_l); + v_newParamList[v_numberOfParams] := p_genparam; + return v_newParamList; + } + + /** + * @desc Function to extract paramValue related to id from CommanParam_List containing challenge. + * @param p_challenge parameter from 4xx response + * @param p_id name of parameter("nonce", "realm",...) + * @return parameter p_id value + */ + function f_extractParamValueFromChallenge( + in CommaParam_List p_challenge, + in charstring p_id + ) return charstring { + var charstring v_result := ""; + var integer v_len := lengthof(p_challenge); + var charstring v_id := fx_putInLowercase(p_id); + var integer i; + var charstring v_tmpchar; + + for (i := 0; i < v_len; i := i + 1) { + if (fx_putInLowercase(p_challenge[i].id) == v_id) { + if (isvalue(p_challenge[i].paramValue)) { + if(ischosen(p_challenge[i].paramValue.quotedString)) { + v_result := valueof(p_challenge[i].paramValue.quotedString); + } else { + v_result := valueof(p_challenge[i].paramValue.tokenOrHost); + } + } + } + } + + if (v_result == "") { + if (match(p_id, "algorithm")) { + v_result := "MD5"; + } + else if (match(p_id, "opaque")) { + v_result := ""; + } + else { + v_tmpchar := "Cannot acquire value from credentials."; + log("*** " & __SCOPE__ &": INFO: Cannot acquire value from credentials ***"); + setverdict(inconc); + stop; + } + } + + return v_result; + } + + /** + * @desc Return the updated component variable of via header + * @return component variable of via header + */ + function f_updateViaHeaderAS( + in Via p_via + ) runs on SipComponent + return Via { + var Via v_via; + var ViaBody_List v_viaBody_List := p_via.viaBody; + var integer v_size_via := lengthof(v_viaBody_List); + var integer v_size_via_updated := v_size_via + 1; + var ViaBody_List v_viaBody_List_updated; + var integer i; + vc_branch := c_branchCookie & f_getRndTag(); + v_viaBody_List_updated[0] := valueof(m_ViaBody_currIpaddr(vc_branch, vc_userprofile)); + // p_viaBody_List_updated[0 ] := vc_request.msgHeader.route.routeBody[0 ] ; + for (i := 1; i < v_size_via_updated; i := i + 1) { + v_viaBody_List_updated[i] := v_viaBody_List[i - 1]; + } + v_via.fieldName := p_via.fieldName; + v_via.viaBody := v_viaBody_List_updated; + return (v_via); + } + + /** + * @desc Return the updated component variable of route header + * @return component variable of route header + */ + function f_updateRouteHeaderAS( + in Route p_route + ) runs on SipComponent + return Route { + var Route v_route; + var RouteBody_List v_routeBody_List := p_route.routeBody; + var integer v_size_route := lengthof(v_routeBody_List); + var integer v_size_route_updated := v_size_route - 1; + var RouteBody_List v_routeBody_List_updated; + var integer i; + + for (i := 0; i < v_size_route_updated; i := i + 1) { + v_routeBody_List_updated[i] := v_routeBody_List[i + 1]; + } + v_route.fieldName := p_route.fieldName; + v_route.routeBody := v_routeBody_List_updated; + return (v_route); + } + + /** + * @desc Return the updated component variable of record route header + * @return component variable of record route header + */ + function f_updateRecordRouteHeaderAS( + in template(value) RecordRoute p_recordRoute + ) runs on SipComponent + return RecordRoute { + var + RecordRoute + v_recordRoute := + valueof( + m_recordRoute_currIpAddr_params( + vc_userprofile, + { + { + "lr", + omit + } + } + ) + ); + var integer v_size_recordRoute := 0; + var integer i; + + if (isvalue(p_recordRoute)) { + v_size_recordRoute := lengthof(valueof(p_recordRoute.routeBody)); + } + for (i := 1; i < v_size_recordRoute + 1; i := i + 1) { + v_recordRoute.routeBody[i] := valueof(p_recordRoute.routeBody[i - 1]); + } + + return (v_recordRoute); + } + + + + } // end group ParameterOperations + + group FieldOperations { + + /** + * @desc function adds "Tag"-parameter in "To"-headerfield + * @param p_to To header field that should get a Tag parameter + */ + function f_addTagInTo( + inout To p_to + ) runs on SipComponent { + f_addParameterTagIfNotPresent(c_tagId, { tokenOrHost := f_getRndTag() }, p_to); + } + + /** + * @desc addition of a single parameter in the via header field + * @param p_parameter_name name of parameter to be added + * @param p_parameter_value value of parameter to be added + * @param p_viaBody the via parameter to be extended + * @verdict + */ + function f_addParameterIfNotPresent( + in charstring p_parameter_name, + in GenValue p_parameter_value, + inout ViaBody p_viaBody + ) { + if (isvalue(p_viaBody.viaParams)) { + return; + } + p_viaBody.viaParams := { + { + p_parameter_name, + p_parameter_value + } + }; + } + + /** + * @desc function to addd a parameter to the "To" header field (if there is not any parameter) + * @param p_parameter_name name of the parameter to be added + * @param p_parameter_value value of the paramter to be added + * @param p_to "To" header field to be extended + * @verdict + */ + function f_addParameterTagIfNotPresent( + in charstring p_parameter_name, + in GenValue p_parameter_value, + inout To p_to + ) { + if (isvalue(p_to.toParams)) { + return; + } + p_to.toParams := { + { + p_parameter_name, + p_parameter_value + } + }; + } + + /** + * @desc function compares the IP address of two hosts + * @param p_host1 hostname + * @param p_host2 hostname + * @return boolean value that is true if the IP addresses are identical + * @verdict + */ + function f_equivalentHostAddr( + in charstring p_host1, + in charstring p_host2 + ) return boolean { + // A DNS server may be used + return (fx_getIpAddr(p_host1) == fx_getIpAddr(p_host2)); + } + + + /** + * @desc function checks if Require contains Precondition + * @param p_message (request or response) SIP message to be analysed + * @return true if p_id parameter exist + */ + function f_checkRequirePrecondition( + in Request p_message + ) { + var boolean v_precondition_found; + var integer i; + if (isvalue(p_message.msgHeader.require)) { + v_precondition_found := false; + for (i := 0; i < lengthof(p_message.msgHeader.require.optionsTags); i := i + 1) { + if (match(p_message.msgHeader.require.optionsTags[i], c_tagPrecond)) { + v_precondition_found := true; + } + } + if (not (v_precondition_found)) { + setverdict(fail); + log("*** " & __SCOPE__ & ": FAIL: precondition not found in Require options list! ***"); + } + } + else { + setverdict(fail); + log("*** " & __SCOPE__ & ": FAIL: Require options is not present! ***"); + } + } + + /** + * @desc function checks if P-Charging-Vector contains a particular parameter + * @param p_message (request or response) SIP message to be analysed + * @param p_id name of parameter + * @return true if p_id parameter exist + */ + function f_checkPChargingVectorHeaderParamId( + in Request p_message, + charstring p_id + ) return boolean { + var integer i; + + if (isvalue(p_message.msgHeader.pChargingVector)) { + for (i := 0; i < lengthof(p_message.msgHeader.pChargingVector.chargeParams); i := i + 1) { + if (p_message.msgHeader.pChargingVector.chargeParams[i].id == p_id) { + return (true); + } + } + } + return (false); + } + + /** + * @desc function checks if P-Charging-Vector contains a particular parameter + * @param p_message (request or response) SIP message to be analysed + * @param p_id name of parameter + * @return true if p_id parameter exist + */ + function f_checkPChargingVectorHeaderParamIdResponse( + in Response p_message, + charstring p_id + ) return boolean { + var integer i; + + if (isvalue(p_message.msgHeader.pChargingVector)) { + for (i := 0; i < lengthof(p_message.msgHeader.pChargingVector.chargeParams); i := i + 1) { + if (p_message.msgHeader.pChargingVector.chargeParams[i].id == p_id) { + return true; + } + } + } + return (false); + } + + /** + * @desc function returns the Host/Port of a given Contact header field + * @param p_contact contact header field to be analysed + * @return Host/Port record from the contact header field + */ + function f_getContactUri( + in ContactAddress p_contact + ) runs on SipComponent + return SipUrl { + var SipUrl v_SipUrl; + + if (ischosen(p_contact.addressField.nameAddr)) { + v_SipUrl := p_contact.addressField.nameAddr.addrSpec; + } + else { + v_SipUrl := p_contact.addressField.addrSpecUnion; + } + + return (v_SipUrl); + } // end f_getContactUri + + /** + * @desc function returns the Host/Port of a given Contact header field + * @param p_contact contact header field to be analysed + * @return Host/Port record from the contact header field + */ + function f_getContactAddr( + in ContactAddress p_contact + ) runs on SipComponent + return HostPort { + var HostPort v_locAddr; + var SipUrl v_SipUrl; + + if (ischosen(p_contact.addressField.nameAddr)) { + v_SipUrl := p_contact.addressField.nameAddr.addrSpec; + } + else { + v_SipUrl := p_contact.addressField.addrSpecUnion; + } + + v_locAddr.host := v_SipUrl.components.sip.hostPort.host; + + if (isvalue(v_SipUrl.components.sip.hostPort.portField)) { + v_locAddr.portField := v_SipUrl.components.sip.hostPort.portField; + } + else { + v_locAddr.portField := c_defaultSipPort; + } + + return (v_locAddr); + } // end f_getContactAddr + + /** + * @desc function checks if History-Info-Header of the p_message contains a particular URI + * @param p_message (request or response) SIP message to be analysed + * @param p_URI name of parameter + * @return true if p_URI parameter exist + */ + function f_checkHeaderInfoURI( + in Response p_message, + SipUrl p_URI + ) return boolean { + var integer i; + + if (isvalue(p_message.msgHeader.historyInfo)) { + for (i := 0; i < lengthof(p_message.msgHeader.historyInfo.historyInfoList); i := i + 1) { + if (p_message.msgHeader.historyInfo.historyInfoList[i].nameAddr.addrSpec == p_URI) { + return (true); + } + } + } + return (false); + } + + /** + * @desc function returns the Userinfo from a given To header field + * @param p_to To header field to be analysed + * @return Userinfo from the To header field as a charstring + */ + function f_getUserfromTo( + in To p_to + ) runs on SipComponent + return charstring { + var SipUrl v_SipUrl; + + if (ischosen(p_to.addressField.nameAddr)) { + v_SipUrl := p_to.addressField.nameAddr.addrSpec; + } + else { + v_SipUrl := p_to.addressField.addrSpecUnion; + } + + return (v_SipUrl.components.sip.userInfo.userOrTelephoneSubscriber); + } // end f_getUserfromTo + + /** + * @desc function to generate a 32 bits random number as a charstring for tag field + * @param p_cSeq_s CSeq parameter used to modify the tag field value + * @return tag value + */ + function f_getRndCallId( + ) return charstring { + var charstring v_tag_value := fx_rndStr() & fx_rndStr(); + // v_tag_value is initialized with a random value with at least 32 bits of randomness + // 4294967296 is a 32 bits integer + // v_tag_value := int2str(float2int(4294967296.0*rnd()) + loc_CSeq_s.seqNumber ); + return (v_tag_value); + } + + /** + * @desc function give access to the top element of the Path header field. + * @param p_Request SIP message to be analysed + * @return NameAddr (e.g. ) or omit + */ + function f_getPathHeaderTop( + inout Request p_Request + ) return template(omit) NameAddr { + if (isvalue(p_Request.msgHeader.path)) { + if (lengthof(p_Request.msgHeader.path.pathValues) > 0) { + return (p_Request.msgHeader.path.pathValues[0].nameAddr); + } + } + return (omit); + } + + /** + * @desc function updates first element of a Via headerfield list + * @param p_viaBody_List address list of a Via header field + * @param p_source_address address to be inserted in the top element + */ + function f_getViaReplyAddr( + inout ViaBody_List p_viaBody_List, + inout Address4SIP p_source_address + ) runs on SipComponent { + var ViaBody v_viaBody; + // The address to send message shall be updated after getting information + // in the Via header fied and according to 18.2.2 + v_viaBody := p_viaBody_List[0]; + + // received parameter has to be addded to the via hader field + // Be careful it could be an Host name and not an IP Address + // One of the reasons this error can occur is if no DNS server is available. + // As a workaround, it is possible to adapt the configuration on the local machine the test + // suite is running on (e.g. under Windows the following file could be configured: + // C:\WINDOWS\system32\drivers\etc\hosts). + // Check if host address can be rosolved + if (not f_equivalentHostAddr(valueof(v_viaBody.sentBy.host), valueof(p_source_address.host))) { + f_addParameterIfNotPresent(c_receivedId, { tokenOrHost := valueof(p_source_address.host) }, v_viaBody); + } + if (isvalue(v_viaBody.sentBy.portField)) { + p_source_address.portField := valueof(v_viaBody.sentBy.portField); + } + else { + p_source_address.portField := c_defaultSipPort; + } + } + + /** + * @desc functions give access to an element of the Route header field (record). + * @param p_message (request) SIP message to be analysed + * @param p_index index of Route record element to be retrieved + * @return HostPort value of the Route element or omit + */ + function f_getRouteHeaderElementAddressFromRequest( + in Request p_message, + in integer p_index + ) return HostPort { + if (isvalue(p_message.msgHeader.route)) { + if (lengthof(p_message.msgHeader.route.routeBody) > p_index) { + return (p_message.msgHeader.route.routeBody[p_index].nameAddr.addrSpec.components.sip.hostPort); + } + } + setverdict(fail); + return (c_hostport_dummy); + } + + /** + * @desc functions give access to an element of the Record-Route header field (record). + * @param p_message (request) SIP message to be analysed + * @param p_index index of recordRoute record element to be retrieved + * @return HostPort value of the Record-Route element or omit + */ + function f_getRecordRouteHeaderElementAddressFromRequest( + in Request p_message, + in integer p_index + ) return HostPort { + if (isvalue(p_message.msgHeader.recordRoute)) { + if (lengthof(p_message.msgHeader.recordRoute.routeBody) > p_index) { + return (p_message.msgHeader.recordRoute.routeBody[p_index].nameAddr.addrSpec.components.sip.hostPort); + } + } + setverdict(fail); + return (c_hostport_dummy); + } + + /** + * @desc functions give access to an element of the Record-Route header field (record). + * @param p_message (response) SIP message to be analysed + * @param p_index index of recordRoute record element to be retrieved + * @return HostPort value of the Record-Route element or omit + */ + function f_getRecordRouteHeaderElementAddressFromResponse( + in Response p_message, + in integer p_index + ) return HostPort { + if (isvalue(p_message.msgHeader.recordRoute)) { + if (lengthof(p_message.msgHeader.recordRoute.routeBody) > p_index) { + return (p_message.msgHeader.recordRoute.routeBody[p_index].nameAddr.addrSpec.components.sip.hostPort); + } + } + setverdict(fail); + return (c_hostport_dummy); + } + + /** + * @desc functions give access to an element of the Via header field (record). + * @param p_message (request) SIP message to be analysed + * @param p_index index of via record element to be retrieved + * @return HostPort value of the Via element or omit + */ + function f_getViaHeaderElementHostPort( + in Request p_message, + in integer p_index + ) return HostPort { + + if (lengthof(p_message.msgHeader.via.viaBody) > p_index) { + return (p_message.msgHeader.via.viaBody[p_index].sentBy); + } + setverdict(fail); + return (c_hostport_dummy); + } + + /** + * @desc functions give access to an element of the Via header field (record). + * @param p_message (response) SIP message to be analysed + * @param p_index index of via record element to be retrieved + * @return HostPort value of the Via element or omit + */ + function f_getViaHeaderElementHostPortResponse( + in Response p_message, + in integer p_index + ) return HostPort { + + if (lengthof(p_message.msgHeader.via.viaBody) > p_index) { + return (p_message.msgHeader.via.viaBody[p_index].sentBy); + } + setverdict(fail); + return (c_hostport_dummy); + } + + /** + * @desc function checks indicators if topology hiding (TH) has been applied: - second element in via-header record has tokenized-by parameter + * @param p_Request SIP message to be analysed + * @return boolean value (true indicate TH, false otherwise) + */ + function f_topologyHiding( + inout Request p_request + ) runs on SipComponent + return boolean { + var GenericParam v_viaParameter; + + if (lengthof(p_request.msgHeader.via.viaBody) <2 ) { + return (false); + } + v_viaParameter := p_request.msgHeader.via.viaBody[1].viaParams[0]; + // second element + if (not v_viaParameter.id == "tokenized-by") { + return (false); + } + return (true); + } + + /** + * @desc function checks indicators if topology hiding (TH) has been applied: - any element in via-header record has tokenized-by parameter + * @param Response SIP message to be analysed + * @return boolean value (true indicate TH, false otherwise) + */ + function f_topologyHidingResponse( + inout Response p_response + ) runs on SipComponent + return boolean { + var GenericParam v_viaParameter; + var integer i; + + for (i := 0; i < lengthof(p_response.msgHeader.via.viaBody); i := i + 1) { + + v_viaParameter := p_response.msgHeader.via.viaBody[i].viaParams[0]; // first parameter + if (not v_viaParameter.id == "tokenized-by") { + return (false); + } + } + return (true); + } + + + + group SetHeaders { + + + /** + * @desc function for setting of component variables related to message header fields (message type independent: CSeq, contact, via), function uses information from userprofile + * @param p_cSeq_s CSeq parameter + * @param p_method method name for cSeq header field + */ + function f_setHeadersGeneral( + inout CSeq p_cSeq_s, + in charstring p_method + ) runs on SipComponent { + p_cSeq_s.fieldName := CSEQ_E; + p_cSeq_s.seqNumber := p_cSeq_s.seqNumber + 1; + p_cSeq_s.method := p_method; + vc_cSeq := p_cSeq_s; + + vc_contact := valueof(m_Contact(m_SipUrl_contactIpaddr(vc_userprofile))); + vc_branch := c_branchCookie & f_getRndTag(); + vc_via := { + fieldName := VIA_E, + viaBody := {valueof(m_ViaBody_currIpaddr(vc_branch, vc_userprofile))} + }; + } // end function f_setHeadersGeneral + + + + /** + * @desc function for setting of component variables related to message header fields (message type independent: CSeq, contact, via), function uses information from userprofile + * @param p_cSeq_s CSeq parameter + * @param p_method method name for cSeq header field + */ + function f_setHeadersACK( + ) runs on SipComponent { + // vc_requestUri.hostPort := vc_reqHostPort; + if (vc_response.statusLine.statusCode >= 200 and vc_response.statusLine.statusCode <= 299) + // ref. RFC3261 8.1.1.7 Via + { + vc_branch := c_branchCookie & f_getRndTag(); + } + vc_via := { + fieldName := VIA_E, + viaBody := {valueof(m_ViaBody_currIpaddr(vc_branch, vc_userprofile))} + }; + } // end function f_setHeadersGeneral + + /** + * @desc setting of general and basic Bye header fields in additon to the addresses (To, From, ReqUri) + * @param p_cSeq_s + */ + function f_setHeadersBYE( + inout CSeq p_cSeq_s + ) runs on SipComponent { + f_setHeadersGeneral(p_cSeq_s, "BYE"); // cseq, contact, branch, via + // vc_callId := { fieldName:=CALL_ID_E, callid:=f_getRndCallId(p_cSeq_s) & c_AT & vc_userprofile.currIpaddr }; + f_addTagInTo(vc_to); + + vc_cancel_To := vc_to; + vc_caller_To := vc_to; + + vc_caller_From := vc_from; + + vc_reqHostPort := vc_requestUri.components.sip.hostPort; + } // end function f_setHeadersBYE + + /** + * @desc setting of general and basic CANCEL header fields + * @param p_cSeq_s + */ + function f_setHeadersCANCEL( + inout CSeq p_cSeq_s + ) runs on SipComponent { + + p_cSeq_s.method := "CANCEL"; + // vc_branch := c_branchCookie & f_getRndTag(); // STF 406: CANCEL and ACK should have the same branch as the INVITE + vc_via := { + fieldName := VIA_E, + viaBody := {valueof(m_ViaBody_currIpaddr(vc_branch, vc_userprofile))} + }; + } // end function f_setHeadersCANCEL + + /** + * @desc function sets header field for the next outgoing REGISTER message + * @param p_cSeq_s CSeq parameter to be applied + * @param p_emergency Set to true in case of emergency + */ + function f_setHeaders_REGISTER( + inout CSeq p_cSeq_s, + boolean p_emergency := false + ) runs on SipComponent { + var SemicolonParam_List v_params := {}; + + f_setHeadersGeneral(p_cSeq_s, "REGISTER"); // cseq, contact, branch, via + vc_requestUri := { + scheme := c_sipScheme, + components := { + sip := { + userInfo := omit, + hostPort := { + host := vc_userprofile.registrarDomain, + portField := omit + } + } + }, + urlParameters := omit, + headers := omit + }; + + vc_reqHostPort := vc_requestUri.components.sip.hostPort; + + vc_callId := { + fieldName := CALL_ID_E, + callid := f_getRndCallId() & c_AT & vc_userprofile.currIpaddr + }; + vc_callIdReg := vc_callId; // remember callId for de-registration + vc_to := valueof(m_To(m_SipUrl_currDomain(vc_userprofile))); + vc_cancel_To := vc_to; + v_params := f_addParameter(v_params, + { + id := c_tagId, + paramValue := { + tokenOrHost := f_getRndTag() + } + }); + vc_from := { + fieldName := FROM_E, + addressField := vc_to.addressField, + fromParams := v_params + }; + + if (not vc_firstREGISTER_sent) { + if (p_emergency) { + v_params := { + { + "sos", + omit + } + }; + vc_contact.contactBody.contactAddresses[0].addressField.addrSpecUnion.urlParameters := v_params; + } + else { + v_params := { + { + id := c_expiresId, + paramValue := { + tokenOrHost := c_shortRegistration + } + } + }; + vc_contact.contactBody.contactAddresses[0].contactParams := v_params; + } + } + + vc_firstREGISTER_sent := true; // f_setHeaders_Register is called in deREGISTER function + vc_authorization := { + fieldName := AUTHORIZATION_E, + body := {f_calculatecCredentials_empty(vc_userprofile)} + }; + + vc_via_REG := vc_via; + } // end function setHeaders_REGISTER + + /** + * @desc function sets via, cseq and authorization header for the next outgoing (protected) REGISTER + * @verdict + */ + function f_setHeaders_2ndREGISTER( + inout CSeq p_cSeq_s + ) runs on SipComponent { + var CommaParam_List v_challenge; + + // Increment CSeq sequence number + p_cSeq_s.seqNumber := p_cSeq_s.seqNumber + 1; + vc_cSeq := p_cSeq_s; + + vc_requestUri := { + scheme := c_sipScheme, + components := { + sip := { + userInfo := omit, + hostPort := { + host := vc_userprofile.registrarDomain, + portField := omit + } + } + }, + urlParameters := omit, + headers := omit + }; + + // new branch tag due to different branch tag in new REGISTER method + vc_branch := c_branchCookie & f_getRndTag(); + + vc_via_REG := { + fieldName := VIA_E, + viaBody := {valueof(m_ViaBody_currIpaddr(vc_branch, vc_userprofile))} + }; + + // Extract challenge and calculate credentials for a response. + v_challenge := vc_response.msgHeader.wwwAuthenticate.challenge.digestCln; + + + // Prepair right answer + vc_authorization := { + fieldName := AUTHORIZATION_E, + body := {f_calculatecCredentials(vc_userprofile, "REGISTER", v_challenge)} + }; + } // end function f_setHeaders_2ndREGISTER + + /** + * @desc function sets via, cseq and authorization header for the next outgoing (protected) REGISTER NO response in Authorization header to cause an error + * @verdict + */ + function f_setHeaders_2ndREGISTER_wo_response( + ) runs on SipComponent { + var CommaParam_List v_challenge; + + vc_branch := c_branchCookie & f_getRndTag(); + + vc_via_REG := { + fieldName := VIA_E, + viaBody := {valueof(m_ViaBody_currIpaddr(vc_branch, vc_userprofile))} + }; + + if (ischosen(vc_response.msgHeader.wwwAuthenticate.challenge.otherChallenge)) + // Extract challenge and calculate credentials for a response. + { + v_challenge := vc_response.msgHeader.wwwAuthenticate.challenge.otherChallenge.authParams; + } + else { + v_challenge := vc_response.msgHeader.wwwAuthenticate.challenge.digestCln; + } + + // Increment CSeq sequence number + vc_cSeq.seqNumber := vc_cSeq.seqNumber + 1; + + // Prepair right answer + vc_authorization := { + fieldName := AUTHORIZATION_E, + body := {f_calculatecCredentials_wo_response(vc_userprofile, "REGISTER", v_challenge)} + }; + } // end function f_setHeaders_2ndREGISTER_wo_response + + /** + * @desc function sets via, cseq and authorization header with different private name for the next outgoing (protected) REGISTER + * @verdict + */ + function f_setHeaders_2ndREGISTER_authorizationWithDifferentUserName( + ) runs on SipComponent { + var CommaParam_List v_challenge; + + vc_branch := c_branchCookie & f_getRndTag(); + + vc_requestUri := { + scheme := c_sipScheme, + components := { + sip := { + userInfo := omit, + hostPort := { + host := vc_userprofile.registrarDomain, + portField := omit + } + } + }, + urlParameters := omit, + headers := omit + }; + + vc_via_REG := { + fieldName := VIA_E, + viaBody := {valueof(m_ViaBody_currIpaddr(vc_branch, vc_userprofile))} + }; + + // Extract challenge and calculate credentials for a response. + v_challenge := vc_response.msgHeader.wwwAuthenticate.challenge.otherChallenge.authParams; + + // Increment CSeq sequence number + vc_cSeq.seqNumber := vc_cSeq.seqNumber + 1; + + // Prepair right answer + vc_authorization := { + fieldName := AUTHORIZATION_E, + body := {f_calculatecCredentialsAndChangeUserName(vc_userprofile, "REGISTER", v_challenge)} + }; + } // end function f_setHeaders_2ndREGISTER_authorizationWithDifferentUserName + + + /** + * @desc function sets header fields for the next outgoing REGISTER (de-registration) + * @param p_cSeq_s cSeq to be used + * @verdict + */ + function f_setHeaders_deREGISTER( + inout CSeq p_cSeq_s + ) runs on SipComponent { + var SemicolonParam_List v_params := {}; + + f_setHeadersGeneral(p_cSeq_s, "REGISTER"); // cseq, contact, branch, via + // reset authorization header to not use nonce from registration (otherwise we have to increase nc) + vc_authorization := { + fieldName := AUTHORIZATION_E, + body := {f_calculatecCredentials_empty(vc_userprofile)} + }; + vc_requestUri := { + scheme := c_sipScheme, + components := { + sip := { + userInfo := omit, + hostPort := { + host := vc_userprofile.registrarDomain, + portField := omit + } + } + }, + urlParameters := omit, + headers := omit + }; + vc_to := valueof(m_To(m_SipUrl_currDomain(vc_userprofile))); + v_params := f_addParameter(v_params, + { + id := c_tagId, + paramValue := { + tokenOrHost := f_getRndTag() + } + }); + vc_from := { + fieldName := FROM_E, + addressField := vc_to.addressField, + fromParams := v_params + }; + + vc_contact := { + fieldName := CONTACT_E, + contactBody := {wildcard := "*"} + }; + } // end function f_setHeaders_deREGISTER + + + /** + * @desc setting of general and basic Invite header fields in additon to the addresses (To, From, ReqUri) + * @param p_cSeq_s + */ + function f_setHeadersINVITE( + inout CSeq p_cSeq_s + ) runs on SipComponent { + f_setHeadersGeneral(p_cSeq_s, "INVITE"); // cseq, contact, branch, via + vc_callId := { + fieldName := CALL_ID_E, + callid := f_getRndCallId() & c_AT & vc_userprofile.currIpaddr + }; + + vc_cancel_To := vc_to; + vc_caller_To := vc_to; + + vc_caller_From := vc_from; + + if (ischosen(vc_requestUri.components.sip)) { + // sip/sips call + vc_reqHostPort := vc_requestUri.components.sip.hostPort; + } + else if (ischosen(vc_requestUri.components.urn)) { + // Emergency call + vc_reqUrnUri := vc_requestUri.components.urn; + } + else { + log("*** " & __SCOPE__ &": INFO:f_setHeadersINVITE: unsupported field: ", vc_requestUri," ***"); + setverdict(fail); + } + } + + /** + * @desc setting of general and basic Update header fields in additon to the addresses (To, From, ReqUri) + * @param p_cSeq_s + */ + function f_setHeadersUPDATE( + inout CSeq p_cSeq_s + ) runs on SipComponent { + f_setHeadersGeneral(p_cSeq_s, "UPDATE"); // cseq, contact, branch, via + vc_callId := { + fieldName := CALL_ID_E, + callid := f_getRndCallId() & c_AT & vc_userprofile.currIpaddr + }; + + vc_cancel_To := vc_to; + vc_caller_To := vc_to; + + vc_caller_From := vc_from; + + vc_reqHostPort := vc_requestUri.components.sip.hostPort; + } // end function f_setHeadersUPDATE + + /** + * @desc setting of general and basic Message header fields in additon to the addresses (To, From, ReqUri) + * @param p_cSeq_s + */ + function f_setHeadersMESSAGE( + inout CSeq p_cSeq_s + ) runs on SipComponent { + f_setHeadersGeneral(p_cSeq_s, "MESSAGE"); // cseq, contact, branch, via + vc_callId := { + fieldName := CALL_ID_E, + callid := f_getRndCallId() & c_AT & vc_userprofile.currIpaddr + }; + + vc_cancel_To := vc_to; + vc_caller_To := vc_to; + + vc_caller_From := vc_from; + + vc_reqHostPort := vc_requestUri.components.sip.hostPort; + } // end function f_setHeadersMESSAGE + + /** + * @desc setting of general and basic Notify header fields in additon to the addresses (To, From, ReqUri) + * @param p_cSeq_s + */ + function f_setHeadersNOTIFY( + inout CSeq p_cSeq_s + ) runs on SipComponent { + f_setHeadersGeneral(p_cSeq_s, "NOTIFY"); // cseq, contact, branch, via + vc_cancel_To := vc_to; + vc_caller_To := vc_to; + vc_caller_From := vc_from; + + vc_reqHostPort := vc_requestUri.components.sip.hostPort; + } // end function f_setHeadersNOTIFY + + /** + * @desc setting of general and basic Publish header fields in additon to the addresses (To, From, ReqUri) + * @param p_cSeq_s + */ + function f_setHeadersPUBLISH( + inout CSeq p_cSeq_s + ) runs on SipComponent { + f_setHeadersGeneral(p_cSeq_s, "PUBLISH"); // cseq, contact, branch, via + // after SUBSCRIBE message callid shall be same + // vc_callId := { fieldName:=CALL_ID_E, callid:=f_getRndCallId(p_cSeq_s) & c_AT & vc_userprofile.currIpaddr }; + vc_cancel_To := vc_to; + vc_caller_To := vc_to; + + vc_caller_From := vc_from; + + vc_reqHostPort := vc_requestUri.components.sip.hostPort; + } // end function f_setHeadersPUBLISH + + /** + * @desc function sets header field for the next outgoing SUBSCRIBE message + * @param p_cSeq_s CSeq parameter to be applied + */ + function f_setHeaders_SUBSCRIBE( + inout CSeq p_cSeq_s + ) runs on SipComponent { + var SemicolonParam_List v_params := {}; + + f_setHeadersGeneral(p_cSeq_s, "SUBSCRIBE"); // cseq, contact, branch, via + vc_requestUri := valueof(m_SipUrl_currDomain(vc_userprofile)); + + vc_reqHostPort := vc_requestUri.components.sip.hostPort; + + vc_callId := { + fieldName := CALL_ID_E, + callid := f_getRndCallId() & c_AT & vc_userprofile.currIpaddr + }; + + // store callId from Subscribe message + vc_callIdSub := vc_callId; + + vc_to := valueof(m_To(m_SipUrl_currDomain(vc_userprofile))); + vc_cancel_To := vc_to; + v_params := f_addParameter(v_params, + { + id := c_tagId, + paramValue := { + tokenOrHost := f_getRndTag() + } + }); + vc_from := { + fieldName := FROM_E, + addressField := vc_to.addressField, + fromParams := v_params + }; + } // end function setHeaders_SUBSCRIBE + + /** + * @desc setting of general and basic Subscribe header fields in additon to the addresses (To, From, ReqUri) + * @param p_cSeq_s + */ + function f_setHeadersSUBSCRIBE( + inout CSeq p_cSeq_s + ) runs on SipComponent { + f_setHeadersGeneral(p_cSeq_s, "SUBSCRIBE"); // cseq, contact, branch, via + vc_callId := { + fieldName := CALL_ID_E, + callid := f_getRndCallId() & c_AT & vc_userprofile.currIpaddr + }; + + vc_cancel_To := vc_to; + vc_caller_To := vc_to; + + vc_caller_From := vc_from; + + vc_reqHostPort := vc_requestUri.components.sip.hostPort; + } // end function f_setHeadersMESSAGE + + /** + * @desc setting of general and basic REFER header fields in additon to the addresses (To, From, ReqUri) + * @param p_cSeq_s + */ + function f_setHeadersREFER( + inout CSeq p_cSeq_s + ) runs on SipComponent { + f_setHeadersGeneral(p_cSeq_s, "REFER"); // cseq, contact, branch, via + // vc_callId := { fieldName:=CALL_ID_E, callid:=f_getRndCallId(p_cSeq_s) & c_AT & vc_userprofile.currIpaddr }; + vc_cancel_To := vc_to; + vc_caller_To := vc_to; + + vc_caller_From := vc_from; + + vc_reqHostPort := vc_requestUri.components.sip.hostPort; + } // end function f_setHeadersREFER + + /** + * @desc This function reads all necessary headers from the received REGISTER message and generate the tag for the answer + * @param p_Request REGISTER that has been received + */ + function f_setHeadersOnReceiptOfREGISTER( + Request p_Request + ) runs on SipComponent { + + f_setHeadersOnReceiptOfRequest(p_Request); + + vc_callId := p_Request.msgHeader.callId; + vc_caller_From := vc_from; + f_addTagInTo(vc_to); + vc_caller_To := vc_to; + vc_requestUri := p_Request.requestLine.requestUri; + + vc_cancel_To := p_Request.msgHeader.toField; + + if (isvalue(p_Request.msgHeader.contact) and (not ischosen(p_Request.msgHeader.contact.contactBody.wildcard))) { + vc_reqHostPort := f_getContactAddr(p_Request.msgHeader.contact.contactBody.contactAddresses[0]); + } + + // update callee information and pick up tag if the call need to be canceled + vc_callee_To := { + fieldName := TO_E, + addressField := vc_caller_From.addressField, + toParams := vc_caller_From.fromParams + }; + + vc_callee_From := { + fieldName := FROM_E, + addressField := vc_caller_To.addressField, + fromParams := vc_caller_To.toParams + }; + + if (isvalue(p_Request.msgHeader.authorization)) { + vc_authorization := valueof(p_Request.msgHeader.authorization); + } + } // end f_setHeadersOnReceiptOfREGISTER + + /** + * @desc This function reads all necessary headers from the received SUBSCRIBE message and generate the tag for the answer + * @param p_Request SUBSCRIBE that has been received + */ + function f_setHeadersOnReceiptOfSUBSCRIBE( + Request p_Request + ) runs on SipComponent { + + f_setHeadersOnReceiptOfRequest(p_Request); + + vc_callId := p_Request.msgHeader.callId; + vc_caller_From := vc_from; + f_addTagInTo(vc_to); + vc_caller_To := vc_to; + vc_requestUri := p_Request.requestLine.requestUri; + + vc_cancel_To := p_Request.msgHeader.toField; + + if (isvalue(p_Request.msgHeader.contact)) { + vc_reqHostPort := f_getContactAddr(p_Request.msgHeader.contact.contactBody.contactAddresses[0]); + } + + // update callee information and pick up tag if the call need to be canceled + vc_callee_To := { + fieldName := TO_E, + addressField := vc_caller_From.addressField, + toParams := vc_caller_From.fromParams + }; + + vc_callee_From := { + fieldName := FROM_E, + addressField := vc_caller_To.addressField, + fromParams := vc_caller_To.toParams + }; + } // end f_setHeadersOnReceiptOfSUBSCRIBE + + function f_setHeadersOnReceiptOfREFER( + Request p_Request + ) runs on SipComponent { + + f_setHeadersOnReceiptOfRequest(p_Request); + + vc_requestUri := p_Request.requestLine.requestUri; + vc_cancel_To := p_Request.msgHeader.toField; + + if (isvalue(p_Request.msgHeader.contact)) { + vc_reqHostPort := f_getContactAddr(p_Request.msgHeader.contact.contactBody.contactAddresses[0]); + vc_requestUri := f_getContactUri(p_Request.msgHeader.contact.contactBody.contactAddresses[0]); + } + + // update callee information and pick up tag if the call need to be canceled + vc_callee_To := { + fieldName := TO_E, + addressField := vc_caller_From.addressField, + toParams := vc_caller_From.fromParams + }; + + vc_callee_From := { + fieldName := FROM_E, + addressField := vc_caller_To.addressField, + fromParams := vc_caller_To.toParams + }; + } // end f_setHeadersOnReceiptOfREFER + + /** + * @desc function reads all necessary headers from the received INVITE message and generate the tag for the answer + * @param p_Request received INVITE message + * @verdict + */ + function f_setHeadersOnReceiptOfINVITE( + Request p_Request + ) runs on SipComponent { + var integer i, j; + var integer v_length; + + f_setHeadersOnReceiptOfRequest(p_Request); + + vc_callId := p_Request.msgHeader.callId; + + vc_requestUri2 := p_Request.requestLine.requestUri; + + vc_cancel_To := p_Request.msgHeader.toField; + f_addTagInTo(vc_to); + vc_caller_From := vc_from; + vc_caller_To := vc_to; + + if (isvalue(p_Request.msgHeader.contact)) { + vc_reqHostPort := f_getContactAddr(p_Request.msgHeader.contact.contactBody.contactAddresses[0]); + vc_requestUri := f_getContactUri(p_Request.msgHeader.contact.contactBody.contactAddresses[0]); + } + + // update callee information and pick up tag if the call need to be canceled + vc_callee_To := { + fieldName := TO_E, + addressField := vc_caller_From.addressField, + toParams := vc_caller_From.fromParams + }; + + vc_callee_From := { + fieldName := FROM_E, + addressField := vc_caller_To.addressField, + fromParams := vc_caller_To.toParams + }; + + if (isvalue(p_Request.msgHeader.privacy)) { + vc_privacy := p_Request.msgHeader.privacy; + } + + if (isvalue(p_Request.messageBody)) { + // cleaning of attributes before assignment + if (isvalue(vc_sdp_remote.media_list)) { + v_length := lengthof(vc_sdp_remote.media_list); + for (i := 0; i < v_length; i := i + 1) { + if (isvalue(vc_sdp_remote.media_list[i].attributes)) { + vc_sdp_remote.media_list[i].attributes := omit; + } + } + } + + // save SDP if present + if (ischosen(p_Request.messageBody.sdpMessageBody)) { + vc_sdp_remote := p_Request.messageBody.sdpMessageBody; + vc_sdp_remote_is_valid := true; + f_prepare_SDP_answer(); + } + + // save XML if present + if (ischosen(p_Request.messageBody.xmlBody)) { + vc_xml_remote := p_Request.messageBody.xmlBody; + } + + if (ischosen(p_Request.messageBody.mimeMessageBody)) { + + for (j := 0; j < lengthof(p_Request.messageBody.mimeMessageBody.mimeEncapsulatedList); j := j + 1) { + if (match(p_Request.messageBody.mimeMessageBody.mimeEncapsulatedList[j].content_type, c_sdpApplication)) { + vc_sdp_remote := p_Request.messageBody.mimeMessageBody.mimeEncapsulatedList[j].mime_encapsulated_part.sdpMessageBody; + vc_sdp_remote_is_valid := true; + f_prepare_SDP_answer(); + } + if (match(p_Request.messageBody.mimeMessageBody.mimeEncapsulatedList[j].content_type, c_xmlApplication)) { + vc_xml_remote := p_Request.messageBody.mimeMessageBody.mimeEncapsulatedList[j].mime_encapsulated_part.xmlBody; + } + } + } + } + + if (isvalue(p_Request.msgHeader.supported.optionsTags)) { + for (i := lengthof(p_Request.msgHeader.supported.optionsTags); i > 0; i := i - 1) { + if (p_Request.msgHeader.supported.optionsTags[i - 1] == "100rel") { + vc_supported_100rel := true; + } + if (p_Request.msgHeader.supported.optionsTags[i - 1] == "precondition") { + vc_supported_precondition := true; + } + } + } + } // end f_setHeadersOnReceiptOfINVITE + + /** + * @desc function reads header field of a received BYE message + * @param p_Request received BYE + */ + function f_setHeadersOnReceiptOfBYE( + Request p_BYE_Request + ) runs on SipComponent { + + f_setHeadersOnReceiptOfRequest(p_BYE_Request); + vc_callId := p_BYE_Request.msgHeader.callId; + } // end f_setHeadersOnReceiptOfBYE + + /** + * @desc function reads header field from an incoming Request message + * @param p_Request received Request message + */ + function f_setHeadersOnReceiptOfRequest( + Request p_Request + ) runs on SipComponent { + vc_request := p_Request; + vc_callId := p_Request.msgHeader.callId; + vc_cSeq := valueof(p_Request.msgHeader.cSeq); // CSeq is mandatory + vc_iut_CSeq := p_Request.msgHeader.cSeq; + vc_from := p_Request.msgHeader.fromField; + vc_caller_From := p_Request.msgHeader.fromField; + vc_to := p_Request.msgHeader.toField; + vc_caller_To := p_Request.msgHeader.toField; + vc_via := p_Request.msgHeader.via; + // update sent_label according to received via header field + f_getViaReplyAddr(vc_via.viaBody, vc_sent_label); + + // Catch route + vc_boo_recordRoute := false; + + // add tag field into To header if tag is not present + if (not (isvalue(p_Request.msgHeader.toField.toParams))) { + vc_to.toParams := { + { + id := c_tagId, + paramValue := { + tokenOrHost := f_getRndTag() + } + } + }; + vc_caller_To := vc_to; + } + if (isvalue(p_Request.msgHeader.recordRoute.fieldName)) {//Due to ES 201 873-1/C.3.3 Better to check if fieldName of Record Route is present + vc_boo_recordRoute := true; + vc_recordRoute := p_Request.msgHeader.recordRoute; + } + } // end f_setHeadersOnReceiptOfRequest + + /** + * @desc functions reads header fields from an incoming Response message + * @param p_cSeq + * @param p_response received response message + * @verdict + */ + function f_setHeadersOnReceiptOfResponse( + Response p_response + ) runs on SipComponent { + var integer i, j, v_nbroute; + var template(omit) Contact v_contact; + // only for local purpose + vc_response := p_response; + // vc_cSeq := p_cSeq; //must not save global c_seq because it can overwrite temporary cSeq + vc_to := p_response.msgHeader.toField; + vc_from := p_response.msgHeader.fromField; + vc_caller_To := vc_to; + vc_caller_From := vc_from; + + if (isvalue(p_response.msgHeader.contact)) { + v_contact := p_response.msgHeader.contact; + if (ischosen(v_contact.contactBody.contactAddresses)) { + vc_reqHostPort := f_getContactAddr(valueof(v_contact.contactBody.contactAddresses[0])); + vc_requestUri := f_getContactUri(valueof(v_contact.contactBody.contactAddresses[0])); + } + } + else { + if (ischosen(vc_to.addressField.addrSpecUnion.components.sip)) { + // sip/sips call + vc_reqHostPort := vc_to.addressField.addrSpecUnion.components.sip.hostPort; + } + else if (ischosen(vc_to.addressField.addrSpecUnion.components.urn)) { + // Emergency call + vc_reqUrnUri := vc_to.addressField.addrSpecUnion.components.urn; + } + else { + log("*** f_setHeadersOnReceiptOfResponse: INFO: unsupported field: ", vc_to, " ***"); + setverdict(fail); + } + vc_requestUri := vc_to.addressField.addrSpecUnion; + } + + vc_callee_To := { + fieldName := TO_E, + addressField := vc_caller_From.addressField, + toParams := vc_caller_From.fromParams + }; + + vc_callee_From := { + fieldName := FROM_E, + addressField := vc_caller_To.addressField, + fromParams := vc_caller_To.toParams + }; + + vc_via := p_response.msgHeader.via; + + // Route Management + if (isvalue(p_response.msgHeader.recordRoute)) { + vc_recordRoute := p_response.msgHeader.recordRoute; + v_nbroute := lengthof(vc_recordRoute.routeBody); + // copy and reverse the order of the routes in route header + for (i := 0; i <= (v_nbroute - 1); i := i + 1) { + j := v_nbroute - 1 - i; + vc_route.routeBody[j] := vc_recordRoute.routeBody[i]; + } + vc_route.fieldName := ROUTE_E; + vc_boo_recordRoute := true; + vc_boo_route := true; + } + else { + vc_boo_recordRoute := false; + vc_boo_route := false; + } + + + // extentions due to new fields in PRACK and UPDATE messages + if (isvalue(p_response.msgHeader.rSeq)) { + vc_rAck := { + fieldName := RACK_E, + responseNum := valueof(p_response.msgHeader.rSeq.responseNum), + seqNumber := valueof(p_response.msgHeader.cSeq.seqNumber), + method := valueof(p_response.msgHeader.cSeq.method) + }; + } + + // extentions due to new HistoryInfo fields 180 or 200OK messages + if (isvalue(p_response.msgHeader.historyInfo)) { + vc_historyInfoList := valueof(p_response.msgHeader.historyInfo.historyInfoList); + vc_history_is_valid := true; + } + else { + vc_history_is_valid := false; + } + + // sdpMessageBody answer + if (isvalue(p_response.messageBody)) { + if (ischosen(p_response.messageBody.sdpMessageBody)) { + vc_sdp_remote := p_response.messageBody.sdpMessageBody; + vc_sdp_remote_is_valid := true; + } + + if (ischosen(p_response.messageBody.xmlBody)) { + vc_xml_remote := p_response.messageBody.xmlBody; + } + + if (ischosen(p_response.messageBody.mimeMessageBody)) { + + for (j := 0; j < lengthof(p_response.messageBody.mimeMessageBody.mimeEncapsulatedList); j := j + 1) { + if (match(p_response.messageBody.mimeMessageBody.mimeEncapsulatedList[j].content_type, c_sdpApplication)) { + vc_sdp_remote := p_response.messageBody.mimeMessageBody.mimeEncapsulatedList[j].mime_encapsulated_part.sdpMessageBody; + } + if (match(p_response.messageBody.mimeMessageBody.mimeEncapsulatedList[j].content_type, c_xmlApplication)) { + vc_xml_remote := p_response.messageBody.mimeMessageBody.mimeEncapsulatedList[j].mime_encapsulated_part.xmlBody; + } + } + } + } + } // end function f_setHeadersOnReceiptOfResponse + + /** + * @desc functions reads ServiceRoute header field from an incoming 200 Response message in registration + * @param p_cSeq + * @param p_response received response message + */ + function f_getServiceRouteMapIntoRouteInRegistration( + Response p_response + ) runs on SipComponent { + var integer i, j, v_nbroute; + var template(omit) ServiceRoute v_serviceRoute; + + // Route Management + if (isvalue(p_response.msgHeader.serviceRoute.fieldName)) {////Due to ES 201 873-1/C.3.3 Better to check if fieldName of Record Route is present + v_serviceRoute := p_response.msgHeader.serviceRoute; + v_nbroute := lengthof(v_serviceRoute.routeBody); + // copy and reverse the order of the routes in route header + for (i := 0; i <= (v_nbroute - 1); i := i + 1) { + j := v_nbroute - 1 - i; + vc_route.routeBody[j] := v_serviceRoute.routeBody[i]; + } + vc_route.fieldName := ROUTE_E; + vc_route_REG := vc_route; + vc_boo_route := true; + } + } // end function f_getServiceRouteMapIntoRouteInRegistration + + /** + * @desc functions reads Route header field from an incoming Request message and generate RecordRoute + * @param p_cSeq + * @param p_request received request message + */ + function f_getRouteMapIntoRecordRoute( + Request p_request + ) runs on SipComponent { + var integer i, j, v_nbroute; + var template(omit) Route v_route; + + // Route Management + if (isvalue(p_request.msgHeader.route)) { + v_route := p_request.msgHeader.route; + v_nbroute := lengthof(v_route.routeBody); + // copy and reverse the order of the routes in route header + for (i := 0; i <= (v_nbroute - 1); i := i + 1) { + j := v_nbroute - 1 - i; + vc_recordRoute.routeBody[j] := v_route.routeBody[i]; + } + vc_recordRoute.fieldName := RECORD_ROUTE_E; + + vc_boo_recordRoute := true; + } + } // end function f_getRouteMapIntoRecordRoute + + + } // end group SetHeaders + + + + } // end group FieldOperations + + group SDPOperations { + + /** + * @desc check if message body include SDP attribute (2nd parameter) for any media + */ + function f_check_attribute( + in SDP_Message p_sdp, + in template SDP_attribute p_attribute + ) runs on SipComponent + return boolean { + var integer i, j; + + if (isvalue(p_sdp.media_list)) { + for (j := 0; j < lengthof(p_sdp.media_list); j := j + 1) { + if (isvalue(p_sdp.media_list[j].attributes)) { + for (i := 0; i < lengthof(p_sdp.media_list[j].attributes); i := i + 1) { + if (match(p_sdp.media_list[j].attributes[i], p_attribute)) { + return (true); + } + } + } + } + } + if (isvalue(p_sdp.attributes)) { + for (j := 0; j < lengthof(p_sdp.attributes); j := j + 1) { + if (match(p_sdp.attributes[j], p_attribute)) { + return (true); + } + } + } + + return (false); + } + + /** + * @desc check if message body include SDP (session level) attribute (2nd parameter) for any media + */ + function f_check_session_attribute( + in SDP_Message p_sdp, + in template SDP_attribute p_attribute + ) runs on SipComponent + return boolean { + var integer j; + + if (isvalue(p_sdp.attributes)) { + for (j := 0; j < lengthof(p_sdp.attributes); j := j + 1) { + if (match(p_sdp.attributes[j], p_attribute)) { + return (true); + } + } + } + + return (false); + } + + /** + * @desc identify an SDP direction attribute (session or first media attribute) in a SDP message and return its answer value + * @param p_sdp the SDP message that has been received + * @param p_attribute incoming SDP attribute that need to be used for the SDP direction (answer) + * @return the new attribute (to be send out) derived from the incoming SDP value + * @verdict + */ + function f_get_attribute_answer( + in SDP_Message p_sdp, + in template SDP_attribute p_attribute + ) runs on SipComponent + return SDP_attribute { + var integer i, j; + var template SDP_attribute v_attribute := p_attribute; + + // check if the selected attribute is included in the SDP offer (session attributes) + if (isvalue(p_sdp.attributes)) { + for (j := 0; j < lengthof(p_sdp.attributes); j := j + 1) { + if (match(p_sdp.attributes[j], p_attribute)) { + v_attribute := p_sdp.attributes[j]; + } + } + } + else + // check if the selected attribute is included in the SDP offer (any of the media attributes) + { + if (isvalue(p_sdp.media_list)) { + for (j := 0; j < lengthof(p_sdp.media_list); j := j + 1) { + if (isvalue(p_sdp.media_list[j].attributes)) { + for (i := 0; i < lengthof(p_sdp.media_list[j].attributes); i := i + 1) { + if (match(p_sdp.media_list[j].attributes[i], p_attribute)) { + v_attribute := p_sdp.media_list[j].attributes[i]; + } + } + } + } + } + } + + select (valueof(v_attribute)) { + case (mw_attribute_sendonly) { + return (valueof(m_attribute_recvonly)); + } + case (mw_attribute_sendrecv) { + return (valueof(m_attribute_sendrecv)); + } // MRO + case (mw_attribute_inactive) { + return (valueof(m_attribute_inactive)); + } // MRO + case (mw_attribute_recvonly) { + return (valueof(m_attribute_sendonly)); + } // MRO + } + return (valueof(m_attribute_sendrecv)); // the default return value in case of missing attribute offer + } + + /** + * @desc check if message body include SDP bandwidth (2nd parameter) either for the session or a media description + */ + function f_check_bandwidth( + in SDP_Message p_loc_sdp, + in template SDP_bandwidth p_loc_bandw + ) runs on SipComponent + return boolean { + var integer i, j; + if (isvalue(p_loc_sdp.bandwidth)) { + for (j := 0; j < lengthof(p_loc_sdp.bandwidth); j := j + 1) { + if (match(p_loc_sdp.bandwidth[j], p_loc_bandw)) { + return (true); + } + } + } + if (isvalue(p_loc_sdp.media_list)) { + for (j := 0; j < lengthof(p_loc_sdp.media_list); j := j + 1) { + if (isvalue(p_loc_sdp.media_list[j].bandwidth)) { + for (i := 0; i < lengthof(p_loc_sdp.media_list[j].bandwidth); i := i + 1) { + if (match(p_loc_sdp.media_list[j].bandwidth[i], p_loc_bandw)) { + return (true); + } + } + } + } + } + + return (false); + } + + /** + * @desc check if message body include SDP media (2nd parameter) + */ + function f_check_media( + in SDP_Message p_loc_sdp, + in template(present) SDP_media_desc p_loc_media + ) runs on SipComponent + return boolean { + var integer j; + if (isvalue(p_loc_sdp.media_list)) { + for (j := 0; j < lengthof(p_loc_sdp.media_list); j := j + 1) { + if (match(p_loc_sdp.media_list[j].media_field.transport, p_loc_media.media_field.transport) and match(p_loc_sdp.media_list[j].media_field.fmts, p_loc_media.media_field.fmts)) { + return (true); + } + } + } + return (false); + } + + /** + * @desc check if message body include precondition mechanism (a=des and a=curr) retrun true, else false + * @param loc_sdp SDP message + */ + function f_check_precondition( + in SDP_Message p_loc_sdp + ) runs on SipComponent + return boolean { + if (f_check_attribute(p_loc_sdp, mw_attribute_des) or f_check_attribute(p_loc_sdp, mw_attribute_curr)) { + return (true); + } + + return (false); + } + + + /** + * @desc check if message body include SDP media direction return true, else false + */ + function f_check_media_direction( + in SDP_Message p_loc_sdp + ) runs on SipComponent + return boolean { + + if (f_check_attribute(p_loc_sdp, mw_attribute_sendonly) or f_check_attribute(p_loc_sdp, mw_attribute_recvonly) or f_check_attribute(p_loc_sdp, mw_attribute_sendrecv) or f_check_attribute(p_loc_sdp, mw_attribute_inactive)) { + return (true); + } + + return (false); + } + + /** + * @desc copy media/attribute lines from remote to local SDP variable + */ + function f_check_SDP( + integer p_loc_sdp, + integer p_loc_codec + ) runs on SipComponent + return boolean { + var SDP_media_desc v_media := f_prepare_media(p_loc_sdp, p_loc_codec); + if (vc_sdp_remote.media_list[0].media_field.media != v_media.media_field.media) { + return false; + } + if (vc_sdp_remote.media_list[0].media_field.transport != v_media.media_field.transport) { + return false; + } + if (vc_sdp_remote.media_list[0].media_field.fmts != v_media.media_field.fmts) { + return false; + } + + return true; + } + + /** + * @desc replace the first curr media attribute with the given value. + * @param p_sdp SDP message to modify + * @param p_curr new curr attribute + */ + function f_replace_curr_attribute( + inout SDP_Message p_sdp, + in SDP_attribute_curr p_curr + ) { + var integer i; + var integer v_mn; + if (isvalue(p_sdp.media_list)) { + v_mn := lengthof(p_sdp.media_list[0].attributes); + for (i := 0; i < v_mn; i := i + 1) { + if (ischosen(p_sdp.media_list[0].attributes[i].curr)) { + p_sdp.media_list[0].attributes[i].curr := p_curr; + i := v_mn; + } + } + } + } + + /** + * @desc append new media attribute to the first media description. + * @param p_sdp SDP message to modify + * @param p_att SDP attribute to appand + */ + function f_append_media_attribute( + inout SDP_Message p_sdp, + in SDP_attribute p_att + ) { + var integer v_mn; + if (isvalue(p_sdp.media_list)) { + v_mn := lengthof(p_sdp.media_list[0].attributes); + p_sdp.media_list[0].attributes[v_mn] := p_att; + } + } + + + /** + * @desc append new media to the existing media list in SDP + */ + function f_append_media( + inout SDP_Message p_loc_SDP, + template(value) SDP_media_desc p_loc_media + ) { + var integer v_mn := lengthof(p_loc_SDP.media_list); + p_loc_SDP.media_list[v_mn] := valueof(p_loc_media); + } + + /** + * @desc repare media/attribute lines + */ + function f_prepare_media( + integer p_loc_sdp, + integer p_loc_codec + ) runs on SipComponent + return SDP_media_desc { + var SDP_attribute_rtpmap_codec v_codecs[32] := { + {"PCMU", "8000", omit}, {"GSM", "8000", omit}, {"G723", "8000", omit}, {"DVI4", "8000", omit}, + {"DVI4", "16000", omit}, {"LPC", "8000", omit}, {"PCMA", "8000", omit}, {"G722", "8000", omit}, + {"L16", "44100", "2"}, {"L16", "44100", omit}, {"QCELP", "8000", omit}, {"CN","8000", omit}, + {"MPA", "90000", omit}, {"G728", "8000", omit}, {"DVI4", "11025", omit}, {"DVI4", "22050", omit}, + {"G729", "8000", omit}, {"G726-40", "8000", omit}, {"G726-32", "8000", omit}, {"G726-24", "8000", omit}, + {"G726-16", "8000", omit}, {"G726D", "8000", omit}, {"G726E", "8000", omit}, {"GSM-EFR", "8000", omit}, + {"CelB", "90000", omit}, {"JPEG", "90000", omit}, {"Nv", "90000", omit}, {"H261", "90000", omit}, + {"MPV", "90000", omit}, {"MP2T" ,"90000", omit}, {"H263", "90000", omit}, {"H263-1998", "90000", omit}}; + var SDP_media_desc v_media := { + media_field := { + media := "audio", + ports := { + port_number := 10000, + num_of_ports := omit + }, + transport := "RTP/AVP", + fmts := {"0"} + }, // m=audio + // 8500 + // RTP/AVP + // 0 + information := omit, + connections := omit, + bandwidth := omit, + key := omit, + attributes := omit + }; + + if (32 < p_loc_codec or p_loc_codec < 1) { + log("*** " & __SCOPE__ & ": INFO: Unexpected SDP variant ***"); + setverdict(inconc); + return (v_media); + } + + if (p_loc_sdp == 1) { + } + else if (p_loc_sdp == 2) { + v_media.media_field.fmts := {PX_SIP_SDP_DYN}; // { "98", "0" }; + v_media.attributes := { + { + rtpmap := { + payload_type := PX_SIP_SDP_DYN, + codec := v_codecs[p_loc_codec - 1] + } + } + }; + } + else if (p_loc_sdp == 3) { + v_media.media_field.fmts := {"8"}; + } + else if (p_loc_sdp == 4) { + v_media.media_field.fmts := {"99", "8"}; + v_media.attributes := { + { + rtpmap := { + payload_type := "99", + codec := v_codecs[p_loc_codec - 1] + } + } + }; + } + else if (p_loc_sdp == 5) { + v_media.media_field.media := "image"; + v_media.media_field.transport := "udptl"; + v_media.media_field.fmts := {"t38"}; + } + else if (p_loc_sdp == 6) { + v_media.media_field.media := "image"; + v_media.media_field.transport := "tcptl"; + v_media.media_field.fmts := {"t38"}; + } + else { + log("*** " & __SCOPE__ & ": INFO: Unexpected SDP variant ***"); + setverdict(inconc); + } + + return (v_media); + } + + /** + * @desc repare media/attribute lines + */ + function f_prepare_SDP( + integer p_loc_sdp, + integer p_loc_codec + ) runs on SipComponent { + + vc_sdp_local.media_list := {f_prepare_media(p_loc_sdp, p_loc_codec)}; + } + + /** + * @desc function that copy media/attribute lines from remote to local SDP variable + */ + function f_prepare_SDP_answer( + ) runs on SipComponent { + var integer v_mn, v_cn := 0, i, j, k := 0; + var charstring v_PT; + var SDP_attribute_rtpmap_codec v_rtpmap := { "", "", omit}; + var SDP_attribute_list v_mediaAttributes := {}; + // increase session version + vc_sdp_local.origin.session_version := int2str(str2int(vc_sdp_remote.origin.session_version) + 1); + // if more than one codec, select the firs one + v_mn := lengthof(vc_sdp_remote.media_list); + for (i := 0; i < v_mn; i := i + 1) { + // for every single media + if (isvalue(vc_sdp_remote.media_list[i].attributes)) { + v_cn := lengthof(vc_sdp_remote.media_list[i].attributes); + } + if (lengthof(vc_sdp_remote.media_list[i].media_field.fmts) > 0) { + // select the first one + v_PT := vc_sdp_remote.media_list[i].media_field.fmts[0]; + vc_sdp_local.media_list[i].media_field.fmts := {v_PT}; + for (j := 0; j < v_cn; j := j + 1) { + if (ischosen(vc_sdp_remote.media_list[i].attributes[j].rtpmap)) { + if (v_PT == vc_sdp_remote.media_list[i].attributes[j].rtpmap.payload_type) { + v_rtpmap := vc_sdp_remote.media_list[i].attributes[j].rtpmap.codec; + v_mediaAttributes[k] := {rtpmap := {v_PT, v_rtpmap}}; + k := k + 1; + } // else line is not copied + } + else { + // simple copy of attribute + v_mediaAttributes[k] := vc_sdp_remote.media_list[i].attributes[j]; + k := k + 1; + } + } + vc_sdp_local.media_list[i].attributes := v_mediaAttributes; + + if (isvalue(vc_sdp_local.media_list[i].attributes)) { + v_cn := lengthof(vc_sdp_local.media_list[i].attributes); + for (j := 0; j < v_cn; j := j + 1) { + // simplified handling of status attributes (copy/keep status from peer): + // a) copy/keep SDP_attribute_curr (invert tags if applicable) + if (ischosen(vc_sdp_local.media_list[i].attributes[j].curr)) { + // invert local/remote status tags + if (vc_sdp_local.media_list[i].attributes[j].curr.statusType == "local") { + vc_sdp_local.media_list[i].attributes[j].curr.statusType := "remote"; + } + if (vc_sdp_local.media_list[i].attributes[j].curr.statusType == "remote") { + vc_sdp_local.media_list[i].attributes[j].curr.statusType := "local"; + } + // invert send/recv direction tags + if (vc_sdp_local.media_list[i].attributes[j].curr.direction == "send") { + vc_sdp_local.media_list[i].attributes[j].curr.direction := "recv"; + } + if (vc_sdp_local.media_list[i].attributes[j].curr.direction == "recv") { + vc_sdp_local.media_list[i].attributes[j].curr.direction := "send"; + } + } + else + if ( + // b) copy/keep SDP_attribute_des (keep strength, invert tags if applicable) + ischosen(vc_sdp_local.media_list[i].attributes[j].des) + ) { + // invert local/remote status tags + if (vc_sdp_local.media_list[i].attributes[j].des.statusType == "local") { + vc_sdp_local.media_list[i].attributes[j].des.statusType := "remote"; + } + if (vc_sdp_local.media_list[i].attributes[j].des.statusType == "remote") { + vc_sdp_local.media_list[i].attributes[j].des.statusType := "local"; + } + // invert send/recv direction tags + if (vc_sdp_local.media_list[i].attributes[j].des.direction == "send") { + vc_sdp_local.media_list[i].attributes[j].des.direction := "recv"; + } + if (vc_sdp_local.media_list[i].attributes[j].des.direction == "recv") { + vc_sdp_local.media_list[i].attributes[j].des.direction := "send"; + } + } + else + if ( + // c) simplification: assume no SDP_attribute_conf + ischosen(vc_sdp_local.media_list[i].attributes[j].conf) + ) { + // handle SDP_attribute_conf + } + } + } + } + } + // add handling of prenegotiation, change ports if required etc. + // if prenegotiation... + } + + /** + * @desc reject SDP offer by setting media ports to 0 + */ + function f_reject_SDP_offer( + ) runs on SipComponent { + var integer mn, i; + f_copy_SDP(); // TO BE DONE with more details! + // increase session version + vc_sdp_local.origin.session_version := int2str(str2int(vc_sdp_local.origin.session_version) + 1); + // if more than one codec, select the firs one + mn := lengthof(vc_sdp_local.media_list); + for (i := 0; i < mn; i := i + 1) { + vc_sdp_local.media_list[i].media_field.ports := {0, omit}; + vc_sdp_local.media_list[i].attributes := omit; // {}; + } + } + + /** + * @desc copies SDP message elements from remote to local component variable: - bandwidth - session version (will be incremented) - media list modify the direction attribute of an SDP media list entry within an SDP message (vc_sdp_local) + * @param p_medianum list position number of the media (if value 0 identifies first media list element) + * @param p_direction the new direction attribute to be included in the media entry + * @verdict + */ + function f_SIP_modMediaDirection( + integer p_medianum, + template(value) SDP_attribute p_direction + ) runs on SipComponent { + var boolean v_set_direction; + + // flag indicates if direction attribute has been modified + var integer v_mn := 0; + + // length of media list (number of entries) + var integer v_cn := 0; + + // number of attributes of a media entry + var integer i, j, k := 0; + var SDP_attribute_list v_mediaAttributes := {}; + // collect the media attributes (to be assigned at end of function) + f_copy_SDP(); // copy SDP session bandwidth and media list from remote to local component variable + // increment session version + vc_sdp_local.origin.session_version := int2str(str2int(vc_sdp_local.origin.session_version) + 1); + + // if more than one codec, select the first one + v_mn := lengthof(vc_sdp_local.media_list); + + if (p_medianum == 0) + // specific media requested + { + p_medianum := 1; // start checking from first media + } + if (p_medianum > 0) + // specific media requested + { + if (not (p_medianum > v_mn)) { + v_mn := p_medianum; + } + } + + // handling of media list elements + for (i := 0; i < v_mn; i := i + 1) { + v_cn := 0; // initialize the number of attributes of the media list entry + if (isvalue(vc_sdp_local.media_list)) + // media_list is optional + { + // log("vc_sdp_local.media_list[i ] ",vc_sdp_local.media_list[i ] ); + if (isvalue(vc_sdp_local.media_list[i].attributes)) { + v_cn := lengthof(vc_sdp_local.media_list[i].attributes); + } + + v_set_direction := false; + + // if (lengthof(vc_sdp_local.media_list[i ] .media_field.fmts)>1) + // select the first one + for (j := 0; j < v_cn; j := j + 1) { + if (ischosen(vc_sdp_local.media_list[i].attributes[j].recvonly) or ischosen(vc_sdp_local.media_list[i].attributes[j].sendonly) or ischosen(vc_sdp_local.media_list[i].attributes[j].inactive) or ischosen(vc_sdp_local.media_list[i].attributes[j].sendrecv)) { + v_mediaAttributes[k] := valueof(p_direction); + v_set_direction := true; + } + else + // non-direction attributes will be copied + { + v_mediaAttributes[k] := vc_sdp_local.media_list[i].attributes[j]; + } + k := k + 1; + } + + if (not v_set_direction) { + v_mediaAttributes[k] := valueof(p_direction); + } + vc_sdp_local.media_list[i].attributes := v_mediaAttributes; + // } + } + } + // add handling of prenegotiation, change ports if required etc. + // if prenegotiation... + } + + /** + * @desc modify session and media attributes direction + */ + function f_SIP_modSessionDirection( + template(value) SDP_attribute p_direction + ) runs on SipComponent { + var boolean v_set_direction := false; + var integer v_mn := 0, i := 0; + + if (isvalue(vc_sdp_local.attributes)) { + v_mn := lengthof(vc_sdp_local.attributes); + + for (i := 0; i < v_mn; i := i + 1) { + // for every single attribute (that is not omit) + if (ischosen(vc_sdp_local.attributes[i].recvonly) or ischosen(vc_sdp_local.attributes[i].sendonly) or ischosen(vc_sdp_local.attributes[i].inactive) or ischosen(vc_sdp_local.attributes[i].sendrecv)) { + vc_sdp_local.attributes[i] := valueof(p_direction); + v_set_direction := true; + } + } + if (not v_set_direction) + // if not sent before + { + vc_sdp_local.attributes[v_mn] := valueof(p_direction); + } + } + else { + vc_sdp_local.attributes[0] := valueof(p_direction); + } + } + + /** + * @desc check (from remote) and set (local) the session/media attribute lines on directions + * @param p_direction_in incoming SDP attribute that need to be checked + * @param p_direction_out SDP attribute that should be included in the SDP answer (to be returned to peer) + * @return + * @verdict + */ + function f_SIP_checksetSDPreqDirection( + template(value) SDP_attribute p_direction_in, + template(value) SDP_attribute p_direction_out + ) runs on SipComponent { + var template(value) SDP_attribute v_direction_out := p_direction_out; + // check incoming SDP attribute + if (not (isvalue(vc_request.messageBody) and (f_check_attribute(vc_request.messageBody.sdpMessageBody, p_direction_in)))) { + if (match(valueof(p_direction_in), mw_attribute_sendrecv) and not (f_check_attribute(vc_request.messageBody.sdpMessageBody, mw_attribute_sendrecv) or f_check_attribute(vc_request.messageBody.sdpMessageBody, mw_attribute_sendonly) or f_check_attribute(vc_request.messageBody.sdpMessageBody, mw_attribute_recvonly) or f_check_attribute(vc_request.messageBody.sdpMessageBody, mw_attribute_inactive))) { + log("*** " &__SCOPE__& ": INFO: no direction attributes with expectation: ", p_direction_in, " ***"); + } + else { + setverdict(fail); + } + } + else { + setverdict(pass); + log("*** " &__SCOPE__& ": INFO: attribute found in message body ***"); + } + if (not(isbound(p_direction_out))) + // STF549 if (match(omit, p_direction_out)) + { + v_direction_out := f_get_attribute_answer(vc_request.messageBody.sdpMessageBody, p_direction_in); + } + f_SIP_modMediaDirection(1, v_direction_out); // handling of attribute in media description + f_SIP_modSessionDirection(v_direction_out); // handling of attribute in session + } + + /* + * + * @desc check (from remote) and set (local) the session/media attribute lines on directions + * @param p_direction_in incoming SDP attribute that need to be checked + * @param p_direction_out SDP attribute that should be included in the SDP answer (to be returned to peer) + * @return + * @verdict + */ + function f_SIP_checkResponsesetSDPreqDirection( + template(value) SDP_attribute p_direction_in, + template(value) SDP_attribute p_direction_out + ) runs on SipComponent { + var template(value) SDP_attribute v_direction_out := p_direction_out; + // check incoming SDP attribute + if (not (isvalue(vc_response.messageBody) and (f_check_attribute(vc_response.messageBody.sdpMessageBody, p_direction_in)))) { + if (match(valueof(p_direction_in), mw_attribute_sendrecv) and not (f_check_attribute(vc_response.messageBody.sdpMessageBody, mw_attribute_sendrecv) or f_check_attribute(vc_response.messageBody.sdpMessageBody, mw_attribute_sendonly) or f_check_attribute(vc_response.messageBody.sdpMessageBody, mw_attribute_recvonly) or f_check_attribute(vc_response.messageBody.sdpMessageBody, mw_attribute_inactive))) { + log("*** " &__SCOPE__& ": INFO: no direction attributes with expectation: ", p_direction_in, " ***"); + } + else { + setverdict(fail); + } + } + else { + setverdict(pass); + log("*** " &__SCOPE__& ": INFO: attribute found in message body ***"); + } + if (not(isbound(p_direction_out))) + // STF549 if (match(omit, p_direction_out)) + { + v_direction_out := f_get_attribute_answer(vc_response.messageBody.sdpMessageBody, p_direction_in); + } + f_SIP_modMediaDirection(1, v_direction_out); // handling of attribute in media description + f_SIP_modSessionDirection(v_direction_out); // handling of attribute in session + } + + /* + * + * @desc check (from remote) and set (local) the session attribute lines on directions + * @param p_direction_in incoming SDP attribute that need to be checked + * @param p_direction_out SDP attribute that should be included in the SDP answer (to be returned to peer) + * @return + * @verdict + */ + function f_SIP_checksetSDPreqDirectionSession( + template(value) SDP_attribute p_direction_in, + template(value) SDP_attribute p_direction_out + ) runs on SipComponent { + var template(value) SDP_attribute v_direction_out := p_direction_out; + // check incoming SDP attribute + if (not (isvalue(vc_request.messageBody) and (f_check_session_attribute(vc_request.messageBody.sdpMessageBody, p_direction_in)))) { + if (match(valueof(p_direction_in), mw_attribute_sendrecv) and not (f_check_session_attribute(vc_request.messageBody.sdpMessageBody, mw_attribute_sendrecv) or f_check_session_attribute(vc_request.messageBody.sdpMessageBody, mw_attribute_sendonly) or f_check_session_attribute(vc_request.messageBody.sdpMessageBody, mw_attribute_recvonly) or f_check_session_attribute(vc_request.messageBody.sdpMessageBody, mw_attribute_inactive))) { + log("*** " &__SCOPE__& ": INFO: no direction attributes with expectation: ", p_direction_in, " ***"); + } + else { + setverdict(fail); + } + } + if (not(isbound(p_direction_out))) + // STF549 if (match(omit, p_direction_out)) + { + v_direction_out := f_get_attribute_answer(vc_request.messageBody.sdpMessageBody, p_direction_in); + } + f_SIP_modSessionDirection(v_direction_out); // handling of attribute in session + } + + /* + * + * @desc check (from remote) and set (local) the session attribute lines on directions + * @param p_direction_in incoming SDP attribute that need to be checked + * @param p_direction_out SDP attribute that should be included in the SDP answer (to be returned to peer) + * @return + * @verdict + */ + function f_SIP_checkResponsesetSDPreqDirectionSession( + template(value) SDP_attribute p_direction_in, + template(value) SDP_attribute p_direction_out + ) runs on SipComponent { + var template(value) SDP_attribute v_direction_out := p_direction_out; + // check incoming SDP attribute + if (not (isvalue(vc_response.messageBody) and (f_check_session_attribute(vc_response.messageBody.sdpMessageBody, p_direction_in)))) { + if (match(valueof(p_direction_in), mw_attribute_sendrecv) and not (f_check_session_attribute(vc_response.messageBody.sdpMessageBody, mw_attribute_sendrecv) or f_check_session_attribute(vc_response.messageBody.sdpMessageBody, mw_attribute_sendonly) or f_check_session_attribute(vc_response.messageBody.sdpMessageBody, mw_attribute_recvonly) or f_check_session_attribute(vc_response.messageBody.sdpMessageBody, mw_attribute_inactive))) { + log("*** " &__SCOPE__& ": INFO: no direction attributes with expectation: ", p_direction_in, " ***"); + } + else { + setverdict(fail); + } + } + if (not(isbound(p_direction_out))) + // STF549 if (match(omit, p_direction_out)) + { + v_direction_out := f_get_attribute_answer(vc_response.messageBody.sdpMessageBody, p_direction_in); + } + f_SIP_modSessionDirection(v_direction_out); // handling of attribute in session + } + + + /* + * + * @desc check (from remote) and set (local)the session/media attribute lines on directions + * @param p_direction_in attribute to be check + * @param p_direction_out attrubyte to be + * @return + * @verdict + */ + function f_SIP_checkSDPrespDirection( + template SDP_attribute p_direction_in + ) runs on SipComponent { + // check incoming SDP attribute + if (not (isvalue(vc_response.messageBody) and f_check_attribute(vc_response.messageBody.sdpMessageBody, p_direction_in))) { + setverdict(fail); + } + } + + /** + * @desc check media/attribute lines from remote + */ + function f_SIP_checkMediaDirection( + integer p_medianum, + template SDP_attribute p_direction + ) runs on SipComponent + return boolean { + var integer v_mn, v_cn := 0, i, j; + var boolean v_result := false; + // increase session version + vc_sdp_remote.origin.session_version := int2str(str2int(vc_sdp_remote.origin.session_version) + 1); + // if more than one codec, select the firs one + v_mn := lengthof(vc_sdp_remote.media_list); + if (p_medianum == 0) + // specific media requested + { + p_medianum := 1; // start checking from first media + } + if (p_medianum > 0) + // specific media requested + { + if (p_medianum > v_mn) { + return false; + } + else { + v_mn := p_medianum; + } + } + for (i := p_medianum - 1; i < v_mn; i := i + 1) { + // for every single media + if (isvalue(vc_sdp_remote.media_list[i].attributes)) { + v_cn := lengthof(vc_sdp_remote.media_list[i].attributes); + } + if (lengthof(vc_sdp_remote.media_list[i].attributes) > 0) { + // select the first one + for (j := 0; j < lengthof(vc_sdp_remote.media_list[i].attributes); j := j + 1) { + if (ischosen(vc_sdp_remote.media_list[i].attributes[j].recvonly) or ischosen(vc_sdp_remote.media_list[i].attributes[j].sendonly) or ischosen(vc_sdp_remote.media_list[i].attributes[j].inactive) or ischosen(vc_sdp_remote.media_list[i].attributes[j].sendrecv)) { + if (match(vc_sdp_remote.media_list[i].attributes[j], p_direction)) { + v_result := true; + } + else { + return false; + } + } + } + } + } + return v_result; + } + + /** + * @desc copy media/attribute lines from remote to local SDP variable + */ + function f_copy_SDP( + ) runs on SipComponent { + if (isvalue(vc_sdp_remote.connection)) { + vc_sdp_local.connection := vc_sdp_remote.connection; + } + else { + vc_sdp_local.connection := omit; + } + + vc_sdp_local.origin := vc_sdp_remote.origin; + vc_sdp_local.session_name := vc_sdp_remote.session_name; + + if (isvalue(vc_sdp_remote.bandwidth)) { + vc_sdp_local.bandwidth := vc_sdp_remote.bandwidth; + } + else { + vc_sdp_local.bandwidth := {}; + } + + if (isvalue(vc_sdp_remote.media_list)) { + // // cleaning of media before assignment + // if (isvalue(vc_sdp_local.media_list)) + // { + // for (var integer i:=0; i value v_request sender vc_sent_label { + tc_wait.stop; + f_setHeadersOnReceiptOfREGISTER(v_request); + } + [] tc_wait.timeout { + setverdict(fail); + f_componentStop(); + } + } + } + + /** + * @desc function awaits SUBSCRIBE + * @param p_register expected SUBSCRIBE request + */ + function f_awaitingSUBSCRIBE( + in template(present) SUBSCRIBE_Request p_subscribe := ? + ) runs on SipComponent { + var SUBSCRIBE_Request v_request; + + tc_wait.start(PX_SIP_TWAIT); + alt { + [] SIPP.receive(p_subscribe) -> value v_request sender vc_sent_label { + tc_wait.stop; + f_setHeadersOnReceiptOfSUBSCRIBE(v_request); + } + [] SIPP.receive(mw_SUBSCRIBE_Request_Base) -> value v_request sender vc_sent_label { + tc_wait.stop; + setverdict(fail); + f_setHeadersOnReceiptOfSUBSCRIBE(v_request); + // f_send200OK(); + } + } + } + + /** + * @desc function awaits REGISTER and sends a 200 OK response + * @param p_reply flag used to avoid the 200OK response sending + */ + function f_awaitingREGISTER_sendReply( + in template(present) REGISTER_Request p_register := ?, + in boolean p_reply + ) runs on SipComponent { + var REGISTER_Request v_request; + + tc_wait.start(PX_SIP_TWAIT); + alt { + [] SIPP.receive(p_register) -> value v_request sender vc_sent_label { + tc_wait.stop; + vc_request := v_request; + f_setHeadersOnReceiptOfREGISTER(v_request); + // Answer to the Request + if (p_reply) { + f_send200OK(); + } + } + [] tc_wait.timeout { + setverdict(fail); + f_componentStop(); + } + } + } + + + /** + * @desc Function waiting for a 200 OK response + * @param p_cSeq_s current cSeq expectation + */ + function f_awaitingOkResponse( + inout CSeq p_cSeq_s + ) runs on SipComponent { + + tc_resp.start; + alt { + [] SIPP.receive(mw_Response_Base(c_statusLine200, vc_callId, p_cSeq_s)) -> value vc_response { + tc_resp.stop; + f_setHeadersOnReceiptOfResponse(vc_response); + setverdict(pass); + } + } + } // end awaitingOkResponse + + /** + * @desc Function waiting for a response + * @param p_Response expected response message + */ + function f_awaitingResponse( + in template(present) Response p_Response := ? + ) runs on SipComponent { + tc_resp.start; + a_awaitingResponse(p_Response); + } // end f_awaitingResponse + + altstep a_awaitingResponse( + in template(present) Response p_Response := ? + ) runs on SipComponent { + [] SIPP.receive(p_Response) -> value vc_response { + tc_resp.stop; + f_setHeadersOnReceiptOfResponse(vc_response); + // setverdict(pass) + } + } // end f_awaitingResponse + + /** + * @desc Function waiting for a response, repeat if 100 Trying is received + * @param p_Response expected response message + */ + function f_awaitingResponseIgnore100Trying( + in template(present) Response p_Response := ? + ) runs on SipComponent { + tc_resp.start; + alt { + [] SIPP.receive(p_Response) -> value vc_response { + tc_resp.stop; + f_setHeadersOnReceiptOfResponse(vc_response); + // setverdict(pass) + } + [] SIPP.receive(mw_Response_Base(c_statusLine100, vc_callId, vc_cSeq)) -> value vc_response { + repeat; + } + } + } // end f_awaitingResponseIgnore100Trying + + /** + * @desc Function waiting for a response and send ACK on FailureResponses 4xx,5xx,6xx + * @param p_Response expected response message + */ + function f_awaitingResponseSendACK( + in template(present) Response p_Response := ? + ) runs on SipComponent { + tc_resp.start; + alt { + [] SIPP.receive(p_Response) -> value vc_response { + tc_resp.stop; + f_setHeadersOnReceiptOfResponse(vc_response); + LibSip_Steps.f_setHeadersACK(); + f_SendACK(m_ACK_Request_Base(vc_requestUri, vc_callId, vc_cSeq, vc_from, vc_to, vc_via)); + setverdict(pass); + } + } + } // end f_awaitingResponse + + /** + * @desc Function waiting for a response + * @param p_Response expected response message + */ + function f_awaitingResponsePassOnTimeout( + in template(present) Response p_Response := ? + ) runs on SipComponent { + tc_resp.start; + alt { + [] SIPP.receive(p_Response) -> value vc_response { + tc_resp.stop; + f_setHeadersOnReceiptOfResponse(vc_response); + vc_boo_response := true; + // setverdict(pass) + } + [] tc_resp.timeout { + vc_boo_response := false; + // setverdict (pass) + } + } + } // end f_awaitingResponsePassOnTimeout + + /** + * @desc Function waiting for a 200 OK response + * @param p_cSeq_s current cSeq expectation + */ + function f_awaitingOkResponseAndNOTIFY_sendReply( + inout CSeq p_cSeq_s, + in template(present) NOTIFY_Request p_MSG := ? + ) runs on SipComponent { + + var boolean v_received_OK := false; + var boolean v_received_NOTIFY := false; + var NOTIFY_Request v_MSG; + tc_resp.start; + tc_wait.start(PX_SIP_TWAIT); + + alt { + [] SIPP.receive(mw_Response_Base(c_statusLine200, vc_callId, p_cSeq_s)) -> value vc_response { + tc_resp.stop; + vc_subscribed := true; + f_setHeadersOnReceiptOfResponse(vc_response); + v_received_OK := true; + setverdict(pass); + if (not (v_received_NOTIFY)) { + repeat; + } + } + [] SIPP.receive(p_MSG) -> value v_MSG sender vc_sent_label { + tc_wait.stop; + f_getRouteMapIntoRecordRoute(v_MSG); + f_setHeadersOnReceiptOfRequest(v_MSG); + // Answer to the NOTIFY + f_send200OK(); + v_received_NOTIFY := true; + if (not (v_received_OK)) { + repeat; + } + } + } + } // end f_awaitingOkResponseAndNOTIFY_sendReply + + /** + * @desc await INFO request reply with 200 OK + */ + function f_awaitingINFO_sendReply( + in template(value) INFO_Request p_info + ) runs on SipComponent { + var INFO_Request v_request; + + tc_wait.start(PX_SIP_TWAIT); + alt { + [] SIPP.receive(p_info) -> value v_request sender vc_sent_label { + tc_wait.stop; + f_setHeadersOnReceiptOfRequest(v_request); + // Answer to the INFO + f_send200OK(); + } + } + } // end of f_awaitingINFO_sendReply + + /** + * @desc function awaiting for an incoming INVITE + * @param p_request expected message + */ + function f_awaitingINVITE( + template(present) INVITE_Request p_request := ? + ) runs on SipComponent { + var INVITE_Request v_INVITE_Request; + + tc_wait.start(PX_SIP_TWAIT); + alt { + [] SIPP.receive(p_request) -> value v_INVITE_Request sender vc_sent_label { + tc_wait.stop; + vc_ignore_invite := true; + vc_first_recv := true; // communication has started + f_setHeadersOnReceiptOfINVITE(v_INVITE_Request); + SIPP.send(m_Response_Base(c_statusLine100, vc_callId, vc_cSeq, vc_from, vc_to, vc_via)) to vc_sent_label; + } + [vc_interface_isc] SIPP.receive(mw_INVITE_Request_Base) -> value v_INVITE_Request sender vc_sent_label { + tc_wait.stop; + setverdict(fail); + f_setHeadersOnReceiptOfINVITE(v_INVITE_Request); + SIPP.send(m_Response_Base(c_statusLine100, vc_callId, vc_cSeq, vc_from, vc_to, vc_via)) to vc_sent_label; + // clear session - send 486 and await ACK + f_sendResponse(m_Response_Base(c_statusLine486, vc_callId, vc_cSeq, vc_caller_From, vc_caller_To, vc_via)); + f_awaitingACK(mw_ACK_Request_Base(?)); + // await 486 which go towards and send ACK + f_awaitingResponse(mw_Response_Base(c_statusLine486, ?, ?)); + f_SendACK(m_ACK_Request_Base(vc_requestUri, vc_callId, vc_cSeq, vc_from, vc_to, vc_via)); + syncPort.send(m_syncClientStop); + stop; + } + } + } // end f_awaitingINVITE + + /** + * @desc function awaiting for an incoming INVITE + * @param p_request expected message + */ + function f_awaitingINVITE_No100Response( + template(present) INVITE_Request p_request := ? + ) runs on SipComponent { + var INVITE_Request v_INVITE_Request; + + tc_wait.start(PX_SIP_TWAIT); + alt { + [] SIPP.receive(p_request) -> value v_INVITE_Request sender vc_sent_label { + tc_wait.stop; + vc_ignore_invite := true; + vc_first_recv := true; // communication has started + f_setHeadersOnReceiptOfINVITE(v_INVITE_Request); + // SIPP.send(m_Response_Base(c_statusLine100, vc_callId, vc_cSeq, vc_from, vc_to, vc_via)) to vc_sent_label; + } + } + } // end f_awaitingInviteRequest + + /** + * @desc function awaiting for an incoming INVITE + * @param p_request expected message + */ + function f_awaitingINVITE_PassOnTimeout( + template(present) INVITE_Request p_request := ? + ) runs on SipComponent { + var INVITE_Request v_INVITE_Request; + + tc_wait.start(PX_SIP_TWAIT); + alt { + [] SIPP.receive(p_request) -> value v_INVITE_Request sender vc_sent_label { + tc_wait.stop; + vc_ignore_invite := true; + vc_first_recv := true; // communication has started + vc_boo_request := true; + f_setHeadersOnReceiptOfINVITE(v_INVITE_Request); + SIPP.send(m_Response_Base(c_statusLine100, vc_callId, vc_cSeq, vc_from, vc_to, vc_via)) to vc_sent_label; + } + [] tc_wait.timeout { + vc_boo_request := false; + } + } + } // end f_awaitingInviteRequest + + /** + * @desc function awaiting ACK request + */ + function f_awaitingACK( + in template(present) ACK_Request p_ACK := ? + ) runs on SipComponent { + f_awaitingACK_setHeaders(p_ACK, false); + } // end f_awaitingACK + + /** + * @desc function awaiting ACK request + */ + function f_awaitingACK_setHeaders( + in template(present) ACK_Request p_ACK := ?, + in boolean p_setHeaders + ) runs on SipComponent { + var ACK_Request v_ACK_Request; + tc_ack.start; + + alt { + [] SIPP.receive(p_ACK) -> value v_ACK_Request { + tc_ack.stop; + if (p_setHeaders) { + f_setHeadersOnReceiptOfRequest(v_ACK_Request); + } + } + } + } // end f_awaitingACK_setHeaders + + /** + * @desc function awaiting BYE and sending 200OK response + * @param p_BYE expected BYE + */ + function f_awaitingBYE( + in template(present) BYE_Request p_BYE := ? + ) runs on SipComponent { + var BYE_Request v_BYE_Request; + + tc_wait.start(PX_SIP_TWAIT); + alt { + [] SIPP.receive(p_BYE) -> value v_BYE_Request sender vc_sent_label { + tc_wait.stop; + vc_ignore_bye := true; + f_setHeadersOnReceiptOfBYE(v_BYE_Request); + // f_send200OK(); + } + } + } // end f_awaitingBYE + + /** + * @desc function awaiting BYE and sending 200OK response + * @param p_BYE expected BYE + */ + function f_awaitingBYE_sendReply( + in template(present) BYE_Request p_BYE := ? + ) runs on SipComponent { + var BYE_Request v_BYE_Request; + + tc_wait.start(PX_SIP_TWAIT); + alt { + [] SIPP.receive(p_BYE) -> value v_BYE_Request sender vc_sent_label { + tc_wait.stop; + vc_ignore_bye := true; + f_setHeadersOnReceiptOfBYE(v_BYE_Request); + f_send200OK(); + } + } + } // end f_awaitingBYE_sendReply + + /** + * @desc function awaiting BYE and sending 200OK response + * @param p_BYE expected BYE + */ + function f_awaitingBYE_sendReply_PassOnTimeout( + in template(present) BYE_Request p_BYE := ? + ) runs on SipComponent { + var BYE_Request v_BYE_Request; + + tc_wait.start(PX_SIP_TWAIT); + alt { + [] SIPP.receive(p_BYE) -> value v_BYE_Request sender vc_sent_label { + tc_wait.stop; + vc_ignore_bye := true; + vc_boo_request := true; + f_setHeadersOnReceiptOfBYE(v_BYE_Request); + f_send200OK(); + } + [] tc_wait.timeout { + vc_boo_request := false; + } + } + } // end f_awaitingBYE_sendReply_PassOnTimeout + + /** + * @desc function awaiting CANCEL + * @param p_CANCEL expected CANCEL + */ + function f_awaitingCANCEL( + in template(present) CANCEL_Request p_CANCEL := ? + ) runs on SipComponent { + var CANCEL_Request v_MSG; + + tc_wait.start(PX_SIP_TWAIT); + alt { + [] SIPP.receive(p_CANCEL) -> value v_MSG sender vc_sent_label { + tc_wait.stop; + f_setHeadersOnReceiptOfRequest(v_MSG); + } + } + } // end f_awaitingCANCEL + /** + * @desc await MESSAGE request + */ + function f_awaitingMESSAGE( + in template(present) MESSAGE_Request p_MSG := ? + ) runs on SipComponent { + var MESSAGE_Request v_MSG; + + tc_wait.start(PX_SIP_TWAIT); + alt { + [] SIPP.receive(p_MSG) -> value v_MSG sender vc_sent_label { + tc_wait.stop; + f_setHeadersOnReceiptOfRequest(v_MSG); + } + [] SIPP.receive(mw_MESSAGE_Request_Base) -> value v_MSG sender vc_sent_label { + tc_wait.stop; + f_setHeadersOnReceiptOfRequest(v_MSG); + log("*** " &__SCOPE__& ": INFO: Received MESSAGE not as expected! ***"); + setverdict(fail); + } + } + } // end of f_awaitingMESSAGE + + /** + * @desc await MESSAGE request reply with 200 OK + */ + function f_awaitingMESSAGE_sendReply( + ) runs on SipComponent { + var MESSAGE_Request v_MSG; + + tc_wait.start(PX_SIP_TWAIT); + alt { + [] SIPP.receive(mw_MESSAGE_Request_Base) -> value v_MSG sender vc_sent_label { + tc_wait.stop; + f_setHeadersOnReceiptOfRequest(v_MSG); + // Answer to the MESSAGE + f_send200OK(); + } + } + } // end of f_awaitingMESSAGE_sendReply + + /** + * @desc await MESSAGE request + */ + function f_awaitingMESSAGE_sendReply_PassOnTimeout( + in template(present) MESSAGE_Request p_MSG := ? + ) runs on SipComponent { + var MESSAGE_Request v_MSG; + + tc_wait.start(PX_SIP_TWAIT); + alt { + [] SIPP.receive(p_MSG) -> value v_MSG sender vc_sent_label { + tc_wait.stop; + f_setHeadersOnReceiptOfRequest(v_MSG); + // Answer to the MESSAGE + // f_send200OK(); + vc_boo_request := true; + f_send200OK(); + // setverdict (pass); + } + [] tc_wait.timeout { + vc_boo_request := false; + // setverdict (pass); + } + } + } // end of f_awaitingMESSAGE_PassOnTimeout + + /** + * @desc await NOTIFY request + */ + function f_awaitingNOTIFY( + in template(present) NOTIFY_Request p_MSG := ? + ) runs on SipComponent { + var NOTIFY_Request v_MSG; + + tc_wait.start(PX_SIP_TWAIT); + alt { + [] SIPP.receive(p_MSG) -> value v_MSG sender vc_sent_label { + tc_wait.stop; + f_getRouteMapIntoRecordRoute(v_MSG); + f_setHeadersOnReceiptOfRequest(v_MSG); + } + } + } // end of f_awaitingNOTIFY + + /** + * @desc await NOTIFY request reply with 200 OK + */ + function f_awaitingNOTIFY_sendReply( + in template(present) NOTIFY_Request p_MSG := ? + ) runs on SipComponent { + var NOTIFY_Request v_MSG; + + tc_wait.start(PX_SIP_TWAIT); + alt { + [] SIPP.receive(p_MSG) -> value v_MSG sender vc_sent_label { + tc_wait.stop; + f_getRouteMapIntoRecordRoute(v_MSG); + f_setHeadersOnReceiptOfRequest(v_MSG); + // Answer to the NOTIFY + f_send200OK(); + } + } + } // end of f_awaitingNOTIFY_sendReply + + function f_awaitingNOTIFY_sendReply_postamble( + in template(present) NOTIFY_Request p_MSG := ? + ) runs on SipComponent { + var NOTIFY_Request v_MSG; + + tc_wait.start(5.0); + alt { + [] SIPP.receive(p_MSG) -> value v_MSG sender vc_sent_label { + tc_wait.stop; + f_getRouteMapIntoRecordRoute(v_MSG); + f_setHeadersOnReceiptOfRequest(v_MSG); + // Answer to the NOTIFY + f_send200OK(); + } + [] tc_wait.timeout { + // do nothing as receiving the Notify in de-registration is not part of the test body + } + } + } // end of f_awaitingNOTIFY_sendReply_postamble + + /** + * @desc await PRACK request reply with 200 OK + */ + function f_awaitingPRACK_sendReply( + in template(present) PRACK_Request p_MSG := ? + ) runs on SipComponent { + var PRACK_Request v_MSG; + + tc_wait.start(PX_SIP_TWAIT); + alt { + [] SIPP.receive(p_MSG) -> value v_MSG sender vc_sent_label { + tc_wait.stop; + f_setHeadersOnReceiptOfRequest(v_MSG); + // Answer to the PRACK + if (isvalue(vc_request.messageBody) and ischosen(vc_request.messageBody.sdpMessageBody)) { + f_sendResponse(m_Response_mbody(c_statusLine200, vc_callId, vc_cSeq, vc_caller_From, vc_caller_To, vc_via, omit, f_recordroute(), m_MBody_SDP(vc_sdp_local))); + } + else { + f_sendResponse(m_Response_ext(c_statusLine200, vc_callId, vc_cSeq, vc_caller_From, vc_caller_To, vc_via, omit, f_recordroute())); + } + } + } + } // end of f_awaitingPRACK_sendReply + + function f_awaitingPRACK( + in template(present) PRACK_Request p_MSG := ? + ) runs on SipComponent { + var PRACK_Request v_MSG; + + tc_wait.start(PX_SIP_TWAIT); + alt { + [] SIPP.receive(p_MSG) -> value v_MSG sender vc_sent_label { + tc_wait.stop; + f_setHeadersOnReceiptOfRequest(v_MSG); + } + } + } // end of f_awaitingPRACK + + /** + * @desc await PUBLISH request reply with 200 OK + */ + function f_awaitingPUBLISH_sendReply( + in template(present) PUBLISH_Request p_MSG := ? + ) runs on SipComponent { + var PUBLISH_Request v_MSG; + + tc_wait.start(PX_SIP_TWAIT); + alt { + [] SIPP.receive(p_MSG) -> value v_MSG sender vc_sent_label { + tc_wait.stop; + f_setHeadersOnReceiptOfRequest(v_MSG); + // Answer to the PUBLISH + f_send200OK(); + } + } + } // end of f_awaitingPUBLISH_sendReply + + /** + * @desc await UPDATE request + */ + function f_awaitingUPDATE( + in template(present) UPDATE_Request p_MSG := ? + ) runs on SipComponent { + var UPDATE_Request v_MSG; + + tc_wait.start(PX_SIP_TWAIT); + alt { + [] SIPP.receive(p_MSG) -> value v_MSG sender vc_sent_label { + tc_wait.stop; + f_setHeadersOnReceiptOfRequest(v_MSG); + } + } + } // end of f_awaitingUPDATE + + /** + * @desc await UPDATE request reply with 200 OK + */ + function f_awaitingUPDATE_sendReply( + in template(present) UPDATE_Request p_MSG := ? + ) runs on SipComponent { + var UPDATE_Request v_MSG; + + tc_wait.start(PX_SIP_TWAIT); + alt { + [] SIPP.receive(p_MSG) -> value v_MSG sender vc_sent_label { + tc_wait.stop; + f_setHeadersOnReceiptOfRequest(v_MSG); + // Answer to the UPDATE + if (isvalue(vc_request.messageBody) and ischosen(vc_request.messageBody.sdpMessageBody)) { + f_sendResponse(m_Response_mbody(c_statusLine200, vc_callId, vc_cSeq, vc_caller_From, vc_caller_To, vc_via, omit, f_recordroute(), m_MBody_SDP(vc_sdp_local))); + } + else { + f_sendResponse(m_Response_ext(c_statusLine200, vc_callId, vc_cSeq, vc_caller_From, vc_caller_To, vc_via, omit, f_recordroute())); + } + } + } + } // end of f_awaitingUPDATE_sendReply + + + /** + * @desc await REFER request + */ + function f_awaitingREFER( + in template(present) REFER_Request p_MSG := ? + ) runs on SipComponent { + var REFER_Request v_MSG; + + tc_wait.start(PX_SIP_TWAIT); + alt { + [] SIPP.receive(p_MSG) -> value v_MSG sender vc_sent_label { + tc_wait.stop; + f_setHeadersOnReceiptOfREFER(v_MSG); + } + } + } // end of f_awaitingUPDATE + + + + } // end AwaitingMessage + + group SendMessage { + + /** + * @desc send ACK message, update the route and recordRoute header fields depending on boolean flags + * @param p_request template of the message to be sent + */ + function f_SendACK( + template(value) ACK_Request p_request + ) runs on SipComponent { + // p_request.msgHeader.route := f_route(); // update the route header field depending on vc_boo_route + // n/a p_request.msgHeader.recordRoute := f_recordroute(); // update the route header field depending on vc_boo_route + SIPP.send(p_request) to vc_sent_label; + } + + /** + * @desc send BYE message, update the route and recordRoute header fields depending on boolean flags + * @param p_request template of the message to be sent + */ + function f_SendBYE( + template(value) BYE_Request p_request + ) runs on SipComponent { + SIPP.send(p_request) to vc_sent_label; + } + + /** + * @desc send CANCEL message + * @param p_request template of the message to be sent + */ + function f_SendCANCEL( + template(value) CANCEL_Request p_request + ) runs on SipComponent { + SIPP.send(p_request) to vc_sent_label; + } + + /** + * @desc send INFO message + * @param p_request template of the message to be sent + */ + function f_SendINFO( + template(value) INFO_Request p_request + ) runs on SipComponent { + f_setHeadersGeneral(vc_cSeq, "INFO"); // cseq, contact, branch, via + SIPP.send(p_request) to vc_sent_label; + } + + /** + * @desc send INVITE message + * @param p_request template of the message to be sent + */ + function f_SendINVITE( + template(value) INVITE_Request p_request + ) runs on SipComponent { + vc_requestFor407 := valueof(p_request); + SIPP.send(p_request) to vc_sent_label; + vc_request := vc_requestFor407; + if (PX_SIP_INVITE_AUTHENTICATION_ENABLED) { + a_altstep_401or407(); + } + } + + /** + * @desc send PRACK message + * @param p_request template of the message to be sent + */ + function f_SendPRACK( + ) runs on SipComponent { + var integer responseNum := 1; + var PRACK_Request prackReq; + if (isvalue(vc_response.msgHeader.rSeq) and + isvalue(vc_response.msgHeader.rSeq.responseNum)){ + responseNum := vc_response.msgHeader.rSeq.responseNum; + } + vc_rAck := valueof(m_RAck(vc_response.msgHeader.rSeq.responseNum, vc_cSeq.seqNumber, vc_cSeq.method)); + f_setHeadersGeneral(vc_cSeq, "PRACK"); // cseq, contact, branch, via + prackReq := valueof(m_PRACK_Request_Base(vc_requestUri, vc_callId, vc_cSeq, vc_from, vc_to, vc_via, vc_rAck)); + if (isvalue(vc_response.msgHeader.recordRoute)){ + prackReq.msgHeader.route := valueof(f_route()); + } + SIPP.send(prackReq) to vc_sent_label; + } + + /** + * @desc send PUBLISH message + * @param p_request template of the message to be sent + */ + function f_SendPUBLISH( + template(value) PUBLISH_Request p_request + ) runs on SipComponent { + SIPP.send(p_request) to vc_sent_label; + } + + /** + * @desc send REGISTER message + * @param p_request template of the message to be sent + */ + function f_SendREGISTER( + template(value) REGISTER_Request p_request + ) runs on SipComponent { + SIPP.send(p_request) to vc_sent_label; + } + + /** + * @desc send SUBSCRIBE message + * @param p_request template of the message to be sent + */ + function f_SendSUBSCRIBE( + template(value) SUBSCRIBE_Request p_request + ) runs on SipComponent { + SIPP.send(p_request) to vc_sent_label; + } + + /** + * @desc send UPDATE message + * @param p_request template of the message to be sent + */ + function f_SendUPDATE( + template(value) UPDATE_Request p_request + ) runs on SipComponent { + f_setHeadersGeneral(vc_cSeq, "UPDATE"); // cseq, contact, branch, via + p_request.msgHeader.cSeq := vc_cSeq; + p_request.msgHeader.contact := vc_contact; + p_request.msgHeader.via := vc_via; + vc_requestFor407 := valueof(p_request); + SIPP.send(p_request) to vc_sent_label; + if (PX_SIP_INVITE_AUTHENTICATION_ENABLED) { + a_altstep_401or407(); + } + } + + /** + * @desc function send MESSAGE message + * @param p_request template of the message to be sent + */ + function f_SendMESSAGE( + template(value) MESSAGE_Request p_request + ) runs on SipComponent { + SIPP.send(p_request) to vc_sent_label; + } + + /** + * @desc function send NOTIFY message + * @param p_request template of the notify to be sent + */ + function f_SendNOTIFY( + template(value) NOTIFY_Request p_request + ) runs on SipComponent { + SIPP.send(p_request) to vc_sent_label; + } + + /** + * @desc send REFER message + * @param p_request template of the message to be sent + */ + function f_SendREFER( + template(value) REFER_Request p_request + ) runs on SipComponent { + SIPP.send(p_request) to vc_sent_label; + } + + /** + * @desc send 200 OK + */ + function f_send200OK( + ) runs on SipComponent { + f_sendResponse(m_Response_Base(c_statusLine200, vc_callId, vc_cSeq, vc_caller_From, vc_caller_To, vc_via)); + } + + /** + * @desc send response + * @param p_request template of the message to be sent + */ + function f_sendResponse( + template(value) Response p_response + ) runs on SipComponent { + p_response.msgHeader.route := f_route(); // update the route header field depending on vc_boo_route + p_response.msgHeader.recordRoute := f_recordroute(); // update the route header field depending on vc_boo_route + SIPP.send(p_response) to vc_sent_label; + } + + + + } // end SendMessage + + group GlobalSteps { + /** + * @desc component initialization + * @param p_cSeq_s cSeq value to be assigned to the component variable + */ + function f_init_component( + inout CSeq p_cSeq_s + ) runs on SipComponent { + // Variables + vc_cSeq := p_cSeq_s; + + // Defaults + vc_def_catchSyncStop := activate(a_Sip_catchSyncStop()); + vc_default := activate(a_clearRegistration()); + } + + /** + * @desc component termination + */ + function f_terminate_component( + ) runs on SipComponent { + log("*** " &__SCOPE__& ": INFO: component terminated - forced! ***"); + deactivate; + stop; + } + + /** + * @desc component termination + */ + function f_componentStop( + ) runs on SipComponent { + syncPort.send(m_syncClientStop); + SIPP.clear; + stop; + } + + /** + * @desc function waits for particular time that allows the SUT to return to idle state + */ + function f_awaitSUTidle( + ) runs on SipComponent { + vc_ignore4xx := true; // allow 4xx in default + tc_noAct.start; + alt { + [] tc_noAct.timeout { + } + } + } + + /** + * @desc function waits for particular time before next expected message + */ + function f_wait( + float p_time + ) runs on SipComponent { + tc_noAct.start(p_time); + alt { + [] tc_noAct.timeout { + } + } + } + + /** + * @desc function cause termination of a PTC + * @param p_syncPoint dummy parameter (copied from the common lib) + */ + function f_check2Null( + in charstring p_syncPoint + ) runs on SipComponent { + // != pass does not work, because in case of "none" execution shall continue + if (getverdict == inconc or getverdict == fail) { + log("*** f_check2Null: INFO: Verdict evaluated to fail or inconc. Stopping test execution now ***"); + f_selfOrClientSyncAndVerdict(p_syncPoint, e_error); + } // end if + } + + /* + * + * @desc original copied from older LibCommon_VerdictControl + */ + function f_getVerdict( + ) return FncRetCode { + var FncRetCode v_ret := e_error; + if (getverdict == pass or getverdict == none) { + v_ret := e_success; + } + return v_ret; + } + + + + } // end group GlobalSteps + + group Registration { + + /** + * @desc registration and authentication with MD5 + * @param p_cSeq_s cseq parameter + * @param p_register register template + * @param p_auth flag indicating if authentication is needed + * @param p_emergency Set to true in case of emergency call + */ + function f_Registration( + inout CSeq p_cSeq_s, + out template(value) REGISTER_Request p_register, + in boolean p_auth, + in boolean p_emergency := false + ) runs on SipComponent { + if (PX_SIP_REGISTRATION) { + f_setHeaders_REGISTER(p_cSeq_s, p_emergency); + p_register := m_REGISTER_Request_Base(vc_requestUri, vc_callId, p_cSeq_s, vc_from, vc_to, vc_via_REG, vc_contact, vc_authorization); + f_SendREGISTER(p_register); // LibSip + // awaiting of 401 and sending 2nd REGISTER and awaiting 200 OK REGISTER + if (p_auth) { + // receiving 401 Unauthorized response. + // and Re-send REGISTER request with Authorization header + tc_resp.start; + alt { + [] SIPP.receive(mw_Response_Base(c_statusLine401, vc_callId, p_cSeq_s)) -> value vc_response { + tc_resp.stop; + f_setHeadersOnReceiptOfResponse(vc_response); + // set headers via, cseq and authorization + f_setHeaders_2ndREGISTER(p_cSeq_s); + p_register := m_REGISTER_Request_Base(vc_requestUri, vc_callId, p_cSeq_s, vc_from, vc_to, vc_via_REG, vc_contact, vc_authorization); + // Re-send protected REGISTER + f_SendREGISTER(p_register); // LibSip + // awaiting 200 OK REGISTER + f_awaitingOkResponse(p_cSeq_s); + f_getServiceRouteMapIntoRouteInRegistration(vc_response); + } + [] SIPP.receive(mw_Response_Base(c_statusLine200, vc_callId, p_cSeq_s)) -> value vc_response { + tc_resp.stop; + f_setHeadersOnReceiptOfResponse(vc_response); + f_getServiceRouteMapIntoRouteInRegistration(vc_response); + log("*** " &__SCOPE__& ": INFO: Authorization was not requested as expected ***"); + } + } + } + else { + f_awaitingOkResponse(p_cSeq_s); + f_getServiceRouteMapIntoRouteInRegistration(vc_response); + } + } + } // end function f_Registration + + /** + * @desc registration and authentication with MD5 + * @param p_cSeq_s cseq parameter + * @param p_register register template + * @param p_auth flag indicating if authentication is needed + */ + function f_Registration_withTemplate( + inout CSeq p_cSeq_s, + inout template(value) REGISTER_Request p_register, + in boolean p_auth + ) runs on SipComponent { + if (PX_SIP_REGISTRATION) { + if(not isbound(p_register)){ + f_setHeaders_REGISTER(p_cSeq_s); + p_register := m_REGISTER_Request_Base(vc_requestUri, vc_callId, p_cSeq_s, vc_from, vc_to, vc_via_REG, vc_contact, vc_authorization); + } + f_SendREGISTER(p_register); // LibSip + // awaiting of 401 and sending 2nd REGISTER and awaiting 200 OK REGISTER + if (p_auth) { + // receiving 401 Unauthorized response. + // and Re-send REGISTER request with Authorization header + tc_resp.start; + alt { + [] SIPP.receive(mw_Response_Base(c_statusLine401, vc_callId, p_cSeq_s)) -> value vc_response { + tc_resp.stop; + f_setHeadersOnReceiptOfResponse(vc_response); + // set headers via, cseq and authorization + f_setHeaders_2ndREGISTER(p_cSeq_s); + // p_register := m_REGISTER_Request_Base(vc_requestUri, vc_callId, p_cSeq_s, vc_from, vc_to, vc_via_REG, vc_contact, + // vc_authorization); + // Re-send protected REGISTER + p_register.requestLine.requestUri := vc_requestUri; + p_register.msgHeader.cSeq := vc_cSeq; + p_register.msgHeader.via := vc_via_REG; + p_register.msgHeader.authorization := vc_authorization; + f_SendREGISTER(p_register); // LibSip + // awaiting 200 OK REGISTER + f_awaitingOkResponse(p_cSeq_s); + f_getServiceRouteMapIntoRouteInRegistration(vc_response); + } + [] SIPP.receive(mw_Response_Base(c_statusLine200, vc_callId, p_cSeq_s)) -> value vc_response { + tc_resp.stop; + f_setHeadersOnReceiptOfResponse(vc_response); + f_getServiceRouteMapIntoRouteInRegistration(vc_response); + log("*** " &__SCOPE__& ": INFO: Authorization was not requested as expected ***"); + } + } + } + else { + f_awaitingOkResponse(p_cSeq_s); + f_getServiceRouteMapIntoRouteInRegistration(vc_response); + } + } + } // end function f_Registration_withTemplate + + + /** + * @desc remove registration + * @param p_cSeq_s cseq parameter + */ + function f_RemoveRegistration( + inout CSeq p_cSeq + ) runs on SipComponent { + var template(value) REGISTER_Request v_request; + var boolean v_receivedNotify := false; + + // + if (vc_DeregDone) { + f_componentStop(); + } + else { + vc_DeregDone := true; + } + + if (PX_SIP_REGISTRATION) { + f_setHeaders_deREGISTER(p_cSeq); + v_request := m_REGISTER_Request_expires(vc_requestUri, vc_callIdReg, p_cSeq, vc_from, vc_to, vc_via_REG, vc_contact, vc_authorization, "0"); + + f_SendREGISTER(v_request); + if (PX_SIP_REGISTER_AUTHENTICATION_ENABLED) { + // receiving 401 Unauthorized response. + // and Re-send REGISTER request with Authorization header + tc_resp.start; + alt { + [] SIPP.receive(mw_Response_Base(c_statusLine401, vc_callIdReg, p_cSeq)) -> value vc_response { + tc_resp.stop; + f_setHeadersOnReceiptOfResponse(vc_response); + // set headers via, cseq and authorization + f_setHeaders_2ndREGISTER(p_cSeq); + v_request := m_REGISTER_Request_expires(vc_requestUri, vc_callIdReg, p_cSeq, vc_from, vc_to, vc_via_REG, vc_contact, vc_authorization, "0"); + // v_request.msgHeader.route := f_route(); + // Re-send protected REGISTER + f_SendREGISTER(v_request); // LibSip + // awaiting 200 OK REGISTER + f_awaitingResponse(mw_Response_Base(c_statusLine200, vc_callIdReg, p_cSeq)); + } + [] SIPP.receive(mw_Response_Base(c_statusLine200, vc_callIdReg, p_cSeq)) -> value vc_response { + tc_resp.stop; + f_setHeadersOnReceiptOfResponse(vc_response); + // log ("Authorization was not requested as expected"); + } + [] a_awaitNotify(mw_NOTIFY_Request_Base(vc_callIdSub), v_receivedNotify) { + } + } + } + else { + tc_resp.start; + alt { + [] a_awaitingResponse(mw_Response_Base(c_statusLine200, vc_callIdReg, p_cSeq)) { + } + [] a_awaitNotify(mw_NOTIFY_Request_Base(vc_callIdSub), v_receivedNotify) { + } + } + } + + // await NOTIFY and send reply 200 OK + if (vc_subscribed and v_receivedNotify == false) { + f_awaitingNOTIFY_sendReply_postamble(mw_NOTIFY_Request_Base(vc_callIdReg)); + } + } + } // end f_RemoveRegistration + + /** + * @desc remove registration without authorization + * @param p_cSeq_s cseq parameter + */ + function f_RemoveRegistration_wo_authorization( + inout CSeq p_cSeq + ) runs on SipComponent { + if (PX_SIP_REGISTRATION) { + f_setHeaders_deREGISTER(p_cSeq); + f_SendREGISTER(m_REGISTER_Request_expires(vc_requestUri, vc_callIdReg, p_cSeq, vc_from, vc_to, vc_via, vc_contact, vc_authorization, "0")); + f_awaitingResponse(mw_Response_Base(c_statusLine200, vc_callIdReg, p_cSeq)); + } + } // end f_RemoveRegistration_wo_authorization + + + + } // end group Registration + + group Subscription { + + /** + * @desc UE send subscrbe, await on 200 OK, await notify and send 200 OK + * @param p_cSeq_s cseq parameter + * @param p_subscribe subscribe template + */ + function f_Subscription( + inout CSeq p_cSeq_s, + template(value) SUBSCRIBE_Request p_subscribe + ) runs on SipComponent { + // send SUBSCRIBE + f_SendSUBSCRIBE(p_subscribe); + // awaiting 200 OK SUBSCRIBE + // await NOTIFY and send reply 200 OK + f_awaitingOkResponseAndNOTIFY_sendReply(p_cSeq_s, mw_NOTIFY_Request_Base(vc_callId)); + } // end function f_Subscription + + /** + * @desc UE send subscrbe, await on 200 OK, await notify and send 200 OK + * @param p_cSeq_s cseq parameter + * @param p_subscribe subscribe template + * @param p_notify notify template + */ + function f_SubscriptionWithNotification( + inout CSeq p_cSeq_s, + template(value) SUBSCRIBE_Request p_subscribe, + template(present) NOTIFY_Request p_notify := ? + ) runs on SipComponent { + f_setHeaders_SUBSCRIBE(p_cSeq_s); + // send SUBSCRIBE + f_SendSUBSCRIBE(p_subscribe); + // awaiting 200 OK SUBSCRIBE + // await NOTIFY and send reply 200 OK + f_awaitingOkResponseAndNOTIFY_sendReply(p_cSeq_s, p_notify); + } // end function f_SubscriptionWithNotification + + /** + * @desc UE await subscrbe, send on 200 OK; possibility to handle also other SUBSCRIBE methods where event is different than reg + * @param p_cSeq_s cseq parameter + * @param p_subscribe subscribe template + */ + function f_awaitingSubscription( + template(present) SUBSCRIBE_Request p_subscribe := ? + ) runs on SipComponent { + var SUBSCRIBE_Request v_request; + + tc_wait.start(2.0); // awaiting of all SUBSCRIBES + alt { + [] SIPP.receive(p_subscribe) -> value v_request sender vc_sent_label { + f_setHeadersOnReceiptOfSUBSCRIBE(v_request); + f_send200OK(); + repeat; + } + [] SIPP.receive(mw_SUBSCRIBE_Request_Base) -> value v_request sender vc_sent_label { + f_setHeadersOnReceiptOfSUBSCRIBE(v_request); + f_send200OK(); + repeat; + } + [] tc_wait.timeout { + setverdict(pass); + } + } + } // end function f_awaitingSubscription + + + + } // end group Subscription + + group Preambles { + + /** + * @desc Set variables and default initialization for user profile + * @param p_userprofile user profile of call + * @param p_cSeq_s cseq parameter + */ + function f_SIP_preamble_woREG( + inout CSeq p_cSeq_s + ) runs on SipComponent { + // varables and altsteps + f_init_component(p_cSeq_s); + + // Preamble + //NOTE STF471: removed f_init_userprofile(p_userprofile); // assignment of PIXIT values to component variable + vc_sdp_local := valueof(m_SDP_bandwidth(m_media_dynPT(PX_SIP_SDP_DYN, PX_SIP_SDP_ENCODING, PX_SIP_SDP_CLOCKRATE, omit), vc_userprofile)); + } + + /** + * @desc Set variables and default initialization for user profile and handle registration and authentication with MD5 + * @param p_userprofile user profile of call + * @param p_cSeq_s cseq parameter + * @param p_register register template + */ + function f_SIP_preamble_withREG( + inout CSeq p_cSeq_s, + template(value) REGISTER_Request p_register + ) runs on SipComponent { + // preamble + f_SIP_preamble_woREG(p_cSeq_s); + + // Registration, Awaiting + f_Registration(p_cSeq_s, p_register, PX_SIP_REGISTER_AUTHENTICATION_ENABLED); + } + + + + } // end group Preambles + + group Postambles { + + /** + * @desc function send BYE and awaits reponse + * @param p_CallId parameter for outgoing BYE + * @param p_cSeq parameter for outgoing BYE + * @param p_from parameter for outgoing BYE + * @param p_to parameter for outgoing BYE + * @param p_reqHostPort parameter for outgoing BYE + * @param p_byeCause parameter for Release cause to be used + * in BYE and in Failure messages, former PX_SIP_BYE_CAUSE + */ + function f_terminateCall( + SipUrl p_requestUri, + CallId p_CallId, + inout CSeq p_cSeq, + From p_from, + template(value) To p_to, + integer p_byeCause + ) runs on SipComponent { + // Sending of a BYE request to release the call and expect a final response + f_SendBYE(m_BYE_Request_cause(p_requestUri, p_CallId, p_cSeq, p_from, p_to, vc_via, p_byeCause)); + + tc_resp.start; + alt { + [] SIPP.receive(mw_Response_Base(mw_statusLine1xx, p_CallId, p_cSeq)) { + repeat; + } + [] SIPP.receive(mw_Response_Base(mw_statusLineFinal, p_CallId, p_cSeq)) { + tc_resp.stop; + } + } + } // end function f_terminateCall + + function f_cancelCall( + template(value) CANCEL_Request p_request + ) runs on SipComponent { + // This function is called to bring back the IUT in idle condition + // in case of errors or unexpected behaviour. + // Sending of a CANCEL request with the same Cseq + f_setHeadersCANCEL(vc_cSeq); + f_SendCANCEL(p_request); + tc_resp.start; + alt { + [] SIPP.receive(mw_Response_Base(c_statusLine200, vc_callId, vc_cSeq)) { + tc_resp.stop; + } + } + } + + function f_cancelCall_await487( + template(value) CANCEL_Request p_request + ) runs on SipComponent { + // This function is called to bring back the IUT in idle condition + // in case of errors or unexpected behaviour. + // Sending of a CANCEL request with the same Cseq + f_cancelCall(p_request); + // set method on INVITE + vc_cSeq.method := "INVITE"; + + // await on 487 response and send ACK + f_awaitingResponse(mw_Response_Base(c_statusLine487, vc_callId, vc_cSeq)); + f_SendACK(m_ACK_Request_Base(vc_requestUri, vc_callId, vc_cSeq, vc_from, vc_to, vc_via)); + } + + function f_awaitCancelCall_send487( + template(present) CANCEL_Request p_request := ? + ) runs on SipComponent { + f_awaitingCANCEL(p_request); + f_sendResponse(m_Response_Base(c_statusLine200, vc_callId, vc_cSeq, vc_caller_From, vc_caller_To, vc_via)); + + // set method on INVITE + vc_cSeq.method := "INVITE"; + + // send 487 response and await ACK + f_sendResponse(m_Response_Base(c_statusLine487, vc_callId, vc_cSeq, vc_caller_From, vc_caller_To, vc_via)); + // await ACK + f_awaitingACK(mw_ACK_Request_Base(vc_callId)); + } + + altstep a_receiveCANCELorNothing( + in template(present) CANCEL_Request p_CANCEL := ? + ) runs on SipComponent { + var CANCEL_Request v_MSG; + [] SIPP.receive(p_CANCEL) -> value v_MSG sender vc_sent_label { + f_setHeadersOnReceiptOfRequest(v_MSG); + // Answer to the CANCEL + f_send200OK(); + } + } + + altstep a_awaitNotify( + in template(present) NOTIFY_Request p_MSG := ?, + inout boolean p_receivedNotify + ) runs on SipComponent { + var NOTIFY_Request v_MSG; + [vc_subscribed] SIPP.receive(p_MSG) -> value v_MSG sender vc_sent_label { + p_receivedNotify := true; + f_getRouteMapIntoRecordRoute(v_MSG); + f_setHeadersOnReceiptOfRequest(v_MSG); + // Answer to the NOTIFY + f_send200OK(); + repeat; + } + } + + + + } // end group Postambles + + group SipChecks { + + + /** + * @desc check the presence of conversation at SIP side + * @param p_checkConversation boolean to perform check if conversation check is implemented. + * former PX_SIP_CHECK_CONVERSATION + */ + function f_check_Conversation( + boolean p_checkConversation := false + ) runs on SipComponent { + var charstring v_question := "confirm if conversation at SIP port"; + + if (p_checkConversation) { + opPort + .call( + s_SIP_conversation: + { + v_question, + - + } + ) { + [] opPort + .getreply( + s_SIP_conversation: + { + -, + true + } + ) { + } + [] opPort + .getreply( + s_SIP_conversation: + { + -, + false + } + ) { + all timer.stop; + setverdict(fail); + syncPort.send(m_syncClientStop); + stop; + } + }; + } + + f_selfOrClientSyncAndVerdict(c_uPlane, f_getVerdict()); // Note: implemented in test bodies + return; + } // end of f_check_Conversation + + /** + * @desc check the presence of conversation at SIP side + * @param p_checkRinging boolean to perform check if ringing check is implemented. + * former PX_SIP_CHECK_RINGING + */ + function f_check_Ringing( + boolean p_checkRinging := false + ) runs on SipComponent { + var charstring v_question := "confirm if ringing at SIP port"; + + if (p_checkRinging) { + opPort + .call( + s_SIP_ringing: + { + v_question, + - + } + ) { + [] opPort + .getreply( + s_SIP_ringing: + { + -, + true + } + ) { + } + [] opPort + .getreply( + s_SIP_ringing: + { + -, + false + } + ) { + all timer.stop; + setverdict(fail); + syncPort.send(m_syncClientStop); + stop; + } + }; + } + + f_selfOrClientSyncAndVerdict(c_Ringing, f_getVerdict()); + return; + } // end of f_check_Ringing + + /** + * @desc check the announcement at SIP side (UE A) + * @param p_checkConversation boolean to perform check if conversation check is implemented. + * former PX_SIP_CHECK_CONVERSATION + */ + function f_check_AnnouncementUE_A( + boolean p_checkConversation := false + ) runs on SipComponent { + var charstring v_question := "confirm if announcement at UE A"; + + if (p_checkConversation) { + opPort + .call( + s_SIP_announcementA: + { + v_question, + - + } + ) { + [] opPort + .getreply( + s_SIP_announcementA: + { + -, + true + } + ) { + } + [] opPort + .getreply( + s_SIP_announcementA: + { + -, + false + } + ) { + all timer.stop; + setverdict(fail); + syncPort.send(m_syncClientStop); + stop; + } + }; + } + + f_selfOrClientSyncAndVerdict(c_annoucA, f_getVerdict()); + return; + } // end of f_check_AnnouncementUE_A + + /** + * @desc check the announcement at SIP side (UE B) + * @param p_checkConversation boolean to perform check if conversation check is implemented. + * former PX_SIP_CHECK_CONVERSATION + */ + function f_check_AnnouncementUE_B( + boolean p_checkConversation := false + ) runs on SipComponent { + var charstring v_question := "confirm if announcement at UE B"; + + if (p_checkConversation) { + opPort + .call( + s_SIP_announcementB: + { + v_question, + - + } + ) { + [] opPort + .getreply( + s_SIP_announcementB: + { + -, + true + } + ) { + } + [] opPort + .getreply( + s_SIP_announcementB: + { + -, + false + } + ) { + all timer.stop; + setverdict(fail); + syncPort.send(m_syncClientStop); + stop; + } + }; + } + + f_selfOrClientSyncAndVerdict(c_annoucB, f_getVerdict()); + return; + } // end of f_check_AnnouncementUE_B + + /** + * @desc check the announcement at SIP side + * @param p_checkConversation boolean to perform check if conversation check is implemented. + * former PX_SIP_CHECK_CONVERSATION + */ + function f_check_Announcement( + boolean p_checkConversation := false + ) runs on SipComponent { + var charstring v_question := "confirm if announcement at SIP side"; + + if (p_checkConversation) { + opPort + .call( + s_SIP_announcement: + { + v_question, + - + } + ) { + [] opPort + .getreply( + s_SIP_announcement: + { + -, + true + } + ) { + } + [] opPort + .getreply( + s_SIP_announcement: + { + -, + false + } + ) { + all timer.stop; + setverdict(fail); + syncPort.send(m_syncClientStop); + stop; + } + }; + } + + f_selfOrClientSyncAndVerdict(c_annouc, f_getVerdict()); + return; + } // end of f_check_Announcement + + /** + * @desc check the Voice message at SIP side + * @param p_checkConversation boolean to perform check if conversation check is implemented. + * former PX_SIP_CHECK_CONVERSATION + */ + function f_check_VoiceMessage( + boolean p_checkConversation := false + ) runs on SipComponent { + var charstring v_question := "confirm if voice message at SIP side"; + + if (p_checkConversation) { + opPort + .call( + s_SIP_voiceMessage: + { + v_question, + - + } + ) { + [] opPort + .getreply( + s_SIP_voiceMessage: + { + -, + true + } + ) { + } + [] opPort + .getreply( + s_SIP_voiceMessage: + { + -, + false + } + ) { + all timer.stop; + setverdict(fail); + syncPort.send(m_syncClientStop); + stop; + } + }; + } + + f_selfOrClientSyncAndVerdict(c_voicem, f_getVerdict()); + return; + } // end of f_check_Announcement + + /** + * @desc check the stop of media stream + * @param p_checkConversation boolean to perform check if conversation check is implemented. + * former PX_SIP_CHECK_CONVERSATION + */ + function f_check_MediaStopped( + boolean p_checkConversation := false + ) runs on SipComponent { + var charstring v_question := "confirm if media stream stopped"; + + if (p_checkConversation) { + opPort + .call( + s_SIP_mediastopped: + { + v_question, + - + } + ) { + [] opPort + .getreply( + s_SIP_mediastopped: + { + -, + true + } + ) { + } + [] opPort + .getreply( + s_SIP_mediastopped: + { + -, + false + } + ) { + all timer.stop; + setverdict(fail); + syncPort.send(m_syncClientStop); + stop; + } + }; + } + + f_selfOrClientSyncAndVerdict(c_uPlaneStop, f_getVerdict()); + return; + } // end of f_check_MediaStopped + + } + + group DefaultsTestStep { + + + /** + * @desc This default handles receiving of the sync server STOP message and calls the RT HUT postamble. (copy from common lib) + */ + altstep a_Sip_catchSyncStop( + ) runs on SipComponent { + [] syncPort.receive(m_syncServerStop) { + tc_sync.stop; + log("*** a_Sip_catchSyncStop: INFO: Test component received STOP signal from MTC - going to IDLE state *** "); + syncPort.send(m_syncClientStop); + // in case if deregistration was not done + // f_RemoveRegistration(vc_cSeq); + f_terminate_component(); + log("*** a_Sip_catchSyncStop: INFO: TEST COMPONENT NOW STOPPING ITSELF! *** "); + setverdict(inconc); + stop; + } + } + + + /** + * @desc main default altstep to handle unexpected messages and timeout + * @verdict fail for all unexpected branches + */ + altstep a_clearRegistration( + ) runs on SipComponent { + var Response v_response; + var Request v_request; + var INFO_Request v_info_request; + var NOTIFY_Request v_notify_request; + var SUBSCRIBE_Request v_subscribe_request; + var BYE_Request v_bye_request; + var CANCEL_Request v_cancel_request; + var REGISTER_Request v_register_request; + var CSeq v_cSeq; + [] any timer.timeout { + setverdict(fail); + all timer.stop; + // f_SendCANCEL(m_CANCEL_Request(vc_callId, vc_cSeq, vc_from, vc_cancel_To, vc_reqHostPort, vc_via )); // difference between registration + // state or transaction state + vc_callId := vc_callIdReg; + f_RemoveRegistration(vc_cSeq); + } + // allow repeated INVITEs + [vc_ignore_invite] SIPP.receive(mw_INVITE_Request_Base) { + repeat; + } + // allow repeated BYEs after ack of the first BYE + [vc_ignore_bye] SIPP.receive(mw_BYE_Request_Base(?)) { + repeat; + } + [] SIPP.receive(mw_ACK_Request_Base(?)) { + repeat; + } + // allow 100 replies + [] SIPP.receive(mw_Response_Base(c_statusLine100, ?, ?)) { + repeat; + } + // ignore 181 if flag is set (following TS 183004 4.5.2.1) + [vc_ignore181] SIPP.receive(mw_Response_Base(c_statusLine181, vc_callId, vc_cSeq)) -> value v_response sender vc_sent_label { + v_cSeq := valueof(v_response.msgHeader.cSeq); + f_setHeadersOnReceiptOfResponse(v_response); // CSeq is mandatory + repeat; + } + // according to SIP chap.8.1.3.2 + [] SIPP.receive(mw_Response_Base(c_statusLine183, vc_callId, vc_cSeq)) { + repeat; + } + // ignore 484 if flag is set + [vc_ignore484] SIPP.receive(mw_Response_Base(c_statusLine484, vc_callId, vc_cSeq)) { + repeat; + } + [vc_ignore4xx] SIPP.receive(mw_Response_Base(mw_statusLine4xx, vc_callId, ?)) -> value v_response sender vc_sent_label { + v_cSeq := valueof(v_response.msgHeader.cSeq); + f_setHeadersOnReceiptOfResponse(v_response); // CSeq is mandatory + f_SendACK(m_ACK_Request_route(vc_requestUri, vc_callId, v_response.msgHeader.cSeq, vc_from, vc_to, vc_via, vc_route)); + repeat; + } + [vc_ignore200OKinv] SIPP.receive(mw_Response_Base(c_statusLine200, vc_callId, ?)) { + repeat; + } + [] SIPP.receive(mw_INFO_Request_Base(vc_callId)) -> value v_info_request sender vc_sent_label { + f_setHeadersOnReceiptOfRequest(v_info_request); + f_send200OK(); + repeat; + } + // awaiting of Notify + [] SIPP.receive(mw_NOTIFY_Request_Base(vc_callId)) -> value v_notify_request sender vc_sent_label { + f_setHeadersOnReceiptOfRequest(v_notify_request); + f_send200OK(); + repeat; + } + // awaiting of subscribe from UE + [vc_ignore_subscribe] SIPP.receive(mw_SUBSCRIBE_Request_Base) -> value v_subscribe_request sender vc_sent_label { + f_setHeadersOnReceiptOfSUBSCRIBE(v_subscribe_request); + f_send200OK(); + repeat; + } + // awaiting of subscribe on proxy + [] SIPP.receive(mw_SUBSCRIBE_Request_Base) -> value v_subscribe_request sender vc_sent_label { + f_setHeadersOnReceiptOfRequest(v_subscribe_request); + f_sendResponse(m_Response_Contact(c_statusLine200, vc_callId, vc_cSeq, vc_callee_From, vc_callee_To, vc_via, vc_contact)); + // f_setHeadersGeneral(vc_cSeq, "NOTIFY"); // cseq, contact, branch, via + // f_SendNOTIFY(m_NOTIFY_Request_contact(vc_requestUri, vc_callId, vc_cSeq, vc_from, vc_to, vc_via, vc_contact)); + f_SendNOTIFY(m_NOTIFY_Request_contact(v_subscribe_request.msgHeader.contact.contactBody.contactAddresses[0].addressField.nameAddr.addrSpec, vc_callId, vc_cSeq, vc_callee_From, vc_callee_To, vc_via, vc_contact)); + f_awaitingOkResponse(vc_cSeq); + repeat; + } + // unexpected BYE is acknowledged to avoid retransmissions + [] SIPP.receive(mw_BYE_Request_Base(?)) -> value v_bye_request sender vc_sent_label { + setverdict(fail); + f_setHeadersOnReceiptOfRequest(v_bye_request); + f_send200OK(); + f_RemoveRegistration(vc_cSeq); + } + // unexpected CANCEL is acknowledged to avoid retransmissions + [] SIPP.receive(mw_CANCEL_Request_Base(?)) -> value v_cancel_request sender vc_sent_label { + setverdict(fail); + f_setHeadersOnReceiptOfRequest(v_cancel_request); + // Answer to the CANCEL + f_send200OK(); + f_RemoveRegistration(vc_cSeq); + } + // catch 4xx response + [] SIPP.receive(mw_Response_Base(mw_statusLine4xx, vc_callId, ?)) -> value v_response sender vc_sent_label { + setverdict(fail); + if (v_response.msgHeader.cSeq.method == "INVITE") { + v_cSeq := valueof(v_response.msgHeader.cSeq); + f_setHeadersOnReceiptOfResponse(v_response); // CSeq is mandatory + LibSip_Steps.f_setHeadersACK(); + f_SendACK(m_ACK_Request_route(vc_requestUri, vc_callId, v_response.msgHeader.cSeq, vc_from, vc_to, vc_via, vc_route)); + } + f_RemoveRegistration(vc_cSeq); + } + // catch 5xx response + [] SIPP.receive(mw_Response_Base(mw_statusLine5xx, vc_callId, ?)) -> value v_response sender vc_sent_label { + setverdict(fail); + if (v_response.msgHeader.cSeq.method == "INVITE") { + v_cSeq := valueof(v_response.msgHeader.cSeq); + f_setHeadersOnReceiptOfResponse(v_response); // CSeq is mandatory + LibSip_Steps.f_setHeadersACK(); + f_SendACK(m_ACK_Request_route(vc_requestUri, vc_callId, v_response.msgHeader.cSeq, vc_from, vc_to, vc_via, vc_route)); + } + f_RemoveRegistration(vc_cSeq); + } + // catch invalid REGISTER + [] SIPP.receive(mw_REGISTER_Request_Base) -> value v_register_request sender vc_sent_label { + setverdict(fail); + f_componentStop(); + } + // any + [] SIPP.receive { + setverdict(fail); + all timer.stop; + // f_setHeadersCANCEL(vc_cSeq); + // f_SendCANCEL(m_CANCEL_Request_Base(vc_requestUri, vc_callId, vc_cSeq, vc_from, vc_cancel_To, vc_via )); // difference between + // registration state or transaction state + f_RemoveRegistration(vc_cSeq); + } + } + + /** + * @desc altstep handle authentication for INVITE message + */ + altstep a_altstep_401or407( + ) runs on SipComponent { + var CommaParam_List v_challenge; + var Credentials v_Credentials; + var Response v_Response; + var Request v_Request := vc_requestFor407; + [] any port.check(receive) { + + tc_resp.start; + alt { + [] SIPP.receive(mw_Response_Base((c_statusLine401, c_statusLine407), vc_callId, vc_cSeq)) -> value v_Response { + tc_resp.stop; + // get tag from To header if available + vc_to := v_Response.msgHeader.toField; + if (vc_cSeq.method == "INVITE") { + // send ACK + f_SendACK(m_ACK_Request_Base(vc_requestUri, vc_callId, vc_cSeq, vc_from, vc_to, vc_via)); + } + // resent the INVITE message with Proxyauthorization header include + // Extract challenge and calculate credentials for a response. + if ( + ischosen( + v_Response.msgHeader.proxyAuthenticate.challenge + .otherChallenge // instead of digestCln (changed by axr to comply to alcatel) + ) + ) { + v_challenge := v_Response.msgHeader.proxyAuthenticate.challenge.otherChallenge.authParams; + v_Credentials := f_calculatecCredentials(vc_userprofile, vc_requestFor407.msgHeader.cSeq.method, v_challenge); + } + else { + log("*** " &__SCOPE__& ": INFO: No scheme in Proxy Authenticate header!!! ***"); + setverdict(inconc); + stop; + } + + vc_branch := c_branchCookie & f_getRndTag(); + vc_via := { + fieldName := VIA_E, + viaBody := {valueof(m_ViaBody_currIpaddr(vc_branch, vc_userprofile))} + }; + + v_Request.msgHeader.via := vc_via; + // Increment CSeq sequence number of and add the credentials + // to the original saved INVITE message. + vc_cSeq.method := vc_requestFor407.msgHeader.cSeq.method; + vc_cSeq.seqNumber := vc_cSeq.seqNumber + 1; + v_Request.msgHeader.cSeq.seqNumber := vc_cSeq.seqNumber; + v_Request.msgHeader.proxyAuthorization.fieldName := PROXY_AUTHORIZATION_E; + v_Request.msgHeader.proxyAuthorization.credentials := {v_Credentials}; + + // Re-send the saved INVITE with Authorization header + // included. + SIPP.send(v_Request) to vc_sent_label; + } + } + } + } + + } // end of group DefaultsTestStep +} // end module LibSip_Steps diff --git a/ttcn/patch_sip_titan/LibSip_Templates.ttcn b/ttcn/patch_sip_titan/LibSip_Templates.ttcn new file mode 100755 index 0000000000000000000000000000000000000000..e961d635e3a07f0630022b6ed4c5e16197ba3e74 --- /dev/null +++ b/ttcn/patch_sip_titan/LibSip_Templates.ttcn @@ -0,0 +1,4612 @@ +/** + * @author STF 346, STF366, STF368, STF369, STF450, STF471 + * @version $Id: LibSip_Templates.ttcn 656 2018-02-16 08:32:25Z genoudoli $ + * @desc This module defines SIP Templates for message, header, and + * structured types.
+ * Note that any changes made to the definitions in this module + * may be overwritten by future releases of this library + * End users are encouraged to contact the distributers of this + * module regarding their modifications or additions. + * This module is part of LibSipV3. + * @remark Any additions to the templates shall follow the design rules and always modify base templates only; Existing templates shall not be changed or removed - change requests shall be made to http://t-ort.etsi.org + */ +module LibSip_Templates { + // LibSip + import from LibSip_SIPTypesAndValues all; + import from LibSip_SDPTypes all; + import from LibSip_Interface all; + import from LibSip_PIXITS all; + import from LibSip_XMLTypes all; + import from LibSip_SimpleMsgSummaryTypes all; + import from LibSip_MessageBodyTypes all; + import from LibSip_Common all; + + import from NoTargetNamespace language "XSD" all + with { + extension "File:../xsd/Ims3gpp.xsd"; + } + + import from urn_ietf_params_xml_ns_conference_info language "XSD" all + with { + extension "File:../xsd/CONF.xsd"; + } + + import from http_uri_etsi_org_ngn_params_xml_simservs_pstn language "XSD" all + with { + extension "File:../xsd/PSTN.xsd"; + } + + import from http_uri_etsi_org_ngn_params_xml_simservs_xcap language "XSD" all + with { + extension "File:../xsd/SupplementaryServices.xsd"; + } + + import from http_uri_etsi_org_ngn_params_xml_simservs_mcid language "XSD" all + with { + extension "File:../xsd/MCID.xsd"; + } + + import from urn_ietf_params_xml_ns_resource_lists language "XSD" all + with { + extension "File:../xsd/ResourceList.xsd"; + } + + import from http_uri_etsi_org_ngn_params_xml_comm_div_info language "XSD" all + with { + extension "File:../xsd/CDIVN.xsd"; + } + + import from urn_3gpp_ns_cw_1_0 language "XSD" all + with { + extension "File:../xsd/cw.xsd"; + } + + group SubFields { + + template(value) Addr_Union m_AddrUnion_NameAddr(template(value) NameAddr p_nameAddr) := {nameAddr := p_nameAddr} + + template(value) Addr_Union m_AddrUnion_DisplayAndSipUrl( + template(value) DisplayName p_displayName, + template(value) SipUrl p_addrSpec + ) := { + nameAddr := m_CallingAddr(p_displayName, p_addrSpec) + } + + template(value) NameAddr m_NameAddr( + template(omit) DisplayName p_displayName := omit, + template(value) SipUrl p_addrSpec + ) := { + displayName := p_displayName, + addrSpec := p_addrSpec + } + + template(value) NameAddr m_CallingAddr( + template(value) DisplayName p_displayName, + template(value) SipUrl p_addrSpec + ) := m_NameAddr(p_displayName, p_addrSpec); + + template(present) NameAddr mw_NameAddr( + template DisplayName p_displayName, + template(present) SipUrl p_addrSpec := ? + ) := { + displayName := p_displayName, + addrSpec := p_addrSpec + } + + template(present) CommaParam_List mw_digestResponse( + template(present) GenericParam p_genericParam := ? + ) := superset(p_genericParam); + + //* c_Integrity_protected_yes + /** + * @desc send template for parameter list with CPC set to a specific value + * @param p_ISUP_CPC_value CPC parameter value + * former PX_SIP_ISUP_CPC_VALUE + */ + template(value) SemicolonParam_List m_cpc( + template(value) charstring p_ISUP_CPC_value := "prison" + ) := { + { + "cpc", + {tokenOrHost := p_ISUP_CPC_value} + } + } + + template(value) SemicolonParam_List m_ReasonParams( + template(omit) GenValue p_cause := omit, + template(value) GenValue p_text + ) := { + m_Cause(p_cause), m_Text(p_text) + } + + template(present) SemicolonParam_List mw_ReasonParams( + template GenValue p_cause, + template GenValue p_text + ) := { + mw_Cause_base(p_cause), mw_Text(p_text) + } + + template(value) ReasonValue m_ReasonValue_Base := { + token := "", + reasonParams := omit + } + + template(present) ReasonValue mw_ReasonValue_Base := { + token := ?, + reasonParams := * + } + + template(value) ReasonValue m_ReasonValue_param( + template(value) GenValue p_cause, + template(value) GenValue p_text + ) modifies m_ReasonValue_Base := { + reasonParams := m_ReasonParams(p_cause, p_text) + } + + template(present) ReasonValue mw_ReasonValue_param( + template GenValue p_cause, + template GenValue p_text + ) modifies mw_ReasonValue_Base := { + reasonParams := mw_ReasonParams(p_cause, p_text) + } + + template(value) ReasonValue m_ReasonValue( + template(value) GenValue p_cause, + template(value) GenValue p_text + ) modifies m_ReasonValue_param := { + token := "Q.850" + } + + template(present) ReasonValue mw_ReasonValue( + template GenValue p_cause, + template GenValue p_text + ) modifies mw_ReasonValue_param := { + token := "Q.850" + } + + template(value) ReasonValue m_ReasonValueSIP( + template(value) GenValue p_cause, + template(value) GenValue p_text + ) modifies m_ReasonValue_param := { + token := "SIP" + } + + template(present) ReasonValue mw_ReasonValueSIP( + template GenValue p_cause, + template GenValue p_text + ) modifies mw_ReasonValue_param := { + token := "SIP" + } + + template(present) RouteBody mw_routeBody( + template(present) SipUrl p_sipurl := ? + ) := { + nameAddr := mw_NameAddr(*, p_sipurl), + rrParam := * + } + + template(value) SentProtocol m_SentProtocol( + template(value) charstring p_protocol + ) := { + protocolName := c_sipName, + protocolVersion := c_sipVersion, + transport := p_protocol + } + + template(value) SipUrl m_BasicSipUrl := { + scheme := (c_sipScheme), + components := { + sip := { + userInfo := { + userOrTelephoneSubscriber := "", //* charstring + password := + omit //* optional charstring + }, + hostPort := { + host := omit, //* hostname, IPv4 or IPv6 as a charstring + portField := + omit //* p_userprofile.currPort - optional integer + } + } + }, + urlParameters := omit, + headers := omit + } + + template(value) SipUrl m_SipUrl_currDomain_Base( + template(value) SipUserProfile p_userprofile + ) modifies m_BasicSipUrl := { + components := { + sip := { + userInfo := { + userOrTelephoneSubscriber := p_userprofile.publUsername + } + } + } + } + + template(value) SipUrl m_SipUrl_currDomain( + template(value) SipUserProfile p_userprofile + ) modifies m_SipUrl_currDomain_Base := { + components := { + sip := { + hostPort := { + host := + p_userprofile + .homeDomain //* hostname, IPv4 or IPv6 as a charstring + } + } + } + } + + template(value) SipUrl m_SipUrl_contactIpaddr( + template(value) SipUserProfile p_userprofile + ) modifies m_SipUrl_currDomain_Base := { + components := { + sip := { + hostPort := { + host := p_userprofile.contactIpaddr, //* hostname, IPv4 or IPv6 as a charstring + portField := + p_userprofile + .contactPort //* optional integer + } + } + } + } + /** + * @desc send template with SIP userinfo + * @param p_userprofile SIP user profile values + * @param p_ISUP_CPC_value CPC parameter value + * former PX_SIP_ISUP_CPC_VALUE + */ + template(value) SipUrl m_SipUrl_contactIpaddrAndCpc( + template(value) SipUserProfile p_userprofile, + template(value) charstring p_ISUP_CPC_value := "prison" + ) modifies m_SipUrl_contactIpaddr := { + components := { + sip := { + userInfo := { + userOrTelephoneSubscriber := + valueof(p_userprofile.publUsername) & "; cpc=" & + valueof(p_ISUP_CPC_value) + } + } + } + } + + template(value) SipUrl m_SipUrl_currIpaddr( + template(value) SipUserProfile p_userprofile + ) modifies m_SipUrl_currDomain_Base := { + components := { + sip := { + hostPort := { + host := p_userprofile.currIpaddr, //* hostname, IPv4 or IPv6 as a charstring + portField := + p_userprofile + .currPort //* optional integer + } + } + } + } + + template(value) SipUrl m_SipUrl_Anonymous modifies m_BasicSipUrl := { + components := { + sip := { + userInfo := { + userOrTelephoneSubscriber := + "Anonymous" //* charstring + }, + hostPort := { + host := + "Anonymous.invalid" //* hostname, IPv4 or IPv6 as a charstring + } + } + } + } + + template(value) SipUrl m_SipUrl_NumberHostHeader( + template(value) charstring p_number, + template(value) charstring p_host, + template(omit) AmpersandParam_List p_urlParameters := omit + ) modifies m_BasicSipUrl := { + components := { + sip := { + userInfo := {userOrTelephoneSubscriber := p_number}, + hostPort := {host := p_host} + } + }, + urlParameters := p_urlParameters + } + + template(value) SipUrl m_SipUrl_NumberHostParam( + template(value) charstring p_number, + template(value) charstring p_host, + template(omit) AmpersandParam_List p_urlParameters := omit + ) modifies m_SipUrl_NumberHostHeader := { + components := {sip := {hostPort := {portField := c_defaultSipPort}}} + } + + template(value) SipUrl m_SipUrl_NumberHostParam_woPort( + template(value) charstring p_number, + template(value) charstring p_host, + template(omit) AmpersandParam_List p_urlParameters := omit + ) modifies m_SipUrl_NumberHostParam := { + components := {sip := {hostPort := {portField := omit}}} + } + + template(present) SipUrl m_BasicTelUrl := { + scheme := (c_telScheme), + components := {tel := {subscriber := ""}}, + urlParameters := omit, + headers := omit + } + + template(value) SipUrl m_TelUrl_publUser( + template(value) SipUserProfile p_userprofile + ) modifies m_BasicTelUrl := { + components := { + tel := { + subscriber := + p_userprofile + .publUsername //* charstring + } + } + } + + template(present) SipUrl mw_TelUrl := { + scheme := c_telScheme, + components := {tel := {subscriber := ?}}, + urlParameters := *, + headers := * + } + + template(present) SipUrl mw_SipUrl := { + scheme := c_sipScheme, + components := { + sip := { + userInfo := { + userOrTelephoneSubscriber := ?, + password := * + }, + hostPort := { + host := *, + portField := * + } + } + }, + urlParameters := *, + headers := * + } + + template(present) SipUrl mw_TelSip_unavailableInvalidUri := (mw_TelSip_unavailableInvalidUri1, mw_TelSip_unavailableInvalidUri2); + + template(present) SipUrl mw_TelSip_unavailableInvalidUri1 modifies mw_SipUrl := { + components := { + sip := { + userInfo := { + userOrTelephoneSubscriber := "unavailable" + }, + hostPort := { + host := "anonymous.invalid", + portField := c_defaultSipPort + } + } + } + } + template(present) SipUrl mw_TelSip_unavailableInvalidUri2 modifies mw_TelUrl := { + components := {tel := {subscriber := "unavailable"}} + } + + template(present) SipUrl mw_TelSip_unavailableUri( + template(value) charstring p_host + ) := (mw_TelSip_unavailableUri1, mw_TelSip_unavailableUri2(p_host)); + + template(present) SipUrl mw_TelSip_unavailableUri1 modifies mw_TelUrl := { + components := {tel := {subscriber := "unavailable"}} + } + + template(present) SipUrl mw_TelSip_unavailableUri2( + template(value) charstring p_host + ) modifies mw_SipUrl := { + components := { + sip := { + userInfo := { + userOrTelephoneSubscriber := "unavailable" + }, + hostPort := { + host := p_host, + portField := c_defaultSipPort + } + } + } + } + + template(present) SipUrl mw_SipUrl_Number( + template(present) charstring p_number := ? + ) modifies mw_SipUrl := { + components := { + sip := { + userInfo := {userOrTelephoneSubscriber := p_number}, + hostPort := ? + } + } + } + + template(present) SipUrl mw_TelSipUrl_Number( + template(present) charstring p_number := ? + ) := (mw_SipUrl_Number(p_number), mw_TelSipUrl_Number2(p_number)); + + template(present) SipUrl mw_TelSipUrl_Number1( + template(present) charstring p_number := ? + ) := mw_SipUrl_Number(p_number); + + template(present) SipUrl mw_TelSipUrl_Number2( + template(present) charstring p_number := ? + ) modifies mw_TelUrl := { + components := { + tel := { + subscriber := p_number + } + } + } + + template(present) SipUrl mw_SipUrl_Host( + template charstring p_host + ) modifies mw_SipUrl := { + components := { + sip := { + userInfo := *, + hostPort := {host := p_host} + } + } + } + + template(present) SipUrl mw_SipUrl_User_Host( + template(present) charstring p_user := ?, + template charstring p_host + ) modifies mw_SipUrl := { + components := { + sip := { + userInfo := {userOrTelephoneSubscriber := p_user}, + hostPort := { + host := + p_host //* hostname, IPv4 or IPv6 as a charstring + } + } + }, + urlParameters := {m_UserPhone} + } + + template(present) SipUrl mw_SipUrl_Anonymous modifies mw_SipUrl := { + components := { + sip := { + userInfo := { + userOrTelephoneSubscriber := pattern "[a,A][n,N][o,O][n,N][y,Y][m,M][o,O][u,U][s,s]" //* charstring + }, + hostPort := { + host := + pattern + "[a,A]nonymous.invalid" //* hostname, IPv4 or IPv6 as a charstring + } + } + } + } + + template(present) SipUrl mw_SipUrl_urlParam( + template SemicolonParam_List p_urlParameters + ) modifies mw_SipUrl := { + urlParameters := p_urlParameters + } + + template(present) ContactAddress mw_ContactAddress := { + addressField := ?, + contactParams := * + } + + template(present) HostPort mw_hostPort( + template charstring p_host, + template integer p_portField + ) := { + host := p_host, + portField := p_portField + } + + template(present) StatusLine mw_statusLine_any := { + sipVersion := c_sipNameVersion, + statusCode := ?, + reasonPhrase := ? + } + + template(present) StatusLine mw_statusLine( + in template(present) integer p_statusCode := ?, + in template(present) charstring p_reasonPhrase := ? + ) modifies mw_statusLine_any := { + statusCode := p_statusCode, + reasonPhrase := p_reasonPhrase + } + + template(present) StatusLine mw_statusLine1xx modifies mw_statusLine_any := {statusCode := (100 .. 199)} + + template(present) StatusLine mw_statusLine2xx modifies mw_statusLine_any := {statusCode := (200 .. 299)} + + template(present) StatusLine mw_statusLine3xx modifies mw_statusLine_any := {statusCode := (300 .. 399)} + + template(present) StatusLine mw_statusLine4xx modifies mw_statusLine_any := {statusCode := (400 .. 499)} + + template(present) StatusLine mw_statusLine5xx modifies mw_statusLine_any := {statusCode := (500 .. 599)} + + template(present) StatusLine mw_statusLine6xx modifies mw_statusLine_any := {statusCode := (600 .. 699)} + + template(present) StatusLine mw_statusLineFinal modifies mw_statusLine_any := {statusCode := (200 .. 699)} + + template(present) NameAddr mw_NameAddr_DispName_User_Host( + template DisplayName p_dn, + template(present) charstring p_user := ?, + template charstring p_host + ) := { + displayName := p_dn, + addrSpec := { + scheme := c_sipScheme, //* contains "sip" + components := { + sip := { + userInfo := { + userOrTelephoneSubscriber := p_user, + password := * + }, + hostPort := { + host := p_host, //* hostname, IPv4 or IPv6 as a charstring + portField := + * //* optional integer + } + } + }, + urlParameters := {m_UserPhone}, + headers := * + } + } + + template(present) Addr_Union mw_AddrUnion_Nameaddr( + template DisplayName p_dn, + template(present) charstring p_user := ?, + template charstring p_host + ) := { + nameAddr := mw_NameAddr_DispName_User_Host(p_dn, p_user, p_host) + } + + template(present) Addr_Union mw_AddrUnion_SipUrl( + template(present) charstring p_user := ?, + template charstring p_host + ) := { + addrSpecUnion := mw_SipUrl_User_Host(p_user, p_host) + } + + + } //* end group Subfields + + group HeaderFieldTemplates { + template(value) LibSip_SIPTypesAndValues.Allow m_Allow( + template(value) Method_List p_methods + ) := { + fieldName := ALLOW_E, + methods := p_methods + } + + template(present) LibSip_SIPTypesAndValues.Allow mw_Allow( + template(value) charstring p_method + ) := { + fieldName := ALLOW_E, + methods := superset(p_method) + } + + template(value) GenericParam m_Cause( + template(omit) GenValue p_cause := omit + ) := { + id := "cause", + paramValue := p_cause + } + + template(present) GenericParam mw_Cause_base( + template GenValue p_cause + ) := { + id := "cause", + paramValue := p_cause + } + + template(present) GenericParam mw_Cause( + template(value) charstring p_cause + ) := { + id := ?, + paramValue := { tokenOrHost := pattern "*{p_cause}*" } + } + + template(value) Authorization m_Authorization( + template(value) Credentials p_credentials + ) := { + fieldName := AUTHORIZATION_E, + body := {p_credentials} + } + + template(value) Authorization m_Authorization_digest( + template(value) CommaParam_List p_commaParam_List + ) := { + fieldName := AUTHORIZATION_E, + body := {{digestResponse := p_commaParam_List}} + } + + template(present) Authorization mw_Authorization_digest( + template(present) CommaParam_List p_commaParam_List := ? + ) := { + fieldName := AUTHORIZATION_E, + body := {{digestResponse := p_commaParam_List}} + } + + template(value) Authorization m_add_Authorization_digest( + template(value) Authorization p_auth, + template(value) CommaParam_List p_commaParam_List + ) := { + fieldName := AUTHORIZATION_E, + body := {{digestResponse := f_merge_CommaParam_List(p_auth.body[0].digestResponse, p_commaParam_List)}} + } + + template(present) Authorization mw_Authorization_other := { + fieldName := AUTHORIZATION_E, + body := {{otherResponse := ?}} + } + + template(value) Contact m_Contact( + template(value) SipUrl p_sipUrl + ) := { + fieldName := CONTACT_E, + contactBody := { + contactAddresses := { + { + addressField := {addrSpecUnion := p_sipUrl}, + contactParams := omit + } + } + } //* end contactBody + } //* end m_Contact + + template(value) Contact m_Contact_profile( + template(value) SipUserProfile p_userprofile + ) := { + fieldName := CONTACT_E, + contactBody := { + contactAddresses := { + { + addressField := {addrSpecUnion := m_SipUrl_contactIpaddr(p_userprofile)}, + contactParams := omit + } + } + } //* end + //* contactBody + } //* end m_Contact + + + template(value) Contact m_Contact_profile_expires( + template(value) SipUserProfile p_userprofile, + template(value) GenValue p_expires + ) := { + fieldName := CONTACT_E, + contactBody := { + contactAddresses := { + { + addressField := {addrSpecUnion := m_SipUrl_contactIpaddr(p_userprofile)}, + contactParams := { + { + "expires", + p_expires + } + } + } + } + } //* end contactBody + } //* end m_Contact + + template(value) From m_From( + template(value) NameAddr p_nameAddr, + template(value) GenValue p_tag_str + ) := { + fieldName := FROM_E, + addressField := {nameAddr := p_nameAddr}, //* end addressField + fromParams := { + { + id := c_tagId, + paramValue := p_tag_str + } + } + } + + template(value) From m_From_Anonymous( + template(value) GenValue p_tag_str + ) := { + fieldName := FROM_E, + addressField := { + nameAddr := + m_NameAddr( + {token:="Anonymous"}, + //* optional charstring + m_SipUrl_Anonymous //* SipUrl + ) + }, //* end addressField + fromParams := { + { + id := c_tagId, + paramValue := p_tag_str + } + } + } + + template(value) From m_From_SipUrl( + template(value) SipUrl p_sipUrl + ) := { + fieldName := FROM_E, + addressField := { + nameAddr := + m_NameAddr( + omit, + //* optional charstring + p_sipUrl //* SipUrl + ) + }, //* end addressField + fromParams := omit + } + + template(value) Event m_Event_base := { + fieldName := EVENT_E, + eventType := "", + eventParams := omit + } + + template(value) Event m_Event_refer modifies m_Event_base := {eventType := "refer"} + + template(value) Event m_Event_conference modifies m_Event_base := {eventType := "conference"} + + template(value) Event m_Event_presence modifies m_Event_base := {eventType := "presence"} + + template(value) Event m_Event_reg modifies m_Event_base := {eventType := "reg"} + + template(value) Event m_Event_cdiv modifies m_Event_base := {eventType := "comm-div-info"} + + template(value) Event m_Event_mcid := m_Event_cdiv; + + template(value) Expires m_Expires_base := { + fieldName := EXPIRES_E, + deltaSec := "" + } + + template(value) Expires m_Expires_600000 modifies m_Expires_base := {deltaSec := "600000"} + + template(value) Expires m_Expires( + template(value) charstring p_deltaSec + ) modifies m_Expires_base := { + deltaSec := p_deltaSec + } + + template(present) Expires mw_Expires( + template(present) charstring p_deltaSec := ? + ) := { + fieldName := EXPIRES_E, + deltaSec := p_deltaSec + } + + template(value) HistoryInfo m_HistoryInfo( + template(value) HistoryInfo_List p_HistoryInfo_List + ) := { + fieldName := HISTORY_INFO_E, + historyInfoList := p_HistoryInfo_List + } + + template(present) HistoryInfo mw_HistoryInfo( + template(present) HistoryInfo_List p_HistoryInfo_List := ? + ) := { + fieldName := HISTORY_INFO_E, + historyInfoList := p_HistoryInfo_List + } + + template(value) HistoryInfoEntry m_HistoryInfoEntry( + template(value) SipUrl p_Url, + template(omit) IntegerList p_index := omit, + template(omit) SemicolonParam_List p_paramlist := omit + ) := { + nameAddr := m_NameAddr(omit, p_Url), + hiIndex := p_index, + hiExtention := p_paramlist + } + + template(present) HistoryInfoEntry mw_HistoryInfoEntry( + template(present) SipUrl p_Url := ?, + template IntegerList p_index, + template SemicolonParam_List p_paramlist + ) := { + nameAddr := mw_NameAddr(*, p_Url), + hiIndex := p_index, + hiExtention := p_paramlist + } + + template(value) PAssertedID m_PAssertedID( + template(value) Addr_Union p_pAssertedIDValue + ) := { + fieldName := P_ASSERTED_ID_E, + pAssertedIDValueList := {p_pAssertedIDValue} + } + + template(value) PAssertedID m_PAssertedID_2x( + template(value) Addr_Union p_pAssertedIDValue, + template(value) Addr_Union p_pAssertedIDValue2 + ) modifies m_PAssertedID := { + pAssertedIDValueList := {p_pAssertedIDValue, p_pAssertedIDValue2} + } + + template(present) PAssertedID mw_PAssertedID( + template(present) PAssertedIDValue p_pAssertedIDValue := ? + ) := { + fieldName := P_ASSERTED_ID_E, + pAssertedIDValueList := {p_pAssertedIDValue} + } + + template(present) PAssertedIDValue mw_PAssertedIDValue( + template(present) SipUrl p_SipUrl := ? + ) := { + nameAddr := { + displayName := *, + addrSpec := p_SipUrl + } + } + + template(value) PPreferredID m_PPreferredID( + template(value) Addr_Union p_pPreferredIDValue + ) := { + fieldName := P_PREFERRED_ID_E, + pPreferredIDValueList := {p_pPreferredIDValue} + } + + template(value) Privacy m_Privacy( + template(value) PrivacyValue p_privacy + ) := { + fieldName := PRIVACY_E, + privValueList := {p_privacy} + } + + template(present) Privacy mw_Privacy_Base( + template(present) charstring p_value := ? + ) := { + fieldName := PRIVACY_E, + privValueList := {*, p_value, *} + } + + template(present) Privacy mw_Privacy_id := mw_Privacy_Base("id"); + + template(present) Privacy mw_Privacy_user := mw_Privacy_Base("user"); + + template(value) RAck m_RAck( + integer p_responseNum, + integer p_seqNumber, + charstring p_method + ) := { + fieldName := RACK_E, + responseNum := p_responseNum, + seqNumber := p_seqNumber, + method := p_method + } + + template(value) Reason m_Reason( + template(value) integer p_cause + ) := { + fieldName := REASON_E, + reasonValues := {m_ReasonValue({tokenOrHost := int2str(valueof(p_cause))}, { tokenOrHost := "dummy"})} + } + + template(value) Reason m_Reason21 := { + fieldName := REASON_E, + reasonValues := {m_ReasonValue({tokenOrHost := int2str(21)}, { tokenOrHost := "call reject"})} + } + + template(present) Reason mw_Reason_Base := { + fieldName := REASON_E, + reasonValues := {} + } + + template(present) Reason mw_Reason( + template(value) GenValue p_cause + ) modifies mw_Reason_Base := { + reasonValues := {mw_ReasonValue(p_cause, ?)} + } + + template(present) Reason mw_ReasonSIP( + template(value) GenValue p_cause + ) modifies mw_Reason_Base := { + reasonValues := {mw_ReasonValueSIP(p_cause, ?)} + } + + template(value) RecordRoute m_recordRoute_currIpAddr( + template(value) SipUserProfile p_userprofile + ) := { + fieldName := RECORD_ROUTE_E, + routeBody := { + { + nameAddr := { + displayName := omit, + addrSpec := { + scheme := c_sipScheme, //* contains "sip" + components := { + sip := { + userInfo := omit, + hostPort := { + host := p_userprofile.currIpaddr, + portField := p_userprofile.currPort + } + } + }, + urlParameters := omit, + headers := omit + } + }, + rrParam := omit + } + } + } + + template(value) RecordRoute m_recordRoute_currIpAddr_params( + template(value) SipUserProfile p_userprofile, + template(value) SemicolonParam_List p_urlParameters + ) := { + fieldName := RECORD_ROUTE_E, + routeBody := { + { + nameAddr := { + displayName := omit, + addrSpec := { + scheme := c_sipScheme, //* contains "sip" + components := { + sip := { + userInfo := omit, + hostPort := { + host := p_userprofile.currIpaddr, + portField := p_userprofile.currPort + } + } + }, + urlParameters := p_urlParameters, + headers := omit + } + }, + rrParam := omit + } + } + } + + template(value) RouteBody m_routeBody_currIpAddr( + template(value) SipUserProfile p_userprofile + ) := { + nameAddr := { + displayName := omit, + addrSpec := { + scheme := c_sipScheme, //* contains "sip" + components := { + sip := { + userInfo := omit, + hostPort := { + host := p_userprofile.homeDomain, + portField := p_userprofile.currPort + } + } + }, + urlParameters := omit, + headers := omit + } + }, + rrParam := omit + } + + template(value) ReferredBy m_ReferredBy_SipUrl( + template(value) SipUrl p_sipUrl + ) := { + fieldName := REFERRED_BY_E, + nameAddr := + m_NameAddr( + // STF471 {displayName + omit, + // := omit, + p_sipUrl // addrSpec:=p_sipUrl} + ), + referredbyIdParams := omit + } + + template(value) ReferTo m_ReferTo_SipUrl( + template(value) SipUrl p_sipUrl, + template(value) GenValue p_method + ) := { + fieldName := REFER_TO_E, + nameAddr := + m_NameAddr( + // STF471 {displayName + omit, + // := omit, + p_sipUrl // addrSpec:=p_sipUrl} + ), + referToParams := { + { + id := "method", + paramValue := p_method + } + } + } + + template(value) ReferSub m_ReferSub( + template(value) boolean p_value + ) := { + fieldName := REFER_SUB_E, + referSubValue := p_value, + referSubParams := omit + } + + template(value) Replaces m_Replaces( + template(value) charstring p_callId, + template(value) GenValue p_toTag, + template(value) GenValue p_fromTag + ) := { + fieldName := REPLACES_E, + callid := p_callId, + replacesParams := { + { + id := "to-tag", + paramValue := p_toTag + }, + { + id := "from-tag", + paramValue := p_fromTag + } + } + } + + template(value) Require m_Require_empty := { + fieldName := REQUIRE_E, + optionsTags := {""} + } + + template(value) Require m_Require_replaces modifies m_Require_empty := {optionsTags := {c_replaces}} + + template(value) Require m_Require_100rel modifies m_Require_empty := {optionsTags := {c_tag100rel}} + + template(value) Require m_Require_prec modifies m_Require_empty := {optionsTags := {c_tagPrecond}} + + template(value) SubscriptionState m_SubscriptionState_active := { + fieldName := SUBSCRIPTION_STATE_E, + subState := "active", + substateParams := { + { + id := "expires", + paramValue := {tokenOrHost := "60000"} + } + } + } + + template(value) Supported m_Supported_empty := { + fieldName := SUPPORTED_E, + optionsTags := {""} + } + + template(value) Supported m_Supported_fromChange modifies m_Supported_empty := {optionsTags := {c_tagFromChange}} + + template(value) Supported m_Supported_prec modifies m_Supported_empty := {optionsTags := {c_tagPrecond}} + + template(value) Supported m_Supported_100rel modifies m_Supported_empty := {optionsTags := {c_tag100rel}} + + template(value) Supported m_Supported_100rel_prec modifies m_Supported_empty := {optionsTags := {c_tag100rel, c_tagPrecond}} + + template(value) GenericParam m_Text( + template(value) GenValue p_text + ) := { + id := "text", + paramValue := p_text + } + + template(present) GenericParam mw_Text( + template GenValue p_text + ) := { + id := "text", + paramValue := p_text + } + + template(value) GenericParam m_UserPhone := { + id := "user", + paramValue := { quotedString := "phone" } + } + + template(value) GenericParam m_UserToUserEncodingHex := { + id := "encoding", + paramValue := { quotedString := "hex" } + } + + template(value) UserToUser m_UserToUserData( + template(value) UserToUser.uuiData p_U2UData + ) := { + fieldName := USER_TO_USER_E, + uuiData := p_U2UData, + uuiParam := m_UserToUserEncodingHex + } + + template(value) To m_To( + template(value) SipUrl p_sipUrl + ) := { + fieldName := TO_E, + addressField := { + nameAddr := + m_NameAddr( + {token:="ETSI Tester"}, + //* optional charstring + p_sipUrl //* SipUrl + ) + }, //* end addressField + toParams := omit + } + + template(value) To m_To_SipUrl( + template(value) SipUrl p_sipUrl + ) modifies m_To := { + addressField := { + nameAddr := { + displayName := + omit //* optional charstring + } + } //* end addressField + } + + template(present) To mw_To_NameAddr_SipUrl( + template DisplayName p_dn, + template(present) charstring p_user := ?, + template charstring p_host + ) := { + fieldName := TO_E, + addressField := (mw_AddrUnion_Nameaddr(p_dn, p_user, p_host), mw_AddrUnion_SipUrl(p_user, p_host)), + toParams := * + } + + template(present) To mw_To( + template(present) SipUrl p_sipUrl := ? + ) := { + fieldName := TO_E, + addressField := {nameAddr := mw_NameAddr(*, p_sipUrl)}, + toParams := * + } + + template(present) From mw_From( + template(present) SipUrl p_sipUrl := ? + ) := { + fieldName := FROM_E, + addressField := {nameAddr := mw_NameAddr(*, p_sipUrl)}, + fromParams := * + } + + template(present) From mw_From_NameAddr_SipUrl( + template DisplayName p_dn, + template(present) charstring p_user := ?, + template charstring p_host + ) := { + fieldName := FROM_E, + addressField := (mw_AddrUnion_Nameaddr(p_dn, p_user, p_host), mw_AddrUnion_SipUrl(p_user, p_host)), + fromParams := * + } + template(value) ViaBody m_ViaBody_currIpaddr( + template(value) charstring p_branch_val, + template(value) SipUserProfile p_userprofile + ) := { + sentProtocol := m_SentProtocol(PX_SIP_TRANSPORT), + sentBy := { + host := p_userprofile.currIpaddr, + portField := p_userprofile.currPort + }, + viaParams := { + { + id := c_branchId, + paramValue := { + tokenOrHost := p_branch_val + } + } + } + } + + template(present) ViaBody mw_ViaBody_interface( + template(present) HostPort p_hostport := ? + ) := { + sentProtocol := m_SentProtocol(PX_SIP_TRANSPORT), + sentBy := { + host := p_hostport.host, + portField := p_hostport.portField + }, + viaParams := * + } + + template(present) Via mw_Via( + template(present) ViaBody p_viabody := ? + ) := { + fieldName := VIA_E, + viaBody := {*, p_viabody, *} // superset(p_viabody) + } + + template(present) CallId mw_CallId_any := { + fieldName := CALL_ID_E, + callid := ? + } + + template(present) Require mw_Require_Base := { + fieldName := REQUIRE_E, + optionsTags := {} + } + + template(present) Require mw_Require_not_100rel modifies mw_Require_Base := {optionsTags := superset(complement(c_tag100rel))} + + template(present) Require mw_require_100rel modifies mw_Require_Base := {optionsTags := superset(c_tag100rel)} + + template(present) RecordRoute mw_recordroute( + template(present) RouteBody p_routeBody := ? + ) := { + fieldName := RECORD_ROUTE_E, + routeBody := {*, p_routeBody, *} // superset(p_routeBody) + } + + template(present) Route mw_route( + template(present) RouteBody_List p_routeBody := ? + ) := { + fieldName := ROUTE_E, + routeBody := p_routeBody + } + + template(present) Supported mw_Supported_Base := { + fieldName := SUPPORTED_E, + optionsTags := {} + } + + template(present) Supported mw_Supported_100rel_prec modifies mw_Supported_Base := {optionsTags := superset(c_tag100rel, c_tagPrecond)} + + template(present) Supported mw_Supported_100rel modifies mw_Supported_Base := {optionsTags := superset(c_tag100rel)} + + template(present) Supported mw_Supported_fromChange modifies mw_Supported_Base := {optionsTags := superset(c_tagFromChange)} + + template(present) UserToUser mw_UserToUserData( + template(present) UserToUser.uuiData p_U2UData := ? + ) := { + fieldName := USER_TO_USER_E, + uuiData := p_U2UData, + uuiParam := ? + } + + template(present) Contact mw_Contact_conference := { + fieldName := CONTACT_E, + contactBody := { + contactAddresses := { + { + addressField := { + nameAddr := { + displayName := *, + addrSpec := { + scheme := ?, + components := ?, + urlParameters := { + { + "isfocus", + * + }, + * + }, + headers := * + } + } + }, + contactParams := * + } + } + } + } + + template(value) AlertInfo m_AlertInfo_Base := { + fieldName := ALERT_INFO_E, + alertInfoBody := {} + } + + template(value) AlertInfo m_AlertInfo( + template(value) charstring p_urn + ) modifies m_AlertInfo_Base := { + alertInfoBody := { + { + p_urn, + omit + } + } + } + + template(present) AlertInfo mw_AlertInfo( + template(present) charstring p_urn := ? + ) modifies m_AlertInfo_Base := { + alertInfoBody := + superset( + { + p_urn, + omit + } + ) + } + + + } //* end of group HeaderFieldTemplates + + + group MessageTemplates { + + group dummy_templates { + + group dummy_parameter_send { + + template(value) RequestLine m_requestLine_dummy( + template(value) Method p_method + ) := { + method := p_method, + requestUri := c_unavailableUri, + sipVersion := c_sipNameVersion + } + + template(value) MessageHeader m_msgHeader_dummy := { + accept := omit, + acceptContact := omit, + acceptEncoding := omit, + acceptLanguage := omit, + alertInfo := omit, + allow := omit, + allowEvents := omit, //* RFC3265 + authenticationInfo := omit, + authorization := omit, + callId := c_empty_CallId, + callInfo := omit, + contact := omit, + contentDisposition := omit, + contentEncoding := omit, + contentLanguage := omit, + contentLength := { + fieldName := CONTENT_LENGTH_E, + len := 0 + }, + contentType := omit, //* if message body present m, + //* else not present + cSeq := c_empty_cSeq, + date := omit, + errorInfo := omit, + event := omit, //* RFC3265 + expires := omit, + featureCaps := omit, + fromField := c_empty_From, + geolocation := omit, + geolocationRouting := omit, + historyInfo := omit, //* RFC4244 + inReplyTo := omit, + maxForwards := c_maxForwards70, + mimeVersion := omit, + minExpires := omit, + minSE := omit, //* RFC4028 + organization := omit, + pAccessNetworkInfo := omit, //* RFC3455 + pAssertedID := omit, + pAssertedService := omit, + pAssociatedURI := omit, + path := omit, //* RFC3327 + pCalledPartyID := omit, //* RFC3455 + pChargingFunctionAddresses := omit, //* RFC3455 + pChargingVector := omit, //* RFC3455 + pEarlyMedia := omit, //* RFC5009 + pMediaAuthorization := omit, //* RFC3313 + pPreferredID := omit, + pPreferredService := omit, + priority := omit, + privacy := omit, + proxyAuthenticate := omit, + proxyAuthorization := omit, + proxyRequire := omit, + pVisitedNetworkID := omit, //* RFC3455 + rAck := omit, + rSeq := omit, + reason := omit, + recordRoute := omit, + requestDisposition := omit, + referredBy := omit, //* RFC3892 - REFER method + referTo := omit, //* RFC3515 - REFER method + referSub := omit, //* RFC4488 - REFER method + replaces := omit, //* RFC3891 + replyTo := omit, + require := omit, + retryAfter := omit, + route := omit, + securityClient := omit, //* RFC3329 + securityServer := omit, //* RFC3329 + securityVerify := omit, //* RFC3329 + server := omit, + serviceRoute := omit, //* RFC3608 + sessionExpires := omit, //* RFC4028 + sessionId := omit, + sipETag := omit, + sipIfMatch := omit, + subject := omit, + subscriptionState := omit, //* RFC3265 + supported := omit, + timestamp := omit, + toField := c_empty_To, + unsupported := omit, + userToUser := omit, + userAgent := omit, + via := c_empty_Via, + warning := omit, + wwwAuthenticate := omit, + undefinedHeader_List := omit + } + + + } //* group dummy_parameter_send + + group dummy_parameter_receive { + + template(present) RequestLine mw_requestLine_dummy( + Method p_method + ) := { + method := p_method, + requestUri := ?, + sipVersion := c_sipNameVersion + } + + template(present) MessageHeader mw_msgHeader_dummy := { + accept := *, + acceptContact := *, + acceptEncoding := *, + acceptLanguage := *, + alertInfo := *, + allow := *, + allowEvents := *, //* RFC3265 + authenticationInfo := *, + authorization := *, + callId := ?, + callInfo := *, + contact := *, + contentDisposition := *, + contentEncoding := *, + contentLanguage := *, + contentLength := ?, + contentType := *, + cSeq := ?, + date := *, + errorInfo := *, + event := *, //* RFC3265 + expires := *, + featureCaps := *, + fromField := ?, + geolocation := *, + geolocationRouting := *, + historyInfo := *, //* RFC4244 + inReplyTo := *, + maxForwards := *, + mimeVersion := *, + minExpires := *, + minSE := *, //* RFC4028 + organization := *, + pAccessNetworkInfo := *, //* RFC3455 + pAssertedID := *, + pAssertedService := *, + pAssociatedURI := *, + path := *, //* RFC3327 + pCalledPartyID := *, //* RFC3455 + pChargingFunctionAddresses := *, //* RFC3455 + pChargingVector := *, //* RFC3455 + pEarlyMedia := *, //* RFC5009 + pMediaAuthorization := *, //* RFC3313 + pPreferredID := *, + pPreferredService := *, + priority := *, + privacy := *, + proxyAuthenticate := *, + proxyAuthorization := *, + proxyRequire := *, + pVisitedNetworkID := *, //* RFC3455 + rAck := *, + rSeq := *, + reason := *, + recordRoute := *, + requestDisposition := *, + referredBy := *, //* RFC3892 - REFER method + referTo := *, //* RFC3515 - REFER method + referSub := *, //* RFC4488 - REFER method + replaces := *, //* RFC 3891 + replyTo := *, + require := *, + retryAfter := *, + route := *, + securityClient := *, //* RFC3329 + securityServer := *, //* RFC3329 + securityVerify := *, //* RFC3329 + server := *, + serviceRoute := *, //* RFC3608 + sessionExpires := *, //* RFC4028 + sessionId := *, + sipETag := *, + sipIfMatch := *, + subject := *, + subscriptionState := *, //* RFC3265 + supported := *, + timestamp := *, + toField := ?, + unsupported := *, + userToUser := *, + userAgent := *, + via := ?, + warning := *, + wwwAuthenticate := *, + undefinedHeader_List := * + } + + + } //* end group dummy_parameter_receive + + group dummy_request_templates_send { + + template(value) ACK_Request m_ACK_Dummy := { + requestLine := m_requestLine_dummy(ACK_E), + msgHeader := m_msgHeader_dummy, + messageBody := omit, + payload := omit + } + + template(value) BYE_Request m_BYE_Dummy := { + requestLine := m_requestLine_dummy(BYE_E), + msgHeader := m_msgHeader_dummy, + messageBody := omit, + payload := omit + } + + template(value) CANCEL_Request m_CANCEL_Dummy := { + requestLine := m_requestLine_dummy(CANCEL_E), + msgHeader := m_msgHeader_dummy, + messageBody := omit, + payload := omit + } + + template(value) INFO_Request m_INFO_Dummy := { + requestLine := m_requestLine_dummy(INFO_E), + msgHeader := m_msgHeader_dummy, + messageBody := omit, + payload := omit + } + + template(value) INVITE_Request m_INVITE_Dummy := { + requestLine := m_requestLine_dummy(INVITE_E), + msgHeader := m_msgHeader_dummy, + messageBody := omit, + payload := omit + } + + template(value) MESSAGE_Request m_MESSAGE_Dummy := { + requestLine := m_requestLine_dummy(MESSAGE_E), + msgHeader := m_msgHeader_dummy, + messageBody := omit, + payload := omit + } + + template(value) NOTIFY_Request m_NOTIFY_Dummy := { + requestLine := m_requestLine_dummy(NOTIFY_E), + msgHeader := m_msgHeader_dummy, + messageBody := omit, + payload := omit + } + + template(value) OPTIONS_Request m_OPTIONS_Dummy := { + requestLine := m_requestLine_dummy(OPTIONS_E), + msgHeader := m_msgHeader_dummy, + messageBody := omit, + payload := omit + } + + template(value) PRACK_Request m_PRACK_Dummy := { + requestLine := m_requestLine_dummy(PRACK_E), + msgHeader := m_msgHeader_dummy, + messageBody := omit, + payload := omit + } + + template(value) PUBLISH_Request m_PUBLISH_Dummy := { + requestLine := m_requestLine_dummy(PUBLISH_E), + msgHeader := m_msgHeader_dummy, + messageBody := omit, + payload := omit + } + + template(value) REGISTER_Request m_REGISTER_Dummy := { + requestLine := m_requestLine_dummy(REGISTER_E), + msgHeader := m_msgHeader_dummy, + messageBody := omit, + payload := omit + } + + template(value) REFER_Request m_REFER_Dummy := { + requestLine := m_requestLine_dummy(REFER_E), + msgHeader := m_msgHeader_dummy, + messageBody := omit, + payload := omit + } + + template(value) SUBSCRIBE_Request m_SUBSCRIBE_Dummy := { + requestLine := m_requestLine_dummy(SUBSCRIBE_E), + msgHeader := m_msgHeader_dummy, + messageBody := omit, + payload := omit + } + + template(value) UPDATE_Request m_UPDATE_Dummy := { + requestLine := m_requestLine_dummy(UPDATE_E), + msgHeader := m_msgHeader_dummy, + messageBody := omit, + payload := omit + } + + + } //* end group dummy_request_templates_send + group dummy_request_templates_receive { + + template(present) ACK_Request mw_ACK_Dummy := { + requestLine := mw_requestLine_dummy(ACK_E), + msgHeader := mw_msgHeader_dummy, + messageBody := *, + payload := * + } + + template(present) BYE_Request mw_BYE_Dummy := { + requestLine := mw_requestLine_dummy(BYE_E), + msgHeader := mw_msgHeader_dummy, + messageBody := *, + payload := * + } + + template(present) CANCEL_Request mw_CANCEL_Dummy := { + requestLine := mw_requestLine_dummy(CANCEL_E), + msgHeader := mw_msgHeader_dummy, + messageBody := *, + payload := * + } + + template(present) INFO_Request mw_INFO_Dummy := { + requestLine := mw_requestLine_dummy(INFO_E), + msgHeader := mw_msgHeader_dummy, + messageBody := *, + payload := * + } + + template(present) INVITE_Request mw_INVITE_Dummy := { + requestLine := mw_requestLine_dummy(INVITE_E), + msgHeader := mw_msgHeader_dummy, + messageBody := *, + payload := * + } + + template(present) MESSAGE_Request mw_MESSAGE_Dummy := { + requestLine := mw_requestLine_dummy(MESSAGE_E), + msgHeader := mw_msgHeader_dummy, + messageBody := *, + payload := * + } + + template(present) OPTIONS_Request mw_OPTIONS_Dummy := { + requestLine := mw_requestLine_dummy(OPTIONS_E), + msgHeader := mw_msgHeader_dummy, + messageBody := *, + payload := * + } + + template(present) NOTIFY_Request mw_NOTIFY_Dummy := { + requestLine := mw_requestLine_dummy(NOTIFY_E), + msgHeader := mw_msgHeader_dummy, + messageBody := *, + payload := * + } + + template(present) PRACK_Request mw_PRACK_Dummy := { + requestLine := mw_requestLine_dummy(PRACK_E), + msgHeader := mw_msgHeader_dummy, + messageBody := *, + payload := * + } + + template(present) PUBLISH_Request mw_PUBLISH_Dummy := { + requestLine := mw_requestLine_dummy(PUBLISH_E), + msgHeader := mw_msgHeader_dummy, + messageBody := *, + payload := * + } + + template(present) REFER_Request mw_REFER_Dummy := { + requestLine := mw_requestLine_dummy(REFER_E), + msgHeader := mw_msgHeader_dummy, + messageBody := *, + payload := * + } + + template(present) REGISTER_Request mw_REGISTER_Dummy := { + requestLine := mw_requestLine_dummy(REGISTER_E), + msgHeader := mw_msgHeader_dummy, + messageBody := *, + payload := * + } + + template(present) SUBSCRIBE_Request mw_SUBSCRIBE_Dummy := { + requestLine := mw_requestLine_dummy(SUBSCRIBE_E), + msgHeader := mw_msgHeader_dummy, + messageBody := *, + payload := * + } + + template(present) UPDATE_Request mw_UPDATE_Dummy := { + requestLine := mw_requestLine_dummy(UPDATE_E), + msgHeader := mw_msgHeader_dummy, + messageBody := *, + payload := * + } + + + } //* end group dummy_request_templates_receive + + group dummy_response_templates_send { + + template(value) Response m_Response_Dummy := { + statusLine := c_statusLine100, + msgHeader := m_msgHeader_dummy, + messageBody := omit, + payload := omit + } + + + } //* group dummy_response_templates_send + + group dummy_response_templates_receive { + + template(present) Response mw_Response_Dummy := { + statusLine := ?, + msgHeader := mw_msgHeader_dummy, + messageBody := *, + payload := * + } + + + } //* group dummy_response_templates_receive + } + + group base_templates { + + template(value) CSeq m_cSeq( + template(value) integer p_seqNumber, + template(value) charstring p_method + ) := { + fieldName := CSEQ_E, + seqNumber := p_seqNumber, + method := p_method + } + + template(value) ContentLength m_contentLength( + template(value) integer p_len + ) := { + fieldName := CONTENT_LENGTH_E, + len := p_len + } + + template(value) ContentType m_contentType( + template(value) charstring p_mTypeSubtype + ) := { + fieldName := CONTENT_TYPE_E, + mTypeSubtype := p_mTypeSubtype + } + + template(present) ContentType mw_contentType( + in template(present) charstring p_mTypeSubtype := ? + ) := { + fieldName := CONTENT_TYPE_E, + mTypeSubtype := p_mTypeSubtype + } + + group request_send { + + template(value) ACK_Request m_ACK_Request_Base( + template(value) SipUrl p_requestUri, + template(omit) CallId p_callId := omit, + template(omit) CSeq p_cSeq := omit, + template(value) From p_from, + template(value) To p_to, + template(value) Via p_via + ) modifies m_ACK_Dummy := { + requestLine := {requestUri := p_requestUri}, + msgHeader := { + callId := p_callId, + cSeq := m_cSeq(p_cSeq.seqNumber, "ACK"), // STF471 + // {fieldName:=CSEQ_E, + // seqNumber:= + // p_cSeq.seqNumber, + // method:= + // "ACK"}, + fromField := p_from, + toField := p_to, + via := p_via + } + } + + template(value) ACK_Request m_ACK_Request_withRecordRoute( + template(value) SipUrl p_requestUri, + template(omit) CallId p_callId := omit, + template(omit) CSeq p_cSeq := omit, + template(value) From p_from, + template(value) To p_to, + template(value) Via p_via, + template(value) Route p_route + ) modifies m_ACK_Request_Base := { + msgHeader := { + route := p_route, + contentLength := m_contentLength(0) + } + } + + template(value) BYE_Request m_BYE_Request_Base( + template(value) SipUrl p_requestUri, + template(omit) CallId p_callId := omit, + template(omit) CSeq p_cSeq := omit, + template(value) From p_from, + template(value) To p_to, + template(value) Via p_via + ) modifies m_BYE_Dummy := { + requestLine := {requestUri := p_requestUri}, + msgHeader := { + callId := p_callId, + cSeq := p_cSeq, + fromField := p_from, + toField := p_to, + via := p_via + } + } + + template(value) CANCEL_Request m_CANCEL_Request_Base( + template(value) SipUrl p_requestUri, + template(omit) CallId p_callId := omit, + template(omit) CSeq p_cSeq := omit, + template(value) From p_from, + template(value) To p_to, + template(value) Via p_via + ) modifies m_CANCEL_Dummy := { + requestLine := {requestUri := p_requestUri}, + msgHeader := { + callId := p_callId, + cSeq := p_cSeq, + fromField := p_from, + toField := p_to, + via := p_via + } + } + + template(value) INFO_Request m_INFO_Request_Base( + template(value) SipUrl p_requestUri, + template(omit) CallId p_callId := omit, + template(omit) CSeq p_cSeq := omit, + template(value) From p_from, + template(value) To p_to, + template(value) Via p_via + ) modifies m_INFO_Dummy := { + requestLine := {requestUri := p_requestUri}, + msgHeader := { + callId := p_callId, + cSeq := p_cSeq, + fromField := p_from, + toField := p_to, + via := p_via + } + } + + template(value) INVITE_Request m_INVITE_Request_Base( + template(value) SipUrl p_requestUri, + template(omit) CallId p_callId := omit, + template(omit) CSeq p_cSeq := omit, + template(value) From p_from, + template(value) To p_to, + template(value) Via p_via, + template(value) Contact p_contact + ) modifies m_INVITE_Dummy := { + requestLine := {requestUri := p_requestUri}, + msgHeader := { + callId := p_callId, + contact := p_contact, + cSeq := p_cSeq, + fromField := p_from, + toField := p_to, + via := p_via + } + } + + template(value) MESSAGE_Request m_MESSAGE_Request_Base( + template(value) SipUrl p_requestUri, + template(omit) CallId p_callId := omit, + template(omit) CSeq p_cSeq := omit, + template(value) From p_from, + template(value) To p_to, + template(value) Via p_via + ) modifies m_MESSAGE_Dummy := { + requestLine := {requestUri := p_requestUri}, + msgHeader := { + callId := p_callId, + cSeq := p_cSeq, + fromField := p_from, + toField := p_to, + via := p_via + } + } + + template(omit) NOTIFY_Request m_NOTIFY_Request_Base( + template(value) SipUrl p_requestUri, + template(omit) CallId p_callId := omit, + template(omit) CSeq p_cSeq := omit, + template(value) From p_from, + template(value) To p_to, + template(value) Via p_via + ) modifies m_NOTIFY_Dummy := { + requestLine := {requestUri := p_requestUri}, + msgHeader := { + callId := p_callId, + cSeq := m_cSeq(p_cSeq.seqNumber, "NOTIFY"), // STF471 + // {fieldName:=CSEQ_E, + // seqNumber:= + // p_cSeq.seqNumber, + // method:= + // "NOTIFY"}, + fromField := p_from, + toField := p_to, + via := p_via + } + } + + template(value) OPTIONS_Request m_OPTIONS_Request_Base( + template(value) SipUrl p_requestUri, + template(omit) CallId p_callId := omit, + template(omit) CSeq p_cSeq := omit, + template(value) From p_from, + template(value) To p_to, + template(value) Via p_via + ) modifies m_OPTIONS_Dummy := { + requestLine := {requestUri := p_requestUri}, + msgHeader := { + callId := p_callId, + cSeq := m_cSeq(p_cSeq.seqNumber, "OPTIONS"), // STF471 + // {fieldName:=CSEQ_E, + // seqNumber:= + // p_cSeq.seqNumber, + // method:= + // "OPTIONS"}, + fromField := p_from, + toField := p_to, + via := p_via + } + } + + template(value) PRACK_Request m_PRACK_Request_Base( + template(value) SipUrl p_requestUri, + template(omit) CallId p_callId := omit, + template(omit) CSeq p_cSeq := omit, + template(value) From p_from, + template(value) To p_to, + template(value) Via p_via, + template(value) RAck p_RAck + ) modifies m_PRACK_Dummy := { + requestLine := {requestUri := p_requestUri}, + msgHeader := { + callId := p_callId, + cSeq := m_cSeq(p_cSeq.seqNumber, "PRACK"), // STF471 + // {fieldName:=CSEQ_E, + // seqNumber:= + // p_cSeq.seqNumber, + // method:= + // "PRACK"}, + fromField := p_from, + rAck := p_RAck, + toField := p_to, + via := p_via + }, + messageBody := omit + } + + template(value) PUBLISH_Request m_PUBLISH_Request_Base( + template(value) SipUrl p_requestUri, + template(omit) CallId p_callId := omit, + template(omit) CSeq p_cSeq := omit, + template(value) From p_from, + template(value) To p_to, + template(value) Via p_via, + template(omit) Event p_event := omit, + template(omit) RAck p_RAck := omit, + template(value) MessageBody p_mb + ) modifies m_PUBLISH_Dummy := { + requestLine := {requestUri := p_requestUri}, + msgHeader := { + callId := p_callId, + contentLength := m_contentLength(f_MessageBodyLength(p_mb)), // STF471 + // {fieldName + // := + // CONTENT_LENGTH_E, + // len:= + // f_MessageBodyLength(valueof(p_mb))}, + contentType := m_contentType(c_plainText), // STF471 + // {fieldName + // := + // CONTENT_TYPE_E, + // mTypeSubType + // := + // c_plainText/*c_sdp*/}, + cSeq := m_cSeq(p_cSeq.seqNumber, "PUBLISH"), // STF471 + // {fieldName:=CSEQ_E, + // seqNumber:= + // p_cSeq.seqNumber, + // method:= + // "PUBLISH"}, + event := p_event, + rAck := p_RAck, + fromField := p_from, + toField := p_to, + via := p_via + }, + messageBody := p_mb + } + + template(value) REFER_Request m_REFER_Request_Base( + template(value) SipUrl p_requestUri, + template(omit) CallId p_callId := omit, + template(omit) CSeq p_cSeq := omit, + template(omit) Contact p_contact := omit, + template(value) From p_from, + template(value) To p_to, + template(value) Via p_via, + template(omit) ReferTo p_referTo := omit, + template(omit) ReferredBy p_referredBy := omit + ) modifies m_REFER_Dummy := { + requestLine := {requestUri := p_requestUri}, + msgHeader := { + callId := p_callId, + contact := p_contact, + cSeq := m_cSeq(p_cSeq.seqNumber, "REFER"), // STF471 + // {fieldName:=CSEQ_E, + // seqNumber:= + // p_cSeq.seqNumber, + // method:= + // "REFER"}, + fromField := p_from, + referTo := p_referTo, + referredBy := p_referredBy, + toField := p_to, + via := p_via + } + } + + template(value) REFER_Request m_REFER_Request_replaces( + template(value) SipUrl p_requestUri, + template(omit) CallId p_callId := omit, + template(omit) CSeq p_cSeq := omit, + template(omit) Contact p_contact := omit, + template(value) From p_from, + template(value) To p_to, + template(value) Via p_via, + template(value) ReferTo p_referTo, + template(value) ReferredBy p_referredBy, + template(value) Replaces p_replaces, + template(omit) Require p_require := omit + ) modifies m_REFER_Request_Base := { + msgHeader := { + replaces := p_replaces, + require := p_require + } + } + + template(value) REGISTER_Request m_REGISTER_Request_Base( + template(value) SipUrl p_requestUri, + template(omit) CallId p_callId := omit, + template(omit) CSeq p_cSeq := omit, + template(value) From p_from, + template(value) To p_to, + template(value) Via p_via, + template(omit) Contact p_contact := omit, + template(omit) Authorization p_authorization := omit + ) modifies m_REGISTER_Dummy := { + requestLine := {requestUri := p_requestUri}, + msgHeader := { + authorization := p_authorization, + callId := p_callId, + contact := p_contact, + cSeq := p_cSeq, + fromField := p_from, + toField := p_to, + supported := { + fieldName := SUPPORTED_E, + optionsTags := {"path"} + }, + via := p_via + } + } + + template(value) SUBSCRIBE_Request m_SUBSCRIBE_Request_Base( + template(value) SipUrl p_requestUri, + template(omit) CallId p_callId := omit, + template(omit) CSeq p_cSeq := omit, + template(value) From p_from, + template(value) To p_to, + template(value) Via p_via + ) modifies m_SUBSCRIBE_Dummy := { + requestLine := {requestUri := p_requestUri}, + msgHeader := { + callId := p_callId, + cSeq := m_cSeq(p_cSeq.seqNumber, "SUBSCRIBE"), // STF471 + // {fieldName:=CSEQ_E, + // seqNumber:= + // p_cSeq.seqNumber, + // method:= + // "SUBSCRIBE"}, + fromField := p_from, + toField := p_to, + via := p_via + } + } + + template(value) UPDATE_Request m_UPDATE_Request_Base( + template(value) SipUrl p_requestUri, + template(omit) CallId p_callId := omit, + template(omit) CSeq p_cSeq := omit, + template(value) From p_from, + template(value) To p_to, + template(value) Via p_via, + template(omit) Contact p_contact := omit, + template(value) MessageBody p_mb + ) modifies m_UPDATE_Dummy := { + requestLine := {requestUri := p_requestUri}, + msgHeader := { + callId := p_callId, + contact := p_contact, + contentLength := m_contentLength(f_MessageBodyLength(p_mb)), // STF471 + // {fieldName + // := + // CONTENT_LENGTH_E, + // len:= + // f_MessageBodyLength(valueof(p_mb))}, + contentType := m_contentType(c_sdpApplication), // STF471 + // {fieldName + // := + // CONTENT_TYPE_E, + // mTypeSubtype + // := + // c_sdp}, + cSeq := m_cSeq(p_cSeq.seqNumber, "UPDATE"), // STF471 + // {fieldName:=CSEQ_E, + // seqNumber:= + // p_cSeq.seqNumber, + // method:= + // "UPDATE"}, + fromField := p_from, + toField := p_to, + via := p_via + }, + messageBody := p_mb + } + + + } //* end of group message_send + + group request_receive { + + template(present) ACK_Request mw_ACK_Request_Base( + template CallId p_callId + ) modifies mw_ACK_Dummy := { + msgHeader := {callId := p_callId} + } + + template(present) BYE_Request mw_BYE_Request_Base( + template CallId p_callId + ) modifies mw_BYE_Dummy := { + msgHeader := {callId := p_callId} + } + + template(present) CANCEL_Request mw_CANCEL_Request_Base( + template CallId p_callId + ) modifies mw_CANCEL_Dummy := { + msgHeader := {callId := p_callId} + } + + template(present) INFO_Request mw_INFO_Request_Base( + template CallId p_callId + ) modifies mw_INFO_Dummy := { + msgHeader := {callId := p_callId} + } + + template(present) INVITE_Request mw_INVITE_Request_Base modifies mw_INVITE_Dummy := {requestLine := {method := INVITE_E}} + + template(present) MESSAGE_Request mw_MESSAGE_Request_Base modifies mw_MESSAGE_Dummy := {msgHeader := {contact := *}} + + template(present) NOTIFY_Request mw_NOTIFY_Request_Base( + template CallId p_callId + ) modifies mw_NOTIFY_Dummy := { + msgHeader := {callId := p_callId} + } + + template(present) OPTIONS_Request mw_OPTIONS_Request_Base( + template CallId p_callId + ) modifies mw_OPTIONS_Dummy := { + msgHeader := {callId := p_callId} + } + + template(present) PRACK_Request mw_PRACK_Request_Base( + template CallId p_callId + ) modifies mw_PRACK_Dummy := { + msgHeader := {callId := p_callId} + } + + template(present) PUBLISH_Request mw_PUBLISH_Request_Base( + template CallId p_callId + ) modifies mw_PUBLISH_Dummy := { + msgHeader := {callId := p_callId} + } + + template(present) REFER_Request mw_REFER_Request_Base( + template CallId p_callId + ) modifies mw_REFER_Dummy := { + msgHeader := {callId := p_callId} + } + + template(present) REFER_Request mw_REFER_Request( + template CallId p_callId, + template(value) SipUrl p_requestUri, + template(value) SipUrl p_referredBy + ) modifies mw_REFER_Request_Base := { + requestLine := {requestUri := p_requestUri}, + msgHeader := { + referredBy := { + fieldName := REFERRED_BY_E, + nameAddr := mw_NameAddr(*, p_referredBy), // STF471 + // {displayName + // := + // *, + // addrSpec + // := + // p_referredBy}, + referredbyIdParams := * + } + } + } + + template(present) INVITE_Request mw_INVITE_Request( + template Require p_require, + template(value) SipUrl p_referredBy + ) modifies mw_INVITE_Request_Base := { + msgHeader := { + require := p_require, + referredBy := { + fieldName := REFERRED_BY_E, + nameAddr := mw_NameAddr(*, p_referredBy), // STF471 + // {displayName + // := + // *, + // addrSpec + // := + // p_referredBy}, + referredbyIdParams := * + } + } + } + + template(present) REGISTER_Request mw_REGISTER_Request_Base modifies mw_REGISTER_Dummy := {requestLine := {method := REGISTER_E}} + + template(present) SUBSCRIBE_Request mw_SUBSCRIBE_Request_Base modifies mw_SUBSCRIBE_Dummy := {requestLine := {method := SUBSCRIBE_E}} + + template(present) UPDATE_Request mw_UPDATE_Request_Base(template CallId p_callId) modifies mw_UPDATE_Dummy := {msgHeader := {callId := p_callId}} + + + } //* end group request_receive + + group response_send { + + template(value) Response m_Response_Base( + template(value) StatusLine p_statusLine, + template(omit) CallId p_callId := omit, + template(omit) CSeq p_cSeq := omit, + template(value) From p_from, + template(value) To p_to, + template(value) Via p_via + ) modifies m_Response_Dummy := { + statusLine := p_statusLine, + msgHeader := { + callId := p_callId, + cSeq := p_cSeq, + fromField := p_from, + maxForwards := omit, + toField := p_to, + via := p_via + }, + messageBody := omit, + payload := omit + } + + + } //* end group response_send + + group response_receive { + + template(present) Response mw_Response_Base( + template(present) StatusLine p_statusLine := ?, + template CallId p_callId, + template CSeq p_cSeq + ) modifies mw_Response_Dummy := { + statusLine := p_statusLine, + msgHeader := { + callId := p_callId, + contentLength := *, + cSeq := p_cSeq, + fromField := ?, + maxForwards := *, + toField := ?, + via := ? + } + } + + template(present) Response mw_Response_StatusCode_Base( + template(present) StatusLine.statusCode p_statusCode := ?, + template CallId p_callId, + template CSeq p_cSeq + ) modifies mw_Response_Dummy := { + statusLine := mw_statusLine(p_statusCode, ?), + msgHeader := { + callId := p_callId, + contentLength := *, + cSeq := p_cSeq, + fromField := ?, + maxForwards := *, + toField := ?, + via := ? + } + } + + template(present) Response mw_Response_1xx_Base( + template CallId p_callId, + template CSeq p_cSeq + ) modifies mw_Response_Dummy := { + statusLine := mw_statusLine1xx, + msgHeader := { + callId := p_callId, + contentLength := *, + cSeq := p_cSeq, + fromField := ?, + maxForwards := *, + toField := ?, + via := ? + } + } + + template(present) Response mw_Response_2xx_Base( + template CallId p_callId, + template CSeq p_cSeq + ) modifies mw_Response_1xx_Base := { + statusLine := mw_statusLine2xx + } + + template(present) Response mw_Response_3xx_Base( + template CallId p_callId, + template CSeq p_cSeq + ) modifies mw_Response_1xx_Base := { + statusLine := mw_statusLine3xx + } + + template(present) Response mw_Response_4xx_Base( + template CallId p_callId, + template CSeq p_cSeq + ) modifies mw_Response_1xx_Base := { + statusLine := mw_statusLine4xx + } + + template(present) Response mw_Response_5xx_Base( + template CallId p_callId, + template CSeq p_cSeq + ) modifies mw_Response_1xx_Base := { + statusLine := mw_statusLine5xx + } + + template(present) Response mw_Response_6xx_Base( + template CallId p_callId, + template CSeq p_cSeq + ) modifies mw_Response_1xx_Base := { + statusLine := mw_statusLine6xx + } + + template(present) Response mw_Response_Algorithm( + template(present) StatusLine p_statusLine := ?, + template CallId p_callId, + template CSeq p_cSeq, + template(present) CredentialsList p_credentialsList + ) modifies mw_Response_Base := { + statusLine := mw_statusLine(p_statusLine.statusCode, ?), + msgHeader := { + authorization := { + fieldName := AUTHORIZATION_E, + body := p_credentialsList + } + } + } + + + } //* end group message_receive + + + } //* end group full_templates + + group modified_templates { + + group request_send { + + template(value) ACK_Request m_ACK_Request_route( + template(value) SipUrl p_requestUri, + template(omit) CallId p_callId := omit, + template(omit) CSeq p_cSeq := omit, + template(value) From p_from, + template(value) To p_to, + template(value) Via p_via, + template(omit) Route p_route := omit + ) modifies m_ACK_Request_Base := { + msgHeader := {route := p_route} + } + + template(value) ACK_Request m_ACK_Request_sdp( + template(value) SipUrl p_requestUri, + template(omit) CallId p_callId := omit, + template(omit) CSeq p_cSeq := omit, + template(value) From p_from, + template(value) To p_to, + template(value) Via p_via, + template(value) MessageBody p_mb + ) modifies m_ACK_Request_Base := { + msgHeader := { + contentLength := m_contentLength(f_MessageBodyLength(p_mb)), // STF471 + // {fieldName + // := + // CONTENT_LENGTH_E, + // len:= + // f_MessageBodyLength(valueof(p_mb))}, + contentType := m_contentType(c_sdpApplication) + }, + messageBody := p_mb + } + + template(value) BYE_Request m_BYE_Request_cause( + template(value) SipUrl p_requestUri, + template(omit) CallId p_callId := omit, + template(omit) CSeq p_cSeq := omit, + template(value) From p_from, + template(value) To p_to, + template(value) Via p_via, + template(value) integer p_cause + ) modifies m_BYE_Request_Base := { + msgHeader := {reason := m_Reason(p_cause)} + } + + template(value) INVITE_Request m_INVITE_Request_sdp( + template(value) SipUrl p_requestUri, + template(omit) CallId p_callId := omit, + template(omit) CSeq p_cSeq := omit, + template(value) From p_from, + template(value) To p_to, + template(value) Via p_via, + template(value) Contact p_contact, + template(value) MessageBody p_mb + ) modifies m_INVITE_Request_Base := { + msgHeader := { + contentLength := m_contentLength(f_MessageBodyLength(p_mb)), // STF471 + // {fieldName + // := + // CONTENT_LENGTH_E, + // len:= + // f_MessageBodyLength(valueof(p_mb))}, + contentType := m_contentType(c_sdpApplication) + }, + messageBody := p_mb + } + + template(value) INVITE_Request m_INVITE_Request_ResourceList( + template(value) SipUrl p_requestUri, + template(omit) CallId p_callId := omit, + template(omit) CSeq p_cSeq := omit, + template(value) From p_from, + template(value) To p_to, + template(value) Via p_via, + template(value) Contact p_contact, + template(value) MessageBody p_mb + ) modifies m_INVITE_Request_Base := { + msgHeader := { + contentLength := m_contentLength(f_MessageBodyLength(p_mb)), // STF471 + // {fieldName + // := + // CONTENT_LENGTH_E, + // len:= + // f_MessageBodyLength(p_mb)}, + contentType := m_contentType(c_xmlresourcelistApplication), // STF471 + // {fieldName + // := + // CONTENT_TYPE_E, + // mTypeSubtype + // := + // "application/resource-lists+xml"}, + contentDisposition := { + fieldName := CONTENT_DISPOSITION_E, + dispositionType := "recipient-list", + dispositionParams := omit + }, + require := { + fieldName := REQUIRE_E, + optionsTags := {"recipient-list-invite"} + } + }, + messageBody := p_mb + } + + template(value) REFER_Request m_REFER_Request_route( + template(value) SipUrl p_requestUri, + template(omit) CallId p_callId := omit, + template(omit) CSeq p_cSeq := omit, + template(omit) Contact p_contact := omit, + template(value) From p_from, + template(value) To p_to, + template(value) Via p_via, + template(value) ReferTo p_referTo, + template(value) ReferredBy p_referredBy, + template(value) Route p_route + ) modifies m_REFER_Request_Base := { + msgHeader := {route := p_route} + } + + template(value) REGISTER_Request m_REGISTER_Request_expires( + template(value) SipUrl p_requestUri, + template(omit) CallId p_callId := omit, + template(omit) CSeq p_cSeq := omit, + template(value) From p_from, + template(value) To p_to, + template(value) Via p_via, + template(omit) Contact p_contact := omit, + template(omit) Authorization p_authorization := omit, + template(value) charstring p_expires + ) modifies m_REGISTER_Request_Base := { + msgHeader := { + authorization := p_authorization, + expires := m_Expires(p_expires) + } + } + + template(value) NOTIFY_Request m_NOTIFY_Request_contact( + template(value) SipUrl p_requestUri, + template(omit) CallId p_callId := omit, + template(omit) CSeq p_cSeq := omit, + template(value) From p_from, + template(value) To p_to, + template(value) Via p_via, + template(omit) Contact p_contact := omit + ) modifies m_NOTIFY_Request_Base := { + msgHeader := { + contact := p_contact, + event := m_Event_reg, + subscriptionState := m_SubscriptionState_active + } + } + +// FIXME STF549: : Titan error: Restriction on template definition does not allow usage of any value + +// template(omit) NOTIFY_Request m_NOTIFY_Request_sipfrag( +// template(value) SipUrl p_requestUri, +// template(omit) CallId p_callId := omit, +// template(omit) CSeq p_cSeq := omit, +// template(value) From p_from, +// template(value) To p_to, +// template(value) Via p_via, +// template(value) charstring p_state, +// template(value) charstring p_sipfrag +// ) modifies m_NOTIFY_Request_Base := { +// requestLine := { +// method := NOTIFY_E, +// requestUri := { +// scheme := ?, +// components := { +// sip := { +// userInfo := omit, +// hostPort := p_requestUri.components.sip.hostPort +// } +// } +// } +// }, +// msgHeader := { +// contentLength := m_contentLength(lengthof(p_sipfrag)), // STF471 +// // {fieldName +// // := +// // CONTENT_LENGTH_E, +// // len:= +// // lengthof(p_sipfrag)}, +// contentType := m_contentType(c_sipfragMessage), // STF471 +// // {fieldName +// // := +// // CONTENT_TYPE_E, +// // mTypeSubtype +// // := +// // "message/sipfrag"}, +// subscriptionState := { +// fieldName := SUBSCRIPTION_STATE_E, +// subState := p_state, +// substateParams := omit +// }, +// event := m_Event_refer +// }, +// messageBody := {sipfrag := p_sipfrag} +// } + + template(omit) UPDATE_Request m_UPDATE_Request_route( + template(value) SipUrl p_requestUri, + template(omit) CallId p_callId := omit, + template(omit) CSeq p_cSeq := omit, + template(value) From p_from, + template(value) To p_to, + template(value) Via p_via, + template(omit) Contact p_contact := omit, + template(value) MessageBody p_mb, + template(value) Route p_route + ) modifies m_UPDATE_Request_Base := { + msgHeader := {route := p_route} + } + + + } //* end group request_send + + + group request_receive { + + template(present) BYE_Request mw_BYE_Request_Reason( + template CallId p_callId, + template(value) GenValue p_cause + ) modifies mw_BYE_Request_Base := { + msgHeader := {reason := mw_Reason(p_cause)} + } + + template(present) BYE_Request mw_BYE_Request_ReasonSIP( + template CallId p_callId, + template(value) GenValue p_cause + ) modifies mw_BYE_Request_Base := { + msgHeader := {reason := mw_ReasonSIP(p_cause)} + } + + template(present) BYE_Request mw_BYE_Request_headerfieldlist( + template CallId p_callId, + template(present) SipUrl p_requestUri, + template(present) To p_to := ?, + template(present) From p_from := ?, + template CSeq p_cSeq, + template Route p_route, + template RecordRoute p_recordRoute, + template Reason p_reason + ) modifies mw_BYE_Request_Base := { + requestLine := {requestUri := p_requestUri}, + msgHeader := { + callId := p_callId, + toField := p_to, + fromField := p_from, + cSeq := p_cSeq, + route := p_route, + recordRoute := p_recordRoute, + reason := p_reason + } + } + + template(present) BYE_Request mw_BYE_Request_UserToUser( + template CallId p_callId + ) modifies mw_BYE_Request_Base := { + msgHeader := {userToUser := ?} + } + + + template(present) INVITE_Request mw_INVITE_Request_RequestURI( + template(present) SipUrl p_sipUrl := ? + ) modifies mw_INVITE_Dummy := { + requestLine := { + requestUri := p_sipUrl, + sipVersion := c_sipNameVersion + } + } + + template(present) INFO_Request mw_INFO_Request_MB( + template CallId p_callId, + template MessageBody p_mb + ) modifies mw_INFO_Request_Base := { + messageBody := p_mb + } + + template(present) INVITE_Request mw_INVITE_Request_expires modifies mw_INVITE_Request_Base := {msgHeader := {expires := ?}} + + template(present) INVITE_Request mw_INVITE_Request_callid( + template CallId p_callId + ) modifies mw_INVITE_Request_Base := { + msgHeader := {callId := p_callId} + } + + template(present) INVITE_Request mw_INVITE_Request_MB( + template CallId p_callId, + template MessageBody p_mb + ) modifies mw_INVITE_Request_callid := { + messageBody := p_mb + } + + template(present) INVITE_Request mw_INVITE_Request_noPaccessNetworkInfo( + template CallId p_callId + ) modifies mw_INVITE_Request_callid := { + msgHeader := {pAccessNetworkInfo := omit} + } + + template(present) INVITE_Request mw_INVITE_Request_PaccessNetworkInfo( + template CallId p_callId + ) modifies mw_INVITE_Request_callid := { + msgHeader := {pAccessNetworkInfo := ?} + } + + template(present) INVITE_Request mw_INVITE_MSRP_Session( + template(present) SDP_media_field p_media_MSRP := ? + ) modifies mw_INVITE_Request_Base := { + messageBody := { + sdpMessageBody := { + protocol_version := ?, + origin := ?, + session_name := ?, + information := *, + uri := *, + emails := *, + phone_numbers := *, + connection := *, + bandwidth := *, + times := ?, + timezone_adjustments := *, + key := *, + attributes := *, + media_list := { + { + media_field := p_media_MSRP, + information := *, + connections := *, + bandwidth := *, + key := *, + attributes := { + { + msrp := { + attr_value := + pattern + "path:msrp://*" + } + } + } + } + } + } + } + } + + template(present) REGISTER_Request mw_REGISTER_Request_ISC( + template PAccessNetworkInfo p_access, + template PVisitedNetworkID p_visited + ) modifies mw_REGISTER_Request_Base := { + msgHeader := { + pAccessNetworkInfo := p_access, + pVisitedNetworkID := p_visited + } + } + + template(present) UPDATE_Request mw_UPDATE_Request_SDP( + template CallId p_callId, + template MessageBody p_mb + ) modifies mw_UPDATE_Request_Base := { + messageBody := p_mb + } + + template(present) NOTIFY_Request mw_NOTIFY_Request_MB( + template CallId p_callId, + template MessageBody p_mb + ) modifies mw_NOTIFY_Request_Base := { + messageBody := p_mb + } + + + } //* end group request_receive + + group response_send { + + template(value) Response m_Response_AlertInfo( + template(value) StatusLine p_statusLine, + template(omit) CallId p_callId := omit, + template(omit) CSeq p_cSeq := omit, + template(value) From p_from, + template(value) To p_to, + template(value) Via p_via, + template(value) Contact p_contact, + template(value) AlertInfo p_alertInfo + ) modifies m_Response_Contact := { + msgHeader := {alertInfo := p_alertInfo} + } + + template(value) Response m_Response_Contact( + template(value) StatusLine p_statusLine, + template(omit) CallId p_callId := omit, + template(omit) CSeq p_cSeq := omit, + template(value) From p_from, + template(value) To p_to, + template(value) Via p_via, + template(omit) Contact p_contact := omit + ) modifies m_Response_Base := { + msgHeader := {contact := p_contact} + } + + template(value) Response m_Response_ext( + template(value) StatusLine p_statusLine, + template(omit) CallId p_callId := omit, + template(omit) CSeq p_cSeq := omit, + template(value) From p_from, + template(value) To p_to, + template(value) Via p_via, + template(omit) Route p_route := omit, + template(omit) RecordRoute p_recordroute := omit + ) modifies m_Response_Base := { + msgHeader := { + route := p_route, // f_route(), + recordRoute := + p_recordroute // f_recordroute() + } + } + + template(value) Response m_Response_mbody( + template(value) StatusLine p_statusLine, + template(omit) CallId p_callId := omit, + template(omit) CSeq p_cSeq := omit, + template(value) From p_from, + template(value) To p_to, + template(value) Via p_via, + template(omit) Route p_route := omit, + template(omit) RecordRoute p_recordroute := omit, + template(value) MessageBody p_mb + ) modifies m_Response_ext := { + msgHeader := { + contentLength := m_contentLength(f_MessageBodyLength(p_mb)), // STF471 + // {fieldName + // := + // CONTENT_LENGTH_E, + // len:= + // f_MessageBodyLength(valueof(p_mb))}, + contentType := m_contentType(c_sdpApplication) + }, + messageBody := p_mb + } + + template(value) Response m_Response_mbody_contact ( + template(value) StatusLine p_statusLine, + template(omit) CallId p_callId := omit, + template(omit) CSeq p_cSeq := omit, + template(value) From p_from, + template(value) To p_to, + template(value) Via p_via, + template(omit) Route p_route := omit, + template(omit) RecordRoute p_recordroute := omit, + template(value) MessageBody p_mb, + template(value) Contact p_contact + ) modifies m_Response_mbody := { + msgHeader := { + contact := p_contact + } + } + + + template(value) Response m_Response_PAsserted_Privacy( + template(value) StatusLine p_statusLine, + template(omit) CallId p_callId := omit, + template(omit) CSeq p_cSeq := omit, + template(value) From p_from, + template(value) To p_to, + template(value) Via p_via, + template(value) Route p_route, + template(value) RecordRoute p_recordroute, + template(value) PAssertedID p_pAssertedID, + template(value) Privacy p_privacy + ) modifies m_Response_ext := { + msgHeader := { + pAssertedID := p_pAssertedID, + privacy := p_privacy + } + } + + template(present) Response mw_Response_PAsserted_Privacy_Supported( + template(present) StatusLine p_statusLine := ?, + template CallId p_callId, + template CSeq p_cSeq, + template PAssertedID p_pAssertedID, + template Privacy p_privacy, + template Supported p_supported + ) modifies mw_Response_Base := { + statusLine := mw_statusLine(p_statusLine.statusCode, ?), + msgHeader := { + pAssertedID := p_pAssertedID, + privacy := p_privacy, + supported := p_supported + } + } + + template(value) Response m_Response_PAsserted_Privacy_mbody( + template(value) StatusLine p_statusLine, + template(omit) CallId p_callId := omit, + template(omit) CSeq p_cSeq := omit, + template(value) From p_from, + template(value) To p_to, + template(value) Via p_via, + template(value) Route p_route, + template(value) RecordRoute p_recordroute, + template(value) PAssertedID p_pAssertedID, + template(value) Privacy p_privacy, + template(value) MessageBody p_mb + ) modifies m_Response_ext := { + msgHeader := { + contentLength := m_contentLength(f_MessageBodyLength(p_mb)), // STF471 + // {fieldName + // := + // CONTENT_LENGTH_E, + // len:= + // f_MessageBodyLength(valueof(p_mb))}, + contentType := m_contentType(c_sdpApplication), // STF471 + // {fieldName + // := + // CONTENT_TYPE_E, + // mTypeSubtype + // := + // c_sdpApplication + // }, + pAssertedID := p_pAssertedID, + privacy := p_privacy + }, + messageBody := p_mb + } + + + } //* end group response_send + + + group response_receive { + + template(present) Response mw_Response_Expires( + template(present) StatusLine p_statusLine := ?, + template CallId p_callId, + template CSeq p_cSeq, + template(present) DeltaSec p_deltaSec := ? + ) modifies mw_Response_Base := { + statusLine := mw_statusLine(p_statusLine.statusCode, ?), + msgHeader := {expires := mw_Expires(p_deltaSec)} + } + + template(present) Response mw_Response_PAsserted_Privacy( + template(present) StatusLine p_statusLine := ?, + template CallId p_callId, + template CSeq p_cSeq, + template PAssertedID p_pAssertedID, + template Privacy p_privacy + ) modifies mw_Response_Base := { + statusLine := mw_statusLine(p_statusLine.statusCode, ?), + msgHeader := { + pAssertedID := p_pAssertedID, + privacy := p_privacy + } + } + + template(present) Response mw_Response_Reason( + template(present) StatusLine p_statusLine := ?, + template CallId p_callId, + template CSeq p_cSeq, + template(value) GenValue p_cause + ) modifies mw_Response_Base := { + statusLine := mw_statusLine(p_statusLine.statusCode, ?), + msgHeader := {reason := mw_Reason(p_cause)} + } + + template(present) Response mw_Response_RecordRoute( + template(present) StatusLine p_statusLine := ?, + template CallId p_callId, + template CSeq p_cSeq, + template RecordRoute p_recordRoute + ) modifies mw_Response_Base := { + statusLine := mw_statusLine(p_statusLine.statusCode, ?), + msgHeader := {recordRoute := p_recordRoute} + } + + template(present) Response mw_Response_Via( + template(present) StatusLine p_statusLine := ?, + template CallId p_callId, + template CSeq p_cSeq, + template(present) Via p_via := ? + ) modifies mw_Response_Base := { + statusLine := mw_statusLine(p_statusLine.statusCode, ?), + msgHeader := {via := p_via} + } + + template(present) Response mw_Response_Contact( + template(present) StatusLine p_statusLine := ?, + template CallId p_callId, + template CSeq p_cSeq, + template Contact p_contact + ) modifies mw_Response_Base := { + statusLine := mw_statusLine(p_statusLine.statusCode, ?), + msgHeader := {contact := p_contact} + } + + template(present) Response mw_Response_AlertInfo( + template(present) StatusLine p_statusLine := ?, + template CallId p_callId, + template CSeq p_cSeq, + template AlertInfo p_alertInfo + ) modifies mw_Response_Base := { + statusLine := mw_statusLine(p_statusLine.statusCode, ?), + msgHeader := {alertInfo := p_alertInfo} + } + + template(present) Response mw_Response_HistoryInfo( + template(present) StatusLine p_statusLine := ?, + template CallId p_callId, + template CSeq p_cSeq, + template HistoryInfo p_historyInfo + ) modifies mw_Response_Base := { + statusLine := mw_statusLine(p_statusLine.statusCode, ?), + msgHeader := {historyInfo := p_historyInfo} + } + + template(present) Response mw_Response_messageBody( + template(present) StatusLine p_statusLine := ?, + template CallId p_callId, + template CSeq p_cSeq, + template Require p_require, + template MessageBody p_mb + ) modifies mw_Response_Base := { + statusLine := mw_statusLine(p_statusLine.statusCode, ?), + msgHeader := {require := p_require}, + messageBody := p_mb + } + + template(present) Response mw_Response_Require( + template(present) StatusLine p_statusLine := ?, + template CallId p_callId, + template CSeq p_cSeq, + template Require p_require + ) modifies mw_Response_Base := { + statusLine := mw_statusLine(p_statusLine.statusCode, ?), + msgHeader := {require := p_require} + } + + template(present) Response mw_Response_Require_ifpresent( + template(present) StatusLine p_statusLine := ?, + template CallId p_callId, + template CSeq p_cSeq, + template(present) Require p_require + ) modifies mw_Response_Base := { + statusLine := mw_statusLine(p_statusLine.statusCode, ?), + msgHeader := {require := p_require ifpresent} + } + + template(present) Response mw_Response_Supported( + template(present) StatusLine p_statusLine := ?, + template CallId p_callId, + template CSeq p_cSeq, + template Supported p_supported + ) modifies mw_Response_Base := { + statusLine := mw_statusLine(p_statusLine.statusCode, ?), + msgHeader := {supported := p_supported} + } + + template(present) Response mw_Response_UserToUser( + template(present) StatusLine p_statusLine := ?, + template CallId p_callId, + template CSeq p_cSeq + ) modifies mw_Response_Base := { + statusLine := mw_statusLine(p_statusLine.statusCode, ?), + msgHeader := {userToUser := ?} + } + + + } //* end group response_receive + + + } //* end group modified_templates + + + } //* end group MessageTemplates + + group SDP_Templates { + + group SDP_Messages { + + group base_templates { + + template(value) SDP_Message m_SDP_base := { + protocol_version := 0, //* v=0 + origin := { + user_name := PX_SIP_SDP_USER_NAME, + session_id := PX_SIP_SDP_SESSION_ID, + session_version := "0", + net_type := c_in, + addr_type := c_ip4, + addr := "" + }, + //* o=voicesession 12345 12345 IN IP4 172.27.1.219 + session_name := "Voice Session", //* s=Voice Session + information := omit, + uri := omit, + emails := omit, + phone_numbers := omit, + connection := omit, + bandwidth := omit, + times := { + { + time_field := {"0", "0"}, + time_repeat := omit + } + }, //* t=0 0 + timezone_adjustments := omit, + key := omit, + attributes := omit, + media_list := omit + } + + template(value) SDP_Message m_SDP( + template(value) SDP_media_desc p_media, + template(value) SipUserProfile p_userprofile + ) modifies m_SDP_base := { + origin := { + addr := p_userprofile.contactIpaddr + }, + //* o=voicesession 12345 12345 IN IP4 172.27.1.219 + connection := { + net_type := c_in, + addr_type := c_ip4, + conn_addr := { + addr := p_userprofile.bearerIpaddr, + ttl := omit, + num_of_addr := omit + } + }, //* c=IN + //* IP4 + //* 172.27.1.219 + media_list := {p_media} + } + + template(value) SDP_Message m_SDP_mediaList( + template(value) SDP_media_desc_list p_media_list, + template(value) SipUserProfile p_userprofile + ) modifies m_SDP_base := { + origin := { + addr := p_userprofile.contactIpaddr + }, + //* o=voicesession 12345 12345 IN IP4 172.27.1.219 + connection := { + net_type := c_in, + addr_type := c_ip4, + conn_addr := { + addr := p_userprofile.bearerIpaddr, + ttl := omit, + num_of_addr := omit + } + }, //* c=IN + //* IP4 + //* 172.27.1.219 + media_list := p_media_list + } + + template(value) SDP_Message m_SDP_media_attr_preconditions( + template(value) SDP_media_desc p_media, + template(value) SipUserProfile p_userprofile, + template(value) SDP_attribute_list p_attribute_list + ) modifies m_SDP := { + media_list := { + { + media_field := { + media := c_audio, + ports := { + port_number := 8500, + num_of_ports := omit + }, + transport := c_rtpAvp, + fmts := {"0"} + }, //* m=audio + //* 8500 + //* RTP/AVP + //* 0 + information := omit, + connections := omit, + bandwidth := omit, + key := omit, + attributes := p_attribute_list + } + } + } + + template(value) SDP_Message m_SDP_attribute( + template(value) SDP_media_desc p_media, + template(value) SipUserProfile p_userprofile, + template(value) SDP_attribute p_loc_attribute + ) modifies m_SDP := { + attributes := {p_loc_attribute} + } + + template(present) SDP_Message mw_SDP := { + protocol_version := 0, //* v=0 + origin := ?, + session_name := ?, + information := omit, + uri := omit, + emails := omit, + phone_numbers := omit, + connection := ?, + bandwidth := omit, + times := { + { + time_field := {"0", "0"}, + time_repeat := omit + } + }, //* t=0 0 + timezone_adjustments := omit, + key := omit, + attributes := omit, + media_list := ? + } + + + } //* end group base_templates + + group modified_templates { + template(value) SDP_Message m_SDP_bandwidth( + template(value) SDP_media_desc p_media, + template(value) SipUserProfile p_userprofile + ) modifies m_SDP := { + bandwidth := { + { + PX_SIP_SDP_B_MODIFIER, + PX_SIP_SDP_B_BANDWIDTH + } + } + } + + template(value) SDP_Message m_SDP_unacceptable( + template(value) SDP_media_desc p_media, + template(value) SipUserProfile p_userprofile + ) modifies m_SDP := { + protocol_version := 1, //* v=1 unacceptable version of + //* SDP + bandwidth := { + { + PX_SIP_SDP_B_MODIFIER, + PX_SIP_SDP_B_BANDWIDTH + } + } + } + + template(value) SDP_Message m_SDP_encrypted( + template(value) SDP_media_desc p_media, + template(value) SipUserProfile p_userprofile + ) modifies m_SDP := { + bandwidth := { + { + PX_SIP_SDP_B_MODIFIER, + PX_SIP_SDP_B_BANDWIDTH + } + }, + key := { + method := "base64", // prompt + key := "blablabla" + } + } + + + } //* end group modified_templates + + + } //* end group SDP_Messages + + group SDP_Fields { + + template(value) SDP_media_desc m_media(template(value) SDP_media_field p_mf) := { + media_field := p_mf, + information := omit, + connections := omit, + bandwidth := omit, + key := omit, + attributes := omit + } + + template(value) SDP_media_desc m_mediaFieldBandwdthAttributes( + template(value) SDP_media_field p_mf, + template(omit) SDP_bandwidth_list p_bw_l := omit, + template(omit) SDP_attribute_list p_attributes := omit + ) := { + media_field := p_mf, + information := omit, + connections := omit, + bandwidth := p_bw_l, + key := omit, + attributes := p_attributes + } + + template(value) SDP_media_desc m_media_dynPT( + template(value) charstring p_payloadType, + template(value) charstring p_encoding, + template(value) charstring p_clockrate, + template(omit) charstring p_parameters := omit, + template(omit) SDP_key p_sdpKey := omit + ) := { + media_field := { + media := c_audio, //* "audio", + ports := { + port_number := 8500, + num_of_ports := omit + }, + transport := c_rtpAvp, //* "RTP/AVP", + fmts := { p_payloadType } + }, //* m=audio 8500 RTP/AVP 8 + information := omit, + connections := omit, + bandwidth := omit, + key := p_sdpKey, + attributes := {{rtpmap := { + payload_type := p_payloadType, + codec := { + encoding := p_encoding, + clockrate := p_clockrate, + parameters := p_parameters + } + } + }} //* a=rtpmap:8 PCMA/8000 + } + + /** + * @desc send template with specific media transport and attribute values + * @param p_mediaAttribute parameter for SDP media transport supported by the IUT + * former PX_SIP_SDP_media_transport + * @param p_mediaAttribute parameter for SDP media attribute supported by the IUT, + * former PX_SIP_SDP_media_attribute_Exp & PX_SIP_SDP_media_transport_Exp + * @param p_mTypeSubtype parameter for SDP media type supported by the IUT, + * former PX_SIP_SDP_MEDIA_VIDEO + */ + template(value) SDP_media_desc m_media_unsupported( + template(value) charstring p_mediaTransport, + template(value) SDP_attribute_rtpmap p_mediaAttribute, + template(value) charstring p_mTypeSubtype := "video" + ) := { + media_field := { + media := p_mTypeSubtype, + ports := { + port_number := 11500, + num_of_ports := omit + }, + transport := p_mediaTransport, + fmts := {"99"} + }, //* m=audio 8500 RTP/AVP 0 + information := omit, + connections := omit, + bandwidth := omit, + key := omit, + attributes := {{rtpmap := p_mediaAttribute}} + } + + template(value) SDP_bandwidth m_bandwidth( + template(value) charstring p_loc_m, + template(value) integer p_loc_b + ) := { + modifier := p_loc_m, + bandwidth := p_loc_b + } + + template(value) SDP_bandwidth m_bandwidth_as_64 := { + modifier := "AS", + bandwidth := 64 + } + + template(present) SDP_bandwidth mw_bandwidth_rs := { + modifier := "RS", + bandwidth := ? + } + + template(present) SDP_bandwidth mw_bandwidth_rr := { + modifier := "RR", + bandwidth := ? + } + + template(value) SDP_media_field m_media_field( + template(value) charstring p_media, + template(value) integer p_portNum, + template(value) charstring p_transport, + template(value) charstring p_fmts + ) := { + media := p_media, + ports := { + port_number := p_portNum, + num_of_ports := omit + }, + transport := p_transport, + fmts := {p_fmts} + } + + template(present) SDP_media_field mw_media_PCMU := { + media := c_audio, + ports := { + port_number := ?, + num_of_ports := * + }, + transport := c_rtpAvp, + fmts := {"0"} + } + + template(present) SDP_media_field mw_media_PCMA := { + media := c_audio, + ports := { + port_number := 8500, + num_of_ports := omit + }, + transport := c_rtpAvp, + fmts := {"8"} + } + + template(present) SDP_media_field mw_media_PCMA_U_DPT := { + media := c_audio, + ports := { + port_number := ?, + num_of_ports := * + }, + transport := c_rtpAvp, + fmts := {*} + } + + template(present) SDP_media_field mw_media_T38 := { + media := c_image, + ports := { + port_number := ?, + num_of_ports := * + }, + transport := pattern "*ptl", //* udptl,tcptl + fmts := {"t38"} + } + + template(present) SDP_media_field mw_media_G722 := { + media := c_audio, + ports := { + port_number := ?, + num_of_ports := * + }, + transport := "RTP/AVP", + fmts := {"9"} + } + + template(present) SDP_media_field mw_media_AMR_DPT := { + media := c_audio, + ports := { + port_number := ?, + num_of_ports := * + }, + transport := c_rtpAvp, + fmts := {*} + } + + template(present) SDP_media_field mw_media_MSRP := { + media := c_msrp, + ports := { + port_number := ?, + num_of_ports := omit + }, + transport := c_msrpTcp, + fmts := {*} + } + + template(value) SDP_attribute m_attribute_sendonly := {sendonly := {}} + template(present) SDP_attribute mw_attribute_sendonly := {sendonly := {}} + // MRO + template(value) SDP_attribute m_attribute_recvonly := {recvonly := {}} + template(present) SDP_attribute mw_attribute_recvonly := {recvonly := {}} + // MRO + template(value) SDP_attribute m_attribute_sendrecv := {sendrecv := {}} + template(present) SDP_attribute mw_attribute_sendrecv := {sendrecv := {}} + // MRO + template(value) SDP_attribute m_attribute_inactive := {inactive := {}} + template(present) SDP_attribute mw_attribute_inactive := {inactive := {}} + // MRO + template(present) SDP_attribute mw_attribute_sendonly_inactive := (mw_attribute_sendonly, mw_attribute_inactive); + template SDP_attribute mw_attribute_sendrecv_recvonly_omit := (mw_attribute_sendrecv, mw_attribute_recvonly, *); + template(value) SDP_attribute m_attribute_base( + template(value) SDP_attribute_rtpmap p_attr_value + ) := { + rtpmap := p_attr_value + } + /** + * @desc send template for a specific media attribute + * @param attribte value, former PX_SIP_SDP_DYN & " " & PX_SIP_SDP_MEDIA_TRANSPORT_AMR + */ + template(value) SDP_attribute m_attribute_AMR_DPT(//"0 AMR" + template(value) SDP_attribute_rtpmap p_attr_value := {"0", {"AMR", "8000", omit}} + ) := m_attribute_base(p_attr_value); + /** + * @desc send template for a specific media attribute + * @param attribte value, former PX_SIP_SDP_DYN & " " & PX_SIP_SDP_MEDIA_TRANSPORT_CLE + */ + template(value) SDP_attribute m_attribute_CLEARMODE_DPT(//"0 CLEARMODE/8000" + template(value) SDP_attribute_rtpmap p_attr_value := {"0", {"CLEARMODE", "8000", omit}} + ) := m_attribute_base(p_attr_value); + /** + * @desc send template for a specific media attribute + * @param attribte value, former PX_SIP_SDP_ENCODING_ATTRIBUTE_G222 + */ + template(value) SDP_attribute m_attribute_G722(//"9 G722/8000" + template(value) SDP_attribute_rtpmap p_attr_value := {"9", {"G722", "8000", omit}} + ) := m_attribute_base(p_attr_value); + /** + * @desc send template for a specific media attribute + * @param attribte value, former PX_SIP_SDP_ENCODING_ATTRIBUTE_PCMU + */ + template(value) SDP_attribute m_attribute_PCMU(//"0 PCMU/8000" + template(value) SDP_attribute_rtpmap p_attr_value := {"0", {"PCMU", "8000", omit}} + ) := m_attribute_base(p_attr_value); + /** + * @desc send template for a specific media attribute + * @param attribte value, former PX_SIP_SDP_DYN & " " & PX_SIP_SDP_MEDIA_TRANSPORT_PCMU + */ + template(value) SDP_attribute m_attribute_PCMU_DPT(//"0 PCMU/8000" + template(value) SDP_attribute_rtpmap p_attr_value := {"0", {"PCMU", "8000", omit}} + ) := m_attribute_base(p_attr_value); + /** + * @desc send template for a specific media attribute + * @param attribte value, former PX_SIP_SDP_ENCODING_ATTRIBUTE_PCMA + */ + template(value) SDP_attribute m_attribute_PCMA(//"8 PCMA/8000" + template(value) SDP_attribute_rtpmap p_attr_value := {"8", {"PCMA", "8000", omit}} + ) := m_attribute_base(p_attr_value); + /** + * @desc send template for a specific media attribute + * @param attribte value, former PX_SIP_SDP_DYN & " " & PX_SIP_SDP_MEDIA_TRANSPORT_PCMA + */ + template(value) SDP_attribute m_attribute_PCMA_DPT(//"0 PCMA/8000" + template(value) SDP_attribute_rtpmap p_attr_value := {"0", {"PCMA", "8000", omit}} + ) := m_attribute_base(p_attr_value); + + template(present) SDP_attribute mw_attribute_T38 := { + unknown := { + name := ?, + attr_value := pattern "*t38*" + } + } + + template(value) SDP_attribute m_attribute_curr( + template(value) charstring p_preconditionType, + template(value) charstring p_statusType, + template(value) charstring p_direction + ) := { + curr := { + preconditionType := p_preconditionType, + statusType := p_statusType, + direction := p_direction + } + } + + template(present) SDP_attribute mw_attribute_curr := {curr := ?} + + template(value) SDP_attribute m_attribute_des( + template(value) charstring p_preconditionType, + template(value) charstring p_strength, + template(value) charstring p_statusType, + template(value) charstring p_direction + ) := { + des := { + preconditionType := p_preconditionType, + strength := p_strength, + statusType := p_statusType, + direction := p_direction + } + } + + template(present) SDP_attribute mw_attribute_des := {des := ?} + + template(value) SDP_attribute m_attribute_conf( + template(value) charstring p_preconditionType, + template(value) charstring p_statusType, + template(value) charstring p_direction + ) := { + conf := { + preconditionType := p_preconditionType, + statusType := p_statusType, + direction := p_direction + } + } + + + } //* end group SDP_Fields + + + } //* end group SDP_Templates + + group SimpleMsgSummary_Templates { + + template(value) SimpleMsgSummary m_SMS( + template(value) Msg_summary_line_list p_summaryLineList, + template(value) charstring p_uri + ) := { + msg_status_line := m_msgStatusLine_yes, + msg_account := m_msgAccount(p_uri), + msg_summary_line_list := p_summaryLineList, + opt_msg_headers := omit + } + + template(present) SimpleMsgSummary mw_SMS := { + msg_status_line := ?, + msg_account := *, + msg_summary_line_list := *, + opt_msg_headers := * + } + + template(present) SimpleMsgSummary mw_SMS_yes modifies mw_SMS := { + msg_status_line := mw_msgStatusLine_yes + } + + template(present) SimpleMsgSummary mw_SMS_yesUri modifies mw_SMS_yes := { + msg_account := mw_msgAccount + } + + template(present) SimpleMsgSummary mw_SMS_yesVoice modifies mw_SMS_yes := { + msg_summary_line_list := {mw_msgSummaryLine(c_voiceMessage)} + } + + template(present) SimpleMsgSummary mw_SMS_yesUriVoice modifies mw_SMS_yesUri := { + msg_summary_line_list := {mw_msgSummaryLine(c_voiceMessage)} + } + + template(value) Msg_status_line m_msgStatusLine_yes := { + msg_type := c_messageWaiting, + msg_status := "yes" + } + + template(present) Msg_status_line mw_msgStatusLine_yes := { + msg_type := c_messageWaiting, + msg_status := "yes" + } + + template(value) Msg_account m_msgAccount( + template(value) charstring p_uri + ) := { + msg_type_account := c_messageAccount, + account_URI := + p_uri // m_SipUrl_NumberHostParam(PX_IMS_SUT_UE2_PUBLIC_USER,PX_IMS_SUT_UE2_HOME_DOMAIN,omit) + } + + template(present) Msg_account mw_msgAccount := { + msg_type_account := c_messageAccount, + account_URI := ? + } + + template(value) Msg_summary_line m_msgSummaryLine( + template(value) charstring p_msgContexClass, + template(value) charstring p_msgs, + template(value) charstring p_urgent_msgs + ) := { + msg_context_class := p_msgContexClass, + msgs := p_msgs, + urgent_msgs := p_urgent_msgs + } + + template(present) Msg_summary_line mw_msgSummaryLine( + template(present) charstring p_msgContexClass := ? + ) := { + msg_context_class := p_msgContexClass, + msgs := ?, + urgent_msgs := * + } + + + } // end group Templates_SMS + + group MessageBodies { + + template(value) MessageBody m_MBody_SDP( + template(value) SDP_Message p_SDP + ) := { + sdpMessageBody := p_SDP + } + + template(value) MessageBody m_MBody_XML( + template(value) XmlBody p_xmlBody + ) := { + xmlBody := p_xmlBody + } + + template(value) MessageBody m_mBody_SMS( + template(value) SimpleMsgSummary p_SMS + ) := { + simpleMsgSummary := p_SMS + } + + template(value) MessageBody m_MBody_longPlainText := {textplain := c_longMessageContent_1300Bytes} + + template(value) MessageBody m_mBody_plainText( + template(value) charstring p_plaitext + ) := { + textplain := p_plaitext + } + + template(value) MessageBody m_MBody_sipfrag( + template(value) charstring p_sipfrag + ) := { + sipfrag := p_sipfrag + } + + template(value) MessageBody m_MBody_MIMESdpXml( + template(value) SDP_Message p_sdp, + template(value) XmlBody p_xmlBody + ) := { + mimeMessageBody := { + boundary := "--" & PX_SIP_MIME_BOUNDARY, + mimeEncapsulatedList := { + { + content_type := c_sdpApplication, + content_disposition := omit, + mime_encapsulated_part := {sdpMessageBody := p_sdp} + }, + { + content_type := c_ims3gppCwApplication, + content_disposition := omit, + mime_encapsulated_part := {xmlBody := p_xmlBody} + } + } + } + } + + template(value) MessageBody m_MBody_MIMESdpEncrypted( + template(value) SDP_Message p_sdp + ) := { + mimeMessageBody := { + boundary := "--" & PX_SIP_MIME_BOUNDARY, + mimeEncapsulatedList := { + { + content_type := "application/sdp", + content_disposition := "attachment;handling=required;filename=smime.p7", + mime_encapsulated_part := {sdpMessageBody := p_sdp} + } + } + } + } + + template(present) MessageBody mw_MBody_SDP( + template(present) SDP_Message p_SDP := ? + ) := { + sdpMessageBody := p_SDP + } + + template(present) MessageBody mw_MBody_XML( + template(present) XmlBody p_xmlBody := ? + ) := { + xmlBody := p_xmlBody + } + + template(present) MessageBody mw_mBody_SMS( + template(present) SimpleMsgSummary p_SMS := ? + ) := { + simpleMsgSummary := p_SMS + } + + template(present) MessageBody mw_MBody_MIMESdpXml( + template(present) SDP_Message p_sdp := ?, + template(present) XmlBody p_xmlBody := ? + ) := { + mimeMessageBody := { + boundary := ?, + mimeEncapsulatedList := { + { + content_type := ?, + content_disposition := *, + mime_encapsulated_part := {sdpMessageBody := p_sdp} + }, + { + content_type := ?, + content_disposition := *, + mime_encapsulated_part := {xmlBody := p_xmlBody} + } + } + } + } + + template(present) MessageBody mw_MBody_MIME_Ims3gpp( + template charstring p_disposition, + template(present) Ims_3gpp p_ims3gpp := ? + ) := { + mimeMessageBody := { + boundary := ?, + mimeEncapsulatedList := { + *, + { + content_type := c_ims3gppApplication, + content_disposition := p_disposition, + mime_encapsulated_part := {xmlBody := {ims3gpp := p_ims3gpp}} + }, + * + } + } + } + + template(present) MessageBody mw_MBody_MIME_Ims3gppCW( + template charstring p_disposition, + template(present) Ims_3gpp p_ims3gpp := ? + ) := { + mimeMessageBody := { + boundary := ?, + mimeEncapsulatedList := { + *, + { + content_type := c_ims3gppCwApplication, + content_disposition := p_disposition, + mime_encapsulated_part := {xmlBody := {ims3gpp := p_ims3gpp}} + }, + * + } + } + } + + } + /* + * + * @desc group TemplatePreparationFunctions contain functions which are used for templates + */ + group TemplatePreparationFunctions { + + group MessageBody_Calculation { + + /** + * @desc Calculation of Message Body length + * @param p_mb_par contain message body part + * @return message body length + */ + function f_MessageBodyLength( + template(value) MessageBody p_mb_par + ) return integer { + + var integer v_result := 0; + if (PX_MB_LENGTH_FROM_ENCVAL) { + // by default it is set to true + // in case the codec encodes the variant selector, this + // needs to be changed to ischosen... + v_result := lengthof(encvalue(p_mb_par)) / 8; // length + // in + // bytes, + // let get + // length + // of + // encoded + // value + } + else { + + // assume SDP_Message ONLY in the message body + if (ischosen(p_mb_par.sdpMessageBody)) { + v_result := f_SDPlength(valueof(p_mb_par.sdpMessageBody)); + } + + // assume XML_Body ONLY in the message body + if (ischosen(p_mb_par.xmlBody)) { + v_result := f_XMLBody_Length(valueof(p_mb_par.xmlBody), PX_USE_FX_FOR_XML_LENGTH); + } + + // assume simpleMsgSummary_Body ONLY in the message body + if (ischosen(p_mb_par.simpleMsgSummary)) { + v_result := f_simpleMsgSummaryBody_Length(valueof(p_mb_par.simpleMsgSummary)); + } + + // assume MIME_Message in the message body + if (ischosen(p_mb_par.mimeMessageBody)) { + v_result := f_MIMElength(valueof(p_mb_par.mimeMessageBody)); + } + + // assume sipfrag in the message body + if (ischosen(p_mb_par.sipfrag)) { + v_result := f_TextPlainLength(p_mb_par); // same + // function + // due to + // same + // type + // with + // textplain + } + + // assume textplain in the message body + if (ischosen(p_mb_par.textplain)) { + v_result := f_TextPlainLength(p_mb_par); + } + } + + return v_result; + } + + + group SDP_Len_calculation { + /** + * @desc Calculation of SDP length + * @param p_mb contain sdp message + * @return sdp_lenght + */ + function f_SDPlength( + SDP_Message p_mb + ) return integer { + var integer i, j, k, v_len_con0, v_len_con1, v_len_con2, v_len_attr; + var integer v_result := 2; + //* due to empty line beginning of message body + var charstring v_auxstring; + + v_result := 2 + c_CRlen + lengthof(int2str(p_mb.protocol_version)); //* "v=" + v_auxstring := p_mb.origin.user_name & " " & p_mb.origin.session_id & " " & p_mb.origin.session_version & " " & p_mb.origin.net_type & " " & p_mb.origin.addr_type & " " & p_mb.origin.addr; + v_result := v_result + 2 + c_CRlen + lengthof(v_auxstring); //* "o=" + v_result := v_result + 2 + c_CRlen + lengthof(p_mb.session_name); //* "s=" + if (isvalue(p_mb.information)) { + v_auxstring := valueof(p_mb.information); + v_result := v_result + 2 + c_CRlen + lengthof(v_auxstring); + } //* "i= " + if (isvalue(p_mb.uri)) { + v_auxstring := valueof(p_mb.uri); + v_result := v_result + 2 + c_CRlen + lengthof(v_auxstring); + } //* "u=" + if (isvalue(p_mb.emails)) { + for (i := 0; i < lengthof(p_mb.emails); i := i + 1) { + v_result := v_result + 2 + c_CRlen + lengthof(p_mb.emails[i].addr_or_phone); //* "e=" + if (isvalue(p_mb.emails[i].disp_name)) { + v_auxstring := valueof(p_mb.emails[i].disp_name); + v_result := v_result + 1 + lengthof(v_auxstring); + } + } + } + + if (isvalue(p_mb.phone_numbers)) { + for (i := 0; i < lengthof(p_mb.phone_numbers); i := i + 1) { + v_result := v_result + 2 + c_CRlen + lengthof(p_mb.phone_numbers[i].addr_or_phone); //* "p= + //* " + if (isvalue(p_mb.phone_numbers[i].disp_name)) { + v_auxstring := valueof(p_mb.phone_numbers[i].disp_name); + v_result := v_result + 1 + lengthof(v_auxstring); + } + } + } + + if (isvalue(p_mb.connection)) { + v_len_con0 := f_SDPlength_connection(valueof(p_mb.connection)); + v_result := v_result + v_len_con0; + } //* "c=" + if (isvalue(p_mb.bandwidth)) { + for (i := 0; i < lengthof(p_mb.bandwidth); i := i + 1) { + //* "b= " + v_auxstring := p_mb.bandwidth[i].modifier & " "; + v_result := v_result + 2 + c_CRlen + lengthof(v_auxstring) + lengthof(int2str(p_mb.bandwidth[i].bandwidth)); + } + } + + for (i := 0; i < lengthof(p_mb.times); i := i + 1) { + v_auxstring := p_mb.times[i].time_field.start_time & " " & p_mb.times[i].time_field.stop_time; + v_result := v_result + 2 + c_CRlen + lengthof(v_auxstring); //* "t=" + if (isvalue(p_mb.times[i].time_repeat)) { + for (j := 0; j < lengthof(p_mb.times[i].time_repeat); j := j + 1) { + v_result := v_result + 2 + c_CRlen + lengthof(int2str(p_mb.times[i].time_repeat[j].repeat_interval.time)); //* "r=" + if (isvalue(p_mb.times[i].time_repeat[j].repeat_interval.unit)) { + v_auxstring := valueof(p_mb.times[i].time_repeat[j].repeat_interval.unit); + v_result := v_result + 1 + lengthof(v_auxstring); + } + + v_result := v_result + 1 + lengthof(int2str(p_mb.times[i].time_repeat[j].active.time)); + if (isvalue(p_mb.times[i].time_repeat[j].active.unit)) { + v_auxstring := valueof(p_mb.times[i].time_repeat[j].active.unit); + v_result := v_result + 1 + lengthof(v_auxstring); + } + + for (k := 0; k < lengthof(p_mb.times[i].time_repeat[j].offsets); k := k + 1) { + v_result := v_result + 1 + lengthof(int2str(p_mb.times[i].time_repeat[j].offsets[k].time)); + if (isvalue(p_mb.times[i].time_repeat[j].offsets[k].unit)) { + v_auxstring := valueof(p_mb.times[i].time_repeat[j].offsets[k].unit); + v_result := v_result + 1 + lengthof(v_auxstring); + } + } + } + } + } + + if (isvalue(p_mb.timezone_adjustments)) { + log("*** " & __SCOPE__ & ": INFO: timezone adjustments have not been considered in SDP length calculation yet ***"); + } //* "z=" + if (isvalue(p_mb.key)) { + v_result := v_result + 2 + c_CRlen + lengthof(p_mb.key.method); //* "k= + //* " + if (isvalue(p_mb.key.key)) { + v_auxstring := valueof(p_mb.key.key); + v_result := v_result + 1 + lengthof(v_auxstring); + } + } + if (isvalue(p_mb.attributes)) { + for (i := 0; i < lengthof(p_mb.attributes); i := i + 1) { + + + //* "a= " + v_len_con1 := f_SDPlength_attribute(p_mb.attributes[i]); + v_result := v_result + v_len_con1; + } + } //* "a=" + if (isvalue(p_mb.media_list)) { + for (i := 0; i < lengthof(p_mb.media_list); i := i + 1) { + //* "m= " + //* for each media_field + //* log("p_mb.media_list[i ] ",p_mb.media_list[i + //* ] ); + v_result := v_result + 2 + c_CRlen + lengthof(p_mb.media_list[i].media_field.media) + 1 + lengthof(int2str(p_mb.media_list[i].media_field.ports.port_number)); + + + if (isvalue(p_mb.media_list[i].media_field.ports.num_of_ports)) { + v_result := v_result + 1 + lengthof(int2str(valueof(p_mb.media_list[i].media_field.ports.num_of_ports))); + } + v_result := v_result + 1 + lengthof(p_mb.media_list[i].media_field.transport); + for (j := 0; j < lengthof(p_mb.media_list[i].media_field.fmts); j := j + 1) { + v_result := v_result + 1 + lengthof(p_mb.media_list[i].media_field.fmts[j]); + } + + if (isvalue(p_mb.media_list[i].information)) { + v_auxstring := valueof(p_mb.media_list[i].information); + v_result := v_result + 2 + c_CRlen + lengthof(v_auxstring); //* "i= " + } + if (isvalue(p_mb.media_list[i].connections)) { + for (j := 0; j < lengthof(p_mb.media_list[i].connections); j := j + 1) { + v_len_con2 := f_SDPlength_connection(p_mb.media_list[i].connections[j]); + v_result := v_result + v_len_con2; + } //* end for + } + if (isvalue(p_mb.media_list[i].bandwidth)) { + //* "b= " + for (j := 0; j < lengthof(p_mb.media_list[i].bandwidth); j := j + 1) { + v_result := v_result + 2 + c_CRlen + lengthof(p_mb.media_list[i].bandwidth[j].modifier) + 1 + lengthof(int2str(p_mb.media_list[i].bandwidth[j].bandwidth)); + } //* end for + } + if (isvalue(p_mb.media_list[i].key)) { + //* "k= " + v_result := v_result + 1 + lengthof(p_mb.media_list[i].key.method); + if (isvalue(p_mb.media_list[i].key.key)) { + v_auxstring := valueof(p_mb.media_list[i].key.key); + v_result := v_result + 1 + lengthof(v_auxstring); + } + } + if (isvalue(p_mb.media_list[i].attributes)) { + for (j := 0; j < lengthof(p_mb.media_list[i].attributes); j := j + 1) { + + //* "a= " + v_len_attr := f_SDPlength_attribute(p_mb.media_list[i].attributes[j]); + v_result := v_result + v_len_attr; + } //* end for j + } + } //* end for i + } //* end if media_list + return v_result; + } + //* end function f_SDPlength + function f_SDPlength_connection( + SDP_connection p_element + ) return integer { + //* "c=" + var integer v_result := 0; + v_result := v_result + 2 + c_CRlen + lengthof(p_element.net_type & " " & p_element.addr_type & " " & p_element.conn_addr.addr); + if (isvalue(p_element.conn_addr.ttl) and p_element.conn_addr.ttl > 0) { + v_result := v_result + 1 + lengthof(int2str(valueof(p_element.conn_addr.ttl))); + } + if (isvalue(p_element.conn_addr.num_of_addr) and p_element.conn_addr.num_of_addr > 0) { + v_result := v_result + 1 + lengthof(int2str(valueof(p_element.conn_addr.num_of_addr))); + } + return v_result; + } //* f_SDPlength_connection + + function f_SDPlength_attribute( + SDP_attribute p_element + ) return integer { + //* "a=" + var integer v_result := 0; + if (ischosen(p_element.cat)) { + v_result := v_result + 2 + c_CRlen + lengthof("cat:" & p_element.cat.attr_value); + } + if (ischosen(p_element.keywds)) { + v_result := v_result + 2 + c_CRlen + lengthof("keywds:" & p_element.keywds.attr_value); + } + if (ischosen(p_element.tool)) { + v_result := v_result + 2 + c_CRlen + lengthof("tool:" & p_element.tool.attr_value); + } + if (ischosen(p_element.ptime)) { + v_result := v_result + 2 + c_CRlen + lengthof("ptime:" & p_element.ptime.attr_value); + } + if (ischosen(p_element.recvonly)) { + v_result := v_result + c_CRlen + lengthof("recvonly"); + } + if (ischosen(p_element.sendrecv)) { + v_result := v_result + c_CRlen + lengthof("sendrecv"); + } + if (ischosen(p_element.sendonly)) { + v_result := v_result + c_CRlen + lengthof("sendonly"); + } + if (ischosen(p_element.inactive)) { + v_result := v_result + c_CRlen + lengthof("inactive"); + } + if (ischosen(p_element.orient)) { + v_result := v_result + 2 + c_CRlen + lengthof("orient:" & p_element.orient.attr_value); + } + if (ischosen(p_element.sdp_type)) { + v_result := v_result + 2 + c_CRlen + lengthof("type:" & p_element.sdp_type.attr_value); + } + if (ischosen(p_element.charset)) { + v_result := v_result + 2 + c_CRlen + lengthof("charset" & p_element.charset.attr_value); + } + if (ischosen(p_element.sdplang)) { + v_result := v_result + 2 + c_CRlen + lengthof("sdplang:" & p_element.sdplang.attr_value); + } + if (ischosen(p_element.lang)) { + v_result := v_result + 2 + c_CRlen + lengthof("lang:" & p_element.lang.attr_value); + } + if (ischosen(p_element.framerate)) { + v_result := v_result + 2 + c_CRlen + lengthof("framerate:" & p_element.framerate.attr_value); + } + if (ischosen(p_element.quality)) { + v_result := v_result + 2 + c_CRlen + lengthof("quality:" & p_element.quality.attr_value); + } + if (ischosen(p_element.fmtp)) { + v_result := v_result + 2 + c_CRlen + lengthof("fmtp:" & p_element.fmtp.format & " " & f_fmtpparams_to_charstring(p_element.fmtp.params)); + } + if (ischosen(p_element.curr)) { + v_result := v_result + 2 + c_CRlen + lengthof("curr:" & p_element.curr.preconditionType & " " & p_element.curr.statusType & " " & p_element.curr.direction); + } + if (ischosen(p_element.des)) { + v_result := v_result + 2 + c_CRlen + lengthof("des:" & p_element.des.preconditionType & " " & p_element.des.strength & " " & p_element.des.statusType & " " & p_element.des.direction); + } + if (ischosen(p_element.conf)) { + v_result := v_result + 2 + c_CRlen + lengthof("conf:" & p_element.conf.preconditionType & " " & p_element.conf.statusType & " " & p_element.conf.direction); + } + if (ischosen(p_element.rtpmap)) { + v_result := v_result + 2 + c_CRlen + lengthof("rtpmap:" & f_rtpmap_to_charstring(p_element.rtpmap)); + } + if (ischosen(p_element.rtcp)) { + v_result := v_result + 2 + c_CRlen + lengthof("rtcp:" & f_rtcp_to_charstring(p_element.rtcp)); + } + if (ischosen(p_element.unknown)) { + v_result := v_result + 2 + c_CRlen + lengthof(p_element.unknown.name); + if (isvalue(p_element.unknown.attr_value)) { + v_result := v_result + lengthof(":" & p_element.unknown.attr_value); + } + } + //* log("axr: length attribute=", v_result); + return v_result; + } //* f_SDPlength_attribute + + function f_fmtpparams_to_charstring( + SDP_attribute_fmtp_format_specific_params p_params + ) return charstring { + var charstring v_result := ""; + if(ischosen(p_params.unstructured)){ + v_result := p_params.unstructured; + } + else + { + for(var integer v_idx := 0; v_idx < lengthof(p_params.paramList); v_idx := v_idx + 1) { + if(v_idx != 0) + { + v_result := v_result & "; " + } + v_result := v_result & p_params.paramList[v_idx].id; + if(ispresent(p_params.paramList[v_idx].paramValue)){ + if(ischosen(p_params.paramList[v_idx].paramValue.tokenOrHost)) + { + v_result := v_result & "=" & p_params.paramList[v_idx].paramValue.tokenOrHost; + } + else + { + v_result := v_result & "=""" & p_params.paramList[v_idx].paramValue.quotedString & """"; + } + } + } + } + return v_result; + } + + function f_rtpmap_to_charstring( + SDP_attribute_rtpmap p_rtpmap + ) return charstring { + var charstring v_result := ""; + v_result := p_rtpmap.payload_type & " " & p_rtpmap.codec.encoding & "/" & p_rtpmap.codec.clockrate; + if(ispresent(p_rtpmap.codec.parameters)) + { + v_result := v_result & "/" & p_rtpmap.codec.parameters; + } + return v_result; + } + + function f_rtcp_to_charstring( + SDP_attribute_rtcp p_rtcp + ) return charstring { + var charstring v_result := int2str(p_rtcp.portnumber); + if(ispresent(p_rtcp.connection)) + { + v_result := v_result & " " & p_rtcp.connection.net_type & " " & p_rtcp.connection.addr_type & " " & p_rtcp.connection.conn_addr.addr; + if(ispresent(p_rtcp.connection.conn_addr.ttl)) + { + v_result := v_result & "/" & int2str(p_rtcp.connection.conn_addr.ttl); + if(ispresent(p_rtcp.connection.conn_addr.num_of_addr)) + { + v_result := v_result & "/" & int2str(p_rtcp.connection.conn_addr.num_of_addr); + } + } + } + return v_result; + } + + } //* group SDPlen_calculation + + group XML_Len_calculation { + + /** + * @desc Declaration of external functions to calculate length of message bodies switching of internal or external functions are made by boolean module parameter/PIXIT USE_FX_FOR_XML_LENGTH declared at top of this module + */ + external function fx_calculateXMLBodyLen( + XmlBody p_mb + ) return integer; + + /** + * @desc Calculation of XML body length + * @param p_mb contain XML body + * @return xml_length + */ + function f_XMLBody_Length( + XmlBody p_mb, + boolean p_ext_func + ) return integer { + var integer v_result := 0; + + if (p_ext_func) { + v_result := fx_calculateXMLBodyLen(p_mb); + } + else { + // assume ConferenceInfo ONLY in the XML message + // body + if (ischosen(p_mb.conference)) { + v_result := f_XMLBody_ConferenceInfo_Length(p_mb.conference); + } + + // assume CUG ONLY in the XML message body + if (ischosen(p_mb.cug)) { + v_result := f_XMLBody_Cug_Length(p_mb.cug); + } + + // assume MCID ONLY in the XML message body + if (ischosen(p_mb.mcid)) { + v_result := f_XMLBody_Mcid_Length(p_mb.mcid); + } + + // assume CW ONLY in the XML message body + if (ischosen(p_mb.cw)) { + v_result := f_XMLBody_Cw_Length(p_mb.cw); + } + + // assume CDIV ONLY in the XML message body + if (ischosen(p_mb.cdivn)) { + v_result := f_XMLBody_Cdivn_Length(p_mb.cdivn); + } + + // assume PSTNTransit ONLY in the XML message body + if (ischosen(p_mb.pstnTransit)) { + v_result := f_XMLBody_PSTNTransit_Length(p_mb.pstnTransit); + } + + // assume Simservs ONLY in the XML message body + if (ischosen(p_mb.simservs)) { + v_result := f_XMLBody_Simservs_Length(p_mb.simservs); + } + + // assume ResourceLists ONLY in the XML message body + if (ischosen(p_mb.resourceLists)) { + v_result := f_XMLBody_ResourceList_Length(p_mb.resourceLists); + } + + // assume Ims3GPP ONLY in the XML message body + if (ischosen(p_mb.ims3gpp)) { + v_result := f_XMLBody_Ims3GPP_Length(p_mb.ims3gpp); + } + /** + * Add aditional checks regarding to new variants, also implement appropriate function for calculation + */ + } + return v_result; + } //* f_XMLBodyLength + + group XMLBodies_calculation { + + /** + * @desc Calculation of XML ConferenceInfo element length + * @param p_mb contain XML ConfInfo body + * @return xml_length + */ + function f_XMLBody_ConferenceInfo_Length( + template(value) Conference_type p_mb + ) return integer { + var integer v_result := lengthof(encvalue(p_mb)) / 8; + return v_result; + } //* f_XMLBody_ConferenceInfo_Length + + /** + * @desc Calculation of XML CUG element length + * @param p_mb contain XML CUG body + * @return xml_length + */ + function f_XMLBody_Cug_Length( + template(value) Cug p_mb + ) return integer { + var integer v_result := lengthof(encvalue(p_mb)) / 8; + return v_result; + } //* f_XMLBody_Cug_Length + + /** + * @desc Calculation of XML MCID element length + * @param p_mb contain XML MCID body + * @return xml_length + */ + function f_XMLBody_Mcid_Length( + template(value) Mcid p_mb + ) return integer { + var integer v_result := lengthof(encvalue(p_mb)) / 8; + + return v_result; + } //* f_XMLBody_Mcid_Length + + /** + * @desc Calculation of XML CW element length + * @param p_mb contain XML CW body + * @return xml_length + */ + function f_XMLBody_Cw_Length( + template(value) Ims_cw p_mb + ) return integer { + var integer v_result := lengthof(encvalue(p_mb)) / 8; + + return v_result; + } //* f_XMLBody_Cw_Length + + /** + * @desc Calculation of XML CDIVN element length + * @param p_mb contain XML CDIVN body + * @return xml_length + */ + function f_XMLBody_Cdivn_Length( + template(value) Comm_div_info_type p_mb + ) return integer { + var integer v_result := lengthof(encvalue(p_mb)) / 8; + + return v_result; + } //* f_XMLBody_Cdivn_Length + + /** + * @desc Calculation of XML PSTNTransit element length + * @param p_mb contain XML PSTNTransit body + * @return xml_length + */ + function f_XMLBody_PSTNTransit_Length( + template(value) PSTN_transit p_mb + ) return integer { + var integer v_result := lengthof(encvalue(p_mb)) / 8; + return v_result; + } //* f_XMLBody_PSTNTransit_Length + + /** + * @desc Calculation of XML Simservs element length + * @param p_mb contain XML Simservs body + * @return xml_length + */ + function f_XMLBody_Simservs_Length( + template(value) Simservs p_mb + ) return integer { + var integer v_result := lengthof(encvalue(p_mb)) / 8; + return v_result; + } //* f_XMLBody_Simservs_Length + + /** + * @desc Calculation of XML ResourceList length + * @param p_mb contain XML ResourceList body + * @return xml_length + */ + function f_XMLBody_ResourceList_Length( + template(value) Resource_lists p_mb + ) return integer { + var integer v_result := lengthof(encvalue(p_mb)) / 8; + return v_result; + } //* f_XMLBody_ResourceList_Length + + /** + * @desc Calculation of XML Ims3GPP length + * @param p_mb contain XML Ims3GPP body + * @return xml_length + */ + function f_XMLBody_Ims3GPP_Length( + template(value) TIMS3GPP p_mb + ) return integer { + var integer v_result := lengthof(encvalue(p_mb)) / 8; + return v_result; + } //* f_XMLBody_Ims3GPP_Length + + + } //* XMLBodies_calculation + + + } //* group XMLlen_calculation + + group simpleMsgSummaryBody_Length { + + function f_simpleMsgSummaryBody_Length( + SimpleMsgSummary p_mb + ) return integer { + var integer i; + var integer v_result := 2; + + + //* due to empty line beginning of message body + var charstring v_auxstring; + + v_result := 2 + lengthof(p_mb.msg_status_line.msg_type) + 2 + lengthof(p_mb.msg_status_line.msg_status) + c_CRlen; //* "Message-Waiting: + //* yes" + if (isvalue(p_mb.msg_account)) + //* "Message-Account" + { + v_result := v_result + 2 + lengthof(p_mb.msg_account.msg_type_account) + 2 + lengthof(p_mb.msg_account.account_URI) + c_CRlen; + } + if (isvalue(p_mb.msg_summary_line_list)) { + for (i := 0; i < lengthof(p_mb.msg_summary_line_list); i := i + 1) { + v_result := v_result + 2 + c_CRlen + lengthof(p_mb.msg_summary_line_list[i].msg_context_class) + 2 + lengthof(p_mb.msg_summary_line_list[i].msgs); + if (isvalue(p_mb.msg_summary_line_list[i].urgent_msgs)) { + v_auxstring := valueof(p_mb.msg_summary_line_list[i].urgent_msgs); + v_result := v_result + 1 + lengthof(v_auxstring); + } + } + } + if (isvalue(p_mb.opt_msg_headers)) { + for (i := 0; i < lengthof(p_mb.opt_msg_headers); i := i + 1) { + v_result := v_result + 2 + c_CRlen + lengthof(p_mb.opt_msg_headers[i]); + } + } + return v_result; + } + } + + group MIME_Len_calculation { + /** + * @desc Calculation of MIME length + * @param p_mb contain MIME message + * @return xml_length + */ + function f_MIMElength( + MIME_Message p_mb + ) return integer { + var integer i; + var integer v_result := 2; + // 0d0a + v_result := v_result + lengthof(p_mb.boundary) + 2 /*0d0a*/; + + for (i := 0; i < lengthof(p_mb.mimeEncapsulatedList); i := i + 1) { + + v_result := v_result + lengthof("Content-Type: ") + lengthof(p_mb.mimeEncapsulatedList[i].content_type) + 2 /*0d0a*/; + + if (isvalue(p_mb.mimeEncapsulatedList[i].content_disposition)) { + v_result := v_result + lengthof("Content-Disposition: ") + lengthof(p_mb.mimeEncapsulatedList[i].content_disposition) + 2 /*0d0a*/; + } + + // v_result := v_result +2/*0d0a*/; ??? to check + // assume SDP_Message ONLY in the message body + if (ischosen(p_mb.mimeEncapsulatedList[i].mime_encapsulated_part.sdpMessageBody)) { + v_result := v_result + f_SDPlength(p_mb.mimeEncapsulatedList[i].mime_encapsulated_part.sdpMessageBody); + } + + // assume XML_Body ONLY in the message body + if (ischosen(p_mb.mimeEncapsulatedList[i].mime_encapsulated_part.xmlBody)) { + v_result := v_result + f_XMLBody_Length(p_mb.mimeEncapsulatedList[i].mime_encapsulated_part.xmlBody, PX_USE_FX_FOR_XML_LENGTH); + } + // //assume XML_Message ONLY in the message body + // if (ischosen(p_mb.mimeEncapsulatedList[i ] + // .mime_encapsulated_part.xmlMessage)) + // { + // v_result := v_result + + // f_XMLlength(p_mb.mimeEncapsulatedList[i ] + // .mime_encapsulated_part.xmlMessage, + // USE_FX_FOR_XML_LENGTH ); + // }; + // v_result := v_result +2/*0d0a*/; ??? to check + } + + // v_result := v_result +2/*0d0a*/; ??? to check + return v_result; + } //* f_MIMElength + + + } //* group MIMElen_calculation + + group TextPlain_Len_calculation { + /** + * @desc Calculation of messagebody-textplain type length + * @param p_mb contain textplain message + * @return lenght + */ + function f_TextPlainLength( + template(value) MessageBody p_mb + ) return integer { + var integer v_result := 0; + + v_result := v_result + lengthof(p_mb.textplain); + + return v_result; + } //* end function f_TextPlainLength + + + } //* end group TextPlainLen_calculation + + + } //* group MessageBody_Calculation + + + group GiveHeaders { + /** + * @desc Return component variable of recordRoute header if vc_boo_recordRoute is true + * @return component variable of recordRoute header + */ + function f_recordroute( + ) runs on SipComponent + return template(omit) RecordRoute { + var template(omit) RecordRoute v_recordRoute := omit; + if (vc_boo_recordRoute) { + return vc_recordRoute; + } + else { + return (v_recordRoute); + } + } + + /** + * @desc Return component variable of Route header if vc_boo_route is true + * @return component variable of recordRoute header + */ + function f_route( + ) runs on SipComponent + return template(omit) Route { + var template(omit) Route v_route := omit; + if (vc_boo_route) { + return vc_route; + } + else { + return (v_route); + } + } + + + } //* end group GiveHeaders + + group others { + + /* + * + * @desc function combines two comma parameter lists + * @param p_list1 first list + * @param p_list2 second list + * @return comma parameter list that contains parameters from both input lists + * @verdict + */ + function f_merge_CommaParam_List( + template(value) CommaParam_List p_list1, + template(value) CommaParam_List p_list2 + ) return template(value) CommaParam_List { + var template(value) CommaParam_List p_result; + var integer i, v_limit1 := lengthof(p_list1); + for (i := 0; i < v_limit1; i := i + 1) { + p_result[i] := p_list1[i]; + } + for (i := 0; i < lengthof(p_list2); i := i + 1) { + p_result[i + v_limit1] := p_list2[i]; + } + return p_result; + } + + + } //* end group others + + + } //* group TemplatePreparationFunctions +} //* end module LibSip_Templates diff --git a/ttcn/patch_sip_titan/http_uri_etsi_org_ngn_params_xml_comm_div_info.ttcn b/ttcn/patch_sip_titan/http_uri_etsi_org_ngn_params_xml_comm_div_info.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..7b45b703def52265d5b7f5d3d66b4dca4bbfccbe --- /dev/null +++ b/ttcn/patch_sip_titan/http_uri_etsi_org_ngn_params_xml_comm_div_info.ttcn @@ -0,0 +1,389 @@ +/******************************************************************************* +* Copyright (c) 2000-2016 Ericsson Telecom AB +* +* XSD to TTCN-3 Translator version: CRL 113 200/5 R4D +* +* All rights reserved. This program and the accompanying materials +* are made available under the terms of the Eclipse Public License v1.0 +* which accompanies this distribution, and is available at +* http://www.eclipse.org/legal/epl-v10.html +*******************************************************************************/ +// +// File: http_uri_etsi_org_ngn_params_xml_comm_div_info.ttcn +// Description: +// References: +// Rev: +// Prodnr: +// Updated: Fri Mar 4 09:23:30 2016 +// Contact: http://ttcn.ericsson.se +// +//////////////////////////////////////////////////////////////////////////////// +// Generated from file(s): +// - CDIVN.xsd +// /* xml version = "1.0" */ +// /* targetnamespace = "http://uri.etsi.org/ngn/params/xml/comm-div-info" */ +//////////////////////////////////////////////////////////////////////////////// +// Modification header(s): +//----------------------------------------------------------------------------- +// Modified by: +// Modification date: +// Description: +// Modification contact: +//------------------------------------------------------------------------------ +//////////////////////////////////////////////////////////////////////////////// + + +module http_uri_etsi_org_ngn_params_xml_comm_div_info { + + +import from XSD all; + + +import from http_www_w3_org_XML_1998_namespace all; + + +/* This import brings in the XML language definition */ + + +/* Communication Diversion Information. This is the top-level XML element */ + + +type Comm_div_info_type Comm_div_info +with { + variant "name as 'comm-div-info'"; + variant "element"; +}; + + +/* Communication Diversion Information Type. This is the top-level XML element */ + + +type record Comm_div_info_type +{ + XSD.AnyURI entity, + Comm_div_subs_info_type comm_div_subs_info optional, + Comm_div_ntfy_info_type comm_div_ntfy_info optional, + record of XSD.String elem_list +} +with { + variant "name as 'comm-div-info-type'"; + variant (entity) "attribute"; + variant (comm_div_subs_info) "name as 'comm-div-subs-info'"; + variant (comm_div_ntfy_info) "name as 'comm-div-ntfy-info'"; + variant (elem_list) "untagged"; + variant (elem_list[-]) "anyElement except unqualified, 'http://uri.etsi.org/ngn/params/xml/comm-div-info'"; +}; + + +/* - + Communication Diversion Subscription Type. + Used at Subscription time to + select Communication Diversions for notification, + when to notify them and + what to notify. */ + + +type record Comm_div_subs_info_type +{ + record of XSD.String attr optional, + Comm_div_selection_criteria_type comm_div_selection_criteria optional, + Comm_div_ntfy_trigger_criteria_type comm_div_ntfy_trigger_criteria optional, + Comm_div_info_selection_criteria_type comm_div_info_selection_criteria optional, + record of XSD.String elem_list +} +with { + variant "name as 'comm-div-subs-info-type'"; + variant (attr) "anyAttributes except unqualified, 'http://uri.etsi.org/ngn/params/xml/comm-div-info'"; + variant (comm_div_selection_criteria) "name as 'comm-div-selection-criteria'"; + variant (comm_div_ntfy_trigger_criteria) "name as 'comm-div-ntfy-trigger-criteria'"; + variant (comm_div_info_selection_criteria) "name as 'comm-div-info-selection-criteria'"; + variant (elem_list) "untagged"; + variant (elem_list[-]) "anyElement except unqualified, 'http://uri.etsi.org/ngn/params/xml/comm-div-info'"; +}; + + +/* - + Communication Diversion Notification Information Type + Used while notifying the User about the Communication Diversion */ + + +type record Comm_div_ntfy_info_type +{ + record of XSD.String attr optional, + User_info_type originating_user_info optional, + XSD.AnyURI diverting_user_info optional, + XSD.AnyURI diverted_to_user_info optional, + XSD.DateTime diversion_time_info optional, + Diversion_reason_info_type diversion_reason_info optional, + Diversion_rule_info_type diversion_rule_info optional, + record of XSD.String elem_list +} +with { + variant "name as 'comm-div-ntfy-info-type'"; + variant (attr) "anyAttributes except unqualified, 'http://uri.etsi.org/ngn/params/xml/comm-div-info'"; + variant (originating_user_info) "name as 'originating-user-info'"; + variant (diverting_user_info) "name as 'diverting-user-info'"; + variant (diverted_to_user_info) "name as 'diverted-to-user-info'"; + variant (diversion_time_info) "name as 'diversion-time-info'"; + variant (diversion_reason_info) "name as 'diversion-reason-info'"; + variant (diversion_rule_info) "name as 'diversion-rule-info'"; + variant (elem_list) "untagged"; + variant (elem_list[-]) "anyElement except unqualified, 'http://uri.etsi.org/ngn/params/xml/comm-div-info'"; +}; + + +/* COMMUNICATION DIVERSION SELECTION CRITERIA */ + + +type record Comm_div_selection_criteria_type +{ + record of XSD.String attr optional, + User_selection_criteria_type originating_user_selection_criteria optional, + XSD.AnyURI diverting_user_selection_criteria optional, + XSD.AnyURI diverted_to_user_selection_criteria optional, + Time_range_selection_criteria_type diversion_time_selection_criteria optional, + Diversion_reason_selection_criteria_type diversion_reason_selection_criteria optional, + record of XSD.String elem_list +} +with { + variant "name as 'comm-div-selection-criteria-type'"; + variant (attr) "anyAttributes except unqualified, 'http://uri.etsi.org/ngn/params/xml/comm-div-info'"; + variant (originating_user_selection_criteria) "name as 'originating-user-selection-criteria'"; + variant (diverting_user_selection_criteria) "name as 'diverting-user-selection-criteria'"; + variant (diverted_to_user_selection_criteria) "name as 'diverted-to-user-selection-criteria'"; + variant (diversion_time_selection_criteria) "name as 'diversion-time-selection-criteria'"; + variant (diversion_reason_selection_criteria) "name as 'diversion-reason-selection-criteria'"; + variant (elem_list) "untagged"; + variant (elem_list[-]) "anyElement except unqualified, 'http://uri.etsi.org/ngn/params/xml/comm-div-info'"; +}; + + +/* COMMUNICATION DIVERSION NOTIFICATION TRIGGER CRITERIA */ + + +type record Comm_div_ntfy_trigger_criteria_type +{ + record of XSD.String attr optional, + Time_range_selection_criteria_type notification_time_selection_criteria optional, + Presence_status_selection_criteria_type presence_status_selection_criteria optional, + XSD.Integer notification_buffer_interval (-infinity .. 86400) optional, + record of XSD.String elem_list +} +with { + variant "name as 'comm-div-ntfy-trigger-criteria-type'"; + variant (attr) "anyAttributes except unqualified, 'http://uri.etsi.org/ngn/params/xml/comm-div-info'"; + variant (notification_time_selection_criteria) "name as 'notification-time-selection-criteria'"; + variant (presence_status_selection_criteria) "name as 'presence-status-selection-criteria'"; + variant (notification_buffer_interval) "name as 'notification-buffer-interval'"; + variant (notification_buffer_interval) "defaultForEmpty as '86400'"; + variant (elem_list) "untagged"; + variant (elem_list[-]) "anyElement except unqualified, 'http://uri.etsi.org/ngn/params/xml/comm-div-info'"; +}; + + +/* COMMUNICATION DIVERSION INFORMATION SELECTION CRITERIA */ + + +type record Comm_div_info_selection_criteria_type +{ + record of XSD.String attr optional, + XSD.Boolean disable_originating_user_info optional, + XSD.Boolean disable_diverting_user_info optional, + XSD.Boolean disable_diverted_to_user_info optional, + XSD.Boolean disable_diversion_time_info optional, + XSD.Boolean disable_diversion_reason_info optional, + XSD.Boolean disable_diversion_rule_info optional, + record of XSD.String elem_list +} +with { + variant "name as 'comm-div-info-selection-criteria-type'"; + variant (attr) "anyAttributes except unqualified, 'http://uri.etsi.org/ngn/params/xml/comm-div-info'"; + variant (disable_originating_user_info) "name as 'disable-originating-user-info'"; + variant (disable_originating_user_info) "defaultForEmpty as 'false'"; + //variant (disable_originating_user_info) "text 'true' as '1'"; + //variant (disable_originating_user_info) "text 'false' as '0'"; + variant (disable_diverting_user_info) "name as 'disable-diverting-user-info'"; + variant (disable_diverting_user_info) "defaultForEmpty as 'false'"; + //variant (disable_diverting_user_info) "text 'true' as '1'"; + //variant (disable_diverting_user_info) "text 'false' as '0'"; + variant (disable_diverted_to_user_info) "name as 'disable-diverted-to-user-info'"; + variant (disable_diverted_to_user_info) "defaultForEmpty as 'false'"; + //variant (disable_diverted_to_user_info) "text 'true' as '1'"; + //variant (disable_diverted_to_user_info) "text 'false' as '0'"; + variant (disable_diversion_time_info) "name as 'disable-diversion-time-info'"; + variant (disable_diversion_time_info) "defaultForEmpty as 'false'"; + //variant (disable_diversion_time_info) "text 'true' as '1'"; + //variant (disable_diversion_time_info) "text 'false' as '0'"; + variant (disable_diversion_reason_info) "name as 'disable-diversion-reason-info'"; + variant (disable_diversion_reason_info) "defaultForEmpty as 'false'"; + //variant (disable_diversion_reason_info) "text 'true' as '1'"; + //variant (disable_diversion_reason_info) "text 'false' as '0'"; + variant (disable_diversion_rule_info) "name as 'disable-diversion-rule-info'"; + variant (disable_diversion_rule_info) "defaultForEmpty as 'false'"; + //variant (disable_diversion_rule_info) "text 'true' as '1'"; + //variant (disable_diversion_rule_info) "text 'false' as '0'"; + variant (elem_list) "untagged"; + variant (elem_list[-]) "anyElement except unqualified, 'http://uri.etsi.org/ngn/params/xml/comm-div-info'"; +}; + + +/* User Info Type */ + + +type record User_info_type +{ + record of XSD.String attr optional, + XSD.String user_name optional, + XSD.AnyURI user_URI +} +with { + variant "name as 'user-info-type'"; + variant (attr) "anyAttributes except unqualified, 'http://uri.etsi.org/ngn/params/xml/comm-div-info'"; + variant (user_name) "name as 'user-name'"; + variant (user_URI) "name as 'user-URI'"; +}; + + +/* DIVERSION REASON INFO */ + + +type record of Diversion_reason_info_type Diversion_reason_info_types +with { + variant "name as 'diversion-reason-info-types'"; + variant "list"; +}; + + +type enumerated Diversion_reason_info_type +{ + int302(302), + int404(404), + int408(408), + int480(480), + int486(486), + int487(487), + int503(503) +} +with { + variant "useNumber"; + variant "name as 'diversion-reason-info-type'"; +}; + + +/* DIVERSION RULE INFO */ + + +type record Diversion_rule_info_type +{ + record of XSD.String attr optional, + XSD.String diversion_rule +} +with { + variant "name as 'diversion-rule-info-type'"; + variant (attr) "anyAttributes except unqualified, 'http://uri.etsi.org/ngn/params/xml/comm-div-info'"; + variant (diversion_rule) "name as 'diversion-rule'"; +}; + + +/* ORIGINATING USER SELECTION CRITERIA */ + + +type record User_selection_criteria_type +{ + record of XSD.String attr optional, + record of User_info_type user_info_list +} +with { + variant "name as 'user-selection-criteria-type'"; + variant (attr) "anyAttributes except unqualified, 'http://uri.etsi.org/ngn/params/xml/comm-div-info'"; + variant (user_info_list) "untagged"; + variant (user_info_list[-]) "name as 'user-info'"; +}; + + +/* DIVERSION REASON SELECTION CRITERIA */ + + +type record Diversion_reason_selection_criteria_type +{ + record of XSD.String attr optional, + Diversion_reason_info_types diversion_reason_info +} +with { + variant "name as 'diversion-reason-selection-criteria-type'"; + variant (attr) "anyAttributes except unqualified, 'http://uri.etsi.org/ngn/params/xml/comm-div-info'"; + variant (diversion_reason_info) "name as 'diversion-reason-info'"; +}; + + +/* TIME RANGE SELECTION CRITERIA */ + + +type record Time_range_selection_criteria_type +{ + record of XSD.String attr optional, + record of Time_range_type time_range_list +} +with { + variant "name as 'time-range-selection-criteria-type'"; + variant (attr) "anyAttributes except unqualified, 'http://uri.etsi.org/ngn/params/xml/comm-div-info'"; + variant (time_range_list) "untagged"; + variant (time_range_list[-]) "name as 'time-range'"; +}; + + +/* TIME RANGE INFO */ + + +type record Time_range_type +{ + record of XSD.String attr optional, + XSD.DateTime start_time, + XSD.DateTime end_time +} +with { + variant "name as 'time-range-type'"; + variant (attr) "anyAttributes except unqualified, 'http://uri.etsi.org/ngn/params/xml/comm-div-info'"; + variant (start_time) "name as 'start-time'"; + variant (end_time) "name as 'end-time'"; +}; + + +/* PRESENCE STATUS SELECTION CRITERIA */ + + +type record Presence_status_selection_criteria_type +{ + record of XSD.String attr optional, + record of Presence_status_info_type presence_status_info_list +} +with { + variant "name as 'presence-status-selection-criteria-type'"; + variant (attr) "anyAttributes except unqualified, 'http://uri.etsi.org/ngn/params/xml/comm-div-info'"; + variant (presence_status_info_list) "untagged"; + variant (presence_status_info_list[-]) "name as 'presence-status-info'"; +}; + + +/* PRESENCE STATUS INFo */ + + +type record Presence_status_info_type +{ + record of XSD.String attr optional, + XSD.String presence_status +} +with { + variant "name as 'presence-status-info-type'"; + variant (attr) "anyAttributes except unqualified, 'http://uri.etsi.org/ngn/params/xml/comm-div-info'"; + variant (presence_status) "name as 'presence-status'"; +}; + + +} +with { + encode "XML"; + variant "namespace as 'http://uri.etsi.org/ngn/params/xml/comm-div-info' prefix 'tns'"; + variant "controlNamespace 'http://www.w3.org/2001/XMLSchema-instance' prefix 'xsi'"; + variant "elementFormQualified"; +} diff --git a/ttcn/patch_sip_titan/http_uri_etsi_org_ngn_params_xml_simservs_mcid.ttcn b/ttcn/patch_sip_titan/http_uri_etsi_org_ngn_params_xml_simservs_mcid.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..050f79154249d52cbe72e60b41e741bca888381e --- /dev/null +++ b/ttcn/patch_sip_titan/http_uri_etsi_org_ngn_params_xml_simservs_mcid.ttcn @@ -0,0 +1,105 @@ +/******************************************************************************* +* Copyright (c) 2000-2016 Ericsson Telecom AB +* +* XSD to TTCN-3 Translator version: CRL 113 200/5 R4D +* +* All rights reserved. This program and the accompanying materials +* are made available under the terms of the Eclipse Public License v1.0 +* which accompanies this distribution, and is available at +* http://www.eclipse.org/legal/epl-v10.html +*******************************************************************************/ +// +// File: http_uri_etsi_org_ngn_params_xml_simservs_mcid.ttcn +// Description: +// References: +// Rev: +// Prodnr: +// Updated: Fri Mar 4 09:23:30 2016 +// Contact: http://ttcn.ericsson.se +// +//////////////////////////////////////////////////////////////////////////////// +// Generated from file(s): +// - MCID.xsd +// /* xml version = "1.0" */ +// /* targetnamespace = "http://uri.etsi.org/ngn/params/xml/simservs/mcid" */ +//////////////////////////////////////////////////////////////////////////////// +// Modification header(s): +//----------------------------------------------------------------------------- +// Modified by: +// Modification date: +// Description: +// Modification contact: +//------------------------------------------------------------------------------ +//////////////////////////////////////////////////////////////////////////////// + + +module http_uri_etsi_org_ngn_params_xml_simservs_mcid { + + +import from XSD all; + + +/* XML Schema Definition to the mcid request-response to the Malicious Communication */ +/* Identification simulation service */ + + +/* Definition of simple types */ + + +type XSD.String BitType (pattern "[0-1]") +with { + variant "name as uncapitalized"; +}; + + +/* Definition of complex types */ + + +type record RequestType +{ + BitType mcidRequestIndicator, + BitType holdingIndicator +} +with { + variant "name as uncapitalized"; + variant (mcidRequestIndicator) "name as capitalized"; + variant (holdingIndicator) "name as capitalized"; +}; + + +type record ResponseType +{ + BitType mcidResponseIndicator, + BitType holdingProvidedIndicator +} +with { + variant "name as uncapitalized"; + variant (mcidResponseIndicator) "name as capitalized"; + variant (holdingProvidedIndicator) "name as capitalized"; +}; + + +/* Definition of document structure */ + + +type record Mcid +{ + union { + RequestType request, + ResponseType response + } choice +} +with { + variant "name as uncapitalized"; + variant "element"; + variant (choice) "untagged"; +}; + + +} +with { + encode "XML"; + variant "namespace as 'http://uri.etsi.org/ngn/params/xml/simservs/mcid'"; + variant "controlNamespace 'http://www.w3.org/2001/XMLSchema-instance' prefix 'xsi'"; + variant "elementFormQualified"; +} diff --git a/ttcn/patch_sip_titan/http_uri_etsi_org_ngn_params_xml_simservs_pstn.ttcn b/ttcn/patch_sip_titan/http_uri_etsi_org_ngn_params_xml_simservs_pstn.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..3d6f1fdeea7a208db46f8b05bb66adccf5c42df5 --- /dev/null +++ b/ttcn/patch_sip_titan/http_uri_etsi_org_ngn_params_xml_simservs_pstn.ttcn @@ -0,0 +1,689 @@ +/******************************************************************************* +* Copyright (c) 2000-2016 Ericsson Telecom AB +* +* XSD to TTCN-3 Translator version: CRL 113 200/5 R4D +* +* All rights reserved. This program and the accompanying materials +* are made available under the terms of the Eclipse Public License v1.0 +* which accompanies this distribution, and is available at +* http://www.eclipse.org/legal/epl-v10.html +*******************************************************************************/ +// +// File: http_uri_etsi_org_ngn_params_xml_simservs_pstn.ttcn +// Description: +// References: +// Rev: +// Prodnr: +// Updated: Fri Mar 4 09:23:30 2016 +// Contact: http://ttcn.ericsson.se +// +//////////////////////////////////////////////////////////////////////////////// +// Generated from file(s): +// - PSTN.xsd +// /* xml version = "1.0" encoding = "UTF-8" */ +// /* targetnamespace = "http://uri.etsi.org/ngn/params/xml/simservs/pstn" */ +//////////////////////////////////////////////////////////////////////////////// +// Modification header(s): +//----------------------------------------------------------------------------- +// Modified by: +// Modification date: +// Description: +// Modification contact: +//------------------------------------------------------------------------------ +//////////////////////////////////////////////////////////////////////////////// + + +module http_uri_etsi_org_ngn_params_xml_simservs_pstn { + + +import from XSD all; + + +/* XML Schema definition for mapping of some PSTN into SIP MIME Bodies */ + + +/* Definition of simple types */ + + +type XSD.String OneBitType (pattern "[0-1]"); + + +type XSD.String TwoBitType (pattern "[0-1][0-1]"); + + +type XSD.String ThreeBitType (pattern "[0-1][0-1][0-1]"); + + +type XSD.String FourBitType (pattern "[0-1][0-1][0-1][0-1]"); + + +type XSD.String FiveBitType (pattern "[0-1][0-1][0-1][0-1][0-1]"); + + +type XSD.String SixBitType (pattern "[0-1][0-1][0-1][0-1][0-1][0-1]"); + + +type XSD.String SevenBitType (pattern "[0-1][0-1][0-1][0-1][0-1][0-1][0-1]"); + + +/* Definition of complex types */ + + +/* Definition of BearerCapability Octets */ + + +type record BCOctet3Type +{ + TwoBitType codingStandard, + FiveBitType informationTransferCabability +} +with { + variant (codingStandard) "name as capitalized"; + variant (informationTransferCabability) "name as capitalized"; +}; + + +type record BCOctet4Type +{ + TwoBitType transferMode, + FiveBitType informationTransferRate +} +with { + variant (transferMode) "name as capitalized"; + variant (informationTransferRate) "name as capitalized"; +}; + + +type record BCOctet4_1Type +{ + SevenBitType rateMultiplier +} +with { + variant "name as 'BCOctet4-1Type'"; + variant (rateMultiplier) "name as capitalized"; +}; + + +type record BCOctet5Type +{ + TwoBitType layer1Identification, + FiveBitType userInfoLayer1Protocol +} +with { + variant (layer1Identification) "name as capitalized"; + variant (userInfoLayer1Protocol) "name as capitalized"; +}; + + +type record BCOctet5aType +{ + OneBitType synchronousAsynchronous, + OneBitType negotiation, + FiveBitType userRate +} +with { + variant (synchronousAsynchronous) "name as capitalized"; + variant (negotiation) "name as capitalized"; + variant (userRate) "name as capitalized"; +}; + + +type record BCOctet5bV110Type +{ + TwoBitType intermediateRate, + OneBitType nIConTX, + OneBitType nIConRX, + OneBitType flowControlOnTX, + OneBitType flowControlOnRX +} +with { + variant (intermediateRate) "name as capitalized"; + variant (nIConTX) "name as capitalized"; + variant (nIConRX) "name as capitalized"; + variant (flowControlOnTX) "name as capitalized"; + variant (flowControlOnRX) "name as capitalized"; +}; + + +type record BCOctet5bV120Type +{ + OneBitType rateAdaptionHeader, + OneBitType multipleFrameEstablishmentSupport, + OneBitType modeOfOperation, + OneBitType logicalLinkIdentifier, + OneBitType assignor, + OneBitType inbandOutbandNegotiation +} +with { + variant (rateAdaptionHeader) "name as capitalized"; + variant (multipleFrameEstablishmentSupport) "name as capitalized"; + variant (modeOfOperation) "name as capitalized"; + variant (logicalLinkIdentifier) "name as capitalized"; + variant (assignor) "name as capitalized"; + variant (inbandOutbandNegotiation) "name as capitalized"; +}; + + +type record BCOctet5cType +{ + TwoBitType numberOfStopBits, + TwoBitType numberOfDataBits, + ThreeBitType parity +} +with { + variant (numberOfStopBits) "name as capitalized"; + variant (numberOfDataBits) "name as capitalized"; + variant (parity) "name as capitalized"; +}; + + +type record BCOctet5dType +{ + OneBitType duplexMode, + SixBitType modemType +} +with { + variant (duplexMode) "name as capitalized"; + variant (modemType) "name as capitalized"; +}; + + +type record BCOctet6Type +{ + TwoBitType layer2Identification, + FiveBitType userInfoLayer2Protocol +} +with { + variant (layer2Identification) "name as capitalized"; + variant (userInfoLayer2Protocol) "name as capitalized"; +}; + + +type record BCOctet7Type +{ + TwoBitType layer3Identification, + FiveBitType userInfoLayer3Protocol +} +with { + variant (layer3Identification) "name as capitalized"; + variant (userInfoLayer3Protocol) "name as capitalized"; +}; + + +type record BCOctet7aType +{ + FourBitType additionalLayer3Info +} +with { + variant (additionalLayer3Info) "name as capitalized"; +}; + + +type record BCOctet7bType +{ + FourBitType additionalLayer3Info +} +with { + variant (additionalLayer3Info) "name as capitalized"; +}; + + +/* Definition of High Layer Compatibility Octets */ + + +type record HLOctet3Type +{ + TwoBitType codingStandard, + ThreeBitType interpretation, + TwoBitType presentationMethod +} +with { + variant (codingStandard) "name as capitalized"; + variant (interpretation) "name as capitalized"; + variant (presentationMethod) "name as capitalized"; +}; + + +type record HLOctet4Type +{ + SevenBitType highLayerCharacteristics +} +with { + variant (highLayerCharacteristics) "name as capitalized"; +}; + + +type record HLOctet4aMaintenanceType +{ + SevenBitType highLayerCharacteristics +} +with { + variant (highLayerCharacteristics) "name as capitalized"; +}; + + +type record HLOctet4aAudioType +{ + SevenBitType videoTelephonyCharacteristics +} +with { + variant (videoTelephonyCharacteristics) "name as capitalized"; +}; + + +/* Definition of Low Layer Compatibility Octets */ + + +type record LLOctet3Type +{ + TwoBitType codingStandard, + FiveBitType informationTransferCapability +} +with { + variant (codingStandard) "name as capitalized"; + variant (informationTransferCapability) "name as capitalized"; +}; + + +type record LLOctet3aType +{ + OneBitType negotiationIndicator +} +with { + variant (negotiationIndicator) "name as capitalized"; +}; + + +type record LLOctet4Type +{ + TwoBitType transferMode, + FiveBitType informationTransferRate +} +with { + variant (transferMode) "name as capitalized"; + variant (informationTransferRate) "name as capitalized"; +}; + + +type record LLOctet4_1Type +{ + SevenBitType rateMultiplier +} +with { + variant "name as 'LLOctet4-1Type'"; + variant (rateMultiplier) "name as capitalized"; +}; + + +type record LLOctet5Type +{ + TwoBitType layer1Identification, + FiveBitType userInfoLayer1Protocol +} +with { + variant (layer1Identification) "name as capitalized"; + variant (userInfoLayer1Protocol) "name as capitalized"; +}; + + +type record LLOctet5aType +{ + OneBitType synchronousAsynchronous, + OneBitType negotiation, + FiveBitType userRate +} +with { + variant (synchronousAsynchronous) "name as capitalized"; + variant (negotiation) "name as capitalized"; + variant (userRate) "name as capitalized"; +}; + + +type record LLOctet5bV110Type +{ + TwoBitType intermediateRate, + OneBitType nIConTX, + OneBitType nIConRX, + OneBitType flowControlOnTX, + OneBitType flowControlOnRX +} +with { + variant (intermediateRate) "name as capitalized"; + variant (nIConTX) "name as capitalized"; + variant (nIConRX) "name as capitalized"; + variant (flowControlOnTX) "name as capitalized"; + variant (flowControlOnRX) "name as capitalized"; +}; + + +type record LLOctet5bV120Type +{ + OneBitType rateAdaptionHeader, + OneBitType multipleFrameEstablishmentSupport, + OneBitType modeOfOperation, + OneBitType logicalLinkIdentifier, + OneBitType assignor, + OneBitType inbandOutbandNegotiation +} +with { + variant (rateAdaptionHeader) "name as capitalized"; + variant (multipleFrameEstablishmentSupport) "name as capitalized"; + variant (modeOfOperation) "name as capitalized"; + variant (logicalLinkIdentifier) "name as capitalized"; + variant (assignor) "name as capitalized"; + variant (inbandOutbandNegotiation) "name as capitalized"; +}; + + +type record LLOctet5cType +{ + TwoBitType numberOfStopBits, + TwoBitType numberOfDataBits, + ThreeBitType parity +} +with { + variant (numberOfStopBits) "name as capitalized"; + variant (numberOfDataBits) "name as capitalized"; + variant (parity) "name as capitalized"; +}; + + +type record LLOctet5dType +{ + OneBitType duplexMode, + SixBitType modemType +} +with { + variant (duplexMode) "name as capitalized"; + variant (modemType) "name as capitalized"; +}; + + +type record LLOctet6Type +{ + TwoBitType layer2Identification, + FiveBitType userInfoLayer2Protocol +} +with { + variant (layer2Identification) "name as capitalized"; + variant (userInfoLayer2Protocol) "name as capitalized"; +}; + + +type record LLOctet6aHDLCType +{ + TwoBitType mode +} +with { + variant (mode) "name as capitalized"; +}; + + +type record LLOctet6aUserSpecificType +{ + SevenBitType userSpecificLayer2Information +} +with { + variant (userSpecificLayer2Information) "name as capitalized"; +}; + + +type record LLOctet6bType +{ + SevenBitType windowSize +} +with { + variant (windowSize) "name as capitalized"; +}; + + +type record LLOctet7Type +{ + TwoBitType layer3Identification, + FiveBitType userInfoLayer3Protocol +} +with { + variant (layer3Identification) "name as capitalized"; + variant (userInfoLayer3Protocol) "name as capitalized"; +}; + + +type record LLOctet7aUserSpecificType +{ + SevenBitType optionalLayer3Information +} +with { + variant (optionalLayer3Information) "name as capitalized"; +}; + + +type record LLOctet7aX25Type +{ + TwoBitType mode +} +with { + variant (mode) "name as capitalized"; +}; + + +type record LLOctet7bX25Type +{ + FourBitType defaultPacketSize +} +with { + variant (defaultPacketSize) "name as capitalized"; +}; + + +type record LLOctet7cType +{ + SevenBitType packetWindowSize +} +with { + variant (packetWindowSize) "name as capitalized"; +}; + + +type record LLOctet7aTR9577Type +{ + FourBitType additionalLayer3Info +} +with { + variant (additionalLayer3Info) "name as capitalized"; +}; + + +type record LLOctet7bTR9577Type +{ + FourBitType additionalLayer3Info +} +with { + variant (additionalLayer3Info) "name as capitalized"; +}; + + +type record DispOctet3Type +{ + SevenBitType displayInformation +} +with { + variant (displayInformation) "name as capitalized"; +}; + + +/* Definition of the information elements */ + + +type record BearerCapabilityType +{ + BCOctet3Type bCoctet3, + BCOctet4Type bCoctet4, + BCOctet4_1Type bCoctet4_1 optional, + BCOctet5Type bCoctet5 optional, + BCOctet5aType bCoctet5a optional, + BCOctet5bV110Type bCoctet5bV110 optional, + BCOctet5bV120Type bCoctet5bV120 optional, + BCOctet5cType bCoctet5c optional, + BCOctet5dType bCoctet5d optional, + BCOctet6Type bCoctet6 optional, + BCOctet7Type bCoctet7 optional, + BCOctet7aType bCoctet7a optional, + BCOctet7bType bCoctet7b optional +} +with { + variant (bCoctet3) "name as capitalized"; + variant (bCoctet4) "name as capitalized"; + variant (bCoctet4_1) "name as 'BCoctet4-1'"; + variant (bCoctet5) "name as capitalized"; + variant (bCoctet5a) "name as capitalized"; + variant (bCoctet5bV110) "name as capitalized"; + variant (bCoctet5bV120) "name as capitalized"; + variant (bCoctet5c) "name as capitalized"; + variant (bCoctet5d) "name as capitalized"; + variant (bCoctet6) "name as capitalized"; + variant (bCoctet7) "name as capitalized"; + variant (bCoctet7a) "name as capitalized"; + variant (bCoctet7b) "name as capitalized"; +}; + + +type record HighLayerCompatibilityType +{ + HLOctet3Type hLOctet3, + HLOctet4Type hLOctet4, + HLOctet4aMaintenanceType hLOctet4aMaintenance optional, + HLOctet4aAudioType hLOctet4Audio optional +} +with { + variant (hLOctet3) "name as capitalized"; + variant (hLOctet4) "name as capitalized"; + variant (hLOctet4aMaintenance) "name as capitalized"; + variant (hLOctet4Audio) "name as capitalized"; +}; + + +type record LowLayerCompatibilityType +{ + LLOctet3Type lLOctet3, + LLOctet3aType lLOctet3a optional, + LLOctet4Type lLOctet4, + LLOctet4_1Type lLOctet4_1 optional, + LLOctet5Type lLOctet5 optional, + LLOctet5aType lLOctet5a optional, + LLOctet5bV110Type lLOctet5bV110 optional, + LLOctet5bV120Type lLOctet5bV120 optional, + LLOctet5cType lLOctet5c optional, + LLOctet5dType lLOctet5d optional, + LLOctet6Type lLOctet6 optional, + LLOctet6aHDLCType lLOctet6aHDLC optional, + LLOctet6aUserSpecificType lLOctet6aUserSpecific optional, + LLOctet6bType lLOctet6b optional, + LLOctet7Type lLOctet7, + LLOctet7aUserSpecificType lLOctet7aUserSpecific optional, + LLOctet7aX25Type lLOctet7aX25 optional, + LLOctet7bX25Type lLOctet7bX25 optional, + LLOctet7cType lLOctet7c optional, + LLOctet7aTR9577Type lLOctet7aTR9577 optional, + LLOctet7bTR9577Type lLOctet7bTR9577 optional +} +with { + variant (lLOctet3) "name as capitalized"; + variant (lLOctet3a) "name as capitalized"; + variant (lLOctet4) "name as capitalized"; + variant (lLOctet4_1) "name as 'LLOctet4-1'"; + variant (lLOctet5) "name as capitalized"; + variant (lLOctet5a) "name as capitalized"; + variant (lLOctet5bV110) "name as capitalized"; + variant (lLOctet5bV120) "name as capitalized"; + variant (lLOctet5c) "name as capitalized"; + variant (lLOctet5d) "name as capitalized"; + variant (lLOctet6) "name as capitalized"; + variant (lLOctet6aHDLC) "name as capitalized"; + variant (lLOctet6aUserSpecific) "name as capitalized"; + variant (lLOctet6b) "name as capitalized"; + variant (lLOctet7) "name as capitalized"; + variant (lLOctet7aUserSpecific) "name as capitalized"; + variant (lLOctet7aX25) "name as capitalized"; + variant (lLOctet7bX25) "name as capitalized"; + variant (lLOctet7c) "name as capitalized"; + variant (lLOctet7aTR9577) "name as capitalized"; + variant (lLOctet7bTR9577) "name as capitalized"; +}; + + +type record DisplayType +{ + DispOctet3Type dispOctet3 +} +with { + variant (dispOctet3) "name as capitalized"; +}; + + +/* Definition of progress indicator */ + + +type record ProgressOctet3Type +{ + TwoBitType codingStandard, + FourBitType location +} +with { + variant (codingStandard) "name as capitalized"; + variant (location) "name as capitalized"; +}; + + +type record ProgressOctet4Type +{ + SevenBitType progressDescription +} +with { + variant (progressDescription) "name as capitalized"; +}; + + +type record ProgressIndicatorType +{ + ProgressOctet3Type progressOctet3, + ProgressOctet4Type progressOctet4 +} +with { + variant (progressOctet3) "name as capitalized"; + variant (progressOctet4) "name as capitalized"; +}; + + +/* Definition of document structure */ + + +type record PSTN_transit +{ + record length(1 .. 2) of BearerCapabilityType bearerInfomationElement_list, + record length(0 .. 2) of HighLayerCompatibilityType highLayerCompatibility_list, + LowLayerCompatibilityType lowLayerCompatibility optional, + record of ProgressIndicatorType progressIndicator_list, + record of DisplayType display_list +} +with { + variant "name as 'PSTN-transit'"; + variant "element"; + variant (bearerInfomationElement_list) "untagged"; + variant (bearerInfomationElement_list[-]) "name as 'BearerInfomationElement'"; + variant (highLayerCompatibility_list) "untagged"; + variant (highLayerCompatibility_list[-]) "name as 'HighLayerCompatibility'"; + variant (lowLayerCompatibility) "name as capitalized"; + variant (progressIndicator_list) "untagged"; + variant (progressIndicator_list[-]) "name as 'ProgressIndicator'"; + variant (display_list) "untagged"; + variant (display_list[-]) "name as 'Display'"; +}; + + +} +with { + encode "XML"; + variant "namespace as 'http://uri.etsi.org/ngn/params/xml/simservs/pstn'"; + variant "controlNamespace 'http://www.w3.org/2001/XMLSchema-instance' prefix 'xsi'"; + variant "elementFormQualified"; +} diff --git a/ttcn/patch_sip_titan/http_uri_etsi_org_ngn_params_xml_simservs_xcap.ttcn b/ttcn/patch_sip_titan/http_uri_etsi_org_ngn_params_xml_simservs_xcap.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..230df4ed31db3008125236a22d1fd5132e0c4ffd --- /dev/null +++ b/ttcn/patch_sip_titan/http_uri_etsi_org_ngn_params_xml_simservs_xcap.ttcn @@ -0,0 +1,621 @@ +/******************************************************************************* +* Copyright (c) 2000-2016 Ericsson Telecom AB +* +* XSD to TTCN-3 Translator version: CRL 113 200/5 R4D +* +* All rights reserved. This program and the accompanying materials +* are made available under the terms of the Eclipse Public License v1.0 +* which accompanies this distribution, and is available at +* http://www.eclipse.org/legal/epl-v10.html +*******************************************************************************/ +// +// File: http_uri_etsi_org_ngn_params_xml_simservs_xcap.ttcn +// Description: +// References: +// Rev: +// Prodnr: +// Updated: Fri Mar 4 09:23:30 2016 +// Contact: http://ttcn.ericsson.se +// +//////////////////////////////////////////////////////////////////////////////// +// Generated from file(s): +// - ACR_CB.xsd +// /* xml version = "1.0" */ +// /* targetnamespace = "http://uri.etsi.org/ngn/params/xml/simservs/xcap" */ +// - CDIV.xsd +// /* xml version = "1.0" */ +// /* targetnamespace = "http://uri.etsi.org/ngn/params/xml/simservs/xcap" */ +// - OIP-OIR.xsd +// /* xml version = "1.0" */ +// /* targetnamespace = "http://uri.etsi.org/ngn/params/xml/simservs/xcap" */ +// - SupplementaryServices.xsd +// /* xml version = "1.0" */ +// /* targetnamespace = "http://uri.etsi.org/ngn/params/xml/simservs/xcap" */ +// - TIP-TIR.xsd +// /* xml version = "1.0" */ +// /* targetnamespace = "http://uri.etsi.org/ngn/params/xml/simservs/xcap" */ +// - cug.xsd +// /* xml version = "1.0" encoding = "UTF-8" */ +// /* targetnamespace = "http://uri.etsi.org/ngn/params/xml/simservs/xcap" */ +// - simservs.xsd +// /* xml version = "1.0" */ +// /* targetnamespace = "http://uri.etsi.org/ngn/params/xml/simservs/xcap" */ +//////////////////////////////////////////////////////////////////////////////// +// Modification header(s): +//----------------------------------------------------------------------------- +// Modified by: +// Modification date: +// Description: +// Modification contact: +//------------------------------------------------------------------------------ +//////////////////////////////////////////////////////////////////////////////// + + +module http_uri_etsi_org_ngn_params_xml_simservs_xcap { + + +import from XSD all; + + +import from urn_ietf_params_xml_ns_common_policy all; + + +import from urn_oma_xml_xdm_common_policy all; + + +/* import common policy definitions */ + + +/* import OMA common policy extensions */ + + +/* incoming communication barring rule set based on the common policy rule set. */ + + +/* This is the incoming communication barring configuration */ +/* document. */ +/* add service specific elements here */ +/* service specific attributes can be defined here */ +type record Incoming_communication_barring +{ + XSD.Boolean active optional, + record of XSD.String attr optional, + Ruleset ruleset optional +} +with { + variant "name as 'incoming-communication-barring'"; + variant "element"; + variant (active) "defaultForEmpty as 'true'"; + variant (active) "attribute"; + //variant (active) "text 'true' as '1'"; + //variant (active) "text 'false' as '0'"; + variant (attr) "anyAttributes"; + variant (ruleset) "namespace as 'urn:ietf:params:xml:ns:common-policy' prefix 'cp'"; +}; + + +/* outgoing communication barring rule set based on the common policy rule set. */ + + +/* This is the outgoing communication barring configuration */ +/* document. */ +/* add service specific elements here */ +/* service specific attributes can be defined here */ +type record Outgoing_communication_barring +{ + XSD.Boolean active optional, + record of XSD.String attr optional, + Ruleset ruleset optional +} +with { + variant "name as 'outgoing-communication-barring'"; + variant "element"; + variant (active) "defaultForEmpty as 'true'"; + variant (active) "attribute"; + //variant (active) "text 'true' as '1'"; + //variant (active) "text 'false' as '0'"; + variant (attr) "anyAttributes"; + variant (ruleset) "namespace as 'urn:ietf:params:xml:ns:common-policy' prefix 'cp'"; +}; + + +/* communication barring specific extensions to IETF common policy actions */ + + +type Allow_action_type Allow +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +/* communication barring specific type declarations */ + + +/* */ + + +type XSD.Boolean Allow_action_type +with { + variant "name as 'allow-action-type'"; + //variant "text 'true' as '1'"; + //variant "text 'false' as '0'"; +}; + + +/* import common policy definitions */ + + +/* import OMA common policy extensions */ + + +/* communication diversion specific extensions to IETF common policy conditions. The +cp:conditionsType is expanded with the elements: ss:not-registered, ss:busy, ss:no-answer, ss:notreachable, +ss:media as optional elements */ + + +/* communication diversion rule set based on the common policy rule set. */ + + +/* This is the communication diversion configuration */ +/* document. */ +/* add service specific elements here */ +/* service specific attributes can be defined here */ +type record Communication_diversion +{ + XSD.Boolean active optional, + record of XSD.String attr optional, + Ruleset ruleset optional +} +with { + variant "name as 'communication-diversion'"; + variant "element"; + variant (active) "defaultForEmpty as 'true'"; + variant (active) "attribute"; + //variant (active) "text 'true' as '1'"; + //variant (active) "text 'false' as '0'"; + variant (attr) "anyAttributes"; + variant (ruleset) "namespace as 'urn:ietf:params:xml:ns:common-policy' prefix 'cp'"; +}; + + +/* communication diversion specific extensions to IETF common policy actions */ + + +type Forward_to_type Forward_to +with { + variant "name as 'forward-to'"; + variant "element"; +}; + + +type enumerated Reveal_URIoptions_type +{ + false_, + not_reveal_GRUU, + true_ +} +with { + variant "text 'false_' as 'false'"; + variant "text 'not_reveal_GRUU' as 'not-reveal-GRUU'"; + variant "text 'true_' as 'true'"; + variant "name as 'reveal-URIoptions-type'"; +}; + + +/* communication diversion specific type declarations */ + + +type record Forward_to_type +{ + XSD.AnyURI target, + XSD.Boolean notify_caller optional, + Reveal_URIoptions_type reveal_identity_to_caller optional, + Reveal_URIoptions_type reveal_served_user_identity_to_caller optional, + XSD.Boolean notify_served_user optional, + XSD.Boolean notify_served_user_on_outbound_call optional, + Reveal_URIoptions_type reveal_identity_to_target optional, + NoReplyTimer noReplyTimer optional +} +with { + variant "name as 'forward-to-type'"; + variant (notify_caller) "name as 'notify-caller'"; + variant (notify_caller) "defaultForEmpty as 'true'"; + //variant (notify_caller) "text 'true' as '1'"; + //variant (notify_caller) "text 'false' as '0'"; + variant (reveal_identity_to_caller) "name as 'reveal-identity-to-caller'"; + variant (reveal_identity_to_caller) "defaultForEmpty as 'true'"; + variant (reveal_served_user_identity_to_caller) "name as 'reveal-served-user-identity-to-caller'"; + variant (reveal_served_user_identity_to_caller) "defaultForEmpty as 'true'"; + variant (notify_served_user) "name as 'notify-served-user'"; + variant (notify_served_user) "defaultForEmpty as 'false'"; + //variant (notify_served_user) "text 'true' as '1'"; + //variant (notify_served_user) "text 'false' as '0'"; + variant (notify_served_user_on_outbound_call) "name as 'notify-served-user-on-outbound-call'"; + variant (notify_served_user_on_outbound_call) "defaultForEmpty as 'false'"; + //variant (notify_served_user_on_outbound_call) "text 'true' as '1'"; + //variant (notify_served_user_on_outbound_call) "text 'false' as '0'"; + variant (reveal_identity_to_target) "name as 'reveal-identity-to-target'"; + variant (reveal_identity_to_target) "defaultForEmpty as 'true'"; + variant (noReplyTimer) "name as capitalized"; +}; + + +type XSD.PositiveInteger NoReplyTimer (5 .. 180) +with { + variant "element"; +}; + + +/* Originating Identity presentation Restriction */ +type record Originating_identity_presentation_restriction +{ + XSD.Boolean active optional, + record of XSD.String attr optional, + enumerated { + presentation_restricted, + presentation_not_restricted + } default_behaviour optional +} +with { + variant "name as 'originating--identity--presentation--restriction'"; + variant "element"; + variant (active) "defaultForEmpty as 'true'"; + variant (active) "attribute"; + //variant (active) "text 'true' as '1'"; + //variant (active) "text 'false' as '0'"; + variant (attr) "anyAttributes"; + variant (default_behaviour) "name as 'default--behaviour'"; + variant (default_behaviour) "defaultForEmpty as 'presentation--restricted'"; + variant (default_behaviour) "text 'presentation_not_restricted' as 'presentation--not--restricted'"; + variant (default_behaviour) "text 'presentation_restricted' as 'presentation--restricted'"; +}; + + +/* Originating Identity Presentation */ +type SimservType Originating_identity_presentation +with { + variant "name as 'originating--identity--presentation'"; + variant "element"; +}; + + +/* Terminating Identity presentation Restriction */ +type record Terminating_identity_presentation_restriction +{ + XSD.Boolean active optional, + record of XSD.String attr optional, + enumerated { + presentation_restricted, + presentation_not_restricted + } default_behaviour optional +} +with { + variant "name as 'terminating-identity-presentation-restriction'"; + variant "element"; + variant (active) "defaultForEmpty as 'true'"; + variant (active) "attribute"; + //variant (active) "text 'true' as '1'"; + //variant (active) "text 'false' as '0'"; + variant (attr) "anyAttributes"; + variant (default_behaviour) "name as 'default-behaviour'"; + variant (default_behaviour) "defaultForEmpty as 'presentation-restricted'"; + variant (default_behaviour) "text 'presentation_not_restricted' as 'presentation-not-restricted'"; + variant (default_behaviour) "text 'presentation_restricted' as 'presentation-restricted'"; +}; + + +/* Terminating Identity Presentation */ +type SimservType Terminating_identity_presentation +with { + variant "name as 'terminating-identity-presentation'"; + variant "element"; +}; + + +/* XML Schema Definition for the closed user group */ +/* parameter */ + + +/* Definition of simple types */ + + +type XSD.String TwobitType (pattern "[0-1][0-1]") +with { + variant "name as uncapitalized"; +}; + + +type XSD.HexBinary NetworkIdentityType length(1) +with { + variant "name as uncapitalized"; +}; + + +type XSD.HexBinary SixteenbitType length(2) +with { + variant "name as uncapitalized"; +}; + + +type XSD.Integer CugIndexType (0 .. 32767) +with { + variant "name as uncapitalized"; +}; + + +/* Definition of complex types */ + + +type record CugRequestType +{ + XSD.Boolean outgoingAccessRequest, + CugIndexType cugIndex +} +with { + variant "name as uncapitalized"; + //variant (outgoingAccessRequest) "text 'true' as '1'"; + //variant (outgoingAccessRequest) "text 'false' as '0'"; +}; + + +/* Definition of document structure */ + + +type record Cug +{ + XSD.Boolean active optional, + record of XSD.String attr optional, + CugRequestType cugCallOperation optional, + NetworkIdentityType networkIndicator optional, + SixteenbitType cugInterlockBinaryCode optional, + TwobitType cugCommunicationIndicator optional +} +with { + variant "name as uncapitalized"; + variant "element"; + variant (active) "defaultForEmpty as 'true'"; + variant (active) "attribute"; + //variant (active) "text 'true' as '1'"; + //variant (active) "text 'false' as '0'"; + variant (attr) "anyAttributes"; +}; + + +/* The element "simservs" maps to the Common Parts of an NGN PSTN/ISDN Simulation services document */ + + +/* XML Schema for data manipulation of ETSI */ +/* NGN PSTN/ISDN Simulation Services */ +/* xs:group ref="ss:absServiceGroup" minOccurs="0" maxOccurs="unbounded" / */ +type record Simservs +{ + record of XSD.String attr optional, + record of AbsService_group absService_list, + record { + record of XSD.String elem_list + } extensions optional +} +with { + variant "name as uncapitalized"; + variant "element"; + variant (attr) "anyAttributes"; + variant (absService_list) "untagged"; + variant (extensions.elem_list) "untagged"; + variant (extensions.elem_list[-]) "anyElement except unqualified, 'http://uri.etsi.org/ngn/params/xml/simservs/xcap'"; +}; + + +type record SimservType +{ + XSD.Boolean active optional, + record of XSD.String attr optional +} +with { + variant "name as uncapitalized"; + variant (active) "defaultForEmpty as 'true'"; + variant (active) "attribute"; + //variant (active) "text 'true' as '1'"; + //variant (active) "text 'false' as '0'"; + variant (attr) "anyAttributes"; +}; + + +/* service specific IETF common policy condition elements */ + + +type Empty_element_type Anonymous +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +type Presence_status_activity_type Presence_status +with { + variant "name as 'presence-status'"; + variant "element"; +}; + + +type Media_type1 Media +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +type Empty_element_type Communication_diverted +with { + variant "name as 'communication-diverted'"; + variant "element"; +}; + + +type Empty_element_type Rule_deactivated +with { + variant "name as 'rule-deactivated'"; + variant "element"; +}; + + +type Empty_element_type Not_registered +with { + variant "name as 'not-registered'"; + variant "element"; +}; + + +type Empty_element_type Busy +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +type Empty_element_type No_answer +with { + variant "name as 'no-answer'"; + variant "element"; +}; + + +type Empty_element_type Not_reachable +with { + variant "name as 'not-reachable'"; + variant "element"; +}; + + +type Empty_element_type Roaming +with { + variant "name as uncapitalized"; + variant "element"; +}; + + +/* service specific type declarations */ + + +type XSD.String Media_type1 +with { + variant "name as 'media-type1'"; +}; + + +type XSD.String Presence_status_activity_type +with { + variant "name as 'presence-status-activity-type'"; +}; + + +type record Empty_element_type +{ + +} +with { + variant "name as 'empty-element-type'"; +}; + + +/* ETSI substitutionGroup workaround, because TTCN-3 does not support mapping of substitutionGroup */ + + +/* xs:group name="absServiceGroup"> + + + + */ + + +/* /xs:choice */ + + +/* /xs:group */ + + +type union AbsService_group +{ + SimservType absService, + /* This is the communication diversion configuration */ + /* document. */ + /* add service specific elements here */ + /* service specific attributes can be defined here */ + Communication_diversion communication_diversion, + Cug cug, + /* This is the incoming communication barring configuration */ + /* document. */ + /* add service specific elements here */ + /* service specific attributes can be defined here */ + Incoming_communication_barring incoming_communication_barring, + /* Originating Identity Presentation */ + Originating_identity_presentation originating_identity_presentation, + /* Originating Identity presentation Restriction */ + Originating_identity_presentation_restriction originating_identity_presentation_restriction, + /* This is the outgoing communication barring configuration */ + /* document. */ + /* add service specific elements here */ + /* service specific attributes can be defined here */ + Outgoing_communication_barring outgoing_communication_barring, + /* Terminating Identity Presentation */ + Terminating_identity_presentation terminating_identity_presentation, + /* Terminating Identity presentation Restriction */ + Terminating_identity_presentation_restriction terminating_identity_presentation_restriction +} +with { + variant "untagged"; + variant (absService) "form as qualified"; + variant (absService) "abstract"; + variant (communication_diversion) "name as 'communication-diversion'"; + variant (incoming_communication_barring) "name as 'incoming-communication-barring'"; + variant (originating_identity_presentation) "name as 'originating--identity--presentation'"; + variant (originating_identity_presentation_restriction) "name as 'originating--identity--presentation--restriction'"; + variant (outgoing_communication_barring) "name as 'outgoing-communication-barring'"; + variant (terminating_identity_presentation) "name as 'terminating-identity-presentation'"; + variant (terminating_identity_presentation_restriction) "name as 'terminating-identity-presentation-restriction'"; +}; + + +} +with { + encode "XML"; + variant "namespace as 'http://uri.etsi.org/ngn/params/xml/simservs/xcap' prefix 'ss'"; + variant "controlNamespace 'http://www.w3.org/2001/XMLSchema-instance' prefix 'xsi'"; + variant "elementFormQualified"; +} diff --git a/ttcn/patch_sip_titan/urn_3gpp_ns_cw_1_0.ttcn b/ttcn/patch_sip_titan/urn_3gpp_ns_cw_1_0.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..4b4458fbd225f976e2dd37e96f2ddac2a508e2a6 --- /dev/null +++ b/ttcn/patch_sip_titan/urn_3gpp_ns_cw_1_0.ttcn @@ -0,0 +1,79 @@ +/******************************************************************************* +* Copyright (c) 2000-2016 Ericsson Telecom AB +* +* XSD to TTCN-3 Translator version: CRL 113 200/5 R4D +* +* All rights reserved. This program and the accompanying materials +* are made available under the terms of the Eclipse Public License v1.0 +* which accompanies this distribution, and is available at +* http://www.eclipse.org/legal/epl-v10.html +*******************************************************************************/ +// +// File: urn_3gpp_ns_cw_1_0.ttcn +// Description: +// References: +// Rev: +// Prodnr: +// Updated: Fri Mar 4 09:23:30 2016 +// Contact: http://ttcn.ericsson.se +// +//////////////////////////////////////////////////////////////////////////////// +// Generated from file(s): +// - cw.xsd +// /* xml version = "1.0" encoding = "UTF-8" */ +// /* targetnamespace = "urn:3gpp:ns:cw:1.0" */ +//////////////////////////////////////////////////////////////////////////////// +// Modification header(s): +//----------------------------------------------------------------------------- +// Modified by: +// Modification date: +// Description: +// Modification contact: +//------------------------------------------------------------------------------ +//////////////////////////////////////////////////////////////////////////////// + + +module urn_3gpp_ns_cw_1_0 { + + +import from XSD all; + + +type record TEmptyType +{ + +} +with { + variant "name as uncapitalized"; +}; + + +type record TCWtype +{ + record of XSD.String attr optional, + TEmptyType communication_waiting_indication optional, + record of XSD.String elem_list +} +with { + variant "name as uncapitalized"; + variant (attr) "anyAttributes except unqualified, 'urn:3gpp:ns:cw:1.0'"; + variant (communication_waiting_indication) "name as 'communication-waiting-indication'"; + variant (elem_list) "untagged"; + variant (elem_list[-]) "anyElement except unqualified, 'urn:3gpp:ns:cw:1.0'"; +}; + + +type TCWtype Ims_cw +with { + variant "name as 'ims-cw'"; + variant "element"; +}; + + +} +with { + encode "XML"; + variant "namespace as 'urn:3gpp:ns:cw:1.0' prefix 'cw10'"; + variant "controlNamespace 'http://www.w3.org/2001/XMLSchema-instance' prefix 'xsi'"; + variant "elementFormQualified"; +} diff --git a/ttcn/patch_sip_titan/urn_ietf_params_xml_ns_common_policy.ttcn b/ttcn/patch_sip_titan/urn_ietf_params_xml_ns_common_policy.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..3d7b018cea2ff06621f44db537292adb261623cf --- /dev/null +++ b/ttcn/patch_sip_titan/urn_ietf_params_xml_ns_common_policy.ttcn @@ -0,0 +1,223 @@ +/******************************************************************************* +* Copyright (c) 2000-2016 Ericsson Telecom AB +* +* XSD to TTCN-3 Translator version: CRL 113 200/5 R4D +* +* All rights reserved. This program and the accompanying materials +* are made available under the terms of the Eclipse Public License v1.0 +* which accompanies this distribution, and is available at +* http://www.eclipse.org/legal/epl-v10.html +*******************************************************************************/ +// +// File: urn_ietf_params_xml_ns_common_policy.ttcn +// Description: +// References: +// Rev: +// Prodnr: +// Updated: Fri Mar 4 09:23:30 2016 +// Contact: http://ttcn.ericsson.se +// +//////////////////////////////////////////////////////////////////////////////// +// Generated from file(s): +// - common-policy.xsd +// /* xml version = "1.0" */ +// /* targetnamespace = "urn:ietf:params:xml:ns:common-policy" */ +//////////////////////////////////////////////////////////////////////////////// +// Modification header(s): +//----------------------------------------------------------------------------- +// Modified by: +// Modification date: +// Description: +// Modification contact: +//------------------------------------------------------------------------------ +//////////////////////////////////////////////////////////////////////////////// + + +module urn_ietf_params_xml_ns_common_policy { + + +import from XSD all; + + +/* /ruleset */ + + +type record Ruleset +{ + record of RuleType rule_list +} +with { + variant "name as uncapitalized"; + variant "element"; + variant (rule_list) "untagged"; + variant (rule_list[-]) "name as 'rule'"; +}; + + +/* /ruleset/rule */ + + +type record RuleType +{ + XSD.ID id, + ConditionsType conditions optional, + ExtensibleType actions optional, + ExtensibleType transformations optional +} +with { + variant "name as uncapitalized"; + variant (id) "attribute"; +}; + + +/* //rule/conditions */ + + +type record ConditionsType +{ + record length(1 .. infinity) of union { + record length(0 .. 1) of IdentityType identity_list, + record length(1) of SphereType sphere_list, + record length(1) of ValidityType validity_list, + record length(1 .. infinity) of XSD.String elem_list + } choice_list +} +with { + variant "name as uncapitalized"; + variant (choice_list) "untagged"; + variant (choice_list[-]) "untagged"; + variant (choice_list[-].identity_list) "untagged"; + variant (choice_list[-].identity_list[-]) "name as 'identity'"; + variant (choice_list[-].sphere_list) "untagged"; + variant (choice_list[-].sphere_list[-]) "name as 'sphere'"; + variant (choice_list[-].validity_list) "untagged"; + variant (choice_list[-].validity_list[-]) "name as 'validity'"; + variant (choice_list[-].elem_list) "untagged"; + variant (choice_list[-].elem_list[-]) "anyElement except unqualified, 'urn:ietf:params:xml:ns:common-policy'"; +}; + + +/* //conditions/identity */ + + +type record IdentityType +{ + record length(1 .. infinity) of union { + OneType one, + ManyType many, + XSD.String elem + } choice_list +} +with { + variant "name as uncapitalized"; + variant (choice_list) "untagged"; + variant (choice_list[-]) "untagged"; + variant (choice_list[-].elem) "anyElement except unqualified, 'urn:ietf:params:xml:ns:common-policy'"; +}; + + +/* //identity/one */ + + +type record OneType +{ + XSD.AnyURI id, + XSD.String elem optional +} +with { + variant "name as uncapitalized"; + variant (id) "attribute"; + variant (elem) "anyElement except unqualified, 'urn:ietf:params:xml:ns:common-policy'"; +}; + + +/* //identity/many */ + + +type record ManyType +{ + XSD.String domain optional, + record of union { + ExceptType except_, + record length(0 .. 1) of XSD.String elem_list + } choice_list +} +with { + variant "name as uncapitalized"; + variant (domain) "attribute"; + variant (choice_list) "untagged"; + variant (choice_list[-]) "untagged"; + variant (choice_list[-].except_) "name as 'except'"; + variant (choice_list[-].elem_list) "untagged"; + variant (choice_list[-].elem_list[-]) "anyElement except unqualified, 'urn:ietf:params:xml:ns:common-policy'"; +}; + + +/* //many/except */ + + +type record ExceptType +{ + XSD.String domain optional, + XSD.AnyURI id optional +} +with { + variant "name as uncapitalized"; + variant (domain) "attribute"; + variant (id) "attribute"; +}; + + +/* //conditions/sphere */ + + +type record SphereType +{ + XSD.String value_ +} +with { + variant "name as uncapitalized"; + variant (value_) "name as 'value'"; + variant (value_) "attribute"; +}; + + +/* //conditions/validity */ + + +type record ValidityType +{ + record length(1 .. infinity) of record { + XSD.DateTime from_, + XSD.DateTime until + } sequence_list +} +with { + variant "name as uncapitalized"; + variant (sequence_list) "untagged"; + variant (sequence_list[-]) "untagged"; + variant (sequence_list[-].from_) "name as 'from'"; +}; + + +/* //rule/actions or //rule/transformations */ + + +type record ExtensibleType +{ + record of XSD.String elem_list +} +with { + variant "name as uncapitalized"; + variant (elem_list) "untagged"; + variant (elem_list[-]) "anyElement except unqualified, 'urn:ietf:params:xml:ns:common-policy'"; +}; + + +} +with { + encode "XML"; + variant "namespace as 'urn:ietf:params:xml:ns:common-policy' prefix 'cp'"; + variant "controlNamespace 'http://www.w3.org/2001/XMLSchema-instance' prefix 'xsi'"; + variant "elementFormQualified"; +} diff --git a/ttcn/patch_sip_titan/urn_ietf_params_xml_ns_conference_info.ttcn b/ttcn/patch_sip_titan/urn_ietf_params_xml_ns_conference_info.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..bfa546577eea3d4d147f4ebca5c286ae662237f6 --- /dev/null +++ b/ttcn/patch_sip_titan/urn_ietf_params_xml_ns_conference_info.ttcn @@ -0,0 +1,572 @@ +/******************************************************************************* +* Copyright (c) 2000-2016 Ericsson Telecom AB +* +* XSD to TTCN-3 Translator version: CRL 113 200/5 R4D +* +* All rights reserved. This program and the accompanying materials +* are made available under the terms of the Eclipse Public License v1.0 +* which accompanies this distribution, and is available at +* http://www.eclipse.org/legal/epl-v10.html +*******************************************************************************/ +// +// File: urn_ietf_params_xml_ns_conference_info.ttcn +// Description: +// References: +// Rev: +// Prodnr: +// Updated: Fri Mar 4 09:23:30 2016 +// Contact: http://ttcn.ericsson.se +// +//////////////////////////////////////////////////////////////////////////////// +// Generated from file(s): +// - CONF.xsd +// /* xml version = "1.0" encoding = "UTF-8" */ +// /* targetnamespace = "urn:ietf:params:xml:ns:conference-info" */ +//////////////////////////////////////////////////////////////////////////////// +// Modification header(s): +//----------------------------------------------------------------------------- +// Modified by: +// Modification date: +// Description: +// Modification contact: +//------------------------------------------------------------------------------ +//////////////////////////////////////////////////////////////////////////////// + + +module urn_ietf_params_xml_ns_conference_info { + + +import from XSD all; + + +import from http_www_w3_org_XML_1998_namespace all; + + +/* This imports the xml:language definition */ + + +/* CONFERENCE ELEMENT */ + + +type Conference_type Conference_info +with { + variant "name as 'conference-info'"; + variant "element"; +}; + + +/* CONFERENCE TYPE */ + + +type record Conference_type +{ + XSD.AnyURI entity, + State_type state optional, + XSD.UnsignedInt version optional, + record of XSD.String attr optional, + Conference_description_type conference_description optional, + Host_type host_info optional, + Conference_state_type conference_state optional, + Users_type users optional, + Uris_type sidebars_by_ref optional, + Sidebars_by_val_type sidebars_by_val optional, + record of XSD.String elem_list +} +with { + variant "name as 'conference-type'"; + variant (entity) "attribute"; + variant (state) "defaultForEmpty as 'full'"; + variant (state) "attribute"; + variant (version) "attribute"; + variant (attr) "anyAttributes except unqualified, 'urn:ietf:params:xml:ns:conference-info'"; + variant (conference_description) "name as 'conference-description'"; + variant (host_info) "name as 'host-info'"; + variant (conference_state) "name as 'conference-state'"; + variant (sidebars_by_ref) "name as 'sidebars-by-ref'"; + variant (sidebars_by_val) "name as 'sidebars-by-val'"; + variant (elem_list) "untagged"; + variant (elem_list[-]) "anyElement except unqualified, 'urn:ietf:params:xml:ns:conference-info'"; +}; + + +/* STATE TYPE */ + + +type enumerated State_type +{ + deleted, + full, + partial +} +with { + variant "name as 'state-type'"; +}; + + +/* CONFERENCE DESCRIPTION TYPE */ + + +type record Conference_description_type +{ + record of XSD.String attr optional, + XSD.String display_text optional, + XSD.String subject optional, + XSD.String free_text optional, + Keywords_type keywords optional, + Uris_type conf_uris optional, + Uris_type service_uris optional, + XSD.UnsignedInt maximum_user_count optional, + Conference_media_type available_media optional, + record of XSD.String elem_list +} +with { + variant "name as 'conference-description-type'"; + variant (attr) "anyAttributes except unqualified, 'urn:ietf:params:xml:ns:conference-info'"; + variant (display_text) "name as 'display-text'"; + variant (free_text) "name as 'free-text'"; + variant (conf_uris) "name as 'conf-uris'"; + variant (service_uris) "name as 'service-uris'"; + variant (maximum_user_count) "name as 'maximum-user-count'"; + variant (available_media) "name as 'available-media'"; + variant (elem_list) "untagged"; + variant (elem_list[-]) "anyElement except unqualified, 'urn:ietf:params:xml:ns:conference-info'"; +}; + + +/* HOST TYPE */ + + +type record Host_type +{ + record of XSD.String attr optional, + XSD.String display_text optional, + XSD.AnyURI web_page optional, + Uris_type uris optional, + record of XSD.String elem_list +} +with { + variant "name as 'host-type'"; + variant (attr) "anyAttributes except unqualified, 'urn:ietf:params:xml:ns:conference-info'"; + variant (display_text) "name as 'display-text'"; + variant (web_page) "name as 'web-page'"; + variant (elem_list) "untagged"; + variant (elem_list[-]) "anyElement except unqualified, 'urn:ietf:params:xml:ns:conference-info'"; +}; + + +/* CONFERENCE STATE TYPE */ + + +type record Conference_state_type +{ + record of XSD.String attr optional, + XSD.UnsignedInt user_count optional, + XSD.Boolean active optional, + XSD.Boolean locked optional, + record of XSD.String elem_list +} +with { + variant "name as 'conference-state-type'"; + variant (attr) "anyAttributes except unqualified, 'urn:ietf:params:xml:ns:conference-info'"; + variant (user_count) "name as 'user-count'"; + //variant (active) "text 'true' as '1'"; + //variant (active) "text 'false' as '0'"; + //variant (locked) "text 'true' as '1'"; + //variant (locked) "text 'false' as '0'"; + variant (elem_list) "untagged"; + variant (elem_list[-]) "anyElement except unqualified, 'urn:ietf:params:xml:ns:conference-info'"; +}; + + +/* CONFERENCE MEDIA TYPE */ + + +type record Conference_media_type +{ + record of XSD.String attr optional, + record length(1 .. infinity) of Conference_medium_type entry_list +} +with { + variant "name as 'conference-media-type'"; + variant (attr) "anyAttributes except unqualified, 'urn:ietf:params:xml:ns:conference-info'"; + variant (entry_list) "untagged"; + variant (entry_list[-]) "name as 'entry'"; +}; + + +/* CONFERENCE MEDIUM TYPE */ + + +type record Conference_medium_type +{ + XSD.String label_, + record of XSD.String attr optional, + XSD.String display_text optional, + XSD.String type_, + Media_status_type status optional, + record of XSD.String elem_list +} +with { + variant "name as 'conference-medium-type'"; + variant (label_) "name as 'label'"; + variant (label_) "attribute"; + variant (attr) "anyAttributes except unqualified, 'urn:ietf:params:xml:ns:conference-info'"; + variant (display_text) "name as 'display-text'"; + variant (type_) "name as 'type'"; + variant (elem_list) "untagged"; + variant (elem_list[-]) "anyElement except unqualified, 'urn:ietf:params:xml:ns:conference-info'"; +}; + + +/* URIs TYPE */ + + +type record Uris_type +{ + State_type state optional, + record of XSD.String attr optional, + record length(1 .. infinity) of Uri_type entry_list +} +with { + variant "name as 'uris-type'"; + variant (state) "defaultForEmpty as 'full'"; + variant (state) "attribute"; + variant (attr) "anyAttributes except unqualified, 'urn:ietf:params:xml:ns:conference-info'"; + variant (entry_list) "untagged"; + variant (entry_list[-]) "name as 'entry'"; +}; + + +/* URI TYPE */ + + +type record Uri_type +{ + record of XSD.String attr optional, + XSD.AnyURI uri, + XSD.String display_text optional, + XSD.String purpose optional, + Execution_type modified optional, + record of XSD.String elem_list +} +with { + variant "name as 'uri-type'"; + variant (attr) "anyAttributes except unqualified, 'urn:ietf:params:xml:ns:conference-info'"; + variant (display_text) "name as 'display-text'"; + variant (elem_list) "untagged"; + variant (elem_list[-]) "anyElement except unqualified, 'urn:ietf:params:xml:ns:conference-info'"; +}; + + +/* KEYWORDS TYPE */ + + +type record of XSD.String Keywords_type +with { + variant "name as 'keywords-type'"; + variant "list"; +}; + + +/* USERS TYPE */ + + +type record Users_type +{ + State_type state optional, + record of XSD.String attr optional, + record of User_type user_list, + record of XSD.String elem_list +} +with { + variant "name as 'users-type'"; + variant (state) "defaultForEmpty as 'full'"; + variant (state) "attribute"; + variant (attr) "anyAttributes except unqualified, 'urn:ietf:params:xml:ns:conference-info'"; + variant (user_list) "untagged"; + variant (user_list[-]) "name as 'user'"; + variant (elem_list) "untagged"; + variant (elem_list[-]) "anyElement except unqualified, 'urn:ietf:params:xml:ns:conference-info'"; +}; + + +/* USER TYPE */ + + +type record User_type +{ + XSD.AnyURI entity optional, + State_type state optional, + record of XSD.String attr optional, + XSD.String display_text optional, + Uris_type associated_aors optional, + User_roles_type roles optional, + User_languages_type languages optional, + XSD.AnyURI cascaded_focus optional, + record of Endpoint_type endpoint_list, + record of XSD.String elem_list +} +with { + variant "name as 'user-type'"; + variant (entity) "attribute"; + variant (state) "defaultForEmpty as 'full'"; + variant (state) "attribute"; + variant (attr) "anyAttributes except unqualified, 'urn:ietf:params:xml:ns:conference-info'"; + variant (display_text) "name as 'display-text'"; + variant (associated_aors) "name as 'associated-aors'"; + variant (cascaded_focus) "name as 'cascaded-focus'"; + variant (endpoint_list) "untagged"; + variant (endpoint_list[-]) "name as 'endpoint'"; + variant (elem_list) "untagged"; + variant (elem_list[-]) "anyElement except unqualified, 'urn:ietf:params:xml:ns:conference-info'"; +}; + + +/* USER ROLES TYPE */ + + +type record User_roles_type +{ + record of XSD.String attr optional, + record length(1 .. infinity) of XSD.String entry_list +} +with { + variant "name as 'user-roles-type'"; + variant (attr) "anyAttributes except unqualified, 'urn:ietf:params:xml:ns:conference-info'"; + variant (entry_list) "untagged"; + variant (entry_list[-]) "name as 'entry'"; +}; + + +/* USER LANGUAGES TYPE */ + + +type record of XSD.Language User_languages_type +with { + variant "name as 'user-languages-type'"; + variant "list"; +}; + + +/* ENDPOINT TYPE */ + + +type record Endpoint_type +{ + XSD.String entity optional, + State_type state optional, + record of XSD.String attr optional, + XSD.String display_text optional, + Execution_type referred optional, + Endpoint_status_type status optional, + Joining_type joining_method optional, + Execution_type joining_info optional, + Disconnection_type disconnection_method optional, + Execution_type disconnection_info optional, + record of Media_type media_list, + Call_type call_info optional, + record of XSD.String elem_list +} +with { + variant "name as 'endpoint-type'"; + variant (entity) "attribute"; + variant (state) "defaultForEmpty as 'full'"; + variant (state) "attribute"; + variant (attr) "anyAttributes except unqualified, 'urn:ietf:params:xml:ns:conference-info'"; + variant (display_text) "name as 'display-text'"; + variant (joining_method) "name as 'joining-method'"; + variant (joining_info) "name as 'joining-info'"; + variant (disconnection_method) "name as 'disconnection-method'"; + variant (disconnection_info) "name as 'disconnection-info'"; + variant (media_list) "untagged"; + variant (media_list[-]) "name as 'media'"; + variant (call_info) "name as 'call-info'"; + variant (elem_list) "untagged"; + variant (elem_list[-]) "anyElement except unqualified, 'urn:ietf:params:xml:ns:conference-info'"; +}; + + +/* ENDPOINT STATUS TYPE */ + + +type enumerated Endpoint_status_type +{ + alerting, + connected, + dialing_in, + dialing_out, + disconnected, + disconnecting, + muted_via_focus, + on_hold, + pending +} +with { + variant "text 'dialing_in' as 'dialing-in'"; + variant "text 'dialing_out' as 'dialing-out'"; + variant "text 'muted_via_focus' as 'muted-via-focus'"; + variant "text 'on_hold' as 'on-hold'"; + variant "name as 'endpoint-status-type'"; +}; + + +/* JOINING TYPE */ + + +type enumerated Joining_type +{ + dialed_in, + dialed_out, + focus_owner +} +with { + variant "text 'dialed_in' as 'dialed-in'"; + variant "text 'dialed_out' as 'dialed-out'"; + variant "text 'focus_owner' as 'focus-owner'"; + variant "name as 'joining-type'"; +}; + + +/* DISCONNECTION TYPE */ + + +type enumerated Disconnection_type +{ + booted, + busy, + departed, + failed +} +with { + variant "name as 'disconnection-type'"; +}; + + +/* EXECUTION TYPE */ + + +type record Execution_type +{ + record of XSD.String attr optional, + XSD.DateTime when optional, + XSD.String reason optional, + XSD.AnyURI by optional +} +with { + variant "name as 'execution-type'"; + variant (attr) "anyAttributes except unqualified, 'urn:ietf:params:xml:ns:conference-info'"; +}; + + +/* CALL TYPE */ + + +type record Call_type +{ + record of XSD.String attr optional, + union { + Sip_dialog_id_type sip, + record of XSD.String elem_list + } choice +} +with { + variant "name as 'call-type'"; + variant (attr) "anyAttributes except unqualified, 'urn:ietf:params:xml:ns:conference-info'"; + variant (choice) "untagged"; + variant (choice.elem_list) "untagged"; + variant (choice.elem_list[-]) "anyElement except unqualified, 'urn:ietf:params:xml:ns:conference-info'"; +}; + + +/* SIP DIALOG ID TYPE */ + + +type record Sip_dialog_id_type +{ + record of XSD.String attr optional, + XSD.String display_text optional, + XSD.String call_id, + XSD.String from_tag, + XSD.String to_tag, + record of XSD.String elem_list +} +with { + variant "name as 'sip-dialog-id-type'"; + variant (attr) "anyAttributes except unqualified, 'urn:ietf:params:xml:ns:conference-info'"; + variant (display_text) "name as 'display-text'"; + variant (call_id) "name as 'call-id'"; + variant (from_tag) "name as 'from-tag'"; + variant (to_tag) "name as 'to-tag'"; + variant (elem_list) "untagged"; + variant (elem_list[-]) "anyElement except unqualified, 'urn:ietf:params:xml:ns:conference-info'"; +}; + + +/* MEDIA TYPE */ + + +type record Media_type +{ + XSD.String id, + record of XSD.String attr optional, + XSD.String display_text optional, + XSD.String type_ optional, + XSD.String label_ optional, + XSD.String src_id optional, + Media_status_type status optional, + record of XSD.String elem_list +} +with { + variant "name as 'media-type'"; + variant (id) "attribute"; + variant (attr) "anyAttributes except unqualified, 'urn:ietf:params:xml:ns:conference-info'"; + variant (display_text) "name as 'display-text'"; + variant (type_) "name as 'type'"; + variant (label_) "name as 'label'"; + variant (src_id) "name as 'src-id'"; + variant (elem_list) "untagged"; + variant (elem_list[-]) "anyElement except unqualified, 'urn:ietf:params:xml:ns:conference-info'"; +}; + + +/* MEDIA STATUS TYPE */ + + +type enumerated Media_status_type +{ + inactive, + recvonly, + sendonly, + sendrecv +} +with { + variant "name as 'media-status-type'"; +}; + + +/* SIDEBARS BY VAL TYPE */ + + +type record Sidebars_by_val_type +{ + State_type state optional, + record of XSD.String attr optional, + record of Conference_type entry_list +} +with { + variant "name as 'sidebars-by-val-type'"; + variant (state) "defaultForEmpty as 'full'"; + variant (state) "attribute"; + variant (attr) "anyAttributes except unqualified, 'urn:ietf:params:xml:ns:conference-info'"; + variant (entry_list) "untagged"; + variant (entry_list[-]) "name as 'entry'"; +}; + + +} +with { + encode "XML"; + variant "namespace as 'urn:ietf:params:xml:ns:conference-info' prefix 'tns'"; + variant "controlNamespace 'http://www.w3.org/2001/XMLSchema-instance' prefix 'xsi'"; + variant "elementFormQualified"; +} diff --git a/ttcn/patch_sip_titan/urn_ietf_params_xml_ns_reginfo.ttcn b/ttcn/patch_sip_titan/urn_ietf_params_xml_ns_reginfo.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..816218da4afd6f557d90cb0b6611c16e567fa5cd --- /dev/null +++ b/ttcn/patch_sip_titan/urn_ietf_params_xml_ns_reginfo.ttcn @@ -0,0 +1,165 @@ +/******************************************************************************* +* Copyright (c) 2000-2016 Ericsson Telecom AB +* +* XSD to TTCN-3 Translator version: CRL 113 200/5 R4D +* +* All rights reserved. This program and the accompanying materials +* are made available under the terms of the Eclipse Public License v1.0 +* which accompanies this distribution, and is available at +* http://www.eclipse.org/legal/epl-v10.html +*******************************************************************************/ +// +// File: urn_ietf_params_xml_ns_reginfo.ttcn +// Description: +// References: +// Rev: +// Prodnr: +// Updated: Fri Mar 4 09:23:30 2016 +// Contact: http://ttcn.ericsson.se +// +//////////////////////////////////////////////////////////////////////////////// +// Generated from file(s): +// - regInfo.xsd +// /* xml version = "1.0" */ +// /* targetnamespace = "urn:ietf:params:xml:ns:reginfo" */ +//////////////////////////////////////////////////////////////////////////////// +// Modification header(s): +//----------------------------------------------------------------------------- +// Modified by: +// Modification date: +// Description: +// Modification contact: +//------------------------------------------------------------------------------ +//////////////////////////////////////////////////////////////////////////////// + + +module urn_ietf_params_xml_ns_reginfo { + + +import from XSD all; + + +import from http_www_w3_org_XML_1998_namespace all; + + +/* RFC 3680 clause 5.4 */ + + +/* This import brings in the XML language attribute xml:lang */ + + +type record Reginfo +{ + enumerated { + full, + partial + } state, + XSD.NonNegativeInteger version, + record of Registration registration_list, + record of XSD.String elem_list +} +with { + variant "name as uncapitalized"; + variant "element"; + variant (state) "attribute"; + variant (version) "attribute"; + variant (registration_list) "untagged"; + variant (registration_list[-]) "name as 'registration'"; + variant (elem_list) "untagged"; + variant (elem_list[-]) "anyElement except unqualified, 'urn:ietf:params:xml:ns:reginfo'"; +}; + + +type record Registration +{ + XSD.AnyURI aor, + XSD.String id, + enumerated { + active, + init, + terminated + } state, + record of Contact contact_list, + record of XSD.String elem_list +} +with { + variant "name as uncapitalized"; + variant "element"; + variant (aor) "attribute"; + variant (id) "attribute"; + variant (state) "attribute"; + variant (contact_list) "untagged"; + variant (contact_list[-]) "name as 'contact'"; + variant (elem_list) "untagged"; + variant (elem_list[-]) "anyElement except unqualified, 'urn:ietf:params:xml:ns:reginfo'"; +}; + + +type record Contact +{ + XSD.String callid optional, + XSD.UnsignedLong cseq optional, + XSD.UnsignedLong duration_registered optional, + enumerated { + created, + deactivated, + expired, + probation, + refreshed, + registered, + rejected, + shortened, + unregistered + } event, + XSD.UnsignedLong expires optional, + XSD.String id, + XSD.String q optional, + XSD.UnsignedLong retry_after optional, + enumerated { + active, + terminated + } state, + XSD.AnyURI uri, + record { + Lang lang optional, + XSD.String base + } display_name optional, + record of record { + XSD.String name, + XSD.String base + } unknown_param_list, + record of XSD.String elem_list +} +with { + variant "name as uncapitalized"; + variant "element"; + variant (callid) "attribute"; + variant (cseq) "attribute"; + variant (duration_registered) "name as 'duration-registered'"; + variant (duration_registered) "attribute"; + variant (event) "attribute"; + variant (expires) "attribute"; + variant (id) "attribute"; + variant (q) "attribute"; + variant (retry_after) "name as 'retry-after'"; + variant (retry_after) "attribute"; + variant (state) "attribute"; + variant (display_name) "name as 'display-name'"; + variant (display_name.lang) "attribute"; + variant (display_name.base) "untagged"; + variant (unknown_param_list) "untagged"; + variant (unknown_param_list[-]) "name as 'unknown-param'"; + variant (unknown_param_list[-].name) "attribute"; + variant (unknown_param_list[-].base) "untagged"; + variant (elem_list) "untagged"; + variant (elem_list[-]) "anyElement except unqualified, 'urn:ietf:params:xml:ns:reginfo'"; +}; + + +} +with { + encode "XML"; + variant "namespace as 'urn:ietf:params:xml:ns:reginfo' prefix 'tns'"; + variant "controlNamespace 'http://www.w3.org/2001/XMLSchema-instance' prefix 'xsi'"; + variant "elementFormQualified"; +} diff --git a/ttcn/patch_sip_titan/urn_ietf_params_xml_ns_resource_lists.ttcn b/ttcn/patch_sip_titan/urn_ietf_params_xml_ns_resource_lists.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..df54f837f6437fe006d6bcaee0b7a87602d2c77c --- /dev/null +++ b/ttcn/patch_sip_titan/urn_ietf_params_xml_ns_resource_lists.ttcn @@ -0,0 +1,194 @@ +/******************************************************************************* +* Copyright (c) 2000-2016 Ericsson Telecom AB +* +* XSD to TTCN-3 Translator version: CRL 113 200/5 R4D +* +* All rights reserved. This program and the accompanying materials +* are made available under the terms of the Eclipse Public License v1.0 +* which accompanies this distribution, and is available at +* http://www.eclipse.org/legal/epl-v10.html +*******************************************************************************/ +// +// File: urn_ietf_params_xml_ns_resource_lists.ttcn +// Description: +// References: +// Rev: +// Prodnr: +// Updated: Fri Mar 4 09:23:30 2016 +// Contact: http://ttcn.ericsson.se +// +//////////////////////////////////////////////////////////////////////////////// +// Generated from file(s): +// - ResourceList.xsd +// /* xml version = "1.0" encoding = "UTF-8" standalone = "no" */ +// /* targetnamespace = "urn:ietf:params:xml:ns:resource-lists" */ +//////////////////////////////////////////////////////////////////////////////// +// Modification header(s): +//----------------------------------------------------------------------------- +// Modified by: +// Modification date: +// Description: +// Modification contact: +//------------------------------------------------------------------------------ +//////////////////////////////////////////////////////////////////////////////// + + +module urn_ietf_params_xml_ns_resource_lists { + + +import from XSD all; + + +import from http_www_w3_org_XML_1998_namespace all; + + +type record ListType +{ + XSD.String name optional, + record of XSD.String attr optional, + Display_nameType display_name optional, + record of record { + union { + record { + XSD.String name optional, + record of XSD.String attr optional, + Display_nameType display_name optional, + record of record { + union { + record { + XSD.String name optional, + record of XSD.String attr optional, + record of XSD.String elem_list + } list, + ExternalType external_, + EntryType entry, + Entry_refType entry_ref + } choice + } sequence_list, + record of XSD.String elem_list + } list, + ExternalType external_, + EntryType entry, + Entry_refType entry_ref + } choice + } sequence_list, + record of XSD.String elem_list +} +with { + variant "name as uncapitalized"; + variant (name) "attribute"; + variant (attr) "anyAttributes except unqualified, 'urn:ietf:params:xml:ns:resource-lists'"; + variant (display_name) "name as 'display-name'"; + variant (sequence_list) "untagged"; + variant (sequence_list[-]) "untagged"; + variant (sequence_list[-].choice) "untagged"; + variant (sequence_list[-].choice.list.name) "attribute"; + variant (sequence_list[-].choice.list.attr) "anyAttributes except unqualified, 'urn:ietf:params:xml:ns:resource-lists'"; + variant (sequence_list[-].choice.list.display_name) "name as 'display-name'"; + variant (sequence_list[-].choice.list.sequence_list) "untagged"; + variant (sequence_list[-].choice.list.sequence_list[-]) "untagged"; + variant (sequence_list[-].choice.list.sequence_list[-].choice) "untagged"; + variant (sequence_list[-].choice.list.sequence_list[-].choice.list.name) "attribute"; + variant (sequence_list[-].choice.list.sequence_list[-].choice.list.attr) "anyAttributes except unqualified, 'urn:ietf:params:xml:ns:resource-lists'"; + variant (sequence_list[-].choice.list.sequence_list[-].choice.list.elem_list) "untagged"; + variant (sequence_list[-].choice.list.sequence_list[-].choice.list.elem_list[-]) "anyElement except unqualified, 'urn:ietf:params:xml:ns:resource-lists'"; + variant (sequence_list[-].choice.list.sequence_list[-].choice.external_) "name as 'external'"; + variant (sequence_list[-].choice.list.sequence_list[-].choice.entry_ref) "name as 'entry-ref'"; + variant (sequence_list[-].choice.list.elem_list) "untagged"; + variant (sequence_list[-].choice.list.elem_list[-]) "anyElement except unqualified, 'urn:ietf:params:xml:ns:resource-lists'"; + variant (sequence_list[-].choice.external_) "name as 'external'"; + variant (sequence_list[-].choice.entry_ref) "name as 'entry-ref'"; + variant (elem_list) "untagged"; + variant (elem_list[-]) "anyElement except unqualified, 'urn:ietf:params:xml:ns:resource-lists'"; +}; + + +type record EntryType +{ + XSD.AnyURI uri, + record of XSD.String attr optional, + record { + Lang lang optional, + XSD.String base + } display_name optional, + record of XSD.String elem_list +} +with { + variant "name as uncapitalized"; + variant (uri) "attribute"; + variant (attr) "anyAttributes except unqualified, 'urn:ietf:params:xml:ns:resource-lists'"; + variant (display_name) "name as 'display-name'"; + variant (display_name.lang) "attribute"; + variant (display_name.base) "untagged"; + variant (elem_list) "untagged"; + variant (elem_list[-]) "anyElement except unqualified, 'urn:ietf:params:xml:ns:resource-lists'"; +}; + + +type record Entry_refType +{ + XSD.AnyURI ref, + record of XSD.String attr optional, + Display_nameType display_name optional, + record of XSD.String elem_list +} +with { + variant "name as 'entry-refType'"; + variant (ref) "attribute"; + variant (attr) "anyAttributes except unqualified, 'urn:ietf:params:xml:ns:resource-lists'"; + variant (display_name) "name as 'display-name'"; + variant (elem_list) "untagged"; + variant (elem_list[-]) "anyElement except unqualified, 'urn:ietf:params:xml:ns:resource-lists'"; +}; + + +type record ExternalType +{ + XSD.AnyURI anchor optional, + record of XSD.String attr optional, + Display_nameType display_name optional, + record of XSD.String elem_list +} +with { + variant "name as uncapitalized"; + variant (anchor) "attribute"; + variant (attr) "anyAttributes except unqualified, 'urn:ietf:params:xml:ns:resource-lists'"; + variant (display_name) "name as 'display-name'"; + variant (elem_list) "untagged"; + variant (elem_list[-]) "anyElement except unqualified, 'urn:ietf:params:xml:ns:resource-lists'"; +}; + + +type record Resource_lists +{ + record of record { + ListType list + } sequence_list +} +with { + variant "name as 'resource-lists'"; + variant "element"; + variant (sequence_list) "untagged"; + variant (sequence_list[-]) "untagged"; +}; + + +type record Display_nameType +{ + Lang lang optional, + XSD.String base +} +with { + variant "name as 'display-nameType'"; + variant (lang) "attribute"; + variant (base) "untagged"; +}; + + +} +with { + encode "XML"; + variant "namespace as 'urn:ietf:params:xml:ns:resource-lists'"; + variant "controlNamespace 'http://www.w3.org/2001/XMLSchema-instance' prefix 'xsi'"; + variant "elementFormQualified"; +} diff --git a/ttcn/patch_sip_titan/urn_oma_xml_xdm_common_policy.ttcn b/ttcn/patch_sip_titan/urn_oma_xml_xdm_common_policy.ttcn new file mode 100644 index 0000000000000000000000000000000000000000..2d6ed99960a210b35d2a7ae0e7924abed7ed75bb --- /dev/null +++ b/ttcn/patch_sip_titan/urn_oma_xml_xdm_common_policy.ttcn @@ -0,0 +1,98 @@ +/******************************************************************************* +* Copyright (c) 2000-2016 Ericsson Telecom AB +* +* XSD to TTCN-3 Translator version: CRL 113 200/5 R4D +* +* All rights reserved. This program and the accompanying materials +* are made available under the terms of the Eclipse Public License v1.0 +* which accompanies this distribution, and is available at +* http://www.eclipse.org/legal/epl-v10.html +*******************************************************************************/ +// +// File: urn_oma_xml_xdm_common_policy.ttcn +// Description: +// References: +// Rev: +// Prodnr: +// Updated: Fri Mar 4 09:23:30 2016 +// Contact: http://ttcn.ericsson.se +// +//////////////////////////////////////////////////////////////////////////////// +// Generated from file(s): +// - xdm_commonPolicy-v1_0.xsd +// /* xml version = "1.0" encoding = "UTF-8" */ +// /* targetnamespace = "urn:oma:xml:xdm:common-policy" */ +//////////////////////////////////////////////////////////////////////////////// +// Modification header(s): +//----------------------------------------------------------------------------- +// Modified by: +// Modification date: +// Description: +// Modification contact: +//------------------------------------------------------------------------------ +//////////////////////////////////////////////////////////////////////////////// + + +module urn_oma_xml_xdm_common_policy { + + +import from XSD all; + + +/* OMA specific "conditions" child elements */ + + +type EmptyType Other_identity +with { + variant "name as 'other-identity'"; + variant "element"; +}; + + +type record External_list +{ + record of AnchorType entry_list +} +with { + variant "name as 'external-list'"; + variant "element"; + variant (entry_list) "untagged"; + variant (entry_list[-]) "name as 'entry'"; +}; + + +type EmptyType Anonymous_request +with { + variant "name as 'anonymous-request'"; + variant "element"; +}; + + +type record AnchorType +{ + XSD.AnyURI anc optional, + record of XSD.String attr optional +} +with { + variant "name as uncapitalized"; + variant (anc) "attribute"; + variant (attr) "anyAttributes"; +}; + + +type record EmptyType +{ + +} +with { + variant "name as uncapitalized"; +}; + + +} +with { + encode "XML"; + variant "namespace as 'urn:oma:xml:xdm:common-policy'"; + variant "controlNamespace 'http://www.w3.org/2001/XMLSchema-instance' prefix 'xsi'"; + variant "elementFormQualified"; +} diff --git a/vagrant/Vagrantfile b/vagrant/Vagrantfile new file mode 100644 index 0000000000000000000000000000000000000000..86b03597a1ad00b02b0d0c17cae665e8bc792911 --- /dev/null +++ b/vagrant/Vagrantfile @@ -0,0 +1,73 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +# All Vagrant configuration is done below. The "2" in Vagrant.configure +# configures the configuration version (we support older styles for +# backwards compatibility). Please don't change it unless you know what +# you're doing. +Vagrant.configure("2") do |config| + # The most common configuration options are documented and commented below. + # For a complete reference, please see the online documentation at + # https://docs.vagrantup.com. + + # Every Vagrant development environment requires a box. You can search for + # boxes at https://atlas.hashicorp.com/search. + config.vm.box = "bento/ubuntu-18.04" + + # Disable automatic box update checking. If you disable this, then + # boxes will only be checked for updates when the user runs + # `vagrant box outdated`. This is not recommended. + # config.vm.box_check_update = false + + config.vm.boot_timeout = 900 + + # Use this hostname to force provisioner script to using SVN instead of external HDD + #config.vm.hostname = "vagrant-prov" + + # Create a forwarded port mapping which allows access to a specific port + # within the machine from a port on the host machine. In the example below, + # accessing "localhost:8080" will access port 80 on the guest machine. + # config.vm.network "forwarded_port", guest: 80, host: 8080 + + # Create a private network, which allows host-only access to the machine + # using a specific IP. + #config.vm.network "private_network", ip: "192.168.4.94" + + # Create a public network, which generally matched to bridged network. + # Bridged networks make the machine appear as another physical device on + # your network. + #config.vm.network "public_network" + + # Share an additional folder to the guest VM. The first argument is + # the path on the host to the actual folder. The second argument is + # the path on the guest to mount the folder. And the optional third + # argument is a set of non-required options. + + # Provider-specific configuration so you can fine-tune various + # backing providers for Vagrant. These expose provider-specific options. + # Example for VirtualBox: + # + config.vm.provider "virtualbox" do |vb| + # Display the VirtualBox GUI when booting the machine + #vb.gui = true + vb.customize ["modifyvm", :id, "--monitorcount", "1"] + vb.customize ["modifyvm", :id, "--vram", "12"] + # Customize the amount of memory on the VM: + vb.memory = "4096" + end + # + # View the documentation for the provider you are using for more + # information on available options. + + # Define a Vagrant Push strategy for pushing to Atlas. Other push strategies + # such as FTP and Heroku are also available. See the documentation at + # https://docs.vagrantup.com/v2/push/atlas.html for more information. + # config.push.define "atlas" do |push| + # push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME" + # end + + # Enable provisioning with a shell script. Additional provisioners such as + # Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the + # documentation for more information about their specific syntax and use. + config.vm.provision "shell", path: "provisioner.bash", privileged: false +end diff --git a/vagrant/provisioner.bash b/vagrant/provisioner.bash new file mode 100755 index 0000000000000000000000000000000000000000..46aa2405fd4504405ceb0665e56cbbad4af557c0 --- /dev/null +++ b/vagrant/provisioner.bash @@ -0,0 +1,151 @@ +#!/bin/bash +# Prepare environment for the build +#set -e # Exit with non 0 if any command fails +#set -vx + +# Update system +sudo DEBIAN_FRONTEND=noninteractive apt-get update +sudo DEBIAN_FRONTEND=noninteractive apt-get dist-upgrade -y +sudo DEBIAN_FRONTEND=noninteractive apt-get install software-properties-common -y +sudo DEBIAN_FRONTEND=noninteractive add-apt-repository ppa:linuxuprising/java -y +sudo DEBIAN_FRONTEND=noninteractive apt-get update +sudo DEBIAN_FRONTEND=noninteractive apt-get --allow-unauthenticated install emacs openjdk-11-jre gcc-8 g++-8 git subversion lsof ntp gdb make cmake flex bison autoconf doxygen graphviz libtool libncurses5-dev expect libssl-dev libgcrypt-dev libxml2-dev xutils-dev tcpdump libpcap-dev libwireshark-dev wget tree unzip sshpass kubuntu-desktop valgrind qt5-default qttools5-dev qtmultimedia5-dev libqt5svg5-dev vim tzdata dos2unix xsltproc -y +# Install java +#sudo DEBIAN_FRONTEND=noninteractive apt-get install oracle-java9-installer oracle-java9-set-default -y +#sudo DEBIAN_FRONTEND=noninteractive apt-get --allow-unauthenticated install oracle-java10-installer oracle-java10-set-default -y +#sudo DEBIAN_FRONTEND=noninteractive apt --fix-broken install -y +sudo DEBIAN_FRONTEND=noninteractive apt-get autoremove --purge -y +sudo DEBIAN_FRONTEND=noninteractive apt-get clean + +gcc --version +g++ --version +valgrind --version +java -version + +export HOME=/home/vagrant + +export PATH_DEV=${HOME}/dev +export HOME_FRAMEWORKS=${HOME}/frameworks +export HOME_LIB=${HOME}/lib +export HOME_BIN=${HOME}/bin +export HOME_ETC=${HOME}/etc +export HOME_INC=${HOME}/include +export HOME_TMP=${HOME}/tmp +export HOME_DOCS=${HOME}/docs +export PATH=${HOME_BIN}:${PATH} +export LD_LIBRARY_PATH=${HOME_LIB}:/usr/local/lib:${LD_LIBRARY_PATH} + +OLD_PWD=`pwd` +# Create directories +mkdir -p ${HOME_LIB} +if [ ! -d ${HOME_LIB} ] +then + exit -1 +fi +mkdir -p ${HOME_INC} +if [ ! -d ${HOME_INC} ] +then + exit -1 +fi +mkdir -p ${HOME_BIN} +if [ ! -d ${HOME_BIN} ] +then + exit -1 +fi +mkdir -p ${HOME_TMP} +if [ ! -d ${HOME_TMP} ] +then + exit -1 +fi +mkdir -p ${HOME_DOCS} +if [ ! -d ${HOME_DOCS} ] +then + exit -1 +fi +mkdir -p ${HOME_FRAMEWORKS} +if [ ! -d ${HOME_FRAMEWORKS} ] +then + exit -1 +fi +mkdir -p ${PATH_DEV} +if [ ! -d ${PATH_DEV} ] +then + exit -1 +fi + +cd /home/vagrant/dev +git clone https://forge.etsi.org/gitlab/emergency-communications/NG112 ./STF549_Ng112 +cd /home/vagrant/dev/STF549_Ng112 +git checkout TTCN_3_Developments +cd /home/vagrant/dev/STF549_Ng112/ttcn +svn co --username svnusers --password svnusers --non-interactive https://oldforge.etsi.org/svn/LibSip/trunk ./LibSip +svn co --username svnusers --password svnusers --non-interactive https://oldforge.etsi.org/svn/LibCommon/trunk/ttcn ./LibCommon +svn co --username svnusers --password svnusers --non-interactive --trust-server-cert https://oldforge.etsi.org/svn/LibIts/branches/STF525/ttcn/Http ./LibHttp +cd /home/vagrant/dev/STF549_Ng112/scripts +chmod 775 *.bash devenv.bash.* +cd /home/vagrant/dev/STF549_Ng112/docker +chmod 775 *.sh +cd /home/vagrant/dev/STF549_Ng112 +chmod 775 ./.jenkins.sh +cd /home/vagrant +ln -sf /home/vagrant/dev/STF549_Ng112/scripts/devenv.bash.ubuntu /home/vagrant/devenv.bash +. /home/vagrant/devenv.bash + +# Install all frameworks + +# Install osip +cd ${HOME_FRAMEWORKS} +git clone https://github.com/YannGarcia/osip.git ./osip +cd ./osip +./autogen.sh +./configure --prefix=/home/vagrant +make && make install + +# Install GoogleTest +cd ${HOME_FRAMEWORKS} +git clone https://github.com/google/googletest.git googletest +cd ${HOME_FRAMEWORKS}/googletest/ +cmake . +make CXX=g++ +sudo make install + +# Install latest LCOV +cd ${HOME_FRAMEWORKS} +mkdir -p ${HOME_FRAMEWORKS}/lcov +cd ${HOME_FRAMEWORKS}/lcov +wget http://ftp.de.debian.org/debian/pool/main/l/lcov/lcov_1.13.orig.tar.gz +tar xf lcov_1.13.orig.tar.gz +sudo make -C lcov-1.13/ install + +# Install lcov to coveralls conversion +sudo gem install coveralls-lcov + +lcov --version +coveralls-lcov -h + +# Install eclipse +cd ${HOME_FRAMEWORKS} +wget 'http://ftp.halifax.rwth-aachen.de/eclipse/technology/epp/downloads/release/oxygen/2/eclipse-cpp-oxygen-2-linux-gtk-x86_64.tar.gz' -Oeclipse-cpp-oxygen-2-linux-gtk-x86_64.tar.gz +tar -zxvf ./eclipse-cpp-oxygen-2-linux-gtk-x86_64.tar.gz +rm -f ./eclipse-cpp-oxygen-2-linux-gtk-x86_64.tar.gz + +cd /home/vagrant +echo "" >> /home/vagrant/.bashrc +echo "export LD_LIBRARY_PATH=/home/vagrant/dev/etsi_emco/lib:$LD_LIBRARY_PATH" >> /home/vagrant/.bashrc +echo "export PATH=/home/vagrant/bin:$PATH" >> /home/vagrant/.bashrc +echo ". ~/devenv.bash" >> /home/vagrant/.bashrc + +. /home/vagrant/.bashrc +cd /home/vagrant/dev/STF549_Ng112/scripts +./build_titan.bash +. /home/vagrant/devenv.bash +./update_its_project.bash +cd /home/vagrant/dev/etsi_emco/src/TestCodec/objs +../bin/testcodec_generate_makefile.bash +../bin/run_all.bash + +cd ${OLD_PWD} + +sudo init 6 + +exit 0 diff --git a/validation/TC_LIS_HTTP_POST_BV_01.pcapng b/validation/TC_LIS_HTTP_POST_BV_01.pcapng new file mode 100644 index 0000000000000000000000000000000000000000..c4b03436912a9d6e1427ad5ec3fd2ba1901ebb58 Binary files /dev/null and b/validation/TC_LIS_HTTP_POST_BV_01.pcapng differ diff --git a/validation/TC_LIS_HTTP_POST_BV_01_merged.log b/validation/TC_LIS_HTTP_POST_BV_01_merged.log new file mode 100644 index 0000000000000000000000000000000000000000..e685fa4633233e4e882489373380dc5ad0a6ca98 --- /dev/null +++ b/validation/TC_LIS_HTTP_POST_BV_01_merged.log @@ -0,0 +1,1531 @@ +14:53:07.349696 hc EXECUTOR - TTCN-3 Host Controller started on vagrant. Version: CRL 113 200/6 R4A. +14:53:07.349857 hc EXECUTOR - TTCN Logger v2.2 options: TimeStampFormat:=Time; LogEntityName:=Yes; LogEventTypes:=Yes; SourceInfoFormat:=Stack; *.FileMask:=LOG_ALL | MATCHING | DEBUG; *.ConsoleMask:=LOG_ALL | MATCHING | DEBUG; LogFileSize:=0; LogFileNumber:=1; DiskFullAction:=Error +14:53:07.350501 hc WARNING - Warning: The address of MC was set to a local IP address. This may cause incorrect behavior if a HC from a remote host also connects to MC. +14:53:07.350541 hc EXECUTOR - The address of MC was set to 127.0.0.1:0. +14:53:07.350733 hc EXECUTOR - Connected to MC. +14:53:07.351124 hc EXECUTOR - This host supports UNIX domain sockets for local communication. +14:53:07.352004 hc EXECUTOR - Processing configuration data received from MC. +14:53:07.355820 hc EXECUTOR - Module LibCommon_Sync has the following parameters: { + PX_TSYNC_TIME_LIMIT := 120.000000, + PX_TSHUT_DOWN_TIME_LIMIT := 120.000000 +} +14:53:07.356523 hc EXECUTOR - Module LibCommon_Time has the following parameters: { + PX_TDONE := 120.000000, + PX_TAC := 30.000000, + PX_TNOAC := 10.000000, + PX_TWAIT := 120.000000, + PX_LOOP := 1.000000 +} +14:53:07.357047 hc EXECUTOR - Module LibItsHttp_Pics has the following parameters: { + PICS_HEADER_HOST := "location-information-service.azurewebsites.net", + PICS_HEADER_CONTENT_TYPE := "application/held+xml;charset=utf-8" +} +14:53:07.357445 hc EXECUTOR - Module LibNg112_Pics has the following parameters: { + PICS_LIS_IUT := true, + PICS_ECRF_IUT := true, + PICS_HTTP_POST_REQUEST := true, + PICS_LOCATION_HELD := true, + PICS_SERVICE_LOST := true, + PICS_LIS_URI := "/api/held", + PICS_ECRF_URI := "/service", + PICS_ECRF_REQUEST_URIs := { + "/t/0ahy0-1531830377/post" + } +} +14:53:07.357767 hc EXECUTOR - Module LibNg112_Pixits has the following parameters: { + PX_DOUBLE_CMP_EPSILON := 1.000000e-05, + PX_DEVICE_URI_SIP := "sip:user@example.net;gr=kjh29x97us97d", + PX_DEVICE_URI_TEL := "+331234567890", + PX_UNKNOWN_DEVICE_URI := "sip:no_one@example.net;gr=kjh29x97us97d", + PX_DEVICE_POSITION := { + -34.400000, + 134.400000 + }, + PX_CIRCLE_POS := { + 48.215388, + 16.290300 + }, + PX_CIRCLE_UOM := "urn:ogc:def:uom:EPSG::9001", + PX_CIRCLE_BASE := 23.600000, + PX_SRS_NAME := "urn:ogc:def:crs:EPSG::4326", + PX_LOST_ID := "6020688f1ce1896d", + PX_LOST_SERVICE_URN_1 := "urn:service:sos.police", + PX_LOST_SERVICE_URN_2 := "urn:service:sos.police", + PX_LOST_SERVICE := "urn:service:sos.police", + PX_LOST_NO_LOST := { + 48.215388, + 16.290300 + } +} +14:53:07.358899 hc EXECUTOR - Module LibSip_PIXITS has the following parameters: { + PX_SIP_SDP_USER_NAME := "voicesession", + PX_SIP_SDP_SESSION_ID := "30000", + PX_SIP_SDP_DYN := "0", + PX_SIP_SDP_B_MODIFIER := "AS", + PX_SIP_SDP_B_BANDWIDTH := 64, + PX_SIP_SDP_ENCODING := "PCMU", + PX_SIP_SDP_CLOCKRATE := "8000", + PX_MB_LENGTH_FROM_ENCVAL := true, + PX_USE_FX_FOR_XML_LENGTH := false, + PX_SIP_TRANSPORT := "UDP", + PX_SIP_REGISTRATION := false, + PX_AUTH_ALGORITHM := "AKAv1-MD5", + PX_SIP_REGISTER_AUTHENTICATION_ENABLED := true, + PX_SIP_INVITE_AUTHENTICATION_ENABLED := false, + PX_SIP_TWAIT := 30.000000, + PX_SIP_TACK := 8.000000, + PX_SIP_TRESP := 15.000000, + PX_SIP_TNOACT := 1.000000, + PX_SIP_MIME_BOUNDARY := "boundary1" +} +14:53:07.359386 hc EXECUTOR - Initializing module AtsNg112_TestCases. +14:53:07.359798 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0 Initializing module LibItsHttp_Functions. +14:53:07.360303 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibItsHttp_Functions.ttcn:0 Initializing module LibItsHttp_TypesAndValues. +14:53:07.360951 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibItsHttp_Functions.ttcn:0->../ttcn/LibItsHttp_TypesAndValues.ttcn:0 Initializing module LibItsHttp_MessageBodyTypes. +14:53:07.361506 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibItsHttp_Functions.ttcn:0->../ttcn/LibItsHttp_TypesAndValues.ttcn:0->../ttcn/LibItsHttp_MessageBodyTypes.ttcn:0 Initializing module LibItsHttp_XmlMessageBodyTypes. +14:53:07.362298 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibItsHttp_Functions.ttcn:0->../ttcn/LibItsHttp_TypesAndValues.ttcn:0->../ttcn/LibItsHttp_MessageBodyTypes.ttcn:0->../ttcn/LibItsHttp_XmlMessageBodyTypes.ttcn:0 Initializing module LibItsHttp_XMLTypes. +14:53:07.362720 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibItsHttp_Functions.ttcn:0->../ttcn/LibItsHttp_TypesAndValues.ttcn:0->../ttcn/LibItsHttp_MessageBodyTypes.ttcn:0->../ttcn/LibItsHttp_XmlMessageBodyTypes.ttcn:0 Initialization of module LibItsHttp_XMLTypes finished. +14:53:07.363634 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibItsHttp_Functions.ttcn:0->../ttcn/LibItsHttp_TypesAndValues.ttcn:0->../ttcn/LibItsHttp_MessageBodyTypes.ttcn:0->../ttcn/LibItsHttp_XmlMessageBodyTypes.ttcn:0 Initializing module urn_ietf_params_xml_ns_geopriv_held. +14:53:07.364311 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibItsHttp_Functions.ttcn:0->../ttcn/LibItsHttp_TypesAndValues.ttcn:0->../ttcn/LibItsHttp_MessageBodyTypes.ttcn:0->../ttcn/LibItsHttp_XmlMessageBodyTypes.ttcn:0->../ttcn/urn_ietf_params_xml_ns_geopriv_held.ttcn:0 Initializing module http_www_w3_org_XML_1998_namespace. +14:53:07.364908 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibItsHttp_Functions.ttcn:0->../ttcn/LibItsHttp_TypesAndValues.ttcn:0->../ttcn/LibItsHttp_MessageBodyTypes.ttcn:0->../ttcn/LibItsHttp_XmlMessageBodyTypes.ttcn:0->../ttcn/urn_ietf_params_xml_ns_geopriv_held.ttcn:0->../ttcn/http_www_w3_org_XML_1998_namespace.ttcn:0 Initializing module XSD. +14:53:07.365640 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibItsHttp_Functions.ttcn:0->../ttcn/LibItsHttp_TypesAndValues.ttcn:0->../ttcn/LibItsHttp_MessageBodyTypes.ttcn:0->../ttcn/LibItsHttp_XmlMessageBodyTypes.ttcn:0->../ttcn/urn_ietf_params_xml_ns_geopriv_held.ttcn:0->../ttcn/http_www_w3_org_XML_1998_namespace.ttcn:0->../ttcn/XSD.ttcn:0 Initializing module UsefulTtcn3Types. +14:53:07.365986 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibItsHttp_Functions.ttcn:0->../ttcn/LibItsHttp_TypesAndValues.ttcn:0->../ttcn/LibItsHttp_MessageBodyTypes.ttcn:0->../ttcn/LibItsHttp_XmlMessageBodyTypes.ttcn:0->../ttcn/urn_ietf_params_xml_ns_geopriv_held.ttcn:0->../ttcn/http_www_w3_org_XML_1998_namespace.ttcn:0->../ttcn/XSD.ttcn:0 Initialization of module UsefulTtcn3Types finished. +14:53:07.366548 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibItsHttp_Functions.ttcn:0->../ttcn/LibItsHttp_TypesAndValues.ttcn:0->../ttcn/LibItsHttp_MessageBodyTypes.ttcn:0->../ttcn/LibItsHttp_XmlMessageBodyTypes.ttcn:0->../ttcn/urn_ietf_params_xml_ns_geopriv_held.ttcn:0->../ttcn/http_www_w3_org_XML_1998_namespace.ttcn:0 Initialization of module XSD finished. +14:53:07.367054 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibItsHttp_Functions.ttcn:0->../ttcn/LibItsHttp_TypesAndValues.ttcn:0->../ttcn/LibItsHttp_MessageBodyTypes.ttcn:0->../ttcn/LibItsHttp_XmlMessageBodyTypes.ttcn:0->../ttcn/urn_ietf_params_xml_ns_geopriv_held.ttcn:0 Initialization of module http_www_w3_org_XML_1998_namespace finished. +14:53:07.367375 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibItsHttp_Functions.ttcn:0->../ttcn/LibItsHttp_TypesAndValues.ttcn:0->../ttcn/LibItsHttp_MessageBodyTypes.ttcn:0->../ttcn/LibItsHttp_XmlMessageBodyTypes.ttcn:0 Initialization of module urn_ietf_params_xml_ns_geopriv_held finished. +14:53:07.367630 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibItsHttp_Functions.ttcn:0->../ttcn/LibItsHttp_TypesAndValues.ttcn:0->../ttcn/LibItsHttp_MessageBodyTypes.ttcn:0->../ttcn/LibItsHttp_XmlMessageBodyTypes.ttcn:0 Initializing module urn_ietf_params_xml_ns_lost1. +14:53:07.368080 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibItsHttp_Functions.ttcn:0->../ttcn/LibItsHttp_TypesAndValues.ttcn:0->../ttcn/LibItsHttp_MessageBodyTypes.ttcn:0->../ttcn/LibItsHttp_XmlMessageBodyTypes.ttcn:0 Initialization of module urn_ietf_params_xml_ns_lost1 finished. +14:53:07.368589 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibItsHttp_Functions.ttcn:0->../ttcn/LibItsHttp_TypesAndValues.ttcn:0->../ttcn/LibItsHttp_MessageBodyTypes.ttcn:0 Initialization of module LibItsHttp_XmlMessageBodyTypes finished. +14:53:07.368932 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibItsHttp_Functions.ttcn:0->../ttcn/LibItsHttp_TypesAndValues.ttcn:0->../ttcn/LibItsHttp_MessageBodyTypes.ttcn:0 Initializing module LibItsHttp_BinaryMessageBodyTypes. +14:53:07.369414 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibItsHttp_Functions.ttcn:0->../ttcn/LibItsHttp_TypesAndValues.ttcn:0->../ttcn/LibItsHttp_MessageBodyTypes.ttcn:0 Initialization of module LibItsHttp_BinaryMessageBodyTypes finished. +14:53:07.369742 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibItsHttp_Functions.ttcn:0->../ttcn/LibItsHttp_TypesAndValues.ttcn:0 Initialization of module LibItsHttp_MessageBodyTypes finished. +14:53:07.370097 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibItsHttp_Functions.ttcn:0 Initialization of module LibItsHttp_TypesAndValues finished. +14:53:07.370703 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibItsHttp_Functions.ttcn:0 Initializing module LibItsHttp_Pics. +14:53:07.371018 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibItsHttp_Functions.ttcn:0 Initialization of module LibItsHttp_Pics finished. +14:53:07.371252 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0 Initialization of module LibItsHttp_Functions finished. +14:53:07.371500 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0 Initializing module LibNg112_Templates. +14:53:07.371670 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0 Initialization of module LibNg112_Templates finished. +14:53:07.372371 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0 Initializing module LibNg112_Functions. +14:53:07.372636 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0 Initializing module LibItsHttp_Templates. +14:53:07.372948 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0 Initialization of module LibItsHttp_Templates finished. +14:53:07.373442 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0 Initializing module LibItsHttp_XmlTemplates. +14:53:07.373652 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibItsHttp_XmlTemplates.ttcn:0 Initializing module urn_ietf_params_xml_ns_geopriv_held_id. +14:53:07.373885 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibItsHttp_XmlTemplates.ttcn:0 Initialization of module urn_ietf_params_xml_ns_geopriv_held_id finished. +14:53:07.374336 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibItsHttp_XmlTemplates.ttcn:0 Initializing module urn_ietf_params_xml_ns_pidf_geopriv10. +14:53:07.374824 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibItsHttp_XmlTemplates.ttcn:0->../ttcn/urn_ietf_params_xml_ns_pidf_geopriv10.ttcn:0 Initializing module urn_ietf_params_xml_ns_pidf_geopriv10_basicPolicy. +14:53:07.375115 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibItsHttp_XmlTemplates.ttcn:0->../ttcn/urn_ietf_params_xml_ns_pidf_geopriv10.ttcn:0 Initialization of module urn_ietf_params_xml_ns_pidf_geopriv10_basicPolicy finished. +14:53:07.375723 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibItsHttp_XmlTemplates.ttcn:0 Initialization of module urn_ietf_params_xml_ns_pidf_geopriv10 finished. +14:53:07.376318 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibItsHttp_XmlTemplates.ttcn:0 Initializing module urn_ietf_params_xml_ns_pidf_geopriv10_civicLoc. +14:53:07.376695 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibItsHttp_XmlTemplates.ttcn:0 Initialization of module urn_ietf_params_xml_ns_pidf_geopriv10_civicLoc finished. +14:53:07.377345 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibItsHttp_XmlTemplates.ttcn:0 Initializing module urn_ietf_params_xml_ns_pidf. +14:53:07.377602 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibItsHttp_XmlTemplates.ttcn:0 Initialization of module urn_ietf_params_xml_ns_pidf finished. +14:53:07.378100 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibItsHttp_XmlTemplates.ttcn:0 Initializing module http_www_opengis_net_pidflo_1_0. +14:53:07.378419 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibItsHttp_XmlTemplates.ttcn:0->../ttcn/http_www_opengis_net_pidflo_1_0.ttcn:0 Initializing module http_www_opengis_net_gml. +14:53:07.378855 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibItsHttp_XmlTemplates.ttcn:0->../ttcn/http_www_opengis_net_pidflo_1_0.ttcn:0 Initialization of module http_www_opengis_net_gml finished. +14:53:07.379135 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibItsHttp_XmlTemplates.ttcn:0 Initialization of module http_www_opengis_net_pidflo_1_0 finished. +14:53:07.379652 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0 Initialization of module LibItsHttp_XmlTemplates finished. +14:53:07.380562 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0 Initializing module LibNg112_TypesAndValues. +14:53:07.380901 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0 Initialization of module LibNg112_TypesAndValues finished. +14:53:07.381322 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0 Initializing module LibNg112_TestSystem. +14:53:07.381555 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0 Initializing module LibItsHttp_TestSystem. +14:53:07.382090 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibItsHttp_TestSystem.ttcn:0 Initializing module LibCommon_Sync. +14:53:07.382849 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibItsHttp_TestSystem.ttcn:0->../ttcn/LibCommon_Sync.ttcn:0 Initializing module LibCommon_AbstractData. +14:53:07.383248 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibItsHttp_TestSystem.ttcn:0->../ttcn/LibCommon_Sync.ttcn:0->../ttcn/LibCommon_AbstractData.ttcn:0 Initializing module LibCommon_BasicTypesAndValues. +14:53:07.384141 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibItsHttp_TestSystem.ttcn:0->../ttcn/LibCommon_Sync.ttcn:0->../ttcn/LibCommon_AbstractData.ttcn:0 Initialization of module LibCommon_BasicTypesAndValues finished. +14:53:07.384576 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibItsHttp_TestSystem.ttcn:0->../ttcn/LibCommon_Sync.ttcn:0 Initialization of module LibCommon_AbstractData finished. +14:53:07.385100 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibItsHttp_TestSystem.ttcn:0->../ttcn/LibCommon_Sync.ttcn:0 Initializing module LibCommon_VerdictControl. +14:53:07.385458 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibItsHttp_TestSystem.ttcn:0->../ttcn/LibCommon_Sync.ttcn:0 Initialization of module LibCommon_VerdictControl finished. +14:53:07.386087 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibItsHttp_TestSystem.ttcn:0 Initialization of module LibCommon_Sync finished. +14:53:07.386575 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibItsHttp_TestSystem.ttcn:0 Initializing module LibCommon_Time. +14:53:07.386934 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibItsHttp_TestSystem.ttcn:0 Initialization of module LibCommon_Time finished. +14:53:07.387213 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0 Initialization of module LibItsHttp_TestSystem finished. +14:53:07.387445 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0 Initializing module LibSip_Interface. +14:53:07.387698 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0 Initializing module LibSip_SIPTypesAndValues. +14:53:07.387942 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0 Initializing module LibSip_MessageBodyTypes. +14:53:07.388209 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0 Initializing module LibSip_SDPTypes. +14:53:07.388510 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0->../ttcn/LibSip_SDPTypes.ttcn:0 Initializing module LibSip_Common. +14:53:07.388805 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0->../ttcn/LibSip_SDPTypes.ttcn:0 Initialization of module LibSip_Common finished. +14:53:07.389062 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0 Initialization of module LibSip_SDPTypes finished. +14:53:07.389390 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0 Initializing module LibSip_SimpleMsgSummaryTypes. +14:53:07.389693 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0 Initialization of module LibSip_SimpleMsgSummaryTypes finished. +14:53:07.390005 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0 Initializing module LibSip_XMLTypes. +14:53:07.390340 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0->../ttcn/LibSip_XMLTypes.ttcn:0 Initializing module urn_ietf_params_xml_ns_resource_lists. +14:53:07.390613 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0->../ttcn/LibSip_XMLTypes.ttcn:0 Initialization of module urn_ietf_params_xml_ns_resource_lists finished. +14:53:07.392369 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0->../ttcn/LibSip_XMLTypes.ttcn:0 Initializing module http_uri_etsi_org_ngn_params_xml_simservs_xcap. +14:53:07.392631 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0->../ttcn/LibSip_XMLTypes.ttcn:0->../ttcn/http_uri_etsi_org_ngn_params_xml_simservs_xcap.ttcn:0 Initializing module urn_ietf_params_xml_ns_common_policy. +14:53:07.392950 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0->../ttcn/LibSip_XMLTypes.ttcn:0->../ttcn/http_uri_etsi_org_ngn_params_xml_simservs_xcap.ttcn:0 Initialization of module urn_ietf_params_xml_ns_common_policy finished. +14:53:07.393346 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0->../ttcn/LibSip_XMLTypes.ttcn:0->../ttcn/http_uri_etsi_org_ngn_params_xml_simservs_xcap.ttcn:0 Initializing module urn_oma_xml_xdm_common_policy. +14:53:07.393681 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0->../ttcn/LibSip_XMLTypes.ttcn:0->../ttcn/http_uri_etsi_org_ngn_params_xml_simservs_xcap.ttcn:0 Initialization of module urn_oma_xml_xdm_common_policy finished. +14:53:07.393989 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0->../ttcn/LibSip_XMLTypes.ttcn:0 Initialization of module http_uri_etsi_org_ngn_params_xml_simservs_xcap finished. +14:53:07.394214 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0->../ttcn/LibSip_XMLTypes.ttcn:0 Initializing module http_uri_etsi_org_ngn_params_xml_simservs_mcid. +14:53:07.395093 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0->../ttcn/LibSip_XMLTypes.ttcn:0 Initialization of module http_uri_etsi_org_ngn_params_xml_simservs_mcid finished. +14:53:07.395885 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0->../ttcn/LibSip_XMLTypes.ttcn:0 Initializing module NoTargetNamespace. +14:53:07.397575 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0->../ttcn/LibSip_XMLTypes.ttcn:0 Initialization of module NoTargetNamespace finished. +14:53:07.398762 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0->../ttcn/LibSip_XMLTypes.ttcn:0 Initializing module urn_3gpp_ns_cw_1_0. +14:53:07.399210 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0->../ttcn/LibSip_XMLTypes.ttcn:0 Initialization of module urn_3gpp_ns_cw_1_0 finished. +14:53:07.399715 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0->../ttcn/LibSip_XMLTypes.ttcn:0 Initializing module urn_ietf_params_xml_ns_conference_info. +14:53:07.400141 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0->../ttcn/LibSip_XMLTypes.ttcn:0 Initialization of module urn_ietf_params_xml_ns_conference_info finished. +14:53:07.400894 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0->../ttcn/LibSip_XMLTypes.ttcn:0 Initializing module http_uri_etsi_org_ngn_params_xml_simservs_pstn. +14:53:07.401409 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0->../ttcn/LibSip_XMLTypes.ttcn:0 Initialization of module http_uri_etsi_org_ngn_params_xml_simservs_pstn finished. +14:53:07.402115 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0->../ttcn/LibSip_XMLTypes.ttcn:0 Initializing module http_uri_etsi_org_ngn_params_xml_comm_div_info. +14:53:07.402847 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0->../ttcn/LibSip_XMLTypes.ttcn:0 Initialization of module http_uri_etsi_org_ngn_params_xml_comm_div_info finished. +14:53:07.403409 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0->../ttcn/LibSip_XMLTypes.ttcn:0 Initializing module urn_ietf_params_xml_ns_reginfo. +14:53:07.403714 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0->../ttcn/LibSip_XMLTypes.ttcn:0 Initialization of module urn_ietf_params_xml_ns_reginfo finished. +14:53:07.404154 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0 Initialization of module LibSip_XMLTypes finished. +14:53:07.404733 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0 Initialization of module LibSip_MessageBodyTypes finished. +14:53:07.405370 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0 Initialization of module LibSip_SIPTypesAndValues finished. +14:53:07.405667 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0 Initializing module LibSip_PIXITS. +14:53:07.406129 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_PIXITS.ttcn:0 Initializing module LibCommon_DataStrings. +14:53:07.406434 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_PIXITS.ttcn:0 Initialization of module LibCommon_DataStrings finished. +14:53:07.406885 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0 Initialization of module LibSip_PIXITS finished. +14:53:07.413386 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0 Initialization of module LibSip_Interface finished. +14:53:07.413860 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0 Initialization of module LibNg112_TestSystem finished. +14:53:07.417463 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0 Initialization of module LibNg112_Functions finished. +14:53:07.418014 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0 Initializing module LibNg112_Pics. +14:53:07.418489 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0 Initialization of module LibNg112_Pics finished. +14:53:07.418722 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0 Initializing module LibNg112_Pixits. +14:53:07.419145 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0 Initialization of module LibNg112_Pixits finished. +14:53:07.419406 hc EXECUTOR - Initialization of module AtsNg112_TestCases finished. +14:53:07.419789 hc EXECUTOR - Initializing module AtsNg112_TestControl. +14:53:07.420063 hc EXECUTOR - Initialization of module AtsNg112_TestControl finished. +14:53:07.420323 hc EXECUTOR - Initializing module LibCommon_TextStrings. +14:53:07.420802 hc EXECUTOR - Initialization of module LibCommon_TextStrings finished. +14:53:07.421246 hc EXECUTOR - Initializing module LibItsHttp_BinaryTemplates. +14:53:07.421545 hc EXECUTOR - Initialization of module LibItsHttp_BinaryTemplates finished. +14:53:07.421885 hc EXECUTOR - Initializing module LibItsHttp_BinaryTypes. +14:53:07.422170 hc EXECUTOR - Initialization of module LibItsHttp_BinaryTypes finished. +14:53:07.422645 hc EXECUTOR - Initializing module LibItsHttp_EncdecDeclarations. +14:53:07.422917 hc EXECUTOR - Initialization of module LibItsHttp_EncdecDeclarations finished. +14:53:07.429428 hc EXECUTOR - Initializing module LibNg112_EncdecDeclarations. +14:53:07.430093 hc EXECUTOR ../ttcn/LibNg112_EncdecDeclarations.ttcn:0 Initializing module urn_ietf_params_xml_ns_pidf_geopriv10_geoShape. +14:53:07.430721 hc EXECUTOR ../ttcn/LibNg112_EncdecDeclarations.ttcn:0 Initialization of module urn_ietf_params_xml_ns_pidf_geopriv10_geoShape finished. +14:53:07.431057 hc EXECUTOR - Initialization of module LibNg112_EncdecDeclarations finished. +14:53:07.431329 hc EXECUTOR - Initializing module LibSip_EncdecDeclarations. +14:53:07.431606 hc EXECUTOR ../ttcn/LibSip_EncdecDeclarations.ttcn:0 Initializing module LibSip_SMSTypesAndValues. +14:53:07.432060 hc EXECUTOR ../ttcn/LibSip_EncdecDeclarations.ttcn:0 Initialization of module LibSip_SMSTypesAndValues finished. +14:53:07.432346 hc EXECUTOR - Initialization of module LibSip_EncdecDeclarations finished. +14:53:07.432602 hc EXECUTOR - Initializing module LibSip_Library. +14:53:07.432851 hc EXECUTOR ../ttcn/LibSip_Library.ttcn:0 Initializing module LibSip_SMSTemplates. +14:53:07.434067 hc EXECUTOR ../ttcn/LibSip_Library.ttcn:0->../ttcn/LibSip_SMSTemplates.ttcn:0 Initializing module LibSip_SMSFunctions. +14:53:07.434550 hc EXECUTOR ../ttcn/LibSip_Library.ttcn:0->../ttcn/LibSip_SMSTemplates.ttcn:0 Initialization of module LibSip_SMSFunctions finished. +14:53:07.454866 hc EXECUTOR ../ttcn/LibSip_Library.ttcn:0 Initialization of module LibSip_SMSTemplates finished. +14:53:07.461369 hc EXECUTOR ../ttcn/LibSip_Library.ttcn:0 Initializing module LibSip_Steps. +14:53:07.462318 hc EXECUTOR ../ttcn/LibSip_Library.ttcn:0->../ttcn/LibSip_Steps.ttcn:0 Initializing module LibSip_Templates. +14:53:07.488340 hc EXECUTOR ../ttcn/LibSip_Library.ttcn:0->../ttcn/LibSip_Steps.ttcn:0 Initialization of module LibSip_Templates finished. +14:53:07.489256 hc EXECUTOR ../ttcn/LibSip_Library.ttcn:0 Initialization of module LibSip_Steps finished. +14:53:07.489774 hc EXECUTOR - Initialization of module LibSip_Library finished. +14:53:07.490586 hc EXECUTOR - Initializing module PreGenRecordOf. +14:53:07.490838 hc EXECUTOR - Initialization of module PreGenRecordOf finished. +14:53:07.491127 hc EXECUTOR - Initializing module TitanLoggerApi. +14:53:07.491683 hc EXECUTOR - Initialization of module TitanLoggerApi finished. +14:53:07.492194 hc EXECUTOR - Initializing module urn_ietf_params_xml_ns_geopriv_conf. +14:53:07.492714 hc EXECUTOR - Initialization of module urn_ietf_params_xml_ns_geopriv_conf finished. +14:53:07.493687 hc EXECUTOR - Configuration data was processed successfully. +14:53:07.496327 hc EXECUTOR - MTC was created. Process id: 10284. +14:53:07.499777 mtc EXECUTOR - TTCN-3 Main Test Component started on vagrant. Version: CRL 113 200/6 R4A. +14:53:07.500083 mtc EXECUTOR - TTCN Logger v2.2 options: TimeStampFormat:=Time; LogEntityName:=Yes; LogEventTypes:=Yes; SourceInfoFormat:=Stack; *.FileMask:=LOG_ALL | MATCHING | DEBUG; *.ConsoleMask:=LOG_ALL | MATCHING | DEBUG; LogFileSize:=0; LogFileNumber:=1; DiskFullAction:=Error +14:53:07.500328 mtc EXECUTOR - Connected to MC. +14:53:07.501034 mtc EXECUTOR - Executing test case TC_LIS_HTTP_POST_BV_01 in module AtsNg112_TestCases. +14:53:07.501512 mtc TESTCASE ../ttcn/AtsNg112_TestCases.ttcn:107(testcase:TC_LIS_HTTP_POST_BV_01) Test case TC_LIS_HTTP_POST_BV_01 started. +14:53:07.501945 mtc PARALLEL ../ttcn/AtsNg112_TestCases.ttcn:107(testcase:TC_LIS_HTTP_POST_BV_01) Initializing variables, timers and ports of component type LibItsHttp_TestSystem.HttpComponent inside testcase TC_LIS_HTTP_POST_BV_01. +14:53:07.502618 mtc PORTEVENT ../ttcn/AtsNg112_TestCases.ttcn:107(testcase:TC_LIS_HTTP_POST_BV_01) Port syncPort was started. +14:53:07.502938 mtc PORTEVENT ../ttcn/AtsNg112_TestCases.ttcn:107(testcase:TC_LIS_HTTP_POST_BV_01) Port syncSendPort was started. +14:53:07.503361 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:107(testcase:TC_LIS_HTTP_POST_BV_01) >>> HttpPort::user_start +14:53:07.503848 mtc PORTEVENT ../ttcn/AtsNg112_TestCases.ttcn:107(testcase:TC_LIS_HTTP_POST_BV_01) Port httpPort was started. +14:53:07.504177 mtc PARALLEL ../ttcn/AtsNg112_TestCases.ttcn:107(testcase:TC_LIS_HTTP_POST_BV_01) Component type LibItsHttp_TestSystem.HttpComponent was initialized. +14:53:07.504621 mtc PARALLEL ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Mapping port mtc:httpPort to system:httpPort. +14:53:07.505271 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) HttpPort::set_parameter: params=HTTP(codecs=lost:lost_codec;held:held_codec)/TCP(debug=1,server=location-information-service.azurewebsites.net,port=80,use_ssl=0) +14:53:07.505955 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) >>> HttpPort::user_map: httpPort +14:53:07.506422 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) HttpPort::user_map: HTTP(codecs=lost:lost_codec;held:held_codec)/TCP(debug=1,server=location-information-service.azurewebsites.net,port=80,use_ssl=0) +14:53:07.507167 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) >>> params::convert: HTTP(codecs=lost:lost_codec;held:held_codec)/TCP(debug=1,server=location-information-service.azurewebsites.net,port=80,use_ssl=0) +14:53:07.510497 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) params::convert: 4 - codecs=lost:lost_codec;held:held_codec)/TCP(debug=1, - codecs - lost:lost_codec;held:held_codec)/TCP(debug=1 - , +14:53:07.511552 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) params::convert: 4 - server=location-information-service.azurewebsites.net, - server - location-information-service.azurewebsites.net - , +14:53:07.511948 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) params::convert: 4 - port=80, - port - 80 - , +14:53:07.512432 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) params::convert: 4 - use_ssl=0) - use_ssl - 0) - +14:53:07.513427 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) <<< params::convert +14:53:07.514183 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) >>> layer_stack_builder::create_layer_stack: HTTP(codecs=lost:lost_codec;held:held_codec)/TCP(debug=1,server=location-information-service.azurewebsites.net,port=80,use_ssl=0) +14:53:07.517357 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) layer_stack_builder::create_layer_stack: 5 - HTTP(codecs=lost:lost_codec;held:held_codec)/ - HTTP - (codecs=lost:lost_codec;held:held_codec) - codecs=lost:lost_codec;held:held_codec +14:53:07.518144 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) layer_stack_builder::create_layer_stack: Create layer HTTP, codecs=lost:lost_codec;held:held_codec +14:53:07.518888 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) >>> http_layer::http_layer: HTTP, codecs=lost:lost_codec;held:held_codec +14:53:07.519227 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) >>> params::convert: codecs=lost:lost_codec;held:held_codec +14:53:07.522032 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) params::convert: 4 - codecs=lost:lost_codec;held:held_codec - codecs - lost:lost_codec;held:held_codec - +14:53:07.523128 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) <<< params::convert +14:53:07.523481 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) >>> http_codec::set_payload_codecs: lost:lost_codec;held:held_codec +14:53:07.531731 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) http_codec::set_payload_codecs: 6 - lost - lost_codec - ;held:held_codec - held - held_codec - - - +14:53:07.532433 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) http_codec::set_payload_codecs: insert (lost, lost_codec), j = 1 +14:53:07.533225 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) http_codec::set_payload_codecs: insert (held, held_codec), j = 4 +14:53:07.533855 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) layer_stack_builder::create_layer_stack: Setup layers for HTTP +14:53:07.534630 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) layer_stack_builder::create_layer_stack: 5 - TCP(debug=1,server=location-information-service.azurewebsites.net,port=80,use_ssl=0) - TCP - (debug=1,server=location-information-service.azurewebsites.net,port=80,use_ssl=0) - debug=1,server=location-information-service.azurewebsites.net,port=80,use_ssl=0 +14:53:07.535329 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) layer_stack_builder::create_layer_stack: Create layer TCP, debug=1,server=location-information-service.azurewebsites.net,port=80,use_ssl=0 +14:53:07.535929 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) >>> tcp_layer::tcp_layer: TCP, debug=1,server=location-information-service.azurewebsites.net,port=80,use_ssl=0 +14:53:07.536604 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) >>> params::convert: debug=1,server=location-information-service.azurewebsites.net,port=80,use_ssl=0 +14:53:07.539517 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) params::convert: 4 - debug=1, - debug - 1 - , +14:53:07.540499 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) params::convert: 4 - server=location-information-service.azurewebsites.net, - server - location-information-service.azurewebsites.net - , +14:53:07.541249 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) params::convert: 4 - port=80, - port - 80 - , +14:53:07.541880 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) params::convert: 4 - use_ssl=0 - use_ssl - 0 - +14:53:07.542474 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) <<< params::convert +14:53:07.542990 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) params::log +14:53:07.543502 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) (debug, 1) +14:53:07.543926 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) (port, 80) +14:53:07.544487 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) (server, location-information-service.azurewebsites.net) +14:53:07.545009 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) (use_ssl, 0) +14:53:07.545971 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: entering SSL_Socket::parameter_set(server, location-information-service.azurewebsites.net) +14:53:07.546513 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: leaving SSL_Socket::parameter_set(server, location-information-service.azurewebsites.net) +14:53:07.548385 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: entering Abstract_Socket::parameter_set(server, location-information-service.azurewebsites.net) +14:53:07.549745 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: leaving Abstract_Socket::parameter_set(server, location-information-service.azurewebsites.net) +14:53:07.550222 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: entering SSL_Socket::parameter_set(port, 80) +14:53:07.550611 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: leaving SSL_Socket::parameter_set(port, 80) +14:53:07.551100 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: entering Abstract_Socket::parameter_set(port, 80) +14:53:07.551522 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: leaving Abstract_Socket::parameter_set(port, 80) +14:53:07.551817 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: entering SSL_Socket::parameter_set(use_connection_ASPs, yes) +14:53:07.552081 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: leaving SSL_Socket::parameter_set(use_connection_ASPs, yes) +14:53:07.552966 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: entering Abstract_Socket::parameter_set(use_connection_ASPs, yes) +14:53:07.553804 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: leaving Abstract_Socket::parameter_set(use_connection_ASPs, yes) +14:53:07.554155 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: entering SSL_Socket::parameter_set(server_backlog, 1024) +14:53:07.554874 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: leaving SSL_Socket::parameter_set(server_backlog, 1024) +14:53:07.555521 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: entering Abstract_Socket::parameter_set(server_backlog, 1024) +14:53:07.555876 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: leaving Abstract_Socket::parameter_set(server_backlog, 1024) +14:53:07.556625 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: entering Abstract_Socket::map_user() +14:53:07.556993 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: leaving Abstract_Socket::map_user() +14:53:07.557333 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: Abstract_Socket::open_client_connection(remoteAddr: location-information-service.azurewebsites.net/80, localAddr: UNSPEC/UNSPEC) called +14:53:07.741217 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: Number of remote addresses: 1 + +14:53:07.743126 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: Using address family for socket 6: IPv4 +14:53:07.746039 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: Connecting to server from address UNSPEC/UNSPEC +14:53:07.806514 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: Connection established (addr): 10.0.2.15/55332 -> location-information-service.azurewebsites.net/80 + +14:53:07.809612 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: connected to: host location-information-service.azurewebsites.net service 80 via address family IPv4 + +14:53:07.811083 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: Abstract_Socket::peer_list_add_peer: Adding client 6 to peer list +14:53:07.813065 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: Abstract_Socket::peer_list_get_last_peer: Finding last peer of the peer array +14:53:07.815671 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: Abstract_Socket::peer_list_get_last_peer: No active peer found +14:53:07.816762 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: Abstract_Socket::peer_list_resize_list: Resizing to 7 +14:53:07.818461 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: Abstract_Socket::peer_list_resize_list: New length is 7 +14:53:07.819492 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: Abstract_Socket::open_client_connection(). Handler set to socket fd 6 +14:53:07.819982 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) >>> tcp_layer::add_user_data: 6 +14:53:07.820356 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) tcp_layer::add_user_data: Non secured mode +14:53:07.820606 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) >>> tcp_layer::client_connection_opened: 6 +14:53:07.820897 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) layer_stack_builder::create_layer_stack: Setup layers for TCP +14:53:07.821425 mtc PORTEVENT ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Port httpPort was mapped to system:httpPort. +14:53:07.821775 mtc PARALLEL ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Map operation of mtc:httpPort to system:httpPort finished. +14:53:07.822227 mtc PARALLEL ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:26(function:f_cf_01_http_up)->../ttcn/LibCommon_Sync.ttcn:197(function:f_connect4SelfOrClientSync)->../ttcn/LibCommon_Sync.ttcn:1090(function:f_connect4SelfSync) Connecting ports mtc:syncSendPort and mtc:syncPort. +14:53:07.822970 mtc PORTEVENT ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:26(function:f_cf_01_http_up)->../ttcn/LibCommon_Sync.ttcn:197(function:f_connect4SelfOrClientSync)->../ttcn/LibCommon_Sync.ttcn:1090(function:f_connect4SelfSync) Port syncPort has established the connection with local port syncSendPort. +14:53:07.823592 mtc PORTEVENT ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:26(function:f_cf_01_http_up)->../ttcn/LibCommon_Sync.ttcn:197(function:f_connect4SelfOrClientSync)->../ttcn/LibCommon_Sync.ttcn:1090(function:f_connect4SelfSync) Port syncSendPort has established the connection with local port syncPort. +14:53:07.823965 mtc PARALLEL ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:26(function:f_cf_01_http_up)->../ttcn/LibCommon_Sync.ttcn:197(function:f_connect4SelfOrClientSync)->../ttcn/LibCommon_Sync.ttcn:1090(function:f_connect4SelfSync) Connect operation on mtc:syncSendPort and mtc:syncPort finished. +14:53:07.824497 mtc DEFAULTOP ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:28(function:f_cf_01_http_up) Altstep a_cf_01_http_down was activated as default, id 1 +14:53:07.824912 mtc DEFAULTOP ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:29(function:f_cf_01_http_up) Altstep a_default_requests was activated as default, id 2 +14:53:07.825706 mtc DEFAULTOP ../ttcn/AtsNg112_TestCases.ttcn:122(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:30(function:f_cf_01_http_up) Altstep a_default_responses was activated as default, id 3 +14:53:07.827422 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:129(testcase:TC_LIS_HTTP_POST_BV_01) Warning: No UTF-8 Byte Order Mark(BOM) detected. It may result decoding errors +14:53:07.830270 mtc PORTEVENT ../ttcn/AtsNg112_TestCases.ttcn:129(testcase:TC_LIS_HTTP_POST_BV_01) Sent on httpPort to system @LibItsHttp_TypesAndValues.HttpMessage : { + request := { + method := "POST", + uri := "/api/held", + version_major := 1, + version_minor := 1, + header := { + { + header_name := "Host", + header_value := { + "location-information-service.azurewebsites.net" + } + }, + { + header_name := "Content-type", + header_value := { + "application/held+xml;charset=utf-8" + } + }, + { + header_name := "Content-length", + header_value := { + "0" + } + }, + { + header_name := "Connection", + header_value := { + "keep-alive" + } + }, + { + header_name := "Pragma", + header_value := { + "no-cache" + } + }, + { + header_name := "Cache-Control", + header_value := { + "no-cache" + } + } + }, + body := { + xml_body := { + locationRequest := { + responseTime := omit, + attr := omit, + locationType := { + exact := true, + base := { + alt_1 := { + geodetic (1) + } + } + }, + elem_list := { + " + +331234567890 + + +" + } + } + } + } + } +} +14:53:07.831695 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:129(testcase:TC_LIS_HTTP_POST_BV_01) >>> HttpPort::outgoing_send: payload={ + request := { + method := "POST", + uri := "/api/held", + version_major := 1, + version_minor := 1, + header := { + { + header_name := "Host", + header_value := { + "location-information-service.azurewebsites.net" + } + }, + { + header_name := "Content-type", + header_value := { + "application/held+xml;charset=utf-8" + } + }, + { + header_name := "Content-length", + header_value := { + "0" + } + }, + { + header_name := "Connection", + header_value := { + "keep-alive" + } + }, + { + header_name := "Pragma", + header_value := { + "no-cache" + } + }, + { + header_name := "Cache-Control", + header_value := { + "no-cache" + } + } + }, + body := { + xml_body := { + locationRequest := { + responseTime := omit, + attr := omit, + locationType := { + exact := true, + base := { + alt_1 := { + geodetic (1) + } + } + }, + elem_list := { + " + +331234567890 + + +" + } + } + } + } + } +} +14:53:07.833060 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:129(testcase:TC_LIS_HTTP_POST_BV_01) >>> http_layer::sendMsg: { + request := { + method := "POST", + uri := "/api/held", + version_major := 1, + version_minor := 1, + header := { + { + header_name := "Host", + header_value := { + "location-information-service.azurewebsites.net" + } + }, + { + header_name := "Content-type", + header_value := { + "application/held+xml;charset=utf-8" + } + }, + { + header_name := "Content-length", + header_value := { + "0" + } + }, + { + header_name := "Connection", + header_value := { + "keep-alive" + } + }, + { + header_name := "Pragma", + header_value := { + "no-cache" + } + }, + { + header_name := "Cache-Control", + header_value := { + "no-cache" + } + } + }, + body := { + xml_body := { + locationRequest := { + responseTime := omit, + attr := omit, + locationType := { + exact := true, + base := { + alt_1 := { + geodetic (1) + } + } + }, + elem_list := { + " + +331234567890 + + +" + } + } + } + } + } +} +14:53:07.835130 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:129(testcase:TC_LIS_HTTP_POST_BV_01) >>> http_codec::encode: { + request := { + method := "POST", + uri := "/api/held", + version_major := 1, + version_minor := 1, + header := { + { + header_name := "Host", + header_value := { + "location-information-service.azurewebsites.net" + } + }, + { + header_name := "Content-type", + header_value := { + "application/held+xml;charset=utf-8" + } + }, + { + header_name := "Content-length", + header_value := { + "0" + } + }, + { + header_name := "Connection", + header_value := { + "keep-alive" + } + }, + { + header_name := "Pragma", + header_value := { + "no-cache" + } + }, + { + header_name := "Cache-Control", + header_value := { + "no-cache" + } + } + }, + body := { + xml_body := { + locationRequest := { + responseTime := omit, + attr := omit, + locationType := { + exact := true, + base := { + alt_1 := { + geodetic (1) + } + } + }, + elem_list := { + " + +331234567890 + + +" + } + } + } + } + } +} +14:53:07.836542 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:129(testcase:TC_LIS_HTTP_POST_BV_01) >>> http_codec::encode_request: { + method := "POST", + uri := "/api/held", + version_major := 1, + version_minor := 1, + header := { + { + header_name := "Host", + header_value := { + "location-information-service.azurewebsites.net" + } + }, + { + header_name := "Content-type", + header_value := { + "application/held+xml;charset=utf-8" + } + }, + { + header_name := "Content-length", + header_value := { + "0" + } + }, + { + header_name := "Connection", + header_value := { + "keep-alive" + } + }, + { + header_name := "Pragma", + header_value := { + "no-cache" + } + }, + { + header_name := "Cache-Control", + header_value := { + "no-cache" + } + } + }, + body := { + xml_body := { + locationRequest := { + responseTime := omit, + attr := omit, + locationType := { + exact := true, + base := { + alt_1 := { + geodetic (1) + } + } + }, + elem_list := { + " + +331234567890 + + +" + } + } + } + } +} +14:53:07.838013 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:129(testcase:TC_LIS_HTTP_POST_BV_01) http_codec::encode_request: body: { + xml_body := { + locationRequest := { + responseTime := omit, + attr := omit, + locationType := { + exact := true, + base := { + alt_1 := { + geodetic (1) + } + } + }, + elem_list := { + " + +331234567890 + + +" + } + } + } +} +14:53:07.838654 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:129(testcase:TC_LIS_HTTP_POST_BV_01) >>> http_codec::encode_body: { + xml_body := { + locationRequest := { + responseTime := omit, + attr := omit, + locationType := { + exact := true, + base := { + alt_1 := { + geodetic (1) + } + } + }, + elem_list := { + " + +331234567890 + + +" + } + } + } +} +14:53:07.839617 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:129(testcase:TC_LIS_HTTP_POST_BV_01) http_codec::encode_body: # of codecs=2 +14:53:07.840309 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:129(testcase:TC_LIS_HTTP_POST_BV_01) http_codec::encode_body: Call 'held_codec' +14:53:07.842679 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:129(testcase:TC_LIS_HTTP_POST_BV_01) >>> held_codec::encode: { + locationRequest := { + responseTime := omit, + attr := omit, + locationType := { + exact := true, + base := { + alt_1 := { + geodetic (1) + } + } + }, + elem_list := { + " + +331234567890 + + +" + } + } +} +14:53:07.843188 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:129(testcase:TC_LIS_HTTP_POST_BV_01) held_codec::encode: Process LocationRequestType{ + responseTime := omit, + attr := omit, + locationType := { + exact := true, + base := { + alt_1 := { + geodetic (1) + } + } + }, + elem_list := { + " + +331234567890 + + +" + } +} +14:53:07.844246 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:129(testcase:TC_LIS_HTTP_POST_BV_01) held_codec::decode: After encoding: '3C68656C643A6C6F636174696F6E5265717565737420786D6C6E733A68656C643D2775726E3A696574663A706172616D733A786D6C3A6E733A67656F707269763A68656C64273E0A093C68656C643A6C6F636174696F6E547970652065786163743D2774727565273E67656F64657469633C2F68656C643A6C6F636174696F6E547970653E0A093C69643A64657669636520786D6C6E733A69643D2775726E3A696574663A706172616D733A786D6C3A6E733A67656F707269763A68656C643A6964273E0A093C7572693E2B3333313233343536373839303C2F7572693E0A3C2F69643A6465766963653E0A0A0A3C2F68656C643A6C6F636174696F6E526571756573743E0A0A'O (" + geodetic + + +331234567890 + + + + + +") +14:53:07.851913 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:129(testcase:TC_LIS_HTTP_POST_BV_01) <<< held_codec::encode +14:53:07.852234 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:129(testcase:TC_LIS_HTTP_POST_BV_01) http_codec::encode_body: HTTP message '3C68656C643A6C6F636174696F6E5265717565737420786D6C6E733A68656C643D2775726E3A696574663A706172616D733A786D6C3A6E733A67656F707269763A68656C64273E0A093C68656C643A6C6F636174696F6E547970652065786163743D2774727565273E67656F64657469633C2F68656C643A6C6F636174696F6E547970653E0A093C69643A64657669636520786D6C6E733A69643D2775726E3A696574663A706172616D733A786D6C3A6E733A67656F707269763A68656C643A6964273E0A093C7572693E2B3333313233343536373839303C2F7572693E0A3C2F69643A6465766963653E0A0A0A3C2F68656C643A6C6F636174696F6E526571756573743E0A0A'O (" + geodetic + + +331234567890 + + + + + +") +14:53:07.858449 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:129(testcase:TC_LIS_HTTP_POST_BV_01) http_codec::encode_body: HTTP message length: 263 +14:53:07.858704 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:129(testcase:TC_LIS_HTTP_POST_BV_01) http_codec::encode_request: length=263 +14:53:07.859312 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:129(testcase:TC_LIS_HTTP_POST_BV_01) http_codec::encode_request: Processing header "Host" +14:53:07.859735 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:129(testcase:TC_LIS_HTTP_POST_BV_01) http_codec::encode_request: Processing value "location-information-service.azurewebsites.net" +14:53:07.860137 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:129(testcase:TC_LIS_HTTP_POST_BV_01) http_codec::encode_request: Processing header "Content-type" +14:53:07.860459 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:129(testcase:TC_LIS_HTTP_POST_BV_01) http_codec::encode_request: Processing value "application/held+xml;charset=utf-8" +14:53:07.861067 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:129(testcase:TC_LIS_HTTP_POST_BV_01) http_codec::encode_request: Processing header "Content-length" +14:53:07.861453 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:129(testcase:TC_LIS_HTTP_POST_BV_01) http_codec::encode_request: Processing header "Connection" +14:53:07.861722 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:129(testcase:TC_LIS_HTTP_POST_BV_01) http_codec::encode_request: Processing value "keep-alive" +14:53:07.862268 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:129(testcase:TC_LIS_HTTP_POST_BV_01) http_codec::encode_request: Processing header "Pragma" +14:53:07.862618 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:129(testcase:TC_LIS_HTTP_POST_BV_01) http_codec::encode_request: Processing value "no-cache" +14:53:07.864039 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:129(testcase:TC_LIS_HTTP_POST_BV_01) http_codec::encode_request: Processing header "Cache-Control" +14:53:07.866951 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:129(testcase:TC_LIS_HTTP_POST_BV_01) http_codec::encode_request: Processing value "no-cache" +14:53:07.867420 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:129(testcase:TC_LIS_HTTP_POST_BV_01) <<< http_codec::encode: data='504F5354202F6170692F68656C6420485454502F312E310D0A486F73743A206C6F636174696F6E2D696E666F726D6174696F6E2D736572766963652E617A75726577656273697465732E6E65740D0A436F6E74656E742D747970653A206170706C69636174696F6E2F68656C642B786D6C3B636861727365743D7574662D380D0A436F6E74656E742D6C656E6774683A203236350D0A436F6E6E656374696F6E3A206B6565702D616C6976650D0A507261676D613A206E6F2D63616368650D0A43616368652D436F6E74726F6C3A206E6F2D63616368650D0A0D0A3C68656C643A6C6F636174696F6E5265717565737420786D6C6E733A68656C643D2775726E3A696574663A706172616D733A786D6C3A6E733A67656F707269763A68656C64273E0A093C68656C643A6C6F636174696F6E547970652065786163743D2774727565273E67656F64657469633C2F68656C643A6C6F636174696F6E547970653E0A093C69643A64657669636520786D6C6E733A69643D2775726E3A696574663A706172616D733A786D6C3A6E733A67656F707269763A68656C643A6964273E0A093C7572693E2B3333313233343536373839303C2F7572693E0A3C2F69643A6465766963653E0A0A0A3C2F68656C643A6C6F636174696F6E526571756573743E0A0A0D0A'O ("POST /api/held HTTP/1.1\r +Host: location-information-service.azurewebsites.net\r +Content-type: application/held+xml;charset=utf-8\r +Content-length: 265\r +Connection: keep-alive\r +Pragma: no-cache\r +Cache-Control: no-cache\r +\r + + geodetic + + +331234567890 + + + + + +\r +") +14:53:07.886794 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:129(testcase:TC_LIS_HTTP_POST_BV_01) >>> http_layer::send_data: '504F5354202F6170692F68656C6420485454502F312E310D0A486F73743A206C6F636174696F6E2D696E666F726D6174696F6E2D736572766963652E617A75726577656273697465732E6E65740D0A436F6E74656E742D747970653A206170706C69636174696F6E2F68656C642B786D6C3B636861727365743D7574662D380D0A436F6E74656E742D6C656E6774683A203236350D0A436F6E6E656374696F6E3A206B6565702D616C6976650D0A507261676D613A206E6F2D63616368650D0A43616368652D436F6E74726F6C3A206E6F2D63616368650D0A0D0A3C68656C643A6C6F636174696F6E5265717565737420786D6C6E733A68656C643D2775726E3A696574663A706172616D733A786D6C3A6E733A67656F707269763A68656C64273E0A093C68656C643A6C6F636174696F6E547970652065786163743D2774727565273E67656F64657469633C2F68656C643A6C6F636174696F6E547970653E0A093C69643A64657669636520786D6C6E733A69643D2775726E3A696574663A706172616D733A786D6C3A6E733A67656F707269763A68656C643A6964273E0A093C7572693E2B3333313233343536373839303C2F7572693E0A3C2F69643A6465766963653E0A0A0A3C2F68656C643A6C6F636174696F6E526571756573743E0A0A0D0A'O ("POST /api/held HTTP/1.1\r +Host: location-information-service.azurewebsites.net\r +Content-type: application/held+xml;charset=utf-8\r +Content-length: 265\r +Connection: keep-alive\r +Pragma: no-cache\r +Cache-Control: no-cache\r +\r + + geodetic + + +331234567890 + + + + + +\r +") +14:53:07.905610 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:129(testcase:TC_LIS_HTTP_POST_BV_01) >>> tcp_layer::send_data: '504F5354202F6170692F68656C6420485454502F312E310D0A486F73743A206C6F636174696F6E2D696E666F726D6174696F6E2D736572766963652E617A75726577656273697465732E6E65740D0A436F6E74656E742D747970653A206170706C69636174696F6E2F68656C642B786D6C3B636861727365743D7574662D380D0A436F6E74656E742D6C656E6774683A203236350D0A436F6E6E656374696F6E3A206B6565702D616C6976650D0A507261676D613A206E6F2D63616368650D0A43616368652D436F6E74726F6C3A206E6F2D63616368650D0A0D0A3C68656C643A6C6F636174696F6E5265717565737420786D6C6E733A68656C643D2775726E3A696574663A706172616D733A786D6C3A6E733A67656F707269763A68656C64273E0A093C68656C643A6C6F636174696F6E547970652065786163743D2774727565273E67656F64657469633C2F68656C643A6C6F636174696F6E547970653E0A093C69643A64657669636520786D6C6E733A69643D2775726E3A696574663A706172616D733A786D6C3A6E733A67656F707269763A68656C643A6964273E0A093C7572693E2B3333313233343536373839303C2F7572693E0A3C2F69643A6465766963653E0A0A0A3C2F68656C643A6C6F636174696F6E526571756573743E0A0A0D0A'O ("POST /api/held HTTP/1.1\r +Host: location-information-service.azurewebsites.net\r +Content-type: application/held+xml;charset=utf-8\r +Content-length: 265\r +Connection: keep-alive\r +Pragma: no-cache\r +Cache-Control: no-cache\r +\r + + geodetic + + +331234567890 + + + + + +\r +") +14:53:07.948949 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:129(testcase:TC_LIS_HTTP_POST_BV_01) tcp_layer::send_data: SSL mode: 0 +14:53:07.949525 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:129(testcase:TC_LIS_HTTP_POST_BV_01) Abstract socket: entering Abstract_Socket::send_outgoing() +14:53:07.949893 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:129(testcase:TC_LIS_HTTP_POST_BV_01) Abstract socket: Sending data: Size: 484, Msg: 50 4f 53 54 20 2f 61 70 69 2f 68 65 6c 64 20 48 54 54 50 2f 31 2e 31 0d 0a 48 6f 73 74 3a 20 6c 6f 63 61 74 69 6f 6e 2d 69 6e 66 6f 72 6d 61 74 69 6f 6e 2d 73 65 72 76 69 63 65 2e 61 7a 75 72 65 77 65 62 73 69 74 65 73 2e 6e 65 74 0d 0a 43 6f 6e 74 65 6e 74 2d 74 79 70 65 3a 20 61 70 70 6c 69 63 61 74 69 6f 6e 2f 68 65 6c 64 2b 78 6d 6c 3b 63 68 61 72 73 65 74 3d 75 74 66 2d 38 0d 0a 43 6f 6e 74 65 6e 74 2d 6c 65 6e 67 74 68 3a 20 32 36 35 0d 0a 43 6f 6e 6e 65 63 74 69 6f 6e 3a 20 6b 65 65 70 2d 61 6c 69 76 65 0d 0a 50 72 61 67 6d 61 3a 20 6e 6f 2d 63 61 63 68 65 0d 0a 43 61 63 68 65 2d 43 6f 6e 74 72 6f 6c 3a 20 6e 6f 2d 63 61 63 68 65 0d 0a 0d 0a 3c 68 65 6c 64 3a 6c 6f 63 61 74 69 6f 6e 52 65 71 75 65 73 74 20 78 6d 6c 6e 73 3a 68 65 6c 64 3d 27 75 72 6e 3a 69 65 74 66 3a 70 61 72 61 6d 73 3a 78 6d 6c 3a 6e 73 3a 67 65 6f 70 72 69 76 3a 68 65 6c 64 27 3e 0a 09 3c 68 65 6c 64 3a 6c 6f 63 61 74 69 6f 6e 54 79 70 65 20 65 78 61 63 74 3d 27 74 72 75 65 27 3e 67 65 6f 64 65 74 69 63 3c 2f 68 65 6c 64 3a 6c 6f 63 61 74 69 6f 6e 54 79 70 65 3e 0a 09 3c 69 64 3a 64 65 76 69 63 65 20 78 6d 6c 6e 73 3a 69 64 3d 27 75 72 6e 3a 69 65 74 66 3a 70 61 72 61 6d 73 3a 78 6d 6c 3a 6e 73 3a 67 65 6f 70 72 69 76 3a 68 65 6c 64 3a 69 64 27 3e 0a 09 3c 75 72 69 3e 2b 33 33 31 32 33 34 35 36 37 38 39 30 3c 2f 75 72 69 3e 0a 3c 2f 69 64 3a 64 65 76 69 63 65 3e 0a 0a 0a 3c 2f 68 65 6c 64 3a 6c 6f 63 61 74 69 6f 6e 52 65 71 75 65 73 74 3e 0a 0a 0d 0a +14:53:07.957888 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:129(testcase:TC_LIS_HTTP_POST_BV_01) >>> tcp_layer::send_message_on_fd: 6 +14:53:07.958187 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:129(testcase:TC_LIS_HTTP_POST_BV_01) tcp_layer::send_message_on_fd: Non secured mode +14:53:07.958778 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:129(testcase:TC_LIS_HTTP_POST_BV_01) Abstract socket: Nr of bytes sent = 484 +14:53:07.959239 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:129(testcase:TC_LIS_HTTP_POST_BV_01) Abstract socket: leaving Abstract_Socket::send_outgoing() +14:53:07.959972 mtc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:129(testcase:TC_LIS_HTTP_POST_BV_01) HttpPort::outgoing_send: Execution duration: 84.540001 ms +14:53:07.961063 mtc VERDICTOP ../ttcn/AtsNg112_TestCases.ttcn:144(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibCommon_Sync.ttcn:448(function:f_selfOrClientSyncAndVerdictTestBody)->../ttcn/LibCommon_Sync.ttcn:1153(function:f_selfSyncAndVerdictTestBody)->../ttcn/LibCommon_VerdictControl.ttcn:49(function:f_setVerdict) setverdict(pass): none -> pass +14:53:07.963333 mtc USER ../ttcn/AtsNg112_TestCases.ttcn:144(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibCommon_Sync.ttcn:448(function:f_selfOrClientSyncAndVerdictTestBody)->../ttcn/LibCommon_Sync.ttcn:1154(function:f_selfSyncAndVerdictTestBody)->../ttcn/LibCommon_Sync.ttcn:1197(function:f_selfSync) **** f_selfSync: Successfully passed PREAMBLE synchronization point. **** +14:53:07.964909 mtc TIMEROP ../ttcn/AtsNg112_TestCases.ttcn:147(testcase:TC_LIS_HTTP_POST_BV_01) Start timer tc_ac: 30 s +14:53:08.334760 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) >>> tcp_layer::Handle_Fd_Event: 6 +14:53:08.337062 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) Abstract socket: entering Abstract_Socket::Handle_Socket_Event(): fd: 6 readable +14:53:08.338133 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) Abstract socket: receiving data +14:53:08.339118 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) >>> tcp_layer::receive_message_on_fd: 6 +14:53:08.340810 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) tcp_layer::receive_message_on_fd: Non secured mode +14:53:08.342290 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) Abstract socket: Message received from address (addr) 10.0.2.15/55332 +14:53:08.343916 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) Abstract socket: Message received, buffer content: Size: 1351, Msg: 48 54 54 50 2f 31 2e 31 20 32 30 30 20 4f 4b 0d 0a 43 6f 6e 74 65 6e 74 2d 4c 65 6e 67 74 68 3a 20 38 35 32 0d 0a 43 6f 6e 74 65 6e 74 2d 54 79 70 65 3a 20 61 70 70 6c 69 63 61 74 69 6f 6e 2f 68 65 6c 64 2b 78 6d 6c 3b 20 63 68 61 72 73 65 74 3d 75 74 66 2d 38 0d 0a 53 65 72 76 65 72 3a 20 4d 69 63 72 6f 73 6f 66 74 2d 49 49 53 2f 31 30 2e 30 0d 0a 53 65 74 2d 43 6f 6f 6b 69 65 3a 20 41 52 52 41 66 66 69 6e 69 74 79 3d 38 33 38 62 36 37 32 64 65 37 38 31 35 61 63 35 64 30 33 34 61 39 34 32 62 62 38 36 34 61 66 36 31 31 38 33 62 62 38 61 34 33 63 66 61 32 34 31 35 37 31 34 33 39 34 31 36 63 66 66 34 38 63 61 3b 50 61 74 68 3d 2f 3b 48 74 74 70 4f 6e 6c 79 3b 44 6f 6d 61 69 6e 3d 6c 6f 63 61 74 69 6f 6e 2d 69 6e 66 6f 72 6d 61 74 69 6f 6e 2d 73 65 72 76 69 63 65 2e 61 7a 75 72 65 77 65 62 73 69 74 65 73 2e 6e 65 74 0d 0a 58 2d 50 6f 77 65 72 65 64 2d 42 79 3a 20 41 53 50 2e 4e 45 54 0d 0a 53 65 74 2d 43 6f 6f 6b 69 65 3a 20 41 52 52 41 66 66 69 6e 69 74 79 3d 38 64 36 39 62 39 30 63 30 35 65 63 61 61 34 34 62 32 34 65 38 62 30 35 39 62 32 62 39 35 31 30 34 32 64 37 32 65 30 36 66 36 39 34 32 32 30 30 39 39 66 30 33 34 61 38 31 31 34 35 35 61 30 31 3b 50 61 74 68 3d 2f 3b 48 74 74 70 4f 6e 6c 79 3b 44 6f 6d 61 69 6e 3d 6c 6f 63 61 74 69 6f 6e 2d 69 6e 66 6f 72 6d 61 74 69 6f 6e 2d 73 65 72 76 69 63 65 2e 61 7a 75 72 65 77 65 62 73 69 74 65 73 2e 6e 65 74 0d 0a 44 61 74 65 3a 20 4d 6f 6e 2c 20 32 33 20 4a 75 6c 20 32 30 31 38 20 31 32 3a 35 33 3a 30 37 20 47 4d 54 0d 0a 0d 0a 3c 3f 78 6d 6c 20 76 65 72 73 69 6f 6e 3d 22 31 2e 30 22 20 65 6e 63 6f 64 69 6e 67 3d 22 55 54 46 2d 38 22 20 73 74 61 6e 64 61 6c 6f 6e 65 3d 22 6e 6f 22 3f 3e 0d 0a 3c 6c 6f 63 61 74 69 6f 6e 52 65 73 70 6f 6e 73 65 20 78 6d 6c 6e 73 3d 22 75 72 6e 3a 69 65 74 66 3a 70 61 72 61 6d 73 3a 78 6d 6c 3a 6e 73 3a 67 65 6f 70 72 69 76 3a 68 65 6c 64 22 3e 0d 0a 20 20 20 20 3c 70 72 65 73 65 6e 63 65 20 65 6e 74 69 74 79 3d 22 70 72 65 73 3a 77 62 6c 79 75 6f 69 75 78 65 6f 61 73 7a 64 22 20 78 6d 6c 6e 73 3d 22 75 72 6e 3a 69 65 74 66 3a 70 61 72 61 6d 73 3a 78 6d 6c 3a 6e 73 3a 70 69 64 66 22 3e 0d 0a 20 20 20 20 20 20 20 20 3c 74 75 70 6c 65 20 69 64 3d 22 74 31 74 77 64 68 79 64 72 6e 6a 63 33 72 72 22 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 3c 73 74 61 74 75 73 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3c 67 65 6f 70 72 69 76 20 78 6d 6c 6e 73 3d 22 75 72 6e 3a 69 65 74 66 3a 70 61 72 61 6d 73 3a 78 6d 6c 3a 6e 73 3a 70 69 64 66 3a 67 65 6f 70 72 69 76 31 30 22 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3c 6c 6f 63 61 74 69 6f 6e 2d 69 6e 66 6f 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3c 50 6f 69 6e 74 20 73 72 73 4e 61 6d 65 3d 22 75 72 6e 3a 6f 67 63 3a 64 65 66 3a 63 72 73 3a 45 50 53 47 3a 3a 34 33 32 36 22 20 78 6d 6c 6e 73 3d 22 68 74 74 70 3a 2f 2f 77 77 77 2e 6f 70 65 6e 67 69 73 2e 6e 65 74 2f 67 6d 6c 22 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3c 70 6f 73 3e 2d 33 34 2e 34 20 31 33 34 2e 34 3c 2f 70 6f 73 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3c 2f 50 6f 69 6e 74 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3c 2f 6c 6f 63 61 74 69 6f 6e 2d 69 6e 66 6f 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3c 75 73 61 67 65 2d 72 75 6c 65 73 2f 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3c 6d 65 74 68 6f 64 3e 75 6e 6b 6e 6f 77 6e 3c 2f 6d 65 74 68 6f 64 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3c 2f 67 65 6f 70 72 69 76 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 3c 2f 73 74 61 74 75 73 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 3c 74 69 6d 65 73 74 61 6d 70 3e 31 39 37 30 2d 30 31 2d 31 35 54 30 36 3a 35 36 3a 30 37 2b 30 30 3a 30 30 3c 2f 74 69 6d 65 73 74 61 6d 70 3e 0d 0a 20 20 20 20 20 20 20 20 3c 2f 74 75 70 6c 65 3e 0d 0a 20 20 20 20 3c 2f 70 72 65 73 65 6e 63 65 3e 0d 0a 3c 2f 6c 6f 63 61 74 69 6f 6e 52 65 73 70 6f 6e 73 65 3e 0d 0a +14:53:08.378344 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) >>> tcp_layer::message_incoming +14:53:08.381450 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) tcp_layer::message_incoming: 48 54 54 50 2f 31 2e 31 20 32 30 30 20 4f 4b 0d 0a 43 6f 6e 74 65 6e 74 2d 4c 65 6e 67 74 68 3a 20 38 35 32 0d 0a 43 6f 6e 74 65 6e 74 2d 54 79 70 65 3a 20 61 70 70 6c 69 63 61 74 69 6f 6e 2f 68 65 6c 64 2b 78 6d 6c 3b 20 63 68 61 72 73 65 74 3d 75 74 66 2d 38 0d 0a 53 65 72 76 65 72 3a 20 4d 69 63 72 6f 73 6f 66 74 2d 49 49 53 2f 31 30 2e 30 0d 0a 53 65 74 2d 43 6f 6f 6b 69 65 3a 20 41 52 52 41 66 66 69 6e 69 74 79 3d 38 33 38 62 36 37 32 64 65 37 38 31 35 61 63 35 64 30 33 34 61 39 34 32 62 62 38 36 34 61 66 36 31 31 38 33 62 62 38 61 34 33 63 66 61 32 34 31 35 37 31 34 33 39 34 31 36 63 66 66 34 38 63 61 3b 50 61 74 68 3d 2f 3b 48 74 74 70 4f 6e 6c 79 3b 44 6f 6d 61 69 6e 3d 6c 6f 63 61 74 69 6f 6e 2d 69 6e 66 6f 72 6d 61 74 69 6f 6e 2d 73 65 72 76 69 63 65 2e 61 7a 75 72 65 77 65 62 73 69 74 65 73 2e 6e 65 74 0d 0a 58 2d 50 6f 77 65 72 65 64 2d 42 79 3a 20 41 53 50 2e 4e 45 54 0d 0a 53 65 74 2d 43 6f 6f 6b 69 65 3a 20 41 52 52 41 66 66 69 6e 69 74 79 3d 38 64 36 39 62 39 30 63 30 35 65 63 61 61 34 34 62 32 34 65 38 62 30 35 39 62 32 62 39 35 31 30 34 32 64 37 32 65 30 36 66 36 39 34 32 32 30 30 39 39 66 30 33 34 61 38 31 31 34 35 35 61 30 31 3b 50 61 74 68 3d 2f 3b 48 74 74 70 4f 6e 6c 79 3b 44 6f 6d 61 69 6e 3d 6c 6f 63 61 74 69 6f 6e 2d 69 6e 66 6f 72 6d 61 74 69 6f 6e 2d 73 65 72 76 69 63 65 2e 61 7a 75 72 65 77 65 62 73 69 74 65 73 2e 6e 65 74 0d 0a 44 61 74 65 3a 20 4d 6f 6e 2c 20 32 33 20 4a 75 6c 20 32 30 31 38 20 31 32 3a 35 33 3a 30 37 20 47 4d 54 0d 0a 0d 0a 3c 3f 78 6d 6c 20 76 65 72 73 69 6f 6e 3d 22 31 2e 30 22 20 65 6e 63 6f 64 69 6e 67 3d 22 55 54 46 2d 38 22 20 73 74 61 6e 64 61 6c 6f 6e 65 3d 22 6e 6f 22 3f 3e 0d 0a 3c 6c 6f 63 61 74 69 6f 6e 52 65 73 70 6f 6e 73 65 20 78 6d 6c 6e 73 3d 22 75 72 6e 3a 69 65 74 66 3a 70 61 72 61 6d 73 3a 78 6d 6c 3a 6e 73 3a 67 65 6f 70 72 69 76 3a 68 65 6c 64 22 3e 0d 0a 20 20 20 20 3c 70 72 65 73 65 6e 63 65 20 65 6e 74 69 74 79 3d 22 70 72 65 73 3a 77 62 6c 79 75 6f 69 75 78 65 6f 61 73 7a 64 22 20 78 6d 6c 6e 73 3d 22 75 72 6e 3a 69 65 74 66 3a 70 61 72 61 6d 73 3a 78 6d 6c 3a 6e 73 3a 70 69 64 66 22 3e 0d 0a 20 20 20 20 20 20 20 20 3c 74 75 70 6c 65 20 69 64 3d 22 74 31 74 77 64 68 79 64 72 6e 6a 63 33 72 72 22 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 3c 73 74 61 74 75 73 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3c 67 65 6f 70 72 69 76 20 78 6d 6c 6e 73 3d 22 75 72 6e 3a 69 65 74 66 3a 70 61 72 61 6d 73 3a 78 6d 6c 3a 6e 73 3a 70 69 64 66 3a 67 65 6f 70 72 69 76 31 30 22 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3c 6c 6f 63 61 74 69 6f 6e 2d 69 6e 66 6f 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3c 50 6f 69 6e 74 20 73 72 73 4e 61 6d 65 3d 22 75 72 6e 3a 6f 67 63 3a 64 65 66 3a 63 72 73 3a 45 50 53 47 3a 3a 34 33 32 36 22 20 78 6d 6c 6e 73 3d 22 68 74 74 70 3a 2f 2f 77 77 77 2e 6f 70 65 6e 67 69 73 2e 6e 65 74 2f 67 6d 6c 22 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3c 70 6f 73 3e 2d 33 34 2e 34 20 31 33 34 2e 34 3c 2f 70 6f 73 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3c 2f 50 6f 69 6e 74 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3c 2f 6c 6f 63 61 74 69 6f 6e 2d 69 6e 66 6f 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3c 75 73 61 67 65 2d 72 75 6c 65 73 2f 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3c 6d 65 74 68 6f 64 3e 75 6e 6b 6e 6f 77 6e 3c 2f 6d 65 74 68 6f 64 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3c 2f 67 65 6f 70 72 69 76 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 3c 2f 73 74 61 74 75 73 3e 0d 0a 20 20 20 20 20 20 20 20 20 20 20 20 3c 74 69 6d 65 73 74 61 6d 70 3e 31 39 37 30 2d 30 31 2d 31 35 54 30 36 3a 35 36 3a 30 37 2b 30 30 3a 30 30 3c 2f 74 69 6d 65 73 74 61 6d 70 3e 0d 0a 20 20 20 20 20 20 20 20 3c 2f 74 75 70 6c 65 3e 0d 0a 20 20 20 20 3c 2f 70 72 65 73 65 6e 63 65 3e 0d 0a 3c 2f 6c 6f 63 61 74 69 6f 6e 52 65 73 70 6f 6e 73 65 3e 0d 0a + +14:53:08.402108 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) >>> tcp_layer::receive_data: '485454502F312E3120323030204F4B0D0A436F6E74656E742D4C656E6774683A203835320D0A436F6E74656E742D547970653A206170706C69636174696F6E2F68656C642B786D6C3B20636861727365743D7574662D380D0A5365727665723A204D6963726F736F66742D4949532F31302E300D0A5365742D436F6F6B69653A20415252416666696E6974793D383338623637326465373831356163356430333461393432626238363461663631313833626238613433636661323431353731343339343136636666343863613B506174683D2F3B487474704F6E6C793B446F6D61696E3D6C6F636174696F6E2D696E666F726D6174696F6E2D736572766963652E617A75726577656273697465732E6E65740D0A582D506F77657265642D42793A204153502E4E45540D0A5365742D436F6F6B69653A20415252416666696E6974793D386436396239306330356563616134346232346538623035396232623935313034326437326530366636393432323030393966303334613831313435356130313B506174683D2F3B487474704F6E6C793B446F6D61696E3D6C6F636174696F6E2D696E666F726D6174696F6E2D736572766963652E617A75726577656273697465732E6E65740D0A446174653A204D6F6E2C203233204A756C20323031382031323A35333A303720474D540D0A0D0A3C3F786D6C2076657273696F6E3D22312E302220656E636F64696E673D225554462D3822207374616E64616C6F6E653D226E6F223F3E0D0A3C6C6F636174696F6E526573706F6E736520786D6C6E733D2275726E3A696574663A706172616D733A786D6C3A6E733A67656F707269763A68656C64223E0D0A202020203C70726573656E636520656E746974793D22707265733A77626C79756F697578656F61737A642220786D6C6E733D2275726E3A696574663A706172616D733A786D6C3A6E733A70696466223E0D0A20202020202020203C7475706C652069643D227431747764687964726E6A63337272223E0D0A2020202020202020202020203C7374617475733E0D0A202020202020202020202020202020203C67656F7072697620786D6C6E733D2275726E3A696574663A706172616D733A786D6C3A6E733A706964663A67656F707269763130223E0D0A20202020202020202020202020202020202020203C6C6F636174696F6E2D696E666F3E0D0A2020202020202020202020202020202020202020202020203C506F696E74207372734E616D653D2275726E3A6F67633A6465663A6372733A455053473A3A343332362220786D6C6E733D22687474703A2F2F7777772E6F70656E6769732E6E65742F676D6C223E0D0A202020202020202020202020202020202020202020202020202020203C706F733E2D33342E34203133342E343C2F706F733E0D0A2020202020202020202020202020202020202020202020203C2F506F696E743E0D0A20202020202020202020202020202020202020203C2F6C6F636174696F6E2D696E666F3E0D0A20202020202020202020202020202020202020203C75736167652D72756C65732F3E0D0A20202020202020202020202020202020202020203C6D6574686F643E756E6B6E6F776E3C2F6D6574686F643E0D0A202020202020202020202020202020203C2F67656F707269763E0D0A2020202020202020202020203C2F7374617475733E0D0A2020202020202020202020203C74696D657374616D703E313937302D30312D31355430363A35363A30372B30303A30303C2F74696D657374616D703E0D0A20202020202020203C2F7475706C653E0D0A202020203C2F70726573656E63653E0D0A3C2F6C6F636174696F6E526573706F6E73653E0D0A'O ("HTTP/1.1 200 OK\r +Content-Length: 852\r +Content-Type: application/held+xml; charset=utf-8\r +Server: Microsoft-IIS/10.0\r +Set-Cookie: ARRAffinity=838b672de7815ac5d034a942bb864af61183bb8a43cfa241571439416cff48ca;Path=/;HttpOnly;Domain=location-information-service.azurewebsites.net\r +X-Powered-By: ASP.NET\r +Set-Cookie: ARRAffinity=8d69b90c05ecaa44b24e8b059b2b951042d72e06f694220099f034a811455a01;Path=/;HttpOnly;Domain=location-information-service.azurewebsites.net\r +Date: Mon, 23 Jul 2018 12:53:07 GMT\r +\r +\r +\r + \r + \r + \r + \r + \r + \r + -34.4 134.4\r + \r + \r + \r + unknown\r + \r + \r + 1970-01-15T06:56:07+00:00\r + \r + \r +\r +") +14:53:08.539144 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) >>> http_layer::receive_data: '485454502F312E3120323030204F4B0D0A436F6E74656E742D4C656E6774683A203835320D0A436F6E74656E742D547970653A206170706C69636174696F6E2F68656C642B786D6C3B20636861727365743D7574662D380D0A5365727665723A204D6963726F736F66742D4949532F31302E300D0A5365742D436F6F6B69653A20415252416666696E6974793D383338623637326465373831356163356430333461393432626238363461663631313833626238613433636661323431353731343339343136636666343863613B506174683D2F3B487474704F6E6C793B446F6D61696E3D6C6F636174696F6E2D696E666F726D6174696F6E2D736572766963652E617A75726577656273697465732E6E65740D0A582D506F77657265642D42793A204153502E4E45540D0A5365742D436F6F6B69653A20415252416666696E6974793D386436396239306330356563616134346232346538623035396232623935313034326437326530366636393432323030393966303334613831313435356130313B506174683D2F3B487474704F6E6C793B446F6D61696E3D6C6F636174696F6E2D696E666F726D6174696F6E2D736572766963652E617A75726577656273697465732E6E65740D0A446174653A204D6F6E2C203233204A756C20323031382031323A35333A303720474D540D0A0D0A3C3F786D6C2076657273696F6E3D22312E302220656E636F64696E673D225554462D3822207374616E64616C6F6E653D226E6F223F3E0D0A3C6C6F636174696F6E526573706F6E736520786D6C6E733D2275726E3A696574663A706172616D733A786D6C3A6E733A67656F707269763A68656C64223E0D0A202020203C70726573656E636520656E746974793D22707265733A77626C79756F697578656F61737A642220786D6C6E733D2275726E3A696574663A706172616D733A786D6C3A6E733A70696466223E0D0A20202020202020203C7475706C652069643D227431747764687964726E6A63337272223E0D0A2020202020202020202020203C7374617475733E0D0A202020202020202020202020202020203C67656F7072697620786D6C6E733D2275726E3A696574663A706172616D733A786D6C3A6E733A706964663A67656F707269763130223E0D0A20202020202020202020202020202020202020203C6C6F636174696F6E2D696E666F3E0D0A2020202020202020202020202020202020202020202020203C506F696E74207372734E616D653D2275726E3A6F67633A6465663A6372733A455053473A3A343332362220786D6C6E733D22687474703A2F2F7777772E6F70656E6769732E6E65742F676D6C223E0D0A202020202020202020202020202020202020202020202020202020203C706F733E2D33342E34203133342E343C2F706F733E0D0A2020202020202020202020202020202020202020202020203C2F506F696E743E0D0A20202020202020202020202020202020202020203C2F6C6F636174696F6E2D696E666F3E0D0A20202020202020202020202020202020202020203C75736167652D72756C65732F3E0D0A20202020202020202020202020202020202020203C6D6574686F643E756E6B6E6F776E3C2F6D6574686F643E0D0A202020202020202020202020202020203C2F67656F707269763E0D0A2020202020202020202020203C2F7374617475733E0D0A2020202020202020202020203C74696D657374616D703E313937302D30312D31355430363A35363A30372B30303A30303C2F74696D657374616D703E0D0A20202020202020203C2F7475706C653E0D0A202020203C2F70726573656E63653E0D0A3C2F6C6F636174696F6E526573706F6E73653E0D0A'O ("HTTP/1.1 200 OK\r +Content-Length: 852\r +Content-Type: application/held+xml; charset=utf-8\r +Server: Microsoft-IIS/10.0\r +Set-Cookie: ARRAffinity=838b672de7815ac5d034a942bb864af61183bb8a43cfa241571439416cff48ca;Path=/;HttpOnly;Domain=location-information-service.azurewebsites.net\r +X-Powered-By: ASP.NET\r +Set-Cookie: ARRAffinity=8d69b90c05ecaa44b24e8b059b2b951042d72e06f694220099f034a811455a01;Path=/;HttpOnly;Domain=location-information-service.azurewebsites.net\r +Date: Mon, 23 Jul 2018 12:53:07 GMT\r +\r +\r +\r + \r + \r + \r + \r + \r + \r + -34.4 134.4\r + \r + \r + \r + unknown\r + \r + \r + 1970-01-15T06:56:07+00:00\r + \r + \r +\r +") +14:53:08.651537 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) >>> http_codec::decode: data='485454502F312E3120323030204F4B0D0A436F6E74656E742D4C656E6774683A203835320D0A436F6E74656E742D547970653A206170706C69636174696F6E2F68656C642B786D6C3B20636861727365743D7574662D380D0A5365727665723A204D6963726F736F66742D4949532F31302E300D0A5365742D436F6F6B69653A20415252416666696E6974793D383338623637326465373831356163356430333461393432626238363461663631313833626238613433636661323431353731343339343136636666343863613B506174683D2F3B487474704F6E6C793B446F6D61696E3D6C6F636174696F6E2D696E666F726D6174696F6E2D736572766963652E617A75726577656273697465732E6E65740D0A582D506F77657265642D42793A204153502E4E45540D0A5365742D436F6F6B69653A20415252416666696E6974793D386436396239306330356563616134346232346538623035396232623935313034326437326530366636393432323030393966303334613831313435356130313B506174683D2F3B487474704F6E6C793B446F6D61696E3D6C6F636174696F6E2D696E666F726D6174696F6E2D736572766963652E617A75726577656273697465732E6E65740D0A446174653A204D6F6E2C203233204A756C20323031382031323A35333A303720474D540D0A0D0A3C3F786D6C2076657273696F6E3D22312E302220656E636F64696E673D225554462D3822207374616E64616C6F6E653D226E6F223F3E0D0A3C6C6F636174696F6E526573706F6E736520786D6C6E733D2275726E3A696574663A706172616D733A786D6C3A6E733A67656F707269763A68656C64223E0D0A202020203C70726573656E636520656E746974793D22707265733A77626C79756F697578656F61737A642220786D6C6E733D2275726E3A696574663A706172616D733A786D6C3A6E733A70696466223E0D0A20202020202020203C7475706C652069643D227431747764687964726E6A63337272223E0D0A2020202020202020202020203C7374617475733E0D0A202020202020202020202020202020203C67656F7072697620786D6C6E733D2275726E3A696574663A706172616D733A786D6C3A6E733A706964663A67656F707269763130223E0D0A20202020202020202020202020202020202020203C6C6F636174696F6E2D696E666F3E0D0A2020202020202020202020202020202020202020202020203C506F696E74207372734E616D653D2275726E3A6F67633A6465663A6372733A455053473A3A343332362220786D6C6E733D22687474703A2F2F7777772E6F70656E6769732E6E65742F676D6C223E0D0A202020202020202020202020202020202020202020202020202020203C706F733E2D33342E34203133342E343C2F706F733E0D0A2020202020202020202020202020202020202020202020203C2F506F696E743E0D0A20202020202020202020202020202020202020203C2F6C6F636174696F6E2D696E666F3E0D0A20202020202020202020202020202020202020203C75736167652D72756C65732F3E0D0A20202020202020202020202020202020202020203C6D6574686F643E756E6B6E6F776E3C2F6D6574686F643E0D0A202020202020202020202020202020203C2F67656F707269763E0D0A2020202020202020202020203C2F7374617475733E0D0A2020202020202020202020203C74696D657374616D703E313937302D30312D31355430363A35363A30372B30303A30303C2F74696D657374616D703E0D0A20202020202020203C2F7475706C653E0D0A202020203C2F70726573656E63653E0D0A3C2F6C6F636174696F6E526573706F6E73653E0D0A'O ("HTTP/1.1 200 OK\r +Content-Length: 852\r +Content-Type: application/held+xml; charset=utf-8\r +Server: Microsoft-IIS/10.0\r +Set-Cookie: ARRAffinity=838b672de7815ac5d034a942bb864af61183bb8a43cfa241571439416cff48ca;Path=/;HttpOnly;Domain=location-information-service.azurewebsites.net\r +X-Powered-By: ASP.NET\r +Set-Cookie: ARRAffinity=8d69b90c05ecaa44b24e8b059b2b951042d72e06f694220099f034a811455a01;Path=/;HttpOnly;Domain=location-information-service.azurewebsites.net\r +Date: Mon, 23 Jul 2018 12:53:07 GMT\r +\r +\r +\r + \r + \r + \r + \r + \r + \r + -34.4 134.4\r + \r + \r + \r + unknown\r + \r + \r + 1970-01-15T06:56:07+00:00\r + \r + \r +\r +") +14:53:08.751488 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) http_codec::decode: decoding_buffer=Buffer: size: 1351, pos: 0, len: 1351 data: ( | 485454502F312E3120323030204F4B0D0A436F6E74656E742D4C656E6774683A203835320D0A436F6E74656E742D547970653A206170706C69636174696F6E2F68656C642B786D6C3B20636861727365743D7574662D380D0A5365727665723A204D6963726F736F66742D4949532F31302E300D0A5365742D436F6F6B69653A20415252416666696E6974793D383338623637326465373831356163356430333461393432626238363461663631313833626238613433636661323431353731343339343136636666343863613B506174683D2F3B487474704F6E6C793B446F6D61696E3D6C6F636174696F6E2D696E666F726D6174696F6E2D736572766963652E617A75726577656273697465732E6E65740D0A582D506F77657265642D42793A204153502E4E45540D0A5365742D436F6F6B69653A20415252416666696E6974793D386436396239306330356563616134346232346538623035396232623935313034326437326530366636393432323030393966303334613831313435356130313B506174683D2F3B487474704F6E6C793B446F6D61696E3D6C6F636174696F6E2D696E666F726D6174696F6E2D736572766963652E617A75726577656273697465732E6E65740D0A446174653A204D6F6E2C203233204A756C20323031382031323A35333A303720474D540D0A0D0A3C3F786D6C2076657273696F6E3D22312E302220656E636F64696E673D225554462D3822207374616E64616C6F6E653D226E6F223F3E0D0A3C6C6F636174696F6E526573706F6E736520786D6C6E733D2275726E3A696574663A706172616D733A786D6C3A6E733A67656F707269763A68656C64223E0D0A202020203C70726573656E636520656E746974793D22707265733A77626C79756F697578656F61737A642220786D6C6E733D2275726E3A696574663A706172616D733A786D6C3A6E733A70696466223E0D0A20202020202020203C7475706C652069643D227431747764687964726E6A63337272223E0D0A2020202020202020202020203C7374617475733E0D0A202020202020202020202020202020203C67656F7072697620786D6C6E733D2275726E3A696574663A706172616D733A786D6C3A6E733A706964663A67656F707269763130223E0D0A20202020202020202020202020202020202020203C6C6F636174696F6E2D696E666F3E0D0A2020202020202020202020202020202020202020202020203C506F696E74207372734E616D653D2275726E3A6F67633A6465663A6372733A455053473A3A343332362220786D6C6E733D22687474703A2F2F7777772E6F70656E6769732E6E65742F676D6C223E0D0A202020202020202020202020202020202020202020202020202020203C706F733E2D33342E34203133342E343C2F706F733E0D0A2020202020202020202020202020202020202020202020203C2F506F696E743E0D0A20202020202020202020202020202020202020203C2F6C6F636174696F6E2D696E666F3E0D0A20202020202020202020202020202020202020203C75736167652D72756C65732F3E0D0A20202020202020202020202020202020202020203C6D6574686F643E756E6B6E6F776E3C2F6D6574686F643E0D0A202020202020202020202020202020203C2F67656F707269763E0D0A2020202020202020202020203C2F7374617475733E0D0A2020202020202020202020203C74696D657374616D703E313937302D30312D31355430363A35363A30372B30303A30303C2F74696D657374616D703E0D0A20202020202020203C2F7475706C653E0D0A202020203C2F70726573656E63653E0D0A3C2F6C6F636174696F6E526573706F6E73653E0D0A) +14:53:08.810366 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) http_codec::decode: message_id: "HTTP/1.1 200 OK" +14:53:08.816762 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) http_codec::decode: 2 - HTTP/ +14:53:08.833237 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) http_codec::decode: Process response: 5 +14:53:08.834283 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) >>> http_codec::decode_headers +14:53:08.834711 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) http_codec::decode_headersBuffer: size: 1351, pos: 17, len: 1351 data: (485454502F312E3120323030204F4B0D0A | 436F6E74656E742D4C656E6774683A203835320D0A436F6E74656E742D547970653A206170706C69636174696F6E2F68656C642B786D6C3B20636861727365743D7574662D380D0A5365727665723A204D6963726F736F66742D4949532F31302E300D0A5365742D436F6F6B69653A20415252416666696E6974793D383338623637326465373831356163356430333461393432626238363461663631313833626238613433636661323431353731343339343136636666343863613B506174683D2F3B487474704F6E6C793B446F6D61696E3D6C6F636174696F6E2D696E666F726D6174696F6E2D736572766963652E617A75726577656273697465732E6E65740D0A582D506F77657265642D42793A204153502E4E45540D0A5365742D436F6F6B69653A20415252416666696E6974793D386436396239306330356563616134346232346538623035396232623935313034326437326530366636393432323030393966303334613831313435356130313B506174683D2F3B487474704F6E6C793B446F6D61696E3D6C6F636174696F6E2D696E666F726D6174696F6E2D736572766963652E617A75726577656273697465732E6E65740D0A446174653A204D6F6E2C203233204A756C20323031382031323A35333A303720474D540D0A0D0A3C3F786D6C2076657273696F6E3D22312E302220656E636F64696E673D225554462D3822207374616E64616C6F6E653D226E6F223F3E0D0A3C6C6F636174696F6E526573706F6E736520786D6C6E733D2275726E3A696574663A706172616D733A786D6C3A6E733A67656F707269763A68656C64223E0D0A202020203C70726573656E636520656E746974793D22707265733A77626C79756F697578656F61737A642220786D6C6E733D2275726E3A696574663A706172616D733A786D6C3A6E733A70696466223E0D0A20202020202020203C7475706C652069643D227431747764687964726E6A63337272223E0D0A2020202020202020202020203C7374617475733E0D0A202020202020202020202020202020203C67656F7072697620786D6C6E733D2275726E3A696574663A706172616D733A786D6C3A6E733A706964663A67656F707269763130223E0D0A20202020202020202020202020202020202020203C6C6F636174696F6E2D696E666F3E0D0A2020202020202020202020202020202020202020202020203C506F696E74207372734E616D653D2275726E3A6F67633A6465663A6372733A455053473A3A343332362220786D6C6E733D22687474703A2F2F7777772E6F70656E6769732E6E65742F676D6C223E0D0A202020202020202020202020202020202020202020202020202020203C706F733E2D33342E34203133342E343C2F706F733E0D0A2020202020202020202020202020202020202020202020203C2F506F696E743E0D0A20202020202020202020202020202020202020203C2F6C6F636174696F6E2D696E666F3E0D0A20202020202020202020202020202020202020203C75736167652D72756C65732F3E0D0A20202020202020202020202020202020202020203C6D6574686F643E756E6B6E6F776E3C2F6D6574686F643E0D0A202020202020202020202020202020203C2F67656F707269763E0D0A2020202020202020202020203C2F7374617475733E0D0A2020202020202020202020203C74696D657374616D703E313937302D30312D31355430363A35363A30372B30303A30303C2F74696D657374616D703E0D0A20202020202020203C2F7475706C653E0D0A202020203C2F70726573656E63653E0D0A3C2F6C6F636174696F6E526573706F6E73653E0D0A) +14:53:08.879562 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) http_codec::decode_headers: "Content-Length: 852" +14:53:08.880089 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) >>> http_codec::decode_header"Content-Length: 852" +14:53:08.888586 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) http_codec::decode_header: 5 +14:53:08.889346 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) http_codec::decode_header: decoded Content-Length 852 +14:53:08.889881 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) http_codec::decode_headers: "Content-Type: application/held+xml; charset=utf-8" +14:53:08.890209 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) >>> http_codec::decode_header"Content-Type: application/held+xml; charset=utf-8" +14:53:08.896260 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) http_codec::decode_header: 5 +14:53:08.896930 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) http_codec::decode_headers: "Server: Microsoft-IIS/10.0" +14:53:08.897525 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) >>> http_codec::decode_header"Server: Microsoft-IIS/10.0" +14:53:08.902705 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) http_codec::decode_header: 5 +14:53:08.903282 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) http_codec::decode_headers: "Set-Cookie: ARRAffinity=838b672de7815ac5d034a942bb864af61183bb8a43cfa241571439416cff48ca;Path=/;HttpOnly;Domain=location-information-service.azurewebsites.net" +14:53:08.903729 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) >>> http_codec::decode_header"Set-Cookie: ARRAffinity=838b672de7815ac5d034a942bb864af61183bb8a43cfa241571439416cff48ca;Path=/;HttpOnly;Domain=location-information-service.azurewebsites.net" +14:53:08.915273 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) http_codec::decode_header: 5 +14:53:08.916046 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) http_codec::decode_headers: "X-Powered-By: ASP.NET" +14:53:08.916383 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) >>> http_codec::decode_header"X-Powered-By: ASP.NET" +14:53:08.925896 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) http_codec::decode_header: 5 +14:53:08.926714 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) http_codec::decode_headers: "Set-Cookie: ARRAffinity=8d69b90c05ecaa44b24e8b059b2b951042d72e06f694220099f034a811455a01;Path=/;HttpOnly;Domain=location-information-service.azurewebsites.net" +14:53:08.933598 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) >>> http_codec::decode_header"Set-Cookie: ARRAffinity=8d69b90c05ecaa44b24e8b059b2b951042d72e06f694220099f034a811455a01;Path=/;HttpOnly;Domain=location-information-service.azurewebsites.net" +14:53:08.938317 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) http_codec::decode_header: 5 +14:53:08.938967 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) http_codec::decode_headers: "Date: Mon, 23 Jul 2018 12:53:07 GMT" +14:53:08.939269 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) >>> http_codec::decode_header"Date: Mon, 23 Jul 2018 12:53:07 GMT" +14:53:08.943798 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) http_codec::decode_header: 5 +14:53:08.949157 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) <<< http_codec::decode_headers: { + { + header_name := "Content-Length", + header_value := { + "852" + } + }, + { + header_name := "Content-Type", + header_value := { + "application/held+xml; charset=utf-8" + } + }, + { + header_name := "Server", + header_value := { + "Microsoft-IIS/10.0" + } + }, + { + header_name := "Set-Cookie", + header_value := { + "ARRAffinity=838b672de7815ac5d034a942bb864af61183bb8a43cfa241571439416cff48ca;Path=/;HttpOnly;Domain=location-information-service.azurewebsites.net" + } + }, + { + header_name := "X-Powered-By", + header_value := { + "ASP.NET" + } + }, + { + header_name := "Set-Cookie", + header_value := { + "ARRAffinity=8d69b90c05ecaa44b24e8b059b2b951042d72e06f694220099f034a811455a01;Path=/;HttpOnly;Domain=location-information-service.azurewebsites.net" + } + }, + { + header_name := "Date", + header_value := { + "Mon, 23 Jul 2018 12:53:07 GMT" + } + } +} +14:53:08.949994 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) Before decoding Body: Buffer: size: 1351, pos: 499, len: 1351 data: (485454502F312E3120323030204F4B0D0A436F6E74656E742D4C656E6774683A203835320D0A436F6E74656E742D547970653A206170706C69636174696F6E2F68656C642B786D6C3B20636861727365743D7574662D380D0A5365727665723A204D6963726F736F66742D4949532F31302E300D0A5365742D436F6F6B69653A20415252416666696E6974793D383338623637326465373831356163356430333461393432626238363461663631313833626238613433636661323431353731343339343136636666343863613B506174683D2F3B487474704F6E6C793B446F6D61696E3D6C6F636174696F6E2D696E666F726D6174696F6E2D736572766963652E617A75726577656273697465732E6E65740D0A582D506F77657265642D42793A204153502E4E45540D0A5365742D436F6F6B69653A20415252416666696E6974793D386436396239306330356563616134346232346538623035396232623935313034326437326530366636393432323030393966303334613831313435356130313B506174683D2F3B487474704F6E6C793B446F6D61696E3D6C6F636174696F6E2D696E666F726D6174696F6E2D736572766963652E617A75726577656273697465732E6E65740D0A446174653A204D6F6E2C203233204A756C20323031382031323A35333A303720474D540D0A0D0A | 3C3F786D6C2076657273696F6E3D22312E302220656E636F64696E673D225554462D3822207374616E64616C6F6E653D226E6F223F3E0D0A3C6C6F636174696F6E526573706F6E736520786D6C6E733D2275726E3A696574663A706172616D733A786D6C3A6E733A67656F707269763A68656C64223E0D0A202020203C70726573656E636520656E746974793D22707265733A77626C79756F697578656F61737A642220786D6C6E733D2275726E3A696574663A706172616D733A786D6C3A6E733A70696466223E0D0A20202020202020203C7475706C652069643D227431747764687964726E6A63337272223E0D0A2020202020202020202020203C7374617475733E0D0A202020202020202020202020202020203C67656F7072697620786D6C6E733D2275726E3A696574663A706172616D733A786D6C3A6E733A706964663A67656F707269763130223E0D0A20202020202020202020202020202020202020203C6C6F636174696F6E2D696E666F3E0D0A2020202020202020202020202020202020202020202020203C506F696E74207372734E616D653D2275726E3A6F67633A6465663A6372733A455053473A3A343332362220786D6C6E733D22687474703A2F2F7777772E6F70656E6769732E6E65742F676D6C223E0D0A202020202020202020202020202020202020202020202020202020203C706F733E2D33342E34203133342E343C2F706F733E0D0A2020202020202020202020202020202020202020202020203C2F506F696E743E0D0A20202020202020202020202020202020202020203C2F6C6F636174696F6E2D696E666F3E0D0A20202020202020202020202020202020202020203C75736167652D72756C65732F3E0D0A20202020202020202020202020202020202020203C6D6574686F643E756E6B6E6F776E3C2F6D6574686F643E0D0A202020202020202020202020202020203C2F67656F707269763E0D0A2020202020202020202020203C2F7374617475733E0D0A2020202020202020202020203C74696D657374616D703E313937302D30312D31355430363A35363A30372B30303A30303C2F74696D657374616D703E0D0A20202020202020203C2F7475706C653E0D0A202020203C2F70726573656E63653E0D0A3C2F6C6F636174696F6E526573706F6E73653E0D0A) +14:53:08.988032 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) >>> http_codec::decode_body +14:53:08.988607 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) http_codec::decode_bodyBuffer: size: 1351, pos: 499, len: 1351 data: (485454502F312E3120323030204F4B0D0A436F6E74656E742D4C656E6774683A203835320D0A436F6E74656E742D547970653A206170706C69636174696F6E2F68656C642B786D6C3B20636861727365743D7574662D380D0A5365727665723A204D6963726F736F66742D4949532F31302E300D0A5365742D436F6F6B69653A20415252416666696E6974793D383338623637326465373831356163356430333461393432626238363461663631313833626238613433636661323431353731343339343136636666343863613B506174683D2F3B487474704F6E6C793B446F6D61696E3D6C6F636174696F6E2D696E666F726D6174696F6E2D736572766963652E617A75726577656273697465732E6E65740D0A582D506F77657265642D42793A204153502E4E45540D0A5365742D436F6F6B69653A20415252416666696E6974793D386436396239306330356563616134346232346538623035396232623935313034326437326530366636393432323030393966303334613831313435356130313B506174683D2F3B487474704F6E6C793B446F6D61696E3D6C6F636174696F6E2D696E666F726D6174696F6E2D736572766963652E617A75726577656273697465732E6E65740D0A446174653A204D6F6E2C203233204A756C20323031382031323A35333A303720474D540D0A0D0A | 3C3F786D6C2076657273696F6E3D22312E302220656E636F64696E673D225554462D3822207374616E64616C6F6E653D226E6F223F3E0D0A3C6C6F636174696F6E526573706F6E736520786D6C6E733D2275726E3A696574663A706172616D733A786D6C3A6E733A67656F707269763A68656C64223E0D0A202020203C70726573656E636520656E746974793D22707265733A77626C79756F697578656F61737A642220786D6C6E733D2275726E3A696574663A706172616D733A786D6C3A6E733A70696466223E0D0A20202020202020203C7475706C652069643D227431747764687964726E6A63337272223E0D0A2020202020202020202020203C7374617475733E0D0A202020202020202020202020202020203C67656F7072697620786D6C6E733D2275726E3A696574663A706172616D733A786D6C3A6E733A706964663A67656F707269763130223E0D0A20202020202020202020202020202020202020203C6C6F636174696F6E2D696E666F3E0D0A2020202020202020202020202020202020202020202020203C506F696E74207372734E616D653D2275726E3A6F67633A6465663A6372733A455053473A3A343332362220786D6C6E733D22687474703A2F2F7777772E6F70656E6769732E6E65742F676D6C223E0D0A202020202020202020202020202020202020202020202020202020203C706F733E2D33342E34203133342E343C2F706F733E0D0A2020202020202020202020202020202020202020202020203C2F506F696E743E0D0A20202020202020202020202020202020202020203C2F6C6F636174696F6E2D696E666F3E0D0A20202020202020202020202020202020202020203C75736167652D72756C65732F3E0D0A20202020202020202020202020202020202020203C6D6574686F643E756E6B6E6F776E3C2F6D6574686F643E0D0A202020202020202020202020202020203C2F67656F707269763E0D0A2020202020202020202020203C2F7374617475733E0D0A2020202020202020202020203C74696D657374616D703E313937302D30312D31355430363A35363A30372B30303A30303C2F74696D657374616D703E0D0A20202020202020203C2F7475706C653E0D0A202020203C2F70726573656E63653E0D0A3C2F6C6F636174696F6E526573706F6E73653E0D0A) +14:53:09.018891 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) http_codec::decode_body: # of codecs=2 +14:53:09.019636 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) http_codec::decode_body: raw body='3C3F786D6C2076657273696F6E3D22312E302220656E636F64696E673D225554462D3822207374616E64616C6F6E653D226E6F223F3E0D0A3C6C6F636174696F6E526573706F6E736520786D6C6E733D2275726E3A696574663A706172616D733A786D6C3A6E733A67656F707269763A68656C64223E0D0A202020203C70726573656E636520656E746974793D22707265733A77626C79756F697578656F61737A642220786D6C6E733D2275726E3A696574663A706172616D733A786D6C3A6E733A70696466223E0D0A20202020202020203C7475706C652069643D227431747764687964726E6A63337272223E0D0A2020202020202020202020203C7374617475733E0D0A202020202020202020202020202020203C67656F7072697620786D6C6E733D2275726E3A696574663A706172616D733A786D6C3A6E733A706964663A67656F707269763130223E0D0A20202020202020202020202020202020202020203C6C6F636174696F6E2D696E666F3E0D0A2020202020202020202020202020202020202020202020203C506F696E74207372734E616D653D2275726E3A6F67633A6465663A6372733A455053473A3A343332362220786D6C6E733D22687474703A2F2F7777772E6F70656E6769732E6E65742F676D6C223E0D0A202020202020202020202020202020202020202020202020202020203C706F733E2D33342E34203133342E343C2F706F733E0D0A2020202020202020202020202020202020202020202020203C2F506F696E743E0D0A20202020202020202020202020202020202020203C2F6C6F636174696F6E2D696E666F3E0D0A20202020202020202020202020202020202020203C75736167652D72756C65732F3E0D0A20202020202020202020202020202020202020203C6D6574686F643E756E6B6E6F776E3C2F6D6574686F643E0D0A202020202020202020202020202020203C2F67656F707269763E0D0A2020202020202020202020203C2F7374617475733E0D0A2020202020202020202020203C74696D657374616D703E313937302D30312D31355430363A35363A30372B30303A30303C2F74696D657374616D703E0D0A20202020202020203C2F7475706C653E0D0A202020203C2F70726573656E63653E0D0A3C2F6C6F636174696F6E526573706F6E73653E0D0A'O ("\r +\r + \r + \r + \r + \r + \r + \r + -34.4 134.4\r + \r + \r + \r + unknown\r + \r + \r + 1970-01-15T06:56:07+00:00\r + \r + \r +\r +") +14:53:09.047688 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) http_codec::decode_body: _dc.length=852 - body length=852 +14:53:09.048145 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) http_codec::decode_body: Aligned body='3C3F786D6C2076657273696F6E3D22312E302220656E636F64696E673D225554462D3822207374616E64616C6F6E653D226E6F223F3E0D0A3C6C6F636174696F6E526573706F6E736520786D6C6E733D2275726E3A696574663A706172616D733A786D6C3A6E733A67656F707269763A68656C64223E0D0A202020203C70726573656E636520656E746974793D22707265733A77626C79756F697578656F61737A642220786D6C6E733D2275726E3A696574663A706172616D733A786D6C3A6E733A70696466223E0D0A20202020202020203C7475706C652069643D227431747764687964726E6A63337272223E0D0A2020202020202020202020203C7374617475733E0D0A202020202020202020202020202020203C67656F7072697620786D6C6E733D2275726E3A696574663A706172616D733A786D6C3A6E733A706964663A67656F707269763130223E0D0A20202020202020202020202020202020202020203C6C6F636174696F6E2D696E666F3E0D0A2020202020202020202020202020202020202020202020203C506F696E74207372734E616D653D2275726E3A6F67633A6465663A6372733A455053473A3A343332362220786D6C6E733D22687474703A2F2F7777772E6F70656E6769732E6E65742F676D6C223E0D0A202020202020202020202020202020202020202020202020202020203C706F733E2D33342E34203133342E343C2F706F733E0D0A2020202020202020202020202020202020202020202020203C2F506F696E743E0D0A20202020202020202020202020202020202020203C2F6C6F636174696F6E2D696E666F3E0D0A20202020202020202020202020202020202020203C75736167652D72756C65732F3E0D0A20202020202020202020202020202020202020203C6D6574686F643E756E6B6E6F776E3C2F6D6574686F643E0D0A202020202020202020202020202020203C2F67656F707269763E0D0A2020202020202020202020203C2F7374617475733E0D0A2020202020202020202020203C74696D657374616D703E313937302D30312D31355430363A35363A30372B30303A30303C2F74696D657374616D703E0D0A20202020202020203C2F7475706C653E0D0A202020203C2F70726573656E63653E0D0A3C2F6C6F636174696F6E526573706F6E73653E0D0A'O ("\r +\r + \r + \r + \r + \r + \r + \r + -34.4 134.4\r + \r + \r + \r + unknown\r + \r + \r + 1970-01-15T06:56:07+00:00\r + \r + \r +\r +") +14:53:09.076534 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) http_codec::decode_body: Counter=2 +14:53:09.077113 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) http_codec::decode_body: Finalised body='3C3F786D6C2076657273696F6E3D22312E302220656E636F64696E673D225554462D3822207374616E64616C6F6E653D226E6F223F3E0D0A3C6C6F636174696F6E526573706F6E736520786D6C6E733D2275726E3A696574663A706172616D733A786D6C3A6E733A67656F707269763A68656C64223E0D0A202020203C70726573656E636520656E746974793D22707265733A77626C79756F697578656F61737A642220786D6C6E733D2275726E3A696574663A706172616D733A786D6C3A6E733A70696466223E0D0A20202020202020203C7475706C652069643D227431747764687964726E6A63337272223E0D0A2020202020202020202020203C7374617475733E0D0A202020202020202020202020202020203C67656F7072697620786D6C6E733D2275726E3A696574663A706172616D733A786D6C3A6E733A706964663A67656F707269763130223E0D0A20202020202020202020202020202020202020203C6C6F636174696F6E2D696E666F3E0D0A2020202020202020202020202020202020202020202020203C506F696E74207372734E616D653D2275726E3A6F67633A6465663A6372733A455053473A3A343332362220786D6C6E733D22687474703A2F2F7777772E6F70656E6769732E6E65742F676D6C223E0D0A202020202020202020202020202020202020202020202020202020203C706F733E2D33342E34203133342E343C2F706F733E0D0A2020202020202020202020202020202020202020202020203C2F506F696E743E0D0A20202020202020202020202020202020202020203C2F6C6F636174696F6E2D696E666F3E0D0A20202020202020202020202020202020202020203C75736167652D72756C65732F3E0D0A20202020202020202020202020202020202020203C6D6574686F643E756E6B6E6F776E3C2F6D6574686F643E0D0A202020202020202020202020202020203C2F67656F707269763E0D0A2020202020202020202020203C2F7374617475733E0D0A2020202020202020202020203C74696D657374616D703E313937302D30312D31355430363A35363A30372B30303A30303C2F74696D657374616D703E0D0A20202020202020203C2F7475706C653E0D0A202020203C2F70726573656E63653E0D0A3C2F6C6F636174696F6E526573706F6E73653E'O ("\r +\r + \r + \r + \r + \r + \r + \r + -34.4 134.4\r + \r + \r + \r + unknown\r + \r + \r + 1970-01-15T06:56:07+00:00\r + \r + \r +") +14:53:09.117340 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) http_codec::decode_body: Binary mode: 0 +14:53:09.118198 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) http_codec::decode_body: Find xml message +14:53:09.118875 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) http_codec::decode_body: Find 'urn:ietf:params:xml:ns:geopriv:held' +14:53:09.119211 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) http_codec::decode_body: Call 'held_codec' +14:53:09.119602 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) >>> held_codec::decode: p_data='3C3F786D6C2076657273696F6E3D22312E302220656E636F64696E673D225554462D3822207374616E64616C6F6E653D226E6F223F3E0D0A3C6C6F636174696F6E526573706F6E736520786D6C6E733D2275726E3A696574663A706172616D733A786D6C3A6E733A67656F707269763A68656C64223E0D0A202020203C70726573656E636520656E746974793D22707265733A77626C79756F697578656F61737A642220786D6C6E733D2275726E3A696574663A706172616D733A786D6C3A6E733A70696466223E0D0A20202020202020203C7475706C652069643D227431747764687964726E6A63337272223E0D0A2020202020202020202020203C7374617475733E0D0A202020202020202020202020202020203C67656F7072697620786D6C6E733D2275726E3A696574663A706172616D733A786D6C3A6E733A706964663A67656F707269763130223E0D0A20202020202020202020202020202020202020203C6C6F636174696F6E2D696E666F3E0D0A2020202020202020202020202020202020202020202020203C506F696E74207372734E616D653D2275726E3A6F67633A6465663A6372733A455053473A3A343332362220786D6C6E733D22687474703A2F2F7777772E6F70656E6769732E6E65742F676D6C223E0D0A202020202020202020202020202020202020202020202020202020203C706F733E2D33342E34203133342E343C2F706F733E0D0A2020202020202020202020202020202020202020202020203C2F506F696E743E0D0A20202020202020202020202020202020202020203C2F6C6F636174696F6E2D696E666F3E0D0A20202020202020202020202020202020202020203C75736167652D72756C65732F3E0D0A20202020202020202020202020202020202020203C6D6574686F643E756E6B6E6F776E3C2F6D6574686F643E0D0A202020202020202020202020202020203C2F67656F707269763E0D0A2020202020202020202020203C2F7374617475733E0D0A2020202020202020202020203C74696D657374616D703E313937302D30312D31355430363A35363A30372B30303A30303C2F74696D657374616D703E0D0A20202020202020203C2F7475706C653E0D0A202020203C2F70726573656E63653E0D0A3C2F6C6F636174696F6E526573706F6E73653E'O ("\r +\r + \r + \r + \r + \r + \r + \r + -34.4 134.4\r + \r + \r + \r + unknown\r + \r + \r + 1970-01-15T06:56:07+00:00\r + \r + \r +") +14:53:09.140959 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) <<< held_codec::decode: { + locationResponse := { + locationUriSet := omit, + elem_list := { + " + + + + + + -34.4 134.4 + + + + unknown + + + 1970-01-15T06:56:07+00:00 + + " + } + } +} +14:53:09.142029 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) http_codec::decode_body: Decoded message:{ + locationResponse := { + locationUriSet := omit, + elem_list := { + " + + + + + + -34.4 134.4 + + + + unknown + + + 1970-01-15T06:56:07+00:00 + + " + } + } +} +14:53:09.144038 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) <<< http_codec::decode: { + response := { + version_major := 1, + version_minor := 1, + statuscode := 200, + statustext := "OK", + header := { + { + header_name := "Content-Length", + header_value := { + "852" + } + }, + { + header_name := "Content-Type", + header_value := { + "application/held+xml; charset=utf-8" + } + }, + { + header_name := "Server", + header_value := { + "Microsoft-IIS/10.0" + } + }, + { + header_name := "Set-Cookie", + header_value := { + "ARRAffinity=838b672de7815ac5d034a942bb864af61183bb8a43cfa241571439416cff48ca;Path=/;HttpOnly;Domain=location-information-service.azurewebsites.net" + } + }, + { + header_name := "X-Powered-By", + header_value := { + "ASP.NET" + } + }, + { + header_name := "Set-Cookie", + header_value := { + "ARRAffinity=8d69b90c05ecaa44b24e8b059b2b951042d72e06f694220099f034a811455a01;Path=/;HttpOnly;Domain=location-information-service.azurewebsites.net" + } + }, + { + header_name := "Date", + header_value := { + "Mon, 23 Jul 2018 12:53:07 GMT" + } + } + }, + body := { + xml_body := { + locationResponse := { + locationUriSet := omit, + elem_list := { + " + + + + + + -34.4 134.4 + + + + unknown + + + 1970-01-15T06:56:07+00:00 + + " + } + } + } + } + } +} +14:53:09.147248 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) >>> HttpPort::receive_msg: { + response := { + version_major := 1, + version_minor := 1, + statuscode := 200, + statustext := "OK", + header := { + { + header_name := "Content-Length", + header_value := { + "852" + } + }, + { + header_name := "Content-Type", + header_value := { + "application/held+xml; charset=utf-8" + } + }, + { + header_name := "Server", + header_value := { + "Microsoft-IIS/10.0" + } + }, + { + header_name := "Set-Cookie", + header_value := { + "ARRAffinity=838b672de7815ac5d034a942bb864af61183bb8a43cfa241571439416cff48ca;Path=/;HttpOnly;Domain=location-information-service.azurewebsites.net" + } + }, + { + header_name := "X-Powered-By", + header_value := { + "ASP.NET" + } + }, + { + header_name := "Set-Cookie", + header_value := { + "ARRAffinity=8d69b90c05ecaa44b24e8b059b2b951042d72e06f694220099f034a811455a01;Path=/;HttpOnly;Domain=location-information-service.azurewebsites.net" + } + }, + { + header_name := "Date", + header_value := { + "Mon, 23 Jul 2018 12:53:07 GMT" + } + } + }, + body := { + xml_body := { + locationResponse := { + locationUriSet := omit, + elem_list := { + " + + + + + + -34.4 134.4 + + + + unknown + + + 1970-01-15T06:56:07+00:00 + + " + } + } + } + } + } +} +14:53:09.150452 mtc PORTEVENT ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) Message enqueued on httpPort from system @LibItsHttp_TypesAndValues.HttpMessage : { + response := { + version_major := 1, + version_minor := 1, + statuscode := 200, + statustext := "OK", + header := { + { + header_name := "Content-Length", + header_value := { + "852" + } + }, + { + header_name := "Content-Type", + header_value := { + "application/held+xml; charset=utf-8" + } + }, + { + header_name := "Server", + header_value := { + "Microsoft-IIS/10.0" + } + }, + { + header_name := "Set-Cookie", + header_value := { + "ARRAffinity=838b672de7815ac5d034a942bb864af61183bb8a43cfa241571439416cff48ca;Path=/;HttpOnly;Domain=location-information-service.azurewebsites.net" + } + }, + { + header_name := "X-Powered-By", + header_value := { + "ASP.NET" + } + }, + { + header_name := "Set-Cookie", + header_value := { + "ARRAffinity=8d69b90c05ecaa44b24e8b059b2b951042d72e06f694220099f034a811455a01;Path=/;HttpOnly;Domain=location-information-service.azurewebsites.net" + } + }, + { + header_name := "Date", + header_value := { + "Mon, 23 Jul 2018 12:53:07 GMT" + } + } + }, + body := { + xml_body := { + locationResponse := { + locationUriSet := omit, + elem_list := { + " + + + + + + -34.4 134.4 + + + + unknown + + + 1970-01-15T06:56:07+00:00 + + " + } + } + } + } + } +} id 1 +14:53:09.151463 mtc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) tcp_layer::Handle_Fd_Event_Readable: Execution duration: 654.862000 ms +14:53:09.152027 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) Abstract socket: leaving Abstract_Socket::handle_message() +14:53:09.152346 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) Abstract socket: leaving Abstract_Socket::Handle_Socket_Event() +14:53:09.152843 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:148(testcase:TC_LIS_HTTP_POST_BV_01) Abstract socket: <<< tcp_layer::Handle_Fd_Event +14:53:09.153490 mtc MATCHING ../ttcn/AtsNg112_TestCases.ttcn:149(testcase:TC_LIS_HTTP_POST_BV_01) Matching on port httpPort succeeded: matched +14:53:09.154569 mtc PORTEVENT ../ttcn/AtsNg112_TestCases.ttcn:149(testcase:TC_LIS_HTTP_POST_BV_01) Receive operation on port httpPort succeeded, message from system(): @LibItsHttp_TypesAndValues.HttpMessage : { + response := { + version_major := 1, + version_minor := 1, + statuscode := 200, + statustext := "OK", + header := { + { + header_name := "Content-Length", + header_value := { + "852" + } + }, + { + header_name := "Content-Type", + header_value := { + "application/held+xml; charset=utf-8" + } + }, + { + header_name := "Server", + header_value := { + "Microsoft-IIS/10.0" + } + }, + { + header_name := "Set-Cookie", + header_value := { + "ARRAffinity=838b672de7815ac5d034a942bb864af61183bb8a43cfa241571439416cff48ca;Path=/;HttpOnly;Domain=location-information-service.azurewebsites.net" + } + }, + { + header_name := "X-Powered-By", + header_value := { + "ASP.NET" + } + }, + { + header_name := "Set-Cookie", + header_value := { + "ARRAffinity=8d69b90c05ecaa44b24e8b059b2b951042d72e06f694220099f034a811455a01;Path=/;HttpOnly;Domain=location-information-service.azurewebsites.net" + } + }, + { + header_name := "Date", + header_value := { + "Mon, 23 Jul 2018 12:53:07 GMT" + } + } + }, + body := { + xml_body := { + locationResponse := { + locationUriSet := omit, + elem_list := { + " + + + + + + -34.4 134.4 + + + + unknown + + + 1970-01-15T06:56:07+00:00 + + " + } + } + } + } + } +} id 1 +14:53:09.155590 mtc PORTEVENT ../ttcn/AtsNg112_TestCases.ttcn:149(testcase:TC_LIS_HTTP_POST_BV_01) Message with id 1 was extracted from the queue of httpPort. +14:53:09.156026 mtc TIMEROP ../ttcn/AtsNg112_TestCases.ttcn:163(testcase:TC_LIS_HTTP_POST_BV_01) Stop timer tc_ac: 30 s +14:53:09.157250 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:167(testcase:TC_LIS_HTTP_POST_BV_01) Warning: No UTF-8 Byte Order Mark(BOM) detected. It may result decoding errors +14:53:09.157885 mtc USER ../ttcn/AtsNg112_TestCases.ttcn:169(testcase:TC_LIS_HTTP_POST_BV_01) matched +14:53:09.159000 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:175(testcase:TC_LIS_HTTP_POST_BV_01) Warning: No UTF-8 Byte Order Mark(BOM) detected. It may result decoding errors +14:53:09.159591 mtc USER ../ttcn/AtsNg112_TestCases.ttcn:177(testcase:TC_LIS_HTTP_POST_BV_01) matched +14:53:09.160254 mtc WARNING ../ttcn/AtsNg112_TestCases.ttcn:181(testcase:TC_LIS_HTTP_POST_BV_01) Warning: While XER-decoding type '@http_www_opengis_net_gml.PointPropertyType': Bad XML tag `Point' instead of `PointPropertyType' +14:53:09.160707 mtc WARNING ../ttcn/AtsNg112_TestCases.ttcn:181(testcase:TC_LIS_HTTP_POST_BV_01) Warning: While XER-decoding type '@http_www_opengis_net_gml.PointPropertyType': Unexpected attribute 'srsName', ns '' +14:53:09.160958 mtc WARNING ../ttcn/AtsNg112_TestCases.ttcn:181(testcase:TC_LIS_HTTP_POST_BV_01) Warning: While XER-decoding type '@http_www_opengis_net_gml.PointPropertyType': point': Bad XML tag `pos' instead of `Point' +14:53:09.161837 mtc WARNING ../ttcn/AtsNg112_TestCases.ttcn:181(testcase:TC_LIS_HTTP_POST_BV_01) Warning: While XER-decoding type '@http_www_opengis_net_gml.PointPropertyType': While checking end tag: Bad XML tag `Point' instead of `PointPropertyType' +14:53:09.162170 mtc USER ../ttcn/AtsNg112_TestCases.ttcn:182(testcase:TC_LIS_HTTP_POST_BV_01) matched +14:53:09.162585 mtc USER ../ttcn/AtsNg112_TestCases.ttcn:184(testcase:TC_LIS_HTTP_POST_BV_01) *** TC_LIS_HTTP_POST_BV_01: PASS: IUT successfully responds with a Point *** +14:53:09.163606 mtc VERDICTOP ../ttcn/AtsNg112_TestCases.ttcn:185(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibCommon_Sync.ttcn:448(function:f_selfOrClientSyncAndVerdictTestBody)->../ttcn/LibCommon_Sync.ttcn:1153(function:f_selfSyncAndVerdictTestBody)->../ttcn/LibCommon_VerdictControl.ttcn:49(function:f_setVerdict) setverdict(pass): pass -> pass, component reason not changed +14:53:09.163932 mtc USER ../ttcn/AtsNg112_TestCases.ttcn:185(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibCommon_Sync.ttcn:448(function:f_selfOrClientSyncAndVerdictTestBody)->../ttcn/LibCommon_Sync.ttcn:1154(function:f_selfSyncAndVerdictTestBody)->../ttcn/LibCommon_Sync.ttcn:1199(function:f_selfSync) **** f_selfSync: Successfully passed TEST BODY synchronization point. **** +14:53:09.164701 mtc PARALLEL ../ttcn/AtsNg112_TestCases.ttcn:214(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:52(function:f_cf_01_http_down) Unmapping port mtc:httpPort from system:httpPort. +14:53:09.169641 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:214(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:52(function:f_cf_01_http_down) >>> HttpPort::user_unmap: httpPort +14:53:09.169979 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:214(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:52(function:f_cf_01_http_down) >>> tcp_layer::~tcp_layer: 6 +14:53:09.170233 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:214(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:52(function:f_cf_01_http_down) Abstract socket: entering Abstract_Socket::remove_client(6) +14:53:09.170423 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:214(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:52(function:f_cf_01_http_down) Abstract socket: entering SSL_Socket::remove_user_data() +14:53:09.170643 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:214(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:52(function:f_cf_01_http_down) Abstract socket: leaving SSL_Socket::remove_user_data() +14:53:09.170827 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:214(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:52(function:f_cf_01_http_down) Abstract socket: Abstract_Socket::peer_list_remove_peer: Removing client 6 from peer list +14:53:09.170999 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:214(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:52(function:f_cf_01_http_down) Abstract socket: Abstract_Socket::peer_list_get_last_peer: Finding last peer of the peer array +14:53:09.171198 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:214(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:52(function:f_cf_01_http_down) Abstract socket: Abstract_Socket::peer_list_get_last_peer: No active peer found +14:53:09.171354 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:214(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:52(function:f_cf_01_http_down) Abstract socket: Abstract_Socket::peer_list_resize_list: Resizing to 0 +14:53:09.172064 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:214(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:52(function:f_cf_01_http_down) Abstract socket: Abstract_Socket::peer_list_resize_list: New length is 0 +14:53:09.172614 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:214(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:52(function:f_cf_01_http_down) Abstract socket: Removed client 6. +14:53:09.173384 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:214(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:52(function:f_cf_01_http_down) Abstract socket: leaving Abstract_Socket::remove_client(6) +14:53:09.173832 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:214(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:52(function:f_cf_01_http_down) Abstract socket: entering Abstract_Socket::unmap_user() +14:53:09.174260 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:214(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:52(function:f_cf_01_http_down) Abstract socket: entering Abstract_Socket::remove_all_clients +14:53:09.174771 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:214(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:52(function:f_cf_01_http_down) Abstract socket: Abstract_Socket::peer_list_get_nr_of_peers: Number of active peers = 0 +14:53:09.175385 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:214(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:52(function:f_cf_01_http_down) Abstract socket: leaving Abstract_Socket::remove_all_clients +14:53:09.175830 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:214(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:52(function:f_cf_01_http_down) Abstract socket: leaving Abstract_Socket::unmap_user() +14:53:09.176643 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:214(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:52(function:f_cf_01_http_down) Abstract socket: Abstract_Socket::peer_list_reset_peer: Resetting peer array +14:53:09.177114 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:214(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:52(function:f_cf_01_http_down) Abstract socket: Abstract_Socket::peer_list_get_last_peer: Finding last peer of the peer array +14:53:09.177557 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:214(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:52(function:f_cf_01_http_down) Abstract socket: Abstract_Socket::peer_list_get_last_peer: No active peer found +14:53:09.177978 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:214(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:52(function:f_cf_01_http_down) Abstract socket: Abstract_Socket::peer_list_resize_list: Resizing to 0 +14:53:09.178854 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:214(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:52(function:f_cf_01_http_down) Abstract socket: Abstract_Socket::peer_list_resize_list: New length is 0 +14:53:09.181363 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:214(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:52(function:f_cf_01_http_down) Abstract socket: Abstract_Socket::peer_list_reset_peer: New length is 0 +14:53:09.182558 mtc PORTEVENT ../ttcn/AtsNg112_TestCases.ttcn:214(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:52(function:f_cf_01_http_down) Port httpPort was unmapped from system:httpPort. +14:53:09.183058 mtc PARALLEL ../ttcn/AtsNg112_TestCases.ttcn:214(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:52(function:f_cf_01_http_down) Unmap operation of mtc:httpPort from system:httpPort finished. +14:53:09.183790 mtc PARALLEL ../ttcn/AtsNg112_TestCases.ttcn:214(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:55(function:f_cf_01_http_down)->../ttcn/LibCommon_Sync.ttcn:219(function:f_disconnect4SelfOrClientSync)->../ttcn/LibCommon_Sync.ttcn:1101(function:f_disconnect4SelfSync) Disconnecting ports mtc:syncSendPort and mtc:syncPort. +14:53:09.184447 mtc PORTEVENT ../ttcn/AtsNg112_TestCases.ttcn:214(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:55(function:f_cf_01_http_down)->../ttcn/LibCommon_Sync.ttcn:219(function:f_disconnect4SelfOrClientSync)->../ttcn/LibCommon_Sync.ttcn:1101(function:f_disconnect4SelfSync) Port syncSendPort has terminated the connection with local port syncPort. +14:53:09.184905 mtc PORTEVENT ../ttcn/AtsNg112_TestCases.ttcn:214(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:55(function:f_cf_01_http_down)->../ttcn/LibCommon_Sync.ttcn:219(function:f_disconnect4SelfOrClientSync)->../ttcn/LibCommon_Sync.ttcn:1101(function:f_disconnect4SelfSync) Port syncPort has terminated the connection with local port syncSendPort. +14:53:09.186111 mtc PARALLEL ../ttcn/AtsNg112_TestCases.ttcn:214(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:55(function:f_cf_01_http_down)->../ttcn/LibCommon_Sync.ttcn:219(function:f_disconnect4SelfOrClientSync)->../ttcn/LibCommon_Sync.ttcn:1101(function:f_disconnect4SelfSync) Disconnect operation on mtc:syncSendPort and mtc:syncPort finished. +14:53:09.186816 mtc DEFAULTOP ../ttcn/AtsNg112_TestCases.ttcn:214(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:57(function:f_cf_01_http_down) Default with id 1 (altstep a_cf_01_http_down) was deactivated. +14:53:09.188038 mtc DEFAULTOP ../ttcn/AtsNg112_TestCases.ttcn:214(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:57(function:f_cf_01_http_down) Default with id 2 (altstep a_default_requests) was deactivated. +14:53:09.188801 mtc DEFAULTOP ../ttcn/AtsNg112_TestCases.ttcn:214(testcase:TC_LIS_HTTP_POST_BV_01)->../ttcn/LibNg112_Functions.ttcn:57(function:f_cf_01_http_down) Default with id 3 (altstep a_default_responses) was deactivated. +14:53:09.189887 mtc PARALLEL ../ttcn/AtsNg112_TestCases.ttcn:214(testcase:TC_LIS_HTTP_POST_BV_01) Terminating component type LibItsHttp_TestSystem.HttpComponent. +14:53:09.190652 mtc PORTEVENT ../ttcn/AtsNg112_TestCases.ttcn:214(testcase:TC_LIS_HTTP_POST_BV_01) Port syncPort was stopped. +14:53:09.191346 mtc PORTEVENT ../ttcn/AtsNg112_TestCases.ttcn:214(testcase:TC_LIS_HTTP_POST_BV_01) Port syncSendPort was stopped. +14:53:09.191723 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:214(testcase:TC_LIS_HTTP_POST_BV_01) >>> HttpPort::user_stop +14:53:09.192205 mtc PORTEVENT ../ttcn/AtsNg112_TestCases.ttcn:214(testcase:TC_LIS_HTTP_POST_BV_01) Port httpPort was stopped. +14:53:09.192860 mtc PARALLEL ../ttcn/AtsNg112_TestCases.ttcn:214(testcase:TC_LIS_HTTP_POST_BV_01) Component type LibItsHttp_TestSystem.HttpComponent was shut down inside testcase TC_LIS_HTTP_POST_BV_01. +14:53:09.193500 mtc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:214(testcase:TC_LIS_HTTP_POST_BV_01) Waiting for PTCs to finish. +14:53:09.196498 mtc VERDICTOP ../ttcn/AtsNg112_TestCases.ttcn:214(testcase:TC_LIS_HTTP_POST_BV_01) Setting final verdict of the test case. +14:53:09.197296 mtc VERDICTOP ../ttcn/AtsNg112_TestCases.ttcn:214(testcase:TC_LIS_HTTP_POST_BV_01) Local verdict of MTC: pass +14:53:09.198072 mtc VERDICTOP ../ttcn/AtsNg112_TestCases.ttcn:214(testcase:TC_LIS_HTTP_POST_BV_01) No PTCs were created. +14:53:09.199674 mtc TESTCASE ../ttcn/AtsNg112_TestCases.ttcn:214(testcase:TC_LIS_HTTP_POST_BV_01) Test case TC_LIS_HTTP_POST_BV_01 finished. Verdict: pass +14:53:09.201109 mtc STATISTICS - Verdict statistics: 0 none (0.00 %), 1 pass (100.00 %), 0 inconc (0.00 %), 0 fail (0.00 %), 0 error (0.00 %). +14:53:09.201565 mtc STATISTICS - Test execution summary: 1 test case was executed. Overall verdict: pass +14:53:09.201937 mtc EXECUTOR - Exit was requested from MC. Terminating MTC. +14:53:09.202895 hc EXECUTOR - Exit was requested from MC. Terminating HC. +14:53:09.203238 hc EXECUTOR - Disconnected from MC. +14:53:09.203421 hc EXECUTOR - TTCN-3 Host Controller finished. diff --git a/validation/TC_LIS_HTTP_POST_BV_03.pcapng b/validation/TC_LIS_HTTP_POST_BV_03.pcapng new file mode 100644 index 0000000000000000000000000000000000000000..14a8368f3180fd422c4fbf134a72e72df123802a Binary files /dev/null and b/validation/TC_LIS_HTTP_POST_BV_03.pcapng differ diff --git a/validation/TC_LIS_HTTP_POST_BV_03_merged.log b/validation/TC_LIS_HTTP_POST_BV_03_merged.log new file mode 100644 index 0000000000000000000000000000000000000000..c80ddd0b0a71b0a96a241eddfc7fed13cf40a189 --- /dev/null +++ b/validation/TC_LIS_HTTP_POST_BV_03_merged.log @@ -0,0 +1,1363 @@ +14:51:59.349092 hc EXECUTOR - TTCN-3 Host Controller started on vagrant. Version: CRL 113 200/6 R4A. +14:51:59.349291 hc EXECUTOR - TTCN Logger v2.2 options: TimeStampFormat:=Time; LogEntityName:=Yes; LogEventTypes:=Yes; SourceInfoFormat:=Stack; *.FileMask:=LOG_ALL | MATCHING | DEBUG; *.ConsoleMask:=LOG_ALL | MATCHING | DEBUG; LogFileSize:=0; LogFileNumber:=1; DiskFullAction:=Error +14:51:59.350022 hc WARNING - Warning: The address of MC was set to a local IP address. This may cause incorrect behavior if a HC from a remote host also connects to MC. +14:51:59.350309 hc EXECUTOR - The address of MC was set to 127.0.0.1:0. +14:51:59.350502 hc EXECUTOR - Connected to MC. +14:51:59.350691 hc EXECUTOR - This host supports UNIX domain sockets for local communication. +14:51:59.351429 hc EXECUTOR - Processing configuration data received from MC. +14:51:59.355811 hc EXECUTOR - Module LibCommon_Sync has the following parameters: { + PX_TSYNC_TIME_LIMIT := 120.000000, + PX_TSHUT_DOWN_TIME_LIMIT := 120.000000 +} +14:51:59.356155 hc EXECUTOR - Module LibCommon_Time has the following parameters: { + PX_TDONE := 120.000000, + PX_TAC := 30.000000, + PX_TNOAC := 10.000000, + PX_TWAIT := 120.000000, + PX_LOOP := 1.000000 +} +14:51:59.356598 hc EXECUTOR - Module LibItsHttp_Pics has the following parameters: { + PICS_HEADER_HOST := "location-information-service.azurewebsites.net", + PICS_HEADER_CONTENT_TYPE := "application/held+xml;charset=utf-8" +} +14:51:59.356909 hc EXECUTOR - Module LibNg112_Pics has the following parameters: { + PICS_LIS_IUT := true, + PICS_ECRF_IUT := true, + PICS_HTTP_POST_REQUEST := true, + PICS_LOCATION_HELD := true, + PICS_SERVICE_LOST := true, + PICS_LIS_URI := "/api/held", + PICS_ECRF_URI := "/service", + PICS_ECRF_REQUEST_URIs := { + "/t/0ahy0-1531830377/post" + } +} +14:51:59.357431 hc EXECUTOR - Module LibNg112_Pixits has the following parameters: { + PX_DOUBLE_CMP_EPSILON := 1.000000e-05, + PX_DEVICE_URI_SIP := "sip:user@example.net;gr=kjh29x97us97d", + PX_DEVICE_URI_TEL := "+331234567890", + PX_UNKNOWN_DEVICE_URI := "sip:no_one@example.net;gr=kjh29x97us97d", + PX_DEVICE_POSITION := { + -34.400000, + 134.400000 + }, + PX_CIRCLE_POS := { + 48.215388, + 16.290300 + }, + PX_CIRCLE_UOM := "urn:ogc:def:uom:EPSG::9001", + PX_CIRCLE_BASE := 23.600000, + PX_SRS_NAME := "urn:ogc:def:crs:EPSG::4326", + PX_LOST_ID := "6020688f1ce1896d", + PX_LOST_SERVICE_URN_1 := "urn:service:sos.police", + PX_LOST_SERVICE_URN_2 := "urn:service:sos.police", + PX_LOST_SERVICE := "urn:service:sos.police", + PX_LOST_NO_LOST := { + 48.215388, + 16.290300 + } +} +14:51:59.358277 hc EXECUTOR - Module LibSip_PIXITS has the following parameters: { + PX_SIP_SDP_USER_NAME := "voicesession", + PX_SIP_SDP_SESSION_ID := "30000", + PX_SIP_SDP_DYN := "0", + PX_SIP_SDP_B_MODIFIER := "AS", + PX_SIP_SDP_B_BANDWIDTH := 64, + PX_SIP_SDP_ENCODING := "PCMU", + PX_SIP_SDP_CLOCKRATE := "8000", + PX_MB_LENGTH_FROM_ENCVAL := true, + PX_USE_FX_FOR_XML_LENGTH := false, + PX_SIP_TRANSPORT := "UDP", + PX_SIP_REGISTRATION := false, + PX_AUTH_ALGORITHM := "AKAv1-MD5", + PX_SIP_REGISTER_AUTHENTICATION_ENABLED := true, + PX_SIP_INVITE_AUTHENTICATION_ENABLED := false, + PX_SIP_TWAIT := 30.000000, + PX_SIP_TACK := 8.000000, + PX_SIP_TRESP := 15.000000, + PX_SIP_TNOACT := 1.000000, + PX_SIP_MIME_BOUNDARY := "boundary1" +} +14:51:59.358681 hc EXECUTOR - Initializing module AtsNg112_TestCases. +14:51:59.359096 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0 Initializing module LibItsHttp_Functions. +14:51:59.359534 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibItsHttp_Functions.ttcn:0 Initializing module LibItsHttp_TypesAndValues. +14:51:59.359818 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibItsHttp_Functions.ttcn:0->../ttcn/LibItsHttp_TypesAndValues.ttcn:0 Initializing module LibItsHttp_MessageBodyTypes. +14:51:59.360056 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibItsHttp_Functions.ttcn:0->../ttcn/LibItsHttp_TypesAndValues.ttcn:0->../ttcn/LibItsHttp_MessageBodyTypes.ttcn:0 Initializing module LibItsHttp_XmlMessageBodyTypes. +14:51:59.360449 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibItsHttp_Functions.ttcn:0->../ttcn/LibItsHttp_TypesAndValues.ttcn:0->../ttcn/LibItsHttp_MessageBodyTypes.ttcn:0->../ttcn/LibItsHttp_XmlMessageBodyTypes.ttcn:0 Initializing module LibItsHttp_XMLTypes. +14:51:59.360820 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibItsHttp_Functions.ttcn:0->../ttcn/LibItsHttp_TypesAndValues.ttcn:0->../ttcn/LibItsHttp_MessageBodyTypes.ttcn:0->../ttcn/LibItsHttp_XmlMessageBodyTypes.ttcn:0 Initialization of module LibItsHttp_XMLTypes finished. +14:51:59.361246 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibItsHttp_Functions.ttcn:0->../ttcn/LibItsHttp_TypesAndValues.ttcn:0->../ttcn/LibItsHttp_MessageBodyTypes.ttcn:0->../ttcn/LibItsHttp_XmlMessageBodyTypes.ttcn:0 Initializing module urn_ietf_params_xml_ns_geopriv_held. +14:51:59.361735 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibItsHttp_Functions.ttcn:0->../ttcn/LibItsHttp_TypesAndValues.ttcn:0->../ttcn/LibItsHttp_MessageBodyTypes.ttcn:0->../ttcn/LibItsHttp_XmlMessageBodyTypes.ttcn:0->../ttcn/urn_ietf_params_xml_ns_geopriv_held.ttcn:0 Initializing module http_www_w3_org_XML_1998_namespace. +14:51:59.362013 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibItsHttp_Functions.ttcn:0->../ttcn/LibItsHttp_TypesAndValues.ttcn:0->../ttcn/LibItsHttp_MessageBodyTypes.ttcn:0->../ttcn/LibItsHttp_XmlMessageBodyTypes.ttcn:0->../ttcn/urn_ietf_params_xml_ns_geopriv_held.ttcn:0->../ttcn/http_www_w3_org_XML_1998_namespace.ttcn:0 Initializing module XSD. +14:51:59.362339 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibItsHttp_Functions.ttcn:0->../ttcn/LibItsHttp_TypesAndValues.ttcn:0->../ttcn/LibItsHttp_MessageBodyTypes.ttcn:0->../ttcn/LibItsHttp_XmlMessageBodyTypes.ttcn:0->../ttcn/urn_ietf_params_xml_ns_geopriv_held.ttcn:0->../ttcn/http_www_w3_org_XML_1998_namespace.ttcn:0->../ttcn/XSD.ttcn:0 Initializing module UsefulTtcn3Types. +14:51:59.362774 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibItsHttp_Functions.ttcn:0->../ttcn/LibItsHttp_TypesAndValues.ttcn:0->../ttcn/LibItsHttp_MessageBodyTypes.ttcn:0->../ttcn/LibItsHttp_XmlMessageBodyTypes.ttcn:0->../ttcn/urn_ietf_params_xml_ns_geopriv_held.ttcn:0->../ttcn/http_www_w3_org_XML_1998_namespace.ttcn:0->../ttcn/XSD.ttcn:0 Initialization of module UsefulTtcn3Types finished. +14:51:59.363058 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibItsHttp_Functions.ttcn:0->../ttcn/LibItsHttp_TypesAndValues.ttcn:0->../ttcn/LibItsHttp_MessageBodyTypes.ttcn:0->../ttcn/LibItsHttp_XmlMessageBodyTypes.ttcn:0->../ttcn/urn_ietf_params_xml_ns_geopriv_held.ttcn:0->../ttcn/http_www_w3_org_XML_1998_namespace.ttcn:0 Initialization of module XSD finished. +14:51:59.363658 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibItsHttp_Functions.ttcn:0->../ttcn/LibItsHttp_TypesAndValues.ttcn:0->../ttcn/LibItsHttp_MessageBodyTypes.ttcn:0->../ttcn/LibItsHttp_XmlMessageBodyTypes.ttcn:0->../ttcn/urn_ietf_params_xml_ns_geopriv_held.ttcn:0 Initialization of module http_www_w3_org_XML_1998_namespace finished. +14:51:59.364472 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibItsHttp_Functions.ttcn:0->../ttcn/LibItsHttp_TypesAndValues.ttcn:0->../ttcn/LibItsHttp_MessageBodyTypes.ttcn:0->../ttcn/LibItsHttp_XmlMessageBodyTypes.ttcn:0 Initialization of module urn_ietf_params_xml_ns_geopriv_held finished. +14:51:59.364884 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibItsHttp_Functions.ttcn:0->../ttcn/LibItsHttp_TypesAndValues.ttcn:0->../ttcn/LibItsHttp_MessageBodyTypes.ttcn:0->../ttcn/LibItsHttp_XmlMessageBodyTypes.ttcn:0 Initializing module urn_ietf_params_xml_ns_lost1. +14:51:59.365686 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibItsHttp_Functions.ttcn:0->../ttcn/LibItsHttp_TypesAndValues.ttcn:0->../ttcn/LibItsHttp_MessageBodyTypes.ttcn:0->../ttcn/LibItsHttp_XmlMessageBodyTypes.ttcn:0 Initialization of module urn_ietf_params_xml_ns_lost1 finished. +14:51:59.366103 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibItsHttp_Functions.ttcn:0->../ttcn/LibItsHttp_TypesAndValues.ttcn:0->../ttcn/LibItsHttp_MessageBodyTypes.ttcn:0 Initialization of module LibItsHttp_XmlMessageBodyTypes finished. +14:51:59.366851 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibItsHttp_Functions.ttcn:0->../ttcn/LibItsHttp_TypesAndValues.ttcn:0->../ttcn/LibItsHttp_MessageBodyTypes.ttcn:0 Initializing module LibItsHttp_BinaryMessageBodyTypes. +14:51:59.367306 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibItsHttp_Functions.ttcn:0->../ttcn/LibItsHttp_TypesAndValues.ttcn:0->../ttcn/LibItsHttp_MessageBodyTypes.ttcn:0 Initialization of module LibItsHttp_BinaryMessageBodyTypes finished. +14:51:59.367938 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibItsHttp_Functions.ttcn:0->../ttcn/LibItsHttp_TypesAndValues.ttcn:0 Initialization of module LibItsHttp_MessageBodyTypes finished. +14:51:59.368162 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibItsHttp_Functions.ttcn:0 Initialization of module LibItsHttp_TypesAndValues finished. +14:51:59.368556 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibItsHttp_Functions.ttcn:0 Initializing module LibItsHttp_Pics. +14:51:59.369078 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibItsHttp_Functions.ttcn:0 Initialization of module LibItsHttp_Pics finished. +14:51:59.369430 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0 Initialization of module LibItsHttp_Functions finished. +14:51:59.369964 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0 Initializing module LibNg112_Templates. +14:51:59.370262 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0 Initialization of module LibNg112_Templates finished. +14:51:59.370634 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0 Initializing module LibNg112_Functions. +14:51:59.370954 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0 Initializing module LibItsHttp_Templates. +14:51:59.371776 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0 Initialization of module LibItsHttp_Templates finished. +14:51:59.372166 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0 Initializing module LibItsHttp_XmlTemplates. +14:51:59.372942 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibItsHttp_XmlTemplates.ttcn:0 Initializing module urn_ietf_params_xml_ns_geopriv_held_id. +14:51:59.373634 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibItsHttp_XmlTemplates.ttcn:0 Initialization of module urn_ietf_params_xml_ns_geopriv_held_id finished. +14:51:59.374210 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibItsHttp_XmlTemplates.ttcn:0 Initializing module urn_ietf_params_xml_ns_pidf_geopriv10. +14:51:59.374644 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibItsHttp_XmlTemplates.ttcn:0->../ttcn/urn_ietf_params_xml_ns_pidf_geopriv10.ttcn:0 Initializing module urn_ietf_params_xml_ns_pidf_geopriv10_basicPolicy. +14:51:59.375557 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibItsHttp_XmlTemplates.ttcn:0->../ttcn/urn_ietf_params_xml_ns_pidf_geopriv10.ttcn:0 Initialization of module urn_ietf_params_xml_ns_pidf_geopriv10_basicPolicy finished. +14:51:59.376146 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibItsHttp_XmlTemplates.ttcn:0 Initialization of module urn_ietf_params_xml_ns_pidf_geopriv10 finished. +14:51:59.376694 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibItsHttp_XmlTemplates.ttcn:0 Initializing module urn_ietf_params_xml_ns_pidf_geopriv10_civicLoc. +14:51:59.377289 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibItsHttp_XmlTemplates.ttcn:0 Initialization of module urn_ietf_params_xml_ns_pidf_geopriv10_civicLoc finished. +14:51:59.377549 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibItsHttp_XmlTemplates.ttcn:0 Initializing module urn_ietf_params_xml_ns_pidf. +14:51:59.377931 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibItsHttp_XmlTemplates.ttcn:0 Initialization of module urn_ietf_params_xml_ns_pidf finished. +14:51:59.378535 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibItsHttp_XmlTemplates.ttcn:0 Initializing module http_www_opengis_net_pidflo_1_0. +14:51:59.378916 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibItsHttp_XmlTemplates.ttcn:0->../ttcn/http_www_opengis_net_pidflo_1_0.ttcn:0 Initializing module http_www_opengis_net_gml. +14:51:59.379161 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibItsHttp_XmlTemplates.ttcn:0->../ttcn/http_www_opengis_net_pidflo_1_0.ttcn:0 Initialization of module http_www_opengis_net_gml finished. +14:51:59.381191 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibItsHttp_XmlTemplates.ttcn:0 Initialization of module http_www_opengis_net_pidflo_1_0 finished. +14:51:59.382009 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0 Initialization of module LibItsHttp_XmlTemplates finished. +14:51:59.382601 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0 Initializing module LibNg112_TypesAndValues. +14:51:59.383091 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0 Initialization of module LibNg112_TypesAndValues finished. +14:51:59.383575 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0 Initializing module LibNg112_TestSystem. +14:51:59.384075 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0 Initializing module LibItsHttp_TestSystem. +14:51:59.384928 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibItsHttp_TestSystem.ttcn:0 Initializing module LibCommon_Sync. +14:51:59.385317 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibItsHttp_TestSystem.ttcn:0->../ttcn/LibCommon_Sync.ttcn:0 Initializing module LibCommon_AbstractData. +14:51:59.385534 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibItsHttp_TestSystem.ttcn:0->../ttcn/LibCommon_Sync.ttcn:0->../ttcn/LibCommon_AbstractData.ttcn:0 Initializing module LibCommon_BasicTypesAndValues. +14:51:59.385907 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibItsHttp_TestSystem.ttcn:0->../ttcn/LibCommon_Sync.ttcn:0->../ttcn/LibCommon_AbstractData.ttcn:0 Initialization of module LibCommon_BasicTypesAndValues finished. +14:51:59.386139 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibItsHttp_TestSystem.ttcn:0->../ttcn/LibCommon_Sync.ttcn:0 Initialization of module LibCommon_AbstractData finished. +14:51:59.386380 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibItsHttp_TestSystem.ttcn:0->../ttcn/LibCommon_Sync.ttcn:0 Initializing module LibCommon_VerdictControl. +14:51:59.386634 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibItsHttp_TestSystem.ttcn:0->../ttcn/LibCommon_Sync.ttcn:0 Initialization of module LibCommon_VerdictControl finished. +14:51:59.386906 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibItsHttp_TestSystem.ttcn:0 Initialization of module LibCommon_Sync finished. +14:51:59.387152 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibItsHttp_TestSystem.ttcn:0 Initializing module LibCommon_Time. +14:51:59.387415 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibItsHttp_TestSystem.ttcn:0 Initialization of module LibCommon_Time finished. +14:51:59.387641 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0 Initialization of module LibItsHttp_TestSystem finished. +14:51:59.387968 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0 Initializing module LibSip_Interface. +14:51:59.388194 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0 Initializing module LibSip_SIPTypesAndValues. +14:51:59.388459 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0 Initializing module LibSip_MessageBodyTypes. +14:51:59.388810 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0 Initializing module LibSip_SDPTypes. +14:51:59.389772 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0->../ttcn/LibSip_SDPTypes.ttcn:0 Initializing module LibSip_Common. +14:51:59.390606 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0->../ttcn/LibSip_SDPTypes.ttcn:0 Initialization of module LibSip_Common finished. +14:51:59.390973 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0 Initialization of module LibSip_SDPTypes finished. +14:51:59.391526 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0 Initializing module LibSip_SimpleMsgSummaryTypes. +14:51:59.391985 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0 Initialization of module LibSip_SimpleMsgSummaryTypes finished. +14:51:59.392542 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0 Initializing module LibSip_XMLTypes. +14:51:59.393311 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0->../ttcn/LibSip_XMLTypes.ttcn:0 Initializing module urn_ietf_params_xml_ns_resource_lists. +14:51:59.393610 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0->../ttcn/LibSip_XMLTypes.ttcn:0 Initialization of module urn_ietf_params_xml_ns_resource_lists finished. +14:51:59.393938 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0->../ttcn/LibSip_XMLTypes.ttcn:0 Initializing module http_uri_etsi_org_ngn_params_xml_simservs_xcap. +14:51:59.394434 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0->../ttcn/LibSip_XMLTypes.ttcn:0->../ttcn/http_uri_etsi_org_ngn_params_xml_simservs_xcap.ttcn:0 Initializing module urn_ietf_params_xml_ns_common_policy. +14:51:59.394692 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0->../ttcn/LibSip_XMLTypes.ttcn:0->../ttcn/http_uri_etsi_org_ngn_params_xml_simservs_xcap.ttcn:0 Initialization of module urn_ietf_params_xml_ns_common_policy finished. +14:51:59.395657 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0->../ttcn/LibSip_XMLTypes.ttcn:0->../ttcn/http_uri_etsi_org_ngn_params_xml_simservs_xcap.ttcn:0 Initializing module urn_oma_xml_xdm_common_policy. +14:51:59.396032 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0->../ttcn/LibSip_XMLTypes.ttcn:0->../ttcn/http_uri_etsi_org_ngn_params_xml_simservs_xcap.ttcn:0 Initialization of module urn_oma_xml_xdm_common_policy finished. +14:51:59.396747 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0->../ttcn/LibSip_XMLTypes.ttcn:0 Initialization of module http_uri_etsi_org_ngn_params_xml_simservs_xcap finished. +14:51:59.397284 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0->../ttcn/LibSip_XMLTypes.ttcn:0 Initializing module http_uri_etsi_org_ngn_params_xml_simservs_mcid. +14:51:59.397607 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0->../ttcn/LibSip_XMLTypes.ttcn:0 Initialization of module http_uri_etsi_org_ngn_params_xml_simservs_mcid finished. +14:51:59.398060 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0->../ttcn/LibSip_XMLTypes.ttcn:0 Initializing module NoTargetNamespace. +14:51:59.398412 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0->../ttcn/LibSip_XMLTypes.ttcn:0 Initialization of module NoTargetNamespace finished. +14:51:59.398979 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0->../ttcn/LibSip_XMLTypes.ttcn:0 Initializing module urn_3gpp_ns_cw_1_0. +14:51:59.399406 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0->../ttcn/LibSip_XMLTypes.ttcn:0 Initialization of module urn_3gpp_ns_cw_1_0 finished. +14:51:59.399749 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0->../ttcn/LibSip_XMLTypes.ttcn:0 Initializing module urn_ietf_params_xml_ns_conference_info. +14:51:59.400258 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0->../ttcn/LibSip_XMLTypes.ttcn:0 Initialization of module urn_ietf_params_xml_ns_conference_info finished. +14:51:59.401393 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0->../ttcn/LibSip_XMLTypes.ttcn:0 Initializing module http_uri_etsi_org_ngn_params_xml_simservs_pstn. +14:51:59.402795 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0->../ttcn/LibSip_XMLTypes.ttcn:0 Initialization of module http_uri_etsi_org_ngn_params_xml_simservs_pstn finished. +14:51:59.403128 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0->../ttcn/LibSip_XMLTypes.ttcn:0 Initializing module http_uri_etsi_org_ngn_params_xml_comm_div_info. +14:51:59.403874 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0->../ttcn/LibSip_XMLTypes.ttcn:0 Initialization of module http_uri_etsi_org_ngn_params_xml_comm_div_info finished. +14:51:59.404391 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0->../ttcn/LibSip_XMLTypes.ttcn:0 Initializing module urn_ietf_params_xml_ns_reginfo. +14:51:59.405145 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0->../ttcn/LibSip_XMLTypes.ttcn:0 Initialization of module urn_ietf_params_xml_ns_reginfo finished. +14:51:59.405755 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0->../ttcn/LibSip_MessageBodyTypes.ttcn:0 Initialization of module LibSip_XMLTypes finished. +14:51:59.406356 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_SIPTypesAndValues.ttcn:0 Initialization of module LibSip_MessageBodyTypes finished. +14:51:59.407142 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0 Initialization of module LibSip_SIPTypesAndValues finished. +14:51:59.413591 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0 Initializing module LibSip_PIXITS. +14:51:59.414095 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_PIXITS.ttcn:0 Initializing module LibCommon_DataStrings. +14:51:59.414625 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0->../ttcn/LibSip_PIXITS.ttcn:0 Initialization of module LibCommon_DataStrings finished. +14:51:59.415340 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0->../ttcn/LibSip_Interface.ttcn:0 Initialization of module LibSip_PIXITS finished. +14:51:59.415683 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0->../ttcn/LibNg112_TestSystem.ttcn:0 Initialization of module LibSip_Interface finished. +14:51:59.416210 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0->../ttcn/LibNg112_Functions.ttcn:0 Initialization of module LibNg112_TestSystem finished. +14:51:59.417570 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0 Initialization of module LibNg112_Functions finished. +14:51:59.418074 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0 Initializing module LibNg112_Pics. +14:51:59.418421 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0 Initialization of module LibNg112_Pics finished. +14:51:59.425450 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0 Initializing module LibNg112_Pixits. +14:51:59.425853 hc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:0 Initialization of module LibNg112_Pixits finished. +14:51:59.426301 hc EXECUTOR - Initialization of module AtsNg112_TestCases finished. +14:51:59.426577 hc EXECUTOR - Initializing module AtsNg112_TestControl. +14:51:59.426897 hc EXECUTOR - Initialization of module AtsNg112_TestControl finished. +14:51:59.427349 hc EXECUTOR - Initializing module LibCommon_TextStrings. +14:51:59.427763 hc EXECUTOR - Initialization of module LibCommon_TextStrings finished. +14:51:59.428030 hc EXECUTOR - Initializing module LibItsHttp_BinaryTemplates. +14:51:59.428268 hc EXECUTOR - Initialization of module LibItsHttp_BinaryTemplates finished. +14:51:59.428693 hc EXECUTOR - Initializing module LibItsHttp_BinaryTypes. +14:51:59.428969 hc EXECUTOR - Initialization of module LibItsHttp_BinaryTypes finished. +14:51:59.429434 hc EXECUTOR - Initializing module LibItsHttp_EncdecDeclarations. +14:51:59.429673 hc EXECUTOR - Initialization of module LibItsHttp_EncdecDeclarations finished. +14:51:59.430281 hc EXECUTOR - Initializing module LibNg112_EncdecDeclarations. +14:51:59.431030 hc EXECUTOR ../ttcn/LibNg112_EncdecDeclarations.ttcn:0 Initializing module urn_ietf_params_xml_ns_pidf_geopriv10_geoShape. +14:51:59.431336 hc EXECUTOR ../ttcn/LibNg112_EncdecDeclarations.ttcn:0 Initialization of module urn_ietf_params_xml_ns_pidf_geopriv10_geoShape finished. +14:51:59.431768 hc EXECUTOR - Initialization of module LibNg112_EncdecDeclarations finished. +14:51:59.432311 hc EXECUTOR - Initializing module LibSip_EncdecDeclarations. +14:51:59.432825 hc EXECUTOR ../ttcn/LibSip_EncdecDeclarations.ttcn:0 Initializing module LibSip_SMSTypesAndValues. +14:51:59.433142 hc EXECUTOR ../ttcn/LibSip_EncdecDeclarations.ttcn:0 Initialization of module LibSip_SMSTypesAndValues finished. +14:51:59.433598 hc EXECUTOR - Initialization of module LibSip_EncdecDeclarations finished. +14:51:59.434079 hc EXECUTOR - Initializing module LibSip_Library. +14:51:59.436439 hc EXECUTOR ../ttcn/LibSip_Library.ttcn:0 Initializing module LibSip_SMSTemplates. +14:51:59.438195 hc EXECUTOR ../ttcn/LibSip_Library.ttcn:0->../ttcn/LibSip_SMSTemplates.ttcn:0 Initializing module LibSip_SMSFunctions. +14:51:59.438784 hc EXECUTOR ../ttcn/LibSip_Library.ttcn:0->../ttcn/LibSip_SMSTemplates.ttcn:0 Initialization of module LibSip_SMSFunctions finished. +14:51:59.467235 hc EXECUTOR ../ttcn/LibSip_Library.ttcn:0 Initialization of module LibSip_SMSTemplates finished. +14:51:59.473325 hc EXECUTOR ../ttcn/LibSip_Library.ttcn:0 Initializing module LibSip_Steps. +14:51:59.473881 hc EXECUTOR ../ttcn/LibSip_Library.ttcn:0->../ttcn/LibSip_Steps.ttcn:0 Initializing module LibSip_Templates. +14:51:59.499338 hc EXECUTOR ../ttcn/LibSip_Library.ttcn:0->../ttcn/LibSip_Steps.ttcn:0 Initialization of module LibSip_Templates finished. +14:51:59.500039 hc EXECUTOR ../ttcn/LibSip_Library.ttcn:0 Initialization of module LibSip_Steps finished. +14:51:59.500372 hc EXECUTOR - Initialization of module LibSip_Library finished. +14:51:59.500861 hc EXECUTOR - Initializing module PreGenRecordOf. +14:51:59.502630 hc EXECUTOR - Initialization of module PreGenRecordOf finished. +14:51:59.503143 hc EXECUTOR - Initializing module TitanLoggerApi. +14:51:59.503580 hc EXECUTOR - Initialization of module TitanLoggerApi finished. +14:51:59.503863 hc EXECUTOR - Initializing module urn_ietf_params_xml_ns_geopriv_conf. +14:51:59.504158 hc EXECUTOR - Initialization of module urn_ietf_params_xml_ns_geopriv_conf finished. +14:51:59.504786 hc EXECUTOR - Configuration data was processed successfully. +14:51:59.507387 hc EXECUTOR - MTC was created. Process id: 10173. +14:51:59.508824 mtc EXECUTOR - TTCN-3 Main Test Component started on vagrant. Version: CRL 113 200/6 R4A. +14:51:59.509092 mtc EXECUTOR - TTCN Logger v2.2 options: TimeStampFormat:=Time; LogEntityName:=Yes; LogEventTypes:=Yes; SourceInfoFormat:=Stack; *.FileMask:=LOG_ALL | MATCHING | DEBUG; *.ConsoleMask:=LOG_ALL | MATCHING | DEBUG; LogFileSize:=0; LogFileNumber:=1; DiskFullAction:=Error +14:51:59.509372 mtc EXECUTOR - Connected to MC. +14:51:59.510000 mtc EXECUTOR - Executing test case TC_LIS_HTTP_POST_BV_03 in module AtsNg112_TestCases. +14:51:59.510435 mtc TESTCASE ../ttcn/AtsNg112_TestCases.ttcn:361(testcase:TC_LIS_HTTP_POST_BV_03) Test case TC_LIS_HTTP_POST_BV_03 started. +14:51:59.510952 mtc PARALLEL ../ttcn/AtsNg112_TestCases.ttcn:361(testcase:TC_LIS_HTTP_POST_BV_03) Initializing variables, timers and ports of component type LibItsHttp_TestSystem.HttpComponent inside testcase TC_LIS_HTTP_POST_BV_03. +14:51:59.511659 mtc PORTEVENT ../ttcn/AtsNg112_TestCases.ttcn:361(testcase:TC_LIS_HTTP_POST_BV_03) Port syncPort was started. +14:51:59.512222 mtc PORTEVENT ../ttcn/AtsNg112_TestCases.ttcn:361(testcase:TC_LIS_HTTP_POST_BV_03) Port syncSendPort was started. +14:51:59.512543 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:361(testcase:TC_LIS_HTTP_POST_BV_03) >>> HttpPort::user_start +14:51:59.512954 mtc PORTEVENT ../ttcn/AtsNg112_TestCases.ttcn:361(testcase:TC_LIS_HTTP_POST_BV_03) Port httpPort was started. +14:51:59.513265 mtc PARALLEL ../ttcn/AtsNg112_TestCases.ttcn:361(testcase:TC_LIS_HTTP_POST_BV_03) Component type LibItsHttp_TestSystem.HttpComponent was initialized. +14:51:59.513694 mtc PARALLEL ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Mapping port mtc:httpPort to system:httpPort. +14:51:59.514329 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) HttpPort::set_parameter: params=HTTP(codecs=lost:lost_codec;held:held_codec)/TCP(debug=1,server=location-information-service.azurewebsites.net,port=80,use_ssl=0) +14:51:59.514726 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) >>> HttpPort::user_map: httpPort +14:51:59.515152 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) HttpPort::user_map: HTTP(codecs=lost:lost_codec;held:held_codec)/TCP(debug=1,server=location-information-service.azurewebsites.net,port=80,use_ssl=0) +14:51:59.515814 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) >>> params::convert: HTTP(codecs=lost:lost_codec;held:held_codec)/TCP(debug=1,server=location-information-service.azurewebsites.net,port=80,use_ssl=0) +14:51:59.520126 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) params::convert: 4 - codecs=lost:lost_codec;held:held_codec)/TCP(debug=1, - codecs - lost:lost_codec;held:held_codec)/TCP(debug=1 - , +14:51:59.521096 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) params::convert: 4 - server=location-information-service.azurewebsites.net, - server - location-information-service.azurewebsites.net - , +14:51:59.521843 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) params::convert: 4 - port=80, - port - 80 - , +14:51:59.522434 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) params::convert: 4 - use_ssl=0) - use_ssl - 0) - +14:51:59.522909 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) <<< params::convert +14:51:59.523421 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) >>> layer_stack_builder::create_layer_stack: HTTP(codecs=lost:lost_codec;held:held_codec)/TCP(debug=1,server=location-information-service.azurewebsites.net,port=80,use_ssl=0) +14:51:59.526839 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) layer_stack_builder::create_layer_stack: 5 - HTTP(codecs=lost:lost_codec;held:held_codec)/ - HTTP - (codecs=lost:lost_codec;held:held_codec) - codecs=lost:lost_codec;held:held_codec +14:51:59.527805 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) layer_stack_builder::create_layer_stack: Create layer HTTP, codecs=lost:lost_codec;held:held_codec +14:51:59.528403 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) >>> http_layer::http_layer: HTTP, codecs=lost:lost_codec;held:held_codec +14:51:59.529112 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) >>> params::convert: codecs=lost:lost_codec;held:held_codec +14:51:59.532794 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) params::convert: 4 - codecs=lost:lost_codec;held:held_codec - codecs - lost:lost_codec;held:held_codec - +14:51:59.534675 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) <<< params::convert +14:51:59.536225 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) >>> http_codec::set_payload_codecs: lost:lost_codec;held:held_codec +14:51:59.543885 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) http_codec::set_payload_codecs: 6 - lost - lost_codec - ;held:held_codec - held - held_codec - - - +14:51:59.544591 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) http_codec::set_payload_codecs: insert (lost, lost_codec), j = 1 +14:51:59.545299 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) http_codec::set_payload_codecs: insert (held, held_codec), j = 4 +14:51:59.546113 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) layer_stack_builder::create_layer_stack: Setup layers for HTTP +14:51:59.546922 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) layer_stack_builder::create_layer_stack: 5 - TCP(debug=1,server=location-information-service.azurewebsites.net,port=80,use_ssl=0) - TCP - (debug=1,server=location-information-service.azurewebsites.net,port=80,use_ssl=0) - debug=1,server=location-information-service.azurewebsites.net,port=80,use_ssl=0 +14:51:59.547536 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) layer_stack_builder::create_layer_stack: Create layer TCP, debug=1,server=location-information-service.azurewebsites.net,port=80,use_ssl=0 +14:51:59.547884 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) >>> tcp_layer::tcp_layer: TCP, debug=1,server=location-information-service.azurewebsites.net,port=80,use_ssl=0 +14:51:59.548322 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) >>> params::convert: debug=1,server=location-information-service.azurewebsites.net,port=80,use_ssl=0 +14:51:59.550903 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) params::convert: 4 - debug=1, - debug - 1 - , +14:51:59.552096 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) params::convert: 4 - server=location-information-service.azurewebsites.net, - server - location-information-service.azurewebsites.net - , +14:51:59.554172 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) params::convert: 4 - port=80, - port - 80 - , +14:51:59.555688 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) params::convert: 4 - use_ssl=0 - use_ssl - 0 - +14:51:59.556202 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) <<< params::convert +14:51:59.556540 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) params::log +14:51:59.556985 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) (debug, 1) +14:51:59.557415 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) (port, 80) +14:51:59.557722 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) (server, location-information-service.azurewebsites.net) +14:51:59.558011 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) (use_ssl, 0) +14:51:59.558449 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: entering SSL_Socket::parameter_set(server, location-information-service.azurewebsites.net) +14:51:59.558727 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: leaving SSL_Socket::parameter_set(server, location-information-service.azurewebsites.net) +14:51:59.559173 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: entering Abstract_Socket::parameter_set(server, location-information-service.azurewebsites.net) +14:51:59.559814 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: leaving Abstract_Socket::parameter_set(server, location-information-service.azurewebsites.net) +14:51:59.560121 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: entering SSL_Socket::parameter_set(port, 80) +14:51:59.560608 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: leaving SSL_Socket::parameter_set(port, 80) +14:51:59.560938 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: entering Abstract_Socket::parameter_set(port, 80) +14:51:59.561879 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: leaving Abstract_Socket::parameter_set(port, 80) +14:51:59.562551 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: entering SSL_Socket::parameter_set(use_connection_ASPs, yes) +14:51:59.563130 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: leaving SSL_Socket::parameter_set(use_connection_ASPs, yes) +14:51:59.563706 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: entering Abstract_Socket::parameter_set(use_connection_ASPs, yes) +14:51:59.564289 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: leaving Abstract_Socket::parameter_set(use_connection_ASPs, yes) +14:51:59.564712 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: entering SSL_Socket::parameter_set(server_backlog, 1024) +14:51:59.565413 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: leaving SSL_Socket::parameter_set(server_backlog, 1024) +14:51:59.565733 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: entering Abstract_Socket::parameter_set(server_backlog, 1024) +14:51:59.566362 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: leaving Abstract_Socket::parameter_set(server_backlog, 1024) +14:51:59.566879 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: entering Abstract_Socket::map_user() +14:51:59.567762 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: leaving Abstract_Socket::map_user() +14:51:59.568607 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: Abstract_Socket::open_client_connection(remoteAddr: location-information-service.azurewebsites.net/80, localAddr: UNSPEC/UNSPEC) called +14:52:00.542285 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: Number of remote addresses: 1 + +14:52:02.395684 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: Using address family for socket 6: IPv4 +14:52:02.396007 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: Connecting to server from address UNSPEC/UNSPEC +14:52:02.481500 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: Connection established (addr): 10.0.2.15/55330 -> location-information-service.azurewebsites.net/80 + +14:52:02.482236 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: connected to: host location-information-service.azurewebsites.net service 80 via address family IPv4 + +14:52:02.482556 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: Abstract_Socket::peer_list_add_peer: Adding client 6 to peer list +14:52:02.482950 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: Abstract_Socket::peer_list_get_last_peer: Finding last peer of the peer array +14:52:02.483340 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: Abstract_Socket::peer_list_get_last_peer: No active peer found +14:52:02.483719 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: Abstract_Socket::peer_list_resize_list: Resizing to 7 +14:52:02.483998 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: Abstract_Socket::peer_list_resize_list: New length is 7 +14:52:02.484429 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Abstract socket: Abstract_Socket::open_client_connection(). Handler set to socket fd 6 +14:52:02.484924 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) >>> tcp_layer::add_user_data: 6 +14:52:02.488930 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) tcp_layer::add_user_data: Non secured mode +14:52:02.490590 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) >>> tcp_layer::client_connection_opened: 6 +14:52:02.491764 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) layer_stack_builder::create_layer_stack: Setup layers for TCP +14:52:02.492993 mtc PORTEVENT ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Port httpPort was mapped to system:httpPort. +14:52:02.494483 mtc PARALLEL ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:23(function:f_cf_01_http_up) Map operation of mtc:httpPort to system:httpPort finished. +14:52:02.496811 mtc PARALLEL ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:26(function:f_cf_01_http_up)->../ttcn/LibCommon_Sync.ttcn:197(function:f_connect4SelfOrClientSync)->../ttcn/LibCommon_Sync.ttcn:1090(function:f_connect4SelfSync) Connecting ports mtc:syncSendPort and mtc:syncPort. +14:52:02.499036 mtc PORTEVENT ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:26(function:f_cf_01_http_up)->../ttcn/LibCommon_Sync.ttcn:197(function:f_connect4SelfOrClientSync)->../ttcn/LibCommon_Sync.ttcn:1090(function:f_connect4SelfSync) Port syncPort has established the connection with local port syncSendPort. +14:52:02.501957 mtc PORTEVENT ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:26(function:f_cf_01_http_up)->../ttcn/LibCommon_Sync.ttcn:197(function:f_connect4SelfOrClientSync)->../ttcn/LibCommon_Sync.ttcn:1090(function:f_connect4SelfSync) Port syncSendPort has established the connection with local port syncPort. +14:52:02.503912 mtc PARALLEL ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:26(function:f_cf_01_http_up)->../ttcn/LibCommon_Sync.ttcn:197(function:f_connect4SelfOrClientSync)->../ttcn/LibCommon_Sync.ttcn:1090(function:f_connect4SelfSync) Connect operation on mtc:syncSendPort and mtc:syncPort finished. +14:52:02.505400 mtc DEFAULTOP ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:28(function:f_cf_01_http_up) Altstep a_cf_01_http_down was activated as default, id 1 +14:52:02.507354 mtc DEFAULTOP ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:29(function:f_cf_01_http_up) Altstep a_default_requests was activated as default, id 2 +14:52:02.509149 mtc DEFAULTOP ../ttcn/AtsNg112_TestCases.ttcn:374(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:30(function:f_cf_01_http_up) Altstep a_default_responses was activated as default, id 3 +14:52:02.511006 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:381(testcase:TC_LIS_HTTP_POST_BV_03) Warning: No UTF-8 Byte Order Mark(BOM) detected. It may result decoding errors +14:52:02.513205 mtc PORTEVENT ../ttcn/AtsNg112_TestCases.ttcn:381(testcase:TC_LIS_HTTP_POST_BV_03) Sent on httpPort to system @LibItsHttp_TypesAndValues.HttpMessage : { + request := { + method := "POST", + uri := "/api/held", + version_major := 1, + version_minor := 1, + header := { + { + header_name := "Host", + header_value := { + "location-information-service.azurewebsites.net" + } + }, + { + header_name := "Content-type", + header_value := { + "application/held+xml;charset=utf-8" + } + }, + { + header_name := "Content-length", + header_value := { + "0" + } + }, + { + header_name := "Connection", + header_value := { + "keep-alive" + } + }, + { + header_name := "Pragma", + header_value := { + "no-cache" + } + }, + { + header_name := "Cache-Control", + header_value := { + "no-cache" + } + } + }, + body := { + xml_body := { + locationRequest := { + responseTime := omit, + attr := omit, + locationType := { + exact := true, + base := { + alt_1 := { + geodetic (1) + } + } + }, + elem_list := { + " + sip:no_one@example.net;gr=kjh29x97us97d + + +" + } + } + } + } + } +} +14:52:02.513803 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:381(testcase:TC_LIS_HTTP_POST_BV_03) >>> HttpPort::outgoing_send: payload={ + request := { + method := "POST", + uri := "/api/held", + version_major := 1, + version_minor := 1, + header := { + { + header_name := "Host", + header_value := { + "location-information-service.azurewebsites.net" + } + }, + { + header_name := "Content-type", + header_value := { + "application/held+xml;charset=utf-8" + } + }, + { + header_name := "Content-length", + header_value := { + "0" + } + }, + { + header_name := "Connection", + header_value := { + "keep-alive" + } + }, + { + header_name := "Pragma", + header_value := { + "no-cache" + } + }, + { + header_name := "Cache-Control", + header_value := { + "no-cache" + } + } + }, + body := { + xml_body := { + locationRequest := { + responseTime := omit, + attr := omit, + locationType := { + exact := true, + base := { + alt_1 := { + geodetic (1) + } + } + }, + elem_list := { + " + sip:no_one@example.net;gr=kjh29x97us97d + + +" + } + } + } + } + } +} +14:52:02.515241 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:381(testcase:TC_LIS_HTTP_POST_BV_03) >>> http_layer::sendMsg: { + request := { + method := "POST", + uri := "/api/held", + version_major := 1, + version_minor := 1, + header := { + { + header_name := "Host", + header_value := { + "location-information-service.azurewebsites.net" + } + }, + { + header_name := "Content-type", + header_value := { + "application/held+xml;charset=utf-8" + } + }, + { + header_name := "Content-length", + header_value := { + "0" + } + }, + { + header_name := "Connection", + header_value := { + "keep-alive" + } + }, + { + header_name := "Pragma", + header_value := { + "no-cache" + } + }, + { + header_name := "Cache-Control", + header_value := { + "no-cache" + } + } + }, + body := { + xml_body := { + locationRequest := { + responseTime := omit, + attr := omit, + locationType := { + exact := true, + base := { + alt_1 := { + geodetic (1) + } + } + }, + elem_list := { + " + sip:no_one@example.net;gr=kjh29x97us97d + + +" + } + } + } + } + } +} +14:52:02.516351 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:381(testcase:TC_LIS_HTTP_POST_BV_03) >>> http_codec::encode: { + request := { + method := "POST", + uri := "/api/held", + version_major := 1, + version_minor := 1, + header := { + { + header_name := "Host", + header_value := { + "location-information-service.azurewebsites.net" + } + }, + { + header_name := "Content-type", + header_value := { + "application/held+xml;charset=utf-8" + } + }, + { + header_name := "Content-length", + header_value := { + "0" + } + }, + { + header_name := "Connection", + header_value := { + "keep-alive" + } + }, + { + header_name := "Pragma", + header_value := { + "no-cache" + } + }, + { + header_name := "Cache-Control", + header_value := { + "no-cache" + } + } + }, + body := { + xml_body := { + locationRequest := { + responseTime := omit, + attr := omit, + locationType := { + exact := true, + base := { + alt_1 := { + geodetic (1) + } + } + }, + elem_list := { + " + sip:no_one@example.net;gr=kjh29x97us97d + + +" + } + } + } + } + } +} +14:52:02.518024 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:381(testcase:TC_LIS_HTTP_POST_BV_03) >>> http_codec::encode_request: { + method := "POST", + uri := "/api/held", + version_major := 1, + version_minor := 1, + header := { + { + header_name := "Host", + header_value := { + "location-information-service.azurewebsites.net" + } + }, + { + header_name := "Content-type", + header_value := { + "application/held+xml;charset=utf-8" + } + }, + { + header_name := "Content-length", + header_value := { + "0" + } + }, + { + header_name := "Connection", + header_value := { + "keep-alive" + } + }, + { + header_name := "Pragma", + header_value := { + "no-cache" + } + }, + { + header_name := "Cache-Control", + header_value := { + "no-cache" + } + } + }, + body := { + xml_body := { + locationRequest := { + responseTime := omit, + attr := omit, + locationType := { + exact := true, + base := { + alt_1 := { + geodetic (1) + } + } + }, + elem_list := { + " + sip:no_one@example.net;gr=kjh29x97us97d + + +" + } + } + } + } +} +14:52:02.519450 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:381(testcase:TC_LIS_HTTP_POST_BV_03) http_codec::encode_request: body: { + xml_body := { + locationRequest := { + responseTime := omit, + attr := omit, + locationType := { + exact := true, + base := { + alt_1 := { + geodetic (1) + } + } + }, + elem_list := { + " + sip:no_one@example.net;gr=kjh29x97us97d + + +" + } + } + } +} +14:52:02.519976 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:381(testcase:TC_LIS_HTTP_POST_BV_03) >>> http_codec::encode_body: { + xml_body := { + locationRequest := { + responseTime := omit, + attr := omit, + locationType := { + exact := true, + base := { + alt_1 := { + geodetic (1) + } + } + }, + elem_list := { + " + sip:no_one@example.net;gr=kjh29x97us97d + + +" + } + } + } +} +14:52:02.520994 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:381(testcase:TC_LIS_HTTP_POST_BV_03) http_codec::encode_body: # of codecs=2 +14:52:02.521926 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:381(testcase:TC_LIS_HTTP_POST_BV_03) http_codec::encode_body: Call 'held_codec' +14:52:02.522418 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:381(testcase:TC_LIS_HTTP_POST_BV_03) >>> held_codec::encode: { + locationRequest := { + responseTime := omit, + attr := omit, + locationType := { + exact := true, + base := { + alt_1 := { + geodetic (1) + } + } + }, + elem_list := { + " + sip:no_one@example.net;gr=kjh29x97us97d + + +" + } + } +} +14:52:02.523717 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:381(testcase:TC_LIS_HTTP_POST_BV_03) held_codec::encode: Process LocationRequestType{ + responseTime := omit, + attr := omit, + locationType := { + exact := true, + base := { + alt_1 := { + geodetic (1) + } + } + }, + elem_list := { + " + sip:no_one@example.net;gr=kjh29x97us97d + + +" + } +} +14:52:02.524906 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:381(testcase:TC_LIS_HTTP_POST_BV_03) held_codec::decode: After encoding: '3C68656C643A6C6F636174696F6E5265717565737420786D6C6E733A68656C643D2775726E3A696574663A706172616D733A786D6C3A6E733A67656F707269763A68656C64273E0A093C68656C643A6C6F636174696F6E547970652065786163743D2774727565273E67656F64657469633C2F68656C643A6C6F636174696F6E547970653E0A093C69643A64657669636520786D6C6E733A69643D2775726E3A696574663A706172616D733A786D6C3A6E733A67656F707269763A68656C643A6964273E0A093C7572693E7369703A6E6F5F6F6E65406578616D706C652E6E65743B67723D6B6A68323978393775733937643C2F7572693E0A3C2F69643A6465766963653E0A0A0A3C2F68656C643A6C6F636174696F6E526571756573743E0A0A'O (" + geodetic + + sip:no_one@example.net;gr=kjh29x97us97d + + + + + +") +14:52:02.533876 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:381(testcase:TC_LIS_HTTP_POST_BV_03) <<< held_codec::encode +14:52:02.534707 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:381(testcase:TC_LIS_HTTP_POST_BV_03) http_codec::encode_body: HTTP message '3C68656C643A6C6F636174696F6E5265717565737420786D6C6E733A68656C643D2775726E3A696574663A706172616D733A786D6C3A6E733A67656F707269763A68656C64273E0A093C68656C643A6C6F636174696F6E547970652065786163743D2774727565273E67656F64657469633C2F68656C643A6C6F636174696F6E547970653E0A093C69643A64657669636520786D6C6E733A69643D2775726E3A696574663A706172616D733A786D6C3A6E733A67656F707269763A68656C643A6964273E0A093C7572693E7369703A6E6F5F6F6E65406578616D706C652E6E65743B67723D6B6A68323978393775733937643C2F7572693E0A3C2F69643A6465766963653E0A0A0A3C2F68656C643A6C6F636174696F6E526571756573743E0A0A'O (" + geodetic + + sip:no_one@example.net;gr=kjh29x97us97d + + + + + +") +14:52:02.541323 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:381(testcase:TC_LIS_HTTP_POST_BV_03) http_codec::encode_body: HTTP message length: 289 +14:52:02.541573 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:381(testcase:TC_LIS_HTTP_POST_BV_03) http_codec::encode_request: length=289 +14:52:02.542368 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:381(testcase:TC_LIS_HTTP_POST_BV_03) http_codec::encode_request: Processing header "Host" +14:52:02.542785 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:381(testcase:TC_LIS_HTTP_POST_BV_03) http_codec::encode_request: Processing value "location-information-service.azurewebsites.net" +14:52:02.543180 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:381(testcase:TC_LIS_HTTP_POST_BV_03) http_codec::encode_request: Processing header "Content-type" +14:52:02.543634 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:381(testcase:TC_LIS_HTTP_POST_BV_03) http_codec::encode_request: Processing value "application/held+xml;charset=utf-8" +14:52:02.544056 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:381(testcase:TC_LIS_HTTP_POST_BV_03) http_codec::encode_request: Processing header "Content-length" +14:52:02.544875 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:381(testcase:TC_LIS_HTTP_POST_BV_03) http_codec::encode_request: Processing header "Connection" +14:52:02.545653 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:381(testcase:TC_LIS_HTTP_POST_BV_03) http_codec::encode_request: Processing value "keep-alive" +14:52:02.546047 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:381(testcase:TC_LIS_HTTP_POST_BV_03) http_codec::encode_request: Processing header "Pragma" +14:52:02.547276 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:381(testcase:TC_LIS_HTTP_POST_BV_03) http_codec::encode_request: Processing value "no-cache" +14:52:02.547743 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:381(testcase:TC_LIS_HTTP_POST_BV_03) http_codec::encode_request: Processing header "Cache-Control" +14:52:02.550933 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:381(testcase:TC_LIS_HTTP_POST_BV_03) http_codec::encode_request: Processing value "no-cache" +14:52:02.551714 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:381(testcase:TC_LIS_HTTP_POST_BV_03) <<< http_codec::encode: data='504F5354202F6170692F68656C6420485454502F312E310D0A486F73743A206C6F636174696F6E2D696E666F726D6174696F6E2D736572766963652E617A75726577656273697465732E6E65740D0A436F6E74656E742D747970653A206170706C69636174696F6E2F68656C642B786D6C3B636861727365743D7574662D380D0A436F6E74656E742D6C656E6774683A203239310D0A436F6E6E656374696F6E3A206B6565702D616C6976650D0A507261676D613A206E6F2D63616368650D0A43616368652D436F6E74726F6C3A206E6F2D63616368650D0A0D0A3C68656C643A6C6F636174696F6E5265717565737420786D6C6E733A68656C643D2775726E3A696574663A706172616D733A786D6C3A6E733A67656F707269763A68656C64273E0A093C68656C643A6C6F636174696F6E547970652065786163743D2774727565273E67656F64657469633C2F68656C643A6C6F636174696F6E547970653E0A093C69643A64657669636520786D6C6E733A69643D2775726E3A696574663A706172616D733A786D6C3A6E733A67656F707269763A68656C643A6964273E0A093C7572693E7369703A6E6F5F6F6E65406578616D706C652E6E65743B67723D6B6A68323978393775733937643C2F7572693E0A3C2F69643A6465766963653E0A0A0A3C2F68656C643A6C6F636174696F6E526571756573743E0A0A0D0A'O ("POST /api/held HTTP/1.1\r +Host: location-information-service.azurewebsites.net\r +Content-type: application/held+xml;charset=utf-8\r +Content-length: 291\r +Connection: keep-alive\r +Pragma: no-cache\r +Cache-Control: no-cache\r +\r + + geodetic + + sip:no_one@example.net;gr=kjh29x97us97d + + + + + +\r +") +14:52:02.572874 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:381(testcase:TC_LIS_HTTP_POST_BV_03) >>> http_layer::send_data: '504F5354202F6170692F68656C6420485454502F312E310D0A486F73743A206C6F636174696F6E2D696E666F726D6174696F6E2D736572766963652E617A75726577656273697465732E6E65740D0A436F6E74656E742D747970653A206170706C69636174696F6E2F68656C642B786D6C3B636861727365743D7574662D380D0A436F6E74656E742D6C656E6774683A203239310D0A436F6E6E656374696F6E3A206B6565702D616C6976650D0A507261676D613A206E6F2D63616368650D0A43616368652D436F6E74726F6C3A206E6F2D63616368650D0A0D0A3C68656C643A6C6F636174696F6E5265717565737420786D6C6E733A68656C643D2775726E3A696574663A706172616D733A786D6C3A6E733A67656F707269763A68656C64273E0A093C68656C643A6C6F636174696F6E547970652065786163743D2774727565273E67656F64657469633C2F68656C643A6C6F636174696F6E547970653E0A093C69643A64657669636520786D6C6E733A69643D2775726E3A696574663A706172616D733A786D6C3A6E733A67656F707269763A68656C643A6964273E0A093C7572693E7369703A6E6F5F6F6E65406578616D706C652E6E65743B67723D6B6A68323978393775733937643C2F7572693E0A3C2F69643A6465766963653E0A0A0A3C2F68656C643A6C6F636174696F6E526571756573743E0A0A0D0A'O ("POST /api/held HTTP/1.1\r +Host: location-information-service.azurewebsites.net\r +Content-type: application/held+xml;charset=utf-8\r +Content-length: 291\r +Connection: keep-alive\r +Pragma: no-cache\r +Cache-Control: no-cache\r +\r + + geodetic + + sip:no_one@example.net;gr=kjh29x97us97d + + + + + +\r +") +14:52:02.595568 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:381(testcase:TC_LIS_HTTP_POST_BV_03) >>> tcp_layer::send_data: '504F5354202F6170692F68656C6420485454502F312E310D0A486F73743A206C6F636174696F6E2D696E666F726D6174696F6E2D736572766963652E617A75726577656273697465732E6E65740D0A436F6E74656E742D747970653A206170706C69636174696F6E2F68656C642B786D6C3B636861727365743D7574662D380D0A436F6E74656E742D6C656E6774683A203239310D0A436F6E6E656374696F6E3A206B6565702D616C6976650D0A507261676D613A206E6F2D63616368650D0A43616368652D436F6E74726F6C3A206E6F2D63616368650D0A0D0A3C68656C643A6C6F636174696F6E5265717565737420786D6C6E733A68656C643D2775726E3A696574663A706172616D733A786D6C3A6E733A67656F707269763A68656C64273E0A093C68656C643A6C6F636174696F6E547970652065786163743D2774727565273E67656F64657469633C2F68656C643A6C6F636174696F6E547970653E0A093C69643A64657669636520786D6C6E733A69643D2775726E3A696574663A706172616D733A786D6C3A6E733A67656F707269763A68656C643A6964273E0A093C7572693E7369703A6E6F5F6F6E65406578616D706C652E6E65743B67723D6B6A68323978393775733937643C2F7572693E0A3C2F69643A6465766963653E0A0A0A3C2F68656C643A6C6F636174696F6E526571756573743E0A0A0D0A'O ("POST /api/held HTTP/1.1\r +Host: location-information-service.azurewebsites.net\r +Content-type: application/held+xml;charset=utf-8\r +Content-length: 291\r +Connection: keep-alive\r +Pragma: no-cache\r +Cache-Control: no-cache\r +\r + + geodetic + + sip:no_one@example.net;gr=kjh29x97us97d + + + + + +\r +") +14:52:02.621008 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:381(testcase:TC_LIS_HTTP_POST_BV_03) tcp_layer::send_data: SSL mode: 0 +14:52:02.621346 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:381(testcase:TC_LIS_HTTP_POST_BV_03) Abstract socket: entering Abstract_Socket::send_outgoing() +14:52:02.621589 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:381(testcase:TC_LIS_HTTP_POST_BV_03) Abstract socket: Sending data: Size: 510, Msg: 50 4f 53 54 20 2f 61 70 69 2f 68 65 6c 64 20 48 54 54 50 2f 31 2e 31 0d 0a 48 6f 73 74 3a 20 6c 6f 63 61 74 69 6f 6e 2d 69 6e 66 6f 72 6d 61 74 69 6f 6e 2d 73 65 72 76 69 63 65 2e 61 7a 75 72 65 77 65 62 73 69 74 65 73 2e 6e 65 74 0d 0a 43 6f 6e 74 65 6e 74 2d 74 79 70 65 3a 20 61 70 70 6c 69 63 61 74 69 6f 6e 2f 68 65 6c 64 2b 78 6d 6c 3b 63 68 61 72 73 65 74 3d 75 74 66 2d 38 0d 0a 43 6f 6e 74 65 6e 74 2d 6c 65 6e 67 74 68 3a 20 32 39 31 0d 0a 43 6f 6e 6e 65 63 74 69 6f 6e 3a 20 6b 65 65 70 2d 61 6c 69 76 65 0d 0a 50 72 61 67 6d 61 3a 20 6e 6f 2d 63 61 63 68 65 0d 0a 43 61 63 68 65 2d 43 6f 6e 74 72 6f 6c 3a 20 6e 6f 2d 63 61 63 68 65 0d 0a 0d 0a 3c 68 65 6c 64 3a 6c 6f 63 61 74 69 6f 6e 52 65 71 75 65 73 74 20 78 6d 6c 6e 73 3a 68 65 6c 64 3d 27 75 72 6e 3a 69 65 74 66 3a 70 61 72 61 6d 73 3a 78 6d 6c 3a 6e 73 3a 67 65 6f 70 72 69 76 3a 68 65 6c 64 27 3e 0a 09 3c 68 65 6c 64 3a 6c 6f 63 61 74 69 6f 6e 54 79 70 65 20 65 78 61 63 74 3d 27 74 72 75 65 27 3e 67 65 6f 64 65 74 69 63 3c 2f 68 65 6c 64 3a 6c 6f 63 61 74 69 6f 6e 54 79 70 65 3e 0a 09 3c 69 64 3a 64 65 76 69 63 65 20 78 6d 6c 6e 73 3a 69 64 3d 27 75 72 6e 3a 69 65 74 66 3a 70 61 72 61 6d 73 3a 78 6d 6c 3a 6e 73 3a 67 65 6f 70 72 69 76 3a 68 65 6c 64 3a 69 64 27 3e 0a 09 3c 75 72 69 3e 73 69 70 3a 6e 6f 5f 6f 6e 65 40 65 78 61 6d 70 6c 65 2e 6e 65 74 3b 67 72 3d 6b 6a 68 32 39 78 39 37 75 73 39 37 64 3c 2f 75 72 69 3e 0a 3c 2f 69 64 3a 64 65 76 69 63 65 3e 0a 0a 0a 3c 2f 68 65 6c 64 3a 6c 6f 63 61 74 69 6f 6e 52 65 71 75 65 73 74 3e 0a 0a 0d 0a +14:52:02.627244 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:381(testcase:TC_LIS_HTTP_POST_BV_03) >>> tcp_layer::send_message_on_fd: 6 +14:52:02.627584 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:381(testcase:TC_LIS_HTTP_POST_BV_03) tcp_layer::send_message_on_fd: Non secured mode +14:52:02.628262 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:381(testcase:TC_LIS_HTTP_POST_BV_03) Abstract socket: Nr of bytes sent = 510 +14:52:02.629116 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:381(testcase:TC_LIS_HTTP_POST_BV_03) Abstract socket: leaving Abstract_Socket::send_outgoing() +14:52:02.629864 mtc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:381(testcase:TC_LIS_HTTP_POST_BV_03) HttpPort::outgoing_send: Execution duration: 93.419998 ms +14:52:02.631254 mtc VERDICTOP ../ttcn/AtsNg112_TestCases.ttcn:396(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibCommon_Sync.ttcn:448(function:f_selfOrClientSyncAndVerdictTestBody)->../ttcn/LibCommon_Sync.ttcn:1153(function:f_selfSyncAndVerdictTestBody)->../ttcn/LibCommon_VerdictControl.ttcn:49(function:f_setVerdict) setverdict(pass): none -> pass +14:52:02.632067 mtc USER ../ttcn/AtsNg112_TestCases.ttcn:396(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibCommon_Sync.ttcn:448(function:f_selfOrClientSyncAndVerdictTestBody)->../ttcn/LibCommon_Sync.ttcn:1154(function:f_selfSyncAndVerdictTestBody)->../ttcn/LibCommon_Sync.ttcn:1197(function:f_selfSync) **** f_selfSync: Successfully passed PREAMBLE synchronization point. **** +14:52:02.632778 mtc TIMEROP ../ttcn/AtsNg112_TestCases.ttcn:399(testcase:TC_LIS_HTTP_POST_BV_03) Start timer tc_ac: 30 s +14:52:03.755470 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) >>> tcp_layer::Handle_Fd_Event: 6 +14:52:03.756157 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) Abstract socket: entering Abstract_Socket::Handle_Socket_Event(): fd: 6 readable +14:52:03.756544 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) Abstract socket: receiving data +14:52:03.756733 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) >>> tcp_layer::receive_message_on_fd: 6 +14:52:03.757126 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) tcp_layer::receive_message_on_fd: Non secured mode +14:52:03.761787 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) Abstract socket: Message received from address (addr) 10.0.2.15/55330 +14:52:03.762913 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) Abstract socket: Message received, buffer content: Size: 708, Msg: 48 54 54 50 2f 31 2e 31 20 32 30 30 20 4f 4b 0d 0a 43 6f 6e 74 65 6e 74 2d 4c 65 6e 67 74 68 3a 20 32 30 39 0d 0a 43 6f 6e 74 65 6e 74 2d 54 79 70 65 3a 20 61 70 70 6c 69 63 61 74 69 6f 6e 2f 68 65 6c 64 2b 78 6d 6c 3b 20 63 68 61 72 73 65 74 3d 75 74 66 2d 38 0d 0a 53 65 72 76 65 72 3a 20 4d 69 63 72 6f 73 6f 66 74 2d 49 49 53 2f 31 30 2e 30 0d 0a 53 65 74 2d 43 6f 6f 6b 69 65 3a 20 41 52 52 41 66 66 69 6e 69 74 79 3d 38 33 38 62 36 37 32 64 65 37 38 31 35 61 63 35 64 30 33 34 61 39 34 32 62 62 38 36 34 61 66 36 31 31 38 33 62 62 38 61 34 33 63 66 61 32 34 31 35 37 31 34 33 39 34 31 36 63 66 66 34 38 63 61 3b 50 61 74 68 3d 2f 3b 48 74 74 70 4f 6e 6c 79 3b 44 6f 6d 61 69 6e 3d 6c 6f 63 61 74 69 6f 6e 2d 69 6e 66 6f 72 6d 61 74 69 6f 6e 2d 73 65 72 76 69 63 65 2e 61 7a 75 72 65 77 65 62 73 69 74 65 73 2e 6e 65 74 0d 0a 58 2d 50 6f 77 65 72 65 64 2d 42 79 3a 20 41 53 50 2e 4e 45 54 0d 0a 53 65 74 2d 43 6f 6f 6b 69 65 3a 20 41 52 52 41 66 66 69 6e 69 74 79 3d 38 64 36 39 62 39 30 63 30 35 65 63 61 61 34 34 62 32 34 65 38 62 30 35 39 62 32 62 39 35 31 30 34 32 64 37 32 65 30 36 66 36 39 34 32 32 30 30 39 39 66 30 33 34 61 38 31 31 34 35 35 61 30 31 3b 50 61 74 68 3d 2f 3b 48 74 74 70 4f 6e 6c 79 3b 44 6f 6d 61 69 6e 3d 6c 6f 63 61 74 69 6f 6e 2d 69 6e 66 6f 72 6d 61 74 69 6f 6e 2d 73 65 72 76 69 63 65 2e 61 7a 75 72 65 77 65 62 73 69 74 65 73 2e 6e 65 74 0d 0a 44 61 74 65 3a 20 4d 6f 6e 2c 20 32 33 20 4a 75 6c 20 32 30 31 38 20 31 32 3a 35 32 3a 30 33 20 47 4d 54 0d 0a 0d 0a 3c 3f 78 6d 6c 20 76 65 72 73 69 6f 6e 3d 22 31 2e 30 22 20 65 6e 63 6f 64 69 6e 67 3d 22 55 54 46 2d 38 22 20 73 74 61 6e 64 61 6c 6f 6e 65 3d 22 6e 6f 22 3f 3e 0d 0a 3c 65 72 72 6f 72 20 63 6f 64 65 3d 22 6c 6f 63 61 74 69 6f 6e 55 6e 6b 6e 6f 77 6e 22 20 78 6d 6c 6e 73 3d 22 75 72 6e 3a 69 65 74 66 3a 70 61 72 61 6d 73 3a 78 6d 6c 3a 6e 73 3a 67 65 6f 70 72 69 76 3a 68 65 6c 64 22 3e 0d 0a 20 20 20 20 3c 6d 65 73 73 61 67 65 20 78 6d 6c 3a 6c 61 6e 67 3d 22 65 6e 22 3e 55 6e 61 62 6c 65 20 74 6f 20 64 65 74 65 72 6d 69 6e 65 20 6c 6f 63 61 74 69 6f 6e 3c 2f 6d 65 73 73 61 67 65 3e 0d 0a 3c 2f 65 72 72 6f 72 3e 0d 0a +14:52:03.775749 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) >>> tcp_layer::message_incoming +14:52:03.776559 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) tcp_layer::message_incoming: 48 54 54 50 2f 31 2e 31 20 32 30 30 20 4f 4b 0d 0a 43 6f 6e 74 65 6e 74 2d 4c 65 6e 67 74 68 3a 20 32 30 39 0d 0a 43 6f 6e 74 65 6e 74 2d 54 79 70 65 3a 20 61 70 70 6c 69 63 61 74 69 6f 6e 2f 68 65 6c 64 2b 78 6d 6c 3b 20 63 68 61 72 73 65 74 3d 75 74 66 2d 38 0d 0a 53 65 72 76 65 72 3a 20 4d 69 63 72 6f 73 6f 66 74 2d 49 49 53 2f 31 30 2e 30 0d 0a 53 65 74 2d 43 6f 6f 6b 69 65 3a 20 41 52 52 41 66 66 69 6e 69 74 79 3d 38 33 38 62 36 37 32 64 65 37 38 31 35 61 63 35 64 30 33 34 61 39 34 32 62 62 38 36 34 61 66 36 31 31 38 33 62 62 38 61 34 33 63 66 61 32 34 31 35 37 31 34 33 39 34 31 36 63 66 66 34 38 63 61 3b 50 61 74 68 3d 2f 3b 48 74 74 70 4f 6e 6c 79 3b 44 6f 6d 61 69 6e 3d 6c 6f 63 61 74 69 6f 6e 2d 69 6e 66 6f 72 6d 61 74 69 6f 6e 2d 73 65 72 76 69 63 65 2e 61 7a 75 72 65 77 65 62 73 69 74 65 73 2e 6e 65 74 0d 0a 58 2d 50 6f 77 65 72 65 64 2d 42 79 3a 20 41 53 50 2e 4e 45 54 0d 0a 53 65 74 2d 43 6f 6f 6b 69 65 3a 20 41 52 52 41 66 66 69 6e 69 74 79 3d 38 64 36 39 62 39 30 63 30 35 65 63 61 61 34 34 62 32 34 65 38 62 30 35 39 62 32 62 39 35 31 30 34 32 64 37 32 65 30 36 66 36 39 34 32 32 30 30 39 39 66 30 33 34 61 38 31 31 34 35 35 61 30 31 3b 50 61 74 68 3d 2f 3b 48 74 74 70 4f 6e 6c 79 3b 44 6f 6d 61 69 6e 3d 6c 6f 63 61 74 69 6f 6e 2d 69 6e 66 6f 72 6d 61 74 69 6f 6e 2d 73 65 72 76 69 63 65 2e 61 7a 75 72 65 77 65 62 73 69 74 65 73 2e 6e 65 74 0d 0a 44 61 74 65 3a 20 4d 6f 6e 2c 20 32 33 20 4a 75 6c 20 32 30 31 38 20 31 32 3a 35 32 3a 30 33 20 47 4d 54 0d 0a 0d 0a 3c 3f 78 6d 6c 20 76 65 72 73 69 6f 6e 3d 22 31 2e 30 22 20 65 6e 63 6f 64 69 6e 67 3d 22 55 54 46 2d 38 22 20 73 74 61 6e 64 61 6c 6f 6e 65 3d 22 6e 6f 22 3f 3e 0d 0a 3c 65 72 72 6f 72 20 63 6f 64 65 3d 22 6c 6f 63 61 74 69 6f 6e 55 6e 6b 6e 6f 77 6e 22 20 78 6d 6c 6e 73 3d 22 75 72 6e 3a 69 65 74 66 3a 70 61 72 61 6d 73 3a 78 6d 6c 3a 6e 73 3a 67 65 6f 70 72 69 76 3a 68 65 6c 64 22 3e 0d 0a 20 20 20 20 3c 6d 65 73 73 61 67 65 20 78 6d 6c 3a 6c 61 6e 67 3d 22 65 6e 22 3e 55 6e 61 62 6c 65 20 74 6f 20 64 65 74 65 72 6d 69 6e 65 20 6c 6f 63 61 74 69 6f 6e 3c 2f 6d 65 73 73 61 67 65 3e 0d 0a 3c 2f 65 72 72 6f 72 3e 0d 0a + +14:52:03.796252 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) >>> tcp_layer::receive_data: '485454502F312E3120323030204F4B0D0A436F6E74656E742D4C656E6774683A203230390D0A436F6E74656E742D547970653A206170706C69636174696F6E2F68656C642B786D6C3B20636861727365743D7574662D380D0A5365727665723A204D6963726F736F66742D4949532F31302E300D0A5365742D436F6F6B69653A20415252416666696E6974793D383338623637326465373831356163356430333461393432626238363461663631313833626238613433636661323431353731343339343136636666343863613B506174683D2F3B487474704F6E6C793B446F6D61696E3D6C6F636174696F6E2D696E666F726D6174696F6E2D736572766963652E617A75726577656273697465732E6E65740D0A582D506F77657265642D42793A204153502E4E45540D0A5365742D436F6F6B69653A20415252416666696E6974793D386436396239306330356563616134346232346538623035396232623935313034326437326530366636393432323030393966303334613831313435356130313B506174683D2F3B487474704F6E6C793B446F6D61696E3D6C6F636174696F6E2D696E666F726D6174696F6E2D736572766963652E617A75726577656273697465732E6E65740D0A446174653A204D6F6E2C203233204A756C20323031382031323A35323A303320474D540D0A0D0A3C3F786D6C2076657273696F6E3D22312E302220656E636F64696E673D225554462D3822207374616E64616C6F6E653D226E6F223F3E0D0A3C6572726F7220636F64653D226C6F636174696F6E556E6B6E6F776E2220786D6C6E733D2275726E3A696574663A706172616D733A786D6C3A6E733A67656F707269763A68656C64223E0D0A202020203C6D65737361676520786D6C3A6C616E673D22656E223E556E61626C6520746F2064657465726D696E65206C6F636174696F6E3C2F6D6573736167653E0D0A3C2F6572726F723E0D0A'O ("HTTP/1.1 200 OK\r +Content-Length: 209\r +Content-Type: application/held+xml; charset=utf-8\r +Server: Microsoft-IIS/10.0\r +Set-Cookie: ARRAffinity=838b672de7815ac5d034a942bb864af61183bb8a43cfa241571439416cff48ca;Path=/;HttpOnly;Domain=location-information-service.azurewebsites.net\r +X-Powered-By: ASP.NET\r +Set-Cookie: ARRAffinity=8d69b90c05ecaa44b24e8b059b2b951042d72e06f694220099f034a811455a01;Path=/;HttpOnly;Domain=location-information-service.azurewebsites.net\r +Date: Mon, 23 Jul 2018 12:52:03 GMT\r +\r +\r +\r + Unable to determine location\r +\r +") +14:52:03.837760 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) >>> http_layer::receive_data: '485454502F312E3120323030204F4B0D0A436F6E74656E742D4C656E6774683A203230390D0A436F6E74656E742D547970653A206170706C69636174696F6E2F68656C642B786D6C3B20636861727365743D7574662D380D0A5365727665723A204D6963726F736F66742D4949532F31302E300D0A5365742D436F6F6B69653A20415252416666696E6974793D383338623637326465373831356163356430333461393432626238363461663631313833626238613433636661323431353731343339343136636666343863613B506174683D2F3B487474704F6E6C793B446F6D61696E3D6C6F636174696F6E2D696E666F726D6174696F6E2D736572766963652E617A75726577656273697465732E6E65740D0A582D506F77657265642D42793A204153502E4E45540D0A5365742D436F6F6B69653A20415252416666696E6974793D386436396239306330356563616134346232346538623035396232623935313034326437326530366636393432323030393966303334613831313435356130313B506174683D2F3B487474704F6E6C793B446F6D61696E3D6C6F636174696F6E2D696E666F726D6174696F6E2D736572766963652E617A75726577656273697465732E6E65740D0A446174653A204D6F6E2C203233204A756C20323031382031323A35323A303320474D540D0A0D0A3C3F786D6C2076657273696F6E3D22312E302220656E636F64696E673D225554462D3822207374616E64616C6F6E653D226E6F223F3E0D0A3C6572726F7220636F64653D226C6F636174696F6E556E6B6E6F776E2220786D6C6E733D2275726E3A696574663A706172616D733A786D6C3A6E733A67656F707269763A68656C64223E0D0A202020203C6D65737361676520786D6C3A6C616E673D22656E223E556E61626C6520746F2064657465726D696E65206C6F636174696F6E3C2F6D6573736167653E0D0A3C2F6572726F723E0D0A'O ("HTTP/1.1 200 OK\r +Content-Length: 209\r +Content-Type: application/held+xml; charset=utf-8\r +Server: Microsoft-IIS/10.0\r +Set-Cookie: ARRAffinity=838b672de7815ac5d034a942bb864af61183bb8a43cfa241571439416cff48ca;Path=/;HttpOnly;Domain=location-information-service.azurewebsites.net\r +X-Powered-By: ASP.NET\r +Set-Cookie: ARRAffinity=8d69b90c05ecaa44b24e8b059b2b951042d72e06f694220099f034a811455a01;Path=/;HttpOnly;Domain=location-information-service.azurewebsites.net\r +Date: Mon, 23 Jul 2018 12:52:03 GMT\r +\r +\r +\r + Unable to determine location\r +\r +") +14:52:03.875585 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) >>> http_codec::decode: data='485454502F312E3120323030204F4B0D0A436F6E74656E742D4C656E6774683A203230390D0A436F6E74656E742D547970653A206170706C69636174696F6E2F68656C642B786D6C3B20636861727365743D7574662D380D0A5365727665723A204D6963726F736F66742D4949532F31302E300D0A5365742D436F6F6B69653A20415252416666696E6974793D383338623637326465373831356163356430333461393432626238363461663631313833626238613433636661323431353731343339343136636666343863613B506174683D2F3B487474704F6E6C793B446F6D61696E3D6C6F636174696F6E2D696E666F726D6174696F6E2D736572766963652E617A75726577656273697465732E6E65740D0A582D506F77657265642D42793A204153502E4E45540D0A5365742D436F6F6B69653A20415252416666696E6974793D386436396239306330356563616134346232346538623035396232623935313034326437326530366636393432323030393966303334613831313435356130313B506174683D2F3B487474704F6E6C793B446F6D61696E3D6C6F636174696F6E2D696E666F726D6174696F6E2D736572766963652E617A75726577656273697465732E6E65740D0A446174653A204D6F6E2C203233204A756C20323031382031323A35323A303320474D540D0A0D0A3C3F786D6C2076657273696F6E3D22312E302220656E636F64696E673D225554462D3822207374616E64616C6F6E653D226E6F223F3E0D0A3C6572726F7220636F64653D226C6F636174696F6E556E6B6E6F776E2220786D6C6E733D2275726E3A696574663A706172616D733A786D6C3A6E733A67656F707269763A68656C64223E0D0A202020203C6D65737361676520786D6C3A6C616E673D22656E223E556E61626C6520746F2064657465726D696E65206C6F636174696F6E3C2F6D6573736167653E0D0A3C2F6572726F723E0D0A'O ("HTTP/1.1 200 OK\r +Content-Length: 209\r +Content-Type: application/held+xml; charset=utf-8\r +Server: Microsoft-IIS/10.0\r +Set-Cookie: ARRAffinity=838b672de7815ac5d034a942bb864af61183bb8a43cfa241571439416cff48ca;Path=/;HttpOnly;Domain=location-information-service.azurewebsites.net\r +X-Powered-By: ASP.NET\r +Set-Cookie: ARRAffinity=8d69b90c05ecaa44b24e8b059b2b951042d72e06f694220099f034a811455a01;Path=/;HttpOnly;Domain=location-information-service.azurewebsites.net\r +Date: Mon, 23 Jul 2018 12:52:03 GMT\r +\r +\r +\r + Unable to determine location\r +\r +") +14:52:03.921332 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) http_codec::decode: decoding_buffer=Buffer: size: 708, pos: 0, len: 708 data: ( | 485454502F312E3120323030204F4B0D0A436F6E74656E742D4C656E6774683A203230390D0A436F6E74656E742D547970653A206170706C69636174696F6E2F68656C642B786D6C3B20636861727365743D7574662D380D0A5365727665723A204D6963726F736F66742D4949532F31302E300D0A5365742D436F6F6B69653A20415252416666696E6974793D383338623637326465373831356163356430333461393432626238363461663631313833626238613433636661323431353731343339343136636666343863613B506174683D2F3B487474704F6E6C793B446F6D61696E3D6C6F636174696F6E2D696E666F726D6174696F6E2D736572766963652E617A75726577656273697465732E6E65740D0A582D506F77657265642D42793A204153502E4E45540D0A5365742D436F6F6B69653A20415252416666696E6974793D386436396239306330356563616134346232346538623035396232623935313034326437326530366636393432323030393966303334613831313435356130313B506174683D2F3B487474704F6E6C793B446F6D61696E3D6C6F636174696F6E2D696E666F726D6174696F6E2D736572766963652E617A75726577656273697465732E6E65740D0A446174653A204D6F6E2C203233204A756C20323031382031323A35323A303320474D540D0A0D0A3C3F786D6C2076657273696F6E3D22312E302220656E636F64696E673D225554462D3822207374616E64616C6F6E653D226E6F223F3E0D0A3C6572726F7220636F64653D226C6F636174696F6E556E6B6E6F776E2220786D6C6E733D2275726E3A696574663A706172616D733A786D6C3A6E733A67656F707269763A68656C64223E0D0A202020203C6D65737361676520786D6C3A6C616E673D22656E223E556E61626C6520746F2064657465726D696E65206C6F636174696F6E3C2F6D6573736167653E0D0A3C2F6572726F723E0D0A) +14:52:03.950895 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) http_codec::decode: message_id: "HTTP/1.1 200 OK" +14:52:03.955914 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) http_codec::decode: 2 - HTTP/ +14:52:03.979710 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) http_codec::decode: Process response: 5 +14:52:03.980487 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) >>> http_codec::decode_headers +14:52:03.980958 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) http_codec::decode_headersBuffer: size: 708, pos: 17, len: 708 data: (485454502F312E3120323030204F4B0D0A | 436F6E74656E742D4C656E6774683A203230390D0A436F6E74656E742D547970653A206170706C69636174696F6E2F68656C642B786D6C3B20636861727365743D7574662D380D0A5365727665723A204D6963726F736F66742D4949532F31302E300D0A5365742D436F6F6B69653A20415252416666696E6974793D383338623637326465373831356163356430333461393432626238363461663631313833626238613433636661323431353731343339343136636666343863613B506174683D2F3B487474704F6E6C793B446F6D61696E3D6C6F636174696F6E2D696E666F726D6174696F6E2D736572766963652E617A75726577656273697465732E6E65740D0A582D506F77657265642D42793A204153502E4E45540D0A5365742D436F6F6B69653A20415252416666696E6974793D386436396239306330356563616134346232346538623035396232623935313034326437326530366636393432323030393966303334613831313435356130313B506174683D2F3B487474704F6E6C793B446F6D61696E3D6C6F636174696F6E2D696E666F726D6174696F6E2D736572766963652E617A75726577656273697465732E6E65740D0A446174653A204D6F6E2C203233204A756C20323031382031323A35323A303320474D540D0A0D0A3C3F786D6C2076657273696F6E3D22312E302220656E636F64696E673D225554462D3822207374616E64616C6F6E653D226E6F223F3E0D0A3C6572726F7220636F64653D226C6F636174696F6E556E6B6E6F776E2220786D6C6E733D2275726E3A696574663A706172616D733A786D6C3A6E733A67656F707269763A68656C64223E0D0A202020203C6D65737361676520786D6C3A6C616E673D22656E223E556E61626C6520746F2064657465726D696E65206C6F636174696F6E3C2F6D6573736167653E0D0A3C2F6572726F723E0D0A) +14:52:04.000595 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) http_codec::decode_headers: "Content-Length: 209" +14:52:04.001389 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) >>> http_codec::decode_header"Content-Length: 209" +14:52:04.006075 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) http_codec::decode_header: 5 +14:52:04.006704 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) http_codec::decode_header: decoded Content-Length 209 +14:52:04.007886 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) http_codec::decode_headers: "Content-Type: application/held+xml; charset=utf-8" +14:52:04.008192 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) >>> http_codec::decode_header"Content-Type: application/held+xml; charset=utf-8" +14:52:04.013050 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) http_codec::decode_header: 5 +14:52:04.013807 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) http_codec::decode_headers: "Server: Microsoft-IIS/10.0" +14:52:04.014261 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) >>> http_codec::decode_header"Server: Microsoft-IIS/10.0" +14:52:04.018902 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) http_codec::decode_header: 5 +14:52:04.019581 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) http_codec::decode_headers: "Set-Cookie: ARRAffinity=838b672de7815ac5d034a942bb864af61183bb8a43cfa241571439416cff48ca;Path=/;HttpOnly;Domain=location-information-service.azurewebsites.net" +14:52:04.020396 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) >>> http_codec::decode_header"Set-Cookie: ARRAffinity=838b672de7815ac5d034a942bb864af61183bb8a43cfa241571439416cff48ca;Path=/;HttpOnly;Domain=location-information-service.azurewebsites.net" +14:52:04.025570 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) http_codec::decode_header: 5 +14:52:04.026404 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) http_codec::decode_headers: "X-Powered-By: ASP.NET" +14:52:04.027015 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) >>> http_codec::decode_header"X-Powered-By: ASP.NET" +14:52:04.034671 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) http_codec::decode_header: 5 +14:52:04.035652 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) http_codec::decode_headers: "Set-Cookie: ARRAffinity=8d69b90c05ecaa44b24e8b059b2b951042d72e06f694220099f034a811455a01;Path=/;HttpOnly;Domain=location-information-service.azurewebsites.net" +14:52:04.036114 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) >>> http_codec::decode_header"Set-Cookie: ARRAffinity=8d69b90c05ecaa44b24e8b059b2b951042d72e06f694220099f034a811455a01;Path=/;HttpOnly;Domain=location-information-service.azurewebsites.net" +14:52:04.042056 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) http_codec::decode_header: 5 +14:52:04.043066 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) http_codec::decode_headers: "Date: Mon, 23 Jul 2018 12:52:03 GMT" +14:52:04.043863 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) >>> http_codec::decode_header"Date: Mon, 23 Jul 2018 12:52:03 GMT" +14:52:04.049002 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) http_codec::decode_header: 5 +14:52:04.049942 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) <<< http_codec::decode_headers: { + { + header_name := "Content-Length", + header_value := { + "209" + } + }, + { + header_name := "Content-Type", + header_value := { + "application/held+xml; charset=utf-8" + } + }, + { + header_name := "Server", + header_value := { + "Microsoft-IIS/10.0" + } + }, + { + header_name := "Set-Cookie", + header_value := { + "ARRAffinity=838b672de7815ac5d034a942bb864af61183bb8a43cfa241571439416cff48ca;Path=/;HttpOnly;Domain=location-information-service.azurewebsites.net" + } + }, + { + header_name := "X-Powered-By", + header_value := { + "ASP.NET" + } + }, + { + header_name := "Set-Cookie", + header_value := { + "ARRAffinity=8d69b90c05ecaa44b24e8b059b2b951042d72e06f694220099f034a811455a01;Path=/;HttpOnly;Domain=location-information-service.azurewebsites.net" + } + }, + { + header_name := "Date", + header_value := { + "Mon, 23 Jul 2018 12:52:03 GMT" + } + } +} +14:52:04.050888 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) Before decoding Body: Buffer: size: 708, pos: 499, len: 708 data: (485454502F312E3120323030204F4B0D0A436F6E74656E742D4C656E6774683A203230390D0A436F6E74656E742D547970653A206170706C69636174696F6E2F68656C642B786D6C3B20636861727365743D7574662D380D0A5365727665723A204D6963726F736F66742D4949532F31302E300D0A5365742D436F6F6B69653A20415252416666696E6974793D383338623637326465373831356163356430333461393432626238363461663631313833626238613433636661323431353731343339343136636666343863613B506174683D2F3B487474704F6E6C793B446F6D61696E3D6C6F636174696F6E2D696E666F726D6174696F6E2D736572766963652E617A75726577656273697465732E6E65740D0A582D506F77657265642D42793A204153502E4E45540D0A5365742D436F6F6B69653A20415252416666696E6974793D386436396239306330356563616134346232346538623035396232623935313034326437326530366636393432323030393966303334613831313435356130313B506174683D2F3B487474704F6E6C793B446F6D61696E3D6C6F636174696F6E2D696E666F726D6174696F6E2D736572766963652E617A75726577656273697465732E6E65740D0A446174653A204D6F6E2C203233204A756C20323031382031323A35323A303320474D540D0A0D0A | 3C3F786D6C2076657273696F6E3D22312E302220656E636F64696E673D225554462D3822207374616E64616C6F6E653D226E6F223F3E0D0A3C6572726F7220636F64653D226C6F636174696F6E556E6B6E6F776E2220786D6C6E733D2275726E3A696574663A706172616D733A786D6C3A6E733A67656F707269763A68656C64223E0D0A202020203C6D65737361676520786D6C3A6C616E673D22656E223E556E61626C6520746F2064657465726D696E65206C6F636174696F6E3C2F6D6573736167653E0D0A3C2F6572726F723E0D0A) +14:52:04.073213 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) >>> http_codec::decode_body +14:52:04.073630 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) http_codec::decode_bodyBuffer: size: 708, pos: 499, len: 708 data: (485454502F312E3120323030204F4B0D0A436F6E74656E742D4C656E6774683A203230390D0A436F6E74656E742D547970653A206170706C69636174696F6E2F68656C642B786D6C3B20636861727365743D7574662D380D0A5365727665723A204D6963726F736F66742D4949532F31302E300D0A5365742D436F6F6B69653A20415252416666696E6974793D383338623637326465373831356163356430333461393432626238363461663631313833626238613433636661323431353731343339343136636666343863613B506174683D2F3B487474704F6E6C793B446F6D61696E3D6C6F636174696F6E2D696E666F726D6174696F6E2D736572766963652E617A75726577656273697465732E6E65740D0A582D506F77657265642D42793A204153502E4E45540D0A5365742D436F6F6B69653A20415252416666696E6974793D386436396239306330356563616134346232346538623035396232623935313034326437326530366636393432323030393966303334613831313435356130313B506174683D2F3B487474704F6E6C793B446F6D61696E3D6C6F636174696F6E2D696E666F726D6174696F6E2D736572766963652E617A75726577656273697465732E6E65740D0A446174653A204D6F6E2C203233204A756C20323031382031323A35323A303320474D540D0A0D0A | 3C3F786D6C2076657273696F6E3D22312E302220656E636F64696E673D225554462D3822207374616E64616C6F6E653D226E6F223F3E0D0A3C6572726F7220636F64653D226C6F636174696F6E556E6B6E6F776E2220786D6C6E733D2275726E3A696574663A706172616D733A786D6C3A6E733A67656F707269763A68656C64223E0D0A202020203C6D65737361676520786D6C3A6C616E673D22656E223E556E61626C6520746F2064657465726D696E65206C6F636174696F6E3C2F6D6573736167653E0D0A3C2F6572726F723E0D0A) +14:52:04.094003 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) http_codec::decode_body: # of codecs=2 +14:52:04.094298 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) http_codec::decode_body: raw body='3C3F786D6C2076657273696F6E3D22312E302220656E636F64696E673D225554462D3822207374616E64616C6F6E653D226E6F223F3E0D0A3C6572726F7220636F64653D226C6F636174696F6E556E6B6E6F776E2220786D6C6E733D2275726E3A696574663A706172616D733A786D6C3A6E733A67656F707269763A68656C64223E0D0A202020203C6D65737361676520786D6C3A6C616E673D22656E223E556E61626C6520746F2064657465726D696E65206C6F636174696F6E3C2F6D6573736167653E0D0A3C2F6572726F723E0D0A'O ("\r +\r + Unable to determine location\r +\r +") +14:52:04.099769 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) http_codec::decode_body: _dc.length=209 - body length=209 +14:52:04.100242 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) http_codec::decode_body: Aligned body='3C3F786D6C2076657273696F6E3D22312E302220656E636F64696E673D225554462D3822207374616E64616C6F6E653D226E6F223F3E0D0A3C6572726F7220636F64653D226C6F636174696F6E556E6B6E6F776E2220786D6C6E733D2275726E3A696574663A706172616D733A786D6C3A6E733A67656F707269763A68656C64223E0D0A202020203C6D65737361676520786D6C3A6C616E673D22656E223E556E61626C6520746F2064657465726D696E65206C6F636174696F6E3C2F6D6573736167653E0D0A3C2F6572726F723E0D0A'O ("\r +\r + Unable to determine location\r +\r +") +14:52:04.104636 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) http_codec::decode_body: Counter=2 +14:52:04.105262 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) http_codec::decode_body: Finalised body='3C3F786D6C2076657273696F6E3D22312E302220656E636F64696E673D225554462D3822207374616E64616C6F6E653D226E6F223F3E0D0A3C6572726F7220636F64653D226C6F636174696F6E556E6B6E6F776E2220786D6C6E733D2275726E3A696574663A706172616D733A786D6C3A6E733A67656F707269763A68656C64223E0D0A202020203C6D65737361676520786D6C3A6C616E673D22656E223E556E61626C6520746F2064657465726D696E65206C6F636174696F6E3C2F6D6573736167653E0D0A3C2F6572726F723E'O ("\r +\r + Unable to determine location\r +") +14:52:04.109598 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) http_codec::decode_body: Binary mode: 0 +14:52:04.110028 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) http_codec::decode_body: Find xml message +14:52:04.110487 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) http_codec::decode_body: Find 'urn:ietf:params:xml:ns:geopriv:held' +14:52:04.111051 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) http_codec::decode_body: Call 'held_codec' +14:52:04.111983 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) >>> held_codec::decode: p_data='3C3F786D6C2076657273696F6E3D22312E302220656E636F64696E673D225554462D3822207374616E64616C6F6E653D226E6F223F3E0D0A3C6572726F7220636F64653D226C6F636174696F6E556E6B6E6F776E2220786D6C6E733D2275726E3A696574663A706172616D733A786D6C3A6E733A67656F707269763A68656C64223E0D0A202020203C6D65737361676520786D6C3A6C616E673D22656E223E556E61626C6520746F2064657465726D696E65206C6F636174696F6E3C2F6D6573736167653E0D0A3C2F6572726F723E'O ("\r +\r + Unable to determine location\r +") +14:52:04.117187 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) <<< held_codec::decode: { + errorType := { + code := "locationUnknown", + attr := omit, + message_list := { + { + lang := "en", + attr := omit, + base := "Unable to determine location" + } + }, + elem_list := { } + } +} +14:52:04.117967 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) http_codec::decode_body: Decoded message:{ + errorType := { + code := "locationUnknown", + attr := omit, + message_list := { + { + lang := "en", + attr := omit, + base := "Unable to determine location" + } + }, + elem_list := { } + } +} +14:52:04.118996 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) <<< http_codec::decode: { + response := { + version_major := 1, + version_minor := 1, + statuscode := 200, + statustext := "OK", + header := { + { + header_name := "Content-Length", + header_value := { + "209" + } + }, + { + header_name := "Content-Type", + header_value := { + "application/held+xml; charset=utf-8" + } + }, + { + header_name := "Server", + header_value := { + "Microsoft-IIS/10.0" + } + }, + { + header_name := "Set-Cookie", + header_value := { + "ARRAffinity=838b672de7815ac5d034a942bb864af61183bb8a43cfa241571439416cff48ca;Path=/;HttpOnly;Domain=location-information-service.azurewebsites.net" + } + }, + { + header_name := "X-Powered-By", + header_value := { + "ASP.NET" + } + }, + { + header_name := "Set-Cookie", + header_value := { + "ARRAffinity=8d69b90c05ecaa44b24e8b059b2b951042d72e06f694220099f034a811455a01;Path=/;HttpOnly;Domain=location-information-service.azurewebsites.net" + } + }, + { + header_name := "Date", + header_value := { + "Mon, 23 Jul 2018 12:52:03 GMT" + } + } + }, + body := { + xml_body := { + errorType := { + code := "locationUnknown", + attr := omit, + message_list := { + { + lang := "en", + attr := omit, + base := "Unable to determine location" + } + }, + elem_list := { } + } + } + } + } +} +14:52:04.120527 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) >>> HttpPort::receive_msg: { + response := { + version_major := 1, + version_minor := 1, + statuscode := 200, + statustext := "OK", + header := { + { + header_name := "Content-Length", + header_value := { + "209" + } + }, + { + header_name := "Content-Type", + header_value := { + "application/held+xml; charset=utf-8" + } + }, + { + header_name := "Server", + header_value := { + "Microsoft-IIS/10.0" + } + }, + { + header_name := "Set-Cookie", + header_value := { + "ARRAffinity=838b672de7815ac5d034a942bb864af61183bb8a43cfa241571439416cff48ca;Path=/;HttpOnly;Domain=location-information-service.azurewebsites.net" + } + }, + { + header_name := "X-Powered-By", + header_value := { + "ASP.NET" + } + }, + { + header_name := "Set-Cookie", + header_value := { + "ARRAffinity=8d69b90c05ecaa44b24e8b059b2b951042d72e06f694220099f034a811455a01;Path=/;HttpOnly;Domain=location-information-service.azurewebsites.net" + } + }, + { + header_name := "Date", + header_value := { + "Mon, 23 Jul 2018 12:52:03 GMT" + } + } + }, + body := { + xml_body := { + errorType := { + code := "locationUnknown", + attr := omit, + message_list := { + { + lang := "en", + attr := omit, + base := "Unable to determine location" + } + }, + elem_list := { } + } + } + } + } +} +14:52:04.122500 mtc PORTEVENT ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) Message enqueued on httpPort from system @LibItsHttp_TypesAndValues.HttpMessage : { + response := { + version_major := 1, + version_minor := 1, + statuscode := 200, + statustext := "OK", + header := { + { + header_name := "Content-Length", + header_value := { + "209" + } + }, + { + header_name := "Content-Type", + header_value := { + "application/held+xml; charset=utf-8" + } + }, + { + header_name := "Server", + header_value := { + "Microsoft-IIS/10.0" + } + }, + { + header_name := "Set-Cookie", + header_value := { + "ARRAffinity=838b672de7815ac5d034a942bb864af61183bb8a43cfa241571439416cff48ca;Path=/;HttpOnly;Domain=location-information-service.azurewebsites.net" + } + }, + { + header_name := "X-Powered-By", + header_value := { + "ASP.NET" + } + }, + { + header_name := "Set-Cookie", + header_value := { + "ARRAffinity=8d69b90c05ecaa44b24e8b059b2b951042d72e06f694220099f034a811455a01;Path=/;HttpOnly;Domain=location-information-service.azurewebsites.net" + } + }, + { + header_name := "Date", + header_value := { + "Mon, 23 Jul 2018 12:52:03 GMT" + } + } + }, + body := { + xml_body := { + errorType := { + code := "locationUnknown", + attr := omit, + message_list := { + { + lang := "en", + attr := omit, + base := "Unable to determine location" + } + }, + elem_list := { } + } + } + } + } +} id 1 +14:52:04.123470 mtc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) tcp_layer::Handle_Fd_Event_Readable: Execution duration: 273.223999 ms +14:52:04.124086 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) Abstract socket: leaving Abstract_Socket::handle_message() +14:52:04.124576 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) Abstract socket: leaving Abstract_Socket::Handle_Socket_Event() +14:52:04.124997 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:400(testcase:TC_LIS_HTTP_POST_BV_03) Abstract socket: <<< tcp_layer::Handle_Fd_Event +14:52:04.125640 mtc MATCHING ../ttcn/AtsNg112_TestCases.ttcn:401(testcase:TC_LIS_HTTP_POST_BV_03) Matching on port httpPort succeeded: matched +14:52:04.126895 mtc PORTEVENT ../ttcn/AtsNg112_TestCases.ttcn:401(testcase:TC_LIS_HTTP_POST_BV_03) Receive operation on port httpPort succeeded, message from system(): @LibItsHttp_TypesAndValues.HttpMessage : { + response := { + version_major := 1, + version_minor := 1, + statuscode := 200, + statustext := "OK", + header := { + { + header_name := "Content-Length", + header_value := { + "209" + } + }, + { + header_name := "Content-Type", + header_value := { + "application/held+xml; charset=utf-8" + } + }, + { + header_name := "Server", + header_value := { + "Microsoft-IIS/10.0" + } + }, + { + header_name := "Set-Cookie", + header_value := { + "ARRAffinity=838b672de7815ac5d034a942bb864af61183bb8a43cfa241571439416cff48ca;Path=/;HttpOnly;Domain=location-information-service.azurewebsites.net" + } + }, + { + header_name := "X-Powered-By", + header_value := { + "ASP.NET" + } + }, + { + header_name := "Set-Cookie", + header_value := { + "ARRAffinity=8d69b90c05ecaa44b24e8b059b2b951042d72e06f694220099f034a811455a01;Path=/;HttpOnly;Domain=location-information-service.azurewebsites.net" + } + }, + { + header_name := "Date", + header_value := { + "Mon, 23 Jul 2018 12:52:03 GMT" + } + } + }, + body := { + xml_body := { + errorType := { + code := "locationUnknown", + attr := omit, + message_list := { + { + lang := "en", + attr := omit, + base := "Unable to determine location" + } + }, + elem_list := { } + } + } + } + } +} id 1 +14:52:04.127888 mtc PORTEVENT ../ttcn/AtsNg112_TestCases.ttcn:401(testcase:TC_LIS_HTTP_POST_BV_03) Message with id 1 was extracted from the queue of httpPort. +14:52:04.128862 mtc TIMEROP ../ttcn/AtsNg112_TestCases.ttcn:408(testcase:TC_LIS_HTTP_POST_BV_03) Stop timer tc_ac: 30 s +14:52:04.129371 mtc USER ../ttcn/AtsNg112_TestCases.ttcn:409(testcase:TC_LIS_HTTP_POST_BV_03) *** TC_LIS_HTTP_POST_BV_03: PASS: Error message received *** +14:52:04.131322 mtc VERDICTOP ../ttcn/AtsNg112_TestCases.ttcn:410(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibCommon_Sync.ttcn:448(function:f_selfOrClientSyncAndVerdictTestBody)->../ttcn/LibCommon_Sync.ttcn:1153(function:f_selfSyncAndVerdictTestBody)->../ttcn/LibCommon_VerdictControl.ttcn:49(function:f_setVerdict) setverdict(pass): pass -> pass, component reason not changed +14:52:04.133551 mtc USER ../ttcn/AtsNg112_TestCases.ttcn:410(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibCommon_Sync.ttcn:448(function:f_selfOrClientSyncAndVerdictTestBody)->../ttcn/LibCommon_Sync.ttcn:1154(function:f_selfSyncAndVerdictTestBody)->../ttcn/LibCommon_Sync.ttcn:1199(function:f_selfSync) **** f_selfSync: Successfully passed TEST BODY synchronization point. **** +14:52:04.134035 mtc PARALLEL ../ttcn/AtsNg112_TestCases.ttcn:419(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:52(function:f_cf_01_http_down) Unmapping port mtc:httpPort from system:httpPort. +14:52:04.134602 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:419(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:52(function:f_cf_01_http_down) >>> HttpPort::user_unmap: httpPort +14:52:04.135028 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:419(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:52(function:f_cf_01_http_down) >>> tcp_layer::~tcp_layer: 6 +14:52:04.135492 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:419(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:52(function:f_cf_01_http_down) Abstract socket: entering Abstract_Socket::remove_client(6) +14:52:04.135837 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:419(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:52(function:f_cf_01_http_down) Abstract socket: entering SSL_Socket::remove_user_data() +14:52:04.136317 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:419(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:52(function:f_cf_01_http_down) Abstract socket: leaving SSL_Socket::remove_user_data() +14:52:04.136713 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:419(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:52(function:f_cf_01_http_down) Abstract socket: Abstract_Socket::peer_list_remove_peer: Removing client 6 from peer list +14:52:04.137195 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:419(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:52(function:f_cf_01_http_down) Abstract socket: Abstract_Socket::peer_list_get_last_peer: Finding last peer of the peer array +14:52:04.137566 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:419(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:52(function:f_cf_01_http_down) Abstract socket: Abstract_Socket::peer_list_get_last_peer: No active peer found +14:52:04.137970 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:419(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:52(function:f_cf_01_http_down) Abstract socket: Abstract_Socket::peer_list_resize_list: Resizing to 0 +14:52:04.138302 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:419(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:52(function:f_cf_01_http_down) Abstract socket: Abstract_Socket::peer_list_resize_list: New length is 0 +14:52:04.138844 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:419(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:52(function:f_cf_01_http_down) Abstract socket: Removed client 6. +14:52:04.139328 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:419(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:52(function:f_cf_01_http_down) Abstract socket: leaving Abstract_Socket::remove_client(6) +14:52:04.139739 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:419(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:52(function:f_cf_01_http_down) Abstract socket: entering Abstract_Socket::unmap_user() +14:52:04.140486 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:419(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:52(function:f_cf_01_http_down) Abstract socket: entering Abstract_Socket::remove_all_clients +14:52:04.141134 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:419(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:52(function:f_cf_01_http_down) Abstract socket: Abstract_Socket::peer_list_get_nr_of_peers: Number of active peers = 0 +14:52:04.141831 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:419(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:52(function:f_cf_01_http_down) Abstract socket: leaving Abstract_Socket::remove_all_clients +14:52:04.142504 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:419(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:52(function:f_cf_01_http_down) Abstract socket: leaving Abstract_Socket::unmap_user() +14:52:04.143168 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:419(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:52(function:f_cf_01_http_down) Abstract socket: Abstract_Socket::peer_list_reset_peer: Resetting peer array +14:52:04.143732 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:419(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:52(function:f_cf_01_http_down) Abstract socket: Abstract_Socket::peer_list_get_last_peer: Finding last peer of the peer array +14:52:04.144217 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:419(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:52(function:f_cf_01_http_down) Abstract socket: Abstract_Socket::peer_list_get_last_peer: No active peer found +14:52:04.144921 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:419(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:52(function:f_cf_01_http_down) Abstract socket: Abstract_Socket::peer_list_resize_list: Resizing to 0 +14:52:04.146111 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:419(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:52(function:f_cf_01_http_down) Abstract socket: Abstract_Socket::peer_list_resize_list: New length is 0 +14:52:04.146605 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:419(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:52(function:f_cf_01_http_down) Abstract socket: Abstract_Socket::peer_list_reset_peer: New length is 0 +14:52:04.148047 mtc PORTEVENT ../ttcn/AtsNg112_TestCases.ttcn:419(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:52(function:f_cf_01_http_down) Port httpPort was unmapped from system:httpPort. +14:52:04.148962 mtc PARALLEL ../ttcn/AtsNg112_TestCases.ttcn:419(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:52(function:f_cf_01_http_down) Unmap operation of mtc:httpPort from system:httpPort finished. +14:52:04.149740 mtc PARALLEL ../ttcn/AtsNg112_TestCases.ttcn:419(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:55(function:f_cf_01_http_down)->../ttcn/LibCommon_Sync.ttcn:219(function:f_disconnect4SelfOrClientSync)->../ttcn/LibCommon_Sync.ttcn:1101(function:f_disconnect4SelfSync) Disconnecting ports mtc:syncSendPort and mtc:syncPort. +14:52:04.150522 mtc PORTEVENT ../ttcn/AtsNg112_TestCases.ttcn:419(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:55(function:f_cf_01_http_down)->../ttcn/LibCommon_Sync.ttcn:219(function:f_disconnect4SelfOrClientSync)->../ttcn/LibCommon_Sync.ttcn:1101(function:f_disconnect4SelfSync) Port syncSendPort has terminated the connection with local port syncPort. +14:52:04.151175 mtc PORTEVENT ../ttcn/AtsNg112_TestCases.ttcn:419(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:55(function:f_cf_01_http_down)->../ttcn/LibCommon_Sync.ttcn:219(function:f_disconnect4SelfOrClientSync)->../ttcn/LibCommon_Sync.ttcn:1101(function:f_disconnect4SelfSync) Port syncPort has terminated the connection with local port syncSendPort. +14:52:04.151562 mtc PARALLEL ../ttcn/AtsNg112_TestCases.ttcn:419(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:55(function:f_cf_01_http_down)->../ttcn/LibCommon_Sync.ttcn:219(function:f_disconnect4SelfOrClientSync)->../ttcn/LibCommon_Sync.ttcn:1101(function:f_disconnect4SelfSync) Disconnect operation on mtc:syncSendPort and mtc:syncPort finished. +14:52:04.152201 mtc DEFAULTOP ../ttcn/AtsNg112_TestCases.ttcn:419(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:57(function:f_cf_01_http_down) Default with id 1 (altstep a_cf_01_http_down) was deactivated. +14:52:04.152577 mtc DEFAULTOP ../ttcn/AtsNg112_TestCases.ttcn:419(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:57(function:f_cf_01_http_down) Default with id 2 (altstep a_default_requests) was deactivated. +14:52:04.153052 mtc DEFAULTOP ../ttcn/AtsNg112_TestCases.ttcn:419(testcase:TC_LIS_HTTP_POST_BV_03)->../ttcn/LibNg112_Functions.ttcn:57(function:f_cf_01_http_down) Default with id 3 (altstep a_default_responses) was deactivated. +14:52:04.153497 mtc PARALLEL ../ttcn/AtsNg112_TestCases.ttcn:419(testcase:TC_LIS_HTTP_POST_BV_03) Terminating component type LibItsHttp_TestSystem.HttpComponent. +14:52:04.153793 mtc PORTEVENT ../ttcn/AtsNg112_TestCases.ttcn:419(testcase:TC_LIS_HTTP_POST_BV_03) Port syncPort was stopped. +14:52:04.154095 mtc PORTEVENT ../ttcn/AtsNg112_TestCases.ttcn:419(testcase:TC_LIS_HTTP_POST_BV_03) Port syncSendPort was stopped. +14:52:04.154563 mtc DEBUG ../ttcn/AtsNg112_TestCases.ttcn:419(testcase:TC_LIS_HTTP_POST_BV_03) >>> HttpPort::user_stop +14:52:04.154982 mtc PORTEVENT ../ttcn/AtsNg112_TestCases.ttcn:419(testcase:TC_LIS_HTTP_POST_BV_03) Port httpPort was stopped. +14:52:04.155257 mtc PARALLEL ../ttcn/AtsNg112_TestCases.ttcn:419(testcase:TC_LIS_HTTP_POST_BV_03) Component type LibItsHttp_TestSystem.HttpComponent was shut down inside testcase TC_LIS_HTTP_POST_BV_03. +14:52:04.155895 mtc EXECUTOR ../ttcn/AtsNg112_TestCases.ttcn:419(testcase:TC_LIS_HTTP_POST_BV_03) Waiting for PTCs to finish. +14:52:04.156327 mtc VERDICTOP ../ttcn/AtsNg112_TestCases.ttcn:419(testcase:TC_LIS_HTTP_POST_BV_03) Setting final verdict of the test case. +14:52:04.156840 mtc VERDICTOP ../ttcn/AtsNg112_TestCases.ttcn:419(testcase:TC_LIS_HTTP_POST_BV_03) Local verdict of MTC: pass +14:52:04.157585 mtc VERDICTOP ../ttcn/AtsNg112_TestCases.ttcn:419(testcase:TC_LIS_HTTP_POST_BV_03) No PTCs were created. +14:52:04.157874 mtc TESTCASE ../ttcn/AtsNg112_TestCases.ttcn:419(testcase:TC_LIS_HTTP_POST_BV_03) Test case TC_LIS_HTTP_POST_BV_03 finished. Verdict: pass +14:52:04.158618 mtc STATISTICS - Verdict statistics: 0 none (0.00 %), 1 pass (100.00 %), 0 inconc (0.00 %), 0 fail (0.00 %), 0 error (0.00 %). +14:52:04.159206 mtc STATISTICS - Test execution summary: 1 test case was executed. Overall verdict: pass +14:52:04.159524 mtc EXECUTOR - Exit was requested from MC. Terminating MTC. +14:52:04.160160 hc EXECUTOR - Exit was requested from MC. Terminating HC. +14:52:04.160430 hc EXECUTOR - Disconnected from MC. +14:52:04.160513 hc EXECUTOR - TTCN-3 Host Controller finished. diff --git a/workspace_stf549/.metadata/.lock b/workspace_stf549/.metadata/.lock new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/workspace_stf549/.metadata/.mylyn/.taskListIndex/segments_1 b/workspace_stf549/.metadata/.mylyn/.taskListIndex/segments_1 new file mode 100644 index 0000000000000000000000000000000000000000..8122741ca527ab8ee056fcebcc6071d0510e42e3 Binary files /dev/null and b/workspace_stf549/.metadata/.mylyn/.taskListIndex/segments_1 differ diff --git a/workspace_stf549/.metadata/.mylyn/.taskListIndex/write.lock b/workspace_stf549/.metadata/.mylyn/.taskListIndex/write.lock new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/workspace_stf549/.metadata/.mylyn/.tasks.xml.zip b/workspace_stf549/.metadata/.mylyn/.tasks.xml.zip new file mode 100644 index 0000000000000000000000000000000000000000..afa5d41173629f6a034f88fedfd4f2fe4cee935a Binary files /dev/null and b/workspace_stf549/.metadata/.mylyn/.tasks.xml.zip differ diff --git a/workspace_stf549/.metadata/.mylyn/repositories.xml.zip b/workspace_stf549/.metadata/.mylyn/repositories.xml.zip new file mode 100644 index 0000000000000000000000000000000000000000..4ac46520e9740e6492b61ca8b24c8b46b6108d3f Binary files /dev/null and b/workspace_stf549/.metadata/.mylyn/repositories.xml.zip differ diff --git a/workspace_stf549/.metadata/.mylyn/tasks.xml.zip b/workspace_stf549/.metadata/.mylyn/tasks.xml.zip new file mode 100644 index 0000000000000000000000000000000000000000..9c83b0d93b14e9e73d561b4bb18c54703c276f21 Binary files /dev/null and b/workspace_stf549/.metadata/.mylyn/tasks.xml.zip differ diff --git a/workspace_stf549/.metadata/.plugins/org.eclipse.cdt.make.core/specs.c b/workspace_stf549/.metadata/.plugins/org.eclipse.cdt.make.core/specs.c new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/workspace_stf549/.metadata/.plugins/org.eclipse.cdt.make.core/specs.c @@ -0,0 +1 @@ + diff --git a/workspace_stf549/.metadata/.plugins/org.eclipse.cdt.make.core/specs.cpp b/workspace_stf549/.metadata/.plugins/org.eclipse.cdt.make.core/specs.cpp new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/workspace_stf549/.metadata/.plugins/org.eclipse.cdt.make.core/specs.cpp @@ -0,0 +1 @@ + diff --git a/workspace_stf549/.metadata/.plugins/org.eclipse.cdt.make.ui/dialog_settings.xml b/workspace_stf549/.metadata/.plugins/org.eclipse.cdt.make.ui/dialog_settings.xml new file mode 100644 index 0000000000000000000000000000000000000000..1cb58a43cb2ffb6b93b7c0ee355f77a8e8ff911e --- /dev/null +++ b/workspace_stf549/.metadata/.plugins/org.eclipse.cdt.make.ui/dialog_settings.xml @@ -0,0 +1,5 @@ + +
+
+
+
diff --git a/workspace_stf549/.metadata/.plugins/org.eclipse.cdt.ui/dialog_settings.xml b/workspace_stf549/.metadata/.plugins/org.eclipse.cdt.ui/dialog_settings.xml new file mode 100644 index 0000000000000000000000000000000000000000..761ad3c8c8dec01f579ab9d36519ac5246f8ed44 --- /dev/null +++ b/workspace_stf549/.metadata/.plugins/org.eclipse.cdt.ui/dialog_settings.xml @@ -0,0 +1,14 @@ + +
+
+
+
+ + + + + +
+
+
+
diff --git a/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.core.prefs b/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.core.prefs new file mode 100644 index 0000000000000000000000000000000000000000..931b5cbb54c8b4c0b1380c141446bf51aaa3ae94 --- /dev/null +++ b/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.core.prefs @@ -0,0 +1,5 @@ +build.all.configs.enabled=false +build.proj.ref.configs.enabled=false +eclipse.preferences.version=1 +org.eclipse.cdt.core.showSourceFilesInBinaries=true +org.eclipse.cdt.core.showSourceNotFoundEditor=all_time diff --git a/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.core.prj-STF549_Ng112.prefs b/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.core.prj-STF549_Ng112.prefs new file mode 100644 index 0000000000000000000000000000000000000000..9c00dc4e22bf3a4a9c3c7fa630b512dbb2c1a5fa --- /dev/null +++ b/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.core.prj-STF549_Ng112.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +indexer/preferenceScope=0 diff --git a/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.debug.core.prefs b/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.debug.core.prefs new file mode 100644 index 0000000000000000000000000000000000000000..2762d403e41a03b2eb1d78407c8fc1f30ed0e742 --- /dev/null +++ b/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.debug.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.cdt.debug.core.cDebug.default_source_containers=\n\n \n \n \n \n \n\n diff --git a/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.mylyn.ui.prefs b/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.mylyn.ui.prefs new file mode 100644 index 0000000000000000000000000000000000000000..0451f542147e095cda31826caf9c8524818a4d18 --- /dev/null +++ b/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.mylyn.ui.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.mylyn.cdt.ui.run.count.3_3_0=1 diff --git a/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.ui.prefs b/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.ui.prefs new file mode 100644 index 0000000000000000000000000000000000000000..71ac973c00e8829fc59c56a2348b2d7ba4475bf3 --- /dev/null +++ b/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.cdt.ui.prefs @@ -0,0 +1,5 @@ +content_assist_disabled_computers=org.eclipse.cdt.ui.textProposalCategory\u0000org.eclipse.cdt.ui.parserProposalCategory\u0000 +eclipse.preferences.version=1 +spelling_locale_initialized=true +useAnnotationsPrefPage=true +useQuickDiffPrefPage=true diff --git a/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs b/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000000000000000000000000000000000000..a7fb09f39d842d90d380532e60872604fbf738e8 --- /dev/null +++ b/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,3 @@ +description.autobuilding=false +eclipse.preferences.version=1 +version=1 diff --git a/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.debug.core.prefs b/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.debug.core.prefs new file mode 100644 index 0000000000000000000000000000000000000000..dd78b8df302e6e58e196e45b7f8b0ccf54850b85 --- /dev/null +++ b/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.debug.core.prefs @@ -0,0 +1,5 @@ +//org.eclipse.debug.core.PREFERRED_DELEGATES/org.eclipse.cdt.launch.applicationLaunchType=org.eclipse.cdt.dsf.gdb.launch.localCLaunch,debug,;org.eclipse.cdt.cdi.launch.localCLaunch,run,; +//org.eclipse.debug.core.PREFERRED_DELEGATES/org.eclipse.cdt.launch.attachLaunchType=org.eclipse.cdt.dsf.gdb.launch.attachCLaunch,debug,; +//org.eclipse.debug.core.PREFERRED_DELEGATES/org.eclipse.cdt.launch.postmortemLaunchType=org.eclipse.cdt.dsf.gdb.launch.coreCLaunch,debug,; +//org.eclipse.debug.core.PREFERRED_DELEGATES/org.eclipse.cdt.launch.remoteApplicationLaunchType=org.eclipse.rse.remotecdt.dsf.debug,debug,; +eclipse.preferences.version=1 diff --git a/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.debug.ui.prefs b/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.debug.ui.prefs new file mode 100644 index 0000000000000000000000000000000000000000..1f70388d5faeec7a4f940ebd878628274d54c190 --- /dev/null +++ b/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.debug.ui.prefs @@ -0,0 +1,4 @@ +eclipse.preferences.version=1 +org.eclipse.debug.ui.PREF_LAUNCH_PERSPECTIVES=\n\n +org.eclipse.debug.ui.cancel_launch_with_compile_errors=always +preferredTargets=org.eclipse.cdt.debug.ui.toggleCBreakpointTarget,org.eclipse.cdt.debug.ui.toggleCDynamicPrintfTarget\:org.eclipse.cdt.debug.ui.toggleCBreakpointTarget| diff --git a/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.epp.logging.aeri.ide.prefs b/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.epp.logging.aeri.ide.prefs new file mode 100644 index 0000000000000000000000000000000000000000..c186df8704180f2e66dc5bc55a75150b2f102744 --- /dev/null +++ b/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.epp.logging.aeri.ide.prefs @@ -0,0 +1,4 @@ +eclipse.preferences.version=1 +resetSendMode=KEEP +resetSendModeOn=0 +sendMode=NOTIFY diff --git a/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.launchbar.core.prefs b/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.launchbar.core.prefs new file mode 100644 index 0000000000000000000000000000000000000000..670f3d2adf8032eb452ddd832f915e67c262aa83 --- /dev/null +++ b/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.launchbar.core.prefs @@ -0,0 +1,7 @@ +LaunchTargetManager/org.eclipse.launchbar.core.launchTargetType.local,Local/arch=x86_64 +LaunchTargetManager/org.eclipse.launchbar.core.launchTargetType.local,Local/name=Local +LaunchTargetManager/org.eclipse.launchbar.core.launchTargetType.local,Local/os=linux +configDescList=org.eclipse.launchbar.core.descriptorType.default\:new configuration (__STF549_Ng112__src__etc__etc__AtsNg112__AtsNg112.cfg) +eclipse.preferences.version=1 +org.eclipse.launchbar.core.descriptorType.default\:new\ configuration\ (__STF549_Ng112__src__etc__etc__AtsNg112__AtsNg112.cfg)/activeLaunchMode=run +org.eclipse.launchbar.core.descriptorType.default\:new\ configuration\ (__STF549_Ng112__src__etc__etc__AtsNg112__AtsNg112.cfg)/activeLaunchTarget=org.eclipse.launchbar.core.launchTargetType.local\:Local diff --git a/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.context.core.prefs b/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.context.core.prefs new file mode 100644 index 0000000000000000000000000000000000000000..43e97e40594b0c578d4094acdeb880e730c52b81 --- /dev/null +++ b/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.context.core.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +mylyn.attention.migrated=true diff --git a/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.monitor.ui.prefs b/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.monitor.ui.prefs new file mode 100644 index 0000000000000000000000000000000000000000..8d462a6cf4a5380e037352977c750defd2aaed72 --- /dev/null +++ b/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.monitor.ui.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.mylyn.monitor.activity.tracking.enabled.checked=true diff --git a/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.tasks.ui.prefs b/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.tasks.ui.prefs new file mode 100644 index 0000000000000000000000000000000000000000..2b60c21d642fb5980ba2c655686bb304eeb8c41e --- /dev/null +++ b/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.mylyn.tasks.ui.prefs @@ -0,0 +1,5 @@ +eclipse.preferences.version=1 +migrated.task.repositories.secure.store=true +org.eclipse.mylyn.tasks.ui.filters.nonmatching=true +org.eclipse.mylyn.tasks.ui.filters.nonmatching.encouraged=true +org.eclipse.mylyn.tasks.ui.welcome.message=true diff --git a/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.rse.core.prefs b/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.rse.core.prefs new file mode 100644 index 0000000000000000000000000000000000000000..411bd8c3df52b0c405a10102cf131579cf83b4d4 --- /dev/null +++ b/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.rse.core.prefs @@ -0,0 +1,3 @@ +eclipse.preferences.version=1 +org.eclipse.rse.systemtype.local.systemType.defaultUserId=vagrant +useridperkey=vagrant.Local\=vagrant; diff --git a/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.rse.ui.prefs b/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.rse.ui.prefs new file mode 100644 index 0000000000000000000000000000000000000000..cc2842c1d91b48469ee2ce942a0c50c59f390365 --- /dev/null +++ b/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.rse.ui.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.rse.preferences.order.connections=vagrant.Local diff --git a/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.search.prefs b/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.search.prefs new file mode 100644 index 0000000000000000000000000000000000000000..cec65c4998343b1b9b345248e8dcf301dfb0bf2a --- /dev/null +++ b/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.search.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.search.defaultPerspective=org.eclipse.search.defaultPerspective.none diff --git a/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.team.ui.prefs b/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.team.ui.prefs new file mode 100644 index 0000000000000000000000000000000000000000..56cd496ffc9b92e8d0612bb949b93400290d3f37 --- /dev/null +++ b/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.team.ui.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.team.ui.first_time=false diff --git a/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.titan.executor.prefs b/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.titan.executor.prefs new file mode 100644 index 0000000000000000000000000000000000000000..408df57e7e7662ca6f5fd595b2c8da9ae0a7124c --- /dev/null +++ b/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.titan.executor.prefs @@ -0,0 +1,2 @@ +deleteLogFiles=true +eclipse.preferences.version=1 diff --git a/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.titan.log.viewer.prefs b/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.titan.log.viewer.prefs new file mode 100644 index 0000000000000000000000000000000000000000..5df2ef4448689ebf81c4bfe82b4d50a8e1a9577e --- /dev/null +++ b/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.titan.log.viewer.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +org.eclipse.titan.log.viewer.version=1.2 diff --git a/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.editors.prefs b/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.editors.prefs new file mode 100644 index 0000000000000000000000000000000000000000..61f3bb8b42d32457660c9d177e2fb5a8069b452f --- /dev/null +++ b/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.editors.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +overviewRuler_migration=migrated_3.1 diff --git a/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs b/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs new file mode 100644 index 0000000000000000000000000000000000000000..e237aef256f09a13f475ade9246a31aca347fd1a --- /dev/null +++ b/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.ide.prefs @@ -0,0 +1,6 @@ +PROBLEMS_FILTERS_MIGRATE=true +SWITCH_PERSPECTIVE_ON_PROJECT_CREATION=always +eclipse.preferences.version=1 +platformState=1531373490754 +quickStart=false +tipsAndTricks=true diff --git a/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.prefs b/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.prefs new file mode 100644 index 0000000000000000000000000000000000000000..08076f236aa4ff36c64d28b14f96c86da910bf7d --- /dev/null +++ b/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +showIntro=false diff --git a/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.views.log.prefs b/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.views.log.prefs new file mode 100644 index 0000000000000000000000000000000000000000..850ac91160e27c431df9b9a15cefae3d69bc73dc --- /dev/null +++ b/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.views.log.prefs @@ -0,0 +1,10 @@ +activate=true +column2=300 +column3=150 +column4=525 +eclipse.preferences.version=1 +groupBy=0 +maxLogTailSize=1 +orderType=2 +orderValue=-1 +show_filter_text=true diff --git a/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.workbench.prefs b/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.workbench.prefs new file mode 100644 index 0000000000000000000000000000000000000000..699e6a224c0664315838622422a1feaacd622fcf --- /dev/null +++ b/workspace_stf549/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.workbench.prefs @@ -0,0 +1,2 @@ +//org.eclipse.ui.commands/state/org.eclipse.ui.navigator.resources.nested.changeProjectPresentation/org.eclipse.ui.commands.radioState=false +eclipse.preferences.version=1 diff --git a/workspace_stf549/.metadata/.plugins/org.eclipse.debug.core/.launches/new configuration (__STF549_Ng112__src__etc__etc__AtsNg112__AtsNg112.cfg).launch b/workspace_stf549/.metadata/.plugins/org.eclipse.debug.core/.launches/new configuration (__STF549_Ng112__src__etc__etc__AtsNg112__AtsNg112.cfg).launch new file mode 100644 index 0000000000000000000000000000000000000000..a1266c2d25b3efd543e8c00acd9da52d9dcb470a --- /dev/null +++ b/workspace_stf549/.metadata/.plugins/org.eclipse.debug.core/.launches/new configuration (__STF549_Ng112__src__etc__etc__AtsNg112__AtsNg112.cfg).launch @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/workspace_stf549/.metadata/.plugins/org.eclipse.debug.ui/launchConfigurationHistory.xml b/workspace_stf549/.metadata/.plugins/org.eclipse.debug.ui/launchConfigurationHistory.xml new file mode 100644 index 0000000000000000000000000000000000000000..90d8389e85f01592e2b275011cf28cee1c74db29 --- /dev/null +++ b/workspace_stf549/.metadata/.plugins/org.eclipse.debug.ui/launchConfigurationHistory.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/workspace_stf549/.metadata/.plugins/org.eclipse.equinox.p2.ui/dialog_settings.xml b/workspace_stf549/.metadata/.plugins/org.eclipse.equinox.p2.ui/dialog_settings.xml new file mode 100644 index 0000000000000000000000000000000000000000..1a20e1073baf760cc52b51666634849ccddc3d91 --- /dev/null +++ b/workspace_stf549/.metadata/.plugins/org.eclipse.equinox.p2.ui/dialog_settings.xml @@ -0,0 +1,35 @@ + +
+
+ + + + + +
+
+ + + + + + + + + +
+
+ + + + + +
+
+ + + + + +
+
diff --git a/workspace_stf549/.metadata/.plugins/org.eclipse.linuxtools.cdt.libhover/C/devhelp.libhover b/workspace_stf549/.metadata/.plugins/org.eclipse.linuxtools.cdt.libhover/C/devhelp.libhover new file mode 100644 index 0000000000000000000000000000000000000000..4586e41085744e59015897a2171253745c50fe13 Binary files /dev/null and b/workspace_stf549/.metadata/.plugins/org.eclipse.linuxtools.cdt.libhover/C/devhelp.libhover differ diff --git a/workspace_stf549/.metadata/.plugins/org.eclipse.linuxtools.cdt.libhover/C/glibc_library.libhover b/workspace_stf549/.metadata/.plugins/org.eclipse.linuxtools.cdt.libhover/C/glibc_library.libhover new file mode 100644 index 0000000000000000000000000000000000000000..7ce9769164d2c8bcca20c383f5810acc8bbc6af3 Binary files /dev/null and b/workspace_stf549/.metadata/.plugins/org.eclipse.linuxtools.cdt.libhover/C/glibc_library.libhover differ diff --git a/workspace_stf549/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/.workspace/2018/7/28/refactorings.history b/workspace_stf549/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/.workspace/2018/7/28/refactorings.history new file mode 100644 index 0000000000000000000000000000000000000000..381ae2f7c80157fa933ac8f1ecbfe38d79a9f316 --- /dev/null +++ b/workspace_stf549/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/.workspace/2018/7/28/refactorings.history @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/workspace_stf549/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/.workspace/2018/7/28/refactorings.index b/workspace_stf549/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/.workspace/2018/7/28/refactorings.index new file mode 100644 index 0000000000000000000000000000000000000000..69417a9de346c2762394d67fb2a727056d856617 --- /dev/null +++ b/workspace_stf549/.metadata/.plugins/org.eclipse.ltk.core.refactoring/.refactorings/.workspace/2018/7/28/refactorings.index @@ -0,0 +1,8 @@ +1531374777568 Delete 16 resources +1531374801079 Delete 2 resources +1531376201036 Delete 2 resources +1531376378781 Delete resource 'STF549_Ng112/src/ccsrc' +1531382182339 Delete resource 'STF549_Ng112/src/logs' +1531385948845 Delete 3 resources +1531389072291 Delete 3 resources +1531391493751 Delete resource 'STF549_Ng112/logs/STF549_Ng112.vagrant-hc.log' diff --git a/workspace_stf549/.metadata/.plugins/org.eclipse.ltk.ui.refactoring/dialog_settings.xml b/workspace_stf549/.metadata/.plugins/org.eclipse.ltk.ui.refactoring/dialog_settings.xml new file mode 100644 index 0000000000000000000000000000000000000000..aa26784293bfa13c78cdfb5c2c316d817b156f98 --- /dev/null +++ b/workspace_stf549/.metadata/.plugins/org.eclipse.ltk.ui.refactoring/dialog_settings.xml @@ -0,0 +1,7 @@ + +
+
+ + +
+
diff --git a/workspace_stf549/.metadata/.plugins/org.eclipse.oomph.setup/workspace.setup b/workspace_stf549/.metadata/.plugins/org.eclipse.oomph.setup/workspace.setup new file mode 100644 index 0000000000000000000000000000000000000000..1f73e14c1a55d41d85ea916a87b57b3251cb1681 --- /dev/null +++ b/workspace_stf549/.metadata/.plugins/org.eclipse.oomph.setup/workspace.setup @@ -0,0 +1,6 @@ + + diff --git a/workspace_stf549/.metadata/.plugins/org.eclipse.rse.core/.log b/workspace_stf549/.metadata/.plugins/org.eclipse.rse.core/.log new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/workspace_stf549/.metadata/.plugins/org.eclipse.rse.core/initializerMarks/org.eclipse.rse.internal.core.RSELocalConnectionInitializer.mark b/workspace_stf549/.metadata/.plugins/org.eclipse.rse.core/initializerMarks/org.eclipse.rse.internal.core.RSELocalConnectionInitializer.mark new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/workspace_stf549/.metadata/.plugins/org.eclipse.rse.core/profiles/PRF.vagrant_0/FP.local.files_0/node.properties b/workspace_stf549/.metadata/.plugins/org.eclipse.rse.core/profiles/PRF.vagrant_0/FP.local.files_0/node.properties new file mode 100644 index 0000000000000000000000000000000000000000..f280531d33f0323dcb85e1a385357bfb3f0704bf --- /dev/null +++ b/workspace_stf549/.metadata/.plugins/org.eclipse.rse.core/profiles/PRF.vagrant_0/FP.local.files_0/node.properties @@ -0,0 +1,57 @@ +# RSE DOM Node +00-name=vagrant\:local.files +01-type=FilterPool +03-attr.default=true +03-attr.deletable=true +03-attr.id=local.files +03-attr.nonRenamable=false +03-attr.owningParentName=null +03-attr.release=200 +03-attr.singleFilterStringOnly=false +03-attr.singleFilterStringOnlyESet=false +03-attr.stringsCaseSensitive=true +03-attr.supportsDuplicateFilterStrings=false +03-attr.supportsNestedFilters=true +03-attr.type=default +06-child.00000.00-name=My Home +06-child.00000.01-type=Filter +06-child.00000.03-attr.default=false +06-child.00000.03-attr.filterType=default +06-child.00000.03-attr.id=My Home +06-child.00000.03-attr.nonChangable=false +06-child.00000.03-attr.nonDeletable=false +06-child.00000.03-attr.nonRenamable=false +06-child.00000.03-attr.promptable=false +06-child.00000.03-attr.relativeOrder=0 +06-child.00000.03-attr.release=200 +06-child.00000.03-attr.singleFilterStringOnly=false +06-child.00000.03-attr.stringsCaseSensitive=true +06-child.00000.03-attr.stringsNonChangable=false +06-child.00000.03-attr.supportsDuplicateFilterStrings=false +06-child.00000.03-attr.supportsNestedFilters=true +06-child.00000.06-child.00000.00-name=/home/vagrant/* +06-child.00000.06-child.00000.01-type=FilterString +06-child.00000.06-child.00000.03-attr.default=false +06-child.00000.06-child.00000.03-attr.string=/home/vagrant/* +06-child.00000.06-child.00000.03-attr.type=default +06-child.00001.00-name=Root +06-child.00001.01-type=Filter +06-child.00001.03-attr.default=false +06-child.00001.03-attr.filterType=default +06-child.00001.03-attr.id=Root +06-child.00001.03-attr.nonChangable=false +06-child.00001.03-attr.nonDeletable=false +06-child.00001.03-attr.nonRenamable=false +06-child.00001.03-attr.promptable=false +06-child.00001.03-attr.relativeOrder=0 +06-child.00001.03-attr.release=200 +06-child.00001.03-attr.singleFilterStringOnly=false +06-child.00001.03-attr.stringsCaseSensitive=true +06-child.00001.03-attr.stringsNonChangable=false +06-child.00001.03-attr.supportsDuplicateFilterStrings=false +06-child.00001.03-attr.supportsNestedFilters=true +06-child.00001.06-child.00000.00-name=/* +06-child.00001.06-child.00000.01-type=FilterString +06-child.00001.06-child.00000.03-attr.default=false +06-child.00001.06-child.00000.03-attr.string=/* +06-child.00001.06-child.00000.03-attr.type=default diff --git a/workspace_stf549/.metadata/.plugins/org.eclipse.rse.core/profiles/PRF.vagrant_0/H.local_16/node.properties b/workspace_stf549/.metadata/.plugins/org.eclipse.rse.core/profiles/PRF.vagrant_0/H.local_16/node.properties new file mode 100644 index 0000000000000000000000000000000000000000..7240f5b83af2eb2896f689073351a8aadd852006 --- /dev/null +++ b/workspace_stf549/.metadata/.plugins/org.eclipse.rse.core/profiles/PRF.vagrant_0/H.local_16/node.properties @@ -0,0 +1,25 @@ +# RSE DOM Node +00-name=Local +01-type=Host +03-attr.description= +03-attr.hostname=LOCALHOST +03-attr.offline=false +03-attr.promptable=false +03-attr.systemType=org.eclipse.rse.systemtype.local +03-attr.type=Local +06-child.00000.00-name=Local Connector Service +06-child.00000.01-type=ConnectorService +06-child.00000.03-attr.group=Local Connector Service +06-child.00000.03-attr.port=0 +06-child.00000.03-attr.useSSL=false +06-child.00000.06-child.00000.00-name=Local Files +06-child.00000.06-child.00000.01-type=SubSystem +06-child.00000.06-child.00000.03-attr.hidden=false +06-child.00000.06-child.00000.03-attr.type=local.files +06-child.00000.06-child.00000.06-child.00000.00-name=vagrant___vagrant\:local.files +06-child.00000.06-child.00000.06-child.00000.01-type=FilterPoolReference +06-child.00000.06-child.00000.06-child.00000.03-attr.refID=local.files +06-child.00000.06-child.00001.00-name=Local Shells +06-child.00000.06-child.00001.01-type=SubSystem +06-child.00000.06-child.00001.03-attr.hidden=false +06-child.00000.06-child.00001.03-attr.type=local.shells diff --git a/workspace_stf549/.metadata/.plugins/org.eclipse.rse.core/profiles/PRF.vagrant_0/node.properties b/workspace_stf549/.metadata/.plugins/org.eclipse.rse.core/profiles/PRF.vagrant_0/node.properties new file mode 100644 index 0000000000000000000000000000000000000000..2d15bb12ceba70c06f65374805e24a49f96cc42e --- /dev/null +++ b/workspace_stf549/.metadata/.plugins/org.eclipse.rse.core/profiles/PRF.vagrant_0/node.properties @@ -0,0 +1,7 @@ +# RSE DOM Node +00-name=vagrant +01-type=Profile +03-attr.defaultPrivate=true +03-attr.isActive=true +05-ref.00000=FP.local.files_0 +05-ref.00001=H.local_16 diff --git a/workspace_stf549/.metadata/.plugins/org.eclipse.rse.ui/.log b/workspace_stf549/.metadata/.plugins/org.eclipse.rse.ui/.log new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/workspace_stf549/.metadata/.plugins/org.eclipse.rse.ui/dialog_settings.xml b/workspace_stf549/.metadata/.plugins/org.eclipse.rse.ui/dialog_settings.xml new file mode 100644 index 0000000000000000000000000000000000000000..855bfdb5e938576e97beb2ceb8a7f88296b23d50 --- /dev/null +++ b/workspace_stf549/.metadata/.plugins/org.eclipse.rse.ui/dialog_settings.xml @@ -0,0 +1,5 @@ + +
+
+
+
diff --git a/workspace_stf549/.metadata/.plugins/org.eclipse.search/dialog_settings.xml b/workspace_stf549/.metadata/.plugins/org.eclipse.search/dialog_settings.xml new file mode 100644 index 0000000000000000000000000000000000000000..fd6e9794935e174f97f645d6d570b094f8b215e8 --- /dev/null +++ b/workspace_stf549/.metadata/.plugins/org.eclipse.search/dialog_settings.xml @@ -0,0 +1,70 @@ + +
+
+ +
+
+ +
+
+ + + + + + +
+ + +
+
+ + + + + + + + + + + + + +
+
+
+ +
+
+ + + + + + + + + + + + + + + + +
+
+ +
+
+ +
+
+ + + + + +
+
diff --git a/workspace_stf549/.metadata/.plugins/org.eclipse.titan.log.viewer/dialog_settings.xml b/workspace_stf549/.metadata/.plugins/org.eclipse.titan.log.viewer/dialog_settings.xml new file mode 100644 index 0000000000000000000000000000000000000000..312a93e728e8a742d6844fd5e6078ed46454aa07 --- /dev/null +++ b/workspace_stf549/.metadata/.plugins/org.eclipse.titan.log.viewer/dialog_settings.xml @@ -0,0 +1,32 @@ + +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + +
+
+
diff --git a/workspace_stf549/.metadata/.plugins/org.eclipse.ui.editors/dialog_settings.xml b/workspace_stf549/.metadata/.plugins/org.eclipse.ui.editors/dialog_settings.xml new file mode 100644 index 0000000000000000000000000000000000000000..50f1edb316c52c4db0e3fb860e536f1f790ddc37 --- /dev/null +++ b/workspace_stf549/.metadata/.plugins/org.eclipse.ui.editors/dialog_settings.xml @@ -0,0 +1,5 @@ + +
+
+
+
diff --git a/workspace_stf549/.metadata/.plugins/org.eclipse.ui.ide/dialog_settings.xml b/workspace_stf549/.metadata/.plugins/org.eclipse.ui.ide/dialog_settings.xml new file mode 100644 index 0000000000000000000000000000000000000000..ba65cadaf013980fc2d319cc3ec60c61b35783c6 --- /dev/null +++ b/workspace_stf549/.metadata/.plugins/org.eclipse.ui.ide/dialog_settings.xml @@ -0,0 +1,18 @@ + +
+
+ + + + + + + +
+
+ + + + +
+
diff --git a/workspace_stf549/.metadata/.plugins/org.eclipse.ui.intro/introstate b/workspace_stf549/.metadata/.plugins/org.eclipse.ui.intro/introstate new file mode 100644 index 0000000000000000000000000000000000000000..236d56cbad8379abdb8f5fb599717d93cd38201d --- /dev/null +++ b/workspace_stf549/.metadata/.plugins/org.eclipse.ui.intro/introstate @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/workspace_stf549/.metadata/.plugins/org.eclipse.ui.views.log/dialog_settings.xml b/workspace_stf549/.metadata/.plugins/org.eclipse.ui.views.log/dialog_settings.xml new file mode 100644 index 0000000000000000000000000000000000000000..4709bcbea03799a681748a2740153655e73e2a1e --- /dev/null +++ b/workspace_stf549/.metadata/.plugins/org.eclipse.ui.views.log/dialog_settings.xml @@ -0,0 +1,12 @@ + +
+
+ + + + + + + +
+
diff --git a/workspace_stf549/.metadata/.plugins/org.eclipse.ui.workbench.texteditor/dialog_settings.xml b/workspace_stf549/.metadata/.plugins/org.eclipse.ui.workbench.texteditor/dialog_settings.xml new file mode 100644 index 0000000000000000000000000000000000000000..daa2bc3ff4cda1e62f1acd18503ec0b2a67d99b3 --- /dev/null +++ b/workspace_stf549/.metadata/.plugins/org.eclipse.ui.workbench.texteditor/dialog_settings.xml @@ -0,0 +1,25 @@ + +
+
+ + + + + + + + + + + + + +
+
+ + + + + +
+
diff --git a/workspace_stf549/.metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml b/workspace_stf549/.metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml new file mode 100644 index 0000000000000000000000000000000000000000..e704233573831cc001ca1f6218fdfcf6382187f4 --- /dev/null +++ b/workspace_stf549/.metadata/.plugins/org.eclipse.ui.workbench/dialog_settings.xml @@ -0,0 +1,41 @@ + +
+
+ + +
+
+ + + + + + + + + + +
+
+ + + + +
+
+ + + + + + + + + + + + + + +
+
diff --git a/workspace_stf549/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml b/workspace_stf549/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml new file mode 100644 index 0000000000000000000000000000000000000000..d97e80a9a5a9e604c002aadacf6f66431d903cf7 --- /dev/null +++ b/workspace_stf549/.metadata/.plugins/org.eclipse.ui.workbench/workingsets.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/workspace_stf549/.metadata/.plugins/org.eclipse.wst.sse.core/task-tags.properties b/workspace_stf549/.metadata/.plugins/org.eclipse.wst.sse.core/task-tags.properties new file mode 100644 index 0000000000000000000000000000000000000000..3d8a7ab4bcd07b2ffe905034fca082e81d886c3a --- /dev/null +++ b/workspace_stf549/.metadata/.plugins/org.eclipse.wst.sse.core/task-tags.properties @@ -0,0 +1,3 @@ +# +#Thu Jul 12 06:35:54 UTC 2018 +task-tag-projects-already-scanned=STF549_Ng112,RemoteSystemsTempFiles diff --git a/workspace_stf549/RemoteSystemsTempFiles/.project b/workspace_stf549/RemoteSystemsTempFiles/.project new file mode 100644 index 0000000000000000000000000000000000000000..5447a64fa9d029de5bd06a0ad372bebc0db9a9c1 --- /dev/null +++ b/workspace_stf549/RemoteSystemsTempFiles/.project @@ -0,0 +1,12 @@ + + + RemoteSystemsTempFiles + + + + + + + org.eclipse.rse.ui.remoteSystemsTempNature + + diff --git a/workspace_stf549/STF549_Ng112/.TITAN_properties b/workspace_stf549/STF549_Ng112/.TITAN_properties new file mode 100644 index 0000000000000000000000000000000000000000..beb5b02005ce8cd6fc4880e119268799758f9c7e --- /dev/null +++ b/workspace_stf549/STF549_Ng112/.TITAN_properties @@ -0,0 +1,131 @@ + + Default + + + true + bin/STF549_Ng112 + + AS_USE_SSL + + + [HOME_FRAMEWORKS]/osip/include + + true + true + true + true + true + true + true + None + -std=c++11 + + pcap + ssl + osipparser2 + + + [HOME_FRAMEWORKS]/osip/src/osipparser2/.libs + + + + + bin + + + + + src/ttcn/ttcn/LibCommon/LibCommon_Sync.ttcn + + true + + + + src/ttcn/ttcn/LibHttp/LibItsHttp_XMLTypes.ttcn + + true + + + + src/ttcn/ttcn/LibHttp/LibItsHttp_XmlMessageBodyTypes.ttcn + + true + + + + src/ttcn/ttcn/LibHttp/LibItsHttp_XmlTemplates.ttcn + + true + + + + src/ttcn/ttcn/LibSip/ttcn/LibSip_Common.ttcn + + true + + + + src/ttcn/ttcn/LibSip/ttcn/LibSip_MessageBodyTypes.ttcn + + true + + + + src/ttcn/ttcn/LibSip/ttcn/LibSip_SDPTypes.ttcn + + true + + + + src/ttcn/ttcn/LibSip/ttcn/LibSip_SIPTypesAndValues.ttcn + + true + + + + src/ttcn/ttcn/LibSip/ttcn/LibSip_SMSFunctions.ttcn3 + + true + + + + src/ttcn/ttcn/LibSip/ttcn/LibSip_SMSTemplates.ttcn3 + + true + + + + src/ttcn/ttcn/LibSip/ttcn/LibSip_SMSTypesAndValues.ttcn + + true + + + + src/ttcn/ttcn/LibSip/ttcn/LibSip_SimpleMsgSummaryTypes.ttcn + + true + + + + src/ttcn/ttcn/LibSip/ttcn/LibSip_Steps.ttcn + + true + + + + src/ttcn/ttcn/LibSip/ttcn/LibSip_Templates.ttcn + + true + + + + + + src/ttcn/ttcn/TestCodec + + false + true + + + + \ No newline at end of file diff --git a/workspace_stf549/STF549_Ng112/.project b/workspace_stf549/STF549_Ng112/.project new file mode 100644 index 0000000000000000000000000000000000000000..6367f78ca5bfe6f32127750d305ba4e3dcdb2c14 --- /dev/null +++ b/workspace_stf549/STF549_Ng112/.project @@ -0,0 +1,395 @@ + + + STF549_Ng112 + + + + + + org.eclipse.titan.designer.core.TITANBuilder + + + + + + org.eclipse.titan.designer.core.TITANNature + org.eclipse.titan.log.viewer.TitanLogProject + + + + src/ccsrc/EncDec + 2 + virtual:/virtual + + + src/ccsrc/Framework + 2 + virtual:/virtual + + + src/ccsrc/Ports + 2 + virtual:/virtual + + + src/ccsrc/Protocols + 2 + virtual:/virtual + + + src/ccsrc/README.md + 1 + PARENT-2-ECLIPSE_HOME/dev/STF549_Ng112/ccsrc/README.md + + + src/etc/etc + 2 + PARENT-1-WORKSPACE_LOC/etc + + + src/test_purposes/test_purposes + 2 + PARENT-1-WORKSPACE_LOC/test_purposes + + + src/ttcn/ttcn + 2 + PARENT-1-WORKSPACE_LOC/ttcn + + + src/ccsrc/EncDec/LibHttp + 2 + virtual:/virtual + + + src/ccsrc/EncDec/LibSip + 2 + virtual:/virtual + + + src/ccsrc/Framework/include + 2 + virtual:/virtual + + + src/ccsrc/Framework/src + 2 + virtual:/virtual + + + src/ccsrc/Ports/LibHttp + 2 + virtual:/virtual + + + src/ccsrc/Ports/LibSip + 2 + virtual:/virtual + + + src/ccsrc/Protocols/ETH + 2 + virtual:/virtual + + + src/ccsrc/Protocols/Held + 2 + virtual:/virtual + + + src/ccsrc/Protocols/Http + 2 + virtual:/virtual + + + src/ccsrc/Protocols/Pcap + 2 + virtual:/virtual + + + src/ccsrc/Protocols/Sip + 2 + virtual:/virtual + + + src/ccsrc/Protocols/Tcp + 2 + virtual:/virtual + + + src/ccsrc/Protocols/UDP + 2 + virtual:/virtual + + + src/ccsrc/EncDec/LibHttp/LibItsHttp_Encdec.cc + 1 + PARENT-2-ECLIPSE_HOME/dev/STF549_Ng112/ccsrc/EncDec/LibHttp/LibItsHttp_Encdec.cc + + + src/ccsrc/EncDec/LibSip/LibSip_Encdec.cc + 1 + PARENT-2-ECLIPSE_HOME/dev/STF549_Ng112/ccsrc/EncDec/LibSip/LibSip_Encdec.cc + + + src/ccsrc/EncDec/LibSip/LibSip_SMSFunctions_Encdec.cc + 1 + PARENT-2-ECLIPSE_HOME/dev/STF549_Ng112/ccsrc/EncDec/LibSip/LibSip_SMSFunctions_Encdec.cc + + + src/ccsrc/EncDec/LibSip/LibSip_Steps_Encdec.cc + 1 + PARENT-2-ECLIPSE_HOME/dev/STF549_Ng112/ccsrc/EncDec/LibSip/LibSip_Steps_Encdec.cc + + + src/ccsrc/EncDec/LibSip/LibSip_Templates_Encdec.cc + 1 + PARENT-2-ECLIPSE_HOME/dev/STF549_Ng112/ccsrc/EncDec/LibSip/LibSip_Templates_Encdec.cc + + + src/ccsrc/Framework/include/codec.hh + 1 + PARENT-2-ECLIPSE_HOME/dev/STF549_Ng112/ccsrc/Framework/include/codec.hh + + + src/ccsrc/Framework/include/codec_factory.hh + 1 + PARENT-2-ECLIPSE_HOME/dev/STF549_Ng112/ccsrc/Framework/include/codec_factory.hh + + + src/ccsrc/Framework/include/codec_stack_builder.hh + 1 + PARENT-2-ECLIPSE_HOME/dev/STF549_Ng112/ccsrc/Framework/include/codec_stack_builder.hh + + + src/ccsrc/Framework/include/converter.hh + 1 + PARENT-2-ECLIPSE_HOME/dev/STF549_Ng112/ccsrc/Framework/include/converter.hh + + + src/ccsrc/Framework/include/layer.hh + 1 + PARENT-2-ECLIPSE_HOME/dev/STF549_Ng112/ccsrc/Framework/include/layer.hh + + + src/ccsrc/Framework/include/layer_factory.hh + 1 + PARENT-2-ECLIPSE_HOME/dev/STF549_Ng112/ccsrc/Framework/include/layer_factory.hh + + + src/ccsrc/Framework/include/layer_stack_builder.hh + 1 + PARENT-2-ECLIPSE_HOME/dev/STF549_Ng112/ccsrc/Framework/include/layer_stack_builder.hh + + + src/ccsrc/Framework/include/loggers.hh + 1 + PARENT-2-ECLIPSE_HOME/dev/STF549_Ng112/ccsrc/Framework/include/loggers.hh + + + src/ccsrc/Framework/include/params.hh + 1 + PARENT-2-ECLIPSE_HOME/dev/STF549_Ng112/ccsrc/Framework/include/params.hh + + + src/ccsrc/Framework/include/t_layer.hh + 1 + PARENT-2-ECLIPSE_HOME/dev/STF549_Ng112/ccsrc/Framework/include/t_layer.hh + + + src/ccsrc/Framework/src/codec_stack_builder.cc + 1 + PARENT-2-ECLIPSE_HOME/dev/STF549_Ng112/ccsrc/Framework/src/codec_stack_builder.cc + + + src/ccsrc/Framework/src/converter.cc + 1 + PARENT-2-ECLIPSE_HOME/dev/STF549_Ng112/ccsrc/Framework/src/converter.cc + + + src/ccsrc/Framework/src/layer_factory.cc + 1 + PARENT-2-ECLIPSE_HOME/dev/STF549_Ng112/ccsrc/Framework/src/layer_factory.cc + + + src/ccsrc/Framework/src/loggers.cc + 1 + PARENT-2-ECLIPSE_HOME/dev/STF549_Ng112/ccsrc/Framework/src/loggers.cc + + + src/ccsrc/Framework/src/params.cc + 1 + PARENT-2-ECLIPSE_HOME/dev/STF549_Ng112/ccsrc/Framework/src/params.cc + + + src/ccsrc/Ports/LibHttp/HttpPort.cc + 1 + PARENT-2-ECLIPSE_HOME/dev/STF549_Ng112/ccsrc/Ports/LibHttp/HttpPort.cc + + + src/ccsrc/Ports/LibHttp/HttpPort.hh + 1 + PARENT-2-ECLIPSE_HOME/dev/STF549_Ng112/ccsrc/Ports/LibHttp/HttpPort.hh + + + src/ccsrc/Ports/LibSip/OperatorPort.hh + 1 + PARENT-2-ECLIPSE_HOME/dev/STF549_Ng112/ccsrc/Ports/LibSip/OperatorPort.hh + + + src/ccsrc/Ports/LibSip/SipPort.cc + 1 + PARENT-2-ECLIPSE_HOME/dev/STF549_Ng112/ccsrc/Ports/LibSip/SipPort.cc + + + src/ccsrc/Ports/LibSip/SipPort.hh + 1 + PARENT-2-ECLIPSE_HOME/dev/STF549_Ng112/ccsrc/Ports/LibSip/SipPort.hh + + + src/ccsrc/Protocols/ETH/ethernet_layer.cc + 1 + PARENT-2-ECLIPSE_HOME/dev/STF549_Ng112/ccsrc/Protocols/ETH/ethernet_layer.cc + + + src/ccsrc/Protocols/ETH/ethernet_layer.hh + 1 + PARENT-2-ECLIPSE_HOME/dev/STF549_Ng112/ccsrc/Protocols/ETH/ethernet_layer.hh + + + src/ccsrc/Protocols/ETH/ethernet_layer_factory.hh + 1 + PARENT-2-ECLIPSE_HOME/dev/STF549_Ng112/ccsrc/Protocols/ETH/ethernet_layer_factory.hh + + + src/ccsrc/Protocols/Held/held_codec.cc + 1 + PARENT-2-ECLIPSE_HOME/dev/STF549_Ng112/ccsrc/Protocols/Held/held_codec.cc + + + src/ccsrc/Protocols/Held/held_codec.hh + 1 + PARENT-2-ECLIPSE_HOME/dev/STF549_Ng112/ccsrc/Protocols/Held/held_codec.hh + + + src/ccsrc/Protocols/Held/held_codec_factory.hh + 1 + PARENT-2-ECLIPSE_HOME/dev/STF549_Ng112/ccsrc/Protocols/Held/held_codec_factory.hh + + + src/ccsrc/Protocols/Http/http_codec.cc + 1 + PARENT-2-ECLIPSE_HOME/dev/STF549_Ng112/ccsrc/Protocols/Http/http_codec.cc + + + src/ccsrc/Protocols/Http/http_codec.hh + 1 + PARENT-2-ECLIPSE_HOME/dev/STF549_Ng112/ccsrc/Protocols/Http/http_codec.hh + + + src/ccsrc/Protocols/Http/http_layer.cc + 1 + PARENT-2-ECLIPSE_HOME/dev/STF549_Ng112/ccsrc/Protocols/Http/http_layer.cc + + + src/ccsrc/Protocols/Http/http_layer.hh + 1 + PARENT-2-ECLIPSE_HOME/dev/STF549_Ng112/ccsrc/Protocols/Http/http_layer.hh + + + src/ccsrc/Protocols/Http/http_layer_factory.hh + 1 + PARENT-2-ECLIPSE_HOME/dev/STF549_Ng112/ccsrc/Protocols/Http/http_layer_factory.hh + + + src/ccsrc/Protocols/Pcap/pcap_layer.cc + 1 + PARENT-2-ECLIPSE_HOME/dev/STF549_Ng112/ccsrc/Protocols/Pcap/pcap_layer.cc + + + src/ccsrc/Protocols/Pcap/pcap_layer.hh + 1 + PARENT-2-ECLIPSE_HOME/dev/STF549_Ng112/ccsrc/Protocols/Pcap/pcap_layer.hh + + + src/ccsrc/Protocols/Pcap/pcap_layer_factory.hh + 1 + PARENT-2-ECLIPSE_HOME/dev/STF549_Ng112/ccsrc/Protocols/Pcap/pcap_layer_factory.hh + + + src/ccsrc/Protocols/Sip/sip_codec_register_request.cc + 1 + PARENT-2-ECLIPSE_HOME/dev/STF549_Ng112/ccsrc/Protocols/Sip/sip_codec_register_request.cc + + + src/ccsrc/Protocols/Sip/sip_codec_register_request.hh + 1 + PARENT-2-ECLIPSE_HOME/dev/STF549_Ng112/ccsrc/Protocols/Sip/sip_codec_register_request.hh + + + src/ccsrc/Protocols/Sip/sip_codec_request.cc + 1 + PARENT-2-ECLIPSE_HOME/dev/STF549_Ng112/ccsrc/Protocols/Sip/sip_codec_request.cc + + + src/ccsrc/Protocols/Sip/sip_codec_request.hh + 1 + PARENT-2-ECLIPSE_HOME/dev/STF549_Ng112/ccsrc/Protocols/Sip/sip_codec_request.hh + + + src/ccsrc/Protocols/Sip/sip_layer.cc + 1 + PARENT-2-ECLIPSE_HOME/dev/STF549_Ng112/ccsrc/Protocols/Sip/sip_layer.cc + + + src/ccsrc/Protocols/Sip/sip_layer.hh + 1 + PARENT-2-ECLIPSE_HOME/dev/STF549_Ng112/ccsrc/Protocols/Sip/sip_layer.hh + + + src/ccsrc/Protocols/Sip/sip_layer_factory.hh + 1 + PARENT-2-ECLIPSE_HOME/dev/STF549_Ng112/ccsrc/Protocols/Sip/sip_layer_factory.hh + + + src/ccsrc/Protocols/Tcp/Abstract_Socket.cc + 1 + PARENT-3-WORKSPACE_LOC/frameworks/titan/titan.TestPorts.Common_Components.Abstract_Socket/src/Abstract_Socket.cc + + + src/ccsrc/Protocols/Tcp/Abstract_Socket.hh + 1 + PARENT-3-WORKSPACE_LOC/frameworks/titan/titan.TestPorts.Common_Components.Abstract_Socket/src/Abstract_Socket.hh + + + src/ccsrc/Protocols/Tcp/tcp_layer.cc + 1 + PARENT-2-ECLIPSE_HOME/dev/STF549_Ng112/ccsrc/Protocols/Tcp/tcp_layer.cc + + + src/ccsrc/Protocols/Tcp/tcp_layer.hh + 1 + PARENT-2-ECLIPSE_HOME/dev/STF549_Ng112/ccsrc/Protocols/Tcp/tcp_layer.hh + + + src/ccsrc/Protocols/Tcp/tcp_layer_factory.hh + 1 + PARENT-2-ECLIPSE_HOME/dev/STF549_Ng112/ccsrc/Protocols/Tcp/tcp_layer_factory.hh + + + src/ccsrc/Protocols/UDP/udp_layer.cc + 1 + PARENT-2-ECLIPSE_HOME/dev/STF549_Ng112/ccsrc/Protocols/UDP/udp_layer.cc + + + src/ccsrc/Protocols/UDP/udp_layer.hh + 1 + PARENT-2-ECLIPSE_HOME/dev/STF549_Ng112/ccsrc/Protocols/UDP/udp_layer.hh + + + src/ccsrc/Protocols/UDP/udp_layer_factory.hh + 1 + PARENT-2-ECLIPSE_HOME/dev/STF549_Ng112/ccsrc/Protocols/UDP/udp_layer_factory.hh + + +