// This C++ source file was generated by the TTCN-3 compiler // of the TTCN-3 Test Executor version 9.0.0 // for (build@3978f7fbee0c) on Mon Jun 24 02:37:33 2024 // Copyright (c) 2000-2023 Ericsson Telecom AB // Do not edit this file unless you know what you are doing. /* Including header files */ #include "IPL4asp_Types.hh" namespace IPL4asp__Types { /* Literal string constants */ extern const CHARSTRING cs_0(22, "SRTP_AES128_CM_SHA1_32"), cs_6(45, "SRTP_AES128_CM_SHA1_32:SRTP_AES128_CM_SHA1_80"), cs_1(22, "SRTP_AES128_CM_SHA1_80"), cs_3(22, "SRTP_AES128_F8_SHA1_32"), cs_2(22, "SRTP_AES128_F8_SHA1_80"), cs_5(17, "SRTP_NULL_SHA1_32"), cs_4(17, "SRTP_NULL_SHA1_80"); const unsigned char module_checksum[] = { 0xe9, 0x01, 0x1d, 0x8f, 0xc5, 0x1d, 0x29, 0x9e, 0x33, 0x37, 0xe4, 0x5d, 0x1c, 0xda, 0x7d, 0xec }; /* Global variable definitions */ const XERdescriptor_t ConnectionId_xer_ = { {"ConnectionId>\n", "ConnectionId>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_OERdescriptor_t ConnectionId_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL }; const TTCN_Typedescriptor_t ConnectionId_descr_ = { "@IPL4asp_Types.ConnectionId", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &ConnectionId_xer_, &INTEGER_json_, &ConnectionId_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const TTCN_Typedescriptor_t& ro__ConnectionId_descr_ = Socket__API__Definitions::ro__ConnectionId_descr_; const XERdescriptor_t AssociationId_xer_ = { {"AssociationId>\n", "AssociationId>\n"}, {15, 15}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_Typedescriptor_t AssociationId_descr_ = { "@IPL4asp_Types.AssociationId", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &AssociationId_xer_, &INTEGER_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const TTCN_Typedescriptor_t& ro__AssociationId_descr_ = Socket__API__Definitions::ro__AssociationId_descr_; const XERdescriptor_t HostName_xer_ = { {"HostName>\n", "HostName>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_Typedescriptor_t HostName_descr_ = { "@IPL4asp_Types.HostName", NULL, &CHARSTRING_raw_, &CHARSTRING_text_, &HostName_xer_, &CHARSTRING_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t PortNumber_xer_ = { {"PortNumber>\n", "PortNumber>\n"}, {12, 12}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_OERdescriptor_t PortNumber_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL }; const TTCN_Typedescriptor_t PortNumber_descr_ = { "@IPL4asp_Types.PortNumber", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &PortNumber_xer_, &INTEGER_json_, &PortNumber_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const TTCN_Typedescriptor_t& Socket_descr_ = Socket__API__Definitions::Socket_descr_; const TTCN_Typedescriptor_t& SocketList_descr_ = Socket__API__Definitions::SocketList_descr_; const TTCN_Typedescriptor_t& UdpTuple_descr_ = Socket__API__Definitions::UdpTuple_descr_; const TTCN_Typedescriptor_t& TcpTuple_descr_ = Socket__API__Definitions::TcpTuple_descr_; const TTCN_Typedescriptor_t& SctpTuple_descr_ = Socket__API__Definitions::SctpTuple_descr_; const TTCN_Typedescriptor_t& SslTuple_descr_ = Socket__API__Definitions::SslTuple_descr_; const TTCN_Typedescriptor_t& UnspecifiedTuple_descr_ = Socket__API__Definitions::UnspecifiedTuple_descr_; const TTCN_Typedescriptor_t& ProtoTuple_descr_ = Socket__API__Definitions::ProtoTuple_descr_; const TTCN_Typedescriptor_t& Result_descr_ = Socket__API__Definitions::Result_descr_; const TTCN_Typedescriptor_t& Extended__Result_descr_ = Socket__API__Definitions::Extended__Result_descr_; const XERdescriptor_t UserData_xer_ = { {"UserData>\n", "UserData>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_Typedescriptor_t UserData_descr_ = { "@IPL4asp_Types.UserData", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &UserData_xer_, &INTEGER_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const TTCN_Typedescriptor_t& PortError_descr_ = Socket__API__Definitions::PortError_descr_; const TTCN_Typedescriptor_t& ConnectionOpenedEvent_descr_ = Socket__API__Definitions::ConnectionOpenedEvent_descr_; const TTCN_Typedescriptor_t& ConnectionClosedEvent_descr_ = Socket__API__Definitions::ConnectionOpenedEvent_descr_; const TTCN_Typedescriptor_t& SctpEvent_descr_ = Socket__API__Definitions::SctpEvent_descr_; const TTCN_Typedescriptor_t& PortEvent_descr_ = Socket__API__Definitions::PortEvent_descr_; const TTCN_Typedescriptor_t& SAC__STATE_descr_ = Socket__API__Definitions::SAC__STATE_descr_; const TTCN_Typedescriptor_t& SctpAssocChange_descr_ = Socket__API__Definitions::SctpAssocChange_descr_; const TTCN_Typedescriptor_t& SPC__STATE_descr_ = Socket__API__Definitions::SPC__STATE_descr_; const TTCN_Typedescriptor_t& SctpPeerAddrChange_descr_ = Socket__API__Definitions::SctpPeerAddrChange_descr_; const TTCN_Typedescriptor_t& SctpSendFailed_descr_ = Socket__API__Definitions::SctpSendFailed_descr_; const TTCN_Typedescriptor_t& SctpRemoteError_descr_ = Socket__API__Definitions::SctpRemoteError_descr_; const TTCN_Typedescriptor_t& SctpShutDownEvent_descr_ = Socket__API__Definitions::SctpShutDownEvent_descr_; const TTCN_Typedescriptor_t& SctpPartialDeliveryEvent_descr_ = Socket__API__Definitions::SctpPartialDeliveryEvent_descr_; const TTCN_Typedescriptor_t& SctpAdaptationIndication_descr_ = Socket__API__Definitions::SctpAdaptationIndication_descr_; const TTCN_Typedescriptor_t& ro__integer_descr_ = Socket__API__Definitions::ro__integer_descr_; const TTCN_Typedescriptor_t& f__getMsgLen_descr_ = Socket__API__Definitions::f__getMsgLen_descr_; const TTCN_Typedescriptor_t& ro__charstring_descr_ = Socket__API__Definitions::ro__charstring_descr_; // No XER for TcpKeepAlive const TTCN_Typedescriptor_t TcpKeepAlive_descr_ = { "@IPL4asp_Types.TcpKeepAlive", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t TcpKeepAlive_enable_xer_ = { {"enable>\n", "enable>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const int TcpKeepAlive_enable_oer_ext_arr_[0] = {}; const int TcpKeepAlive_enable_oer_p_[0] = {}; const TTCN_OERdescriptor_t TcpKeepAlive_enable_oer_ = { -1, TRUE, -1, FALSE, 0, 0, TcpKeepAlive_enable_oer_ext_arr_, 0, TcpKeepAlive_enable_oer_p_}; const TTCN_Typedescriptor_t TcpKeepAlive_enable_descr_ = { "@IPL4asp_Types.TcpKeepAlive.enable", &BOOLEAN_ber_, &BOOLEAN_raw_, &BOOLEAN_text_, &TcpKeepAlive_enable_xer_, &BOOLEAN_json_, &TcpKeepAlive_enable_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t TcpKeepAlive_count_xer_ = { {"count>\n", "count>\n"}, {7, 7}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_Typedescriptor_t TcpKeepAlive_count_descr_ = { "@IPL4asp_Types.TcpKeepAlive.count", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &TcpKeepAlive_count_xer_, &INTEGER_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t TcpKeepAlive_idle_xer_ = { {"idle>\n", "idle>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_Typedescriptor_t TcpKeepAlive_idle_descr_ = { "@IPL4asp_Types.TcpKeepAlive.idle", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &TcpKeepAlive_idle_xer_, &INTEGER_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t TcpKeepAlive_interval_xer_ = { {"interval>\n", "interval>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_Typedescriptor_t TcpKeepAlive_interval_descr_ = { "@IPL4asp_Types.TcpKeepAlive.interval", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &TcpKeepAlive_interval_xer_, &INTEGER_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; // No XER for ReuseAddress const TTCN_Typedescriptor_t ReuseAddress_descr_ = { "@IPL4asp_Types.ReuseAddress", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t ReuseAddress_enable_xer_ = { {"enable>\n", "enable>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const int ReuseAddress_enable_oer_ext_arr_[0] = {}; const int ReuseAddress_enable_oer_p_[0] = {}; const TTCN_OERdescriptor_t ReuseAddress_enable_oer_ = { -1, TRUE, -1, FALSE, 0, 0, ReuseAddress_enable_oer_ext_arr_, 0, ReuseAddress_enable_oer_p_}; const TTCN_Typedescriptor_t ReuseAddress_enable_descr_ = { "@IPL4asp_Types.ReuseAddress.enable", &BOOLEAN_ber_, &BOOLEAN_raw_, &BOOLEAN_text_, &ReuseAddress_enable_xer_, &BOOLEAN_json_, &ReuseAddress_enable_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; // No XER for SctpEventHandle const TTCN_Typedescriptor_t SctpEventHandle_descr_ = { "@IPL4asp_Types.SctpEventHandle", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t SctpEventHandle_sctp__data__io__event_xer_ = { {"sctp_data_io_event>\n", "sctp_data_io_event>\n"}, {20, 20}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const int SctpEventHandle_sctp__data__io__event_oer_ext_arr_[0] = {}; const int SctpEventHandle_sctp__data__io__event_oer_p_[0] = {}; const TTCN_OERdescriptor_t SctpEventHandle_sctp__data__io__event_oer_ = { -1, TRUE, -1, FALSE, 0, 0, SctpEventHandle_sctp__data__io__event_oer_ext_arr_, 0, SctpEventHandle_sctp__data__io__event_oer_p_}; const TTCN_Typedescriptor_t SctpEventHandle_sctp__data__io__event_descr_ = { "@IPL4asp_Types.SctpEventHandle.sctp_data_io_event", &BOOLEAN_ber_, &BOOLEAN_raw_, &BOOLEAN_text_, &SctpEventHandle_sctp__data__io__event_xer_, &BOOLEAN_json_, &SctpEventHandle_sctp__data__io__event_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t SctpEventHandle_sctp__association__event_xer_ = { {"sctp_association_event>\n", "sctp_association_event>\n"}, {24, 24}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const int SctpEventHandle_sctp__association__event_oer_ext_arr_[0] = {}; const int SctpEventHandle_sctp__association__event_oer_p_[0] = {}; const TTCN_OERdescriptor_t SctpEventHandle_sctp__association__event_oer_ = { -1, TRUE, -1, FALSE, 0, 0, SctpEventHandle_sctp__association__event_oer_ext_arr_, 0, SctpEventHandle_sctp__association__event_oer_p_}; const TTCN_Typedescriptor_t SctpEventHandle_sctp__association__event_descr_ = { "@IPL4asp_Types.SctpEventHandle.sctp_association_event", &BOOLEAN_ber_, &BOOLEAN_raw_, &BOOLEAN_text_, &SctpEventHandle_sctp__association__event_xer_, &BOOLEAN_json_, &SctpEventHandle_sctp__association__event_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t SctpEventHandle_sctp__address__event_xer_ = { {"sctp_address_event>\n", "sctp_address_event>\n"}, {20, 20}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const int SctpEventHandle_sctp__address__event_oer_ext_arr_[0] = {}; const int SctpEventHandle_sctp__address__event_oer_p_[0] = {}; const TTCN_OERdescriptor_t SctpEventHandle_sctp__address__event_oer_ = { -1, TRUE, -1, FALSE, 0, 0, SctpEventHandle_sctp__address__event_oer_ext_arr_, 0, SctpEventHandle_sctp__address__event_oer_p_}; const TTCN_Typedescriptor_t SctpEventHandle_sctp__address__event_descr_ = { "@IPL4asp_Types.SctpEventHandle.sctp_address_event", &BOOLEAN_ber_, &BOOLEAN_raw_, &BOOLEAN_text_, &SctpEventHandle_sctp__address__event_xer_, &BOOLEAN_json_, &SctpEventHandle_sctp__address__event_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t SctpEventHandle_sctp__send__failure__event_xer_ = { {"sctp_send_failure_event>\n", "sctp_send_failure_event>\n"}, {25, 25}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const int SctpEventHandle_sctp__send__failure__event_oer_ext_arr_[0] = {}; const int SctpEventHandle_sctp__send__failure__event_oer_p_[0] = {}; const TTCN_OERdescriptor_t SctpEventHandle_sctp__send__failure__event_oer_ = { -1, TRUE, -1, FALSE, 0, 0, SctpEventHandle_sctp__send__failure__event_oer_ext_arr_, 0, SctpEventHandle_sctp__send__failure__event_oer_p_}; const TTCN_Typedescriptor_t SctpEventHandle_sctp__send__failure__event_descr_ = { "@IPL4asp_Types.SctpEventHandle.sctp_send_failure_event", &BOOLEAN_ber_, &BOOLEAN_raw_, &BOOLEAN_text_, &SctpEventHandle_sctp__send__failure__event_xer_, &BOOLEAN_json_, &SctpEventHandle_sctp__send__failure__event_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t SctpEventHandle_sctp__peer__error__event_xer_ = { {"sctp_peer_error_event>\n", "sctp_peer_error_event>\n"}, {23, 23}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const int SctpEventHandle_sctp__peer__error__event_oer_ext_arr_[0] = {}; const int SctpEventHandle_sctp__peer__error__event_oer_p_[0] = {}; const TTCN_OERdescriptor_t SctpEventHandle_sctp__peer__error__event_oer_ = { -1, TRUE, -1, FALSE, 0, 0, SctpEventHandle_sctp__peer__error__event_oer_ext_arr_, 0, SctpEventHandle_sctp__peer__error__event_oer_p_}; const TTCN_Typedescriptor_t SctpEventHandle_sctp__peer__error__event_descr_ = { "@IPL4asp_Types.SctpEventHandle.sctp_peer_error_event", &BOOLEAN_ber_, &BOOLEAN_raw_, &BOOLEAN_text_, &SctpEventHandle_sctp__peer__error__event_xer_, &BOOLEAN_json_, &SctpEventHandle_sctp__peer__error__event_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t SctpEventHandle_sctp__shutdown__event_xer_ = { {"sctp_shutdown_event>\n", "sctp_shutdown_event>\n"}, {21, 21}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const int SctpEventHandle_sctp__shutdown__event_oer_ext_arr_[0] = {}; const int SctpEventHandle_sctp__shutdown__event_oer_p_[0] = {}; const TTCN_OERdescriptor_t SctpEventHandle_sctp__shutdown__event_oer_ = { -1, TRUE, -1, FALSE, 0, 0, SctpEventHandle_sctp__shutdown__event_oer_ext_arr_, 0, SctpEventHandle_sctp__shutdown__event_oer_p_}; const TTCN_Typedescriptor_t SctpEventHandle_sctp__shutdown__event_descr_ = { "@IPL4asp_Types.SctpEventHandle.sctp_shutdown_event", &BOOLEAN_ber_, &BOOLEAN_raw_, &BOOLEAN_text_, &SctpEventHandle_sctp__shutdown__event_xer_, &BOOLEAN_json_, &SctpEventHandle_sctp__shutdown__event_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t SctpEventHandle_sctp__partial__delivery__event_xer_ = { {"sctp_partial_delivery_event>\n", "sctp_partial_delivery_event>\n"}, {29, 29}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const int SctpEventHandle_sctp__partial__delivery__event_oer_ext_arr_[0] = {}; const int SctpEventHandle_sctp__partial__delivery__event_oer_p_[0] = {}; const TTCN_OERdescriptor_t SctpEventHandle_sctp__partial__delivery__event_oer_ = { -1, TRUE, -1, FALSE, 0, 0, SctpEventHandle_sctp__partial__delivery__event_oer_ext_arr_, 0, SctpEventHandle_sctp__partial__delivery__event_oer_p_}; const TTCN_Typedescriptor_t SctpEventHandle_sctp__partial__delivery__event_descr_ = { "@IPL4asp_Types.SctpEventHandle.sctp_partial_delivery_event", &BOOLEAN_ber_, &BOOLEAN_raw_, &BOOLEAN_text_, &SctpEventHandle_sctp__partial__delivery__event_xer_, &BOOLEAN_json_, &SctpEventHandle_sctp__partial__delivery__event_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t SctpEventHandle_sctp__adaptation__layer__event_xer_ = { {"sctp_adaptation_layer_event>\n", "sctp_adaptation_layer_event>\n"}, {29, 29}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const int SctpEventHandle_sctp__adaptation__layer__event_oer_ext_arr_[0] = {}; const int SctpEventHandle_sctp__adaptation__layer__event_oer_p_[0] = {}; const TTCN_OERdescriptor_t SctpEventHandle_sctp__adaptation__layer__event_oer_ = { -1, TRUE, -1, FALSE, 0, 0, SctpEventHandle_sctp__adaptation__layer__event_oer_ext_arr_, 0, SctpEventHandle_sctp__adaptation__layer__event_oer_p_}; const TTCN_Typedescriptor_t SctpEventHandle_sctp__adaptation__layer__event_descr_ = { "@IPL4asp_Types.SctpEventHandle.sctp_adaptation_layer_event", &BOOLEAN_ber_, &BOOLEAN_raw_, &BOOLEAN_text_, &SctpEventHandle_sctp__adaptation__layer__event_xer_, &BOOLEAN_json_, &SctpEventHandle_sctp__adaptation__layer__event_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t SctpEventHandle_sctp__authentication__event_xer_ = { {"sctp_authentication_event>\n", "sctp_authentication_event>\n"}, {27, 27}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const int SctpEventHandle_sctp__authentication__event_oer_ext_arr_[0] = {}; const int SctpEventHandle_sctp__authentication__event_oer_p_[0] = {}; const TTCN_OERdescriptor_t SctpEventHandle_sctp__authentication__event_oer_ = { -1, TRUE, -1, FALSE, 0, 0, SctpEventHandle_sctp__authentication__event_oer_ext_arr_, 0, SctpEventHandle_sctp__authentication__event_oer_p_}; const TTCN_Typedescriptor_t SctpEventHandle_sctp__authentication__event_descr_ = { "@IPL4asp_Types.SctpEventHandle.sctp_authentication_event", &BOOLEAN_ber_, &BOOLEAN_raw_, &BOOLEAN_text_, &SctpEventHandle_sctp__authentication__event_xer_, &BOOLEAN_json_, &SctpEventHandle_sctp__authentication__event_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t SctpEventHandle_sctp__sender__dry__event_xer_ = { {"sctp_sender_dry_event>\n", "sctp_sender_dry_event>\n"}, {23, 23}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const int SctpEventHandle_sctp__sender__dry__event_oer_ext_arr_[0] = {}; const int SctpEventHandle_sctp__sender__dry__event_oer_p_[0] = {}; const TTCN_OERdescriptor_t SctpEventHandle_sctp__sender__dry__event_oer_ = { -1, TRUE, -1, FALSE, 0, 0, SctpEventHandle_sctp__sender__dry__event_oer_ext_arr_, 0, SctpEventHandle_sctp__sender__dry__event_oer_p_}; const TTCN_Typedescriptor_t SctpEventHandle_sctp__sender__dry__event_descr_ = { "@IPL4asp_Types.SctpEventHandle.sctp_sender_dry_event", &BOOLEAN_ber_, &BOOLEAN_raw_, &BOOLEAN_text_, &SctpEventHandle_sctp__sender__dry__event_xer_, &BOOLEAN_json_, &SctpEventHandle_sctp__sender__dry__event_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t Linger__opt_l__onoff_xer_ = { {"l_onoff>\n", "l_onoff>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_Typedescriptor_t Linger__opt_l__onoff_descr_ = { "@IPL4asp_Types.Linger_opt.l_onoff", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &Linger__opt_l__onoff_xer_, &INTEGER_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t Linger__opt_l__linger_xer_ = { {"l_linger>\n", "l_linger>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_Typedescriptor_t Linger__opt_l__linger_descr_ = { "@IPL4asp_Types.Linger_opt.l_linger", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &Linger__opt_l__linger_xer_, &INTEGER_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; // No XER for Linger__opt const TTCN_Typedescriptor_t Linger__opt_descr_ = { "@IPL4asp_Types.Linger_opt", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; // No XER for SSL__protocols const TTCN_Typedescriptor_t SSL__protocols_descr_ = { "@IPL4asp_Types.SSL_protocols", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t SSL__protocols_SSLv2__supported_xer_ = { {"SSLv2_supported>\n", "SSLv2_supported>\n"}, {17, 17}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const int SSL__protocols_SSLv2__supported_oer_ext_arr_[0] = {}; const int SSL__protocols_SSLv2__supported_oer_p_[0] = {}; const TTCN_OERdescriptor_t SSL__protocols_SSLv2__supported_oer_ = { -1, TRUE, -1, FALSE, 0, 0, SSL__protocols_SSLv2__supported_oer_ext_arr_, 0, SSL__protocols_SSLv2__supported_oer_p_}; const TTCN_Typedescriptor_t SSL__protocols_SSLv2__supported_descr_ = { "@IPL4asp_Types.SSL_protocols.SSLv2_supported", &BOOLEAN_ber_, &BOOLEAN_raw_, &BOOLEAN_text_, &SSL__protocols_SSLv2__supported_xer_, &BOOLEAN_json_, &SSL__protocols_SSLv2__supported_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t SSL__protocols_SSLv3__supported_xer_ = { {"SSLv3_supported>\n", "SSLv3_supported>\n"}, {17, 17}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const int SSL__protocols_SSLv3__supported_oer_ext_arr_[0] = {}; const int SSL__protocols_SSLv3__supported_oer_p_[0] = {}; const TTCN_OERdescriptor_t SSL__protocols_SSLv3__supported_oer_ = { -1, TRUE, -1, FALSE, 0, 0, SSL__protocols_SSLv3__supported_oer_ext_arr_, 0, SSL__protocols_SSLv3__supported_oer_p_}; const TTCN_Typedescriptor_t SSL__protocols_SSLv3__supported_descr_ = { "@IPL4asp_Types.SSL_protocols.SSLv3_supported", &BOOLEAN_ber_, &BOOLEAN_raw_, &BOOLEAN_text_, &SSL__protocols_SSLv3__supported_xer_, &BOOLEAN_json_, &SSL__protocols_SSLv3__supported_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t SSL__protocols_TLSv1__supported_xer_ = { {"TLSv1_supported>\n", "TLSv1_supported>\n"}, {17, 17}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const int SSL__protocols_TLSv1__supported_oer_ext_arr_[0] = {}; const int SSL__protocols_TLSv1__supported_oer_p_[0] = {}; const TTCN_OERdescriptor_t SSL__protocols_TLSv1__supported_oer_ = { -1, TRUE, -1, FALSE, 0, 0, SSL__protocols_TLSv1__supported_oer_ext_arr_, 0, SSL__protocols_TLSv1__supported_oer_p_}; const TTCN_Typedescriptor_t SSL__protocols_TLSv1__supported_descr_ = { "@IPL4asp_Types.SSL_protocols.TLSv1_supported", &BOOLEAN_ber_, &BOOLEAN_raw_, &BOOLEAN_text_, &SSL__protocols_TLSv1__supported_xer_, &BOOLEAN_json_, &SSL__protocols_TLSv1__supported_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t SSL__protocols_TLSv1__1__supported_xer_ = { {"TLSv1_1_supported>\n", "TLSv1_1_supported>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const int SSL__protocols_TLSv1__1__supported_oer_ext_arr_[0] = {}; const int SSL__protocols_TLSv1__1__supported_oer_p_[0] = {}; const TTCN_OERdescriptor_t SSL__protocols_TLSv1__1__supported_oer_ = { -1, TRUE, -1, FALSE, 0, 0, SSL__protocols_TLSv1__1__supported_oer_ext_arr_, 0, SSL__protocols_TLSv1__1__supported_oer_p_}; const TTCN_Typedescriptor_t SSL__protocols_TLSv1__1__supported_descr_ = { "@IPL4asp_Types.SSL_protocols.TLSv1_1_supported", &BOOLEAN_ber_, &BOOLEAN_raw_, &BOOLEAN_text_, &SSL__protocols_TLSv1__1__supported_xer_, &BOOLEAN_json_, &SSL__protocols_TLSv1__1__supported_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t SSL__protocols_TLSv1__2__supported_xer_ = { {"TLSv1_2_supported>\n", "TLSv1_2_supported>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const int SSL__protocols_TLSv1__2__supported_oer_ext_arr_[0] = {}; const int SSL__protocols_TLSv1__2__supported_oer_p_[0] = {}; const TTCN_OERdescriptor_t SSL__protocols_TLSv1__2__supported_oer_ = { -1, TRUE, -1, FALSE, 0, 0, SSL__protocols_TLSv1__2__supported_oer_ext_arr_, 0, SSL__protocols_TLSv1__2__supported_oer_p_}; const TTCN_Typedescriptor_t SSL__protocols_TLSv1__2__supported_descr_ = { "@IPL4asp_Types.SSL_protocols.TLSv1_2_supported", &BOOLEAN_ber_, &BOOLEAN_raw_, &BOOLEAN_text_, &SSL__protocols_TLSv1__2__supported_xer_, &BOOLEAN_json_, &SSL__protocols_TLSv1__2__supported_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t SSL__protocols_DTLSv1__supported_xer_ = { {"DTLSv1_supported>\n", "DTLSv1_supported>\n"}, {18, 18}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const int SSL__protocols_DTLSv1__supported_oer_ext_arr_[0] = {}; const int SSL__protocols_DTLSv1__supported_oer_p_[0] = {}; const TTCN_OERdescriptor_t SSL__protocols_DTLSv1__supported_oer_ = { -1, TRUE, -1, FALSE, 0, 0, SSL__protocols_DTLSv1__supported_oer_ext_arr_, 0, SSL__protocols_DTLSv1__supported_oer_p_}; const TTCN_Typedescriptor_t SSL__protocols_DTLSv1__supported_descr_ = { "@IPL4asp_Types.SSL_protocols.DTLSv1_supported", &BOOLEAN_ber_, &BOOLEAN_raw_, &BOOLEAN_text_, &SSL__protocols_DTLSv1__supported_xer_, &BOOLEAN_json_, &SSL__protocols_DTLSv1__supported_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t SSL__protocols_DTLSv1__2__supported_xer_ = { {"DTLSv1_2_supported>\n", "DTLSv1_2_supported>\n"}, {20, 20}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const int SSL__protocols_DTLSv1__2__supported_oer_ext_arr_[0] = {}; const int SSL__protocols_DTLSv1__2__supported_oer_p_[0] = {}; const TTCN_OERdescriptor_t SSL__protocols_DTLSv1__2__supported_oer_ = { -1, TRUE, -1, FALSE, 0, 0, SSL__protocols_DTLSv1__2__supported_oer_ext_arr_, 0, SSL__protocols_DTLSv1__2__supported_oer_p_}; const TTCN_Typedescriptor_t SSL__protocols_DTLSv1__2__supported_descr_ = { "@IPL4asp_Types.SSL_protocols.DTLSv1_2_supported", &BOOLEAN_ber_, &BOOLEAN_raw_, &BOOLEAN_text_, &SSL__protocols_DTLSv1__2__supported_xer_, &BOOLEAN_json_, &SSL__protocols_DTLSv1__2__supported_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; // No XER for SSL__proto__support const TTCN_Typedescriptor_t SSL__proto__support_descr_ = { "@IPL4asp_Types.SSL_proto_support", NULL, NULL, NULL, NULL, NULL, NULL, NULL, &SSL__protocols_descr_, TTCN_Typedescriptor_t::DONTCARE }; // No XER for SSL__cert__options const TTCN_Typedescriptor_t SSL__cert__options_descr_ = { "@IPL4asp_Types.SSL_cert_options", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t SSL__cert__options_ssl__key__file_xer_ = { {"ssl_key_file>\n", "ssl_key_file>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_Typedescriptor_t SSL__cert__options_ssl__key__file_descr_ = { "@IPL4asp_Types.SSL_cert_options.ssl_key_file", NULL, &CHARSTRING_raw_, &CHARSTRING_text_, &SSL__cert__options_ssl__key__file_xer_, &CHARSTRING_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t SSL__cert__options_ssl__certificate__file_xer_ = { {"ssl_certificate_file>\n", "ssl_certificate_file>\n"}, {22, 22}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_Typedescriptor_t SSL__cert__options_ssl__certificate__file_descr_ = { "@IPL4asp_Types.SSL_cert_options.ssl_certificate_file", NULL, &CHARSTRING_raw_, &CHARSTRING_text_, &SSL__cert__options_ssl__certificate__file_xer_, &CHARSTRING_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t SSL__cert__options_ssl__trustedCAlist__file_xer_ = { {"ssl_trustedCAlist_file>\n", "ssl_trustedCAlist_file>\n"}, {24, 24}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_Typedescriptor_t SSL__cert__options_ssl__trustedCAlist__file_descr_ = { "@IPL4asp_Types.SSL_cert_options.ssl_trustedCAlist_file", NULL, &CHARSTRING_raw_, &CHARSTRING_text_, &SSL__cert__options_ssl__trustedCAlist__file_xer_, &CHARSTRING_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t SSL__cert__options_ssl__cipher__list_xer_ = { {"ssl_cipher_list>\n", "ssl_cipher_list>\n"}, {17, 17}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_Typedescriptor_t SSL__cert__options_ssl__cipher__list_descr_ = { "@IPL4asp_Types.SSL_cert_options.ssl_cipher_list", NULL, &CHARSTRING_raw_, &CHARSTRING_text_, &SSL__cert__options_ssl__cipher__list_xer_, &CHARSTRING_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t SSL__cert__options_ssl__password_xer_ = { {"ssl_password>\n", "ssl_password>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_Typedescriptor_t SSL__cert__options_ssl__password_descr_ = { "@IPL4asp_Types.SSL_cert_options.ssl_password", NULL, &CHARSTRING_raw_, &CHARSTRING_text_, &SSL__cert__options_ssl__password_xer_, &CHARSTRING_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; // No XER for PSK__options const TTCN_Typedescriptor_t PSK__options_descr_ = { "@IPL4asp_Types.PSK_options", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t PSK__options_psk__identity_xer_ = { {"psk_identity>\n", "psk_identity>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_Typedescriptor_t PSK__options_psk__identity_descr_ = { "@IPL4asp_Types.PSK_options.psk_identity", NULL, &CHARSTRING_raw_, &CHARSTRING_text_, &PSK__options_psk__identity_xer_, &CHARSTRING_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t PSK__options_psk__identity__hint_xer_ = { {"psk_identity_hint>\n", "psk_identity_hint>\n"}, {19, 19}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_Typedescriptor_t PSK__options_psk__identity__hint_descr_ = { "@IPL4asp_Types.PSK_options.psk_identity_hint", NULL, &CHARSTRING_raw_, &CHARSTRING_text_, &PSK__options_psk__identity__hint_xer_, &CHARSTRING_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t PSK__options_psk__key_xer_ = { {"psk_key>\n", "psk_key>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED |XER_OPTIONAL, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_Typedescriptor_t PSK__options_psk__key_descr_ = { "@IPL4asp_Types.PSK_options.psk_key", NULL, &CHARSTRING_raw_, &CHARSTRING_text_, &PSK__options_psk__key_xer_, &CHARSTRING_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; // No XER for MTU__discover const TTCN_Typedescriptor_t MTU__discover_descr_ = { "@IPL4asp_Types.MTU_discover", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; // No XER for Option const TTCN_Typedescriptor_t Option_descr_ = { "@IPL4asp_Types.Option", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; // No XER for HostList const TTCN_Typedescriptor_t HostList_descr_ = { "@IPL4asp_Types.HostList", NULL, NULL, NULL, NULL, NULL, NULL, NULL, &HostName_descr_, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t HostList_0_xer_ = { {"HostName>\n", "HostName>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_Typedescriptor_t HostList_0_descr_ = { "@IPL4asp_Types.HostList.", NULL, &CHARSTRING_raw_, &CHARSTRING_text_, &HostList_0_xer_, &CHARSTRING_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t Option_sctpEINConfigGroup_xer_ = { {"sctpEINConfigGroup>\n", "sctpEINConfigGroup>\n"}, {20, 20}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_Typedescriptor_t Option_sctpEINConfigGroup_descr_ = { "@IPL4asp_Types.Option.sctpEINConfigGroup", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &Option_sctpEINConfigGroup_xer_, &INTEGER_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t Option_no__delay_xer_ = { {"no_delay>\n", "no_delay>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const int Option_no__delay_oer_ext_arr_[0] = {}; const int Option_no__delay_oer_p_[0] = {}; const TTCN_OERdescriptor_t Option_no__delay_oer_ = { -1, TRUE, -1, FALSE, 0, 0, Option_no__delay_oer_ext_arr_, 0, Option_no__delay_oer_p_}; const TTCN_Typedescriptor_t Option_no__delay_descr_ = { "@IPL4asp_Types.Option.no_delay", &BOOLEAN_ber_, &BOOLEAN_raw_, &BOOLEAN_text_, &Option_no__delay_xer_, &BOOLEAN_json_, &Option_no__delay_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t Option_dtlsSrtpProfiles_xer_ = { {"dtlsSrtpProfiles>\n", "dtlsSrtpProfiles>\n"}, {18, 18}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_Typedescriptor_t Option_dtlsSrtpProfiles_descr_ = { "@IPL4asp_Types.Option.dtlsSrtpProfiles", NULL, &CHARSTRING_raw_, &CHARSTRING_text_, &Option_dtlsSrtpProfiles_xer_, &CHARSTRING_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t Option_freebind_xer_ = { {"freebind>\n", "freebind>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const int Option_freebind_oer_ext_arr_[0] = {}; const int Option_freebind_oer_p_[0] = {}; const TTCN_OERdescriptor_t Option_freebind_oer_ = { -1, TRUE, -1, FALSE, 0, 0, Option_freebind_oer_ext_arr_, 0, Option_freebind_oer_p_}; const TTCN_Typedescriptor_t Option_freebind_descr_ = { "@IPL4asp_Types.Option.freebind", &BOOLEAN_ber_, &BOOLEAN_raw_, &BOOLEAN_text_, &Option_freebind_xer_, &BOOLEAN_json_, &Option_freebind_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; // No XER for Option_alpn__list const TTCN_Typedescriptor_t Option_alpn__list_descr_ = { "@IPL4asp_Types.Option.alpn_list", NULL, NULL, NULL, NULL, NULL, NULL, NULL, &CHARSTRING_descr_, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t Option_alpn__list_0_xer_ = { {"CHARSTRING>\n", "CHARSTRING>\n"}, {12, 12}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_Typedescriptor_t Option_alpn__list_0_descr_ = { "@IPL4asp_Types.Option.alpn_list.", NULL, &CHARSTRING_raw_, &CHARSTRING_text_, &Option_alpn__list_0_xer_, &CHARSTRING_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t Option_tls__hostname_xer_ = { {"tls_hostname>\n", "tls_hostname>\n"}, {14, 14}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_Typedescriptor_t Option_tls__hostname_descr_ = { "@IPL4asp_Types.Option.tls_hostname", NULL, &CHARSTRING_raw_, &CHARSTRING_text_, &Option_tls__hostname_xer_, &CHARSTRING_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; // No XER for UDP__ENCAP__Param const TTCN_Typedescriptor_t UDP__ENCAP__Param_descr_ = { "@IPL4asp_Types.UDP_ENCAP_Param", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t Option_dscp_xer_ = { {"dscp>\n", "dscp>\n"}, {6, 6}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_Typedescriptor_t Option_dscp_descr_ = { "@IPL4asp_Types.Option.dscp", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &Option_dscp_xer_, &INTEGER_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; // No XER for OptionList const TTCN_Typedescriptor_t OptionList_descr_ = { "@IPL4asp_Types.OptionList", NULL, NULL, NULL, NULL, NULL, NULL, NULL, &Option_descr_, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t ASP__Send_connId_xer_ = { {"connId>\n", "connId>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_OERdescriptor_t ASP__Send_connId_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL }; const TTCN_Typedescriptor_t ASP__Send_connId_descr_ = { "@IPL4asp_Types.ASP_Send.connId", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &ASP__Send_connId_xer_, &INTEGER_json_, &ASP__Send_connId_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t ASP__Send_msg_xer_ = { {"msg>\n", "msg>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const int ASP__Send_msg_oer_ext_arr_[0] = {}; const int ASP__Send_msg_oer_p_[0] = {}; const TTCN_OERdescriptor_t ASP__Send_msg_oer_ = { -1, TRUE, -1, FALSE, 0, 0, ASP__Send_msg_oer_ext_arr_, 0, ASP__Send_msg_oer_p_}; const TTCN_Typedescriptor_t ASP__Send_msg_descr_ = { "@IPL4asp_Types.ASP_Send.msg", &OCTETSTRING_ber_, &OCTETSTRING_raw_, &OCTETSTRING_text_, &ASP__Send_msg_xer_, &OCTETSTRING_json_, &ASP__Send_msg_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; // No XER for ASP__Send const TTCN_Typedescriptor_t ASP__Send_descr_ = { "@IPL4asp_Types.ASP_Send", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t ASP__SendTo_connId_xer_ = { {"connId>\n", "connId>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_OERdescriptor_t ASP__SendTo_connId_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL }; const TTCN_Typedescriptor_t ASP__SendTo_connId_descr_ = { "@IPL4asp_Types.ASP_SendTo.connId", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &ASP__SendTo_connId_xer_, &INTEGER_json_, &ASP__SendTo_connId_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t ASP__SendTo_remName_xer_ = { {"remName>\n", "remName>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_Typedescriptor_t ASP__SendTo_remName_descr_ = { "@IPL4asp_Types.ASP_SendTo.remName", NULL, &CHARSTRING_raw_, &CHARSTRING_text_, &ASP__SendTo_remName_xer_, &CHARSTRING_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t ASP__SendTo_remPort_xer_ = { {"remPort>\n", "remPort>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_OERdescriptor_t ASP__SendTo_remPort_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL }; const TTCN_Typedescriptor_t ASP__SendTo_remPort_descr_ = { "@IPL4asp_Types.ASP_SendTo.remPort", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &ASP__SendTo_remPort_xer_, &INTEGER_json_, &ASP__SendTo_remPort_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t ASP__SendTo_msg_xer_ = { {"msg>\n", "msg>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const int ASP__SendTo_msg_oer_ext_arr_[0] = {}; const int ASP__SendTo_msg_oer_p_[0] = {}; const TTCN_OERdescriptor_t ASP__SendTo_msg_oer_ = { -1, TRUE, -1, FALSE, 0, 0, ASP__SendTo_msg_oer_ext_arr_, 0, ASP__SendTo_msg_oer_p_}; const TTCN_Typedescriptor_t ASP__SendTo_msg_descr_ = { "@IPL4asp_Types.ASP_SendTo.msg", &OCTETSTRING_ber_, &OCTETSTRING_raw_, &OCTETSTRING_text_, &ASP__SendTo_msg_xer_, &OCTETSTRING_json_, &ASP__SendTo_msg_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; // No XER for ASP__SendTo const TTCN_Typedescriptor_t ASP__SendTo_descr_ = { "@IPL4asp_Types.ASP_SendTo", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t ASP__RecvFrom_connId_xer_ = { {"connId>\n", "connId>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_OERdescriptor_t ASP__RecvFrom_connId_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL }; const TTCN_Typedescriptor_t ASP__RecvFrom_connId_descr_ = { "@IPL4asp_Types.ASP_RecvFrom.connId", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &ASP__RecvFrom_connId_xer_, &INTEGER_json_, &ASP__RecvFrom_connId_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t ASP__RecvFrom_remName_xer_ = { {"remName>\n", "remName>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_Typedescriptor_t ASP__RecvFrom_remName_descr_ = { "@IPL4asp_Types.ASP_RecvFrom.remName", NULL, &CHARSTRING_raw_, &CHARSTRING_text_, &ASP__RecvFrom_remName_xer_, &CHARSTRING_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t ASP__RecvFrom_remPort_xer_ = { {"remPort>\n", "remPort>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_OERdescriptor_t ASP__RecvFrom_remPort_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL }; const TTCN_Typedescriptor_t ASP__RecvFrom_remPort_descr_ = { "@IPL4asp_Types.ASP_RecvFrom.remPort", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &ASP__RecvFrom_remPort_xer_, &INTEGER_json_, &ASP__RecvFrom_remPort_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t ASP__RecvFrom_locName_xer_ = { {"locName>\n", "locName>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_Typedescriptor_t ASP__RecvFrom_locName_descr_ = { "@IPL4asp_Types.ASP_RecvFrom.locName", NULL, &CHARSTRING_raw_, &CHARSTRING_text_, &ASP__RecvFrom_locName_xer_, &CHARSTRING_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t ASP__RecvFrom_locPort_xer_ = { {"locPort>\n", "locPort>\n"}, {9, 9}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_OERdescriptor_t ASP__RecvFrom_locPort_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL }; const TTCN_Typedescriptor_t ASP__RecvFrom_locPort_descr_ = { "@IPL4asp_Types.ASP_RecvFrom.locPort", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &ASP__RecvFrom_locPort_xer_, &INTEGER_json_, &ASP__RecvFrom_locPort_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t ASP__RecvFrom_userData_xer_ = { {"userData>\n", "userData>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_OERdescriptor_t ASP__RecvFrom_userData_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL }; const TTCN_Typedescriptor_t ASP__RecvFrom_userData_descr_ = { "@IPL4asp_Types.ASP_RecvFrom.userData", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &ASP__RecvFrom_userData_xer_, &INTEGER_json_, &ASP__RecvFrom_userData_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t ASP__RecvFrom_msg_xer_ = { {"msg>\n", "msg>\n"}, {5, 5}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const int ASP__RecvFrom_msg_oer_ext_arr_[0] = {}; const int ASP__RecvFrom_msg_oer_p_[0] = {}; const TTCN_OERdescriptor_t ASP__RecvFrom_msg_oer_ = { -1, TRUE, -1, FALSE, 0, 0, ASP__RecvFrom_msg_oer_ext_arr_, 0, ASP__RecvFrom_msg_oer_p_}; const TTCN_Typedescriptor_t ASP__RecvFrom_msg_descr_ = { "@IPL4asp_Types.ASP_RecvFrom.msg", &OCTETSTRING_ber_, &OCTETSTRING_raw_, &OCTETSTRING_text_, &ASP__RecvFrom_msg_xer_, &OCTETSTRING_json_, &ASP__RecvFrom_msg_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; // No XER for ASP__RecvFrom const TTCN_Typedescriptor_t ASP__RecvFrom_descr_ = { "@IPL4asp_Types.ASP_RecvFrom", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const TTCN_Typedescriptor_t& ASP__Event_descr_ = Socket__API__Definitions::PortEvent_descr_; const XERdescriptor_t ASP__ConnId__ReadyToRelease_connId_xer_ = { {"connId>\n", "connId>\n"}, {8, 8}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_OERdescriptor_t ASP__ConnId__ReadyToRelease_connId_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL }; const TTCN_Typedescriptor_t ASP__ConnId__ReadyToRelease_connId_descr_ = { "@IPL4asp_Types.ASP_ConnId_ReadyToRelease.connId", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &ASP__ConnId__ReadyToRelease_connId_xer_, &INTEGER_json_, &ASP__ConnId__ReadyToRelease_connId_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; // No XER for ASP__ConnId__ReadyToRelease const TTCN_Typedescriptor_t ASP__ConnId__ReadyToRelease_descr_ = { "@IPL4asp_Types.ASP_ConnId_ReadyToRelease", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; Socket__API__Definitions::PortError const_IPL4__ERROR__GENERAL; const Socket__API__Definitions::PortError& IPL4__ERROR__GENERAL = const_IPL4__ERROR__GENERAL; Socket__API__Definitions::PortError const_IPL4__ERROR__INSUFFICIENT__MEMORY; const Socket__API__Definitions::PortError& IPL4__ERROR__INSUFFICIENT__MEMORY = const_IPL4__ERROR__INSUFFICIENT__MEMORY; Socket__API__Definitions::PortError const_IPL4__ERROR__INVALID__INPUT__PARAMETER; const Socket__API__Definitions::PortError& IPL4__ERROR__INVALID__INPUT__PARAMETER = const_IPL4__ERROR__INVALID__INPUT__PARAMETER; Socket__API__Definitions::PortError const_IPL4__ERROR__UNSUPPORTED__TRANSPORT; const Socket__API__Definitions::PortError& IPL4__ERROR__UNSUPPORTED__TRANSPORT = const_IPL4__ERROR__UNSUPPORTED__TRANSPORT; Socket__API__Definitions::PortError const_IPL4__ERROR__SOCKET; const Socket__API__Definitions::PortError& IPL4__ERROR__SOCKET = const_IPL4__ERROR__SOCKET; Socket__API__Definitions::PortError const_IPL4__ERROR__HOSTNAME; const Socket__API__Definitions::PortError& IPL4__ERROR__HOSTNAME = const_IPL4__ERROR__HOSTNAME; Socket__API__Definitions::PortError const_IPL4__ERROR__INVALID__CONNECTION; const Socket__API__Definitions::PortError& IPL4__ERROR__INVALID__CONNECTION = const_IPL4__ERROR__INVALID__CONNECTION; Socket__API__Definitions::PortError const_IPL4__ERROR__TEMPORARILY__UNAVAILABLE; const Socket__API__Definitions::PortError& IPL4__ERROR__TEMPORARILY__UNAVAILABLE = const_IPL4__ERROR__TEMPORARILY__UNAVAILABLE; Socket__API__Definitions::PortError const_IPL4__ERROR__AVAILABLE; const Socket__API__Definitions::PortError& IPL4__ERROR__AVAILABLE = const_IPL4__ERROR__AVAILABLE; Socket__API__Definitions::PortError const_IPL4__ERROR__LENGTH; const Socket__API__Definitions::PortError& IPL4__ERROR__LENGTH = const_IPL4__ERROR__LENGTH; const TTCN_Typedescriptor_t& f__IPL4__getMsgLen_descr_ = Socket__API__Definitions::f__getMsgLen_descr_; // No XER for IPL4__Param const TTCN_Typedescriptor_t IPL4__Param_descr_ = { "@IPL4asp_Types.IPL4_Param", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; // No XER for IPL4__ParamResult const TTCN_Typedescriptor_t IPL4__ParamResult_descr_ = { "@IPL4asp_Types.IPL4_ParamResult", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t IPL4__ParamResult_userData_xer_ = { {"userData>\n", "userData>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_Typedescriptor_t IPL4__ParamResult_userData_descr_ = { "@IPL4asp_Types.IPL4_ParamResult.userData", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &IPL4__ParamResult_userData_xer_, &INTEGER_json_, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t IPL4__ParamResult_parentIdx_xer_ = { {"parentIdx>\n", "parentIdx>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const TTCN_OERdescriptor_t IPL4__ParamResult_parentIdx_oer_ = { -1, FALSE, -1, FALSE, 0, 0, NULL, 0, NULL }; const TTCN_Typedescriptor_t IPL4__ParamResult_parentIdx_descr_ = { "@IPL4asp_Types.IPL4_ParamResult.parentIdx", &INTEGER_ber_, &INTEGER_raw_, &INTEGER_text_, &IPL4__ParamResult_parentIdx_xer_, &INTEGER_json_, &IPL4__ParamResult_parentIdx_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; // No XER for IPL4__IPAddressType const TTCN_Typedescriptor_t IPL4__IPAddressType_descr_ = { "@IPL4asp_Types.IPL4_IPAddressType", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t IPL4__SrtpKeysAndSalts_localKey_xer_ = { {"localKey>\n", "localKey>\n"}, {10, 10}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const int IPL4__SrtpKeysAndSalts_localKey_oer_ext_arr_[0] = {}; const int IPL4__SrtpKeysAndSalts_localKey_oer_p_[0] = {}; const TTCN_OERdescriptor_t IPL4__SrtpKeysAndSalts_localKey_oer_ = { -1, TRUE, -1, FALSE, 0, 0, IPL4__SrtpKeysAndSalts_localKey_oer_ext_arr_, 0, IPL4__SrtpKeysAndSalts_localKey_oer_p_}; const TTCN_Typedescriptor_t IPL4__SrtpKeysAndSalts_localKey_descr_ = { "@IPL4asp_Types.IPL4_SrtpKeysAndSalts.localKey", &OCTETSTRING_ber_, &OCTETSTRING_raw_, &OCTETSTRING_text_, &IPL4__SrtpKeysAndSalts_localKey_xer_, &OCTETSTRING_json_, &IPL4__SrtpKeysAndSalts_localKey_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t IPL4__SrtpKeysAndSalts_remoteKey_xer_ = { {"remoteKey>\n", "remoteKey>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const int IPL4__SrtpKeysAndSalts_remoteKey_oer_ext_arr_[0] = {}; const int IPL4__SrtpKeysAndSalts_remoteKey_oer_p_[0] = {}; const TTCN_OERdescriptor_t IPL4__SrtpKeysAndSalts_remoteKey_oer_ = { -1, TRUE, -1, FALSE, 0, 0, IPL4__SrtpKeysAndSalts_remoteKey_oer_ext_arr_, 0, IPL4__SrtpKeysAndSalts_remoteKey_oer_p_}; const TTCN_Typedescriptor_t IPL4__SrtpKeysAndSalts_remoteKey_descr_ = { "@IPL4asp_Types.IPL4_SrtpKeysAndSalts.remoteKey", &OCTETSTRING_ber_, &OCTETSTRING_raw_, &OCTETSTRING_text_, &IPL4__SrtpKeysAndSalts_remoteKey_xer_, &OCTETSTRING_json_, &IPL4__SrtpKeysAndSalts_remoteKey_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t IPL4__SrtpKeysAndSalts_localSalt_xer_ = { {"localSalt>\n", "localSalt>\n"}, {11, 11}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const int IPL4__SrtpKeysAndSalts_localSalt_oer_ext_arr_[0] = {}; const int IPL4__SrtpKeysAndSalts_localSalt_oer_p_[0] = {}; const TTCN_OERdescriptor_t IPL4__SrtpKeysAndSalts_localSalt_oer_ = { -1, TRUE, -1, FALSE, 0, 0, IPL4__SrtpKeysAndSalts_localSalt_oer_ext_arr_, 0, IPL4__SrtpKeysAndSalts_localSalt_oer_p_}; const TTCN_Typedescriptor_t IPL4__SrtpKeysAndSalts_localSalt_descr_ = { "@IPL4asp_Types.IPL4_SrtpKeysAndSalts.localSalt", &OCTETSTRING_ber_, &OCTETSTRING_raw_, &OCTETSTRING_text_, &IPL4__SrtpKeysAndSalts_localSalt_xer_, &OCTETSTRING_json_, &IPL4__SrtpKeysAndSalts_localSalt_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; const XERdescriptor_t IPL4__SrtpKeysAndSalts_remoteSalt_xer_ = { {"remoteSalt>\n", "remoteSalt>\n"}, {12, 12}, 0 |FORM_UNQUALIFIED, WHITESPACE_PRESERVE, NULL, &module_object, -1, 0, NULL, NULL, -1, XSD_NONE }; const int IPL4__SrtpKeysAndSalts_remoteSalt_oer_ext_arr_[0] = {}; const int IPL4__SrtpKeysAndSalts_remoteSalt_oer_p_[0] = {}; const TTCN_OERdescriptor_t IPL4__SrtpKeysAndSalts_remoteSalt_oer_ = { -1, TRUE, -1, FALSE, 0, 0, IPL4__SrtpKeysAndSalts_remoteSalt_oer_ext_arr_, 0, IPL4__SrtpKeysAndSalts_remoteSalt_oer_p_}; const TTCN_Typedescriptor_t IPL4__SrtpKeysAndSalts_remoteSalt_descr_ = { "@IPL4asp_Types.IPL4_SrtpKeysAndSalts.remoteSalt", &OCTETSTRING_ber_, &OCTETSTRING_raw_, &OCTETSTRING_text_, &IPL4__SrtpKeysAndSalts_remoteSalt_xer_, &OCTETSTRING_json_, &IPL4__SrtpKeysAndSalts_remoteSalt_oer_, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; // No XER for IPL4__SrtpKeysAndSalts const TTCN_Typedescriptor_t IPL4__SrtpKeysAndSalts_descr_ = { "@IPL4asp_Types.IPL4_SrtpKeysAndSalts", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; // No XER for IPL4__DigestMethods const TTCN_Typedescriptor_t IPL4__DigestMethods_descr_ = { "@IPL4asp_Types.IPL4_DigestMethods", NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, TTCN_Typedescriptor_t::DONTCARE }; CHARSTRING const_c__IPL4__DTLS__SRTP__AES128__CM__SHA1__32__Profile; const CHARSTRING& c__IPL4__DTLS__SRTP__AES128__CM__SHA1__32__Profile = const_c__IPL4__DTLS__SRTP__AES128__CM__SHA1__32__Profile; CHARSTRING const_c__IPL4__DTLS__SRTP__AES128__CM__SHA1__80__Profile; const CHARSTRING& c__IPL4__DTLS__SRTP__AES128__CM__SHA1__80__Profile = const_c__IPL4__DTLS__SRTP__AES128__CM__SHA1__80__Profile; CHARSTRING const_c__IPL4__DTLS__SRTP__AES128__F8__SHA1__80__Profile; const CHARSTRING& c__IPL4__DTLS__SRTP__AES128__F8__SHA1__80__Profile = const_c__IPL4__DTLS__SRTP__AES128__F8__SHA1__80__Profile; CHARSTRING const_c__IPL4__DTLS__SRTP__AES128__F8__SHA1__32__Profile; const CHARSTRING& c__IPL4__DTLS__SRTP__AES128__F8__SHA1__32__Profile = const_c__IPL4__DTLS__SRTP__AES128__F8__SHA1__32__Profile; CHARSTRING const_c__IPL4__DTLS__SRTP__NULL__SHA1__80__Profile; const CHARSTRING& c__IPL4__DTLS__SRTP__NULL__SHA1__80__Profile = const_c__IPL4__DTLS__SRTP__NULL__SHA1__80__Profile; CHARSTRING const_c__IPL4__DTLS__SRTP__NULL__SHA1__32__Profile; const CHARSTRING& c__IPL4__DTLS__SRTP__NULL__SHA1__32__Profile = const_c__IPL4__DTLS__SRTP__NULL__SHA1__32__Profile; CHARSTRING const_c__IPL4__DTLS__SRTP__ALL__KNOWN__Profile; const CHARSTRING& c__IPL4__DTLS__SRTP__ALL__KNOWN__Profile = const_c__IPL4__DTLS__SRTP__ALL__KNOWN__Profile; TTCN_Module module_object("IPL4asp_Types", __DATE__, __TIME__, module_checksum, pre_init_module, NULL, 0U, 4294967295U, 4294967295U, 4294967295U, NULL, 0LU, 0, post_init_module, NULL, NULL, NULL, NULL, NULL, NULL, NULL); const RuntimeVersionChecker ver_checker( current_runtime_version.requires_major_version_9, current_runtime_version.requires_minor_version_0, current_runtime_version.requires_patch_level_0, current_runtime_version.requires_runtime_1); /* Member functions of C++ classes */ TcpKeepAlive::TcpKeepAlive() { } TcpKeepAlive::TcpKeepAlive(const OPTIONAL< BOOLEAN >& par_enable, const OPTIONAL< INTEGER >& par_count, const OPTIONAL< INTEGER >& par_idle, const OPTIONAL< INTEGER >& par_interval) : field_enable(par_enable), field_count(par_count), field_idle(par_idle), field_interval(par_interval) { } TcpKeepAlive::TcpKeepAlive(const TcpKeepAlive& other_value) { if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @IPL4asp_Types.TcpKeepAlive."); if (other_value.enable().is_bound()) field_enable = other_value.enable(); else field_enable.clean_up(); if (other_value.count().is_bound()) field_count = other_value.count(); else field_count.clean_up(); if (other_value.idle().is_bound()) field_idle = other_value.idle(); else field_idle.clean_up(); if (other_value.interval().is_bound()) field_interval = other_value.interval(); else field_interval.clean_up(); } void TcpKeepAlive::clean_up() { field_enable.clean_up(); field_count.clean_up(); field_idle.clean_up(); field_interval.clean_up(); } const TTCN_Typedescriptor_t* TcpKeepAlive::get_descriptor() const { return &TcpKeepAlive_descr_; } TcpKeepAlive& TcpKeepAlive::operator=(const TcpKeepAlive& other_value) { if (this != &other_value) { if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @IPL4asp_Types.TcpKeepAlive."); if (other_value.enable().is_bound()) field_enable = other_value.enable(); else field_enable.clean_up(); if (other_value.count().is_bound()) field_count = other_value.count(); else field_count.clean_up(); if (other_value.idle().is_bound()) field_idle = other_value.idle(); else field_idle.clean_up(); if (other_value.interval().is_bound()) field_interval = other_value.interval(); else field_interval.clean_up(); } return *this; } boolean TcpKeepAlive::operator==(const TcpKeepAlive& other_value) const { return field_enable==other_value.field_enable && field_count==other_value.field_count && field_idle==other_value.field_idle && field_interval==other_value.field_interval; } boolean TcpKeepAlive::is_bound() const { return (OPTIONAL_OMIT == field_enable.get_selection() || field_enable.is_bound()) || (OPTIONAL_OMIT == field_count.get_selection() || field_count.is_bound()) || (OPTIONAL_OMIT == field_idle.get_selection() || field_idle.is_bound()) || (OPTIONAL_OMIT == field_interval.get_selection() || field_interval.is_bound()); } boolean TcpKeepAlive::is_value() const { return (OPTIONAL_OMIT == field_enable.get_selection() || field_enable.is_value()) && (OPTIONAL_OMIT == field_count.get_selection() || field_count.is_value()) && (OPTIONAL_OMIT == field_idle.get_selection() || field_idle.is_value()) && (OPTIONAL_OMIT == field_interval.get_selection() || field_interval.is_value()); } int TcpKeepAlive::size_of() const { int ret_val = 0; if (field_enable.ispresent()) ret_val++; if (field_count.ispresent()) ret_val++; if (field_idle.ispresent()) ret_val++; if (field_interval.ispresent()) ret_val++; return ret_val; } void TcpKeepAlive::log() const { if (!is_bound()) { TTCN_Logger::log_event_unbound(); return; } TTCN_Logger::log_event_str("{ enable := "); field_enable.log(); TTCN_Logger::log_event_str(", count := "); field_count.log(); TTCN_Logger::log_event_str(", idle := "); field_idle.log(); TTCN_Logger::log_event_str(", interval := "); field_interval.log(); TTCN_Logger::log_event_str(" }"); } void TcpKeepAlive::set_implicit_omit() { if (!enable().is_bound()) enable() = OMIT_VALUE; else enable().set_implicit_omit(); if (!count().is_bound()) count() = OMIT_VALUE; else count().set_implicit_omit(); if (!idle().is_bound()) idle() = OMIT_VALUE; else idle().set_implicit_omit(); if (!interval().is_bound()) interval() = OMIT_VALUE; else interval().set_implicit_omit(); } void TcpKeepAlive::set_param(Module_Param& param) { param.basic_check(Module_Param::BC_VALUE, "record value"); switch (param.get_type()) { case Module_Param::MP_Value_List: if (40 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) enable().set_param(*param.get_elem(0)); if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) count().set_param(*param.get_elem(1)); if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) idle().set_param(*param.get_elem(2)); if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) interval().set_param(*param.get_elem(3)); break; case Module_Param::MP_Assignment_List: { Vector value_used(param.get_size()); value_used.resize(param.get_size(), FALSE); for (size_t val_idx=0; val_idxget_id()->get_name(), "enable")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { enable().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "count")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { count().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "idle")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { idle().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "interval")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { interval().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxerror("Non existent field name in type @IPL4asp_Types.TcpKeepAlive: %s", curr_param->get_id()->get_name()); break; } } break; default: param.type_error("record value", "@IPL4asp_Types.TcpKeepAlive"); } } void TcpKeepAlive::encode_text(Text_Buf& text_buf) const { field_enable.encode_text(text_buf); field_count.encode_text(text_buf); field_idle.encode_text(text_buf); field_interval.encode_text(text_buf); } void TcpKeepAlive::decode_text(Text_Buf& text_buf) { field_enable.decode_text(text_buf); field_count.decode_text(text_buf); field_idle.decode_text(text_buf); field_interval.decode_text(text_buf); } struct TcpKeepAlive_template::single_value_struct { BOOLEAN_template field_enable; INTEGER_template field_count; INTEGER_template field_idle; INTEGER_template field_interval; }; void TcpKeepAlive_template::set_specific() { if (template_selection != SPECIFIC_VALUE) { template_sel old_selection = template_selection; clean_up(); single_value = new single_value_struct; set_selection(SPECIFIC_VALUE); if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) { single_value->field_enable = ANY_OR_OMIT; single_value->field_count = ANY_OR_OMIT; single_value->field_idle = ANY_OR_OMIT; single_value->field_interval = ANY_OR_OMIT; } } } void TcpKeepAlive_template::copy_value(const TcpKeepAlive& other_value) { single_value = new single_value_struct; if (other_value.enable().is_bound()) { if (other_value.enable().ispresent()) single_value->field_enable = other_value.enable()(); else single_value->field_enable = OMIT_VALUE; } else { single_value->field_enable.clean_up(); } if (other_value.count().is_bound()) { if (other_value.count().ispresent()) single_value->field_count = other_value.count()(); else single_value->field_count = OMIT_VALUE; } else { single_value->field_count.clean_up(); } if (other_value.idle().is_bound()) { if (other_value.idle().ispresent()) single_value->field_idle = other_value.idle()(); else single_value->field_idle = OMIT_VALUE; } else { single_value->field_idle.clean_up(); } if (other_value.interval().is_bound()) { if (other_value.interval().ispresent()) single_value->field_interval = other_value.interval()(); else single_value->field_interval = OMIT_VALUE; } else { single_value->field_interval.clean_up(); } set_selection(SPECIFIC_VALUE); } void TcpKeepAlive_template::copy_template(const TcpKeepAlive_template& other_value) { switch (other_value.template_selection) { case SPECIFIC_VALUE: single_value = new single_value_struct; if (UNINITIALIZED_TEMPLATE != other_value.enable().get_selection()) { single_value->field_enable = other_value.enable(); } else { single_value->field_enable.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.count().get_selection()) { single_value->field_count = other_value.count(); } else { single_value->field_count.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.idle().get_selection()) { single_value->field_idle = other_value.idle(); } else { single_value->field_idle.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.interval().get_selection()) { single_value->field_interval = other_value.interval(); } else { single_value->field_interval.clean_up(); } case OMIT_VALUE: case ANY_VALUE: case ANY_OR_OMIT: break; case VALUE_LIST: case COMPLEMENTED_LIST: case CONJUNCTION_MATCH: value_list.n_values = other_value.value_list.n_values; value_list.list_value = new TcpKeepAlive_template[value_list.n_values]; for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) value_list.list_value[list_count].copy_template(other_value.value_list.list_value[list_count]); break; case IMPLICATION_MATCH: implication_.precondition = new TcpKeepAlive_template(*other_value.implication_.precondition); implication_.implied_template = new TcpKeepAlive_template(*other_value.implication_.implied_template); break; case DYNAMIC_MATCH: dyn_match = other_value.dyn_match; dyn_match->ref_count++; break; default: TTCN_error("Copying an uninitialized/unsupported template of type @IPL4asp_Types.TcpKeepAlive."); break; } set_selection(other_value); } TcpKeepAlive_template::TcpKeepAlive_template() { } TcpKeepAlive_template::TcpKeepAlive_template(template_sel other_value) : Base_Template(other_value) { check_single_selection(other_value); } TcpKeepAlive_template::TcpKeepAlive_template(const TcpKeepAlive& other_value) { copy_value(other_value); } TcpKeepAlive_template::TcpKeepAlive_template(const OPTIONAL& other_value) { switch (other_value.get_selection()) { case OPTIONAL_PRESENT: copy_value((const TcpKeepAlive&)other_value); break; case OPTIONAL_OMIT: set_selection(OMIT_VALUE); break; default: TTCN_error("Creating a template of type @IPL4asp_Types.TcpKeepAlive from an unbound optional field."); } } TcpKeepAlive_template::TcpKeepAlive_template(TcpKeepAlive_template* p_precondition, TcpKeepAlive_template* p_implied_template) : Base_Template(IMPLICATION_MATCH) { implication_.precondition = p_precondition; implication_.implied_template = p_implied_template; } TcpKeepAlive_template::TcpKeepAlive_template(Dynamic_Match_Interface* p_dyn_match) : Base_Template(DYNAMIC_MATCH) { dyn_match = new dynmatch_struct; dyn_match->ptr = p_dyn_match; dyn_match->ref_count = 1; } TcpKeepAlive_template::TcpKeepAlive_template(const TcpKeepAlive_template& other_value) : Base_Template() { copy_template(other_value); } TcpKeepAlive_template::~TcpKeepAlive_template() { clean_up(); } TcpKeepAlive_template& TcpKeepAlive_template::operator=(template_sel other_value) { check_single_selection(other_value); clean_up(); set_selection(other_value); return *this; } TcpKeepAlive_template& TcpKeepAlive_template::operator=(const TcpKeepAlive& other_value) { clean_up(); copy_value(other_value); return *this; } TcpKeepAlive_template& TcpKeepAlive_template::operator=(const OPTIONAL& other_value) { clean_up(); switch (other_value.get_selection()) { case OPTIONAL_PRESENT: copy_value((const TcpKeepAlive&)other_value); break; case OPTIONAL_OMIT: set_selection(OMIT_VALUE); break; default: TTCN_error("Assignment of an unbound optional field to a template of type @IPL4asp_Types.TcpKeepAlive."); } return *this; } TcpKeepAlive_template& TcpKeepAlive_template::operator=(const TcpKeepAlive_template& other_value) { if (&other_value != this) { clean_up(); copy_template(other_value); } return *this; } boolean TcpKeepAlive_template::match(const TcpKeepAlive& other_value, boolean legacy) const { if (!other_value.is_bound()) return FALSE; switch (template_selection) { case ANY_VALUE: case ANY_OR_OMIT: return TRUE; case OMIT_VALUE: return FALSE; case SPECIFIC_VALUE: if(!other_value.enable().is_bound()) return FALSE; if((other_value.enable().ispresent() ? !single_value->field_enable.match((const BOOLEAN&)other_value.enable(), legacy) : !single_value->field_enable.match_omit(legacy)))return FALSE; if(!other_value.count().is_bound()) return FALSE; if((other_value.count().ispresent() ? !single_value->field_count.match((const INTEGER&)other_value.count(), legacy) : !single_value->field_count.match_omit(legacy)))return FALSE; if(!other_value.idle().is_bound()) return FALSE; if((other_value.idle().ispresent() ? !single_value->field_idle.match((const INTEGER&)other_value.idle(), legacy) : !single_value->field_idle.match_omit(legacy)))return FALSE; if(!other_value.interval().is_bound()) return FALSE; if((other_value.interval().ispresent() ? !single_value->field_interval.match((const INTEGER&)other_value.interval(), legacy) : !single_value->field_interval.match_omit(legacy)))return FALSE; return TRUE; case VALUE_LIST: case COMPLEMENTED_LIST: for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST; return template_selection == COMPLEMENTED_LIST; case CONJUNCTION_MATCH: for (unsigned int i = 0; i < value_list.n_values; i++) { if (!value_list.list_value[i].match(other_value)) { return FALSE; } } return TRUE; case IMPLICATION_MATCH: return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value); case DYNAMIC_MATCH: return dyn_match->ptr->match(other_value); default: TTCN_error("Matching an uninitialized/unsupported template of type @IPL4asp_Types.TcpKeepAlive."); } return FALSE; } boolean TcpKeepAlive_template::is_bound() const { if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE; if (template_selection != SPECIFIC_VALUE) return TRUE; return (single_value->field_enable.is_omit() || single_value->field_enable.is_bound()) || (single_value->field_count.is_omit() || single_value->field_count.is_bound()) || (single_value->field_idle.is_omit() || single_value->field_idle.is_bound()) || (single_value->field_interval.is_omit() || single_value->field_interval.is_bound()); } boolean TcpKeepAlive_template::is_value() const { if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE; return (single_value->field_enable.is_omit() || single_value->field_enable.is_value()) && (single_value->field_count.is_omit() || single_value->field_count.is_value()) && (single_value->field_idle.is_omit() || single_value->field_idle.is_value()) && (single_value->field_interval.is_omit() || single_value->field_interval.is_value()); } void TcpKeepAlive_template::clean_up() { switch (template_selection) { case SPECIFIC_VALUE: delete single_value; break; case VALUE_LIST: case COMPLEMENTED_LIST: case CONJUNCTION_MATCH: delete [] value_list.list_value; break; case IMPLICATION_MATCH: delete implication_.precondition; delete implication_.implied_template; break; case DYNAMIC_MATCH: dyn_match->ref_count--; if (dyn_match->ref_count == 0) { delete dyn_match->ptr; delete dyn_match; } break; default: break; } template_selection = UNINITIALIZED_TEMPLATE; } TcpKeepAlive TcpKeepAlive_template::valueof() const { if (template_selection != SPECIFIC_VALUE || is_ifpresent) TTCN_error("Performing a valueof or send operation on a non-specific template of type @IPL4asp_Types.TcpKeepAlive."); TcpKeepAlive ret_val; if (single_value->field_enable.is_omit()) ret_val.enable() = OMIT_VALUE; else if (single_value->field_enable.is_bound()) { ret_val.enable() = single_value->field_enable.valueof(); } if (single_value->field_count.is_omit()) ret_val.count() = OMIT_VALUE; else if (single_value->field_count.is_bound()) { ret_val.count() = single_value->field_count.valueof(); } if (single_value->field_idle.is_omit()) ret_val.idle() = OMIT_VALUE; else if (single_value->field_idle.is_bound()) { ret_val.idle() = single_value->field_idle.valueof(); } if (single_value->field_interval.is_omit()) ret_val.interval() = OMIT_VALUE; else if (single_value->field_interval.is_bound()) { ret_val.interval() = single_value->field_interval.valueof(); } return ret_val; } void TcpKeepAlive_template::set_type(template_sel template_type, unsigned int list_length) { if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST&& template_type != CONJUNCTION_MATCH) TTCN_error("Setting an invalid list for a template of type @IPL4asp_Types.TcpKeepAlive."); clean_up(); set_selection(template_type); value_list.n_values = list_length; value_list.list_value = new TcpKeepAlive_template[list_length]; } TcpKeepAlive_template& TcpKeepAlive_template::list_item(unsigned int list_index) const { if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST&& template_selection != CONJUNCTION_MATCH) TTCN_error("Accessing a list element of a non-list template of type @IPL4asp_Types.TcpKeepAlive."); if (list_index >= value_list.n_values) TTCN_error("Index overflow in a value list template of type @IPL4asp_Types.TcpKeepAlive."); return value_list.list_value[list_index]; } BOOLEAN_template& TcpKeepAlive_template::enable() { set_specific(); return single_value->field_enable; } const BOOLEAN_template& TcpKeepAlive_template::enable() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field enable of a non-specific template of type @IPL4asp_Types.TcpKeepAlive."); return single_value->field_enable; } INTEGER_template& TcpKeepAlive_template::count() { set_specific(); return single_value->field_count; } const INTEGER_template& TcpKeepAlive_template::count() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field count of a non-specific template of type @IPL4asp_Types.TcpKeepAlive."); return single_value->field_count; } INTEGER_template& TcpKeepAlive_template::idle() { set_specific(); return single_value->field_idle; } const INTEGER_template& TcpKeepAlive_template::idle() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field idle of a non-specific template of type @IPL4asp_Types.TcpKeepAlive."); return single_value->field_idle; } INTEGER_template& TcpKeepAlive_template::interval() { set_specific(); return single_value->field_interval; } const INTEGER_template& TcpKeepAlive_template::interval() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field interval of a non-specific template of type @IPL4asp_Types.TcpKeepAlive."); return single_value->field_interval; } int TcpKeepAlive_template::size_of() const { if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @IPL4asp_Types.TcpKeepAlive which has an ifpresent attribute."); switch (template_selection) { case SPECIFIC_VALUE: { int ret_val = 0; if (single_value->field_enable.is_present()) ret_val++; if (single_value->field_count.is_present()) ret_val++; if (single_value->field_idle.is_present()) ret_val++; if (single_value->field_interval.is_present()) ret_val++; return ret_val; } case VALUE_LIST: { if (value_list.n_values<1) TTCN_error("Internal error: Performing sizeof() operation on a template of type @IPL4asp_Types.TcpKeepAlive containing an empty list."); int item_size = value_list.list_value[0].size_of(); for (unsigned int l_idx = 1; l_idx < value_list.n_values; l_idx++) { if (value_list.list_value[l_idx].size_of()!=item_size) TTCN_error("Performing sizeof() operation on a template of type @IPL4asp_Types.TcpKeepAlive containing a value list with different sizes."); } return item_size; } case OMIT_VALUE: TTCN_error("Performing sizeof() operation on a template of type @IPL4asp_Types.TcpKeepAlive containing omit value."); case ANY_VALUE: case ANY_OR_OMIT: TTCN_error("Performing sizeof() operation on a template of type @IPL4asp_Types.TcpKeepAlive containing */? value."); case COMPLEMENTED_LIST: TTCN_error("Performing sizeof() operation on a template of type @IPL4asp_Types.TcpKeepAlive containing complemented list."); case CONJUNCTION_MATCH: TTCN_error("Performing sizeof() operation on a template of type @IPL4asp_Types.TcpKeepAlive containing a conjunction list match."); case IMPLICATION_MATCH: TTCN_error("Performing sizeof() operation on a template of type @IPL4asp_Types.TcpKeepAlive containing an implication match."); case DYNAMIC_MATCH: TTCN_error("Performing sizeof() operation on a template of type @IPL4asp_Types.TcpKeepAlive containing a dynamic match."); default: TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @IPL4asp_Types.TcpKeepAlive."); } return 0; } void TcpKeepAlive_template::log() const { switch (template_selection) { case SPECIFIC_VALUE: TTCN_Logger::log_event_str("{ enable := "); single_value->field_enable.log(); TTCN_Logger::log_event_str(", count := "); single_value->field_count.log(); TTCN_Logger::log_event_str(", idle := "); single_value->field_idle.log(); TTCN_Logger::log_event_str(", interval := "); single_value->field_interval.log(); TTCN_Logger::log_event_str(" }"); break; case COMPLEMENTED_LIST: TTCN_Logger::log_event_str("complement"); case CONJUNCTION_MATCH: if (template_selection == CONJUNCTION_MATCH) { TTCN_Logger::log_event_str("conjunct"); } case VALUE_LIST: TTCN_Logger::log_char('('); for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) { if (list_count > 0) TTCN_Logger::log_event_str(", "); value_list.list_value[list_count].log(); } TTCN_Logger::log_char(')'); break; case IMPLICATION_MATCH: implication_.precondition->log(); TTCN_Logger::log_event_str(" implies "); implication_.implied_template->log(); break; case DYNAMIC_MATCH: TTCN_Logger::log_event_str("@dynamic template"); break; default: log_generic(); } log_ifpresent(); } void TcpKeepAlive_template::log_match(const TcpKeepAlive& match_value, boolean legacy) const { if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){ if(match(match_value, legacy)){ TTCN_Logger::print_logmatch_buffer(); TTCN_Logger::log_event_str(" matched"); } else{ if (template_selection == SPECIFIC_VALUE) { size_t previous_size = TTCN_Logger::get_logmatch_buffer_len(); if (match_value.enable().ispresent()){ if(!single_value->field_enable.match(match_value.enable(), legacy)){ TTCN_Logger::log_logmatch_info(".enable"); single_value->field_enable.log_match(match_value.enable(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } else { if (!single_value->field_enable.match_omit(legacy)){ TTCN_Logger::log_logmatch_info(".enable := omit with "); TTCN_Logger::print_logmatch_buffer(); single_value->field_enable.log(); TTCN_Logger::log_event_str(" unmatched"); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } if (match_value.count().ispresent()){ if(!single_value->field_count.match(match_value.count(), legacy)){ TTCN_Logger::log_logmatch_info(".count"); single_value->field_count.log_match(match_value.count(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } else { if (!single_value->field_count.match_omit(legacy)){ TTCN_Logger::log_logmatch_info(".count := omit with "); TTCN_Logger::print_logmatch_buffer(); single_value->field_count.log(); TTCN_Logger::log_event_str(" unmatched"); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } if (match_value.idle().ispresent()){ if(!single_value->field_idle.match(match_value.idle(), legacy)){ TTCN_Logger::log_logmatch_info(".idle"); single_value->field_idle.log_match(match_value.idle(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } else { if (!single_value->field_idle.match_omit(legacy)){ TTCN_Logger::log_logmatch_info(".idle := omit with "); TTCN_Logger::print_logmatch_buffer(); single_value->field_idle.log(); TTCN_Logger::log_event_str(" unmatched"); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } if (match_value.interval().ispresent()){ if(!single_value->field_interval.match(match_value.interval(), legacy)){ TTCN_Logger::log_logmatch_info(".interval"); single_value->field_interval.log_match(match_value.interval(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } else { if (!single_value->field_interval.match_omit(legacy)){ TTCN_Logger::log_logmatch_info(".interval := omit with "); TTCN_Logger::print_logmatch_buffer(); single_value->field_interval.log(); TTCN_Logger::log_event_str(" unmatched"); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } }else { TTCN_Logger::print_logmatch_buffer(); match_value.log(); TTCN_Logger::log_event_str(" with "); log(); TTCN_Logger::log_event_str(" unmatched"); } } return; } if (template_selection == SPECIFIC_VALUE) { TTCN_Logger::log_event_str("{ enable := "); if (match_value.enable().ispresent()) { single_value->field_enable.log_match(match_value.enable(), legacy); } else { TTCN_Logger::log_event_str("omit with "); single_value->field_enable.log(); if (single_value->field_enable.match_omit(legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } TTCN_Logger::log_event_str(", count := "); if (match_value.count().ispresent()) { single_value->field_count.log_match(match_value.count(), legacy); } else { TTCN_Logger::log_event_str("omit with "); single_value->field_count.log(); if (single_value->field_count.match_omit(legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } TTCN_Logger::log_event_str(", idle := "); if (match_value.idle().ispresent()) { single_value->field_idle.log_match(match_value.idle(), legacy); } else { TTCN_Logger::log_event_str("omit with "); single_value->field_idle.log(); if (single_value->field_idle.match_omit(legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } TTCN_Logger::log_event_str(", interval := "); if (match_value.interval().ispresent()) { single_value->field_interval.log_match(match_value.interval(), legacy); } else { TTCN_Logger::log_event_str("omit with "); single_value->field_interval.log(); if (single_value->field_interval.match_omit(legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } TTCN_Logger::log_event_str(" }"); } else { match_value.log(); TTCN_Logger::log_event_str(" with "); log(); if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } } void TcpKeepAlive_template::encode_text(Text_Buf& text_buf) const { encode_text_base(text_buf); switch (template_selection) { case SPECIFIC_VALUE: single_value->field_enable.encode_text(text_buf); single_value->field_count.encode_text(text_buf); single_value->field_idle.encode_text(text_buf); single_value->field_interval.encode_text(text_buf); case OMIT_VALUE: case ANY_VALUE: case ANY_OR_OMIT: break; case VALUE_LIST: case COMPLEMENTED_LIST: text_buf.push_int(value_list.n_values); for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) value_list.list_value[list_count].encode_text(text_buf); break; default: TTCN_error("Text encoder: Encoding an uninitialized/unsupported template of type @IPL4asp_Types.TcpKeepAlive."); } } void TcpKeepAlive_template::decode_text(Text_Buf& text_buf) { clean_up(); decode_text_base(text_buf); switch (template_selection) { case SPECIFIC_VALUE: single_value = new single_value_struct; single_value->field_enable.decode_text(text_buf); single_value->field_count.decode_text(text_buf); single_value->field_idle.decode_text(text_buf); single_value->field_interval.decode_text(text_buf); case OMIT_VALUE: case ANY_VALUE: case ANY_OR_OMIT: break; case VALUE_LIST: case COMPLEMENTED_LIST: value_list.n_values = text_buf.pull_int().get_val(); value_list.list_value = new TcpKeepAlive_template[value_list.n_values]; for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) value_list.list_value[list_count].decode_text(text_buf); break; default: TTCN_error("Text decoder: An unknown/unsupported selection was received in a template of type @IPL4asp_Types.TcpKeepAlive."); } } void TcpKeepAlive_template::set_param(Module_Param& param) { param.basic_check(Module_Param::BC_TEMPLATE, "record template"); switch (param.get_type()) { case Module_Param::MP_Omit: *this = OMIT_VALUE; break; case Module_Param::MP_Any: *this = ANY_VALUE; break; case Module_Param::MP_AnyOrNone: *this = ANY_OR_OMIT; break; case Module_Param::MP_List_Template: case Module_Param::MP_ComplementList_Template: case Module_Param::MP_ConjunctList_Template: { TcpKeepAlive_template new_temp; new_temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (param.get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), param.get_size()); for (size_t p_i=0; p_i0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) enable().set_param(*param.get_elem(0)); if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) count().set_param(*param.get_elem(1)); if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) idle().set_param(*param.get_elem(2)); if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) interval().set_param(*param.get_elem(3)); break; case Module_Param::MP_Assignment_List: { Vector value_used(param.get_size()); value_used.resize(param.get_size(), FALSE); for (size_t val_idx=0; val_idxget_id()->get_name(), "enable")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { enable().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "count")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { count().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "idle")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { idle().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "interval")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { interval().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxerror("Non existent field name in type @IPL4asp_Types.TcpKeepAlive: %s", curr_param->get_id()->get_name()); break; } } break; case Module_Param::MP_Implication_Template: { TcpKeepAlive_template* precondition = new TcpKeepAlive_template; precondition->set_param(*param.get_elem(0)); TcpKeepAlive_template* implied_template = new TcpKeepAlive_template; implied_template->set_param(*param.get_elem(1)); *this = TcpKeepAlive_template(precondition, implied_template); } break; default: param.type_error("record template", "@IPL4asp_Types.TcpKeepAlive"); } is_ifpresent = param.get_ifpresent(); } void TcpKeepAlive_template::check_restriction(template_res t_res, const char* t_name, boolean legacy) const { if (template_selection==UNINITIALIZED_TEMPLATE) return; switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) { case TR_OMIT: if (template_selection==OMIT_VALUE) return; case TR_VALUE: if (template_selection!=SPECIFIC_VALUE || is_ifpresent) break; single_value->field_enable.check_restriction(t_res, t_name ? t_name : "@IPL4asp_Types.TcpKeepAlive"); single_value->field_count.check_restriction(t_res, t_name ? t_name : "@IPL4asp_Types.TcpKeepAlive"); single_value->field_idle.check_restriction(t_res, t_name ? t_name : "@IPL4asp_Types.TcpKeepAlive"); single_value->field_interval.check_restriction(t_res, t_name ? t_name : "@IPL4asp_Types.TcpKeepAlive"); return; case TR_PRESENT: if (!match_omit(legacy)) return; break; default: return; } TTCN_error("Restriction `%s' on template of type %s violated.", get_res_name(t_res), t_name ? t_name : "@IPL4asp_Types.TcpKeepAlive"); } boolean TcpKeepAlive_template::is_present(boolean legacy) const { if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE; return !match_omit(legacy); } boolean TcpKeepAlive_template::match_omit(boolean legacy) const { if (is_ifpresent) return TRUE; switch (template_selection) { case OMIT_VALUE: case ANY_OR_OMIT: return TRUE; case IMPLICATION_MATCH: return !implication_.precondition->match_omit() || implication_.implied_template->match_omit(); case VALUE_LIST: case COMPLEMENTED_LIST: if (legacy) { for (unsigned int l_idx=0; l_idx& par_enable) : field_enable(par_enable) { } ReuseAddress::ReuseAddress(const ReuseAddress& other_value) { if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @IPL4asp_Types.ReuseAddress."); if (other_value.enable().is_bound()) field_enable = other_value.enable(); else field_enable.clean_up(); } void ReuseAddress::clean_up() { field_enable.clean_up(); } const TTCN_Typedescriptor_t* ReuseAddress::get_descriptor() const { return &ReuseAddress_descr_; } ReuseAddress& ReuseAddress::operator=(const ReuseAddress& other_value) { if (this != &other_value) { if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @IPL4asp_Types.ReuseAddress."); if (other_value.enable().is_bound()) field_enable = other_value.enable(); else field_enable.clean_up(); } return *this; } boolean ReuseAddress::operator==(const ReuseAddress& other_value) const { return field_enable==other_value.field_enable; } boolean ReuseAddress::is_bound() const { return (OPTIONAL_OMIT == field_enable.get_selection() || field_enable.is_bound()); } boolean ReuseAddress::is_value() const { return (OPTIONAL_OMIT == field_enable.get_selection() || field_enable.is_value()); } int ReuseAddress::size_of() const { int ret_val = 0; if (field_enable.ispresent()) ret_val++; return ret_val; } void ReuseAddress::log() const { if (!is_bound()) { TTCN_Logger::log_event_unbound(); return; } TTCN_Logger::log_event_str("{ enable := "); field_enable.log(); TTCN_Logger::log_event_str(" }"); } void ReuseAddress::set_implicit_omit() { if (!enable().is_bound()) enable() = OMIT_VALUE; else enable().set_implicit_omit(); } void ReuseAddress::set_param(Module_Param& param) { param.basic_check(Module_Param::BC_VALUE, "record value"); switch (param.get_type()) { case Module_Param::MP_Value_List: if (10 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) enable().set_param(*param.get_elem(0)); break; case Module_Param::MP_Assignment_List: { Vector value_used(param.get_size()); value_used.resize(param.get_size(), FALSE); for (size_t val_idx=0; val_idxget_id()->get_name(), "enable")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { enable().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxerror("Non existent field name in type @IPL4asp_Types.ReuseAddress: %s", curr_param->get_id()->get_name()); break; } } break; default: param.type_error("record value", "@IPL4asp_Types.ReuseAddress"); } } void ReuseAddress::encode_text(Text_Buf& text_buf) const { field_enable.encode_text(text_buf); } void ReuseAddress::decode_text(Text_Buf& text_buf) { field_enable.decode_text(text_buf); } struct ReuseAddress_template::single_value_struct { BOOLEAN_template field_enable; }; void ReuseAddress_template::set_specific() { if (template_selection != SPECIFIC_VALUE) { template_sel old_selection = template_selection; clean_up(); single_value = new single_value_struct; set_selection(SPECIFIC_VALUE); if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) { single_value->field_enable = ANY_OR_OMIT; } } } void ReuseAddress_template::copy_value(const ReuseAddress& other_value) { single_value = new single_value_struct; if (other_value.enable().is_bound()) { if (other_value.enable().ispresent()) single_value->field_enable = other_value.enable()(); else single_value->field_enable = OMIT_VALUE; } else { single_value->field_enable.clean_up(); } set_selection(SPECIFIC_VALUE); } void ReuseAddress_template::copy_template(const ReuseAddress_template& other_value) { switch (other_value.template_selection) { case SPECIFIC_VALUE: single_value = new single_value_struct; if (UNINITIALIZED_TEMPLATE != other_value.enable().get_selection()) { single_value->field_enable = other_value.enable(); } else { single_value->field_enable.clean_up(); } case OMIT_VALUE: case ANY_VALUE: case ANY_OR_OMIT: break; case VALUE_LIST: case COMPLEMENTED_LIST: case CONJUNCTION_MATCH: value_list.n_values = other_value.value_list.n_values; value_list.list_value = new ReuseAddress_template[value_list.n_values]; for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) value_list.list_value[list_count].copy_template(other_value.value_list.list_value[list_count]); break; case IMPLICATION_MATCH: implication_.precondition = new ReuseAddress_template(*other_value.implication_.precondition); implication_.implied_template = new ReuseAddress_template(*other_value.implication_.implied_template); break; case DYNAMIC_MATCH: dyn_match = other_value.dyn_match; dyn_match->ref_count++; break; default: TTCN_error("Copying an uninitialized/unsupported template of type @IPL4asp_Types.ReuseAddress."); break; } set_selection(other_value); } ReuseAddress_template::ReuseAddress_template() { } ReuseAddress_template::ReuseAddress_template(template_sel other_value) : Base_Template(other_value) { check_single_selection(other_value); } ReuseAddress_template::ReuseAddress_template(const ReuseAddress& other_value) { copy_value(other_value); } ReuseAddress_template::ReuseAddress_template(const OPTIONAL& other_value) { switch (other_value.get_selection()) { case OPTIONAL_PRESENT: copy_value((const ReuseAddress&)other_value); break; case OPTIONAL_OMIT: set_selection(OMIT_VALUE); break; default: TTCN_error("Creating a template of type @IPL4asp_Types.ReuseAddress from an unbound optional field."); } } ReuseAddress_template::ReuseAddress_template(ReuseAddress_template* p_precondition, ReuseAddress_template* p_implied_template) : Base_Template(IMPLICATION_MATCH) { implication_.precondition = p_precondition; implication_.implied_template = p_implied_template; } ReuseAddress_template::ReuseAddress_template(Dynamic_Match_Interface* p_dyn_match) : Base_Template(DYNAMIC_MATCH) { dyn_match = new dynmatch_struct; dyn_match->ptr = p_dyn_match; dyn_match->ref_count = 1; } ReuseAddress_template::ReuseAddress_template(const ReuseAddress_template& other_value) : Base_Template() { copy_template(other_value); } ReuseAddress_template::~ReuseAddress_template() { clean_up(); } ReuseAddress_template& ReuseAddress_template::operator=(template_sel other_value) { check_single_selection(other_value); clean_up(); set_selection(other_value); return *this; } ReuseAddress_template& ReuseAddress_template::operator=(const ReuseAddress& other_value) { clean_up(); copy_value(other_value); return *this; } ReuseAddress_template& ReuseAddress_template::operator=(const OPTIONAL& other_value) { clean_up(); switch (other_value.get_selection()) { case OPTIONAL_PRESENT: copy_value((const ReuseAddress&)other_value); break; case OPTIONAL_OMIT: set_selection(OMIT_VALUE); break; default: TTCN_error("Assignment of an unbound optional field to a template of type @IPL4asp_Types.ReuseAddress."); } return *this; } ReuseAddress_template& ReuseAddress_template::operator=(const ReuseAddress_template& other_value) { if (&other_value != this) { clean_up(); copy_template(other_value); } return *this; } boolean ReuseAddress_template::match(const ReuseAddress& other_value, boolean legacy) const { if (!other_value.is_bound()) return FALSE; switch (template_selection) { case ANY_VALUE: case ANY_OR_OMIT: return TRUE; case OMIT_VALUE: return FALSE; case SPECIFIC_VALUE: if(!other_value.enable().is_bound()) return FALSE; if((other_value.enable().ispresent() ? !single_value->field_enable.match((const BOOLEAN&)other_value.enable(), legacy) : !single_value->field_enable.match_omit(legacy)))return FALSE; return TRUE; case VALUE_LIST: case COMPLEMENTED_LIST: for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST; return template_selection == COMPLEMENTED_LIST; case CONJUNCTION_MATCH: for (unsigned int i = 0; i < value_list.n_values; i++) { if (!value_list.list_value[i].match(other_value)) { return FALSE; } } return TRUE; case IMPLICATION_MATCH: return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value); case DYNAMIC_MATCH: return dyn_match->ptr->match(other_value); default: TTCN_error("Matching an uninitialized/unsupported template of type @IPL4asp_Types.ReuseAddress."); } return FALSE; } boolean ReuseAddress_template::is_bound() const { if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE; if (template_selection != SPECIFIC_VALUE) return TRUE; return (single_value->field_enable.is_omit() || single_value->field_enable.is_bound()); } boolean ReuseAddress_template::is_value() const { if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE; return (single_value->field_enable.is_omit() || single_value->field_enable.is_value()); } void ReuseAddress_template::clean_up() { switch (template_selection) { case SPECIFIC_VALUE: delete single_value; break; case VALUE_LIST: case COMPLEMENTED_LIST: case CONJUNCTION_MATCH: delete [] value_list.list_value; break; case IMPLICATION_MATCH: delete implication_.precondition; delete implication_.implied_template; break; case DYNAMIC_MATCH: dyn_match->ref_count--; if (dyn_match->ref_count == 0) { delete dyn_match->ptr; delete dyn_match; } break; default: break; } template_selection = UNINITIALIZED_TEMPLATE; } ReuseAddress ReuseAddress_template::valueof() const { if (template_selection != SPECIFIC_VALUE || is_ifpresent) TTCN_error("Performing a valueof or send operation on a non-specific template of type @IPL4asp_Types.ReuseAddress."); ReuseAddress ret_val; if (single_value->field_enable.is_omit()) ret_val.enable() = OMIT_VALUE; else if (single_value->field_enable.is_bound()) { ret_val.enable() = single_value->field_enable.valueof(); } return ret_val; } void ReuseAddress_template::set_type(template_sel template_type, unsigned int list_length) { if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST&& template_type != CONJUNCTION_MATCH) TTCN_error("Setting an invalid list for a template of type @IPL4asp_Types.ReuseAddress."); clean_up(); set_selection(template_type); value_list.n_values = list_length; value_list.list_value = new ReuseAddress_template[list_length]; } ReuseAddress_template& ReuseAddress_template::list_item(unsigned int list_index) const { if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST&& template_selection != CONJUNCTION_MATCH) TTCN_error("Accessing a list element of a non-list template of type @IPL4asp_Types.ReuseAddress."); if (list_index >= value_list.n_values) TTCN_error("Index overflow in a value list template of type @IPL4asp_Types.ReuseAddress."); return value_list.list_value[list_index]; } BOOLEAN_template& ReuseAddress_template::enable() { set_specific(); return single_value->field_enable; } const BOOLEAN_template& ReuseAddress_template::enable() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field enable of a non-specific template of type @IPL4asp_Types.ReuseAddress."); return single_value->field_enable; } int ReuseAddress_template::size_of() const { if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @IPL4asp_Types.ReuseAddress which has an ifpresent attribute."); switch (template_selection) { case SPECIFIC_VALUE: { int ret_val = 0; if (single_value->field_enable.is_present()) ret_val++; return ret_val; } case VALUE_LIST: { if (value_list.n_values<1) TTCN_error("Internal error: Performing sizeof() operation on a template of type @IPL4asp_Types.ReuseAddress containing an empty list."); int item_size = value_list.list_value[0].size_of(); for (unsigned int l_idx = 1; l_idx < value_list.n_values; l_idx++) { if (value_list.list_value[l_idx].size_of()!=item_size) TTCN_error("Performing sizeof() operation on a template of type @IPL4asp_Types.ReuseAddress containing a value list with different sizes."); } return item_size; } case OMIT_VALUE: TTCN_error("Performing sizeof() operation on a template of type @IPL4asp_Types.ReuseAddress containing omit value."); case ANY_VALUE: case ANY_OR_OMIT: TTCN_error("Performing sizeof() operation on a template of type @IPL4asp_Types.ReuseAddress containing */? value."); case COMPLEMENTED_LIST: TTCN_error("Performing sizeof() operation on a template of type @IPL4asp_Types.ReuseAddress containing complemented list."); case CONJUNCTION_MATCH: TTCN_error("Performing sizeof() operation on a template of type @IPL4asp_Types.ReuseAddress containing a conjunction list match."); case IMPLICATION_MATCH: TTCN_error("Performing sizeof() operation on a template of type @IPL4asp_Types.ReuseAddress containing an implication match."); case DYNAMIC_MATCH: TTCN_error("Performing sizeof() operation on a template of type @IPL4asp_Types.ReuseAddress containing a dynamic match."); default: TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @IPL4asp_Types.ReuseAddress."); } return 0; } void ReuseAddress_template::log() const { switch (template_selection) { case SPECIFIC_VALUE: TTCN_Logger::log_event_str("{ enable := "); single_value->field_enable.log(); TTCN_Logger::log_event_str(" }"); break; case COMPLEMENTED_LIST: TTCN_Logger::log_event_str("complement"); case CONJUNCTION_MATCH: if (template_selection == CONJUNCTION_MATCH) { TTCN_Logger::log_event_str("conjunct"); } case VALUE_LIST: TTCN_Logger::log_char('('); for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) { if (list_count > 0) TTCN_Logger::log_event_str(", "); value_list.list_value[list_count].log(); } TTCN_Logger::log_char(')'); break; case IMPLICATION_MATCH: implication_.precondition->log(); TTCN_Logger::log_event_str(" implies "); implication_.implied_template->log(); break; case DYNAMIC_MATCH: TTCN_Logger::log_event_str("@dynamic template"); break; default: log_generic(); } log_ifpresent(); } void ReuseAddress_template::log_match(const ReuseAddress& match_value, boolean legacy) const { if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){ if(match(match_value, legacy)){ TTCN_Logger::print_logmatch_buffer(); TTCN_Logger::log_event_str(" matched"); } else{ if (template_selection == SPECIFIC_VALUE) { size_t previous_size = TTCN_Logger::get_logmatch_buffer_len(); if (match_value.enable().ispresent()){ if(!single_value->field_enable.match(match_value.enable(), legacy)){ TTCN_Logger::log_logmatch_info(".enable"); single_value->field_enable.log_match(match_value.enable(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } else { if (!single_value->field_enable.match_omit(legacy)){ TTCN_Logger::log_logmatch_info(".enable := omit with "); TTCN_Logger::print_logmatch_buffer(); single_value->field_enable.log(); TTCN_Logger::log_event_str(" unmatched"); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } }else { TTCN_Logger::print_logmatch_buffer(); match_value.log(); TTCN_Logger::log_event_str(" with "); log(); TTCN_Logger::log_event_str(" unmatched"); } } return; } if (template_selection == SPECIFIC_VALUE) { TTCN_Logger::log_event_str("{ enable := "); if (match_value.enable().ispresent()) { single_value->field_enable.log_match(match_value.enable(), legacy); } else { TTCN_Logger::log_event_str("omit with "); single_value->field_enable.log(); if (single_value->field_enable.match_omit(legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } TTCN_Logger::log_event_str(" }"); } else { match_value.log(); TTCN_Logger::log_event_str(" with "); log(); if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } } void ReuseAddress_template::encode_text(Text_Buf& text_buf) const { encode_text_base(text_buf); switch (template_selection) { case SPECIFIC_VALUE: single_value->field_enable.encode_text(text_buf); case OMIT_VALUE: case ANY_VALUE: case ANY_OR_OMIT: break; case VALUE_LIST: case COMPLEMENTED_LIST: text_buf.push_int(value_list.n_values); for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) value_list.list_value[list_count].encode_text(text_buf); break; default: TTCN_error("Text encoder: Encoding an uninitialized/unsupported template of type @IPL4asp_Types.ReuseAddress."); } } void ReuseAddress_template::decode_text(Text_Buf& text_buf) { clean_up(); decode_text_base(text_buf); switch (template_selection) { case SPECIFIC_VALUE: single_value = new single_value_struct; single_value->field_enable.decode_text(text_buf); case OMIT_VALUE: case ANY_VALUE: case ANY_OR_OMIT: break; case VALUE_LIST: case COMPLEMENTED_LIST: value_list.n_values = text_buf.pull_int().get_val(); value_list.list_value = new ReuseAddress_template[value_list.n_values]; for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) value_list.list_value[list_count].decode_text(text_buf); break; default: TTCN_error("Text decoder: An unknown/unsupported selection was received in a template of type @IPL4asp_Types.ReuseAddress."); } } void ReuseAddress_template::set_param(Module_Param& param) { param.basic_check(Module_Param::BC_TEMPLATE, "record template"); switch (param.get_type()) { case Module_Param::MP_Omit: *this = OMIT_VALUE; break; case Module_Param::MP_Any: *this = ANY_VALUE; break; case Module_Param::MP_AnyOrNone: *this = ANY_OR_OMIT; break; case Module_Param::MP_List_Template: case Module_Param::MP_ComplementList_Template: case Module_Param::MP_ConjunctList_Template: { ReuseAddress_template new_temp; new_temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (param.get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), param.get_size()); for (size_t p_i=0; p_i0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) enable().set_param(*param.get_elem(0)); break; case Module_Param::MP_Assignment_List: { Vector value_used(param.get_size()); value_used.resize(param.get_size(), FALSE); for (size_t val_idx=0; val_idxget_id()->get_name(), "enable")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { enable().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxerror("Non existent field name in type @IPL4asp_Types.ReuseAddress: %s", curr_param->get_id()->get_name()); break; } } break; case Module_Param::MP_Implication_Template: { ReuseAddress_template* precondition = new ReuseAddress_template; precondition->set_param(*param.get_elem(0)); ReuseAddress_template* implied_template = new ReuseAddress_template; implied_template->set_param(*param.get_elem(1)); *this = ReuseAddress_template(precondition, implied_template); } break; default: param.type_error("record template", "@IPL4asp_Types.ReuseAddress"); } is_ifpresent = param.get_ifpresent(); } void ReuseAddress_template::check_restriction(template_res t_res, const char* t_name, boolean legacy) const { if (template_selection==UNINITIALIZED_TEMPLATE) return; switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) { case TR_OMIT: if (template_selection==OMIT_VALUE) return; case TR_VALUE: if (template_selection!=SPECIFIC_VALUE || is_ifpresent) break; single_value->field_enable.check_restriction(t_res, t_name ? t_name : "@IPL4asp_Types.ReuseAddress"); return; case TR_PRESENT: if (!match_omit(legacy)) return; break; default: return; } TTCN_error("Restriction `%s' on template of type %s violated.", get_res_name(t_res), t_name ? t_name : "@IPL4asp_Types.ReuseAddress"); } boolean ReuseAddress_template::is_present(boolean legacy) const { if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE; return !match_omit(legacy); } boolean ReuseAddress_template::match_omit(boolean legacy) const { if (is_ifpresent) return TRUE; switch (template_selection) { case OMIT_VALUE: case ANY_OR_OMIT: return TRUE; case IMPLICATION_MATCH: return !implication_.precondition->match_omit() || implication_.implied_template->match_omit(); case VALUE_LIST: case COMPLEMENTED_LIST: if (legacy) { for (unsigned int l_idx=0; l_idx& par_sctp__data__io__event, const OPTIONAL< BOOLEAN >& par_sctp__association__event, const OPTIONAL< BOOLEAN >& par_sctp__address__event, const OPTIONAL< BOOLEAN >& par_sctp__send__failure__event, const OPTIONAL< BOOLEAN >& par_sctp__peer__error__event, const OPTIONAL< BOOLEAN >& par_sctp__shutdown__event, const OPTIONAL< BOOLEAN >& par_sctp__partial__delivery__event, const OPTIONAL< BOOLEAN >& par_sctp__adaptation__layer__event, const OPTIONAL< BOOLEAN >& par_sctp__authentication__event, const OPTIONAL< BOOLEAN >& par_sctp__sender__dry__event) : field_sctp__data__io__event(par_sctp__data__io__event), field_sctp__association__event(par_sctp__association__event), field_sctp__address__event(par_sctp__address__event), field_sctp__send__failure__event(par_sctp__send__failure__event), field_sctp__peer__error__event(par_sctp__peer__error__event), field_sctp__shutdown__event(par_sctp__shutdown__event), field_sctp__partial__delivery__event(par_sctp__partial__delivery__event), field_sctp__adaptation__layer__event(par_sctp__adaptation__layer__event), field_sctp__authentication__event(par_sctp__authentication__event), field_sctp__sender__dry__event(par_sctp__sender__dry__event) { } SctpEventHandle::SctpEventHandle(const SctpEventHandle& other_value) { if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @IPL4asp_Types.SctpEventHandle."); if (other_value.sctp__data__io__event().is_bound()) field_sctp__data__io__event = other_value.sctp__data__io__event(); else field_sctp__data__io__event.clean_up(); if (other_value.sctp__association__event().is_bound()) field_sctp__association__event = other_value.sctp__association__event(); else field_sctp__association__event.clean_up(); if (other_value.sctp__address__event().is_bound()) field_sctp__address__event = other_value.sctp__address__event(); else field_sctp__address__event.clean_up(); if (other_value.sctp__send__failure__event().is_bound()) field_sctp__send__failure__event = other_value.sctp__send__failure__event(); else field_sctp__send__failure__event.clean_up(); if (other_value.sctp__peer__error__event().is_bound()) field_sctp__peer__error__event = other_value.sctp__peer__error__event(); else field_sctp__peer__error__event.clean_up(); if (other_value.sctp__shutdown__event().is_bound()) field_sctp__shutdown__event = other_value.sctp__shutdown__event(); else field_sctp__shutdown__event.clean_up(); if (other_value.sctp__partial__delivery__event().is_bound()) field_sctp__partial__delivery__event = other_value.sctp__partial__delivery__event(); else field_sctp__partial__delivery__event.clean_up(); if (other_value.sctp__adaptation__layer__event().is_bound()) field_sctp__adaptation__layer__event = other_value.sctp__adaptation__layer__event(); else field_sctp__adaptation__layer__event.clean_up(); if (other_value.sctp__authentication__event().is_bound()) field_sctp__authentication__event = other_value.sctp__authentication__event(); else field_sctp__authentication__event.clean_up(); if (other_value.sctp__sender__dry__event().is_bound()) field_sctp__sender__dry__event = other_value.sctp__sender__dry__event(); else field_sctp__sender__dry__event.clean_up(); } void SctpEventHandle::clean_up() { field_sctp__data__io__event.clean_up(); field_sctp__association__event.clean_up(); field_sctp__address__event.clean_up(); field_sctp__send__failure__event.clean_up(); field_sctp__peer__error__event.clean_up(); field_sctp__shutdown__event.clean_up(); field_sctp__partial__delivery__event.clean_up(); field_sctp__adaptation__layer__event.clean_up(); field_sctp__authentication__event.clean_up(); field_sctp__sender__dry__event.clean_up(); } const TTCN_Typedescriptor_t* SctpEventHandle::get_descriptor() const { return &SctpEventHandle_descr_; } SctpEventHandle& SctpEventHandle::operator=(const SctpEventHandle& other_value) { if (this != &other_value) { if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @IPL4asp_Types.SctpEventHandle."); if (other_value.sctp__data__io__event().is_bound()) field_sctp__data__io__event = other_value.sctp__data__io__event(); else field_sctp__data__io__event.clean_up(); if (other_value.sctp__association__event().is_bound()) field_sctp__association__event = other_value.sctp__association__event(); else field_sctp__association__event.clean_up(); if (other_value.sctp__address__event().is_bound()) field_sctp__address__event = other_value.sctp__address__event(); else field_sctp__address__event.clean_up(); if (other_value.sctp__send__failure__event().is_bound()) field_sctp__send__failure__event = other_value.sctp__send__failure__event(); else field_sctp__send__failure__event.clean_up(); if (other_value.sctp__peer__error__event().is_bound()) field_sctp__peer__error__event = other_value.sctp__peer__error__event(); else field_sctp__peer__error__event.clean_up(); if (other_value.sctp__shutdown__event().is_bound()) field_sctp__shutdown__event = other_value.sctp__shutdown__event(); else field_sctp__shutdown__event.clean_up(); if (other_value.sctp__partial__delivery__event().is_bound()) field_sctp__partial__delivery__event = other_value.sctp__partial__delivery__event(); else field_sctp__partial__delivery__event.clean_up(); if (other_value.sctp__adaptation__layer__event().is_bound()) field_sctp__adaptation__layer__event = other_value.sctp__adaptation__layer__event(); else field_sctp__adaptation__layer__event.clean_up(); if (other_value.sctp__authentication__event().is_bound()) field_sctp__authentication__event = other_value.sctp__authentication__event(); else field_sctp__authentication__event.clean_up(); if (other_value.sctp__sender__dry__event().is_bound()) field_sctp__sender__dry__event = other_value.sctp__sender__dry__event(); else field_sctp__sender__dry__event.clean_up(); } return *this; } boolean SctpEventHandle::operator==(const SctpEventHandle& other_value) const { return field_sctp__data__io__event==other_value.field_sctp__data__io__event && field_sctp__association__event==other_value.field_sctp__association__event && field_sctp__address__event==other_value.field_sctp__address__event && field_sctp__send__failure__event==other_value.field_sctp__send__failure__event && field_sctp__peer__error__event==other_value.field_sctp__peer__error__event && field_sctp__shutdown__event==other_value.field_sctp__shutdown__event && field_sctp__partial__delivery__event==other_value.field_sctp__partial__delivery__event && field_sctp__adaptation__layer__event==other_value.field_sctp__adaptation__layer__event && field_sctp__authentication__event==other_value.field_sctp__authentication__event && field_sctp__sender__dry__event==other_value.field_sctp__sender__dry__event; } boolean SctpEventHandle::is_bound() const { return (OPTIONAL_OMIT == field_sctp__data__io__event.get_selection() || field_sctp__data__io__event.is_bound()) || (OPTIONAL_OMIT == field_sctp__association__event.get_selection() || field_sctp__association__event.is_bound()) || (OPTIONAL_OMIT == field_sctp__address__event.get_selection() || field_sctp__address__event.is_bound()) || (OPTIONAL_OMIT == field_sctp__send__failure__event.get_selection() || field_sctp__send__failure__event.is_bound()) || (OPTIONAL_OMIT == field_sctp__peer__error__event.get_selection() || field_sctp__peer__error__event.is_bound()) || (OPTIONAL_OMIT == field_sctp__shutdown__event.get_selection() || field_sctp__shutdown__event.is_bound()) || (OPTIONAL_OMIT == field_sctp__partial__delivery__event.get_selection() || field_sctp__partial__delivery__event.is_bound()) || (OPTIONAL_OMIT == field_sctp__adaptation__layer__event.get_selection() || field_sctp__adaptation__layer__event.is_bound()) || (OPTIONAL_OMIT == field_sctp__authentication__event.get_selection() || field_sctp__authentication__event.is_bound()) || (OPTIONAL_OMIT == field_sctp__sender__dry__event.get_selection() || field_sctp__sender__dry__event.is_bound()); } boolean SctpEventHandle::is_value() const { return (OPTIONAL_OMIT == field_sctp__data__io__event.get_selection() || field_sctp__data__io__event.is_value()) && (OPTIONAL_OMIT == field_sctp__association__event.get_selection() || field_sctp__association__event.is_value()) && (OPTIONAL_OMIT == field_sctp__address__event.get_selection() || field_sctp__address__event.is_value()) && (OPTIONAL_OMIT == field_sctp__send__failure__event.get_selection() || field_sctp__send__failure__event.is_value()) && (OPTIONAL_OMIT == field_sctp__peer__error__event.get_selection() || field_sctp__peer__error__event.is_value()) && (OPTIONAL_OMIT == field_sctp__shutdown__event.get_selection() || field_sctp__shutdown__event.is_value()) && (OPTIONAL_OMIT == field_sctp__partial__delivery__event.get_selection() || field_sctp__partial__delivery__event.is_value()) && (OPTIONAL_OMIT == field_sctp__adaptation__layer__event.get_selection() || field_sctp__adaptation__layer__event.is_value()) && (OPTIONAL_OMIT == field_sctp__authentication__event.get_selection() || field_sctp__authentication__event.is_value()) && (OPTIONAL_OMIT == field_sctp__sender__dry__event.get_selection() || field_sctp__sender__dry__event.is_value()); } int SctpEventHandle::size_of() const { int ret_val = 0; if (field_sctp__data__io__event.ispresent()) ret_val++; if (field_sctp__association__event.ispresent()) ret_val++; if (field_sctp__address__event.ispresent()) ret_val++; if (field_sctp__send__failure__event.ispresent()) ret_val++; if (field_sctp__peer__error__event.ispresent()) ret_val++; if (field_sctp__shutdown__event.ispresent()) ret_val++; if (field_sctp__partial__delivery__event.ispresent()) ret_val++; if (field_sctp__adaptation__layer__event.ispresent()) ret_val++; if (field_sctp__authentication__event.ispresent()) ret_val++; if (field_sctp__sender__dry__event.ispresent()) ret_val++; return ret_val; } void SctpEventHandle::log() const { if (!is_bound()) { TTCN_Logger::log_event_unbound(); return; } TTCN_Logger::log_event_str("{ sctp_data_io_event := "); field_sctp__data__io__event.log(); TTCN_Logger::log_event_str(", sctp_association_event := "); field_sctp__association__event.log(); TTCN_Logger::log_event_str(", sctp_address_event := "); field_sctp__address__event.log(); TTCN_Logger::log_event_str(", sctp_send_failure_event := "); field_sctp__send__failure__event.log(); TTCN_Logger::log_event_str(", sctp_peer_error_event := "); field_sctp__peer__error__event.log(); TTCN_Logger::log_event_str(", sctp_shutdown_event := "); field_sctp__shutdown__event.log(); TTCN_Logger::log_event_str(", sctp_partial_delivery_event := "); field_sctp__partial__delivery__event.log(); TTCN_Logger::log_event_str(", sctp_adaptation_layer_event := "); field_sctp__adaptation__layer__event.log(); TTCN_Logger::log_event_str(", sctp_authentication_event := "); field_sctp__authentication__event.log(); TTCN_Logger::log_event_str(", sctp_sender_dry_event := "); field_sctp__sender__dry__event.log(); TTCN_Logger::log_event_str(" }"); } void SctpEventHandle::set_implicit_omit() { if (!sctp__data__io__event().is_bound()) sctp__data__io__event() = OMIT_VALUE; else sctp__data__io__event().set_implicit_omit(); if (!sctp__association__event().is_bound()) sctp__association__event() = OMIT_VALUE; else sctp__association__event().set_implicit_omit(); if (!sctp__address__event().is_bound()) sctp__address__event() = OMIT_VALUE; else sctp__address__event().set_implicit_omit(); if (!sctp__send__failure__event().is_bound()) sctp__send__failure__event() = OMIT_VALUE; else sctp__send__failure__event().set_implicit_omit(); if (!sctp__peer__error__event().is_bound()) sctp__peer__error__event() = OMIT_VALUE; else sctp__peer__error__event().set_implicit_omit(); if (!sctp__shutdown__event().is_bound()) sctp__shutdown__event() = OMIT_VALUE; else sctp__shutdown__event().set_implicit_omit(); if (!sctp__partial__delivery__event().is_bound()) sctp__partial__delivery__event() = OMIT_VALUE; else sctp__partial__delivery__event().set_implicit_omit(); if (!sctp__adaptation__layer__event().is_bound()) sctp__adaptation__layer__event() = OMIT_VALUE; else sctp__adaptation__layer__event().set_implicit_omit(); if (!sctp__authentication__event().is_bound()) sctp__authentication__event() = OMIT_VALUE; else sctp__authentication__event().set_implicit_omit(); if (!sctp__sender__dry__event().is_bound()) sctp__sender__dry__event() = OMIT_VALUE; else sctp__sender__dry__event().set_implicit_omit(); } void SctpEventHandle::set_param(Module_Param& param) { param.basic_check(Module_Param::BC_VALUE, "record value"); switch (param.get_type()) { case Module_Param::MP_Value_List: if (100 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) sctp__data__io__event().set_param(*param.get_elem(0)); if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) sctp__association__event().set_param(*param.get_elem(1)); if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) sctp__address__event().set_param(*param.get_elem(2)); if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) sctp__send__failure__event().set_param(*param.get_elem(3)); if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) sctp__peer__error__event().set_param(*param.get_elem(4)); if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) sctp__shutdown__event().set_param(*param.get_elem(5)); if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) sctp__partial__delivery__event().set_param(*param.get_elem(6)); if (param.get_size()>7 && param.get_elem(7)->get_type()!=Module_Param::MP_NotUsed) sctp__adaptation__layer__event().set_param(*param.get_elem(7)); if (param.get_size()>8 && param.get_elem(8)->get_type()!=Module_Param::MP_NotUsed) sctp__authentication__event().set_param(*param.get_elem(8)); if (param.get_size()>9 && param.get_elem(9)->get_type()!=Module_Param::MP_NotUsed) sctp__sender__dry__event().set_param(*param.get_elem(9)); break; case Module_Param::MP_Assignment_List: { Vector value_used(param.get_size()); value_used.resize(param.get_size(), FALSE); for (size_t val_idx=0; val_idxget_id()->get_name(), "sctp_data_io_event")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { sctp__data__io__event().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "sctp_association_event")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { sctp__association__event().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "sctp_address_event")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { sctp__address__event().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "sctp_send_failure_event")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { sctp__send__failure__event().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "sctp_peer_error_event")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { sctp__peer__error__event().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "sctp_shutdown_event")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { sctp__shutdown__event().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "sctp_partial_delivery_event")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { sctp__partial__delivery__event().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "sctp_adaptation_layer_event")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { sctp__adaptation__layer__event().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "sctp_authentication_event")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { sctp__authentication__event().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "sctp_sender_dry_event")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { sctp__sender__dry__event().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxerror("Non existent field name in type @IPL4asp_Types.SctpEventHandle: %s", curr_param->get_id()->get_name()); break; } } break; default: param.type_error("record value", "@IPL4asp_Types.SctpEventHandle"); } } void SctpEventHandle::encode_text(Text_Buf& text_buf) const { field_sctp__data__io__event.encode_text(text_buf); field_sctp__association__event.encode_text(text_buf); field_sctp__address__event.encode_text(text_buf); field_sctp__send__failure__event.encode_text(text_buf); field_sctp__peer__error__event.encode_text(text_buf); field_sctp__shutdown__event.encode_text(text_buf); field_sctp__partial__delivery__event.encode_text(text_buf); field_sctp__adaptation__layer__event.encode_text(text_buf); field_sctp__authentication__event.encode_text(text_buf); field_sctp__sender__dry__event.encode_text(text_buf); } void SctpEventHandle::decode_text(Text_Buf& text_buf) { field_sctp__data__io__event.decode_text(text_buf); field_sctp__association__event.decode_text(text_buf); field_sctp__address__event.decode_text(text_buf); field_sctp__send__failure__event.decode_text(text_buf); field_sctp__peer__error__event.decode_text(text_buf); field_sctp__shutdown__event.decode_text(text_buf); field_sctp__partial__delivery__event.decode_text(text_buf); field_sctp__adaptation__layer__event.decode_text(text_buf); field_sctp__authentication__event.decode_text(text_buf); field_sctp__sender__dry__event.decode_text(text_buf); } struct SctpEventHandle_template::single_value_struct { BOOLEAN_template field_sctp__data__io__event; BOOLEAN_template field_sctp__association__event; BOOLEAN_template field_sctp__address__event; BOOLEAN_template field_sctp__send__failure__event; BOOLEAN_template field_sctp__peer__error__event; BOOLEAN_template field_sctp__shutdown__event; BOOLEAN_template field_sctp__partial__delivery__event; BOOLEAN_template field_sctp__adaptation__layer__event; BOOLEAN_template field_sctp__authentication__event; BOOLEAN_template field_sctp__sender__dry__event; }; void SctpEventHandle_template::set_specific() { if (template_selection != SPECIFIC_VALUE) { template_sel old_selection = template_selection; clean_up(); single_value = new single_value_struct; set_selection(SPECIFIC_VALUE); if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) { single_value->field_sctp__data__io__event = ANY_OR_OMIT; single_value->field_sctp__association__event = ANY_OR_OMIT; single_value->field_sctp__address__event = ANY_OR_OMIT; single_value->field_sctp__send__failure__event = ANY_OR_OMIT; single_value->field_sctp__peer__error__event = ANY_OR_OMIT; single_value->field_sctp__shutdown__event = ANY_OR_OMIT; single_value->field_sctp__partial__delivery__event = ANY_OR_OMIT; single_value->field_sctp__adaptation__layer__event = ANY_OR_OMIT; single_value->field_sctp__authentication__event = ANY_OR_OMIT; single_value->field_sctp__sender__dry__event = ANY_OR_OMIT; } } } void SctpEventHandle_template::copy_value(const SctpEventHandle& other_value) { single_value = new single_value_struct; if (other_value.sctp__data__io__event().is_bound()) { if (other_value.sctp__data__io__event().ispresent()) single_value->field_sctp__data__io__event = other_value.sctp__data__io__event()(); else single_value->field_sctp__data__io__event = OMIT_VALUE; } else { single_value->field_sctp__data__io__event.clean_up(); } if (other_value.sctp__association__event().is_bound()) { if (other_value.sctp__association__event().ispresent()) single_value->field_sctp__association__event = other_value.sctp__association__event()(); else single_value->field_sctp__association__event = OMIT_VALUE; } else { single_value->field_sctp__association__event.clean_up(); } if (other_value.sctp__address__event().is_bound()) { if (other_value.sctp__address__event().ispresent()) single_value->field_sctp__address__event = other_value.sctp__address__event()(); else single_value->field_sctp__address__event = OMIT_VALUE; } else { single_value->field_sctp__address__event.clean_up(); } if (other_value.sctp__send__failure__event().is_bound()) { if (other_value.sctp__send__failure__event().ispresent()) single_value->field_sctp__send__failure__event = other_value.sctp__send__failure__event()(); else single_value->field_sctp__send__failure__event = OMIT_VALUE; } else { single_value->field_sctp__send__failure__event.clean_up(); } if (other_value.sctp__peer__error__event().is_bound()) { if (other_value.sctp__peer__error__event().ispresent()) single_value->field_sctp__peer__error__event = other_value.sctp__peer__error__event()(); else single_value->field_sctp__peer__error__event = OMIT_VALUE; } else { single_value->field_sctp__peer__error__event.clean_up(); } if (other_value.sctp__shutdown__event().is_bound()) { if (other_value.sctp__shutdown__event().ispresent()) single_value->field_sctp__shutdown__event = other_value.sctp__shutdown__event()(); else single_value->field_sctp__shutdown__event = OMIT_VALUE; } else { single_value->field_sctp__shutdown__event.clean_up(); } if (other_value.sctp__partial__delivery__event().is_bound()) { if (other_value.sctp__partial__delivery__event().ispresent()) single_value->field_sctp__partial__delivery__event = other_value.sctp__partial__delivery__event()(); else single_value->field_sctp__partial__delivery__event = OMIT_VALUE; } else { single_value->field_sctp__partial__delivery__event.clean_up(); } if (other_value.sctp__adaptation__layer__event().is_bound()) { if (other_value.sctp__adaptation__layer__event().ispresent()) single_value->field_sctp__adaptation__layer__event = other_value.sctp__adaptation__layer__event()(); else single_value->field_sctp__adaptation__layer__event = OMIT_VALUE; } else { single_value->field_sctp__adaptation__layer__event.clean_up(); } if (other_value.sctp__authentication__event().is_bound()) { if (other_value.sctp__authentication__event().ispresent()) single_value->field_sctp__authentication__event = other_value.sctp__authentication__event()(); else single_value->field_sctp__authentication__event = OMIT_VALUE; } else { single_value->field_sctp__authentication__event.clean_up(); } if (other_value.sctp__sender__dry__event().is_bound()) { if (other_value.sctp__sender__dry__event().ispresent()) single_value->field_sctp__sender__dry__event = other_value.sctp__sender__dry__event()(); else single_value->field_sctp__sender__dry__event = OMIT_VALUE; } else { single_value->field_sctp__sender__dry__event.clean_up(); } set_selection(SPECIFIC_VALUE); } void SctpEventHandle_template::copy_template(const SctpEventHandle_template& other_value) { switch (other_value.template_selection) { case SPECIFIC_VALUE: single_value = new single_value_struct; if (UNINITIALIZED_TEMPLATE != other_value.sctp__data__io__event().get_selection()) { single_value->field_sctp__data__io__event = other_value.sctp__data__io__event(); } else { single_value->field_sctp__data__io__event.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.sctp__association__event().get_selection()) { single_value->field_sctp__association__event = other_value.sctp__association__event(); } else { single_value->field_sctp__association__event.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.sctp__address__event().get_selection()) { single_value->field_sctp__address__event = other_value.sctp__address__event(); } else { single_value->field_sctp__address__event.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.sctp__send__failure__event().get_selection()) { single_value->field_sctp__send__failure__event = other_value.sctp__send__failure__event(); } else { single_value->field_sctp__send__failure__event.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.sctp__peer__error__event().get_selection()) { single_value->field_sctp__peer__error__event = other_value.sctp__peer__error__event(); } else { single_value->field_sctp__peer__error__event.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.sctp__shutdown__event().get_selection()) { single_value->field_sctp__shutdown__event = other_value.sctp__shutdown__event(); } else { single_value->field_sctp__shutdown__event.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.sctp__partial__delivery__event().get_selection()) { single_value->field_sctp__partial__delivery__event = other_value.sctp__partial__delivery__event(); } else { single_value->field_sctp__partial__delivery__event.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.sctp__adaptation__layer__event().get_selection()) { single_value->field_sctp__adaptation__layer__event = other_value.sctp__adaptation__layer__event(); } else { single_value->field_sctp__adaptation__layer__event.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.sctp__authentication__event().get_selection()) { single_value->field_sctp__authentication__event = other_value.sctp__authentication__event(); } else { single_value->field_sctp__authentication__event.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.sctp__sender__dry__event().get_selection()) { single_value->field_sctp__sender__dry__event = other_value.sctp__sender__dry__event(); } else { single_value->field_sctp__sender__dry__event.clean_up(); } case OMIT_VALUE: case ANY_VALUE: case ANY_OR_OMIT: break; case VALUE_LIST: case COMPLEMENTED_LIST: case CONJUNCTION_MATCH: value_list.n_values = other_value.value_list.n_values; value_list.list_value = new SctpEventHandle_template[value_list.n_values]; for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) value_list.list_value[list_count].copy_template(other_value.value_list.list_value[list_count]); break; case IMPLICATION_MATCH: implication_.precondition = new SctpEventHandle_template(*other_value.implication_.precondition); implication_.implied_template = new SctpEventHandle_template(*other_value.implication_.implied_template); break; case DYNAMIC_MATCH: dyn_match = other_value.dyn_match; dyn_match->ref_count++; break; default: TTCN_error("Copying an uninitialized/unsupported template of type @IPL4asp_Types.SctpEventHandle."); break; } set_selection(other_value); } SctpEventHandle_template::SctpEventHandle_template() { } SctpEventHandle_template::SctpEventHandle_template(template_sel other_value) : Base_Template(other_value) { check_single_selection(other_value); } SctpEventHandle_template::SctpEventHandle_template(const SctpEventHandle& other_value) { copy_value(other_value); } SctpEventHandle_template::SctpEventHandle_template(const OPTIONAL& other_value) { switch (other_value.get_selection()) { case OPTIONAL_PRESENT: copy_value((const SctpEventHandle&)other_value); break; case OPTIONAL_OMIT: set_selection(OMIT_VALUE); break; default: TTCN_error("Creating a template of type @IPL4asp_Types.SctpEventHandle from an unbound optional field."); } } SctpEventHandle_template::SctpEventHandle_template(SctpEventHandle_template* p_precondition, SctpEventHandle_template* p_implied_template) : Base_Template(IMPLICATION_MATCH) { implication_.precondition = p_precondition; implication_.implied_template = p_implied_template; } SctpEventHandle_template::SctpEventHandle_template(Dynamic_Match_Interface* p_dyn_match) : Base_Template(DYNAMIC_MATCH) { dyn_match = new dynmatch_struct; dyn_match->ptr = p_dyn_match; dyn_match->ref_count = 1; } SctpEventHandle_template::SctpEventHandle_template(const SctpEventHandle_template& other_value) : Base_Template() { copy_template(other_value); } SctpEventHandle_template::~SctpEventHandle_template() { clean_up(); } SctpEventHandle_template& SctpEventHandle_template::operator=(template_sel other_value) { check_single_selection(other_value); clean_up(); set_selection(other_value); return *this; } SctpEventHandle_template& SctpEventHandle_template::operator=(const SctpEventHandle& other_value) { clean_up(); copy_value(other_value); return *this; } SctpEventHandle_template& SctpEventHandle_template::operator=(const OPTIONAL& other_value) { clean_up(); switch (other_value.get_selection()) { case OPTIONAL_PRESENT: copy_value((const SctpEventHandle&)other_value); break; case OPTIONAL_OMIT: set_selection(OMIT_VALUE); break; default: TTCN_error("Assignment of an unbound optional field to a template of type @IPL4asp_Types.SctpEventHandle."); } return *this; } SctpEventHandle_template& SctpEventHandle_template::operator=(const SctpEventHandle_template& other_value) { if (&other_value != this) { clean_up(); copy_template(other_value); } return *this; } boolean SctpEventHandle_template::match(const SctpEventHandle& other_value, boolean legacy) const { if (!other_value.is_bound()) return FALSE; switch (template_selection) { case ANY_VALUE: case ANY_OR_OMIT: return TRUE; case OMIT_VALUE: return FALSE; case SPECIFIC_VALUE: if(!other_value.sctp__data__io__event().is_bound()) return FALSE; if((other_value.sctp__data__io__event().ispresent() ? !single_value->field_sctp__data__io__event.match((const BOOLEAN&)other_value.sctp__data__io__event(), legacy) : !single_value->field_sctp__data__io__event.match_omit(legacy)))return FALSE; if(!other_value.sctp__association__event().is_bound()) return FALSE; if((other_value.sctp__association__event().ispresent() ? !single_value->field_sctp__association__event.match((const BOOLEAN&)other_value.sctp__association__event(), legacy) : !single_value->field_sctp__association__event.match_omit(legacy)))return FALSE; if(!other_value.sctp__address__event().is_bound()) return FALSE; if((other_value.sctp__address__event().ispresent() ? !single_value->field_sctp__address__event.match((const BOOLEAN&)other_value.sctp__address__event(), legacy) : !single_value->field_sctp__address__event.match_omit(legacy)))return FALSE; if(!other_value.sctp__send__failure__event().is_bound()) return FALSE; if((other_value.sctp__send__failure__event().ispresent() ? !single_value->field_sctp__send__failure__event.match((const BOOLEAN&)other_value.sctp__send__failure__event(), legacy) : !single_value->field_sctp__send__failure__event.match_omit(legacy)))return FALSE; if(!other_value.sctp__peer__error__event().is_bound()) return FALSE; if((other_value.sctp__peer__error__event().ispresent() ? !single_value->field_sctp__peer__error__event.match((const BOOLEAN&)other_value.sctp__peer__error__event(), legacy) : !single_value->field_sctp__peer__error__event.match_omit(legacy)))return FALSE; if(!other_value.sctp__shutdown__event().is_bound()) return FALSE; if((other_value.sctp__shutdown__event().ispresent() ? !single_value->field_sctp__shutdown__event.match((const BOOLEAN&)other_value.sctp__shutdown__event(), legacy) : !single_value->field_sctp__shutdown__event.match_omit(legacy)))return FALSE; if(!other_value.sctp__partial__delivery__event().is_bound()) return FALSE; if((other_value.sctp__partial__delivery__event().ispresent() ? !single_value->field_sctp__partial__delivery__event.match((const BOOLEAN&)other_value.sctp__partial__delivery__event(), legacy) : !single_value->field_sctp__partial__delivery__event.match_omit(legacy)))return FALSE; if(!other_value.sctp__adaptation__layer__event().is_bound()) return FALSE; if((other_value.sctp__adaptation__layer__event().ispresent() ? !single_value->field_sctp__adaptation__layer__event.match((const BOOLEAN&)other_value.sctp__adaptation__layer__event(), legacy) : !single_value->field_sctp__adaptation__layer__event.match_omit(legacy)))return FALSE; if(!other_value.sctp__authentication__event().is_bound()) return FALSE; if((other_value.sctp__authentication__event().ispresent() ? !single_value->field_sctp__authentication__event.match((const BOOLEAN&)other_value.sctp__authentication__event(), legacy) : !single_value->field_sctp__authentication__event.match_omit(legacy)))return FALSE; if(!other_value.sctp__sender__dry__event().is_bound()) return FALSE; if((other_value.sctp__sender__dry__event().ispresent() ? !single_value->field_sctp__sender__dry__event.match((const BOOLEAN&)other_value.sctp__sender__dry__event(), legacy) : !single_value->field_sctp__sender__dry__event.match_omit(legacy)))return FALSE; return TRUE; case VALUE_LIST: case COMPLEMENTED_LIST: for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST; return template_selection == COMPLEMENTED_LIST; case CONJUNCTION_MATCH: for (unsigned int i = 0; i < value_list.n_values; i++) { if (!value_list.list_value[i].match(other_value)) { return FALSE; } } return TRUE; case IMPLICATION_MATCH: return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value); case DYNAMIC_MATCH: return dyn_match->ptr->match(other_value); default: TTCN_error("Matching an uninitialized/unsupported template of type @IPL4asp_Types.SctpEventHandle."); } return FALSE; } boolean SctpEventHandle_template::is_bound() const { if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE; if (template_selection != SPECIFIC_VALUE) return TRUE; return (single_value->field_sctp__data__io__event.is_omit() || single_value->field_sctp__data__io__event.is_bound()) || (single_value->field_sctp__association__event.is_omit() || single_value->field_sctp__association__event.is_bound()) || (single_value->field_sctp__address__event.is_omit() || single_value->field_sctp__address__event.is_bound()) || (single_value->field_sctp__send__failure__event.is_omit() || single_value->field_sctp__send__failure__event.is_bound()) || (single_value->field_sctp__peer__error__event.is_omit() || single_value->field_sctp__peer__error__event.is_bound()) || (single_value->field_sctp__shutdown__event.is_omit() || single_value->field_sctp__shutdown__event.is_bound()) || (single_value->field_sctp__partial__delivery__event.is_omit() || single_value->field_sctp__partial__delivery__event.is_bound()) || (single_value->field_sctp__adaptation__layer__event.is_omit() || single_value->field_sctp__adaptation__layer__event.is_bound()) || (single_value->field_sctp__authentication__event.is_omit() || single_value->field_sctp__authentication__event.is_bound()) || (single_value->field_sctp__sender__dry__event.is_omit() || single_value->field_sctp__sender__dry__event.is_bound()); } boolean SctpEventHandle_template::is_value() const { if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE; return (single_value->field_sctp__data__io__event.is_omit() || single_value->field_sctp__data__io__event.is_value()) && (single_value->field_sctp__association__event.is_omit() || single_value->field_sctp__association__event.is_value()) && (single_value->field_sctp__address__event.is_omit() || single_value->field_sctp__address__event.is_value()) && (single_value->field_sctp__send__failure__event.is_omit() || single_value->field_sctp__send__failure__event.is_value()) && (single_value->field_sctp__peer__error__event.is_omit() || single_value->field_sctp__peer__error__event.is_value()) && (single_value->field_sctp__shutdown__event.is_omit() || single_value->field_sctp__shutdown__event.is_value()) && (single_value->field_sctp__partial__delivery__event.is_omit() || single_value->field_sctp__partial__delivery__event.is_value()) && (single_value->field_sctp__adaptation__layer__event.is_omit() || single_value->field_sctp__adaptation__layer__event.is_value()) && (single_value->field_sctp__authentication__event.is_omit() || single_value->field_sctp__authentication__event.is_value()) && (single_value->field_sctp__sender__dry__event.is_omit() || single_value->field_sctp__sender__dry__event.is_value()); } void SctpEventHandle_template::clean_up() { switch (template_selection) { case SPECIFIC_VALUE: delete single_value; break; case VALUE_LIST: case COMPLEMENTED_LIST: case CONJUNCTION_MATCH: delete [] value_list.list_value; break; case IMPLICATION_MATCH: delete implication_.precondition; delete implication_.implied_template; break; case DYNAMIC_MATCH: dyn_match->ref_count--; if (dyn_match->ref_count == 0) { delete dyn_match->ptr; delete dyn_match; } break; default: break; } template_selection = UNINITIALIZED_TEMPLATE; } SctpEventHandle SctpEventHandle_template::valueof() const { if (template_selection != SPECIFIC_VALUE || is_ifpresent) TTCN_error("Performing a valueof or send operation on a non-specific template of type @IPL4asp_Types.SctpEventHandle."); SctpEventHandle ret_val; if (single_value->field_sctp__data__io__event.is_omit()) ret_val.sctp__data__io__event() = OMIT_VALUE; else if (single_value->field_sctp__data__io__event.is_bound()) { ret_val.sctp__data__io__event() = single_value->field_sctp__data__io__event.valueof(); } if (single_value->field_sctp__association__event.is_omit()) ret_val.sctp__association__event() = OMIT_VALUE; else if (single_value->field_sctp__association__event.is_bound()) { ret_val.sctp__association__event() = single_value->field_sctp__association__event.valueof(); } if (single_value->field_sctp__address__event.is_omit()) ret_val.sctp__address__event() = OMIT_VALUE; else if (single_value->field_sctp__address__event.is_bound()) { ret_val.sctp__address__event() = single_value->field_sctp__address__event.valueof(); } if (single_value->field_sctp__send__failure__event.is_omit()) ret_val.sctp__send__failure__event() = OMIT_VALUE; else if (single_value->field_sctp__send__failure__event.is_bound()) { ret_val.sctp__send__failure__event() = single_value->field_sctp__send__failure__event.valueof(); } if (single_value->field_sctp__peer__error__event.is_omit()) ret_val.sctp__peer__error__event() = OMIT_VALUE; else if (single_value->field_sctp__peer__error__event.is_bound()) { ret_val.sctp__peer__error__event() = single_value->field_sctp__peer__error__event.valueof(); } if (single_value->field_sctp__shutdown__event.is_omit()) ret_val.sctp__shutdown__event() = OMIT_VALUE; else if (single_value->field_sctp__shutdown__event.is_bound()) { ret_val.sctp__shutdown__event() = single_value->field_sctp__shutdown__event.valueof(); } if (single_value->field_sctp__partial__delivery__event.is_omit()) ret_val.sctp__partial__delivery__event() = OMIT_VALUE; else if (single_value->field_sctp__partial__delivery__event.is_bound()) { ret_val.sctp__partial__delivery__event() = single_value->field_sctp__partial__delivery__event.valueof(); } if (single_value->field_sctp__adaptation__layer__event.is_omit()) ret_val.sctp__adaptation__layer__event() = OMIT_VALUE; else if (single_value->field_sctp__adaptation__layer__event.is_bound()) { ret_val.sctp__adaptation__layer__event() = single_value->field_sctp__adaptation__layer__event.valueof(); } if (single_value->field_sctp__authentication__event.is_omit()) ret_val.sctp__authentication__event() = OMIT_VALUE; else if (single_value->field_sctp__authentication__event.is_bound()) { ret_val.sctp__authentication__event() = single_value->field_sctp__authentication__event.valueof(); } if (single_value->field_sctp__sender__dry__event.is_omit()) ret_val.sctp__sender__dry__event() = OMIT_VALUE; else if (single_value->field_sctp__sender__dry__event.is_bound()) { ret_val.sctp__sender__dry__event() = single_value->field_sctp__sender__dry__event.valueof(); } return ret_val; } void SctpEventHandle_template::set_type(template_sel template_type, unsigned int list_length) { if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST&& template_type != CONJUNCTION_MATCH) TTCN_error("Setting an invalid list for a template of type @IPL4asp_Types.SctpEventHandle."); clean_up(); set_selection(template_type); value_list.n_values = list_length; value_list.list_value = new SctpEventHandle_template[list_length]; } SctpEventHandle_template& SctpEventHandle_template::list_item(unsigned int list_index) const { if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST&& template_selection != CONJUNCTION_MATCH) TTCN_error("Accessing a list element of a non-list template of type @IPL4asp_Types.SctpEventHandle."); if (list_index >= value_list.n_values) TTCN_error("Index overflow in a value list template of type @IPL4asp_Types.SctpEventHandle."); return value_list.list_value[list_index]; } BOOLEAN_template& SctpEventHandle_template::sctp__data__io__event() { set_specific(); return single_value->field_sctp__data__io__event; } const BOOLEAN_template& SctpEventHandle_template::sctp__data__io__event() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field sctp_data_io_event of a non-specific template of type @IPL4asp_Types.SctpEventHandle."); return single_value->field_sctp__data__io__event; } BOOLEAN_template& SctpEventHandle_template::sctp__association__event() { set_specific(); return single_value->field_sctp__association__event; } const BOOLEAN_template& SctpEventHandle_template::sctp__association__event() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field sctp_association_event of a non-specific template of type @IPL4asp_Types.SctpEventHandle."); return single_value->field_sctp__association__event; } BOOLEAN_template& SctpEventHandle_template::sctp__address__event() { set_specific(); return single_value->field_sctp__address__event; } const BOOLEAN_template& SctpEventHandle_template::sctp__address__event() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field sctp_address_event of a non-specific template of type @IPL4asp_Types.SctpEventHandle."); return single_value->field_sctp__address__event; } BOOLEAN_template& SctpEventHandle_template::sctp__send__failure__event() { set_specific(); return single_value->field_sctp__send__failure__event; } const BOOLEAN_template& SctpEventHandle_template::sctp__send__failure__event() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field sctp_send_failure_event of a non-specific template of type @IPL4asp_Types.SctpEventHandle."); return single_value->field_sctp__send__failure__event; } BOOLEAN_template& SctpEventHandle_template::sctp__peer__error__event() { set_specific(); return single_value->field_sctp__peer__error__event; } const BOOLEAN_template& SctpEventHandle_template::sctp__peer__error__event() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field sctp_peer_error_event of a non-specific template of type @IPL4asp_Types.SctpEventHandle."); return single_value->field_sctp__peer__error__event; } BOOLEAN_template& SctpEventHandle_template::sctp__shutdown__event() { set_specific(); return single_value->field_sctp__shutdown__event; } const BOOLEAN_template& SctpEventHandle_template::sctp__shutdown__event() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field sctp_shutdown_event of a non-specific template of type @IPL4asp_Types.SctpEventHandle."); return single_value->field_sctp__shutdown__event; } BOOLEAN_template& SctpEventHandle_template::sctp__partial__delivery__event() { set_specific(); return single_value->field_sctp__partial__delivery__event; } const BOOLEAN_template& SctpEventHandle_template::sctp__partial__delivery__event() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field sctp_partial_delivery_event of a non-specific template of type @IPL4asp_Types.SctpEventHandle."); return single_value->field_sctp__partial__delivery__event; } BOOLEAN_template& SctpEventHandle_template::sctp__adaptation__layer__event() { set_specific(); return single_value->field_sctp__adaptation__layer__event; } const BOOLEAN_template& SctpEventHandle_template::sctp__adaptation__layer__event() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field sctp_adaptation_layer_event of a non-specific template of type @IPL4asp_Types.SctpEventHandle."); return single_value->field_sctp__adaptation__layer__event; } BOOLEAN_template& SctpEventHandle_template::sctp__authentication__event() { set_specific(); return single_value->field_sctp__authentication__event; } const BOOLEAN_template& SctpEventHandle_template::sctp__authentication__event() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field sctp_authentication_event of a non-specific template of type @IPL4asp_Types.SctpEventHandle."); return single_value->field_sctp__authentication__event; } BOOLEAN_template& SctpEventHandle_template::sctp__sender__dry__event() { set_specific(); return single_value->field_sctp__sender__dry__event; } const BOOLEAN_template& SctpEventHandle_template::sctp__sender__dry__event() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field sctp_sender_dry_event of a non-specific template of type @IPL4asp_Types.SctpEventHandle."); return single_value->field_sctp__sender__dry__event; } int SctpEventHandle_template::size_of() const { if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @IPL4asp_Types.SctpEventHandle which has an ifpresent attribute."); switch (template_selection) { case SPECIFIC_VALUE: { int ret_val = 0; if (single_value->field_sctp__data__io__event.is_present()) ret_val++; if (single_value->field_sctp__association__event.is_present()) ret_val++; if (single_value->field_sctp__address__event.is_present()) ret_val++; if (single_value->field_sctp__send__failure__event.is_present()) ret_val++; if (single_value->field_sctp__peer__error__event.is_present()) ret_val++; if (single_value->field_sctp__shutdown__event.is_present()) ret_val++; if (single_value->field_sctp__partial__delivery__event.is_present()) ret_val++; if (single_value->field_sctp__adaptation__layer__event.is_present()) ret_val++; if (single_value->field_sctp__authentication__event.is_present()) ret_val++; if (single_value->field_sctp__sender__dry__event.is_present()) ret_val++; return ret_val; } case VALUE_LIST: { if (value_list.n_values<1) TTCN_error("Internal error: Performing sizeof() operation on a template of type @IPL4asp_Types.SctpEventHandle containing an empty list."); int item_size = value_list.list_value[0].size_of(); for (unsigned int l_idx = 1; l_idx < value_list.n_values; l_idx++) { if (value_list.list_value[l_idx].size_of()!=item_size) TTCN_error("Performing sizeof() operation on a template of type @IPL4asp_Types.SctpEventHandle containing a value list with different sizes."); } return item_size; } case OMIT_VALUE: TTCN_error("Performing sizeof() operation on a template of type @IPL4asp_Types.SctpEventHandle containing omit value."); case ANY_VALUE: case ANY_OR_OMIT: TTCN_error("Performing sizeof() operation on a template of type @IPL4asp_Types.SctpEventHandle containing */? value."); case COMPLEMENTED_LIST: TTCN_error("Performing sizeof() operation on a template of type @IPL4asp_Types.SctpEventHandle containing complemented list."); case CONJUNCTION_MATCH: TTCN_error("Performing sizeof() operation on a template of type @IPL4asp_Types.SctpEventHandle containing a conjunction list match."); case IMPLICATION_MATCH: TTCN_error("Performing sizeof() operation on a template of type @IPL4asp_Types.SctpEventHandle containing an implication match."); case DYNAMIC_MATCH: TTCN_error("Performing sizeof() operation on a template of type @IPL4asp_Types.SctpEventHandle containing a dynamic match."); default: TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @IPL4asp_Types.SctpEventHandle."); } return 0; } void SctpEventHandle_template::log() const { switch (template_selection) { case SPECIFIC_VALUE: TTCN_Logger::log_event_str("{ sctp_data_io_event := "); single_value->field_sctp__data__io__event.log(); TTCN_Logger::log_event_str(", sctp_association_event := "); single_value->field_sctp__association__event.log(); TTCN_Logger::log_event_str(", sctp_address_event := "); single_value->field_sctp__address__event.log(); TTCN_Logger::log_event_str(", sctp_send_failure_event := "); single_value->field_sctp__send__failure__event.log(); TTCN_Logger::log_event_str(", sctp_peer_error_event := "); single_value->field_sctp__peer__error__event.log(); TTCN_Logger::log_event_str(", sctp_shutdown_event := "); single_value->field_sctp__shutdown__event.log(); TTCN_Logger::log_event_str(", sctp_partial_delivery_event := "); single_value->field_sctp__partial__delivery__event.log(); TTCN_Logger::log_event_str(", sctp_adaptation_layer_event := "); single_value->field_sctp__adaptation__layer__event.log(); TTCN_Logger::log_event_str(", sctp_authentication_event := "); single_value->field_sctp__authentication__event.log(); TTCN_Logger::log_event_str(", sctp_sender_dry_event := "); single_value->field_sctp__sender__dry__event.log(); TTCN_Logger::log_event_str(" }"); break; case COMPLEMENTED_LIST: TTCN_Logger::log_event_str("complement"); case CONJUNCTION_MATCH: if (template_selection == CONJUNCTION_MATCH) { TTCN_Logger::log_event_str("conjunct"); } case VALUE_LIST: TTCN_Logger::log_char('('); for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) { if (list_count > 0) TTCN_Logger::log_event_str(", "); value_list.list_value[list_count].log(); } TTCN_Logger::log_char(')'); break; case IMPLICATION_MATCH: implication_.precondition->log(); TTCN_Logger::log_event_str(" implies "); implication_.implied_template->log(); break; case DYNAMIC_MATCH: TTCN_Logger::log_event_str("@dynamic template"); break; default: log_generic(); } log_ifpresent(); } void SctpEventHandle_template::log_match(const SctpEventHandle& match_value, boolean legacy) const { if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){ if(match(match_value, legacy)){ TTCN_Logger::print_logmatch_buffer(); TTCN_Logger::log_event_str(" matched"); } else{ if (template_selection == SPECIFIC_VALUE) { size_t previous_size = TTCN_Logger::get_logmatch_buffer_len(); if (match_value.sctp__data__io__event().ispresent()){ if(!single_value->field_sctp__data__io__event.match(match_value.sctp__data__io__event(), legacy)){ TTCN_Logger::log_logmatch_info(".sctp_data_io_event"); single_value->field_sctp__data__io__event.log_match(match_value.sctp__data__io__event(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } else { if (!single_value->field_sctp__data__io__event.match_omit(legacy)){ TTCN_Logger::log_logmatch_info(".sctp_data_io_event := omit with "); TTCN_Logger::print_logmatch_buffer(); single_value->field_sctp__data__io__event.log(); TTCN_Logger::log_event_str(" unmatched"); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } if (match_value.sctp__association__event().ispresent()){ if(!single_value->field_sctp__association__event.match(match_value.sctp__association__event(), legacy)){ TTCN_Logger::log_logmatch_info(".sctp_association_event"); single_value->field_sctp__association__event.log_match(match_value.sctp__association__event(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } else { if (!single_value->field_sctp__association__event.match_omit(legacy)){ TTCN_Logger::log_logmatch_info(".sctp_association_event := omit with "); TTCN_Logger::print_logmatch_buffer(); single_value->field_sctp__association__event.log(); TTCN_Logger::log_event_str(" unmatched"); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } if (match_value.sctp__address__event().ispresent()){ if(!single_value->field_sctp__address__event.match(match_value.sctp__address__event(), legacy)){ TTCN_Logger::log_logmatch_info(".sctp_address_event"); single_value->field_sctp__address__event.log_match(match_value.sctp__address__event(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } else { if (!single_value->field_sctp__address__event.match_omit(legacy)){ TTCN_Logger::log_logmatch_info(".sctp_address_event := omit with "); TTCN_Logger::print_logmatch_buffer(); single_value->field_sctp__address__event.log(); TTCN_Logger::log_event_str(" unmatched"); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } if (match_value.sctp__send__failure__event().ispresent()){ if(!single_value->field_sctp__send__failure__event.match(match_value.sctp__send__failure__event(), legacy)){ TTCN_Logger::log_logmatch_info(".sctp_send_failure_event"); single_value->field_sctp__send__failure__event.log_match(match_value.sctp__send__failure__event(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } else { if (!single_value->field_sctp__send__failure__event.match_omit(legacy)){ TTCN_Logger::log_logmatch_info(".sctp_send_failure_event := omit with "); TTCN_Logger::print_logmatch_buffer(); single_value->field_sctp__send__failure__event.log(); TTCN_Logger::log_event_str(" unmatched"); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } if (match_value.sctp__peer__error__event().ispresent()){ if(!single_value->field_sctp__peer__error__event.match(match_value.sctp__peer__error__event(), legacy)){ TTCN_Logger::log_logmatch_info(".sctp_peer_error_event"); single_value->field_sctp__peer__error__event.log_match(match_value.sctp__peer__error__event(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } else { if (!single_value->field_sctp__peer__error__event.match_omit(legacy)){ TTCN_Logger::log_logmatch_info(".sctp_peer_error_event := omit with "); TTCN_Logger::print_logmatch_buffer(); single_value->field_sctp__peer__error__event.log(); TTCN_Logger::log_event_str(" unmatched"); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } if (match_value.sctp__shutdown__event().ispresent()){ if(!single_value->field_sctp__shutdown__event.match(match_value.sctp__shutdown__event(), legacy)){ TTCN_Logger::log_logmatch_info(".sctp_shutdown_event"); single_value->field_sctp__shutdown__event.log_match(match_value.sctp__shutdown__event(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } else { if (!single_value->field_sctp__shutdown__event.match_omit(legacy)){ TTCN_Logger::log_logmatch_info(".sctp_shutdown_event := omit with "); TTCN_Logger::print_logmatch_buffer(); single_value->field_sctp__shutdown__event.log(); TTCN_Logger::log_event_str(" unmatched"); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } if (match_value.sctp__partial__delivery__event().ispresent()){ if(!single_value->field_sctp__partial__delivery__event.match(match_value.sctp__partial__delivery__event(), legacy)){ TTCN_Logger::log_logmatch_info(".sctp_partial_delivery_event"); single_value->field_sctp__partial__delivery__event.log_match(match_value.sctp__partial__delivery__event(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } else { if (!single_value->field_sctp__partial__delivery__event.match_omit(legacy)){ TTCN_Logger::log_logmatch_info(".sctp_partial_delivery_event := omit with "); TTCN_Logger::print_logmatch_buffer(); single_value->field_sctp__partial__delivery__event.log(); TTCN_Logger::log_event_str(" unmatched"); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } if (match_value.sctp__adaptation__layer__event().ispresent()){ if(!single_value->field_sctp__adaptation__layer__event.match(match_value.sctp__adaptation__layer__event(), legacy)){ TTCN_Logger::log_logmatch_info(".sctp_adaptation_layer_event"); single_value->field_sctp__adaptation__layer__event.log_match(match_value.sctp__adaptation__layer__event(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } else { if (!single_value->field_sctp__adaptation__layer__event.match_omit(legacy)){ TTCN_Logger::log_logmatch_info(".sctp_adaptation_layer_event := omit with "); TTCN_Logger::print_logmatch_buffer(); single_value->field_sctp__adaptation__layer__event.log(); TTCN_Logger::log_event_str(" unmatched"); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } if (match_value.sctp__authentication__event().ispresent()){ if(!single_value->field_sctp__authentication__event.match(match_value.sctp__authentication__event(), legacy)){ TTCN_Logger::log_logmatch_info(".sctp_authentication_event"); single_value->field_sctp__authentication__event.log_match(match_value.sctp__authentication__event(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } else { if (!single_value->field_sctp__authentication__event.match_omit(legacy)){ TTCN_Logger::log_logmatch_info(".sctp_authentication_event := omit with "); TTCN_Logger::print_logmatch_buffer(); single_value->field_sctp__authentication__event.log(); TTCN_Logger::log_event_str(" unmatched"); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } if (match_value.sctp__sender__dry__event().ispresent()){ if(!single_value->field_sctp__sender__dry__event.match(match_value.sctp__sender__dry__event(), legacy)){ TTCN_Logger::log_logmatch_info(".sctp_sender_dry_event"); single_value->field_sctp__sender__dry__event.log_match(match_value.sctp__sender__dry__event(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } else { if (!single_value->field_sctp__sender__dry__event.match_omit(legacy)){ TTCN_Logger::log_logmatch_info(".sctp_sender_dry_event := omit with "); TTCN_Logger::print_logmatch_buffer(); single_value->field_sctp__sender__dry__event.log(); TTCN_Logger::log_event_str(" unmatched"); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } }else { TTCN_Logger::print_logmatch_buffer(); match_value.log(); TTCN_Logger::log_event_str(" with "); log(); TTCN_Logger::log_event_str(" unmatched"); } } return; } if (template_selection == SPECIFIC_VALUE) { TTCN_Logger::log_event_str("{ sctp_data_io_event := "); if (match_value.sctp__data__io__event().ispresent()) { single_value->field_sctp__data__io__event.log_match(match_value.sctp__data__io__event(), legacy); } else { TTCN_Logger::log_event_str("omit with "); single_value->field_sctp__data__io__event.log(); if (single_value->field_sctp__data__io__event.match_omit(legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } TTCN_Logger::log_event_str(", sctp_association_event := "); if (match_value.sctp__association__event().ispresent()) { single_value->field_sctp__association__event.log_match(match_value.sctp__association__event(), legacy); } else { TTCN_Logger::log_event_str("omit with "); single_value->field_sctp__association__event.log(); if (single_value->field_sctp__association__event.match_omit(legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } TTCN_Logger::log_event_str(", sctp_address_event := "); if (match_value.sctp__address__event().ispresent()) { single_value->field_sctp__address__event.log_match(match_value.sctp__address__event(), legacy); } else { TTCN_Logger::log_event_str("omit with "); single_value->field_sctp__address__event.log(); if (single_value->field_sctp__address__event.match_omit(legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } TTCN_Logger::log_event_str(", sctp_send_failure_event := "); if (match_value.sctp__send__failure__event().ispresent()) { single_value->field_sctp__send__failure__event.log_match(match_value.sctp__send__failure__event(), legacy); } else { TTCN_Logger::log_event_str("omit with "); single_value->field_sctp__send__failure__event.log(); if (single_value->field_sctp__send__failure__event.match_omit(legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } TTCN_Logger::log_event_str(", sctp_peer_error_event := "); if (match_value.sctp__peer__error__event().ispresent()) { single_value->field_sctp__peer__error__event.log_match(match_value.sctp__peer__error__event(), legacy); } else { TTCN_Logger::log_event_str("omit with "); single_value->field_sctp__peer__error__event.log(); if (single_value->field_sctp__peer__error__event.match_omit(legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } TTCN_Logger::log_event_str(", sctp_shutdown_event := "); if (match_value.sctp__shutdown__event().ispresent()) { single_value->field_sctp__shutdown__event.log_match(match_value.sctp__shutdown__event(), legacy); } else { TTCN_Logger::log_event_str("omit with "); single_value->field_sctp__shutdown__event.log(); if (single_value->field_sctp__shutdown__event.match_omit(legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } TTCN_Logger::log_event_str(", sctp_partial_delivery_event := "); if (match_value.sctp__partial__delivery__event().ispresent()) { single_value->field_sctp__partial__delivery__event.log_match(match_value.sctp__partial__delivery__event(), legacy); } else { TTCN_Logger::log_event_str("omit with "); single_value->field_sctp__partial__delivery__event.log(); if (single_value->field_sctp__partial__delivery__event.match_omit(legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } TTCN_Logger::log_event_str(", sctp_adaptation_layer_event := "); if (match_value.sctp__adaptation__layer__event().ispresent()) { single_value->field_sctp__adaptation__layer__event.log_match(match_value.sctp__adaptation__layer__event(), legacy); } else { TTCN_Logger::log_event_str("omit with "); single_value->field_sctp__adaptation__layer__event.log(); if (single_value->field_sctp__adaptation__layer__event.match_omit(legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } TTCN_Logger::log_event_str(", sctp_authentication_event := "); if (match_value.sctp__authentication__event().ispresent()) { single_value->field_sctp__authentication__event.log_match(match_value.sctp__authentication__event(), legacy); } else { TTCN_Logger::log_event_str("omit with "); single_value->field_sctp__authentication__event.log(); if (single_value->field_sctp__authentication__event.match_omit(legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } TTCN_Logger::log_event_str(", sctp_sender_dry_event := "); if (match_value.sctp__sender__dry__event().ispresent()) { single_value->field_sctp__sender__dry__event.log_match(match_value.sctp__sender__dry__event(), legacy); } else { TTCN_Logger::log_event_str("omit with "); single_value->field_sctp__sender__dry__event.log(); if (single_value->field_sctp__sender__dry__event.match_omit(legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } TTCN_Logger::log_event_str(" }"); } else { match_value.log(); TTCN_Logger::log_event_str(" with "); log(); if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } } void SctpEventHandle_template::encode_text(Text_Buf& text_buf) const { encode_text_base(text_buf); switch (template_selection) { case SPECIFIC_VALUE: single_value->field_sctp__data__io__event.encode_text(text_buf); single_value->field_sctp__association__event.encode_text(text_buf); single_value->field_sctp__address__event.encode_text(text_buf); single_value->field_sctp__send__failure__event.encode_text(text_buf); single_value->field_sctp__peer__error__event.encode_text(text_buf); single_value->field_sctp__shutdown__event.encode_text(text_buf); single_value->field_sctp__partial__delivery__event.encode_text(text_buf); single_value->field_sctp__adaptation__layer__event.encode_text(text_buf); single_value->field_sctp__authentication__event.encode_text(text_buf); single_value->field_sctp__sender__dry__event.encode_text(text_buf); case OMIT_VALUE: case ANY_VALUE: case ANY_OR_OMIT: break; case VALUE_LIST: case COMPLEMENTED_LIST: text_buf.push_int(value_list.n_values); for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) value_list.list_value[list_count].encode_text(text_buf); break; default: TTCN_error("Text encoder: Encoding an uninitialized/unsupported template of type @IPL4asp_Types.SctpEventHandle."); } } void SctpEventHandle_template::decode_text(Text_Buf& text_buf) { clean_up(); decode_text_base(text_buf); switch (template_selection) { case SPECIFIC_VALUE: single_value = new single_value_struct; single_value->field_sctp__data__io__event.decode_text(text_buf); single_value->field_sctp__association__event.decode_text(text_buf); single_value->field_sctp__address__event.decode_text(text_buf); single_value->field_sctp__send__failure__event.decode_text(text_buf); single_value->field_sctp__peer__error__event.decode_text(text_buf); single_value->field_sctp__shutdown__event.decode_text(text_buf); single_value->field_sctp__partial__delivery__event.decode_text(text_buf); single_value->field_sctp__adaptation__layer__event.decode_text(text_buf); single_value->field_sctp__authentication__event.decode_text(text_buf); single_value->field_sctp__sender__dry__event.decode_text(text_buf); case OMIT_VALUE: case ANY_VALUE: case ANY_OR_OMIT: break; case VALUE_LIST: case COMPLEMENTED_LIST: value_list.n_values = text_buf.pull_int().get_val(); value_list.list_value = new SctpEventHandle_template[value_list.n_values]; for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) value_list.list_value[list_count].decode_text(text_buf); break; default: TTCN_error("Text decoder: An unknown/unsupported selection was received in a template of type @IPL4asp_Types.SctpEventHandle."); } } void SctpEventHandle_template::set_param(Module_Param& param) { param.basic_check(Module_Param::BC_TEMPLATE, "record template"); switch (param.get_type()) { case Module_Param::MP_Omit: *this = OMIT_VALUE; break; case Module_Param::MP_Any: *this = ANY_VALUE; break; case Module_Param::MP_AnyOrNone: *this = ANY_OR_OMIT; break; case Module_Param::MP_List_Template: case Module_Param::MP_ComplementList_Template: case Module_Param::MP_ConjunctList_Template: { SctpEventHandle_template new_temp; new_temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (param.get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), param.get_size()); for (size_t p_i=0; p_i0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) sctp__data__io__event().set_param(*param.get_elem(0)); if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) sctp__association__event().set_param(*param.get_elem(1)); if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) sctp__address__event().set_param(*param.get_elem(2)); if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) sctp__send__failure__event().set_param(*param.get_elem(3)); if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) sctp__peer__error__event().set_param(*param.get_elem(4)); if (param.get_size()>5 && param.get_elem(5)->get_type()!=Module_Param::MP_NotUsed) sctp__shutdown__event().set_param(*param.get_elem(5)); if (param.get_size()>6 && param.get_elem(6)->get_type()!=Module_Param::MP_NotUsed) sctp__partial__delivery__event().set_param(*param.get_elem(6)); if (param.get_size()>7 && param.get_elem(7)->get_type()!=Module_Param::MP_NotUsed) sctp__adaptation__layer__event().set_param(*param.get_elem(7)); if (param.get_size()>8 && param.get_elem(8)->get_type()!=Module_Param::MP_NotUsed) sctp__authentication__event().set_param(*param.get_elem(8)); if (param.get_size()>9 && param.get_elem(9)->get_type()!=Module_Param::MP_NotUsed) sctp__sender__dry__event().set_param(*param.get_elem(9)); break; case Module_Param::MP_Assignment_List: { Vector value_used(param.get_size()); value_used.resize(param.get_size(), FALSE); for (size_t val_idx=0; val_idxget_id()->get_name(), "sctp_data_io_event")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { sctp__data__io__event().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "sctp_association_event")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { sctp__association__event().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "sctp_address_event")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { sctp__address__event().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "sctp_send_failure_event")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { sctp__send__failure__event().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "sctp_peer_error_event")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { sctp__peer__error__event().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "sctp_shutdown_event")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { sctp__shutdown__event().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "sctp_partial_delivery_event")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { sctp__partial__delivery__event().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "sctp_adaptation_layer_event")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { sctp__adaptation__layer__event().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "sctp_authentication_event")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { sctp__authentication__event().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "sctp_sender_dry_event")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { sctp__sender__dry__event().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxerror("Non existent field name in type @IPL4asp_Types.SctpEventHandle: %s", curr_param->get_id()->get_name()); break; } } break; case Module_Param::MP_Implication_Template: { SctpEventHandle_template* precondition = new SctpEventHandle_template; precondition->set_param(*param.get_elem(0)); SctpEventHandle_template* implied_template = new SctpEventHandle_template; implied_template->set_param(*param.get_elem(1)); *this = SctpEventHandle_template(precondition, implied_template); } break; default: param.type_error("record template", "@IPL4asp_Types.SctpEventHandle"); } is_ifpresent = param.get_ifpresent(); } void SctpEventHandle_template::check_restriction(template_res t_res, const char* t_name, boolean legacy) const { if (template_selection==UNINITIALIZED_TEMPLATE) return; switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) { case TR_OMIT: if (template_selection==OMIT_VALUE) return; case TR_VALUE: if (template_selection!=SPECIFIC_VALUE || is_ifpresent) break; single_value->field_sctp__data__io__event.check_restriction(t_res, t_name ? t_name : "@IPL4asp_Types.SctpEventHandle"); single_value->field_sctp__association__event.check_restriction(t_res, t_name ? t_name : "@IPL4asp_Types.SctpEventHandle"); single_value->field_sctp__address__event.check_restriction(t_res, t_name ? t_name : "@IPL4asp_Types.SctpEventHandle"); single_value->field_sctp__send__failure__event.check_restriction(t_res, t_name ? t_name : "@IPL4asp_Types.SctpEventHandle"); single_value->field_sctp__peer__error__event.check_restriction(t_res, t_name ? t_name : "@IPL4asp_Types.SctpEventHandle"); single_value->field_sctp__shutdown__event.check_restriction(t_res, t_name ? t_name : "@IPL4asp_Types.SctpEventHandle"); single_value->field_sctp__partial__delivery__event.check_restriction(t_res, t_name ? t_name : "@IPL4asp_Types.SctpEventHandle"); single_value->field_sctp__adaptation__layer__event.check_restriction(t_res, t_name ? t_name : "@IPL4asp_Types.SctpEventHandle"); single_value->field_sctp__authentication__event.check_restriction(t_res, t_name ? t_name : "@IPL4asp_Types.SctpEventHandle"); single_value->field_sctp__sender__dry__event.check_restriction(t_res, t_name ? t_name : "@IPL4asp_Types.SctpEventHandle"); return; case TR_PRESENT: if (!match_omit(legacy)) return; break; default: return; } TTCN_error("Restriction `%s' on template of type %s violated.", get_res_name(t_res), t_name ? t_name : "@IPL4asp_Types.SctpEventHandle"); } boolean SctpEventHandle_template::is_present(boolean legacy) const { if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE; return !match_omit(legacy); } boolean SctpEventHandle_template::match_omit(boolean legacy) const { if (is_ifpresent) return TRUE; switch (template_selection) { case OMIT_VALUE: case ANY_OR_OMIT: return TRUE; case IMPLICATION_MATCH: return !implication_.precondition->match_omit() || implication_.implied_template->match_omit(); case VALUE_LIST: case COMPLEMENTED_LIST: if (legacy) { for (unsigned int l_idx=0; l_idx0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) l__onoff().set_param(*param.get_elem(0)); if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) l__linger().set_param(*param.get_elem(1)); break; case Module_Param::MP_Assignment_List: { Vector value_used(param.get_size()); value_used.resize(param.get_size(), FALSE); for (size_t val_idx=0; val_idxget_id()->get_name(), "l_onoff")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { l__onoff().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "l_linger")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { l__linger().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxerror("Non existent field name in type @IPL4asp_Types.Linger_opt: %s", curr_param->get_id()->get_name()); break; } } break; default: param.type_error("record value", "@IPL4asp_Types.Linger_opt"); } } void Linger__opt::encode_text(Text_Buf& text_buf) const { field_l__onoff.encode_text(text_buf); field_l__linger.encode_text(text_buf); } void Linger__opt::decode_text(Text_Buf& text_buf) { field_l__onoff.decode_text(text_buf); field_l__linger.decode_text(text_buf); } struct Linger__opt_template::single_value_struct { INTEGER_template field_l__onoff; INTEGER_template field_l__linger; }; void Linger__opt_template::set_specific() { if (template_selection != SPECIFIC_VALUE) { template_sel old_selection = template_selection; clean_up(); single_value = new single_value_struct; set_selection(SPECIFIC_VALUE); if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) { single_value->field_l__onoff = ANY_VALUE; single_value->field_l__linger = ANY_VALUE; } } } void Linger__opt_template::copy_value(const Linger__opt& other_value) { single_value = new single_value_struct; if (other_value.l__onoff().is_bound()) { single_value->field_l__onoff = other_value.l__onoff(); } else { single_value->field_l__onoff.clean_up(); } if (other_value.l__linger().is_bound()) { single_value->field_l__linger = other_value.l__linger(); } else { single_value->field_l__linger.clean_up(); } set_selection(SPECIFIC_VALUE); } void Linger__opt_template::copy_template(const Linger__opt_template& other_value) { switch (other_value.template_selection) { case SPECIFIC_VALUE: single_value = new single_value_struct; if (UNINITIALIZED_TEMPLATE != other_value.l__onoff().get_selection()) { single_value->field_l__onoff = other_value.l__onoff(); } else { single_value->field_l__onoff.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.l__linger().get_selection()) { single_value->field_l__linger = other_value.l__linger(); } else { single_value->field_l__linger.clean_up(); } case OMIT_VALUE: case ANY_VALUE: case ANY_OR_OMIT: break; case VALUE_LIST: case COMPLEMENTED_LIST: case CONJUNCTION_MATCH: value_list.n_values = other_value.value_list.n_values; value_list.list_value = new Linger__opt_template[value_list.n_values]; for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) value_list.list_value[list_count].copy_template(other_value.value_list.list_value[list_count]); break; case IMPLICATION_MATCH: implication_.precondition = new Linger__opt_template(*other_value.implication_.precondition); implication_.implied_template = new Linger__opt_template(*other_value.implication_.implied_template); break; case DYNAMIC_MATCH: dyn_match = other_value.dyn_match; dyn_match->ref_count++; break; default: TTCN_error("Copying an uninitialized/unsupported template of type @IPL4asp_Types.Linger_opt."); break; } set_selection(other_value); } Linger__opt_template::Linger__opt_template() { } Linger__opt_template::Linger__opt_template(template_sel other_value) : Base_Template(other_value) { check_single_selection(other_value); } Linger__opt_template::Linger__opt_template(const Linger__opt& other_value) { copy_value(other_value); } Linger__opt_template::Linger__opt_template(const OPTIONAL& other_value) { switch (other_value.get_selection()) { case OPTIONAL_PRESENT: copy_value((const Linger__opt&)other_value); break; case OPTIONAL_OMIT: set_selection(OMIT_VALUE); break; default: TTCN_error("Creating a template of type @IPL4asp_Types.Linger_opt from an unbound optional field."); } } Linger__opt_template::Linger__opt_template(Linger__opt_template* p_precondition, Linger__opt_template* p_implied_template) : Base_Template(IMPLICATION_MATCH) { implication_.precondition = p_precondition; implication_.implied_template = p_implied_template; } Linger__opt_template::Linger__opt_template(Dynamic_Match_Interface* p_dyn_match) : Base_Template(DYNAMIC_MATCH) { dyn_match = new dynmatch_struct; dyn_match->ptr = p_dyn_match; dyn_match->ref_count = 1; } Linger__opt_template::Linger__opt_template(const Linger__opt_template& other_value) : Base_Template() { copy_template(other_value); } Linger__opt_template::~Linger__opt_template() { clean_up(); } Linger__opt_template& Linger__opt_template::operator=(template_sel other_value) { check_single_selection(other_value); clean_up(); set_selection(other_value); return *this; } Linger__opt_template& Linger__opt_template::operator=(const Linger__opt& other_value) { clean_up(); copy_value(other_value); return *this; } Linger__opt_template& Linger__opt_template::operator=(const OPTIONAL& other_value) { clean_up(); switch (other_value.get_selection()) { case OPTIONAL_PRESENT: copy_value((const Linger__opt&)other_value); break; case OPTIONAL_OMIT: set_selection(OMIT_VALUE); break; default: TTCN_error("Assignment of an unbound optional field to a template of type @IPL4asp_Types.Linger_opt."); } return *this; } Linger__opt_template& Linger__opt_template::operator=(const Linger__opt_template& other_value) { if (&other_value != this) { clean_up(); copy_template(other_value); } return *this; } boolean Linger__opt_template::match(const Linger__opt& other_value, boolean legacy) const { if (!other_value.is_bound()) return FALSE; switch (template_selection) { case ANY_VALUE: case ANY_OR_OMIT: return TRUE; case OMIT_VALUE: return FALSE; case SPECIFIC_VALUE: if(!other_value.l__onoff().is_bound()) return FALSE; if(!single_value->field_l__onoff.match(other_value.l__onoff(), legacy))return FALSE; if(!other_value.l__linger().is_bound()) return FALSE; if(!single_value->field_l__linger.match(other_value.l__linger(), legacy))return FALSE; return TRUE; case VALUE_LIST: case COMPLEMENTED_LIST: for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST; return template_selection == COMPLEMENTED_LIST; case CONJUNCTION_MATCH: for (unsigned int i = 0; i < value_list.n_values; i++) { if (!value_list.list_value[i].match(other_value)) { return FALSE; } } return TRUE; case IMPLICATION_MATCH: return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value); case DYNAMIC_MATCH: return dyn_match->ptr->match(other_value); default: TTCN_error("Matching an uninitialized/unsupported template of type @IPL4asp_Types.Linger_opt."); } return FALSE; } boolean Linger__opt_template::is_bound() const { if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE; if (template_selection != SPECIFIC_VALUE) return TRUE; return single_value->field_l__onoff.is_bound() || single_value->field_l__linger.is_bound(); } boolean Linger__opt_template::is_value() const { if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE; return single_value->field_l__onoff.is_value() && single_value->field_l__linger.is_value(); } void Linger__opt_template::clean_up() { switch (template_selection) { case SPECIFIC_VALUE: delete single_value; break; case VALUE_LIST: case COMPLEMENTED_LIST: case CONJUNCTION_MATCH: delete [] value_list.list_value; break; case IMPLICATION_MATCH: delete implication_.precondition; delete implication_.implied_template; break; case DYNAMIC_MATCH: dyn_match->ref_count--; if (dyn_match->ref_count == 0) { delete dyn_match->ptr; delete dyn_match; } break; default: break; } template_selection = UNINITIALIZED_TEMPLATE; } Linger__opt Linger__opt_template::valueof() const { if (template_selection != SPECIFIC_VALUE || is_ifpresent) TTCN_error("Performing a valueof or send operation on a non-specific template of type @IPL4asp_Types.Linger_opt."); Linger__opt ret_val; if (single_value->field_l__onoff.is_bound()) { ret_val.l__onoff() = single_value->field_l__onoff.valueof(); } if (single_value->field_l__linger.is_bound()) { ret_val.l__linger() = single_value->field_l__linger.valueof(); } return ret_val; } void Linger__opt_template::set_type(template_sel template_type, unsigned int list_length) { if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST&& template_type != CONJUNCTION_MATCH) TTCN_error("Setting an invalid list for a template of type @IPL4asp_Types.Linger_opt."); clean_up(); set_selection(template_type); value_list.n_values = list_length; value_list.list_value = new Linger__opt_template[list_length]; } Linger__opt_template& Linger__opt_template::list_item(unsigned int list_index) const { if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST&& template_selection != CONJUNCTION_MATCH) TTCN_error("Accessing a list element of a non-list template of type @IPL4asp_Types.Linger_opt."); if (list_index >= value_list.n_values) TTCN_error("Index overflow in a value list template of type @IPL4asp_Types.Linger_opt."); return value_list.list_value[list_index]; } INTEGER_template& Linger__opt_template::l__onoff() { set_specific(); return single_value->field_l__onoff; } const INTEGER_template& Linger__opt_template::l__onoff() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field l_onoff of a non-specific template of type @IPL4asp_Types.Linger_opt."); return single_value->field_l__onoff; } INTEGER_template& Linger__opt_template::l__linger() { set_specific(); return single_value->field_l__linger; } const INTEGER_template& Linger__opt_template::l__linger() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field l_linger of a non-specific template of type @IPL4asp_Types.Linger_opt."); return single_value->field_l__linger; } int Linger__opt_template::size_of() const { if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @IPL4asp_Types.Linger_opt which has an ifpresent attribute."); switch (template_selection) { case SPECIFIC_VALUE: return 2; case VALUE_LIST: { if (value_list.n_values<1) TTCN_error("Internal error: Performing sizeof() operation on a template of type @IPL4asp_Types.Linger_opt containing an empty list."); int item_size = value_list.list_value[0].size_of(); for (unsigned int l_idx = 1; l_idx < value_list.n_values; l_idx++) { if (value_list.list_value[l_idx].size_of()!=item_size) TTCN_error("Performing sizeof() operation on a template of type @IPL4asp_Types.Linger_opt containing a value list with different sizes."); } return item_size; } case OMIT_VALUE: TTCN_error("Performing sizeof() operation on a template of type @IPL4asp_Types.Linger_opt containing omit value."); case ANY_VALUE: case ANY_OR_OMIT: TTCN_error("Performing sizeof() operation on a template of type @IPL4asp_Types.Linger_opt containing */? value."); case COMPLEMENTED_LIST: TTCN_error("Performing sizeof() operation on a template of type @IPL4asp_Types.Linger_opt containing complemented list."); case CONJUNCTION_MATCH: TTCN_error("Performing sizeof() operation on a template of type @IPL4asp_Types.Linger_opt containing a conjunction list match."); case IMPLICATION_MATCH: TTCN_error("Performing sizeof() operation on a template of type @IPL4asp_Types.Linger_opt containing an implication match."); case DYNAMIC_MATCH: TTCN_error("Performing sizeof() operation on a template of type @IPL4asp_Types.Linger_opt containing a dynamic match."); default: TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @IPL4asp_Types.Linger_opt."); } return 0; } void Linger__opt_template::log() const { switch (template_selection) { case SPECIFIC_VALUE: TTCN_Logger::log_event_str("{ l_onoff := "); single_value->field_l__onoff.log(); TTCN_Logger::log_event_str(", l_linger := "); single_value->field_l__linger.log(); TTCN_Logger::log_event_str(" }"); break; case COMPLEMENTED_LIST: TTCN_Logger::log_event_str("complement"); case CONJUNCTION_MATCH: if (template_selection == CONJUNCTION_MATCH) { TTCN_Logger::log_event_str("conjunct"); } case VALUE_LIST: TTCN_Logger::log_char('('); for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) { if (list_count > 0) TTCN_Logger::log_event_str(", "); value_list.list_value[list_count].log(); } TTCN_Logger::log_char(')'); break; case IMPLICATION_MATCH: implication_.precondition->log(); TTCN_Logger::log_event_str(" implies "); implication_.implied_template->log(); break; case DYNAMIC_MATCH: TTCN_Logger::log_event_str("@dynamic template"); break; default: log_generic(); } log_ifpresent(); } void Linger__opt_template::log_match(const Linger__opt& match_value, boolean legacy) const { if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){ if(match(match_value, legacy)){ TTCN_Logger::print_logmatch_buffer(); TTCN_Logger::log_event_str(" matched"); } else{ if (template_selection == SPECIFIC_VALUE) { size_t previous_size = TTCN_Logger::get_logmatch_buffer_len(); if(!single_value->field_l__onoff.match(match_value.l__onoff(), legacy)){ TTCN_Logger::log_logmatch_info(".l_onoff"); single_value->field_l__onoff.log_match(match_value.l__onoff(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } if(!single_value->field_l__linger.match(match_value.l__linger(), legacy)){ TTCN_Logger::log_logmatch_info(".l_linger"); single_value->field_l__linger.log_match(match_value.l__linger(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } }else { TTCN_Logger::print_logmatch_buffer(); match_value.log(); TTCN_Logger::log_event_str(" with "); log(); TTCN_Logger::log_event_str(" unmatched"); } } return; } if (template_selection == SPECIFIC_VALUE) { TTCN_Logger::log_event_str("{ l_onoff := "); single_value->field_l__onoff.log_match(match_value.l__onoff(), legacy); TTCN_Logger::log_event_str(", l_linger := "); single_value->field_l__linger.log_match(match_value.l__linger(), legacy); TTCN_Logger::log_event_str(" }"); } else { match_value.log(); TTCN_Logger::log_event_str(" with "); log(); if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } } void Linger__opt_template::encode_text(Text_Buf& text_buf) const { encode_text_base(text_buf); switch (template_selection) { case SPECIFIC_VALUE: single_value->field_l__onoff.encode_text(text_buf); single_value->field_l__linger.encode_text(text_buf); case OMIT_VALUE: case ANY_VALUE: case ANY_OR_OMIT: break; case VALUE_LIST: case COMPLEMENTED_LIST: text_buf.push_int(value_list.n_values); for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) value_list.list_value[list_count].encode_text(text_buf); break; default: TTCN_error("Text encoder: Encoding an uninitialized/unsupported template of type @IPL4asp_Types.Linger_opt."); } } void Linger__opt_template::decode_text(Text_Buf& text_buf) { clean_up(); decode_text_base(text_buf); switch (template_selection) { case SPECIFIC_VALUE: single_value = new single_value_struct; single_value->field_l__onoff.decode_text(text_buf); single_value->field_l__linger.decode_text(text_buf); case OMIT_VALUE: case ANY_VALUE: case ANY_OR_OMIT: break; case VALUE_LIST: case COMPLEMENTED_LIST: value_list.n_values = text_buf.pull_int().get_val(); value_list.list_value = new Linger__opt_template[value_list.n_values]; for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) value_list.list_value[list_count].decode_text(text_buf); break; default: TTCN_error("Text decoder: An unknown/unsupported selection was received in a template of type @IPL4asp_Types.Linger_opt."); } } void Linger__opt_template::set_param(Module_Param& param) { param.basic_check(Module_Param::BC_TEMPLATE, "record template"); switch (param.get_type()) { case Module_Param::MP_Omit: *this = OMIT_VALUE; break; case Module_Param::MP_Any: *this = ANY_VALUE; break; case Module_Param::MP_AnyOrNone: *this = ANY_OR_OMIT; break; case Module_Param::MP_List_Template: case Module_Param::MP_ComplementList_Template: case Module_Param::MP_ConjunctList_Template: { Linger__opt_template new_temp; new_temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (param.get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), param.get_size()); for (size_t p_i=0; p_i0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) l__onoff().set_param(*param.get_elem(0)); if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) l__linger().set_param(*param.get_elem(1)); break; case Module_Param::MP_Assignment_List: { Vector value_used(param.get_size()); value_used.resize(param.get_size(), FALSE); for (size_t val_idx=0; val_idxget_id()->get_name(), "l_onoff")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { l__onoff().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "l_linger")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { l__linger().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxerror("Non existent field name in type @IPL4asp_Types.Linger_opt: %s", curr_param->get_id()->get_name()); break; } } break; case Module_Param::MP_Implication_Template: { Linger__opt_template* precondition = new Linger__opt_template; precondition->set_param(*param.get_elem(0)); Linger__opt_template* implied_template = new Linger__opt_template; implied_template->set_param(*param.get_elem(1)); *this = Linger__opt_template(precondition, implied_template); } break; default: param.type_error("record template", "@IPL4asp_Types.Linger_opt"); } is_ifpresent = param.get_ifpresent(); } void Linger__opt_template::check_restriction(template_res t_res, const char* t_name, boolean legacy) const { if (template_selection==UNINITIALIZED_TEMPLATE) return; switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) { case TR_OMIT: if (template_selection==OMIT_VALUE) return; case TR_VALUE: if (template_selection!=SPECIFIC_VALUE || is_ifpresent) break; single_value->field_l__onoff.check_restriction(t_res, t_name ? t_name : "@IPL4asp_Types.Linger_opt"); single_value->field_l__linger.check_restriction(t_res, t_name ? t_name : "@IPL4asp_Types.Linger_opt"); return; case TR_PRESENT: if (!match_omit(legacy)) return; break; default: return; } TTCN_error("Restriction `%s' on template of type %s violated.", get_res_name(t_res), t_name ? t_name : "@IPL4asp_Types.Linger_opt"); } boolean Linger__opt_template::is_present(boolean legacy) const { if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE; return !match_omit(legacy); } boolean Linger__opt_template::match_omit(boolean legacy) const { if (is_ifpresent) return TRUE; switch (template_selection) { case OMIT_VALUE: case ANY_OR_OMIT: return TRUE; case IMPLICATION_MATCH: return !implication_.precondition->match_omit() || implication_.implied_template->match_omit(); case VALUE_LIST: case COMPLEMENTED_LIST: if (legacy) { for (unsigned int l_idx=0; l_idxis_value(); case ALT_SSLv3__supported: return field_SSLv3__supported->is_value(); case ALT_TLSv1__supported: return field_TLSv1__supported->is_value(); case ALT_TLSv1__1__supported: return field_TLSv1__1__supported->is_value(); case ALT_TLSv1__2__supported: return field_TLSv1__2__supported->is_value(); case ALT_DTLSv1__supported: return field_DTLSv1__supported->is_value(); case ALT_DTLSv1__2__supported: return field_DTLSv1__2__supported->is_value(); default: TTCN_error("Invalid selection in union is_bound");} } void SSL__protocols::clean_up() { switch (union_selection) { case ALT_SSLv2__supported: delete field_SSLv2__supported; break; case ALT_SSLv3__supported: delete field_SSLv3__supported; break; case ALT_TLSv1__supported: delete field_TLSv1__supported; break; case ALT_TLSv1__1__supported: delete field_TLSv1__1__supported; break; case ALT_TLSv1__2__supported: delete field_TLSv1__2__supported; break; case ALT_DTLSv1__supported: delete field_DTLSv1__supported; break; case ALT_DTLSv1__2__supported: delete field_DTLSv1__2__supported; break; default: break; } union_selection = UNBOUND_VALUE; } void SSL__protocols::log() const { switch (union_selection) { case ALT_SSLv2__supported: TTCN_Logger::log_event_str("{ SSLv2_supported := "); field_SSLv2__supported->log(); TTCN_Logger::log_event_str(" }"); break; case ALT_SSLv3__supported: TTCN_Logger::log_event_str("{ SSLv3_supported := "); field_SSLv3__supported->log(); TTCN_Logger::log_event_str(" }"); break; case ALT_TLSv1__supported: TTCN_Logger::log_event_str("{ TLSv1_supported := "); field_TLSv1__supported->log(); TTCN_Logger::log_event_str(" }"); break; case ALT_TLSv1__1__supported: TTCN_Logger::log_event_str("{ TLSv1_1_supported := "); field_TLSv1__1__supported->log(); TTCN_Logger::log_event_str(" }"); break; case ALT_TLSv1__2__supported: TTCN_Logger::log_event_str("{ TLSv1_2_supported := "); field_TLSv1__2__supported->log(); TTCN_Logger::log_event_str(" }"); break; case ALT_DTLSv1__supported: TTCN_Logger::log_event_str("{ DTLSv1_supported := "); field_DTLSv1__supported->log(); TTCN_Logger::log_event_str(" }"); break; case ALT_DTLSv1__2__supported: TTCN_Logger::log_event_str("{ DTLSv1_2_supported := "); field_DTLSv1__2__supported->log(); TTCN_Logger::log_event_str(" }"); break; default: TTCN_Logger::log_event_unbound(); } } void SSL__protocols::set_param(Module_Param& param) { param.basic_check(Module_Param::BC_VALUE, "union value"); Module_Param_Ptr m_p = ¶m; if (m_p->get_type()==Module_Param::MP_Value_List && m_p->get_size()==0) return; if (m_p->get_type()!=Module_Param::MP_Assignment_List) { param.error("union value with field name was expected"); } Module_Param* mp_last = m_p->get_elem(m_p->get_size()-1); char* last_name = mp_last->get_id()->get_name(); if (!strcmp(last_name, "SSLv2_supported")) { SSLv2__supported().set_param(*mp_last); if (!SSLv2__supported().is_bound()) clean_up(); return; } if (!strcmp(last_name, "SSLv3_supported")) { SSLv3__supported().set_param(*mp_last); if (!SSLv3__supported().is_bound()) clean_up(); return; } if (!strcmp(last_name, "TLSv1_supported")) { TLSv1__supported().set_param(*mp_last); if (!TLSv1__supported().is_bound()) clean_up(); return; } if (!strcmp(last_name, "TLSv1_1_supported")) { TLSv1__1__supported().set_param(*mp_last); if (!TLSv1__1__supported().is_bound()) clean_up(); return; } if (!strcmp(last_name, "TLSv1_2_supported")) { TLSv1__2__supported().set_param(*mp_last); if (!TLSv1__2__supported().is_bound()) clean_up(); return; } if (!strcmp(last_name, "DTLSv1_supported")) { DTLSv1__supported().set_param(*mp_last); if (!DTLSv1__supported().is_bound()) clean_up(); return; } if (!strcmp(last_name, "DTLSv1_2_supported")) { DTLSv1__2__supported().set_param(*mp_last); if (!DTLSv1__2__supported().is_bound()) clean_up(); return; } mp_last->error("Field %s does not exist in type @IPL4asp_Types.SSL_protocols.", last_name); } void SSL__protocols::set_implicit_omit() { switch (union_selection) { case ALT_SSLv2__supported: field_SSLv2__supported->set_implicit_omit(); break; case ALT_SSLv3__supported: field_SSLv3__supported->set_implicit_omit(); break; case ALT_TLSv1__supported: field_TLSv1__supported->set_implicit_omit(); break; case ALT_TLSv1__1__supported: field_TLSv1__1__supported->set_implicit_omit(); break; case ALT_TLSv1__2__supported: field_TLSv1__2__supported->set_implicit_omit(); break; case ALT_DTLSv1__supported: field_DTLSv1__supported->set_implicit_omit(); break; case ALT_DTLSv1__2__supported: field_DTLSv1__2__supported->set_implicit_omit(); break; default: break; } } void SSL__protocols::encode_text(Text_Buf& text_buf) const { text_buf.push_int(union_selection); switch (union_selection) { case ALT_SSLv2__supported: field_SSLv2__supported->encode_text(text_buf); break; case ALT_SSLv3__supported: field_SSLv3__supported->encode_text(text_buf); break; case ALT_TLSv1__supported: field_TLSv1__supported->encode_text(text_buf); break; case ALT_TLSv1__1__supported: field_TLSv1__1__supported->encode_text(text_buf); break; case ALT_TLSv1__2__supported: field_TLSv1__2__supported->encode_text(text_buf); break; case ALT_DTLSv1__supported: field_DTLSv1__supported->encode_text(text_buf); break; case ALT_DTLSv1__2__supported: field_DTLSv1__2__supported->encode_text(text_buf); break; default: TTCN_error("Text encoder: Encoding an unbound value of union type @IPL4asp_Types.SSL_protocols."); } } void SSL__protocols::decode_text(Text_Buf& text_buf) { switch ((union_selection_type)text_buf.pull_int().get_val()) { case ALT_SSLv2__supported: SSLv2__supported().decode_text(text_buf); break; case ALT_SSLv3__supported: SSLv3__supported().decode_text(text_buf); break; case ALT_TLSv1__supported: TLSv1__supported().decode_text(text_buf); break; case ALT_TLSv1__1__supported: TLSv1__1__supported().decode_text(text_buf); break; case ALT_TLSv1__2__supported: TLSv1__2__supported().decode_text(text_buf); break; case ALT_DTLSv1__supported: DTLSv1__supported().decode_text(text_buf); break; case ALT_DTLSv1__2__supported: DTLSv1__2__supported().decode_text(text_buf); break; default: TTCN_error("Text decoder: Unrecognized union selector was received for type @IPL4asp_Types.SSL_protocols."); } } void SSL__protocols_template::copy_value(const SSL__protocols& other_value) { single_value.union_selection = other_value.get_selection(); switch (single_value.union_selection) { case SSL__protocols::ALT_SSLv2__supported: single_value.field_SSLv2__supported = new BOOLEAN_template(other_value.SSLv2__supported()); break; case SSL__protocols::ALT_SSLv3__supported: single_value.field_SSLv3__supported = new BOOLEAN_template(other_value.SSLv3__supported()); break; case SSL__protocols::ALT_TLSv1__supported: single_value.field_TLSv1__supported = new BOOLEAN_template(other_value.TLSv1__supported()); break; case SSL__protocols::ALT_TLSv1__1__supported: single_value.field_TLSv1__1__supported = new BOOLEAN_template(other_value.TLSv1__1__supported()); break; case SSL__protocols::ALT_TLSv1__2__supported: single_value.field_TLSv1__2__supported = new BOOLEAN_template(other_value.TLSv1__2__supported()); break; case SSL__protocols::ALT_DTLSv1__supported: single_value.field_DTLSv1__supported = new BOOLEAN_template(other_value.DTLSv1__supported()); break; case SSL__protocols::ALT_DTLSv1__2__supported: single_value.field_DTLSv1__2__supported = new BOOLEAN_template(other_value.DTLSv1__2__supported()); break; default: TTCN_error("Initializing a template with an unbound value of type @IPL4asp_Types.SSL_protocols."); } set_selection(SPECIFIC_VALUE); } void SSL__protocols_template::copy_template(const SSL__protocols_template& other_value) { switch (other_value.template_selection) { case SPECIFIC_VALUE: single_value.union_selection = other_value.single_value.union_selection; switch (single_value.union_selection) { case SSL__protocols::ALT_SSLv2__supported: single_value.field_SSLv2__supported = new BOOLEAN_template(*other_value.single_value.field_SSLv2__supported); break; case SSL__protocols::ALT_SSLv3__supported: single_value.field_SSLv3__supported = new BOOLEAN_template(*other_value.single_value.field_SSLv3__supported); break; case SSL__protocols::ALT_TLSv1__supported: single_value.field_TLSv1__supported = new BOOLEAN_template(*other_value.single_value.field_TLSv1__supported); break; case SSL__protocols::ALT_TLSv1__1__supported: single_value.field_TLSv1__1__supported = new BOOLEAN_template(*other_value.single_value.field_TLSv1__1__supported); break; case SSL__protocols::ALT_TLSv1__2__supported: single_value.field_TLSv1__2__supported = new BOOLEAN_template(*other_value.single_value.field_TLSv1__2__supported); break; case SSL__protocols::ALT_DTLSv1__supported: single_value.field_DTLSv1__supported = new BOOLEAN_template(*other_value.single_value.field_DTLSv1__supported); break; case SSL__protocols::ALT_DTLSv1__2__supported: single_value.field_DTLSv1__2__supported = new BOOLEAN_template(*other_value.single_value.field_DTLSv1__2__supported); break; default: TTCN_error("Internal error: Invalid union selector in a specific value when copying a template of type @IPL4asp_Types.SSL_protocols."); } case OMIT_VALUE: case ANY_VALUE: case ANY_OR_OMIT: break; case VALUE_LIST: case COMPLEMENTED_LIST: case CONJUNCTION_MATCH: value_list.n_values = other_value.value_list.n_values; value_list.list_value = new SSL__protocols_template[value_list.n_values]; for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) value_list.list_value[list_count].copy_template(other_value.value_list.list_value[list_count]); break; case IMPLICATION_MATCH: implication_.precondition = new SSL__protocols_template(*other_value.implication_.precondition); implication_.implied_template = new SSL__protocols_template(*other_value.implication_.implied_template); break; case DYNAMIC_MATCH: dyn_match = other_value.dyn_match; dyn_match->ref_count++; break; default: TTCN_error("Copying an uninitialized template of union type @IPL4asp_Types.SSL_protocols."); } set_selection(other_value); } SSL__protocols_template::SSL__protocols_template() { } SSL__protocols_template::SSL__protocols_template(template_sel other_value) : Base_Template(other_value) { check_single_selection(other_value); } SSL__protocols_template::SSL__protocols_template(const SSL__protocols& other_value) { copy_value(other_value); } SSL__protocols_template::SSL__protocols_template(const OPTIONAL& other_value) { switch (other_value.get_selection()) { case OPTIONAL_PRESENT: copy_value((const SSL__protocols&)other_value); break; case OPTIONAL_OMIT: set_selection(OMIT_VALUE); break; default: TTCN_error("Creating a template of union type @IPL4asp_Types.SSL_protocols from an unbound optional field."); } } SSL__protocols_template::SSL__protocols_template(SSL__protocols_template* p_precondition, SSL__protocols_template* p_implied_template) : Base_Template(IMPLICATION_MATCH) { implication_.precondition = p_precondition; implication_.implied_template = p_implied_template; } SSL__protocols_template::SSL__protocols_template(Dynamic_Match_Interface* p_dyn_match) : Base_Template(DYNAMIC_MATCH) { dyn_match = new dynmatch_struct; dyn_match->ptr = p_dyn_match; dyn_match->ref_count = 1; } SSL__protocols_template::SSL__protocols_template(const SSL__protocols_template& other_value) : Base_Template(){ copy_template(other_value); } SSL__protocols_template::~SSL__protocols_template() { clean_up(); } void SSL__protocols_template::clean_up() { switch (template_selection) { case SPECIFIC_VALUE: switch (single_value.union_selection) { case SSL__protocols::ALT_SSLv2__supported: delete single_value.field_SSLv2__supported; break; case SSL__protocols::ALT_SSLv3__supported: delete single_value.field_SSLv3__supported; break; case SSL__protocols::ALT_TLSv1__supported: delete single_value.field_TLSv1__supported; break; case SSL__protocols::ALT_TLSv1__1__supported: delete single_value.field_TLSv1__1__supported; break; case SSL__protocols::ALT_TLSv1__2__supported: delete single_value.field_TLSv1__2__supported; break; case SSL__protocols::ALT_DTLSv1__supported: delete single_value.field_DTLSv1__supported; break; case SSL__protocols::ALT_DTLSv1__2__supported: delete single_value.field_DTLSv1__2__supported; default: break; } break; case VALUE_LIST: case COMPLEMENTED_LIST: case CONJUNCTION_MATCH: delete [] value_list.list_value; break; case IMPLICATION_MATCH: delete implication_.precondition; delete implication_.implied_template; break; case DYNAMIC_MATCH: dyn_match->ref_count--; if (dyn_match->ref_count == 0) { delete dyn_match->ptr; delete dyn_match; } break; default: break; } template_selection = UNINITIALIZED_TEMPLATE; } SSL__protocols_template& SSL__protocols_template::operator=(template_sel other_value) { check_single_selection(other_value); clean_up(); set_selection(other_value); return *this; } SSL__protocols_template& SSL__protocols_template::operator=(const SSL__protocols& other_value) { clean_up(); copy_value(other_value); return *this; } SSL__protocols_template& SSL__protocols_template::operator=(const OPTIONAL& other_value) { clean_up(); switch (other_value.get_selection()) { case OPTIONAL_PRESENT: copy_value((const SSL__protocols&)other_value); break; case OPTIONAL_OMIT: set_selection(OMIT_VALUE); break; default: TTCN_error("Assignment of an unbound optional field to a template of union type @IPL4asp_Types.SSL_protocols."); } return *this; } SSL__protocols_template& SSL__protocols_template::operator=(const SSL__protocols_template& other_value) { if (&other_value != this) { clean_up(); copy_template(other_value); } return *this; } boolean SSL__protocols_template::match(const SSL__protocols& other_value, boolean legacy) const { if (!other_value.is_bound()) return FALSE; switch (template_selection) { case ANY_VALUE: case ANY_OR_OMIT: return TRUE; case OMIT_VALUE: return FALSE; case SPECIFIC_VALUE: { SSL__protocols::union_selection_type value_selection = other_value.get_selection(); if (value_selection == SSL__protocols::UNBOUND_VALUE) return FALSE; if (value_selection != single_value.union_selection) return FALSE; switch (value_selection) { case SSL__protocols::ALT_SSLv2__supported: return single_value.field_SSLv2__supported->match(other_value.SSLv2__supported(), legacy); case SSL__protocols::ALT_SSLv3__supported: return single_value.field_SSLv3__supported->match(other_value.SSLv3__supported(), legacy); case SSL__protocols::ALT_TLSv1__supported: return single_value.field_TLSv1__supported->match(other_value.TLSv1__supported(), legacy); case SSL__protocols::ALT_TLSv1__1__supported: return single_value.field_TLSv1__1__supported->match(other_value.TLSv1__1__supported(), legacy); case SSL__protocols::ALT_TLSv1__2__supported: return single_value.field_TLSv1__2__supported->match(other_value.TLSv1__2__supported(), legacy); case SSL__protocols::ALT_DTLSv1__supported: return single_value.field_DTLSv1__supported->match(other_value.DTLSv1__supported(), legacy); case SSL__protocols::ALT_DTLSv1__2__supported: return single_value.field_DTLSv1__2__supported->match(other_value.DTLSv1__2__supported(), legacy); default: TTCN_error("Internal error: Invalid selector in a specific value when matching a template of union type @IPL4asp_Types.SSL_protocols."); } } case VALUE_LIST: case COMPLEMENTED_LIST: for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST; return template_selection == COMPLEMENTED_LIST; case CONJUNCTION_MATCH: for (unsigned int i = 0; i < value_list.n_values; i++) { if (!value_list.list_value[i].match(other_value)) { return FALSE; } } return TRUE; case IMPLICATION_MATCH: return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value); case DYNAMIC_MATCH: return dyn_match->ptr->match(other_value); default: TTCN_error ("Matching an uninitialized template of union type @IPL4asp_Types.SSL_protocols."); } return FALSE; } boolean SSL__protocols_template::is_value() const { if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE; switch (single_value.union_selection) { case SSL__protocols::ALT_SSLv2__supported: return single_value.field_SSLv2__supported->is_value(); case SSL__protocols::ALT_SSLv3__supported: return single_value.field_SSLv3__supported->is_value(); case SSL__protocols::ALT_TLSv1__supported: return single_value.field_TLSv1__supported->is_value(); case SSL__protocols::ALT_TLSv1__1__supported: return single_value.field_TLSv1__1__supported->is_value(); case SSL__protocols::ALT_TLSv1__2__supported: return single_value.field_TLSv1__2__supported->is_value(); case SSL__protocols::ALT_DTLSv1__supported: return single_value.field_DTLSv1__supported->is_value(); case SSL__protocols::ALT_DTLSv1__2__supported: return single_value.field_DTLSv1__2__supported->is_value(); default: TTCN_error("Internal error: Invalid selector in a specific value when performing is_value operation on a template of union type @IPL4asp_Types.SSL_protocols."); } } SSL__protocols SSL__protocols_template::valueof() const { if (template_selection != SPECIFIC_VALUE || is_ifpresent) TTCN_error("Performing a valueof or send operation on a non-specific template of union type @IPL4asp_Types.SSL_protocols."); SSL__protocols ret_val; switch (single_value.union_selection) { case SSL__protocols::ALT_SSLv2__supported: ret_val.SSLv2__supported() = single_value.field_SSLv2__supported->valueof(); break; case SSL__protocols::ALT_SSLv3__supported: ret_val.SSLv3__supported() = single_value.field_SSLv3__supported->valueof(); break; case SSL__protocols::ALT_TLSv1__supported: ret_val.TLSv1__supported() = single_value.field_TLSv1__supported->valueof(); break; case SSL__protocols::ALT_TLSv1__1__supported: ret_val.TLSv1__1__supported() = single_value.field_TLSv1__1__supported->valueof(); break; case SSL__protocols::ALT_TLSv1__2__supported: ret_val.TLSv1__2__supported() = single_value.field_TLSv1__2__supported->valueof(); break; case SSL__protocols::ALT_DTLSv1__supported: ret_val.DTLSv1__supported() = single_value.field_DTLSv1__supported->valueof(); break; case SSL__protocols::ALT_DTLSv1__2__supported: ret_val.DTLSv1__2__supported() = single_value.field_DTLSv1__2__supported->valueof(); break; default: TTCN_error("Internal error: Invalid selector in a specific value when performing valueof operation on a template of union type @IPL4asp_Types.SSL_protocols."); } return ret_val; } SSL__protocols_template& SSL__protocols_template::list_item(unsigned int list_index) const { if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST && template_selection != CONJUNCTION_MATCH) TTCN_error("Internal error: Accessing a list element of a non-list template of union type @IPL4asp_Types.SSL_protocols."); if (list_index >= value_list.n_values) TTCN_error("Internal error: Index overflow in a value list template of union type @IPL4asp_Types.SSL_protocols."); return value_list.list_value[list_index]; } void SSL__protocols_template::set_type(template_sel template_type, unsigned int list_length) { if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST && template_type != CONJUNCTION_MATCH) TTCN_error ("Internal error: Setting an invalid list for a template of union type @IPL4asp_Types.SSL_protocols."); clean_up(); set_selection(template_type); value_list.n_values = list_length; value_list.list_value = new SSL__protocols_template[list_length]; } BOOLEAN_template& SSL__protocols_template::SSLv2__supported() { if (template_selection != SPECIFIC_VALUE || single_value.union_selection != SSL__protocols::ALT_SSLv2__supported) { template_sel old_selection = template_selection; clean_up(); if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_SSLv2__supported = new BOOLEAN_template(ANY_VALUE); else single_value.field_SSLv2__supported = new BOOLEAN_template; single_value.union_selection = SSL__protocols::ALT_SSLv2__supported; set_selection(SPECIFIC_VALUE); } return *single_value.field_SSLv2__supported; } const BOOLEAN_template& SSL__protocols_template::SSLv2__supported() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field SSLv2_supported in a non-specific template of union type @IPL4asp_Types.SSL_protocols."); if (single_value.union_selection != SSL__protocols::ALT_SSLv2__supported) TTCN_error("Accessing non-selected field SSLv2_supported in a template of union type @IPL4asp_Types.SSL_protocols."); return *single_value.field_SSLv2__supported; } BOOLEAN_template& SSL__protocols_template::SSLv3__supported() { if (template_selection != SPECIFIC_VALUE || single_value.union_selection != SSL__protocols::ALT_SSLv3__supported) { template_sel old_selection = template_selection; clean_up(); if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_SSLv3__supported = new BOOLEAN_template(ANY_VALUE); else single_value.field_SSLv3__supported = new BOOLEAN_template; single_value.union_selection = SSL__protocols::ALT_SSLv3__supported; set_selection(SPECIFIC_VALUE); } return *single_value.field_SSLv3__supported; } const BOOLEAN_template& SSL__protocols_template::SSLv3__supported() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field SSLv3_supported in a non-specific template of union type @IPL4asp_Types.SSL_protocols."); if (single_value.union_selection != SSL__protocols::ALT_SSLv3__supported) TTCN_error("Accessing non-selected field SSLv3_supported in a template of union type @IPL4asp_Types.SSL_protocols."); return *single_value.field_SSLv3__supported; } BOOLEAN_template& SSL__protocols_template::TLSv1__supported() { if (template_selection != SPECIFIC_VALUE || single_value.union_selection != SSL__protocols::ALT_TLSv1__supported) { template_sel old_selection = template_selection; clean_up(); if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_TLSv1__supported = new BOOLEAN_template(ANY_VALUE); else single_value.field_TLSv1__supported = new BOOLEAN_template; single_value.union_selection = SSL__protocols::ALT_TLSv1__supported; set_selection(SPECIFIC_VALUE); } return *single_value.field_TLSv1__supported; } const BOOLEAN_template& SSL__protocols_template::TLSv1__supported() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field TLSv1_supported in a non-specific template of union type @IPL4asp_Types.SSL_protocols."); if (single_value.union_selection != SSL__protocols::ALT_TLSv1__supported) TTCN_error("Accessing non-selected field TLSv1_supported in a template of union type @IPL4asp_Types.SSL_protocols."); return *single_value.field_TLSv1__supported; } BOOLEAN_template& SSL__protocols_template::TLSv1__1__supported() { if (template_selection != SPECIFIC_VALUE || single_value.union_selection != SSL__protocols::ALT_TLSv1__1__supported) { template_sel old_selection = template_selection; clean_up(); if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_TLSv1__1__supported = new BOOLEAN_template(ANY_VALUE); else single_value.field_TLSv1__1__supported = new BOOLEAN_template; single_value.union_selection = SSL__protocols::ALT_TLSv1__1__supported; set_selection(SPECIFIC_VALUE); } return *single_value.field_TLSv1__1__supported; } const BOOLEAN_template& SSL__protocols_template::TLSv1__1__supported() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field TLSv1_1_supported in a non-specific template of union type @IPL4asp_Types.SSL_protocols."); if (single_value.union_selection != SSL__protocols::ALT_TLSv1__1__supported) TTCN_error("Accessing non-selected field TLSv1_1_supported in a template of union type @IPL4asp_Types.SSL_protocols."); return *single_value.field_TLSv1__1__supported; } BOOLEAN_template& SSL__protocols_template::TLSv1__2__supported() { if (template_selection != SPECIFIC_VALUE || single_value.union_selection != SSL__protocols::ALT_TLSv1__2__supported) { template_sel old_selection = template_selection; clean_up(); if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_TLSv1__2__supported = new BOOLEAN_template(ANY_VALUE); else single_value.field_TLSv1__2__supported = new BOOLEAN_template; single_value.union_selection = SSL__protocols::ALT_TLSv1__2__supported; set_selection(SPECIFIC_VALUE); } return *single_value.field_TLSv1__2__supported; } const BOOLEAN_template& SSL__protocols_template::TLSv1__2__supported() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field TLSv1_2_supported in a non-specific template of union type @IPL4asp_Types.SSL_protocols."); if (single_value.union_selection != SSL__protocols::ALT_TLSv1__2__supported) TTCN_error("Accessing non-selected field TLSv1_2_supported in a template of union type @IPL4asp_Types.SSL_protocols."); return *single_value.field_TLSv1__2__supported; } BOOLEAN_template& SSL__protocols_template::DTLSv1__supported() { if (template_selection != SPECIFIC_VALUE || single_value.union_selection != SSL__protocols::ALT_DTLSv1__supported) { template_sel old_selection = template_selection; clean_up(); if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_DTLSv1__supported = new BOOLEAN_template(ANY_VALUE); else single_value.field_DTLSv1__supported = new BOOLEAN_template; single_value.union_selection = SSL__protocols::ALT_DTLSv1__supported; set_selection(SPECIFIC_VALUE); } return *single_value.field_DTLSv1__supported; } const BOOLEAN_template& SSL__protocols_template::DTLSv1__supported() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field DTLSv1_supported in a non-specific template of union type @IPL4asp_Types.SSL_protocols."); if (single_value.union_selection != SSL__protocols::ALT_DTLSv1__supported) TTCN_error("Accessing non-selected field DTLSv1_supported in a template of union type @IPL4asp_Types.SSL_protocols."); return *single_value.field_DTLSv1__supported; } BOOLEAN_template& SSL__protocols_template::DTLSv1__2__supported() { if (template_selection != SPECIFIC_VALUE || single_value.union_selection != SSL__protocols::ALT_DTLSv1__2__supported) { template_sel old_selection = template_selection; clean_up(); if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) single_value.field_DTLSv1__2__supported = new BOOLEAN_template(ANY_VALUE); else single_value.field_DTLSv1__2__supported = new BOOLEAN_template; single_value.union_selection = SSL__protocols::ALT_DTLSv1__2__supported; set_selection(SPECIFIC_VALUE); } return *single_value.field_DTLSv1__2__supported; } const BOOLEAN_template& SSL__protocols_template::DTLSv1__2__supported() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field DTLSv1_2_supported in a non-specific template of union type @IPL4asp_Types.SSL_protocols."); if (single_value.union_selection != SSL__protocols::ALT_DTLSv1__2__supported) TTCN_error("Accessing non-selected field DTLSv1_2_supported in a template of union type @IPL4asp_Types.SSL_protocols."); return *single_value.field_DTLSv1__2__supported; } boolean SSL__protocols_template::ischosen(SSL__protocols::union_selection_type checked_selection) const { if (checked_selection == SSL__protocols::UNBOUND_VALUE) TTCN_error("Internal error: Performing ischosen() operation on an invalid field of union type @IPL4asp_Types.SSL_protocols."); switch (template_selection) { case SPECIFIC_VALUE: if (single_value.union_selection == SSL__protocols::UNBOUND_VALUE) TTCN_error("Internal error: Invalid selector in a specific value when performing ischosen() operation on a template of union type @IPL4asp_Types.SSL_protocols."); return single_value.union_selection == checked_selection; case VALUE_LIST: { if (value_list.n_values < 1) TTCN_error("Internal error: Performing ischosen() operation on a template of union type @IPL4asp_Types.SSL_protocols containing an empty list."); boolean ret_val = value_list.list_value[0].ischosen(checked_selection); for (unsigned int list_count = 1; ret_val == TRUE && list_count < value_list.n_values; list_count++) { ret_val = value_list.list_value[list_count].ischosen(checked_selection); } return ret_val; } default: return FALSE; } return FALSE; } void SSL__protocols_template::log() const { switch (template_selection) { case SPECIFIC_VALUE: switch (single_value.union_selection) { case SSL__protocols::ALT_SSLv2__supported: TTCN_Logger::log_event_str("{ SSLv2_supported := "); single_value.field_SSLv2__supported->log(); TTCN_Logger::log_event_str(" }"); break; case SSL__protocols::ALT_SSLv3__supported: TTCN_Logger::log_event_str("{ SSLv3_supported := "); single_value.field_SSLv3__supported->log(); TTCN_Logger::log_event_str(" }"); break; case SSL__protocols::ALT_TLSv1__supported: TTCN_Logger::log_event_str("{ TLSv1_supported := "); single_value.field_TLSv1__supported->log(); TTCN_Logger::log_event_str(" }"); break; case SSL__protocols::ALT_TLSv1__1__supported: TTCN_Logger::log_event_str("{ TLSv1_1_supported := "); single_value.field_TLSv1__1__supported->log(); TTCN_Logger::log_event_str(" }"); break; case SSL__protocols::ALT_TLSv1__2__supported: TTCN_Logger::log_event_str("{ TLSv1_2_supported := "); single_value.field_TLSv1__2__supported->log(); TTCN_Logger::log_event_str(" }"); break; case SSL__protocols::ALT_DTLSv1__supported: TTCN_Logger::log_event_str("{ DTLSv1_supported := "); single_value.field_DTLSv1__supported->log(); TTCN_Logger::log_event_str(" }"); break; case SSL__protocols::ALT_DTLSv1__2__supported: TTCN_Logger::log_event_str("{ DTLSv1_2_supported := "); single_value.field_DTLSv1__2__supported->log(); TTCN_Logger::log_event_str(" }"); break; default: TTCN_Logger::log_event_str(""); } break; case COMPLEMENTED_LIST: TTCN_Logger::log_event_str("complement"); case CONJUNCTION_MATCH: if (template_selection == CONJUNCTION_MATCH) { TTCN_Logger::log_event_str("conjunct"); } case VALUE_LIST: TTCN_Logger::log_char('('); for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) { if (list_count > 0) TTCN_Logger::log_event_str(", "); value_list.list_value[list_count].log(); } TTCN_Logger::log_char(')'); break; case IMPLICATION_MATCH: implication_.precondition->log(); TTCN_Logger::log_event_str(" implies "); implication_.implied_template->log(); break; case DYNAMIC_MATCH: TTCN_Logger::log_event_str("@dynamic template"); break; default: log_generic(); } log_ifpresent(); } void SSL__protocols_template::log_match(const SSL__protocols& match_value, boolean legacy) const { if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity() && match(match_value, legacy)){ TTCN_Logger::print_logmatch_buffer(); TTCN_Logger::log_event_str(" matched"); return; } if (template_selection == SPECIFIC_VALUE && single_value.union_selection == match_value.get_selection()) { size_t previous_size = TTCN_Logger::get_logmatch_buffer_len(); switch (single_value.union_selection) { case SSL__protocols::ALT_SSLv2__supported: if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){ TTCN_Logger::log_logmatch_info(".SSLv2_supported"); single_value.field_SSLv2__supported->log_match(match_value.SSLv2__supported(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } else { TTCN_Logger::log_event_str("{ SSLv2_supported := "); single_value.field_SSLv2__supported->log_match(match_value.SSLv2__supported(), legacy); TTCN_Logger::log_event_str(" }"); } break; case SSL__protocols::ALT_SSLv3__supported: if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){ TTCN_Logger::log_logmatch_info(".SSLv3_supported"); single_value.field_SSLv3__supported->log_match(match_value.SSLv3__supported(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } else { TTCN_Logger::log_event_str("{ SSLv3_supported := "); single_value.field_SSLv3__supported->log_match(match_value.SSLv3__supported(), legacy); TTCN_Logger::log_event_str(" }"); } break; case SSL__protocols::ALT_TLSv1__supported: if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){ TTCN_Logger::log_logmatch_info(".TLSv1_supported"); single_value.field_TLSv1__supported->log_match(match_value.TLSv1__supported(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } else { TTCN_Logger::log_event_str("{ TLSv1_supported := "); single_value.field_TLSv1__supported->log_match(match_value.TLSv1__supported(), legacy); TTCN_Logger::log_event_str(" }"); } break; case SSL__protocols::ALT_TLSv1__1__supported: if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){ TTCN_Logger::log_logmatch_info(".TLSv1_1_supported"); single_value.field_TLSv1__1__supported->log_match(match_value.TLSv1__1__supported(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } else { TTCN_Logger::log_event_str("{ TLSv1_1_supported := "); single_value.field_TLSv1__1__supported->log_match(match_value.TLSv1__1__supported(), legacy); TTCN_Logger::log_event_str(" }"); } break; case SSL__protocols::ALT_TLSv1__2__supported: if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){ TTCN_Logger::log_logmatch_info(".TLSv1_2_supported"); single_value.field_TLSv1__2__supported->log_match(match_value.TLSv1__2__supported(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } else { TTCN_Logger::log_event_str("{ TLSv1_2_supported := "); single_value.field_TLSv1__2__supported->log_match(match_value.TLSv1__2__supported(), legacy); TTCN_Logger::log_event_str(" }"); } break; case SSL__protocols::ALT_DTLSv1__supported: if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){ TTCN_Logger::log_logmatch_info(".DTLSv1_supported"); single_value.field_DTLSv1__supported->log_match(match_value.DTLSv1__supported(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } else { TTCN_Logger::log_event_str("{ DTLSv1_supported := "); single_value.field_DTLSv1__supported->log_match(match_value.DTLSv1__supported(), legacy); TTCN_Logger::log_event_str(" }"); } break; case SSL__protocols::ALT_DTLSv1__2__supported: if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){ TTCN_Logger::log_logmatch_info(".DTLSv1_2_supported"); single_value.field_DTLSv1__2__supported->log_match(match_value.DTLSv1__2__supported(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } else { TTCN_Logger::log_event_str("{ DTLSv1_2_supported := "); single_value.field_DTLSv1__2__supported->log_match(match_value.DTLSv1__2__supported(), legacy); TTCN_Logger::log_event_str(" }"); } break; default: TTCN_Logger::print_logmatch_buffer(); TTCN_Logger::log_event_str(""); } } else { TTCN_Logger::print_logmatch_buffer(); match_value.log(); TTCN_Logger::log_event_str(" with "); log(); if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } } void SSL__protocols_template::encode_text(Text_Buf& text_buf) const { encode_text_base(text_buf); switch (template_selection) { case SPECIFIC_VALUE: text_buf.push_int(single_value.union_selection); switch (single_value.union_selection) { case SSL__protocols::ALT_SSLv2__supported: single_value.field_SSLv2__supported->encode_text(text_buf); break; case SSL__protocols::ALT_SSLv3__supported: single_value.field_SSLv3__supported->encode_text(text_buf); break; case SSL__protocols::ALT_TLSv1__supported: single_value.field_TLSv1__supported->encode_text(text_buf); break; case SSL__protocols::ALT_TLSv1__1__supported: single_value.field_TLSv1__1__supported->encode_text(text_buf); break; case SSL__protocols::ALT_TLSv1__2__supported: single_value.field_TLSv1__2__supported->encode_text(text_buf); break; case SSL__protocols::ALT_DTLSv1__supported: single_value.field_DTLSv1__supported->encode_text(text_buf); break; case SSL__protocols::ALT_DTLSv1__2__supported: single_value.field_DTLSv1__2__supported->encode_text(text_buf); break; default: TTCN_error("Internal error: Invalid selector in a specific value when encoding a template of union type @IPL4asp_Types.SSL_protocols."); } case OMIT_VALUE: case ANY_VALUE: case ANY_OR_OMIT: break; case VALUE_LIST: case COMPLEMENTED_LIST: text_buf.push_int(value_list.n_values); for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) value_list.list_value[list_count].encode_text(text_buf); break; default: TTCN_error("Text encoder: Encoding an uninitialized template of type @IPL4asp_Types.SSL_protocols."); } } void SSL__protocols_template::decode_text(Text_Buf& text_buf) { clean_up(); decode_text_base(text_buf); switch (template_selection) { case SPECIFIC_VALUE: { single_value.union_selection = SSL__protocols::UNBOUND_VALUE; SSL__protocols::union_selection_type new_selection = (SSL__protocols::union_selection_type)text_buf.pull_int().get_val(); switch (new_selection) { case SSL__protocols::ALT_SSLv2__supported: single_value.field_SSLv2__supported = new BOOLEAN_template; single_value.field_SSLv2__supported->decode_text(text_buf); break; case SSL__protocols::ALT_SSLv3__supported: single_value.field_SSLv3__supported = new BOOLEAN_template; single_value.field_SSLv3__supported->decode_text(text_buf); break; case SSL__protocols::ALT_TLSv1__supported: single_value.field_TLSv1__supported = new BOOLEAN_template; single_value.field_TLSv1__supported->decode_text(text_buf); break; case SSL__protocols::ALT_TLSv1__1__supported: single_value.field_TLSv1__1__supported = new BOOLEAN_template; single_value.field_TLSv1__1__supported->decode_text(text_buf); break; case SSL__protocols::ALT_TLSv1__2__supported: single_value.field_TLSv1__2__supported = new BOOLEAN_template; single_value.field_TLSv1__2__supported->decode_text(text_buf); break; case SSL__protocols::ALT_DTLSv1__supported: single_value.field_DTLSv1__supported = new BOOLEAN_template; single_value.field_DTLSv1__supported->decode_text(text_buf); break; case SSL__protocols::ALT_DTLSv1__2__supported: single_value.field_DTLSv1__2__supported = new BOOLEAN_template; single_value.field_DTLSv1__2__supported->decode_text(text_buf); break; default: TTCN_error("Text decoder: Unrecognized union selector was received for a template of type @IPL4asp_Types.SSL_protocols."); } single_value.union_selection = new_selection; } case OMIT_VALUE: case ANY_VALUE: case ANY_OR_OMIT: break; case VALUE_LIST: case COMPLEMENTED_LIST: value_list.n_values = text_buf.pull_int().get_val(); value_list.list_value = new SSL__protocols_template[value_list.n_values]; for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) value_list.list_value[list_count].decode_text(text_buf); break; default: TTCN_error("Text decoder: Unrecognized selector was received in a template of type @IPL4asp_Types.SSL_protocols."); } } boolean SSL__protocols_template::is_present(boolean legacy) const { if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE; return !match_omit(legacy); } boolean SSL__protocols_template::match_omit(boolean legacy) const { if (is_ifpresent) return TRUE; switch (template_selection) { case OMIT_VALUE: case ANY_OR_OMIT: return TRUE; case IMPLICATION_MATCH: return !implication_.precondition->match_omit() || implication_.implied_template->match_omit(); case VALUE_LIST: case COMPLEMENTED_LIST: if (legacy) { for (unsigned int v_idx=0; v_idx(param.get_id()) != NULL && param.get_id()->next_name()) { char* param_field = param.get_id()->get_current_name(); if (param_field[0] >= '0' && param_field[0] <= '9') { param.error("Unexpected array index in module parameter, expected a valid field" " name for union template type `@IPL4asp_Types.SSL_protocols'"); } if (strcmp("SSLv2_supported", param_field) == 0) { SSLv2__supported().set_param(param); return; } else if (strcmp("SSLv3_supported", param_field) == 0) { SSLv3__supported().set_param(param); return; } else if (strcmp("TLSv1_supported", param_field) == 0) { TLSv1__supported().set_param(param); return; } else if (strcmp("TLSv1_1_supported", param_field) == 0) { TLSv1__1__supported().set_param(param); return; } else if (strcmp("TLSv1_2_supported", param_field) == 0) { TLSv1__2__supported().set_param(param); return; } else if (strcmp("DTLSv1_supported", param_field) == 0) { DTLSv1__supported().set_param(param); return; } else if (strcmp("DTLSv1_2_supported", param_field) == 0) { DTLSv1__2__supported().set_param(param); return; } else param.error("Field `%s' not found in union template type `@IPL4asp_Types.SSL_protocols'", param_field); } param.basic_check(Module_Param::BC_TEMPLATE, "union template"); Module_Param_Ptr m_p = ¶m; switch (m_p->get_type()) { case Module_Param::MP_Omit: *this = OMIT_VALUE; break; case Module_Param::MP_Any: *this = ANY_VALUE; break; case Module_Param::MP_AnyOrNone: *this = ANY_OR_OMIT; break; case Module_Param::MP_List_Template: case Module_Param::MP_ComplementList_Template: case Module_Param::MP_ConjunctList_Template: { SSL__protocols_template new_temp; new_temp.set_type(m_p->get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (m_p->get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), m_p->get_size()); for (size_t p_i=0; p_iget_size(); p_i++) { new_temp.list_item(p_i).set_param(*m_p->get_elem(p_i)); } *this = new_temp; break; } case Module_Param::MP_Value_List: if (m_p->get_size()==0) break; param.type_error("union template", "@IPL4asp_Types.SSL_protocols"); break; case Module_Param::MP_Assignment_List: { Module_Param* mp_last = m_p->get_elem(m_p->get_size()-1); char* last_name = mp_last->get_id()->get_name(); if (!strcmp(last_name, "SSLv2_supported")) { SSLv2__supported().set_param(*mp_last); break; } if (!strcmp(last_name, "SSLv3_supported")) { SSLv3__supported().set_param(*mp_last); break; } if (!strcmp(last_name, "TLSv1_supported")) { TLSv1__supported().set_param(*mp_last); break; } if (!strcmp(last_name, "TLSv1_1_supported")) { TLSv1__1__supported().set_param(*mp_last); break; } if (!strcmp(last_name, "TLSv1_2_supported")) { TLSv1__2__supported().set_param(*mp_last); break; } if (!strcmp(last_name, "DTLSv1_supported")) { DTLSv1__supported().set_param(*mp_last); break; } if (!strcmp(last_name, "DTLSv1_2_supported")) { DTLSv1__2__supported().set_param(*mp_last); break; } mp_last->error("Field %s does not exist in type @IPL4asp_Types.SSL_protocols.", last_name); } break; case Module_Param::MP_Implication_Template: { SSL__protocols_template* precondition = new SSL__protocols_template; precondition->set_param(*m_p->get_elem(0)); SSL__protocols_template* implied_template = new SSL__protocols_template; implied_template->set_param(*m_p->get_elem(1)); *this = SSL__protocols_template(precondition, implied_template); } break; default: param.type_error("union template", "@IPL4asp_Types.SSL_protocols"); } is_ifpresent = param.get_ifpresent(); } void SSL__protocols_template::check_restriction(template_res t_res, const char* t_name, boolean legacy) const { if (template_selection==UNINITIALIZED_TEMPLATE) return; switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) { case TR_OMIT: if (template_selection==OMIT_VALUE) return; case TR_VALUE: if (template_selection!=SPECIFIC_VALUE || is_ifpresent) break; switch (single_value.union_selection) { case SSL__protocols::ALT_SSLv2__supported: single_value.field_SSLv2__supported->check_restriction(t_res, t_name ? t_name : "@IPL4asp_Types.SSL_protocols"); return; case SSL__protocols::ALT_SSLv3__supported: single_value.field_SSLv3__supported->check_restriction(t_res, t_name ? t_name : "@IPL4asp_Types.SSL_protocols"); return; case SSL__protocols::ALT_TLSv1__supported: single_value.field_TLSv1__supported->check_restriction(t_res, t_name ? t_name : "@IPL4asp_Types.SSL_protocols"); return; case SSL__protocols::ALT_TLSv1__1__supported: single_value.field_TLSv1__1__supported->check_restriction(t_res, t_name ? t_name : "@IPL4asp_Types.SSL_protocols"); return; case SSL__protocols::ALT_TLSv1__2__supported: single_value.field_TLSv1__2__supported->check_restriction(t_res, t_name ? t_name : "@IPL4asp_Types.SSL_protocols"); return; case SSL__protocols::ALT_DTLSv1__supported: single_value.field_DTLSv1__supported->check_restriction(t_res, t_name ? t_name : "@IPL4asp_Types.SSL_protocols"); return; case SSL__protocols::ALT_DTLSv1__2__supported: single_value.field_DTLSv1__2__supported->check_restriction(t_res, t_name ? t_name : "@IPL4asp_Types.SSL_protocols"); return; default: TTCN_error("Internal error: Invalid selector in a specific value when performing check_restriction operation on a template of union type @IPL4asp_Types.SSL_protocols."); } case TR_PRESENT: if (!match_omit(legacy)) return; break; default: return; } TTCN_error("Restriction `%s' on template of type %s violated.", get_res_name(t_res), t_name ? t_name : "@IPL4asp_Types.SSL_protocols"); } const SSL__protocols SSL__proto__support::UNBOUND_ELEM; SSL__proto__support::SSL__proto__support() { val_ptr = NULL; } SSL__proto__support::SSL__proto__support(null_type) { val_ptr = new recordof_setof_struct; val_ptr->ref_count = 1; val_ptr->n_elements = 0; val_ptr->value_elements = NULL; } SSL__proto__support::SSL__proto__support(const SSL__proto__support& other_value) { if (!other_value.is_bound()) TTCN_error("Copying an unbound value of type @IPL4asp_Types.SSL_proto_support."); val_ptr = other_value.val_ptr; val_ptr->ref_count++; } SSL__proto__support::~SSL__proto__support() { clean_up(); if (val_ptr != NULL) val_ptr = NULL; } void SSL__proto__support::clean_up() { if (val_ptr != NULL) { if (val_ptr->ref_count > 1) { val_ptr->ref_count--; val_ptr = NULL; } else if (val_ptr->ref_count == 1) { for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++) if (val_ptr->value_elements[elem_count] != NULL) delete val_ptr->value_elements[elem_count]; free_pointers((void**)val_ptr->value_elements); delete val_ptr; val_ptr = NULL; } else TTCN_error("Internal error: Invalid reference counter in a record of/set of value."); } } SSL__proto__support& SSL__proto__support::operator=(null_type) { clean_up(); val_ptr = new recordof_setof_struct; val_ptr->ref_count = 1; val_ptr->n_elements = 0; val_ptr->value_elements = NULL; return *this; } SSL__proto__support& SSL__proto__support::operator=(const SSL__proto__support& other_value) { if (other_value.val_ptr == NULL) TTCN_error("Assigning an unbound value of type @IPL4asp_Types.SSL_proto_support."); if (this != &other_value) { clean_up(); val_ptr = other_value.val_ptr; val_ptr->ref_count++; } return *this; } boolean SSL__proto__support::operator==(null_type) const { if (val_ptr == NULL) TTCN_error("The left operand of comparison is an unbound value of type @IPL4asp_Types.SSL_proto_support."); return val_ptr->n_elements == 0 ; } boolean SSL__proto__support::operator==(const SSL__proto__support& other_value) const { if (val_ptr == NULL) TTCN_error("The left operand of comparison is an unbound value of type @IPL4asp_Types.SSL_proto_support."); if (other_value.val_ptr == NULL) TTCN_error("The right operand of comparison is an unbound value of type @IPL4asp_Types.SSL_proto_support."); if (val_ptr == other_value.val_ptr) return TRUE; if (val_ptr->n_elements != (other_value.val_ptr)->n_elements) return FALSE; for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++){ if (val_ptr->value_elements[elem_count] != NULL){ if ((other_value.val_ptr)->value_elements[elem_count] != NULL){ if (*val_ptr->value_elements[elem_count] != *(other_value.val_ptr)->value_elements[elem_count]) return FALSE; } else return FALSE; } else { if ((other_value.val_ptr)->value_elements[elem_count] != NULL) return FALSE; } } return TRUE; } SSL__protocols& SSL__proto__support::operator[](int index_value) { if (index_value < 0) TTCN_error("Accessing an element of type @IPL4asp_Types.SSL_proto_support using a negative index: %d.", index_value); if (val_ptr == NULL) { val_ptr = new recordof_setof_struct; val_ptr->ref_count = 1; val_ptr->n_elements = 0; val_ptr->value_elements = NULL; } else if (val_ptr->ref_count > 1) { struct recordof_setof_struct *new_val_ptr = new recordof_setof_struct; new_val_ptr->ref_count = 1; new_val_ptr->n_elements = (index_value >= val_ptr->n_elements) ? index_value + 1 : val_ptr->n_elements; new_val_ptr->value_elements = (SSL__protocols**)allocate_pointers(new_val_ptr->n_elements); for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++){ if (val_ptr->value_elements[elem_count] != NULL){ new_val_ptr->value_elements[elem_count] = new SSL__protocols(*(val_ptr->value_elements[elem_count])); } } clean_up(); val_ptr = new_val_ptr; } if (index_value >= val_ptr->n_elements) set_size(index_value + 1); if (val_ptr->value_elements[index_value] == NULL) { val_ptr->value_elements[index_value] = new SSL__protocols; } return *val_ptr->value_elements[index_value]; } SSL__protocols& SSL__proto__support::operator[](const INTEGER& index_value) { index_value.must_bound("Using an unbound integer value for indexing a value of type @IPL4asp_Types.SSL_proto_support."); return (*this)[(int)index_value]; } const SSL__protocols& SSL__proto__support::operator[](int index_value) const { if (val_ptr == NULL) TTCN_error("Accessing an element in an unbound value of type @IPL4asp_Types.SSL_proto_support."); if (index_value < 0) TTCN_error("Accessing an element of type @IPL4asp_Types.SSL_proto_support using a negative index: %d.", index_value); if (index_value >= val_ptr->n_elements) TTCN_error("Index overflow in a value of type @IPL4asp_Types.SSL_proto_support: The index is %d, but the value has only %d elements.", index_value, val_ptr->n_elements); return (val_ptr->value_elements[index_value] == NULL) ? UNBOUND_ELEM : *val_ptr->value_elements[index_value]; } const SSL__protocols& SSL__proto__support::operator[](const INTEGER& index_value) const { index_value.must_bound("Using an unbound integer value for indexing a value of type @IPL4asp_Types.SSL_proto_support."); return (*this)[(int)index_value]; } SSL__proto__support SSL__proto__support::operator<<=(int rotate_count) const { return *this >>= (-rotate_count); } SSL__proto__support SSL__proto__support::operator<<=(const INTEGER& rotate_count) const { rotate_count.must_bound("Unbound integer operand of rotate left operator."); return *this >>= (int)(-rotate_count); } SSL__proto__support SSL__proto__support::operator>>=(const INTEGER& rotate_count) const { rotate_count.must_bound("Unbound integer operand of rotate right operator."); return *this >>= (int)rotate_count; } SSL__proto__support SSL__proto__support::operator>>=(int rotate_count) const { if (val_ptr == NULL) TTCN_error("Performing rotation operation on an unbound value of type @IPL4asp_Types.SSL_proto_support."); if (val_ptr->n_elements == 0) return *this; int rc; if (rotate_count>=0) rc = rotate_count % val_ptr->n_elements; else rc = val_ptr->n_elements - ((-rotate_count) % val_ptr->n_elements); if (rc == 0) return *this; SSL__proto__support ret_val; ret_val.set_size(val_ptr->n_elements); for (int i=0; in_elements; i++) { if (val_ptr->value_elements[i] != NULL) { ret_val.val_ptr->value_elements[(i+rc)%val_ptr->n_elements] =new SSL__protocols(*val_ptr->value_elements[i]); } } return ret_val; } SSL__proto__support SSL__proto__support::operator+(const SSL__proto__support& other_value) const { if (val_ptr == NULL || other_value.val_ptr == NULL) TTCN_error("Unbound operand of @IPL4asp_Types.SSL_proto_support concatenation."); if (val_ptr->n_elements == 0) return other_value; if (other_value.val_ptr->n_elements == 0) return *this; SSL__proto__support ret_val; ret_val.set_size(val_ptr->n_elements+other_value.val_ptr->n_elements); for (int i=0; in_elements; i++) { if (val_ptr->value_elements[i] != NULL) { ret_val.val_ptr->value_elements[i] = new SSL__protocols(*val_ptr->value_elements[i]); } } for (int i=0; in_elements; i++) { if (other_value.val_ptr->value_elements[i] != NULL) { ret_val.val_ptr->value_elements[i+val_ptr->n_elements] = new SSL__protocols(*other_value.val_ptr->value_elements[i]); } } return ret_val; } SSL__proto__support SSL__proto__support::substr(int index, int returncount) const { if (val_ptr == NULL) TTCN_error("The first argument of substr() is an unbound value of type @IPL4asp_Types.SSL_proto_support."); check_substr_arguments(val_ptr->n_elements, index, returncount, "@IPL4asp_Types.SSL_proto_support","element"); SSL__proto__support ret_val; ret_val.set_size(returncount); for (int i=0; ivalue_elements[i+index] != NULL) { ret_val.val_ptr->value_elements[i] = new SSL__protocols(*val_ptr->value_elements[i+index]); } } return ret_val; } SSL__proto__support SSL__proto__support::replace(int index, int len, const SSL__proto__support& repl) const { if (val_ptr == NULL) TTCN_error("The first argument of replace() is an unbound value of type @IPL4asp_Types.SSL_proto_support."); if (repl.val_ptr == NULL) TTCN_error("The fourth argument of replace() is an unbound value of type @IPL4asp_Types.SSL_proto_support."); check_replace_arguments(val_ptr->n_elements, index, len, "@IPL4asp_Types.SSL_proto_support","element"); SSL__proto__support ret_val; ret_val.set_size(val_ptr->n_elements + repl.val_ptr->n_elements - len); for (int i = 0; i < index; i++) { if (val_ptr->value_elements[i] != NULL) { ret_val.val_ptr->value_elements[i] = new SSL__protocols(*val_ptr->value_elements[i]); } } for (int i = 0; i < repl.val_ptr->n_elements; i++) { if (repl.val_ptr->value_elements[i] != NULL) { ret_val.val_ptr->value_elements[i+index] = new SSL__protocols(*repl.val_ptr->value_elements[i]); } } for (int i = 0; i < val_ptr->n_elements - index - len; i++) { if (val_ptr->value_elements[index+i+len] != NULL) { ret_val.val_ptr->value_elements[index+i+repl.val_ptr->n_elements] = new SSL__protocols(*val_ptr->value_elements[index+i+len]); } } return ret_val; } SSL__proto__support SSL__proto__support::replace(int index, int len, const SSL__proto__support_template& repl) const { if (!repl.is_value()) TTCN_error("The fourth argument of function replace() is a template with non-specific value."); return replace(index, len, repl.valueof()); } void SSL__proto__support::set_size(int new_size) { if (new_size < 0) TTCN_error("Internal error: Setting a negative size for a value of type @IPL4asp_Types.SSL_proto_support."); if (val_ptr == NULL) { val_ptr = new recordof_setof_struct; val_ptr->ref_count = 1; val_ptr->n_elements = 0; val_ptr->value_elements = NULL; } else if (val_ptr->ref_count > 1) { struct recordof_setof_struct *new_val_ptr = new recordof_setof_struct; new_val_ptr->ref_count = 1; new_val_ptr->n_elements = (new_size < val_ptr->n_elements) ? new_size : val_ptr->n_elements; new_val_ptr->value_elements = (SSL__protocols**)allocate_pointers(new_val_ptr->n_elements); for (int elem_count = 0; elem_count < new_val_ptr->n_elements; elem_count++) { if (val_ptr->value_elements[elem_count] != NULL){ new_val_ptr->value_elements[elem_count] = new SSL__protocols(*(val_ptr->value_elements[elem_count])); } } clean_up(); val_ptr = new_val_ptr; } if (new_size > val_ptr->n_elements) { val_ptr->value_elements = (SSL__protocols**)reallocate_pointers((void**)val_ptr->value_elements, val_ptr->n_elements, new_size); #ifdef TITAN_MEMORY_DEBUG_SET_RECORD_OF if((val_ptr->n_elements/1000)!=(new_size/1000)) TTCN_warning("New size of type @IPL4asp_Types.SSL_proto_support: %d",new_size); #endif val_ptr->n_elements = new_size; } else if (new_size < val_ptr->n_elements) { for (int elem_count = new_size; elem_count < val_ptr->n_elements; elem_count++) if (val_ptr->value_elements[elem_count] != NULL)delete val_ptr->value_elements[elem_count]; val_ptr->value_elements = (SSL__protocols**)reallocate_pointers((void**)val_ptr->value_elements, val_ptr->n_elements, new_size); val_ptr->n_elements = new_size; } } boolean SSL__proto__support::is_value() const { if (val_ptr == NULL) return FALSE; for(int i = 0; i < val_ptr->n_elements; ++i) { if (val_ptr->value_elements[i] == NULL || !val_ptr->value_elements[i]->is_value()) return FALSE; } return TRUE; } int SSL__proto__support::size_of() const { if (val_ptr == NULL) TTCN_error("Performing sizeof operation on an unbound value of type @IPL4asp_Types.SSL_proto_support."); return val_ptr->n_elements; } int SSL__proto__support::lengthof() const { if (val_ptr == NULL) TTCN_error("Performing lengthof operation on an unbound value of type @IPL4asp_Types.SSL_proto_support."); for (int my_length=val_ptr->n_elements; my_length>0; my_length--) if (val_ptr->value_elements[my_length-1] != NULL) return my_length; return 0; } void SSL__proto__support::log() const { if (val_ptr == NULL) {; TTCN_Logger::log_event_unbound(); return; } switch (val_ptr->n_elements) { case 0: TTCN_Logger::log_event_str("{ }"); break; default: TTCN_Logger::log_event_str("{ "); for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++) { if (elem_count > 0) TTCN_Logger::log_event_str(", "); (*this)[elem_count].log(); } TTCN_Logger::log_event_str(" }"); } } void SSL__proto__support::set_implicit_omit() { if (val_ptr == NULL) return; for (int i = 0; i < val_ptr->n_elements; i++) { if (val_ptr->value_elements[i] != NULL) val_ptr->value_elements[i]->set_implicit_omit(); } } void SSL__proto__support::set_param(Module_Param& param) { param.basic_check(Module_Param::BC_VALUE|Module_Param::BC_LIST, "record of value"); switch (param.get_operation_type()) { case Module_Param::OT_ASSIGN: if (param.get_type()==Module_Param::MP_Value_List && param.get_size()==0) { *this = NULL_VALUE; return; } switch (param.get_type()) { case Module_Param::MP_Value_List: set_size(param.get_size()); for (size_t i=0; iget_type()!=Module_Param::MP_NotUsed) { (*this)[i].set_param(*curr); if (!(*this)[i].is_bound()) { delete val_ptr->value_elements[i]; val_ptr->value_elements[i] = NULL; } } } break; case Module_Param::MP_Indexed_List: for (size_t i=0; iget_id()->get_index()].set_param(*curr); if (!(*this)[curr->get_id()->get_index()].is_bound()) { delete val_ptr->value_elements[curr->get_id()->get_index()]; val_ptr->value_elements[curr->get_id()->get_index()] = NULL; } } break; default: param.type_error("record of value", "@IPL4asp_Types.SSL_proto_support"); } break; case Module_Param::OT_CONCAT: switch (param.get_type()) { case Module_Param::MP_Value_List: { if (!is_bound()) *this = NULL_VALUE; int start_idx = lengthof(); for (size_t i=0; iget_type()!=Module_Param::MP_NotUsed)) { (*this)[start_idx+(int)i].set_param(*curr); } } } break; case Module_Param::MP_Indexed_List: param.error("Cannot concatenate an indexed value list"); break; default: param.type_error("record of value", "@IPL4asp_Types.SSL_proto_support"); } break; default: TTCN_error("Internal error: Unknown operation type."); } } void SSL__proto__support::encode_text(Text_Buf& text_buf) const { if (val_ptr == NULL) TTCN_error("Text encoder: Encoding an unbound value of type @IPL4asp_Types.SSL_proto_support."); text_buf.push_int(val_ptr->n_elements); for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++) (*this)[elem_count].encode_text(text_buf); } void SSL__proto__support::decode_text(Text_Buf& text_buf) { clean_up(); val_ptr = new recordof_setof_struct; val_ptr->ref_count = 1; val_ptr->n_elements = text_buf.pull_int().get_val(); if (val_ptr->n_elements < 0) TTCN_error("Text decoder: Negative size was received for a value of type @IPL4asp_Types.SSL_proto_support."); val_ptr->value_elements = (SSL__protocols**)allocate_pointers(val_ptr->n_elements); for (int elem_count = 0; elem_count < val_ptr->n_elements; elem_count++) { val_ptr->value_elements[elem_count] = new SSL__protocols; val_ptr->value_elements[elem_count]->decode_text(text_buf); } } void SSL__proto__support_template::copy_value(const SSL__proto__support& other_value) { if (!other_value.is_bound()) TTCN_error("Initialization of a template of type @IPL4asp_Types.SSL_proto_support with an unbound value."); single_value.n_elements = other_value.size_of(); single_value.value_elements = (SSL__protocols_template**)allocate_pointers(single_value.n_elements); for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) { if (other_value[elem_count].is_bound()) { single_value.value_elements[elem_count] = new SSL__protocols_template(other_value[elem_count]); } else { single_value.value_elements[elem_count] = new SSL__protocols_template; } } set_selection(SPECIFIC_VALUE); } void SSL__proto__support_template::copy_template(const SSL__proto__support_template& other_value) { switch (other_value.template_selection) { case SPECIFIC_VALUE: single_value.n_elements = other_value.single_value.n_elements; single_value.value_elements = (SSL__protocols_template**)allocate_pointers(single_value.n_elements); for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) { if (UNINITIALIZED_TEMPLATE != other_value.single_value.value_elements[elem_count]->get_selection()) { single_value.value_elements[elem_count] = new SSL__protocols_template(*other_value.single_value.value_elements[elem_count]); } else { single_value.value_elements[elem_count] = new SSL__protocols_template; } } case OMIT_VALUE: case ANY_VALUE: case ANY_OR_OMIT: break; case VALUE_LIST: case COMPLEMENTED_LIST: case CONJUNCTION_MATCH: value_list.n_values = other_value.value_list.n_values; value_list.list_value = new SSL__proto__support_template[value_list.n_values]; for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) value_list.list_value[list_count].copy_template(other_value.value_list.list_value[list_count]); break; case IMPLICATION_MATCH: implication_.precondition = new SSL__proto__support_template(*other_value.implication_.precondition); implication_.implied_template = new SSL__proto__support_template(*other_value.implication_.implied_template); break; case DYNAMIC_MATCH: dyn_match = other_value.dyn_match; dyn_match->ref_count++; break; default: TTCN_error("Copying an uninitialized/unsupported template of type @IPL4asp_Types.SSL_proto_support."); break; } set_selection(other_value); } boolean SSL__proto__support_template::match_function_specific(const Base_Type *value_ptr, int value_index, const Restricted_Length_Template *template_ptr, int template_index, boolean legacy) { if (value_index >= 0) return ((const SSL__proto__support_template*)template_ptr)->single_value.value_elements[template_index]->match((*(const SSL__proto__support*)value_ptr)[value_index], legacy); else return ((const SSL__proto__support_template*)template_ptr)->single_value.value_elements[template_index]->is_any_or_omit(); } SSL__proto__support_template::SSL__proto__support_template() { } SSL__proto__support_template::SSL__proto__support_template(template_sel other_value) : Base_Record_Of_Template(other_value) { check_single_selection(other_value); } SSL__proto__support_template::SSL__proto__support_template(null_type) : Base_Record_Of_Template(SPECIFIC_VALUE) { single_value.n_elements = 0; single_value.value_elements = NULL; } SSL__proto__support_template::SSL__proto__support_template(const SSL__proto__support& other_value) { copy_value(other_value); } SSL__proto__support_template::SSL__proto__support_template(const OPTIONAL& other_value) { switch (other_value.get_selection()) { case OPTIONAL_PRESENT: copy_value((const SSL__proto__support&)other_value); break; case OPTIONAL_OMIT: set_selection(OMIT_VALUE); break; default: TTCN_error("Creating a template of type @IPL4asp_Types.SSL_proto_support from an unbound optional field."); } } SSL__proto__support_template::SSL__proto__support_template(SSL__proto__support_template* p_precondition, SSL__proto__support_template* p_implied_template) : Base_Record_Of_Template(IMPLICATION_MATCH) { implication_.precondition = p_precondition; implication_.implied_template = p_implied_template; } SSL__proto__support_template::SSL__proto__support_template(Dynamic_Match_Interface* p_dyn_match) : Base_Record_Of_Template(DYNAMIC_MATCH) { dyn_match = new dynmatch_struct; dyn_match->ptr = p_dyn_match; dyn_match->ref_count = 1; } SSL__proto__support_template::SSL__proto__support_template(const SSL__proto__support_template& other_value) : Base_Record_Of_Template() { copy_template(other_value); } SSL__proto__support_template::~SSL__proto__support_template() { clean_up(); } void SSL__proto__support_template::clean_up() { switch (template_selection) { case SPECIFIC_VALUE: for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) delete single_value.value_elements[elem_count]; free_pointers((void**)single_value.value_elements); break; case VALUE_LIST: case COMPLEMENTED_LIST: case CONJUNCTION_MATCH: delete [] value_list.list_value; break; case IMPLICATION_MATCH: delete implication_.precondition; delete implication_.implied_template; break; case DYNAMIC_MATCH: dyn_match->ref_count--; if (dyn_match->ref_count == 0) { delete dyn_match->ptr; delete dyn_match; } break; default: break; } template_selection = UNINITIALIZED_TEMPLATE; } SSL__proto__support_template& SSL__proto__support_template::operator=(template_sel other_value) { check_single_selection(other_value); clean_up(); set_selection(other_value); return *this; } SSL__proto__support_template& SSL__proto__support_template::operator=(null_type) { clean_up(); set_selection(SPECIFIC_VALUE); single_value.n_elements = 0; single_value.value_elements = NULL; return *this; } SSL__proto__support_template& SSL__proto__support_template::operator=(const SSL__proto__support& other_value) { clean_up(); copy_value(other_value); return *this; } SSL__proto__support_template& SSL__proto__support_template::operator=(const OPTIONAL& other_value) { clean_up(); switch (other_value.get_selection()) { case OPTIONAL_PRESENT: copy_value((const SSL__proto__support&)other_value); break; case OPTIONAL_OMIT: set_selection(OMIT_VALUE); break; default: TTCN_error("Assignment of an unbound optional field to a template of type @IPL4asp_Types.SSL_proto_support."); } return *this; } SSL__proto__support_template& SSL__proto__support_template::operator=(const SSL__proto__support_template& other_value) { if (&other_value != this) { clean_up(); copy_template(other_value); } return *this; } SSL__protocols_template& SSL__proto__support_template::operator[](int index_value) { if (index_value < 0) TTCN_error("Accessing an element of a template for type @IPL4asp_Types.SSL_proto_support using a negative index: %d.", index_value); switch (template_selection) { case SPECIFIC_VALUE: if(index_value < single_value.n_elements) break; // no break case OMIT_VALUE: case ANY_VALUE: case ANY_OR_OMIT: case UNINITIALIZED_TEMPLATE: set_size(index_value + 1); break; default: TTCN_error("Accessing an element of a non-specific template for type @IPL4asp_Types.SSL_proto_support."); break; } return *single_value.value_elements[index_value]; } SSL__protocols_template& SSL__proto__support_template::operator[](const INTEGER& index_value) { index_value.must_bound("Using an unbound integer value for indexing a template of type @IPL4asp_Types.SSL_proto_support."); return (*this)[(int)index_value]; } const SSL__protocols_template& SSL__proto__support_template::operator[](int index_value) const { if (index_value < 0) TTCN_error("Accessing an element of a template for type @IPL4asp_Types.SSL_proto_support using a negative index: %d.", index_value); if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing an element of a non-specific template for type @IPL4asp_Types.SSL_proto_support."); if (index_value >= single_value.n_elements) TTCN_error("Index overflow in a template of type @IPL4asp_Types.SSL_proto_support: The index is %d, but the template has only %d elements.", index_value, single_value.n_elements); return *single_value.value_elements[index_value]; } const SSL__protocols_template& SSL__proto__support_template::operator[](const INTEGER& index_value) const { index_value.must_bound("Using an unbound integer value for indexing a template of type @IPL4asp_Types.SSL_proto_support."); return (*this)[(int)index_value]; } void SSL__proto__support_template::set_size(int new_size) { if (new_size < 0) TTCN_error("Internal error: Setting a negative size for a template of type @IPL4asp_Types.SSL_proto_support."); template_sel old_selection = template_selection; if (old_selection != SPECIFIC_VALUE) { clean_up(); set_selection(SPECIFIC_VALUE); single_value.n_elements = 0; single_value.value_elements = NULL; } if (new_size > single_value.n_elements) { single_value.value_elements = (SSL__protocols_template**)reallocate_pointers((void**)single_value.value_elements, single_value.n_elements, new_size); if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) { for (int elem_count = single_value.n_elements; elem_count < new_size; elem_count++) single_value.value_elements[elem_count] = new SSL__protocols_template(ANY_VALUE); } else { for (int elem_count = single_value.n_elements; elem_count < new_size; elem_count++) single_value.value_elements[elem_count] = new SSL__protocols_template; } single_value.n_elements = new_size; } else if (new_size < single_value.n_elements) { for (int elem_count = new_size; elem_count < single_value.n_elements; elem_count++) delete single_value.value_elements[elem_count]; single_value.value_elements = (SSL__protocols_template**)reallocate_pointers((void**)single_value.value_elements, single_value.n_elements, new_size); single_value.n_elements = new_size; } } int SSL__proto__support_template::n_elem() const { switch (template_selection) { case SPECIFIC_VALUE: return single_value.n_elements; break; case VALUE_LIST: return value_list.n_values; break; default: TTCN_error("Performing n_elem"); } } int SSL__proto__support_template::size_of(boolean is_size) const { const char* op_name = is_size ? "size" : "length"; int min_size; boolean has_any_or_none; if (is_ifpresent) TTCN_error("Performing %sof() operation on a template of type @IPL4asp_Types.SSL_proto_support which has an ifpresent attribute.", op_name); switch (template_selection) { case SPECIFIC_VALUE: { min_size = 0; has_any_or_none = FALSE; int elem_count = single_value.n_elements; if (!is_size) { while (elem_count>0 && !single_value.value_elements[elem_count-1]->is_bound()) elem_count--; } for (int i=0; iget_selection()) { case OMIT_VALUE: TTCN_error("Performing %sof() operation on a template of type @IPL4asp_Types.SSL_proto_support containing omit element.", op_name); case ANY_OR_OMIT: has_any_or_none = TRUE; break; default: min_size++; break; } } } break; case OMIT_VALUE: TTCN_error("Performing %sof() operation on a template of type @IPL4asp_Types.SSL_proto_support containing omit value.", op_name); case ANY_VALUE: case ANY_OR_OMIT: min_size = 0; has_any_or_none = TRUE; break; case VALUE_LIST: { if (value_list.n_values<1) TTCN_error("Performing %sof() operation on a template of type @IPL4asp_Types.SSL_proto_support containing an empty list.", op_name); int item_size = value_list.list_value[0].size_of(is_size); for (unsigned int i = 1; i < value_list.n_values; i++) { if (value_list.list_value[i].size_of(is_size)!=item_size) TTCN_error("Performing %sof() operation on a template of type @IPL4asp_Types.SSL_proto_support containing a value list with different sizes.", op_name); } min_size = item_size; has_any_or_none = FALSE; break; } case COMPLEMENTED_LIST: TTCN_error("Performing %sof() operation on a template of type @IPL4asp_Types.SSL_proto_support containing complemented list.", op_name); default: TTCN_error("Performing %sof() operation on an uninitialized/unsupported template of type @IPL4asp_Types.SSL_proto_support.", op_name); } return check_section_is_single(min_size, has_any_or_none, op_name, "a", "template of type @IPL4asp_Types.SSL_proto_support"); } boolean SSL__proto__support_template::match(const SSL__proto__support& other_value, boolean legacy) const { if (!other_value.is_bound()) return FALSE; int value_length = other_value.size_of(); if (!match_length(value_length)) return FALSE; switch (template_selection) { case SPECIFIC_VALUE: return match_record_of(&other_value, value_length, this, single_value.n_elements, match_function_specific, legacy); case OMIT_VALUE: return FALSE; case ANY_VALUE: case ANY_OR_OMIT: return TRUE; case VALUE_LIST: case COMPLEMENTED_LIST: for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST; return template_selection == COMPLEMENTED_LIST; case CONJUNCTION_MATCH: for (unsigned int i = 0; i < value_list.n_values; i++) { if (!value_list.list_value[i].match(other_value)) { return FALSE; } } return TRUE; case IMPLICATION_MATCH: return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value); case DYNAMIC_MATCH: return dyn_match->ptr->match(other_value); default: TTCN_error("Matching with an uninitialized/unsupported template of type @IPL4asp_Types.SSL_proto_support."); } return FALSE; } boolean SSL__proto__support_template::is_value() const { if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE; for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) if (!single_value.value_elements[elem_count]->is_value()) return FALSE; return TRUE; } SSL__proto__support SSL__proto__support_template::valueof() const { if (template_selection != SPECIFIC_VALUE || is_ifpresent) TTCN_error("Performing a valueof or send operation on a non-specific template of type @IPL4asp_Types.SSL_proto_support."); SSL__proto__support ret_val; ret_val.set_size(single_value.n_elements); for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) if (single_value.value_elements[elem_count]->is_bound()) { ret_val[elem_count] = single_value.value_elements[elem_count]->valueof(); } return ret_val; } SSL__proto__support SSL__proto__support_template::substr(int index, int returncount) const { if (!is_value()) TTCN_error("The first argument of function substr() is a template with non-specific value."); return valueof().substr(index, returncount); } SSL__proto__support SSL__proto__support_template::replace(int index, int len, const SSL__proto__support_template& repl) const { if (!is_value()) TTCN_error("The first argument of function replace() is a template with non-specific value."); if (!repl.is_value()) TTCN_error("The fourth argument of function replace() is a template with non-specific value."); return valueof().replace(index, len, repl.valueof()); } SSL__proto__support SSL__proto__support_template::replace(int index, int len, const SSL__proto__support& repl) const { if (!is_value()) TTCN_error("The first argument of function replace() is a template with non-specific value."); return valueof().replace(index, len, repl); } void SSL__proto__support_template::set_type(template_sel template_type, unsigned int list_length) { clean_up(); switch (template_type) { case VALUE_LIST: case COMPLEMENTED_LIST: case CONJUNCTION_MATCH: value_list.n_values = list_length; value_list.list_value = new SSL__proto__support_template[list_length]; break; default: TTCN_error("Internal error: Setting an invalid type for a template of type @IPL4asp_Types.SSL_proto_support."); } set_selection(template_type); } SSL__proto__support_template& SSL__proto__support_template::list_item(unsigned int list_index) { if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST && template_selection != CONJUNCTION_MATCH) TTCN_error("Internal error: Accessing a list element of a non-list template of type @IPL4asp_Types.SSL_proto_support."); if (list_index >= value_list.n_values) TTCN_error("Internal error: Index overflow in a value list template of type @IPL4asp_Types.SSL_proto_support."); return value_list.list_value[list_index]; } void SSL__proto__support_template::log() const { switch (template_selection) { case SPECIFIC_VALUE: if (single_value.n_elements > 0) { TTCN_Logger::log_event_str("{ "); for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) { if (elem_count > 0) TTCN_Logger::log_event_str(", "); if (permutation_starts_at(elem_count)) TTCN_Logger::log_event_str("permutation("); single_value.value_elements[elem_count]->log(); if (permutation_ends_at(elem_count)) TTCN_Logger::log_char(')'); } TTCN_Logger::log_event_str(" }"); } else TTCN_Logger::log_event_str("{ }"); break; case COMPLEMENTED_LIST: TTCN_Logger::log_event_str("complement"); case CONJUNCTION_MATCH: if (template_selection == CONJUNCTION_MATCH) { TTCN_Logger::log_event_str("conjunct"); } case VALUE_LIST: TTCN_Logger::log_char('('); for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) { if (list_count > 0) TTCN_Logger::log_event_str(", "); value_list.list_value[list_count].log(); } TTCN_Logger::log_char(')'); break; case IMPLICATION_MATCH: implication_.precondition->log(); TTCN_Logger::log_event_str(" implies "); implication_.implied_template->log(); break; case DYNAMIC_MATCH: TTCN_Logger::log_event_str("@dynamic template"); break; default: log_generic(); } log_restricted(); log_ifpresent(); } void SSL__proto__support_template::log_match(const SSL__proto__support& match_value, boolean legacy) const { if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){ if(match(match_value, legacy)){ TTCN_Logger::print_logmatch_buffer(); TTCN_Logger::log_event_str(" matched"); }else{ if (template_selection == SPECIFIC_VALUE && single_value.n_elements > 0 && get_number_of_permutations() == 0 && single_value.n_elements == match_value.size_of()) { size_t previous_size = TTCN_Logger::get_logmatch_buffer_len(); for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) { if(!single_value.value_elements[elem_count]->match(match_value[elem_count], legacy)){ TTCN_Logger::log_logmatch_info("[%d]", elem_count); single_value.value_elements[elem_count]->log_match(match_value[elem_count], legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } log_match_length(single_value.n_elements); } else { TTCN_Logger::print_logmatch_buffer(); match_value.log(); TTCN_Logger::log_event_str(" with "); log(); TTCN_Logger::log_event_str(" unmatched"); } } return; } if (template_selection == SPECIFIC_VALUE && single_value.n_elements > 0 && get_number_of_permutations() == 0 && single_value.n_elements == match_value.size_of()) { TTCN_Logger::log_event_str("{ "); for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) { if (elem_count > 0) TTCN_Logger::log_event_str(", "); single_value.value_elements[elem_count]->log_match(match_value[elem_count], legacy); } TTCN_Logger::log_event_str(" }"); log_match_length(single_value.n_elements); } else { match_value.log(); TTCN_Logger::log_event_str(" with "); log(); if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } } void SSL__proto__support_template::encode_text(Text_Buf& text_buf) const { encode_text_permutation(text_buf); switch (template_selection) { case SPECIFIC_VALUE: text_buf.push_int(single_value.n_elements); for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) single_value.value_elements[elem_count]->encode_text(text_buf); case OMIT_VALUE: case ANY_VALUE: case ANY_OR_OMIT: break; case VALUE_LIST: case COMPLEMENTED_LIST: text_buf.push_int(value_list.n_values); for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) value_list.list_value[list_count].encode_text(text_buf); break; default: TTCN_error("Text encoder: Encoding an uninitialized/unsupported template of type @IPL4asp_Types.SSL_proto_support."); } } void SSL__proto__support_template::decode_text(Text_Buf& text_buf) { clean_up(); decode_text_permutation(text_buf); switch (template_selection) { case SPECIFIC_VALUE: single_value.n_elements = text_buf.pull_int().get_val(); if (single_value.n_elements < 0) TTCN_error("Text decoder: Negative size was received for a template of type @IPL4asp_Types.SSL_proto_support."); single_value.value_elements = (SSL__protocols_template**)allocate_pointers(single_value.n_elements); for (int elem_count = 0; elem_count < single_value.n_elements; elem_count++) { single_value.value_elements[elem_count] = new SSL__protocols_template; single_value.value_elements[elem_count]->decode_text(text_buf); } case OMIT_VALUE: case ANY_VALUE: case ANY_OR_OMIT: break; case VALUE_LIST: case COMPLEMENTED_LIST: value_list.n_values = text_buf.pull_int().get_val(); value_list.list_value = new SSL__proto__support_template[value_list.n_values]; for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) value_list.list_value[list_count].decode_text(text_buf); break; default: TTCN_error("Text decoder: An unknown/unsupported selection was received for a template of type @IPL4asp_Types.SSL_proto_support."); } } boolean SSL__proto__support_template::is_present(boolean legacy) const { if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE; return !match_omit(legacy); } boolean SSL__proto__support_template::match_omit(boolean legacy) const { if (is_ifpresent) return TRUE; switch (template_selection) { case OMIT_VALUE: case ANY_OR_OMIT: return TRUE; case IMPLICATION_MATCH: return !implication_.precondition->match_omit() || implication_.implied_template->match_omit(); case VALUE_LIST: case COMPLEMENTED_LIST: if (legacy) { for (unsigned int i=0; iget_id()->get_index())].set_param(*param.get_elem(p_i)); } break; case Module_Param::MP_Value_List: { set_size(param.get_size()); int curr_idx = 0; for (size_t p_i=0; p_iget_type()) { case Module_Param::MP_NotUsed: curr_idx++; break; case Module_Param::MP_Permutation_Template: { int perm_start_idx = curr_idx; Module_Param* param_i = param.get_elem(p_i); for (size_t perm_i=0; perm_iget_size(); perm_i++) { (*this)[curr_idx].set_param(*(param_i->get_elem(perm_i))); curr_idx++; } int perm_end_idx = curr_idx - 1; add_permutation(perm_start_idx, perm_end_idx); } break; default: (*this)[curr_idx].set_param(*param.get_elem(p_i)); curr_idx++; } } } break; case Module_Param::MP_Implication_Template: { SSL__proto__support_template* precondition = new SSL__proto__support_template; precondition->set_param(*param.get_elem(0)); SSL__proto__support_template* implied_template = new SSL__proto__support_template; implied_template->set_param(*param.get_elem(1)); *this = SSL__proto__support_template(precondition, implied_template); } break; default: param.type_error("record of template", "@IPL4asp_Types.SSL_proto_support"); } is_ifpresent = param.get_ifpresent(); set_length_range(param); } void SSL__proto__support_template::check_restriction(template_res t_res, const char* t_name, boolean legacy) const { if (template_selection==UNINITIALIZED_TEMPLATE) return; switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) { case TR_OMIT: if (template_selection==OMIT_VALUE) return; case TR_VALUE: if (template_selection!=SPECIFIC_VALUE || is_ifpresent) break; for (int i=0; icheck_restriction(t_res, t_name ? t_name : "@IPL4asp_Types.SSL_proto_support"); return; case TR_PRESENT: if (!match_omit(legacy)) return; break; default: return; } TTCN_error("Restriction `%s' on template of type %s violated.", get_res_name(t_res), t_name ? t_name : "@IPL4asp_Types.SSL_proto_support"); } boolean SSL__proto__support_template::get_istemplate_kind(const char* type) const { if (!strcmp(type, "AnyElement")) { if (template_selection != SPECIFIC_VALUE) { return FALSE; } for (int i = 0; i < single_value.n_elements; i++) { if (single_value.value_elements[i]->get_selection() == ANY_VALUE) { return TRUE; } } return FALSE; } else if (!strcmp(type, "AnyElementsOrNone")) { if (template_selection != SPECIFIC_VALUE) { return FALSE; } for (int i = 0; i < single_value.n_elements; i++) { if (single_value.value_elements[i]->get_selection() == ANY_OR_OMIT) { return TRUE; } } return FALSE; } else if (!strcmp(type, "permutation")) { return number_of_permutations; } else if (!strcmp(type, "length")) { return length_restriction_type != NO_LENGTH_RESTRICTION; } else { return Base_Template::get_istemplate_kind(type); } } SSL__cert__options::SSL__cert__options() { } SSL__cert__options::SSL__cert__options(const OPTIONAL< CHARSTRING >& par_ssl__key__file, const OPTIONAL< CHARSTRING >& par_ssl__certificate__file, const OPTIONAL< CHARSTRING >& par_ssl__trustedCAlist__file, const OPTIONAL< CHARSTRING >& par_ssl__cipher__list, const OPTIONAL< CHARSTRING >& par_ssl__password) : field_ssl__key__file(par_ssl__key__file), field_ssl__certificate__file(par_ssl__certificate__file), field_ssl__trustedCAlist__file(par_ssl__trustedCAlist__file), field_ssl__cipher__list(par_ssl__cipher__list), field_ssl__password(par_ssl__password) { } SSL__cert__options::SSL__cert__options(const SSL__cert__options& other_value) { if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @IPL4asp_Types.SSL_cert_options."); if (other_value.ssl__key__file().is_bound()) field_ssl__key__file = other_value.ssl__key__file(); else field_ssl__key__file.clean_up(); if (other_value.ssl__certificate__file().is_bound()) field_ssl__certificate__file = other_value.ssl__certificate__file(); else field_ssl__certificate__file.clean_up(); if (other_value.ssl__trustedCAlist__file().is_bound()) field_ssl__trustedCAlist__file = other_value.ssl__trustedCAlist__file(); else field_ssl__trustedCAlist__file.clean_up(); if (other_value.ssl__cipher__list().is_bound()) field_ssl__cipher__list = other_value.ssl__cipher__list(); else field_ssl__cipher__list.clean_up(); if (other_value.ssl__password().is_bound()) field_ssl__password = other_value.ssl__password(); else field_ssl__password.clean_up(); } void SSL__cert__options::clean_up() { field_ssl__key__file.clean_up(); field_ssl__certificate__file.clean_up(); field_ssl__trustedCAlist__file.clean_up(); field_ssl__cipher__list.clean_up(); field_ssl__password.clean_up(); } const TTCN_Typedescriptor_t* SSL__cert__options::get_descriptor() const { return &SSL__cert__options_descr_; } SSL__cert__options& SSL__cert__options::operator=(const SSL__cert__options& other_value) { if (this != &other_value) { if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @IPL4asp_Types.SSL_cert_options."); if (other_value.ssl__key__file().is_bound()) field_ssl__key__file = other_value.ssl__key__file(); else field_ssl__key__file.clean_up(); if (other_value.ssl__certificate__file().is_bound()) field_ssl__certificate__file = other_value.ssl__certificate__file(); else field_ssl__certificate__file.clean_up(); if (other_value.ssl__trustedCAlist__file().is_bound()) field_ssl__trustedCAlist__file = other_value.ssl__trustedCAlist__file(); else field_ssl__trustedCAlist__file.clean_up(); if (other_value.ssl__cipher__list().is_bound()) field_ssl__cipher__list = other_value.ssl__cipher__list(); else field_ssl__cipher__list.clean_up(); if (other_value.ssl__password().is_bound()) field_ssl__password = other_value.ssl__password(); else field_ssl__password.clean_up(); } return *this; } boolean SSL__cert__options::operator==(const SSL__cert__options& other_value) const { return field_ssl__key__file==other_value.field_ssl__key__file && field_ssl__certificate__file==other_value.field_ssl__certificate__file && field_ssl__trustedCAlist__file==other_value.field_ssl__trustedCAlist__file && field_ssl__cipher__list==other_value.field_ssl__cipher__list && field_ssl__password==other_value.field_ssl__password; } boolean SSL__cert__options::is_bound() const { return (OPTIONAL_OMIT == field_ssl__key__file.get_selection() || field_ssl__key__file.is_bound()) || (OPTIONAL_OMIT == field_ssl__certificate__file.get_selection() || field_ssl__certificate__file.is_bound()) || (OPTIONAL_OMIT == field_ssl__trustedCAlist__file.get_selection() || field_ssl__trustedCAlist__file.is_bound()) || (OPTIONAL_OMIT == field_ssl__cipher__list.get_selection() || field_ssl__cipher__list.is_bound()) || (OPTIONAL_OMIT == field_ssl__password.get_selection() || field_ssl__password.is_bound()); } boolean SSL__cert__options::is_value() const { return (OPTIONAL_OMIT == field_ssl__key__file.get_selection() || field_ssl__key__file.is_value()) && (OPTIONAL_OMIT == field_ssl__certificate__file.get_selection() || field_ssl__certificate__file.is_value()) && (OPTIONAL_OMIT == field_ssl__trustedCAlist__file.get_selection() || field_ssl__trustedCAlist__file.is_value()) && (OPTIONAL_OMIT == field_ssl__cipher__list.get_selection() || field_ssl__cipher__list.is_value()) && (OPTIONAL_OMIT == field_ssl__password.get_selection() || field_ssl__password.is_value()); } int SSL__cert__options::size_of() const { int ret_val = 0; if (field_ssl__key__file.ispresent()) ret_val++; if (field_ssl__certificate__file.ispresent()) ret_val++; if (field_ssl__trustedCAlist__file.ispresent()) ret_val++; if (field_ssl__cipher__list.ispresent()) ret_val++; if (field_ssl__password.ispresent()) ret_val++; return ret_val; } void SSL__cert__options::log() const { if (!is_bound()) { TTCN_Logger::log_event_unbound(); return; } TTCN_Logger::log_event_str("{ ssl_key_file := "); field_ssl__key__file.log(); TTCN_Logger::log_event_str(", ssl_certificate_file := "); field_ssl__certificate__file.log(); TTCN_Logger::log_event_str(", ssl_trustedCAlist_file := "); field_ssl__trustedCAlist__file.log(); TTCN_Logger::log_event_str(", ssl_cipher_list := "); field_ssl__cipher__list.log(); TTCN_Logger::log_event_str(", ssl_password := "); field_ssl__password.log(); TTCN_Logger::log_event_str(" }"); } void SSL__cert__options::set_implicit_omit() { if (!ssl__key__file().is_bound()) ssl__key__file() = OMIT_VALUE; else ssl__key__file().set_implicit_omit(); if (!ssl__certificate__file().is_bound()) ssl__certificate__file() = OMIT_VALUE; else ssl__certificate__file().set_implicit_omit(); if (!ssl__trustedCAlist__file().is_bound()) ssl__trustedCAlist__file() = OMIT_VALUE; else ssl__trustedCAlist__file().set_implicit_omit(); if (!ssl__cipher__list().is_bound()) ssl__cipher__list() = OMIT_VALUE; else ssl__cipher__list().set_implicit_omit(); if (!ssl__password().is_bound()) ssl__password() = OMIT_VALUE; else ssl__password().set_implicit_omit(); } void SSL__cert__options::set_param(Module_Param& param) { param.basic_check(Module_Param::BC_VALUE, "record value"); switch (param.get_type()) { case Module_Param::MP_Value_List: if (50 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) ssl__key__file().set_param(*param.get_elem(0)); if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) ssl__certificate__file().set_param(*param.get_elem(1)); if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) ssl__trustedCAlist__file().set_param(*param.get_elem(2)); if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) ssl__cipher__list().set_param(*param.get_elem(3)); if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) ssl__password().set_param(*param.get_elem(4)); break; case Module_Param::MP_Assignment_List: { Vector value_used(param.get_size()); value_used.resize(param.get_size(), FALSE); for (size_t val_idx=0; val_idxget_id()->get_name(), "ssl_key_file")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { ssl__key__file().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "ssl_certificate_file")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { ssl__certificate__file().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "ssl_trustedCAlist_file")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { ssl__trustedCAlist__file().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "ssl_cipher_list")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { ssl__cipher__list().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "ssl_password")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { ssl__password().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxerror("Non existent field name in type @IPL4asp_Types.SSL_cert_options: %s", curr_param->get_id()->get_name()); break; } } break; default: param.type_error("record value", "@IPL4asp_Types.SSL_cert_options"); } } void SSL__cert__options::encode_text(Text_Buf& text_buf) const { field_ssl__key__file.encode_text(text_buf); field_ssl__certificate__file.encode_text(text_buf); field_ssl__trustedCAlist__file.encode_text(text_buf); field_ssl__cipher__list.encode_text(text_buf); field_ssl__password.encode_text(text_buf); } void SSL__cert__options::decode_text(Text_Buf& text_buf) { field_ssl__key__file.decode_text(text_buf); field_ssl__certificate__file.decode_text(text_buf); field_ssl__trustedCAlist__file.decode_text(text_buf); field_ssl__cipher__list.decode_text(text_buf); field_ssl__password.decode_text(text_buf); } struct SSL__cert__options_template::single_value_struct { CHARSTRING_template field_ssl__key__file; CHARSTRING_template field_ssl__certificate__file; CHARSTRING_template field_ssl__trustedCAlist__file; CHARSTRING_template field_ssl__cipher__list; CHARSTRING_template field_ssl__password; }; void SSL__cert__options_template::set_specific() { if (template_selection != SPECIFIC_VALUE) { template_sel old_selection = template_selection; clean_up(); single_value = new single_value_struct; set_selection(SPECIFIC_VALUE); if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) { single_value->field_ssl__key__file = ANY_OR_OMIT; single_value->field_ssl__certificate__file = ANY_OR_OMIT; single_value->field_ssl__trustedCAlist__file = ANY_OR_OMIT; single_value->field_ssl__cipher__list = ANY_OR_OMIT; single_value->field_ssl__password = ANY_OR_OMIT; } } } void SSL__cert__options_template::copy_value(const SSL__cert__options& other_value) { single_value = new single_value_struct; if (other_value.ssl__key__file().is_bound()) { if (other_value.ssl__key__file().ispresent()) single_value->field_ssl__key__file = other_value.ssl__key__file()(); else single_value->field_ssl__key__file = OMIT_VALUE; } else { single_value->field_ssl__key__file.clean_up(); } if (other_value.ssl__certificate__file().is_bound()) { if (other_value.ssl__certificate__file().ispresent()) single_value->field_ssl__certificate__file = other_value.ssl__certificate__file()(); else single_value->field_ssl__certificate__file = OMIT_VALUE; } else { single_value->field_ssl__certificate__file.clean_up(); } if (other_value.ssl__trustedCAlist__file().is_bound()) { if (other_value.ssl__trustedCAlist__file().ispresent()) single_value->field_ssl__trustedCAlist__file = other_value.ssl__trustedCAlist__file()(); else single_value->field_ssl__trustedCAlist__file = OMIT_VALUE; } else { single_value->field_ssl__trustedCAlist__file.clean_up(); } if (other_value.ssl__cipher__list().is_bound()) { if (other_value.ssl__cipher__list().ispresent()) single_value->field_ssl__cipher__list = other_value.ssl__cipher__list()(); else single_value->field_ssl__cipher__list = OMIT_VALUE; } else { single_value->field_ssl__cipher__list.clean_up(); } if (other_value.ssl__password().is_bound()) { if (other_value.ssl__password().ispresent()) single_value->field_ssl__password = other_value.ssl__password()(); else single_value->field_ssl__password = OMIT_VALUE; } else { single_value->field_ssl__password.clean_up(); } set_selection(SPECIFIC_VALUE); } void SSL__cert__options_template::copy_template(const SSL__cert__options_template& other_value) { switch (other_value.template_selection) { case SPECIFIC_VALUE: single_value = new single_value_struct; if (UNINITIALIZED_TEMPLATE != other_value.ssl__key__file().get_selection()) { single_value->field_ssl__key__file = other_value.ssl__key__file(); } else { single_value->field_ssl__key__file.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.ssl__certificate__file().get_selection()) { single_value->field_ssl__certificate__file = other_value.ssl__certificate__file(); } else { single_value->field_ssl__certificate__file.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.ssl__trustedCAlist__file().get_selection()) { single_value->field_ssl__trustedCAlist__file = other_value.ssl__trustedCAlist__file(); } else { single_value->field_ssl__trustedCAlist__file.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.ssl__cipher__list().get_selection()) { single_value->field_ssl__cipher__list = other_value.ssl__cipher__list(); } else { single_value->field_ssl__cipher__list.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.ssl__password().get_selection()) { single_value->field_ssl__password = other_value.ssl__password(); } else { single_value->field_ssl__password.clean_up(); } case OMIT_VALUE: case ANY_VALUE: case ANY_OR_OMIT: break; case VALUE_LIST: case COMPLEMENTED_LIST: case CONJUNCTION_MATCH: value_list.n_values = other_value.value_list.n_values; value_list.list_value = new SSL__cert__options_template[value_list.n_values]; for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) value_list.list_value[list_count].copy_template(other_value.value_list.list_value[list_count]); break; case IMPLICATION_MATCH: implication_.precondition = new SSL__cert__options_template(*other_value.implication_.precondition); implication_.implied_template = new SSL__cert__options_template(*other_value.implication_.implied_template); break; case DYNAMIC_MATCH: dyn_match = other_value.dyn_match; dyn_match->ref_count++; break; default: TTCN_error("Copying an uninitialized/unsupported template of type @IPL4asp_Types.SSL_cert_options."); break; } set_selection(other_value); } SSL__cert__options_template::SSL__cert__options_template() { } SSL__cert__options_template::SSL__cert__options_template(template_sel other_value) : Base_Template(other_value) { check_single_selection(other_value); } SSL__cert__options_template::SSL__cert__options_template(const SSL__cert__options& other_value) { copy_value(other_value); } SSL__cert__options_template::SSL__cert__options_template(const OPTIONAL& other_value) { switch (other_value.get_selection()) { case OPTIONAL_PRESENT: copy_value((const SSL__cert__options&)other_value); break; case OPTIONAL_OMIT: set_selection(OMIT_VALUE); break; default: TTCN_error("Creating a template of type @IPL4asp_Types.SSL_cert_options from an unbound optional field."); } } SSL__cert__options_template::SSL__cert__options_template(SSL__cert__options_template* p_precondition, SSL__cert__options_template* p_implied_template) : Base_Template(IMPLICATION_MATCH) { implication_.precondition = p_precondition; implication_.implied_template = p_implied_template; } SSL__cert__options_template::SSL__cert__options_template(Dynamic_Match_Interface* p_dyn_match) : Base_Template(DYNAMIC_MATCH) { dyn_match = new dynmatch_struct; dyn_match->ptr = p_dyn_match; dyn_match->ref_count = 1; } SSL__cert__options_template::SSL__cert__options_template(const SSL__cert__options_template& other_value) : Base_Template() { copy_template(other_value); } SSL__cert__options_template::~SSL__cert__options_template() { clean_up(); } SSL__cert__options_template& SSL__cert__options_template::operator=(template_sel other_value) { check_single_selection(other_value); clean_up(); set_selection(other_value); return *this; } SSL__cert__options_template& SSL__cert__options_template::operator=(const SSL__cert__options& other_value) { clean_up(); copy_value(other_value); return *this; } SSL__cert__options_template& SSL__cert__options_template::operator=(const OPTIONAL& other_value) { clean_up(); switch (other_value.get_selection()) { case OPTIONAL_PRESENT: copy_value((const SSL__cert__options&)other_value); break; case OPTIONAL_OMIT: set_selection(OMIT_VALUE); break; default: TTCN_error("Assignment of an unbound optional field to a template of type @IPL4asp_Types.SSL_cert_options."); } return *this; } SSL__cert__options_template& SSL__cert__options_template::operator=(const SSL__cert__options_template& other_value) { if (&other_value != this) { clean_up(); copy_template(other_value); } return *this; } boolean SSL__cert__options_template::match(const SSL__cert__options& other_value, boolean legacy) const { if (!other_value.is_bound()) return FALSE; switch (template_selection) { case ANY_VALUE: case ANY_OR_OMIT: return TRUE; case OMIT_VALUE: return FALSE; case SPECIFIC_VALUE: if(!other_value.ssl__key__file().is_bound()) return FALSE; if((other_value.ssl__key__file().ispresent() ? !single_value->field_ssl__key__file.match((const CHARSTRING&)other_value.ssl__key__file(), legacy) : !single_value->field_ssl__key__file.match_omit(legacy)))return FALSE; if(!other_value.ssl__certificate__file().is_bound()) return FALSE; if((other_value.ssl__certificate__file().ispresent() ? !single_value->field_ssl__certificate__file.match((const CHARSTRING&)other_value.ssl__certificate__file(), legacy) : !single_value->field_ssl__certificate__file.match_omit(legacy)))return FALSE; if(!other_value.ssl__trustedCAlist__file().is_bound()) return FALSE; if((other_value.ssl__trustedCAlist__file().ispresent() ? !single_value->field_ssl__trustedCAlist__file.match((const CHARSTRING&)other_value.ssl__trustedCAlist__file(), legacy) : !single_value->field_ssl__trustedCAlist__file.match_omit(legacy)))return FALSE; if(!other_value.ssl__cipher__list().is_bound()) return FALSE; if((other_value.ssl__cipher__list().ispresent() ? !single_value->field_ssl__cipher__list.match((const CHARSTRING&)other_value.ssl__cipher__list(), legacy) : !single_value->field_ssl__cipher__list.match_omit(legacy)))return FALSE; if(!other_value.ssl__password().is_bound()) return FALSE; if((other_value.ssl__password().ispresent() ? !single_value->field_ssl__password.match((const CHARSTRING&)other_value.ssl__password(), legacy) : !single_value->field_ssl__password.match_omit(legacy)))return FALSE; return TRUE; case VALUE_LIST: case COMPLEMENTED_LIST: for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST; return template_selection == COMPLEMENTED_LIST; case CONJUNCTION_MATCH: for (unsigned int i = 0; i < value_list.n_values; i++) { if (!value_list.list_value[i].match(other_value)) { return FALSE; } } return TRUE; case IMPLICATION_MATCH: return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value); case DYNAMIC_MATCH: return dyn_match->ptr->match(other_value); default: TTCN_error("Matching an uninitialized/unsupported template of type @IPL4asp_Types.SSL_cert_options."); } return FALSE; } boolean SSL__cert__options_template::is_bound() const { if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE; if (template_selection != SPECIFIC_VALUE) return TRUE; return (single_value->field_ssl__key__file.is_omit() || single_value->field_ssl__key__file.is_bound()) || (single_value->field_ssl__certificate__file.is_omit() || single_value->field_ssl__certificate__file.is_bound()) || (single_value->field_ssl__trustedCAlist__file.is_omit() || single_value->field_ssl__trustedCAlist__file.is_bound()) || (single_value->field_ssl__cipher__list.is_omit() || single_value->field_ssl__cipher__list.is_bound()) || (single_value->field_ssl__password.is_omit() || single_value->field_ssl__password.is_bound()); } boolean SSL__cert__options_template::is_value() const { if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE; return (single_value->field_ssl__key__file.is_omit() || single_value->field_ssl__key__file.is_value()) && (single_value->field_ssl__certificate__file.is_omit() || single_value->field_ssl__certificate__file.is_value()) && (single_value->field_ssl__trustedCAlist__file.is_omit() || single_value->field_ssl__trustedCAlist__file.is_value()) && (single_value->field_ssl__cipher__list.is_omit() || single_value->field_ssl__cipher__list.is_value()) && (single_value->field_ssl__password.is_omit() || single_value->field_ssl__password.is_value()); } void SSL__cert__options_template::clean_up() { switch (template_selection) { case SPECIFIC_VALUE: delete single_value; break; case VALUE_LIST: case COMPLEMENTED_LIST: case CONJUNCTION_MATCH: delete [] value_list.list_value; break; case IMPLICATION_MATCH: delete implication_.precondition; delete implication_.implied_template; break; case DYNAMIC_MATCH: dyn_match->ref_count--; if (dyn_match->ref_count == 0) { delete dyn_match->ptr; delete dyn_match; } break; default: break; } template_selection = UNINITIALIZED_TEMPLATE; } SSL__cert__options SSL__cert__options_template::valueof() const { if (template_selection != SPECIFIC_VALUE || is_ifpresent) TTCN_error("Performing a valueof or send operation on a non-specific template of type @IPL4asp_Types.SSL_cert_options."); SSL__cert__options ret_val; if (single_value->field_ssl__key__file.is_omit()) ret_val.ssl__key__file() = OMIT_VALUE; else if (single_value->field_ssl__key__file.is_bound()) { ret_val.ssl__key__file() = single_value->field_ssl__key__file.valueof(); } if (single_value->field_ssl__certificate__file.is_omit()) ret_val.ssl__certificate__file() = OMIT_VALUE; else if (single_value->field_ssl__certificate__file.is_bound()) { ret_val.ssl__certificate__file() = single_value->field_ssl__certificate__file.valueof(); } if (single_value->field_ssl__trustedCAlist__file.is_omit()) ret_val.ssl__trustedCAlist__file() = OMIT_VALUE; else if (single_value->field_ssl__trustedCAlist__file.is_bound()) { ret_val.ssl__trustedCAlist__file() = single_value->field_ssl__trustedCAlist__file.valueof(); } if (single_value->field_ssl__cipher__list.is_omit()) ret_val.ssl__cipher__list() = OMIT_VALUE; else if (single_value->field_ssl__cipher__list.is_bound()) { ret_val.ssl__cipher__list() = single_value->field_ssl__cipher__list.valueof(); } if (single_value->field_ssl__password.is_omit()) ret_val.ssl__password() = OMIT_VALUE; else if (single_value->field_ssl__password.is_bound()) { ret_val.ssl__password() = single_value->field_ssl__password.valueof(); } return ret_val; } void SSL__cert__options_template::set_type(template_sel template_type, unsigned int list_length) { if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST&& template_type != CONJUNCTION_MATCH) TTCN_error("Setting an invalid list for a template of type @IPL4asp_Types.SSL_cert_options."); clean_up(); set_selection(template_type); value_list.n_values = list_length; value_list.list_value = new SSL__cert__options_template[list_length]; } SSL__cert__options_template& SSL__cert__options_template::list_item(unsigned int list_index) const { if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST&& template_selection != CONJUNCTION_MATCH) TTCN_error("Accessing a list element of a non-list template of type @IPL4asp_Types.SSL_cert_options."); if (list_index >= value_list.n_values) TTCN_error("Index overflow in a value list template of type @IPL4asp_Types.SSL_cert_options."); return value_list.list_value[list_index]; } CHARSTRING_template& SSL__cert__options_template::ssl__key__file() { set_specific(); return single_value->field_ssl__key__file; } const CHARSTRING_template& SSL__cert__options_template::ssl__key__file() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field ssl_key_file of a non-specific template of type @IPL4asp_Types.SSL_cert_options."); return single_value->field_ssl__key__file; } CHARSTRING_template& SSL__cert__options_template::ssl__certificate__file() { set_specific(); return single_value->field_ssl__certificate__file; } const CHARSTRING_template& SSL__cert__options_template::ssl__certificate__file() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field ssl_certificate_file of a non-specific template of type @IPL4asp_Types.SSL_cert_options."); return single_value->field_ssl__certificate__file; } CHARSTRING_template& SSL__cert__options_template::ssl__trustedCAlist__file() { set_specific(); return single_value->field_ssl__trustedCAlist__file; } const CHARSTRING_template& SSL__cert__options_template::ssl__trustedCAlist__file() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field ssl_trustedCAlist_file of a non-specific template of type @IPL4asp_Types.SSL_cert_options."); return single_value->field_ssl__trustedCAlist__file; } CHARSTRING_template& SSL__cert__options_template::ssl__cipher__list() { set_specific(); return single_value->field_ssl__cipher__list; } const CHARSTRING_template& SSL__cert__options_template::ssl__cipher__list() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field ssl_cipher_list of a non-specific template of type @IPL4asp_Types.SSL_cert_options."); return single_value->field_ssl__cipher__list; } CHARSTRING_template& SSL__cert__options_template::ssl__password() { set_specific(); return single_value->field_ssl__password; } const CHARSTRING_template& SSL__cert__options_template::ssl__password() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field ssl_password of a non-specific template of type @IPL4asp_Types.SSL_cert_options."); return single_value->field_ssl__password; } int SSL__cert__options_template::size_of() const { if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @IPL4asp_Types.SSL_cert_options which has an ifpresent attribute."); switch (template_selection) { case SPECIFIC_VALUE: { int ret_val = 0; if (single_value->field_ssl__key__file.is_present()) ret_val++; if (single_value->field_ssl__certificate__file.is_present()) ret_val++; if (single_value->field_ssl__trustedCAlist__file.is_present()) ret_val++; if (single_value->field_ssl__cipher__list.is_present()) ret_val++; if (single_value->field_ssl__password.is_present()) ret_val++; return ret_val; } case VALUE_LIST: { if (value_list.n_values<1) TTCN_error("Internal error: Performing sizeof() operation on a template of type @IPL4asp_Types.SSL_cert_options containing an empty list."); int item_size = value_list.list_value[0].size_of(); for (unsigned int l_idx = 1; l_idx < value_list.n_values; l_idx++) { if (value_list.list_value[l_idx].size_of()!=item_size) TTCN_error("Performing sizeof() operation on a template of type @IPL4asp_Types.SSL_cert_options containing a value list with different sizes."); } return item_size; } case OMIT_VALUE: TTCN_error("Performing sizeof() operation on a template of type @IPL4asp_Types.SSL_cert_options containing omit value."); case ANY_VALUE: case ANY_OR_OMIT: TTCN_error("Performing sizeof() operation on a template of type @IPL4asp_Types.SSL_cert_options containing */? value."); case COMPLEMENTED_LIST: TTCN_error("Performing sizeof() operation on a template of type @IPL4asp_Types.SSL_cert_options containing complemented list."); case CONJUNCTION_MATCH: TTCN_error("Performing sizeof() operation on a template of type @IPL4asp_Types.SSL_cert_options containing a conjunction list match."); case IMPLICATION_MATCH: TTCN_error("Performing sizeof() operation on a template of type @IPL4asp_Types.SSL_cert_options containing an implication match."); case DYNAMIC_MATCH: TTCN_error("Performing sizeof() operation on a template of type @IPL4asp_Types.SSL_cert_options containing a dynamic match."); default: TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @IPL4asp_Types.SSL_cert_options."); } return 0; } void SSL__cert__options_template::log() const { switch (template_selection) { case SPECIFIC_VALUE: TTCN_Logger::log_event_str("{ ssl_key_file := "); single_value->field_ssl__key__file.log(); TTCN_Logger::log_event_str(", ssl_certificate_file := "); single_value->field_ssl__certificate__file.log(); TTCN_Logger::log_event_str(", ssl_trustedCAlist_file := "); single_value->field_ssl__trustedCAlist__file.log(); TTCN_Logger::log_event_str(", ssl_cipher_list := "); single_value->field_ssl__cipher__list.log(); TTCN_Logger::log_event_str(", ssl_password := "); single_value->field_ssl__password.log(); TTCN_Logger::log_event_str(" }"); break; case COMPLEMENTED_LIST: TTCN_Logger::log_event_str("complement"); case CONJUNCTION_MATCH: if (template_selection == CONJUNCTION_MATCH) { TTCN_Logger::log_event_str("conjunct"); } case VALUE_LIST: TTCN_Logger::log_char('('); for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) { if (list_count > 0) TTCN_Logger::log_event_str(", "); value_list.list_value[list_count].log(); } TTCN_Logger::log_char(')'); break; case IMPLICATION_MATCH: implication_.precondition->log(); TTCN_Logger::log_event_str(" implies "); implication_.implied_template->log(); break; case DYNAMIC_MATCH: TTCN_Logger::log_event_str("@dynamic template"); break; default: log_generic(); } log_ifpresent(); } void SSL__cert__options_template::log_match(const SSL__cert__options& match_value, boolean legacy) const { if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){ if(match(match_value, legacy)){ TTCN_Logger::print_logmatch_buffer(); TTCN_Logger::log_event_str(" matched"); } else{ if (template_selection == SPECIFIC_VALUE) { size_t previous_size = TTCN_Logger::get_logmatch_buffer_len(); if (match_value.ssl__key__file().ispresent()){ if(!single_value->field_ssl__key__file.match(match_value.ssl__key__file(), legacy)){ TTCN_Logger::log_logmatch_info(".ssl_key_file"); single_value->field_ssl__key__file.log_match(match_value.ssl__key__file(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } else { if (!single_value->field_ssl__key__file.match_omit(legacy)){ TTCN_Logger::log_logmatch_info(".ssl_key_file := omit with "); TTCN_Logger::print_logmatch_buffer(); single_value->field_ssl__key__file.log(); TTCN_Logger::log_event_str(" unmatched"); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } if (match_value.ssl__certificate__file().ispresent()){ if(!single_value->field_ssl__certificate__file.match(match_value.ssl__certificate__file(), legacy)){ TTCN_Logger::log_logmatch_info(".ssl_certificate_file"); single_value->field_ssl__certificate__file.log_match(match_value.ssl__certificate__file(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } else { if (!single_value->field_ssl__certificate__file.match_omit(legacy)){ TTCN_Logger::log_logmatch_info(".ssl_certificate_file := omit with "); TTCN_Logger::print_logmatch_buffer(); single_value->field_ssl__certificate__file.log(); TTCN_Logger::log_event_str(" unmatched"); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } if (match_value.ssl__trustedCAlist__file().ispresent()){ if(!single_value->field_ssl__trustedCAlist__file.match(match_value.ssl__trustedCAlist__file(), legacy)){ TTCN_Logger::log_logmatch_info(".ssl_trustedCAlist_file"); single_value->field_ssl__trustedCAlist__file.log_match(match_value.ssl__trustedCAlist__file(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } else { if (!single_value->field_ssl__trustedCAlist__file.match_omit(legacy)){ TTCN_Logger::log_logmatch_info(".ssl_trustedCAlist_file := omit with "); TTCN_Logger::print_logmatch_buffer(); single_value->field_ssl__trustedCAlist__file.log(); TTCN_Logger::log_event_str(" unmatched"); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } if (match_value.ssl__cipher__list().ispresent()){ if(!single_value->field_ssl__cipher__list.match(match_value.ssl__cipher__list(), legacy)){ TTCN_Logger::log_logmatch_info(".ssl_cipher_list"); single_value->field_ssl__cipher__list.log_match(match_value.ssl__cipher__list(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } else { if (!single_value->field_ssl__cipher__list.match_omit(legacy)){ TTCN_Logger::log_logmatch_info(".ssl_cipher_list := omit with "); TTCN_Logger::print_logmatch_buffer(); single_value->field_ssl__cipher__list.log(); TTCN_Logger::log_event_str(" unmatched"); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } if (match_value.ssl__password().ispresent()){ if(!single_value->field_ssl__password.match(match_value.ssl__password(), legacy)){ TTCN_Logger::log_logmatch_info(".ssl_password"); single_value->field_ssl__password.log_match(match_value.ssl__password(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } else { if (!single_value->field_ssl__password.match_omit(legacy)){ TTCN_Logger::log_logmatch_info(".ssl_password := omit with "); TTCN_Logger::print_logmatch_buffer(); single_value->field_ssl__password.log(); TTCN_Logger::log_event_str(" unmatched"); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } }else { TTCN_Logger::print_logmatch_buffer(); match_value.log(); TTCN_Logger::log_event_str(" with "); log(); TTCN_Logger::log_event_str(" unmatched"); } } return; } if (template_selection == SPECIFIC_VALUE) { TTCN_Logger::log_event_str("{ ssl_key_file := "); if (match_value.ssl__key__file().ispresent()) { single_value->field_ssl__key__file.log_match(match_value.ssl__key__file(), legacy); } else { TTCN_Logger::log_event_str("omit with "); single_value->field_ssl__key__file.log(); if (single_value->field_ssl__key__file.match_omit(legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } TTCN_Logger::log_event_str(", ssl_certificate_file := "); if (match_value.ssl__certificate__file().ispresent()) { single_value->field_ssl__certificate__file.log_match(match_value.ssl__certificate__file(), legacy); } else { TTCN_Logger::log_event_str("omit with "); single_value->field_ssl__certificate__file.log(); if (single_value->field_ssl__certificate__file.match_omit(legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } TTCN_Logger::log_event_str(", ssl_trustedCAlist_file := "); if (match_value.ssl__trustedCAlist__file().ispresent()) { single_value->field_ssl__trustedCAlist__file.log_match(match_value.ssl__trustedCAlist__file(), legacy); } else { TTCN_Logger::log_event_str("omit with "); single_value->field_ssl__trustedCAlist__file.log(); if (single_value->field_ssl__trustedCAlist__file.match_omit(legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } TTCN_Logger::log_event_str(", ssl_cipher_list := "); if (match_value.ssl__cipher__list().ispresent()) { single_value->field_ssl__cipher__list.log_match(match_value.ssl__cipher__list(), legacy); } else { TTCN_Logger::log_event_str("omit with "); single_value->field_ssl__cipher__list.log(); if (single_value->field_ssl__cipher__list.match_omit(legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } TTCN_Logger::log_event_str(", ssl_password := "); if (match_value.ssl__password().ispresent()) { single_value->field_ssl__password.log_match(match_value.ssl__password(), legacy); } else { TTCN_Logger::log_event_str("omit with "); single_value->field_ssl__password.log(); if (single_value->field_ssl__password.match_omit(legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } TTCN_Logger::log_event_str(" }"); } else { match_value.log(); TTCN_Logger::log_event_str(" with "); log(); if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } } void SSL__cert__options_template::encode_text(Text_Buf& text_buf) const { encode_text_base(text_buf); switch (template_selection) { case SPECIFIC_VALUE: single_value->field_ssl__key__file.encode_text(text_buf); single_value->field_ssl__certificate__file.encode_text(text_buf); single_value->field_ssl__trustedCAlist__file.encode_text(text_buf); single_value->field_ssl__cipher__list.encode_text(text_buf); single_value->field_ssl__password.encode_text(text_buf); case OMIT_VALUE: case ANY_VALUE: case ANY_OR_OMIT: break; case VALUE_LIST: case COMPLEMENTED_LIST: text_buf.push_int(value_list.n_values); for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) value_list.list_value[list_count].encode_text(text_buf); break; default: TTCN_error("Text encoder: Encoding an uninitialized/unsupported template of type @IPL4asp_Types.SSL_cert_options."); } } void SSL__cert__options_template::decode_text(Text_Buf& text_buf) { clean_up(); decode_text_base(text_buf); switch (template_selection) { case SPECIFIC_VALUE: single_value = new single_value_struct; single_value->field_ssl__key__file.decode_text(text_buf); single_value->field_ssl__certificate__file.decode_text(text_buf); single_value->field_ssl__trustedCAlist__file.decode_text(text_buf); single_value->field_ssl__cipher__list.decode_text(text_buf); single_value->field_ssl__password.decode_text(text_buf); case OMIT_VALUE: case ANY_VALUE: case ANY_OR_OMIT: break; case VALUE_LIST: case COMPLEMENTED_LIST: value_list.n_values = text_buf.pull_int().get_val(); value_list.list_value = new SSL__cert__options_template[value_list.n_values]; for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) value_list.list_value[list_count].decode_text(text_buf); break; default: TTCN_error("Text decoder: An unknown/unsupported selection was received in a template of type @IPL4asp_Types.SSL_cert_options."); } } void SSL__cert__options_template::set_param(Module_Param& param) { param.basic_check(Module_Param::BC_TEMPLATE, "record template"); switch (param.get_type()) { case Module_Param::MP_Omit: *this = OMIT_VALUE; break; case Module_Param::MP_Any: *this = ANY_VALUE; break; case Module_Param::MP_AnyOrNone: *this = ANY_OR_OMIT; break; case Module_Param::MP_List_Template: case Module_Param::MP_ComplementList_Template: case Module_Param::MP_ConjunctList_Template: { SSL__cert__options_template new_temp; new_temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (param.get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), param.get_size()); for (size_t p_i=0; p_i0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) ssl__key__file().set_param(*param.get_elem(0)); if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) ssl__certificate__file().set_param(*param.get_elem(1)); if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) ssl__trustedCAlist__file().set_param(*param.get_elem(2)); if (param.get_size()>3 && param.get_elem(3)->get_type()!=Module_Param::MP_NotUsed) ssl__cipher__list().set_param(*param.get_elem(3)); if (param.get_size()>4 && param.get_elem(4)->get_type()!=Module_Param::MP_NotUsed) ssl__password().set_param(*param.get_elem(4)); break; case Module_Param::MP_Assignment_List: { Vector value_used(param.get_size()); value_used.resize(param.get_size(), FALSE); for (size_t val_idx=0; val_idxget_id()->get_name(), "ssl_key_file")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { ssl__key__file().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "ssl_certificate_file")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { ssl__certificate__file().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "ssl_trustedCAlist_file")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { ssl__trustedCAlist__file().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "ssl_cipher_list")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { ssl__cipher__list().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "ssl_password")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { ssl__password().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxerror("Non existent field name in type @IPL4asp_Types.SSL_cert_options: %s", curr_param->get_id()->get_name()); break; } } break; case Module_Param::MP_Implication_Template: { SSL__cert__options_template* precondition = new SSL__cert__options_template; precondition->set_param(*param.get_elem(0)); SSL__cert__options_template* implied_template = new SSL__cert__options_template; implied_template->set_param(*param.get_elem(1)); *this = SSL__cert__options_template(precondition, implied_template); } break; default: param.type_error("record template", "@IPL4asp_Types.SSL_cert_options"); } is_ifpresent = param.get_ifpresent(); } void SSL__cert__options_template::check_restriction(template_res t_res, const char* t_name, boolean legacy) const { if (template_selection==UNINITIALIZED_TEMPLATE) return; switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) { case TR_OMIT: if (template_selection==OMIT_VALUE) return; case TR_VALUE: if (template_selection!=SPECIFIC_VALUE || is_ifpresent) break; single_value->field_ssl__key__file.check_restriction(t_res, t_name ? t_name : "@IPL4asp_Types.SSL_cert_options"); single_value->field_ssl__certificate__file.check_restriction(t_res, t_name ? t_name : "@IPL4asp_Types.SSL_cert_options"); single_value->field_ssl__trustedCAlist__file.check_restriction(t_res, t_name ? t_name : "@IPL4asp_Types.SSL_cert_options"); single_value->field_ssl__cipher__list.check_restriction(t_res, t_name ? t_name : "@IPL4asp_Types.SSL_cert_options"); single_value->field_ssl__password.check_restriction(t_res, t_name ? t_name : "@IPL4asp_Types.SSL_cert_options"); return; case TR_PRESENT: if (!match_omit(legacy)) return; break; default: return; } TTCN_error("Restriction `%s' on template of type %s violated.", get_res_name(t_res), t_name ? t_name : "@IPL4asp_Types.SSL_cert_options"); } boolean SSL__cert__options_template::is_present(boolean legacy) const { if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE; return !match_omit(legacy); } boolean SSL__cert__options_template::match_omit(boolean legacy) const { if (is_ifpresent) return TRUE; switch (template_selection) { case OMIT_VALUE: case ANY_OR_OMIT: return TRUE; case IMPLICATION_MATCH: return !implication_.precondition->match_omit() || implication_.implied_template->match_omit(); case VALUE_LIST: case COMPLEMENTED_LIST: if (legacy) { for (unsigned int l_idx=0; l_idx& par_psk__identity, const OPTIONAL< CHARSTRING >& par_psk__identity__hint, const OPTIONAL< CHARSTRING >& par_psk__key) : field_psk__identity(par_psk__identity), field_psk__identity__hint(par_psk__identity__hint), field_psk__key(par_psk__key) { } PSK__options::PSK__options(const PSK__options& other_value) { if(!other_value.is_bound()) TTCN_error("Copying an unbound value of type @IPL4asp_Types.PSK_options."); if (other_value.psk__identity().is_bound()) field_psk__identity = other_value.psk__identity(); else field_psk__identity.clean_up(); if (other_value.psk__identity__hint().is_bound()) field_psk__identity__hint = other_value.psk__identity__hint(); else field_psk__identity__hint.clean_up(); if (other_value.psk__key().is_bound()) field_psk__key = other_value.psk__key(); else field_psk__key.clean_up(); } void PSK__options::clean_up() { field_psk__identity.clean_up(); field_psk__identity__hint.clean_up(); field_psk__key.clean_up(); } const TTCN_Typedescriptor_t* PSK__options::get_descriptor() const { return &PSK__options_descr_; } PSK__options& PSK__options::operator=(const PSK__options& other_value) { if (this != &other_value) { if(!other_value.is_bound()) TTCN_error("Assignment of an unbound value of type @IPL4asp_Types.PSK_options."); if (other_value.psk__identity().is_bound()) field_psk__identity = other_value.psk__identity(); else field_psk__identity.clean_up(); if (other_value.psk__identity__hint().is_bound()) field_psk__identity__hint = other_value.psk__identity__hint(); else field_psk__identity__hint.clean_up(); if (other_value.psk__key().is_bound()) field_psk__key = other_value.psk__key(); else field_psk__key.clean_up(); } return *this; } boolean PSK__options::operator==(const PSK__options& other_value) const { return field_psk__identity==other_value.field_psk__identity && field_psk__identity__hint==other_value.field_psk__identity__hint && field_psk__key==other_value.field_psk__key; } boolean PSK__options::is_bound() const { return (OPTIONAL_OMIT == field_psk__identity.get_selection() || field_psk__identity.is_bound()) || (OPTIONAL_OMIT == field_psk__identity__hint.get_selection() || field_psk__identity__hint.is_bound()) || (OPTIONAL_OMIT == field_psk__key.get_selection() || field_psk__key.is_bound()); } boolean PSK__options::is_value() const { return (OPTIONAL_OMIT == field_psk__identity.get_selection() || field_psk__identity.is_value()) && (OPTIONAL_OMIT == field_psk__identity__hint.get_selection() || field_psk__identity__hint.is_value()) && (OPTIONAL_OMIT == field_psk__key.get_selection() || field_psk__key.is_value()); } int PSK__options::size_of() const { int ret_val = 0; if (field_psk__identity.ispresent()) ret_val++; if (field_psk__identity__hint.ispresent()) ret_val++; if (field_psk__key.ispresent()) ret_val++; return ret_val; } void PSK__options::log() const { if (!is_bound()) { TTCN_Logger::log_event_unbound(); return; } TTCN_Logger::log_event_str("{ psk_identity := "); field_psk__identity.log(); TTCN_Logger::log_event_str(", psk_identity_hint := "); field_psk__identity__hint.log(); TTCN_Logger::log_event_str(", psk_key := "); field_psk__key.log(); TTCN_Logger::log_event_str(" }"); } void PSK__options::set_implicit_omit() { if (!psk__identity().is_bound()) psk__identity() = OMIT_VALUE; else psk__identity().set_implicit_omit(); if (!psk__identity__hint().is_bound()) psk__identity__hint() = OMIT_VALUE; else psk__identity__hint().set_implicit_omit(); if (!psk__key().is_bound()) psk__key() = OMIT_VALUE; else psk__key().set_implicit_omit(); } void PSK__options::set_param(Module_Param& param) { param.basic_check(Module_Param::BC_VALUE, "record value"); switch (param.get_type()) { case Module_Param::MP_Value_List: if (30 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) psk__identity().set_param(*param.get_elem(0)); if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) psk__identity__hint().set_param(*param.get_elem(1)); if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) psk__key().set_param(*param.get_elem(2)); break; case Module_Param::MP_Assignment_List: { Vector value_used(param.get_size()); value_used.resize(param.get_size(), FALSE); for (size_t val_idx=0; val_idxget_id()->get_name(), "psk_identity")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { psk__identity().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "psk_identity_hint")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { psk__identity__hint().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "psk_key")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { psk__key().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxerror("Non existent field name in type @IPL4asp_Types.PSK_options: %s", curr_param->get_id()->get_name()); break; } } break; default: param.type_error("record value", "@IPL4asp_Types.PSK_options"); } } void PSK__options::encode_text(Text_Buf& text_buf) const { field_psk__identity.encode_text(text_buf); field_psk__identity__hint.encode_text(text_buf); field_psk__key.encode_text(text_buf); } void PSK__options::decode_text(Text_Buf& text_buf) { field_psk__identity.decode_text(text_buf); field_psk__identity__hint.decode_text(text_buf); field_psk__key.decode_text(text_buf); } struct PSK__options_template::single_value_struct { CHARSTRING_template field_psk__identity; CHARSTRING_template field_psk__identity__hint; CHARSTRING_template field_psk__key; }; void PSK__options_template::set_specific() { if (template_selection != SPECIFIC_VALUE) { template_sel old_selection = template_selection; clean_up(); single_value = new single_value_struct; set_selection(SPECIFIC_VALUE); if (old_selection == ANY_VALUE || old_selection == ANY_OR_OMIT) { single_value->field_psk__identity = ANY_OR_OMIT; single_value->field_psk__identity__hint = ANY_OR_OMIT; single_value->field_psk__key = ANY_OR_OMIT; } } } void PSK__options_template::copy_value(const PSK__options& other_value) { single_value = new single_value_struct; if (other_value.psk__identity().is_bound()) { if (other_value.psk__identity().ispresent()) single_value->field_psk__identity = other_value.psk__identity()(); else single_value->field_psk__identity = OMIT_VALUE; } else { single_value->field_psk__identity.clean_up(); } if (other_value.psk__identity__hint().is_bound()) { if (other_value.psk__identity__hint().ispresent()) single_value->field_psk__identity__hint = other_value.psk__identity__hint()(); else single_value->field_psk__identity__hint = OMIT_VALUE; } else { single_value->field_psk__identity__hint.clean_up(); } if (other_value.psk__key().is_bound()) { if (other_value.psk__key().ispresent()) single_value->field_psk__key = other_value.psk__key()(); else single_value->field_psk__key = OMIT_VALUE; } else { single_value->field_psk__key.clean_up(); } set_selection(SPECIFIC_VALUE); } void PSK__options_template::copy_template(const PSK__options_template& other_value) { switch (other_value.template_selection) { case SPECIFIC_VALUE: single_value = new single_value_struct; if (UNINITIALIZED_TEMPLATE != other_value.psk__identity().get_selection()) { single_value->field_psk__identity = other_value.psk__identity(); } else { single_value->field_psk__identity.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.psk__identity__hint().get_selection()) { single_value->field_psk__identity__hint = other_value.psk__identity__hint(); } else { single_value->field_psk__identity__hint.clean_up(); } if (UNINITIALIZED_TEMPLATE != other_value.psk__key().get_selection()) { single_value->field_psk__key = other_value.psk__key(); } else { single_value->field_psk__key.clean_up(); } case OMIT_VALUE: case ANY_VALUE: case ANY_OR_OMIT: break; case VALUE_LIST: case COMPLEMENTED_LIST: case CONJUNCTION_MATCH: value_list.n_values = other_value.value_list.n_values; value_list.list_value = new PSK__options_template[value_list.n_values]; for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) value_list.list_value[list_count].copy_template(other_value.value_list.list_value[list_count]); break; case IMPLICATION_MATCH: implication_.precondition = new PSK__options_template(*other_value.implication_.precondition); implication_.implied_template = new PSK__options_template(*other_value.implication_.implied_template); break; case DYNAMIC_MATCH: dyn_match = other_value.dyn_match; dyn_match->ref_count++; break; default: TTCN_error("Copying an uninitialized/unsupported template of type @IPL4asp_Types.PSK_options."); break; } set_selection(other_value); } PSK__options_template::PSK__options_template() { } PSK__options_template::PSK__options_template(template_sel other_value) : Base_Template(other_value) { check_single_selection(other_value); } PSK__options_template::PSK__options_template(const PSK__options& other_value) { copy_value(other_value); } PSK__options_template::PSK__options_template(const OPTIONAL& other_value) { switch (other_value.get_selection()) { case OPTIONAL_PRESENT: copy_value((const PSK__options&)other_value); break; case OPTIONAL_OMIT: set_selection(OMIT_VALUE); break; default: TTCN_error("Creating a template of type @IPL4asp_Types.PSK_options from an unbound optional field."); } } PSK__options_template::PSK__options_template(PSK__options_template* p_precondition, PSK__options_template* p_implied_template) : Base_Template(IMPLICATION_MATCH) { implication_.precondition = p_precondition; implication_.implied_template = p_implied_template; } PSK__options_template::PSK__options_template(Dynamic_Match_Interface* p_dyn_match) : Base_Template(DYNAMIC_MATCH) { dyn_match = new dynmatch_struct; dyn_match->ptr = p_dyn_match; dyn_match->ref_count = 1; } PSK__options_template::PSK__options_template(const PSK__options_template& other_value) : Base_Template() { copy_template(other_value); } PSK__options_template::~PSK__options_template() { clean_up(); } PSK__options_template& PSK__options_template::operator=(template_sel other_value) { check_single_selection(other_value); clean_up(); set_selection(other_value); return *this; } PSK__options_template& PSK__options_template::operator=(const PSK__options& other_value) { clean_up(); copy_value(other_value); return *this; } PSK__options_template& PSK__options_template::operator=(const OPTIONAL& other_value) { clean_up(); switch (other_value.get_selection()) { case OPTIONAL_PRESENT: copy_value((const PSK__options&)other_value); break; case OPTIONAL_OMIT: set_selection(OMIT_VALUE); break; default: TTCN_error("Assignment of an unbound optional field to a template of type @IPL4asp_Types.PSK_options."); } return *this; } PSK__options_template& PSK__options_template::operator=(const PSK__options_template& other_value) { if (&other_value != this) { clean_up(); copy_template(other_value); } return *this; } boolean PSK__options_template::match(const PSK__options& other_value, boolean legacy) const { if (!other_value.is_bound()) return FALSE; switch (template_selection) { case ANY_VALUE: case ANY_OR_OMIT: return TRUE; case OMIT_VALUE: return FALSE; case SPECIFIC_VALUE: if(!other_value.psk__identity().is_bound()) return FALSE; if((other_value.psk__identity().ispresent() ? !single_value->field_psk__identity.match((const CHARSTRING&)other_value.psk__identity(), legacy) : !single_value->field_psk__identity.match_omit(legacy)))return FALSE; if(!other_value.psk__identity__hint().is_bound()) return FALSE; if((other_value.psk__identity__hint().ispresent() ? !single_value->field_psk__identity__hint.match((const CHARSTRING&)other_value.psk__identity__hint(), legacy) : !single_value->field_psk__identity__hint.match_omit(legacy)))return FALSE; if(!other_value.psk__key().is_bound()) return FALSE; if((other_value.psk__key().ispresent() ? !single_value->field_psk__key.match((const CHARSTRING&)other_value.psk__key(), legacy) : !single_value->field_psk__key.match_omit(legacy)))return FALSE; return TRUE; case VALUE_LIST: case COMPLEMENTED_LIST: for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) if (value_list.list_value[list_count].match(other_value, legacy)) return template_selection == VALUE_LIST; return template_selection == COMPLEMENTED_LIST; case CONJUNCTION_MATCH: for (unsigned int i = 0; i < value_list.n_values; i++) { if (!value_list.list_value[i].match(other_value)) { return FALSE; } } return TRUE; case IMPLICATION_MATCH: return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value); case DYNAMIC_MATCH: return dyn_match->ptr->match(other_value); default: TTCN_error("Matching an uninitialized/unsupported template of type @IPL4asp_Types.PSK_options."); } return FALSE; } boolean PSK__options_template::is_bound() const { if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE; if (template_selection != SPECIFIC_VALUE) return TRUE; return (single_value->field_psk__identity.is_omit() || single_value->field_psk__identity.is_bound()) || (single_value->field_psk__identity__hint.is_omit() || single_value->field_psk__identity__hint.is_bound()) || (single_value->field_psk__key.is_omit() || single_value->field_psk__key.is_bound()); } boolean PSK__options_template::is_value() const { if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE; return (single_value->field_psk__identity.is_omit() || single_value->field_psk__identity.is_value()) && (single_value->field_psk__identity__hint.is_omit() || single_value->field_psk__identity__hint.is_value()) && (single_value->field_psk__key.is_omit() || single_value->field_psk__key.is_value()); } void PSK__options_template::clean_up() { switch (template_selection) { case SPECIFIC_VALUE: delete single_value; break; case VALUE_LIST: case COMPLEMENTED_LIST: case CONJUNCTION_MATCH: delete [] value_list.list_value; break; case IMPLICATION_MATCH: delete implication_.precondition; delete implication_.implied_template; break; case DYNAMIC_MATCH: dyn_match->ref_count--; if (dyn_match->ref_count == 0) { delete dyn_match->ptr; delete dyn_match; } break; default: break; } template_selection = UNINITIALIZED_TEMPLATE; } PSK__options PSK__options_template::valueof() const { if (template_selection != SPECIFIC_VALUE || is_ifpresent) TTCN_error("Performing a valueof or send operation on a non-specific template of type @IPL4asp_Types.PSK_options."); PSK__options ret_val; if (single_value->field_psk__identity.is_omit()) ret_val.psk__identity() = OMIT_VALUE; else if (single_value->field_psk__identity.is_bound()) { ret_val.psk__identity() = single_value->field_psk__identity.valueof(); } if (single_value->field_psk__identity__hint.is_omit()) ret_val.psk__identity__hint() = OMIT_VALUE; else if (single_value->field_psk__identity__hint.is_bound()) { ret_val.psk__identity__hint() = single_value->field_psk__identity__hint.valueof(); } if (single_value->field_psk__key.is_omit()) ret_val.psk__key() = OMIT_VALUE; else if (single_value->field_psk__key.is_bound()) { ret_val.psk__key() = single_value->field_psk__key.valueof(); } return ret_val; } void PSK__options_template::set_type(template_sel template_type, unsigned int list_length) { if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST&& template_type != CONJUNCTION_MATCH) TTCN_error("Setting an invalid list for a template of type @IPL4asp_Types.PSK_options."); clean_up(); set_selection(template_type); value_list.n_values = list_length; value_list.list_value = new PSK__options_template[list_length]; } PSK__options_template& PSK__options_template::list_item(unsigned int list_index) const { if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST&& template_selection != CONJUNCTION_MATCH) TTCN_error("Accessing a list element of a non-list template of type @IPL4asp_Types.PSK_options."); if (list_index >= value_list.n_values) TTCN_error("Index overflow in a value list template of type @IPL4asp_Types.PSK_options."); return value_list.list_value[list_index]; } CHARSTRING_template& PSK__options_template::psk__identity() { set_specific(); return single_value->field_psk__identity; } const CHARSTRING_template& PSK__options_template::psk__identity() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field psk_identity of a non-specific template of type @IPL4asp_Types.PSK_options."); return single_value->field_psk__identity; } CHARSTRING_template& PSK__options_template::psk__identity__hint() { set_specific(); return single_value->field_psk__identity__hint; } const CHARSTRING_template& PSK__options_template::psk__identity__hint() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field psk_identity_hint of a non-specific template of type @IPL4asp_Types.PSK_options."); return single_value->field_psk__identity__hint; } CHARSTRING_template& PSK__options_template::psk__key() { set_specific(); return single_value->field_psk__key; } const CHARSTRING_template& PSK__options_template::psk__key() const { if (template_selection != SPECIFIC_VALUE) TTCN_error("Accessing field psk_key of a non-specific template of type @IPL4asp_Types.PSK_options."); return single_value->field_psk__key; } int PSK__options_template::size_of() const { if (is_ifpresent) TTCN_error("Performing sizeof() operation on a template of type @IPL4asp_Types.PSK_options which has an ifpresent attribute."); switch (template_selection) { case SPECIFIC_VALUE: { int ret_val = 0; if (single_value->field_psk__identity.is_present()) ret_val++; if (single_value->field_psk__identity__hint.is_present()) ret_val++; if (single_value->field_psk__key.is_present()) ret_val++; return ret_val; } case VALUE_LIST: { if (value_list.n_values<1) TTCN_error("Internal error: Performing sizeof() operation on a template of type @IPL4asp_Types.PSK_options containing an empty list."); int item_size = value_list.list_value[0].size_of(); for (unsigned int l_idx = 1; l_idx < value_list.n_values; l_idx++) { if (value_list.list_value[l_idx].size_of()!=item_size) TTCN_error("Performing sizeof() operation on a template of type @IPL4asp_Types.PSK_options containing a value list with different sizes."); } return item_size; } case OMIT_VALUE: TTCN_error("Performing sizeof() operation on a template of type @IPL4asp_Types.PSK_options containing omit value."); case ANY_VALUE: case ANY_OR_OMIT: TTCN_error("Performing sizeof() operation on a template of type @IPL4asp_Types.PSK_options containing */? value."); case COMPLEMENTED_LIST: TTCN_error("Performing sizeof() operation on a template of type @IPL4asp_Types.PSK_options containing complemented list."); case CONJUNCTION_MATCH: TTCN_error("Performing sizeof() operation on a template of type @IPL4asp_Types.PSK_options containing a conjunction list match."); case IMPLICATION_MATCH: TTCN_error("Performing sizeof() operation on a template of type @IPL4asp_Types.PSK_options containing an implication match."); case DYNAMIC_MATCH: TTCN_error("Performing sizeof() operation on a template of type @IPL4asp_Types.PSK_options containing a dynamic match."); default: TTCN_error("Performing sizeof() operation on an uninitialized/unsupported template of type @IPL4asp_Types.PSK_options."); } return 0; } void PSK__options_template::log() const { switch (template_selection) { case SPECIFIC_VALUE: TTCN_Logger::log_event_str("{ psk_identity := "); single_value->field_psk__identity.log(); TTCN_Logger::log_event_str(", psk_identity_hint := "); single_value->field_psk__identity__hint.log(); TTCN_Logger::log_event_str(", psk_key := "); single_value->field_psk__key.log(); TTCN_Logger::log_event_str(" }"); break; case COMPLEMENTED_LIST: TTCN_Logger::log_event_str("complement"); case CONJUNCTION_MATCH: if (template_selection == CONJUNCTION_MATCH) { TTCN_Logger::log_event_str("conjunct"); } case VALUE_LIST: TTCN_Logger::log_char('('); for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) { if (list_count > 0) TTCN_Logger::log_event_str(", "); value_list.list_value[list_count].log(); } TTCN_Logger::log_char(')'); break; case IMPLICATION_MATCH: implication_.precondition->log(); TTCN_Logger::log_event_str(" implies "); implication_.implied_template->log(); break; case DYNAMIC_MATCH: TTCN_Logger::log_event_str("@dynamic template"); break; default: log_generic(); } log_ifpresent(); } void PSK__options_template::log_match(const PSK__options& match_value, boolean legacy) const { if(TTCN_Logger::VERBOSITY_COMPACT == TTCN_Logger::get_matching_verbosity()){ if(match(match_value, legacy)){ TTCN_Logger::print_logmatch_buffer(); TTCN_Logger::log_event_str(" matched"); } else{ if (template_selection == SPECIFIC_VALUE) { size_t previous_size = TTCN_Logger::get_logmatch_buffer_len(); if (match_value.psk__identity().ispresent()){ if(!single_value->field_psk__identity.match(match_value.psk__identity(), legacy)){ TTCN_Logger::log_logmatch_info(".psk_identity"); single_value->field_psk__identity.log_match(match_value.psk__identity(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } else { if (!single_value->field_psk__identity.match_omit(legacy)){ TTCN_Logger::log_logmatch_info(".psk_identity := omit with "); TTCN_Logger::print_logmatch_buffer(); single_value->field_psk__identity.log(); TTCN_Logger::log_event_str(" unmatched"); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } if (match_value.psk__identity__hint().ispresent()){ if(!single_value->field_psk__identity__hint.match(match_value.psk__identity__hint(), legacy)){ TTCN_Logger::log_logmatch_info(".psk_identity_hint"); single_value->field_psk__identity__hint.log_match(match_value.psk__identity__hint(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } else { if (!single_value->field_psk__identity__hint.match_omit(legacy)){ TTCN_Logger::log_logmatch_info(".psk_identity_hint := omit with "); TTCN_Logger::print_logmatch_buffer(); single_value->field_psk__identity__hint.log(); TTCN_Logger::log_event_str(" unmatched"); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } if (match_value.psk__key().ispresent()){ if(!single_value->field_psk__key.match(match_value.psk__key(), legacy)){ TTCN_Logger::log_logmatch_info(".psk_key"); single_value->field_psk__key.log_match(match_value.psk__key(), legacy); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } else { if (!single_value->field_psk__key.match_omit(legacy)){ TTCN_Logger::log_logmatch_info(".psk_key := omit with "); TTCN_Logger::print_logmatch_buffer(); single_value->field_psk__key.log(); TTCN_Logger::log_event_str(" unmatched"); TTCN_Logger::set_logmatch_buffer_len(previous_size); } } }else { TTCN_Logger::print_logmatch_buffer(); match_value.log(); TTCN_Logger::log_event_str(" with "); log(); TTCN_Logger::log_event_str(" unmatched"); } } return; } if (template_selection == SPECIFIC_VALUE) { TTCN_Logger::log_event_str("{ psk_identity := "); if (match_value.psk__identity().ispresent()) { single_value->field_psk__identity.log_match(match_value.psk__identity(), legacy); } else { TTCN_Logger::log_event_str("omit with "); single_value->field_psk__identity.log(); if (single_value->field_psk__identity.match_omit(legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } TTCN_Logger::log_event_str(", psk_identity_hint := "); if (match_value.psk__identity__hint().ispresent()) { single_value->field_psk__identity__hint.log_match(match_value.psk__identity__hint(), legacy); } else { TTCN_Logger::log_event_str("omit with "); single_value->field_psk__identity__hint.log(); if (single_value->field_psk__identity__hint.match_omit(legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } TTCN_Logger::log_event_str(", psk_key := "); if (match_value.psk__key().ispresent()) { single_value->field_psk__key.log_match(match_value.psk__key(), legacy); } else { TTCN_Logger::log_event_str("omit with "); single_value->field_psk__key.log(); if (single_value->field_psk__key.match_omit(legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } TTCN_Logger::log_event_str(" }"); } else { match_value.log(); TTCN_Logger::log_event_str(" with "); log(); if (match(match_value, legacy)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } } void PSK__options_template::encode_text(Text_Buf& text_buf) const { encode_text_base(text_buf); switch (template_selection) { case SPECIFIC_VALUE: single_value->field_psk__identity.encode_text(text_buf); single_value->field_psk__identity__hint.encode_text(text_buf); single_value->field_psk__key.encode_text(text_buf); case OMIT_VALUE: case ANY_VALUE: case ANY_OR_OMIT: break; case VALUE_LIST: case COMPLEMENTED_LIST: text_buf.push_int(value_list.n_values); for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) value_list.list_value[list_count].encode_text(text_buf); break; default: TTCN_error("Text encoder: Encoding an uninitialized/unsupported template of type @IPL4asp_Types.PSK_options."); } } void PSK__options_template::decode_text(Text_Buf& text_buf) { clean_up(); decode_text_base(text_buf); switch (template_selection) { case SPECIFIC_VALUE: single_value = new single_value_struct; single_value->field_psk__identity.decode_text(text_buf); single_value->field_psk__identity__hint.decode_text(text_buf); single_value->field_psk__key.decode_text(text_buf); case OMIT_VALUE: case ANY_VALUE: case ANY_OR_OMIT: break; case VALUE_LIST: case COMPLEMENTED_LIST: value_list.n_values = text_buf.pull_int().get_val(); value_list.list_value = new PSK__options_template[value_list.n_values]; for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) value_list.list_value[list_count].decode_text(text_buf); break; default: TTCN_error("Text decoder: An unknown/unsupported selection was received in a template of type @IPL4asp_Types.PSK_options."); } } void PSK__options_template::set_param(Module_Param& param) { param.basic_check(Module_Param::BC_TEMPLATE, "record template"); switch (param.get_type()) { case Module_Param::MP_Omit: *this = OMIT_VALUE; break; case Module_Param::MP_Any: *this = ANY_VALUE; break; case Module_Param::MP_AnyOrNone: *this = ANY_OR_OMIT; break; case Module_Param::MP_List_Template: case Module_Param::MP_ComplementList_Template: case Module_Param::MP_ConjunctList_Template: { PSK__options_template new_temp; new_temp.set_type(param.get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (param.get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), param.get_size()); for (size_t p_i=0; p_i0 && param.get_elem(0)->get_type()!=Module_Param::MP_NotUsed) psk__identity().set_param(*param.get_elem(0)); if (param.get_size()>1 && param.get_elem(1)->get_type()!=Module_Param::MP_NotUsed) psk__identity__hint().set_param(*param.get_elem(1)); if (param.get_size()>2 && param.get_elem(2)->get_type()!=Module_Param::MP_NotUsed) psk__key().set_param(*param.get_elem(2)); break; case Module_Param::MP_Assignment_List: { Vector value_used(param.get_size()); value_used.resize(param.get_size(), FALSE); for (size_t val_idx=0; val_idxget_id()->get_name(), "psk_identity")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { psk__identity().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "psk_identity_hint")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { psk__identity__hint().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxget_id()->get_name(), "psk_key")) { if (curr_param->get_type()!=Module_Param::MP_NotUsed) { psk__key().set_param(*curr_param); } value_used[val_idx]=TRUE; } } for (size_t val_idx=0; val_idxerror("Non existent field name in type @IPL4asp_Types.PSK_options: %s", curr_param->get_id()->get_name()); break; } } break; case Module_Param::MP_Implication_Template: { PSK__options_template* precondition = new PSK__options_template; precondition->set_param(*param.get_elem(0)); PSK__options_template* implied_template = new PSK__options_template; implied_template->set_param(*param.get_elem(1)); *this = PSK__options_template(precondition, implied_template); } break; default: param.type_error("record template", "@IPL4asp_Types.PSK_options"); } is_ifpresent = param.get_ifpresent(); } void PSK__options_template::check_restriction(template_res t_res, const char* t_name, boolean legacy) const { if (template_selection==UNINITIALIZED_TEMPLATE) return; switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) { case TR_OMIT: if (template_selection==OMIT_VALUE) return; case TR_VALUE: if (template_selection!=SPECIFIC_VALUE || is_ifpresent) break; single_value->field_psk__identity.check_restriction(t_res, t_name ? t_name : "@IPL4asp_Types.PSK_options"); single_value->field_psk__identity__hint.check_restriction(t_res, t_name ? t_name : "@IPL4asp_Types.PSK_options"); single_value->field_psk__key.check_restriction(t_res, t_name ? t_name : "@IPL4asp_Types.PSK_options"); return; case TR_PRESENT: if (!match_omit(legacy)) return; break; default: return; } TTCN_error("Restriction `%s' on template of type %s violated.", get_res_name(t_res), t_name ? t_name : "@IPL4asp_Types.PSK_options"); } boolean PSK__options_template::is_present(boolean legacy) const { if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE; return !match_omit(legacy); } boolean PSK__options_template::match_omit(boolean legacy) const { if (is_ifpresent) return TRUE; switch (template_selection) { case OMIT_VALUE: case ANY_OR_OMIT: return TRUE; case IMPLICATION_MATCH: return !implication_.precondition->match_omit() || implication_.implied_template->match_omit(); case VALUE_LIST: case COMPLEMENTED_LIST: if (legacy) { for (unsigned int l_idx=0; l_idx(enum_type other_value) const { if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @IPL4asp_Types.MTU_discover."); return enum_value > other_value; } boolean MTU__discover::operator>(const MTU__discover& other_value) const { if (enum_value == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of enumerated type @IPL4asp_Types.MTU_discover."); if (other_value.enum_value == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of enumerated type @IPL4asp_Types.MTU_discover."); return enum_value > other_value.enum_value; } const char *MTU__discover::enum_to_str(enum_type enum_par) { switch (enum_par) { case PMTUDISC__DONT: return "PMTUDISC_DONT"; case PMTUDISC__WANT: return "PMTUDISC_WANT"; case PMTUDISC__DO: return "PMTUDISC_DO"; case MTU: return "MTU"; default: return ""; } } MTU__discover::enum_type MTU__discover::str_to_enum(const char *str_par) { if (!strcmp(str_par, "PMTUDISC_DONT")) return PMTUDISC__DONT; else if (!strcmp(str_par, "PMTUDISC_WANT")) return PMTUDISC__WANT; else if (!strcmp(str_par, "PMTUDISC_DO")) return PMTUDISC__DO; else if (!strcmp(str_par, "MTU")) return MTU; else return UNKNOWN_VALUE; } boolean MTU__discover::is_valid_enum(int int_par) { switch (int_par) { case 0: case 1: case 2: case 3: return TRUE; default: return FALSE; } } int MTU__discover::enum2int(enum_type enum_par) { if (enum_par==UNBOUND_VALUE || enum_par==UNKNOWN_VALUE) TTCN_error("The argument of function enum2int() is an %s value of enumerated type @IPL4asp_Types.MTU_discover.", enum_par==UNBOUND_VALUE?"unbound":"invalid"); return enum_par; } int MTU__discover::enum2int(const MTU__discover& enum_par) { if (enum_par.enum_value==UNBOUND_VALUE || enum_par.enum_value==UNKNOWN_VALUE) TTCN_error("The argument of function enum2int() is an %s value of enumerated type @IPL4asp_Types.MTU_discover.", enum_par==UNBOUND_VALUE?"unbound":"invalid"); return enum_par.enum_value; } void MTU__discover::int2enum(int int_val) { if (!is_valid_enum(int_val)) TTCN_error("Assigning invalid numeric value %d to a variable of enumerated type @IPL4asp_Types.MTU_discover.", int_val); enum_value = (enum_type)int_val; } MTU__discover::operator MTU__discover::enum_type() const { if (enum_value == UNBOUND_VALUE) TTCN_error("Using the value of an unbound variable of enumerated type @IPL4asp_Types.MTU_discover."); return enum_value; } void MTU__discover::log() const { if (enum_value != UNBOUND_VALUE) TTCN_Logger::log_event_enum(enum_to_str(enum_value), enum_value); else TTCN_Logger::log_event_unbound(); } void MTU__discover::set_param(Module_Param& param) { param.basic_check(Module_Param::BC_VALUE, "enumerated value"); if (param.get_type()!=Module_Param::MP_Enumerated) param.type_error("enumerated value", "@IPL4asp_Types.MTU_discover"); enum_value = str_to_enum(param.get_enumerated()); if (!is_valid_enum(enum_value)) { param.error("Invalid enumerated value for type @IPL4asp_Types.MTU_discover."); } } void MTU__discover::encode_text(Text_Buf& text_buf) const { if (enum_value == UNBOUND_VALUE) TTCN_error("Text encoder: Encoding an unbound value of enumerated type @IPL4asp_Types.MTU_discover."); text_buf.push_int(enum_value); } void MTU__discover::decode_text(Text_Buf& text_buf) { enum_value = (enum_type)text_buf.pull_int().get_val(); if (!is_valid_enum(enum_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for enumerated type @IPL4asp_Types.MTU_discover.", enum_value); } void MTU__discover_template::copy_template(const MTU__discover_template& other_value) { set_selection(other_value); switch (template_selection) { case SPECIFIC_VALUE: single_value = other_value.single_value; break; case OMIT_VALUE: case ANY_VALUE: case ANY_OR_OMIT: break; case VALUE_LIST: case COMPLEMENTED_LIST: case CONJUNCTION_MATCH: value_list.n_values = other_value.value_list.n_values; value_list.list_value = new MTU__discover_template[value_list.n_values]; for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) value_list.list_value[list_count].copy_template(other_value.value_list.list_value[list_count]); break; case IMPLICATION_MATCH: implication_.precondition = new MTU__discover_template(*other_value.implication_.precondition); implication_.implied_template = new MTU__discover_template(*other_value.implication_.implied_template); break; case DYNAMIC_MATCH: dyn_match = other_value.dyn_match; dyn_match->ref_count++; break; default: TTCN_error("Copying an uninitialized/unsupported template of enumerated type @IPL4asp_Types.MTU_discover."); } } MTU__discover_template::MTU__discover_template() { } MTU__discover_template::MTU__discover_template(template_sel other_value) : Base_Template(other_value) { check_single_selection(other_value); } MTU__discover_template::MTU__discover_template(int other_value) : Base_Template(SPECIFIC_VALUE) { if (!MTU__discover::is_valid_enum(other_value)) TTCN_error("Initializing a template of enumerated type @IPL4asp_Types.MTU_discover with unknown numeric value %d.", other_value); single_value = (MTU__discover::enum_type)other_value; } MTU__discover_template::MTU__discover_template(MTU__discover::enum_type other_value) : Base_Template(SPECIFIC_VALUE) { single_value = other_value; } MTU__discover_template::MTU__discover_template(const MTU__discover& other_value) : Base_Template(SPECIFIC_VALUE) { if (other_value.enum_value == MTU__discover::UNBOUND_VALUE) TTCN_error("Creating a template from an unbound value of enumerated type @IPL4asp_Types.MTU_discover."); single_value = other_value.enum_value; } MTU__discover_template::MTU__discover_template(const OPTIONAL& other_value) { switch (other_value.get_selection()) { case OPTIONAL_PRESENT: set_selection(SPECIFIC_VALUE); single_value = (MTU__discover::enum_type)(const MTU__discover&)other_value; break; case OPTIONAL_OMIT: set_selection(OMIT_VALUE); break; default: TTCN_error("Creating a template of enumerated type @IPL4asp_Types.MTU_discover from an unbound optional field."); } } MTU__discover_template::MTU__discover_template(MTU__discover_template* p_precondition, MTU__discover_template* p_implied_template) : Base_Template(IMPLICATION_MATCH) { implication_.precondition = p_precondition; implication_.implied_template = p_implied_template; } MTU__discover_template::MTU__discover_template(Dynamic_Match_Interface* p_dyn_match) : Base_Template(DYNAMIC_MATCH) { dyn_match = new dynmatch_struct; dyn_match->ptr = p_dyn_match; dyn_match->ref_count = 1; } MTU__discover_template::MTU__discover_template(const MTU__discover_template& other_value) : Base_Template() { copy_template(other_value); } MTU__discover_template::~MTU__discover_template() { clean_up(); } boolean MTU__discover_template::is_bound() const { if (template_selection == UNINITIALIZED_TEMPLATE && !is_ifpresent) return FALSE; return TRUE; } boolean MTU__discover_template::is_value() const { if (template_selection != SPECIFIC_VALUE || is_ifpresent) return FALSE; return single_value != MTU__discover::UNBOUND_VALUE; } void MTU__discover_template::clean_up() { switch (template_selection) { case VALUE_LIST: case COMPLEMENTED_LIST: case CONJUNCTION_MATCH: delete [] value_list.list_value; break; case IMPLICATION_MATCH: delete implication_.precondition; delete implication_.implied_template; break; case DYNAMIC_MATCH: dyn_match->ref_count--; if (dyn_match->ref_count == 0) { delete dyn_match->ptr; delete dyn_match; } break; default: break; } template_selection = UNINITIALIZED_TEMPLATE; } MTU__discover_template& MTU__discover_template::operator=(template_sel other_value) { check_single_selection(other_value); clean_up(); set_selection(other_value); return *this; } MTU__discover_template& MTU__discover_template::operator=(int other_value) { if (!MTU__discover::is_valid_enum(other_value)) TTCN_warning("Assigning unknown numeric value %d to a template of enumerated type @IPL4asp_Types.MTU_discover.", other_value); clean_up(); set_selection(SPECIFIC_VALUE); single_value = (MTU__discover::enum_type)other_value; return *this; } MTU__discover_template& MTU__discover_template::operator=(MTU__discover::enum_type other_value) { clean_up(); set_selection(SPECIFIC_VALUE); single_value = other_value; return *this; } MTU__discover_template& MTU__discover_template::operator=(const MTU__discover& other_value) { if (other_value.enum_value == MTU__discover::UNBOUND_VALUE) TTCN_error("Assignment of an unbound value of enumerated type @IPL4asp_Types.MTU_discover to a template."); clean_up(); set_selection(SPECIFIC_VALUE); single_value = other_value.enum_value; return *this; } MTU__discover_template& MTU__discover_template::operator=(const OPTIONAL& other_value) { clean_up(); switch (other_value.get_selection()) { case OPTIONAL_PRESENT: set_selection(SPECIFIC_VALUE); single_value = (MTU__discover::enum_type)(const MTU__discover&)other_value; break; case OPTIONAL_OMIT: set_selection(OMIT_VALUE); break; default: TTCN_error("Assignment of an unbound optional field to a template of enumerated type @IPL4asp_Types.MTU_discover."); } return *this; } MTU__discover_template& MTU__discover_template::operator=(const MTU__discover_template& other_value) { if (&other_value != this) { clean_up(); copy_template(other_value); } return *this; } boolean MTU__discover_template::match(MTU__discover::enum_type other_value, boolean) const { switch (template_selection) { case SPECIFIC_VALUE: return single_value == other_value; case OMIT_VALUE: return FALSE; case ANY_VALUE: case ANY_OR_OMIT: return TRUE; case VALUE_LIST: case COMPLEMENTED_LIST: for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) if (value_list.list_value[list_count].match(other_value)) return template_selection == VALUE_LIST; return template_selection == COMPLEMENTED_LIST; case CONJUNCTION_MATCH: for (unsigned int i = 0; i < value_list.n_values; i++) { if (!value_list.list_value[i].match(other_value)) { return FALSE; } } return TRUE; case IMPLICATION_MATCH: return !implication_.precondition->match(other_value) || implication_.implied_template->match(other_value); case DYNAMIC_MATCH: return dyn_match->ptr->match(other_value); default: TTCN_error("Matching an uninitialized/unsupported template of enumerated type @IPL4asp_Types.MTU_discover."); } return FALSE; } boolean MTU__discover_template::match(const MTU__discover& other_value, boolean) const { if (other_value.enum_value == MTU__discover::UNBOUND_VALUE) TTCN_error("Matching a template of enumerated type @IPL4asp_Types.MTU_discover with an unbound value."); return match(other_value.enum_value); } MTU__discover::enum_type MTU__discover_template::valueof() const { if (template_selection != SPECIFIC_VALUE || is_ifpresent) TTCN_error("Performing a valueof or send operation on a non-specific template of enumerated type @IPL4asp_Types.MTU_discover."); return single_value; } void MTU__discover_template::set_type(template_sel template_type, unsigned int list_length) { if (template_type != VALUE_LIST && template_type != COMPLEMENTED_LIST && template_type != CONJUNCTION_MATCH) TTCN_error("Setting an invalid list type for a template of enumerated type @IPL4asp_Types.MTU_discover."); clean_up(); set_selection(template_type); value_list.n_values = list_length; value_list.list_value = new MTU__discover_template[list_length]; } MTU__discover_template& MTU__discover_template::list_item(unsigned int list_index) { if (template_selection != VALUE_LIST && template_selection != COMPLEMENTED_LIST && template_selection != CONJUNCTION_MATCH) TTCN_error("Accessing a list element in a non-list template of enumerated type @IPL4asp_Types.MTU_discover."); if (list_index >= value_list.n_values) TTCN_error("Index overflow in a value list template of enumerated type @IPL4asp_Types.MTU_discover."); return value_list.list_value[list_index]; } void MTU__discover_template::log() const { switch (template_selection) { case SPECIFIC_VALUE: TTCN_Logger::log_event_enum(MTU__discover::enum_to_str(single_value), single_value); break; case COMPLEMENTED_LIST: TTCN_Logger::log_event_str("complement"); case CONJUNCTION_MATCH: if (template_selection == CONJUNCTION_MATCH) { TTCN_Logger::log_event_str("conjunct"); } case VALUE_LIST: TTCN_Logger::log_char('('); for (unsigned int elem_count = 0; elem_count < value_list.n_values; elem_count++) { if (elem_count > 0) TTCN_Logger::log_event_str(", "); value_list.list_value[elem_count].log(); } TTCN_Logger::log_char(')'); break; case IMPLICATION_MATCH: implication_.precondition->log(); TTCN_Logger::log_event_str(" implies "); implication_.implied_template->log(); break; case DYNAMIC_MATCH: TTCN_Logger::log_event_str("@dynamic template"); break; default: log_generic(); } log_ifpresent(); } void MTU__discover_template::log_match(const MTU__discover& match_value, boolean) const { match_value.log(); TTCN_Logger::log_event_str(" with "); log(); if (match(match_value)) TTCN_Logger::log_event_str(" matched"); else TTCN_Logger::log_event_str(" unmatched"); } void MTU__discover_template::encode_text(Text_Buf& text_buf) const { encode_text_base(text_buf); switch (template_selection) { case SPECIFIC_VALUE: text_buf.push_int(single_value); case OMIT_VALUE: case ANY_VALUE: case ANY_OR_OMIT: break; case VALUE_LIST: case COMPLEMENTED_LIST: text_buf.push_int(value_list.n_values); for (unsigned int elem_count = 0; elem_count < value_list.n_values; elem_count++) value_list.list_value[elem_count].encode_text(text_buf); break; default: TTCN_error("Text encoder: Encoding an uninitialized/unsupported template of enumerated type @IPL4asp_Types.MTU_discover."); } } void MTU__discover_template::decode_text(Text_Buf& text_buf) { clean_up(); decode_text_base(text_buf); switch (template_selection) { case SPECIFIC_VALUE: single_value = (MTU__discover::enum_type)text_buf.pull_int().get_val(); if (!MTU__discover::is_valid_enum(single_value)) TTCN_error("Text decoder: Unknown numeric value %d was received for a template of enumerated type @IPL4asp_Types.MTU_discover.", single_value); case OMIT_VALUE: case ANY_VALUE: case ANY_OR_OMIT: break; case VALUE_LIST: case COMPLEMENTED_LIST: value_list.n_values = text_buf.pull_int().get_val(); value_list.list_value = new MTU__discover_template[value_list.n_values]; for (unsigned int elem_count = 0; elem_count < value_list.n_values; elem_count++) value_list.list_value[elem_count].decode_text(text_buf); break; default: TTCN_error("Text decoder: An unknown/unsupported selection was received for a template of enumerated type @IPL4asp_Types.MTU_discover."); } } boolean MTU__discover_template::is_present(boolean legacy) const { if (template_selection==UNINITIALIZED_TEMPLATE) return FALSE; return !match_omit(legacy); } boolean MTU__discover_template::match_omit(boolean legacy) const { if (is_ifpresent) return TRUE; switch (template_selection) { case OMIT_VALUE: case ANY_OR_OMIT: return TRUE; case IMPLICATION_MATCH: return !implication_.precondition->match_omit() || implication_.implied_template->match_omit(); case VALUE_LIST: case COMPLEMENTED_LIST: if (legacy) { for (unsigned int i=0; iget_type()) { case Module_Param::MP_Omit: *this = OMIT_VALUE; break; case Module_Param::MP_Any: *this = ANY_VALUE; break; case Module_Param::MP_AnyOrNone: *this = ANY_OR_OMIT; break; case Module_Param::MP_List_Template: case Module_Param::MP_ComplementList_Template: case Module_Param::MP_ConjunctList_Template: { MTU__discover_template new_temp; new_temp.set_type(m_p->get_type()==Module_Param::MP_List_Template ? VALUE_LIST : (m_p->get_type() == Module_Param::MP_ConjunctList_Template ? CONJUNCTION_MATCH : COMPLEMENTED_LIST), m_p->get_size()); for (size_t p_i=0; p_iget_size(); p_i++) { new_temp.list_item(p_i).set_param(*m_p->get_elem(p_i)); } *this = new_temp; break; } case Module_Param::MP_Enumerated: { MTU__discover::enum_type enum_val = MTU__discover::str_to_enum(m_p->get_enumerated()); if (!MTU__discover::is_valid_enum(enum_val)) { param.error("Invalid enumerated value for type @IPL4asp_Types.MTU_discover."); } *this = enum_val; } break; case Module_Param::MP_Implication_Template: { MTU__discover_template* precondition = new MTU__discover_template; precondition->set_param(*m_p->get_elem(0)); MTU__discover_template* implied_template = new MTU__discover_template; implied_template->set_param(*m_p->get_elem(1)); *this = MTU__discover_template(precondition, implied_template); } break; default: param.type_error("enumerated template", "@IPL4asp_Types.MTU_discover"); } is_ifpresent = param.get_ifpresent(); } void MTU__discover_template::check_restriction(template_res t_res, const char* t_name, boolean legacy) const { if (template_selection==UNINITIALIZED_TEMPLATE) return; switch ((t_name&&(t_res==TR_VALUE))?TR_OMIT:t_res) { case TR_VALUE: if (!is_ifpresent && template_selection==SPECIFIC_VALUE) return; break; case TR_OMIT: if (!is_ifpresent && (template_selection==OMIT_VALUE || template_selection==SPECIFIC_VALUE)) return; break; case TR_PRESENT: if (!match_omit(legacy)) return; break; default: return; } TTCN_error("Restriction `%s' on template of type %s violated.", get_res_name(t_res), t_name ? t_name : "@IPL4asp_Types.MTU_discover"); } void Option::copy_value(const Option& other_value) { switch (other_value.union_selection) { case ALT_reuseAddress: field_reuseAddress = new ReuseAddress(*other_value.field_reuseAddress); break; case ALT_tcpKeepAlive: field_tcpKeepAlive = new TcpKeepAlive(*other_value.field_tcpKeepAlive); break; case ALT_sctpEventHandle: field_sctpEventHandle = new SctpEventHandle(*other_value.field_sctpEventHandle); break; case ALT_sslKeepAlive: field_sslKeepAlive = new TcpKeepAlive(*other_value.field_sslKeepAlive); break; case ALT_sctpAdditionalLocalAddresses: field_sctpAdditionalLocalAddresses = new HostList(*other_value.field_sctpAdditionalLocalAddresses); break; case ALT_sctpEINConfigGroup: field_sctpEINConfigGroup = new INTEGER(*other_value.field_sctpEINConfigGroup); break; case ALT_solinger: field_solinger = new Linger__opt(*other_value.field_solinger); break; case ALT_ssl__support: field_ssl__support = new SSL__proto__support(*other_value.field_ssl__support); break; case ALT_no__delay: field_no__delay = new BOOLEAN(*other_value.field_no__delay); break; case ALT_dtlsSrtpProfiles: field_dtlsSrtpProfiles = new CHARSTRING(*other_value.field_dtlsSrtpProfiles); break; case ALT_cert__options: field_cert__options = new SSL__cert__options(*other_value.field_cert__options); break; case ALT_freebind: field_freebind = new BOOLEAN(*other_value.field_freebind); break; case ALT_alpn__list: field_alpn__list = new Option_alpn__list(*other_value.field_alpn__list); break; case ALT_tls__hostname: field_tls__hostname = new CHARSTRING(*other_value.field_tls__hostname); break; case ALT_udp__encap: field_udp__encap = new UDP__ENCAP__Param(*other_value.field_udp__encap); break; case ALT_dscp: field_dscp = new INTEGER(*other_value.field_dscp); break; case ALT_mtu__discover: field_mtu__discover = new MTU__discover(*other_value.field_mtu__discover); break; case ALT_psk__options: field_psk__options = new PSK__options(*other_value.field_psk__options); break; default: TTCN_error("Assignment of an unbound union value of type @IPL4asp_Types.Option."); } union_selection = other_value.union_selection; } Option::Option() { union_selection = UNBOUND_VALUE; } Option::Option(const Option& other_value) : Base_Type(){ copy_value(other_value); } Option::~Option() { clean_up(); } Option& Option::operator=(const Option& other_value) { if (this != &other_value) { clean_up(); copy_value(other_value); } return *this; } boolean Option::operator==(const Option& other_value) const { if (union_selection == UNBOUND_VALUE) TTCN_error("The left operand of comparison is an unbound value of union type @IPL4asp_Types.Option."); if (other_value.union_selection == UNBOUND_VALUE) TTCN_error("The right operand of comparison is an unbound value of union type @IPL4asp_Types.Option."); if (union_selection != other_value.union_selection) return FALSE; switch (union_selection) { case ALT_reuseAddress: return *field_reuseAddress == *other_value.field_reuseAddress; case ALT_tcpKeepAlive: return *field_tcpKeepAlive == *other_value.field_tcpKeepAlive; case ALT_sctpEventHandle: return *field_sctpEventHandle == *other_value.field_sctpEventHandle; case ALT_sslKeepAlive: return *field_sslKeepAlive == *other_value.field_sslKeepAlive; case ALT_sctpAdditionalLocalAddresses: return *field_sctpAdditionalLocalAddresses == *other_value.field_sctpAdditionalLocalAddresses; case ALT_sctpEINConfigGroup: return *field_sctpEINConfigGroup == *other_value.field_sctpEINConfigGroup; case ALT_solinger: return *field_solinger == *other_value.field_solinger; case ALT_ssl__support: return *field_ssl__support == *other_value.field_ssl__support; case ALT_no__delay: return *field_no__delay == *other_value.field_no__delay; case ALT_dtlsSrtpProfiles: return *field_dtlsSrtpProfiles == *other_value.field_dtlsSrtpProfiles; case ALT_cert__options: return *field_cert__options == *other_value.field_cert__options; case ALT_freebind: return *field_freebind == *other_value.field_freebind; case ALT_alpn__list: return *field_alpn__list == *other_value.field_alpn__list; case ALT_tls__hostname: return *field_tls__hostname == *other_value.field_tls__hostname; case ALT_udp__encap: return *field_udp__encap == *other_value.field_udp__encap; case ALT_dscp: return *field_dscp == *other_value.field_dscp; case ALT_mtu__discover: return *field_mtu__discover == *other_value.field_mtu__discover; case ALT_psk__options: return *field_psk__options == *other_value.field_psk__options; default: return FALSE; } } ReuseAddress& Option::reuseAddress() { if (union_selection != ALT_reuseAddress) { clean_up(); field_reuseAddress = new ReuseAddress; union_selection = ALT_reuseAddress; } return *field_reuseAddress; } const ReuseAddress& Option::reuseAddress() const { if (union_selection != ALT_reuseAddress) TTCN_error("Using non-selected field reuseAddress in a value of union type @IPL4asp_Types.Option."); return *field_reuseAddress; } TcpKeepAlive& Option::tcpKeepAlive() { if (union_selection != ALT_tcpKeepAlive) { clean_up(); field_tcpKeepAlive = new TcpKeepAlive; union_selection = ALT_tcpKeepAlive; } return *field_tcpKeepAlive; } const TcpKeepAlive& Option::tcpKeepAlive() const { if (union_selection != ALT_tcpKeepAlive) TTCN_error("Using non-selected field tcpKeepAlive in a value of union type @IPL4asp_Types.Option."); return *field_tcpKeepAlive; } SctpEventHandle& Option::sctpEventHandle() { if (union_selection != ALT_sctpEventHandle) { clean_up(); field_sctpEventHandle = new SctpEventHandle; union_selection = ALT_sctpEventHandle; } return *field_sctpEventHandle; } const SctpEventHandle& Option::sctpEventHandle() const { if (union_selection != ALT_sctpEventHandle) TTCN_error("Using non-selected field sctpEventHandle in a value of union type @IPL4asp_Types.Option."); return *field_sctpEventHandle; } TcpKeepAlive& Option::sslKeepAlive() { if (union_selection != ALT_sslKeepAlive) { clean_up(); field_sslKeepAlive = new TcpKeepAlive; union_selection = ALT_sslKeepAlive; } return *field_sslKeepAlive; } const TcpKeepAlive& Option::sslKeepAlive() const { if (union_selection != ALT_sslKeepAlive) TTCN_error("Using non-selected field sslKeepAlive in a value of union type @IPL4asp_Types.Option."); return *field_sslKeepAlive; } HostList& Option::sctpAdditionalLocalAddresses() { if (union_selection != ALT_sctpAdditionalLocalAddresses) { clean_up(); field_sctpAdditionalLocalAddresses = new HostList; union_selection = ALT_sctpAdditionalLocalAddresses; } return *field_sctpAdditionalLocalAddresses; } const HostList& Option::sctpAdditionalLocalAddresses() const { if (union_selection != ALT_sctpAdditionalLocalAddresses) TTCN_error("Using non-selected field sctpAdditionalLocalAddresses in a value of union type @IPL4asp_Types.Option."); return *field_sctpAdditionalLocalAddresses; } INTEGER& Option::sctpEINConfigGroup() { if (union_selection != ALT_sctpEINConfigGroup) { clean_up(); field_sctpEINConfigGroup = new INTEGER; union_selection = ALT_sctpEINConfigGroup; } return *field_sctpEINConfigGroup; } const INTEGER& Option::sctpEINConfigGroup() const { if (union_selection != ALT_sctpEINConfigGroup) TTCN_error("Using non-selected field sctpEINConfigGroup in a value of union type @IPL4asp_Types.Option."); return *field_sctpEINConfigGroup; } Linger__opt& Option::solinger() { if (union_selection != ALT_solinger) { clean_up(); field_solinger = new Linger__opt; union_selection = ALT_solinger; } return *field_solinger; } const Linger__opt& Option::solinger() const { if (union_selection != ALT_solinger) TTCN_error("Using non-selected field solinger in a value of union type @IPL4asp_Types.Option."); return *field_solinger; } SSL__proto__support& Option::ssl__support() { if (union_selection != ALT_ssl__support) { clean_up(); field_ssl__support = new SSL__proto__support; union_selection = ALT_ssl__support; } return *field_ssl__support; } const SSL__proto__support& Option::ssl__support() const { if (union_selection != ALT_ssl__support) TTCN_error("Using non-selected field ssl_support in a value of union type @IPL4asp_Types.Option."); return *field_ssl__support; } BOOLEAN& Option::no__delay() { if (union_selection != ALT_no__delay) { clean_up(); field_no__delay = new BOOLEAN; union_selection = ALT_no__delay; } return *field_no__delay; } const BOOLEAN& Option::no__delay() const { if (union_selection != ALT_no__delay) TTCN_error("Using non-selected field no_delay in a value of union type @IPL4asp_Types.Option."); return *field_no__delay; } CHARSTRING& Option::dtlsSrtpProfiles() { if (union_selection != ALT_dtlsSrtpProfiles) { clean_up(); field_dtlsSrtpProfiles = new CHARSTRING; union_selection = ALT_dtlsSrtpProfiles; } return *field_dtlsSrtpProfiles; } const CHARSTRING& Option::dtlsSrtpProfiles() const { if (union_selection != ALT_dtlsSrtpProfiles) TTCN_error("Using non-selected field dtlsSrtpProfiles in a value of union type @IPL4asp_Types.Option."); return *field_dtlsSrtpProfiles; } SSL__cert__options& Option::cert__options() { if (union_selection != ALT_cert__options) { clean_up(); field_cert__options = new SSL__cert__options; union_selection = ALT_cert__options; } return *field_cert__options; } const SSL__cert__options& Option::cert__options() const { if (union_selection != ALT_cert__options) TTCN_error("Using non-selected field cert_options in a value of union type @IPL4asp_Types.Option."); return *field_cert__options; } BOOLEAN& Option::freebind() { if (union_selection != ALT_freebind) { clean_up(); field_freebind = new BOOLEAN; union_selection = ALT_freebind; } return *field_freebind; } const BOOLEAN& Option::freebind() const { if (union_selection != ALT_freebind) TTCN_error("Using non-selected field freebind in a value of union type @IPL4asp_Types.Option."); return *field_freebind; } Option_alpn__list& Option::alpn__list() { if (union_selection != ALT_alpn__list) { clean_up(); field_alpn__list = new Option_alpn__list; union_selection = ALT_alpn__list; } return *field_alpn__list; } const Option_alpn__list& Option::alpn__list() const { if (union_selection != ALT_alpn__list) TTCN_error("Using non-selected field alpn_list in a value of union type @IPL4asp_Types.Option."); return *field_alpn__list; } CHARSTRING& Option::tls__hostname() { if (union_selection != ALT_tls__hostname) { clean_up(); field_tls__hostname = new CHARSTRING; union_selection = ALT_tls__hostname; } return *field_tls__hostname; } const CHARSTRING& Option::tls__hostname() const { if (union_selection != ALT_tls__hostname) TTCN_error("Using non-selected field tls_hostname in a value of union type @IPL4asp_Types.Option."); return *field_tls__hostname; } UDP__ENCAP__Param& Option::udp__encap() { if (union_selection != ALT_udp__encap) { clean_up(); field_udp__encap = new UDP__ENCAP__Param; union_selection = ALT_udp__encap; } return *field_udp__encap; } const UDP__ENCAP__Param& Option::udp__encap() const { if (union_selection != ALT_udp__encap) TTCN_error("Using non-selected field udp_encap in a value of union type @IPL4asp_Types.Option."); return *field_udp__encap; } INTEGER& Option::dscp() { if (union_selection != ALT_dscp) { clean_up(); field_dscp = new INTEGER; union_selection = ALT_dscp; } return *field_dscp; } const INTEGER& Option::dscp() const { if (union_selection != ALT_dscp) TTCN_error("Using non-selected field dscp in a value of union type @IPL4asp_Types.Option."); return *field_dscp; } MTU__discover& Option::mtu__discover() { if (union_selection != ALT_mtu__discover) { clean_up(); field_mtu__discover = new MTU__discover; union_selection = ALT_mtu__discover; } return *field_mtu__discover; } const MTU__discover& Option::mtu__discover() const { if (union_selection != ALT_mtu__discover) TTCN_error("Using non-selected field mtu_discover in a value of union type @IPL4asp_Types.Option."); return *field_mtu__discover; } PSK__options& Option::psk__options() { if (union_selection != ALT_psk__options) { clean_up(); field_psk__options = new PSK__options; union_selection = ALT_psk__options; } return *field_psk__options; } const PSK__options& Option::psk__options() const { if (union_selection != ALT_psk__options) TTCN_error("Using non-selected field psk_options in a value of union type @IPL4asp_Types.Option."); return *field_psk__options; } boolean Option::ischosen(union_selection_type checked_selection) const { if (checked_selection == UNBOUND_VALUE) TTCN_error("Internal error: Performing ischosen() operation on an invalid field of union type @IPL4asp_Types.Option."); return union_selection == checked_selection; } boolean Option::is_bound() const { return union_selection != UNBOUND_VALUE; } boolean Option::is_value() const { switch (union_selection) { case UNBOUND_VALUE: return FALSE; case ALT_reuseAddress: return field_reuseAddress->is_value(); case ALT_tcpKeepAlive: return field_tcpKeepAlive->is_value(); case ALT_sctpEventHandle: return field_sctpEventHandle->is_value(); case ALT_sslKeepAlive: return field_sslKeepAlive->is_value(); case ALT_sctpAdditionalLocalAddresses: return field_sctpAdditionalLocalAddresses->is_value(); case ALT_sctpEINConfigGroup: return field_sctpEINConfigGroup->is_value(); case ALT_solinger: return field_solinger->is_value(); case ALT_ssl__support: return field_ssl__support->is_value(); case ALT_no__delay: return field_no__delay->is_value(); case ALT_dtlsSrtpProfiles: return field_dtlsSrtpProfiles->is_value(); case ALT_cert__options: return field_cert__options->is_value(); case ALT_freebind: return field_freebind->is_value(); case ALT_alpn__list: return field_alpn__list->is_value(); case ALT_tls__hostname: return field_tls__hostname->is_value(); case ALT_udp__encap: return field_udp__encap->is_value(); case ALT_dscp: return field_dscp->is_value(); case ALT_mtu__discover: return field_mtu__discover->is_value(); case ALT_psk__options: return field_psk__options->is_value(); default: TTCN_error("Invalid selection in union is_bound");} } void Option::clean_up() { switch (union_selection) { case ALT_reuseAddress: delete field_reuseAddress; break; case ALT_tcpKeepAlive: delete field_tcpKeepAlive; break; case ALT_sctpEventHandle: delete field_sctpEventHandle; break; case ALT_sslKeepAlive: delete field_sslKeepAlive; break; case ALT_sctpAdditionalLocalAddresses: delete field_sctpAdditionalLocalAddresses; break; case ALT_sctpEINConfigGroup: delete field_sctpEINConfigGroup; break; case ALT_solinger: delete field_solinger; break; case ALT_ssl__support: delete field_ssl__support; break; case ALT_no__delay: delete field_no__delay; break; case ALT_dtlsSrtpProfiles: delete field_dtlsSrtpProfiles; break; case ALT_cert__options: delete field_cert__options; break; case ALT_freebind: delete field_freebind; break; case ALT_alpn__list: delete field_alpn__list; break; case ALT_tls__hostname: delete field_tls__hostname; break; case ALT_udp__encap: delete field_udp__encap; break; case ALT_dscp: delete field_dscp; break; case ALT_mtu__discover: delete field_mtu__discover; break; case ALT_psk__options: delete field_psk__options; break; default: break; } union_selection = UNBOUND_VALUE; } void Option::log() const { switch (union_selection) { case ALT_reuseAddress: TTCN_Logger::log_event_str("{ reuseAddress := "); field_reuseAddress->log(); TTCN_Logger::log_event_str(" }"); break; case ALT_tcpKeepAlive: TTCN_Logger::log_event_str("{ tcpKeepAlive := "); field_tcpKeepAlive->log(); TTCN_Logger::log_event_str(" }"); break; case ALT_sctpEventHandle: TTCN_Logger::log_event_str("{ sctpEventHandle := "); field_sctpEventHandle->log(); TTCN_Logger::log_event_str(" }"); break; case ALT_sslKeepAlive: TTCN_Logger::log_event_str("{ sslKeepAlive := "); field_sslKeepAlive->log(); TTCN_Logger::log_event_str(" }"); break; case ALT_sctpAdditionalLocalAddresses: TTCN_Logger::log_event_str("{ sctpAdditionalLocalAddresses := "); field_sctpAdditionalLocalAddresses->log(); TTCN_Logger::log_event_str(" }"); break; case ALT_sctpEINConfigGroup: TTCN_Logger::log_event_str("{ sctpEINConfigGroup := "); field_sctpEINConfigGroup->log(); TTCN_Logger::log_event_str(" }"); break; case ALT_solinger: TTCN_Logger::log_event_str("{ solinger := "); field_solinger->log(); TTCN_Logger::log_event_str(" }"); break; case ALT_ssl__support: TTCN_Logger::log_event_str("{ ssl_support := "); field_ssl__support->log(); TTCN_Logger::log_event_str(" }"); break; case ALT_no__delay: TTCN_Logger::log_event_str("{ no_delay := "); field_no__delay->log(); TTCN_Logger::log_event_str(" }"); break; case ALT_dtlsSrtpProfiles: TTCN_Logger::log_event_str("{ dtlsSrtpProfiles := "); field_dtlsSrtpProfiles->log(); TTCN_Logger::log_event_str(" }"); break; case ALT_cert__options: TTCN_Logger::log_event_str("{ cert_options := "); field_cert__options->log(); TTCN_Logger::log_event_str(" }"); break; case ALT_freebind: TTCN_Logger::log_event_str("{ freebind := "); field_freebind->log(); TTCN_Logger::log_event_str(" }"); break; case ALT_alpn__list: TTCN_Logger::log_event_str("{ alpn_list := "); field_alpn__list->log(); TTCN_Logger::log_event_str(" }"); break; case ALT_tls__hostname: TTCN_Logger::log_event_str("{ tls_hostname := "); field_tls__hostname->log(); TTCN_Logger::log_event_str(" }"); break; case ALT_udp__encap: TTCN_Logger::log_event_str("{ udp_encap := "); field_udp__encap->log(); TTCN_Logger::log_event_str(" }"); break; case ALT_dscp: TTCN_Logger::log_event_str("{ dscp := "); field_dscp->log(); TTCN_Logger::log_event_str(" }"); break; case ALT_mtu__discover: TTCN_Logger::log_event_str("{ mtu_discover := "); field_mtu__discover->log(); TTCN_Logger::log_event_str(" }"); break; case ALT_psk__options: TTCN_Logger::log_event_str("{ psk_options := "); field_psk__options->log(); TTCN_Logger::log_event_str(" }"); break; default: TTCN_Logger::log_event_unbound(); } } void Option::set_param(Module_Param& param) { param.basic_check(Module_Param::BC_VALUE, "union value"); Module_Param_Ptr m_p = ¶m; if (m_p->get_type()==Module_Param::MP_Value_List && m_p->get_size()==0) return; if (m_p->get_type()!=Module_Param::MP_Assignment_List) { param.error("union value with field name was expected"); } Module_Param* mp_last = m_p->get_elem(m_p->get_size()-1); char* last_name = mp_last->get_id()->get_name(); if (!strcmp(last_name, "reuseAddress")) { reuseAddress().set_param(*mp_last); if (!reuseAddress().is_bound()) clean_up(); return; } if (!strcmp(last_name, "tcpKeepAlive")) { tcpKeepAlive().set_param(*mp_last); if (!tcpKeepAlive().is_bound()) clean_up(); return; } if (!strcmp(last_name, "sctpEventHandle")) { sctpEventHandle().set_param(*mp_last); if (!sctpEventHandle().is_bound()) clean_up(); return; } if (!strcmp(last_name, "sslKeepAlive")) { sslKeepAlive().set_param(*mp_last); if (!sslKeepAlive().is_bound()) clean_up(); return; } if (!strcmp(last_name, "sctpAdditionalLocalAddresses")) { sctpAdditionalLocalAddresses().set_param(*mp_last); if (!sctpAdditionalLocalAddresses().is_bound()) clean_up(); return; } if (!strcmp(last_name, "sctpEINConfigGroup")) { sctpEINConfigGroup().set_param(*mp_last); if (!sctpEINConfigGroup().is_bound()) clean_up(); return; } if (!strcmp(last_name, "solinger")) { solinger().set_param(*mp_last); if (!solinger().is_bound()) clean_up(); return; } if (!strcmp(last_name, "ssl_support")) { ssl__support().set_param(*mp_last); if (!ssl__support().is_bound()) clean_up(); return; } if (!strcmp(last_name, "no_delay")) { no__delay().set_param(*mp_last); if (!no__delay().is_bound()) clean_up(); return; } if (!strcmp(last_name, "dtlsSrtpProfiles")) { dtlsSrtpProfiles().set_param(*mp_last); if (!dtlsSrtpProfiles().is_bound()) clean_up(); return; } if (!strcmp(last_name, "cert_options")) { cert__options().set_param(*mp_last); if (!cert__options().is_bound()) clean_up(); return; } if (!strcmp(last_name, "freebind")) { freebind().set_param(*mp_last); if (!freebind().is_bound()) clean_up(); return; } if (!strcmp(last_name, "alpn_list")) { alpn__list().set_param(*mp_last); if (!alpn__list().is_bound()) clean_up(); return; } if (!strcmp(last_name, "tls_hostname")) { tls__hostname().set_param(*mp_last); if (!tls__hostname().is_bound()) clean_up(); return; } if (!strcmp(last_name, "udp_encap")) { udp__encap().set_param(*mp_last); if (!udp__encap().is_bound()) clean_up(); return; } if (!strcmp(last_name, "dscp")) { dscp().set_param(*mp_last); if (!dscp().is_bound()) clean_up(); return; } if (!strcmp(last_name, "mtu_discover")) { mtu__discover().set_param(*mp_last); if (!mtu__discover().is_bound()) clean_up(); return; } if (!strcmp(last_name, "psk_options")) { psk__options().set_param(*mp_last); if (!psk__options().is_bound()) clean_up(); return; } mp_last->error("Field %s does not exist in type @IPL4asp_Types.Option.", last_name); } void Option::set_implicit_omit() { switch (union_selection) { case ALT_reuseAddress: field_reuseAddress->set_implicit_omit(); break; case ALT_tcpKeepAlive: field_tcpKeepAlive->set_implicit_omit(); break; case ALT_sctpEventHandle: field_sctpEventHandle->set_implicit_omit(); break; case ALT_sslKeepAlive: field_sslKeepAlive->set_implicit_omit(); break; case ALT_sctpAdditionalLocalAddresses: field_sctpAdditionalLocalAddresses->set_implicit_omit(); break; case ALT_sctpEINConfigGroup: field_sctpEINConfigGroup->set_implicit_omit(); break; case ALT_solinger: field_solinger->set_implicit_omit(); break; case ALT_ssl__support: field_ssl__support->set_implicit_omit(); break; case ALT_no__delay: field_no__delay->set_implicit_omit(); break; case ALT_dtlsSrtpProfiles: field_dtlsSrtpProfiles->set_implicit_omit(); break; case ALT_cert__options: field_cert__options->set_implicit_omit(); break; case ALT_freebind: field_freebind->set_implicit_omit(); break; case ALT_alpn__list: field_alpn__list->set_implicit_omit(); break; case ALT_tls__hostname: field_tls__hostname->set_implicit_omit(); break; case ALT_udp__encap: field_udp__encap->set_implicit_omit(); break; case ALT_dscp: field_dscp->set_implicit_omit(); break; case ALT_mtu__discover: field_mtu__discover->set_implicit_omit(); break; case ALT_psk__options: field_psk__options->set_implicit_omit(); break; default: break; } } void Option::encode_text(Text_Buf& text_buf) const { text_buf.push_int(union_selection); switch (union_selection) { case ALT_reuseAddress: field_reuseAddress->encode_text(text_buf); break; case ALT_tcpKeepAlive: field_tcpKeepAlive->encode_text(text_buf); break; case ALT_sctpEventHandle: field_sctpEventHandle->encode_text(text_buf); break; case ALT_sslKeepAlive: field_sslKeepAlive->encode_text(text_buf); break; case ALT_sctpAdditionalLocalAddresses: field_sctpAdditionalLocalAddresses->encode_text(text_buf); break; case ALT_sctpEINConfigGroup: field_sctpEINConfigGroup->encode_text(text_buf); break; case ALT_solinger: field_solinger->encode_text(text_buf); break; case ALT_ssl__support: field_ssl__support->encode_text(text_buf); break; case ALT_no__delay: field_no__delay->encode_text(text_buf); break; case ALT_dtlsSrtpProfiles: field_dtlsSrtpProfiles->encode_text(text_buf); break; case ALT_cert__options: field_cert__options->encode_text(text_buf); break; case ALT_freebind: field_freebind->encode_text(text_buf); break; case ALT_alpn__list: field_alpn__list->encode_text(text_buf); break; case ALT_tls__hostname: field_tls__hostname->encode_text(text_buf); break; case ALT_udp__encap: field_udp__encap->encode_text(text_buf); break; case ALT_dscp: field_dscp->encode_text(text_buf); break; case ALT_mtu__discover: field_mtu__discover->encode_text(text_buf); break; case ALT_psk__options: field_psk__options->encode_text(text_buf); break; default: TTCN_error("Text encoder: Encoding an unbound value of union type @IPL4asp_Types.Option."); } } void Option::decode_text(Text_Buf& text_buf) { switch ((union_selection_type)text_buf.pull_int().get_val()) { case ALT_reuseAddress: reuseAddress().decode_text(text_buf); break; case ALT_tcpKeepAlive: tcpKeepAlive().decode_text(text_buf); break; case ALT_sctpEventHandle: sctpEventHandle().decode_text(text_buf); break; case ALT_sslKeepAlive: sslKeepAlive().decode_text(text_buf); break; case ALT_sctpAdditionalLocalAddresses: sctpAdditionalLocalAddresses().decode_text(text_buf); break; case ALT_sctpEINConfigGroup: sctpEINConfigGroup().decode_text(text_buf); break; case ALT_solinger: solinger().decode_text(text_buf); break; case ALT_ssl__support: ssl__support().decode_text(text_buf); break; case ALT_no__delay: no__delay().decode_text(text_buf); break; case ALT_dtlsSrtpProfiles: dtlsSrtpProfiles().decode_text(text_buf); break; case ALT_cert__options: cert__options().decode_text(text_buf); break; case ALT_freebind: freebind().decode_text(text_buf); break; case ALT_alpn__list: alpn__list().decode_text(text_buf); break; case ALT_tls__hostname: tls__hostname().decode_text(text_buf); break; case ALT_udp__encap: udp__encap().decode_text(text_buf); break; case ALT_dscp: dscp().decode_text(text_buf); break; case ALT_mtu__discover: mtu__discover().decode_text(text_buf); break; case ALT_psk__options: psk__options().decode_text(text_buf); break; default: TTCN_error("Text decoder: Unrecognized union selector was received for type @IPL4asp_Types.Option."); } } void Option_template::copy_value(const Option& other_value) { single_value.union_selection = other_value.get_selection(); switch (single_value.union_selection) { case Option::ALT_reuseAddress: single_value.field_reuseAddress = new ReuseAddress_template(other_value.reuseAddress()); break; case Option::ALT_tcpKeepAlive: single_value.field_tcpKeepAlive = new TcpKeepAlive_template(other_value.tcpKeepAlive()); break; case Option::ALT_sctpEventHandle: single_value.field_sctpEventHandle = new SctpEventHandle_template(other_value.sctpEventHandle()); break; case Option::ALT_sslKeepAlive: single_value.field_sslKeepAlive = new TcpKeepAlive_template(other_value.sslKeepAlive()); break; case Option::ALT_sctpAdditionalLocalAddresses: single_value.field_sctpAdditionalLocalAddresses = new HostList_template(other_value.sctpAdditionalLocalAddresses()); break; case Option::ALT_sctpEINConfigGroup: single_value.field_sctpEINConfigGroup = new INTEGER_template(other_value.sctpEINConfigGroup()); break; case Option::ALT_solinger: single_value.field_solinger = new Linger__opt_template(other_value.solinger()); break; case Option::ALT_ssl__support: single_value.field_ssl__support = new SSL__proto__support_template(other_value.ssl__support()); break; case Option::ALT_no__delay: single_value.field_no__delay = new BOOLEAN_template(other_value.no__delay()); break; case Option::ALT_dtlsSrtpProfiles: single_value.field_dtlsSrtpProfiles = new CHARSTRING_template(other_value.dtlsSrtpProfiles()); break; case Option::ALT_cert__options: single_value.field_cert__options = new SSL__cert__options_template(other_value.cert__options()); break; case Option::ALT_freebind: single_value.field_freebind = new BOOLEAN_template(other_value.freebind()); break; case Option::ALT_alpn__list: single_value.field_alpn__list = new Option_alpn__list_template(other_value.alpn__list()); break; case Option::ALT_tls__hostname: single_value.field_tls__hostname = new CHARSTRING_template(other_value.tls__hostname()); break; case Option::ALT_udp__encap: single_value.field_udp__encap = new UDP__ENCAP__Param_template(other_value.udp__encap()); break; case Option::ALT_dscp: single_value.field_dscp = new INTEGER_template(other_value.dscp()); break; case Option::ALT_mtu__discover: single_value.field_mtu__discover = new MTU__discover_template(other_value.mtu__discover()); break; case Option::ALT_psk__options: single_value.field_psk__options = new PSK__options_template(other_value.psk__options()); break; default: TTCN_error("Initializing a template with an unbound value of type @IPL4asp_Types.Option."); } set_selection(SPECIFIC_VALUE); } void Option_template::copy_template(const Option_template& other_value) { switch (other_value.template_selection) { case SPECIFIC_VALUE: single_value.union_selection = other_value.single_value.union_selection; switch (single_value.union_selection) { case Option::ALT_reuseAddress: single_value.field_reuseAddress = new ReuseAddress_template(*other_value.single_value.field_reuseAddress); break; case Option::ALT_tcpKeepAlive: single_value.field_tcpKeepAlive = new TcpKeepAlive_template(*other_value.single_value.field_tcpKeepAlive); break; case Option::ALT_sctpEventHandle: single_value.field_sctpEventHandle = new SctpEventHandle_template(*other_value.single_value.field_sctpEventHandle); break; case Option::ALT_sslKeepAlive: single_value.field_sslKeepAlive = new TcpKeepAlive_template(*other_value.single_value.field_sslKeepAlive); break; case Option::ALT_sctpAdditionalLocalAddresses: single_value.field_sctpAdditionalLocalAddresses = new HostList_template(*other_value.single_value.field_sctpAdditionalLocalAddresses); break; case Option::ALT_sctpEINConfigGroup: single_value.field_sctpEINConfigGroup = new INTEGER_template(*other_value.single_value.field_sctpEINConfigGroup); break; case Option::ALT_solinger: single_value.field_solinger = new Linger__opt_template(*other_value.single_value.field_solinger); break; case Option::ALT_ssl__support: single_value.field_ssl__support = new SSL__proto__support_template(*other_value.single_value.field_ssl__support); break; case Option::ALT_no__delay: single_value.field_no__delay = new BOOLEAN_template(*other_value.single_value.field_no__delay); break; case Option::ALT_dtlsSrtpProfiles: single_value.field_dtlsSrtpProfiles = new CHARSTRING_template(*other_value.single_value.field_dtlsSrtpProfiles); break; case Option::ALT_cert__options: single_value.field_cert__options = new SSL__cert__options_template(*other_value.single_value.field_cert__options); break; case Option::ALT_freebind: single_value.field_freebind = new BOOLEAN_template(*other_value.single_value.field_freebind); break; case Option::ALT_alpn__list: single_value.field_alpn__list = new Option_alpn__list_template(*other_value.single_value.field_alpn__list); break; case Option::ALT_tls__hostname: single_value.field_tls__hostname = new CHARSTRING_template(*other_value.single_value.field_tls__hostname); break; case Option::ALT_udp__encap: single_value.field_udp__encap = new UDP__ENCAP__Param_template(*other_value.single_value.field_udp__encap); break; case Option::ALT_dscp: single_value.field_dscp = new INTEGER_template(*other_value.single_value.field_dscp); break; case Option::ALT_mtu__discover: single_value.field_mtu__discover = new MTU__discover_template(*other_value.single_value.field_mtu__discover); break; case Option::ALT_psk__options: single_value.field_psk__options = new PSK__options_template(*other_value.single_value.field_psk__options); break; default: TTCN_error("Internal error: Invalid union selector in a specific value when copying a template of type @IPL4asp_Types.Option."); } case OMIT_VALUE: case ANY_VALUE: case ANY_OR_OMIT: break; case VALUE_LIST: case COMPLEMENTED_LIST: case CONJUNCTION_MATCH: value_list.n_values = other_value.value_list.n_values; value_list.list_value = new Option_template[value_list.n_values]; for (unsigned int list_count = 0; list_count < value_list.n_values; list_count++) value_list.list_value[list_count].copy_template(other_value.value_list.list_value[list_count]); break; case IMPLICATION_MATCH: implication_.precondition = new Option_template(*other_value.implication_.precondition); implication_.implied_template = new Option_template(*other_value.implication_.implied_template); break; case DYNAMIC_MATCH: dyn_match = other_value.dyn_match; dyn_match->ref_count++; break; default: TTCN_error("Copying an uninitialized template of union type @IPL4asp_Types.Option."); } set_selection(other_value); } Option_template::Option_template() { } Option_template::Option_template(template_sel other_value) : Base_Template(other_value) { check_single_selection(other_value); } Option_template::Option_template(const Option& other_value) { copy_value(other_value); } Option_template::Option_template(const OPTIONAL